@oxy.so/services 11.9.0 → 11.12.0

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 (210) hide show
  1. package/lib/commonjs/assets/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
  2. package/lib/commonjs/assets/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  3. package/lib/commonjs/assets/assets/fonts/icons/manifest.json +5 -4
  4. package/lib/commonjs/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
  5. package/lib/commonjs/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  6. package/lib/commonjs/assets/fonts/icons/manifest.json +5 -4
  7. package/lib/commonjs/index.js +45 -0
  8. package/lib/commonjs/index.js.map +1 -1
  9. package/lib/commonjs/ui/appAssertion/AppAssertionContext.js +79 -0
  10. package/lib/commonjs/ui/appAssertion/AppAssertionContext.js.map +1 -0
  11. package/lib/commonjs/ui/appAssertion/appAssertionManager.js +309 -0
  12. package/lib/commonjs/ui/appAssertion/appAssertionManager.js.map +1 -0
  13. package/lib/commonjs/ui/appAssertion/appIntegrityPlatform.js +18 -0
  14. package/lib/commonjs/ui/appAssertion/appIntegrityPlatform.js.map +1 -0
  15. package/lib/commonjs/ui/appAssertion/appIntegrityPlatform.native.js +30 -0
  16. package/lib/commonjs/ui/appAssertion/appIntegrityPlatform.native.js.map +1 -0
  17. package/lib/commonjs/ui/appAssertion/appIntegrityTypes.js +6 -0
  18. package/lib/commonjs/ui/appAssertion/appIntegrityTypes.js.map +1 -0
  19. package/lib/commonjs/ui/components/AccountInvitationAcceptance.js +97 -0
  20. package/lib/commonjs/ui/components/AccountInvitationAcceptance.js.map +1 -0
  21. package/lib/commonjs/ui/components/DisplayCurrencySelector.js +49 -0
  22. package/lib/commonjs/ui/components/DisplayCurrencySelector.js.map +1 -0
  23. package/lib/commonjs/ui/components/fileManagement/FileAppAccessSection.js +121 -0
  24. package/lib/commonjs/ui/components/fileManagement/FileAppAccessSection.js.map +1 -0
  25. package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +6 -2
  26. package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
  27. package/lib/commonjs/ui/context/OxyContext.js +10 -1
  28. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  29. package/lib/commonjs/ui/hooks/mutations/mutationKeys.js +4 -0
  30. package/lib/commonjs/ui/hooks/mutations/mutationKeys.js.map +1 -1
  31. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +49 -1
  32. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  33. package/lib/commonjs/ui/hooks/queries/queryKeys.js +6 -1
  34. package/lib/commonjs/ui/hooks/queries/queryKeys.js.map +1 -1
  35. package/lib/commonjs/ui/hooks/queries/useFileQueries.js +35 -1
  36. package/lib/commonjs/ui/hooks/queries/useFileQueries.js.map +1 -1
  37. package/lib/commonjs/ui/hooks/useDisplayCurrency.js +77 -0
  38. package/lib/commonjs/ui/hooks/useDisplayCurrency.js.map +1 -0
  39. package/lib/commonjs/ui/hooks/useDisplayPrice.js +59 -0
  40. package/lib/commonjs/ui/hooks/useDisplayPrice.js.map +1 -0
  41. package/lib/commonjs/ui/icons/subsetGlyphMaps.js +1 -0
  42. package/lib/commonjs/ui/icons/subsetGlyphMaps.js.map +1 -1
  43. package/lib/commonjs/ui/index.js +7 -0
  44. package/lib/commonjs/ui/index.js.map +1 -1
  45. package/lib/commonjs/ui/screens/AccountMembersScreen.js +63 -20
  46. package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
  47. package/lib/commonjs/ui/screens/PreferencesScreen.js +4 -3
  48. package/lib/commonjs/ui/screens/PreferencesScreen.js.map +1 -1
  49. package/lib/module/assets/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
  50. package/lib/module/assets/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  51. package/lib/module/assets/assets/fonts/icons/manifest.json +5 -4
  52. package/lib/module/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
  53. package/lib/module/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  54. package/lib/module/assets/fonts/icons/manifest.json +5 -4
  55. package/lib/module/index.js +8 -0
  56. package/lib/module/index.js.map +1 -1
  57. package/lib/module/ui/appAssertion/AppAssertionContext.js +72 -0
  58. package/lib/module/ui/appAssertion/AppAssertionContext.js.map +1 -0
  59. package/lib/module/ui/appAssertion/appAssertionManager.js +304 -0
  60. package/lib/module/ui/appAssertion/appAssertionManager.js.map +1 -0
  61. package/lib/module/ui/appAssertion/appIntegrityPlatform.js +14 -0
  62. package/lib/module/ui/appAssertion/appIntegrityPlatform.js.map +1 -0
  63. package/lib/module/ui/appAssertion/appIntegrityPlatform.native.js +26 -0
  64. package/lib/module/ui/appAssertion/appIntegrityPlatform.native.js.map +1 -0
  65. package/lib/module/ui/appAssertion/appIntegrityTypes.js +4 -0
  66. package/lib/module/ui/appAssertion/appIntegrityTypes.js.map +1 -0
  67. package/lib/module/ui/components/AccountInvitationAcceptance.js +94 -0
  68. package/lib/module/ui/components/AccountInvitationAcceptance.js.map +1 -0
  69. package/lib/module/ui/components/DisplayCurrencySelector.js +44 -0
  70. package/lib/module/ui/components/DisplayCurrencySelector.js.map +1 -0
  71. package/lib/module/ui/components/fileManagement/FileAppAccessSection.js +116 -0
  72. package/lib/module/ui/components/fileManagement/FileAppAccessSection.js.map +1 -0
  73. package/lib/module/ui/components/fileManagement/FileDetailsModal.js +6 -2
  74. package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
  75. package/lib/module/ui/context/OxyContext.js +10 -1
  76. package/lib/module/ui/context/OxyContext.js.map +1 -1
  77. package/lib/module/ui/hooks/mutations/mutationKeys.js +4 -0
  78. package/lib/module/ui/hooks/mutations/mutationKeys.js.map +1 -1
  79. package/lib/module/ui/hooks/mutations/useAccountMutations.js +47 -0
  80. package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  81. package/lib/module/ui/hooks/queries/queryKeys.js +6 -1
  82. package/lib/module/ui/hooks/queries/queryKeys.js.map +1 -1
  83. package/lib/module/ui/hooks/queries/useFileQueries.js +33 -1
  84. package/lib/module/ui/hooks/queries/useFileQueries.js.map +1 -1
  85. package/lib/module/ui/hooks/useDisplayCurrency.js +72 -0
  86. package/lib/module/ui/hooks/useDisplayCurrency.js.map +1 -0
  87. package/lib/module/ui/hooks/useDisplayPrice.js +56 -0
  88. package/lib/module/ui/hooks/useDisplayPrice.js.map +1 -0
  89. package/lib/module/ui/icons/subsetGlyphMaps.js +1 -0
  90. package/lib/module/ui/icons/subsetGlyphMaps.js.map +1 -1
  91. package/lib/module/ui/index.js +1 -0
  92. package/lib/module/ui/index.js.map +1 -1
  93. package/lib/module/ui/screens/AccountMembersScreen.js +63 -20
  94. package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
  95. package/lib/module/ui/screens/PreferencesScreen.js +4 -3
  96. package/lib/module/ui/screens/PreferencesScreen.js.map +1 -1
  97. package/lib/typescript/commonjs/index.d.ts +7 -0
  98. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  99. package/lib/typescript/commonjs/ui/appAssertion/AppAssertionContext.d.ts +41 -0
  100. package/lib/typescript/commonjs/ui/appAssertion/AppAssertionContext.d.ts.map +1 -0
  101. package/lib/typescript/commonjs/ui/appAssertion/appAssertionManager.d.ts +92 -0
  102. package/lib/typescript/commonjs/ui/appAssertion/appAssertionManager.d.ts.map +1 -0
  103. package/lib/typescript/commonjs/ui/appAssertion/appIntegrityPlatform.d.ts +9 -0
  104. package/lib/typescript/commonjs/ui/appAssertion/appIntegrityPlatform.d.ts.map +1 -0
  105. package/lib/typescript/commonjs/ui/appAssertion/appIntegrityPlatform.native.d.ts +3 -0
  106. package/lib/typescript/commonjs/ui/appAssertion/appIntegrityPlatform.native.d.ts.map +1 -0
  107. package/lib/typescript/commonjs/ui/appAssertion/appIntegrityTypes.d.ts +22 -0
  108. package/lib/typescript/commonjs/ui/appAssertion/appIntegrityTypes.d.ts.map +1 -0
  109. package/lib/typescript/commonjs/ui/components/AccountInvitationAcceptance.d.ts +5 -0
  110. package/lib/typescript/commonjs/ui/components/AccountInvitationAcceptance.d.ts.map +1 -0
  111. package/lib/typescript/commonjs/ui/components/DisplayCurrencySelector.d.ts +3 -0
  112. package/lib/typescript/commonjs/ui/components/DisplayCurrencySelector.d.ts.map +1 -0
  113. package/lib/typescript/commonjs/ui/components/fileManagement/FileAppAccessSection.d.ts +15 -0
  114. package/lib/typescript/commonjs/ui/components/fileManagement/FileAppAccessSection.d.ts.map +1 -0
  115. package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts +2 -1
  116. package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
  117. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  118. package/lib/typescript/commonjs/ui/hooks/mutations/mutationKeys.d.ts +3 -0
  119. package/lib/typescript/commonjs/ui/hooks/mutations/mutationKeys.d.ts.map +1 -1
  120. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +20 -2
  121. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  122. package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts +5 -0
  123. package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts.map +1 -1
  124. package/lib/typescript/commonjs/ui/hooks/queries/useFileQueries.d.ts +11 -1
  125. package/lib/typescript/commonjs/ui/hooks/queries/useFileQueries.d.ts.map +1 -1
  126. package/lib/typescript/commonjs/ui/hooks/queries/usePersonalPlans.d.ts +2 -1
  127. package/lib/typescript/commonjs/ui/hooks/queries/usePersonalPlans.d.ts.map +1 -1
  128. package/lib/typescript/commonjs/ui/hooks/useDisplayCurrency.d.ts +11 -0
  129. package/lib/typescript/commonjs/ui/hooks/useDisplayCurrency.d.ts.map +1 -0
  130. package/lib/typescript/commonjs/ui/hooks/useDisplayPrice.d.ts +6 -0
  131. package/lib/typescript/commonjs/ui/hooks/useDisplayPrice.d.ts.map +1 -0
  132. package/lib/typescript/commonjs/ui/icons/MaterialCommunityIcons.d.ts +1 -1
  133. package/lib/typescript/commonjs/ui/icons/MaterialCommunityIcons.d.ts.map +1 -1
  134. package/lib/typescript/commonjs/ui/icons/subsetGlyphMaps.d.ts +1 -0
  135. package/lib/typescript/commonjs/ui/icons/subsetGlyphMaps.d.ts.map +1 -1
  136. package/lib/typescript/commonjs/ui/index.d.ts +2 -0
  137. package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
  138. package/lib/typescript/commonjs/ui/screens/AccountMembersScreen.d.ts +1 -1
  139. package/lib/typescript/commonjs/ui/screens/AccountMembersScreen.d.ts.map +1 -1
  140. package/lib/typescript/commonjs/ui/screens/PreferencesScreen.d.ts.map +1 -1
  141. package/lib/typescript/module/index.d.ts +7 -0
  142. package/lib/typescript/module/index.d.ts.map +1 -1
  143. package/lib/typescript/module/ui/appAssertion/AppAssertionContext.d.ts +41 -0
  144. package/lib/typescript/module/ui/appAssertion/AppAssertionContext.d.ts.map +1 -0
  145. package/lib/typescript/module/ui/appAssertion/appAssertionManager.d.ts +92 -0
  146. package/lib/typescript/module/ui/appAssertion/appAssertionManager.d.ts.map +1 -0
  147. package/lib/typescript/module/ui/appAssertion/appIntegrityPlatform.d.ts +9 -0
  148. package/lib/typescript/module/ui/appAssertion/appIntegrityPlatform.d.ts.map +1 -0
  149. package/lib/typescript/module/ui/appAssertion/appIntegrityPlatform.native.d.ts +3 -0
  150. package/lib/typescript/module/ui/appAssertion/appIntegrityPlatform.native.d.ts.map +1 -0
  151. package/lib/typescript/module/ui/appAssertion/appIntegrityTypes.d.ts +22 -0
  152. package/lib/typescript/module/ui/appAssertion/appIntegrityTypes.d.ts.map +1 -0
  153. package/lib/typescript/module/ui/components/AccountInvitationAcceptance.d.ts +5 -0
  154. package/lib/typescript/module/ui/components/AccountInvitationAcceptance.d.ts.map +1 -0
  155. package/lib/typescript/module/ui/components/DisplayCurrencySelector.d.ts +3 -0
  156. package/lib/typescript/module/ui/components/DisplayCurrencySelector.d.ts.map +1 -0
  157. package/lib/typescript/module/ui/components/fileManagement/FileAppAccessSection.d.ts +15 -0
  158. package/lib/typescript/module/ui/components/fileManagement/FileAppAccessSection.d.ts.map +1 -0
  159. package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts +2 -1
  160. package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
  161. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  162. package/lib/typescript/module/ui/hooks/mutations/mutationKeys.d.ts +3 -0
  163. package/lib/typescript/module/ui/hooks/mutations/mutationKeys.d.ts.map +1 -1
  164. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +20 -2
  165. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  166. package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts +5 -0
  167. package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts.map +1 -1
  168. package/lib/typescript/module/ui/hooks/queries/useFileQueries.d.ts +11 -1
  169. package/lib/typescript/module/ui/hooks/queries/useFileQueries.d.ts.map +1 -1
  170. package/lib/typescript/module/ui/hooks/queries/usePersonalPlans.d.ts +2 -1
  171. package/lib/typescript/module/ui/hooks/queries/usePersonalPlans.d.ts.map +1 -1
  172. package/lib/typescript/module/ui/hooks/useDisplayCurrency.d.ts +11 -0
  173. package/lib/typescript/module/ui/hooks/useDisplayCurrency.d.ts.map +1 -0
  174. package/lib/typescript/module/ui/hooks/useDisplayPrice.d.ts +6 -0
  175. package/lib/typescript/module/ui/hooks/useDisplayPrice.d.ts.map +1 -0
  176. package/lib/typescript/module/ui/icons/MaterialCommunityIcons.d.ts +1 -1
  177. package/lib/typescript/module/ui/icons/MaterialCommunityIcons.d.ts.map +1 -1
  178. package/lib/typescript/module/ui/icons/subsetGlyphMaps.d.ts +1 -0
  179. package/lib/typescript/module/ui/icons/subsetGlyphMaps.d.ts.map +1 -1
  180. package/lib/typescript/module/ui/index.d.ts +2 -0
  181. package/lib/typescript/module/ui/index.d.ts.map +1 -1
  182. package/lib/typescript/module/ui/screens/AccountMembersScreen.d.ts +1 -1
  183. package/lib/typescript/module/ui/screens/AccountMembersScreen.d.ts.map +1 -1
  184. package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts.map +1 -1
  185. package/package.json +9 -6
  186. package/src/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
  187. package/src/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  188. package/src/assets/fonts/icons/manifest.json +5 -4
  189. package/src/index.ts +17 -0
  190. package/src/ui/appAssertion/AppAssertionContext.tsx +109 -0
  191. package/src/ui/appAssertion/appAssertionManager.ts +363 -0
  192. package/src/ui/appAssertion/appIntegrityPlatform.native.ts +27 -0
  193. package/src/ui/appAssertion/appIntegrityPlatform.ts +12 -0
  194. package/src/ui/appAssertion/appIntegrityTypes.ts +23 -0
  195. package/src/ui/components/AccountInvitationAcceptance.tsx +90 -0
  196. package/src/ui/components/DisplayCurrencySelector.tsx +38 -0
  197. package/src/ui/components/__tests__/AccountInvitationAcceptance.test.tsx +61 -0
  198. package/src/ui/components/fileManagement/FileAppAccessSection.tsx +111 -0
  199. package/src/ui/components/fileManagement/FileDetailsModal.tsx +5 -1
  200. package/src/ui/context/OxyContext.tsx +13 -1
  201. package/src/ui/hooks/mutations/mutationKeys.ts +5 -0
  202. package/src/ui/hooks/mutations/useAccountMutations.ts +33 -0
  203. package/src/ui/hooks/queries/queryKeys.ts +5 -0
  204. package/src/ui/hooks/queries/useFileQueries.ts +44 -2
  205. package/src/ui/hooks/useDisplayCurrency.ts +64 -0
  206. package/src/ui/hooks/useDisplayPrice.ts +40 -0
  207. package/src/ui/icons/subsetGlyphMaps.ts +1 -0
  208. package/src/ui/index.ts +2 -0
  209. package/src/ui/screens/AccountMembersScreen.tsx +71 -27
  210. package/src/ui/screens/PreferencesScreen.tsx +2 -0
@@ -6,7 +6,7 @@
6
6
  "fontFamily": "OxyServicesIonicons",
7
7
  "file": "src/assets/fonts/icons/OxyServicesIonicons.ttf",
8
8
  "bytes": 43160,
9
- "sha256": "c062679623ae08f1fb0231729c1f9efae97044e35ffe51f7c0544f866cb2f959",
9
+ "sha256": "d96ec296f01cc237bf8e087401879aeef569c82871f40e4447d63bc8a9eaab3e",
10
10
  "names": [
11
11
  "add",
12
12
  "add-circle-outline",
@@ -152,8 +152,8 @@
152
152
  "materialCommunityIcons": {
153
153
  "fontFamily": "OxyServicesMaterialCommunityIcons",
154
154
  "file": "src/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf",
155
- "bytes": 29224,
156
- "sha256": "c7fdc975626c395ee2b1d0c462ae8dab6f800935bb64739d2d07ea4a30da51d0",
155
+ "bytes": 29292,
156
+ "sha256": "a3bef5c42424d459860676f20d7f1e9aaea4f7295aba3d5361ca2195d8f1d59c",
157
157
  "names": [
158
158
  "account",
159
159
  "account-circle",
@@ -337,6 +337,7 @@
337
337
  "trophy",
338
338
  "trophy-outline",
339
339
  "update",
340
+ "upload",
340
341
  "video-outline",
341
342
  "volume-off",
342
343
  "wallet",
@@ -352,5 +353,5 @@
352
353
  }
353
354
  },
354
355
  "glyphMapsFile": "src/ui/icons/subsetGlyphMaps.ts",
355
- "glyphMapsSha256": "1f2e6005461383abb6c5443981341e8ae716110eb6de6590f8a3caa4cfe614b0"
356
+ "glyphMapsSha256": "b0a3d21006a83bf10deac1c8e5bb1a4dacac3c0afe9d445ed856f766f49b6c01"
356
357
  }
@@ -45,6 +45,10 @@ export { useOptionalOxy, OxyProviderMissingError } from "./ui/context/OxyContext
45
45
  // members moving — a locale change or a dialog opening does not re-render them.
46
46
  export { useOxyRuntime, useOxySnapshot, useActiveAccount, useDeviceDirectory, OxyRuntimeMissingError } from "./ui/runtime/index.js";
47
47
  export { useAuth } from "./ui/hooks/useAuth.js";
48
+ // This app's Oxy-signed assertion of which app it is (ADR 0045), obtained and
49
+ // refreshed by the provider; attach `getAppAssertionHeaders()` to a request
50
+ // for a service that needs to know the app.
51
+ export { useAppAssertion, AppAssertionProviderMissingError } from "./ui/appAssertion/AppAssertionContext.js";
48
52
  export { createDeferredProductAnalytics } from "./ui/analytics/productAnalytics.js";
49
53
  // Thrown by `switchToAccount` / `switchSession` while `OxyProvider` runs with
50
54
  // `sessionMode="identity"` — an identity-bound app authenticates as the owner of
@@ -238,4 +242,8 @@ export { SurfaceHeaderAction } from "./ui/components/SurfaceHeaderAction.js";
238
242
  // Imperative account dialog entry points (outside React).
239
243
  export { openAccountDialog, closeAccountDialog, subscribeToAccountDialog } from "./ui/navigation/accountDialogManager.js";
240
244
  export { usePersonalPlans, usePersonalPlanSubscriptions } from "./ui/hooks/queries/usePersonalPlans.js";
245
+ export { AccountInvitationAcceptance } from "./ui/components/AccountInvitationAcceptance.js";
246
+ export { DisplayCurrencySelector } from "./ui/components/DisplayCurrencySelector.js";
247
+ export { useDisplayCurrency } from "./ui/hooks/useDisplayCurrency.js";
248
+ export { useDisplayPrice } from "./ui/hooks/useDisplayPrice.js";
241
249
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["setPlatformOS","Platform","OS","default","OxyProvider","useOxy","useOptionalOxy","OxyProviderMissingError","useOxyRuntime","useOxySnapshot","useActiveAccount","useDeviceDirectory","OxyRuntimeMissingError","useAuth","createDeferredProductAnalytics","IdentityBoundSessionError","useAuthStore","useAssetStore","useAssets","useAssetsStore","useAsset","useUploadProgress","useAssetLoading","useAssetErrors","useAssetsByApp","useAssetsByEntity","useAssetUsageCount","useIsAssetLinked","setOxyAssetInstance","useFileDownloadUrl","useFollow","useFollowerCounts","useSeedFollowStatuses","useStorage","useUserProfile","useUserProfiles","useCurrentUser","useUserById","useUserByUsername","useUsersBySessions","usePrivacySettings","useConnectedApps","useSessions","useSession","useDeviceSessions","useUserDevices","useSecurityInfo","useAccountStorageUsage","useSecurityActivity","useRecentSecurityActivity","useInfiniteSecurityActivity","useAuthMethods","useSignInMethods","useUserSubscription","useUserPayments","useUserWallet","useUserWalletTransactions","useUpdateProfile","useUploadAvatar","useUpdateAccountSettings","useUpdatePrivacySettings","useUpdateNotificationPreferences","useUpdateUserPreferences","useRevokeConnectedApp","useUploadFile","useSwitchSession","useLogoutSession","useLogoutAll","useUpdateDeviceName","useRemoveDevice","createProfileMutation","createGenericMutation","mutationKeys","queryKeys","invalidateAccountQueries","invalidateUserQueries","invalidateSessionQueries","invalidateDeviceQueries","invalidatePrivacyQueries","invalidateSecurityQueries","invalidateStorageQueries","invalidatePaymentsQueries","invalidateConnectedAppsQueries","invalidateAuthMethodsQueries","upsertCachedUser","upsertCachedUsers","CLEARABLE_USER_FIELDS","clearedFieldsFromProfileUpdate","clearedFieldsFromAccountUpdate","useMutationStatus","useOnlineStatus","useOxyEvent","handleAuthError","isInvalidSessionError","isTimeoutOrNetworkError","extractErrorMessage","useFileFiltering","OXY_OAUTH_STATE_STORAGE_KEY","OXY_OAUTH_CODE_VERIFIER_STORAGE_KEY","OxySignInButton","openOAuthPopup","OxyAuthPrompt","OxyOAuthCallback","OxyConsentScreen","RequireOxyAuth","FollowButton","FollowTargetButton","buildFollowMenuItems","resolveFollowPrimaryAction","FOLLOW_ACTION_LEAVES_ACTIVE","useFollowTarget","useFollowTargetStore","UNKNOWN_FOLLOW_STATUS","isFollowedGlobally","withApplicationMode","isCompleteFollowStatus","followRecordToStatus","followRecordsToStatusMap","PeableButton","OxyPayButton","LogoIcon","LogoText","ProfileButton","OxySignInPanel","OxySignUpPanel","OxyAccountPicker","OxyDeleteAccountPanel","OxyLinkCommonsPanel","OxyPasswordPanel","OxyAuthenticatorPanel","OxyAuthScreen","OxyAuthScreenHeader","OxyAuthLoading","OxyAuthTerms","OxySignInRequestSurface","useDeviceSwitcher","showBottomSheet","closeBottomSheet","useSurfaceHeader","SurfaceHeaderAction","openAccountDialog","closeAccountDialog","subscribeToAccountDialog","usePersonalPlans","usePersonalPlanSubscriptions"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,SAASA,aAAa,QAAyB,cAAc;AAC7D,SAASC,QAAQ,QAAQ,cAAc;AACvCD,aAAa,CAACC,QAAQ,CAACC,EAAgB,CAAC;;AAExC;AACA;AACA;AACA,SAASC,OAAO,IAAIC,WAAW,QAAQ,gCAA6B;AACpE,SAASC,MAAM,QAAQ,4BAAyB;AAChD;AACA;AACA;AACA,SAASC,cAAc,EAAEC,uBAAuB,QAAQ,4BAAyB;;AAEjF;AACA;AACA;AACA,SACEC,aAAa,EACbC,cAAc,EACdC,gBAAgB,EAChBC,kBAAkB,EAClBC,sBAAsB,QACjB,uBAAc;AAUrB,SAASC,OAAO,QAAQ,uBAAoB;AAE5C,SAASC,8BAA8B,QAAQ,oCAAiC;AAEhF;AACA;AACA;AACA,SAASC,yBAAyB,QAAQ,iCAA8B;;AAExE;AACA;AACA;AACA,SAASC,YAAY,QAAQ,0BAAuB;AACpD,SACEC,aAAa,EACbC,SAAS,IAAIC,cAAc,EAC3BC,QAAQ,EACRC,iBAAiB,EACjBC,eAAe,EACfC,cAAc,EACdC,cAAc,EACdC,iBAAiB,EACjBC,kBAAkB,EAClBC,gBAAgB,QACX,2BAAwB;;AAE/B;AACA;AACA;AACA,SAAST,SAAS,EAAEU,mBAAmB,QAAQ,yBAAsB;AACrE,SAASC,kBAAkB,QAAQ,kCAA+B;AAClE,SAASC,SAAS,EAAEC,iBAAiB,EAAEC,qBAAqB,QAAQ,yBAAsB;AAC1F,SAASC,UAAU,QAAQ,0BAAuB;AAGlD;AACA;AACA;AACA,SACEC,cAAc,EACdC,eAAe,EACfC,cAAc,EACdC,WAAW,EACXC,iBAAiB,EACjBC,kBAAkB,EACl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,4CAAyC;AAE1E;AACA;AACA;AACA,SAASC,qBAAqB,QAAQ,iDAA8C;AAEpF,SAASC,mBAAmB,QAAQ,+CAA4C;AAEhF,SAASC,gBAAgB,QAAQ,4CAAyC;AAE1E,SAASC,qBAAqB,QAAQ,iDAA8C;AAEpF,SACEC,aAAa,EACbC,mBAAmB,EACnBC,cAAc,EACdC,YAAY,QACP,yCAAsC;AAG7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,uBAAuB,QAAQ,4CAAyC;AAIjF;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,iBAAiB,QAAQ,iCAA8B;AAGhE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAASC,eAAe,EAAEC,gBAAgB,QAAQ,uCAAoC;AAGtF;AACA;AACA;AACA,SAASC,gBAAgB,QAAmC,gCAA6B;AACzF,SACEC,mBAAmB,QAEd,wCAAqC;;AAE5C;AACA;AACA;AACA;AACA,SACEC,iBAAiB,EACjBC,kBAAkB,EAClBC,wBAAwB,QACnB,yCAAsC;AAO7C,SACEC,gBAAgB,EAChBC,4BAA4B,QACvB,wCAAqC","ignoreList":[]}
1
+ {"version":3,"names":["setPlatformOS","Platform","OS","default","OxyProvider","useOxy","useOptionalOxy","OxyProviderMissingError","useOxyRuntime","useOxySnapshot","useActiveAccount","useDeviceDirectory","OxyRuntimeMissingError","useAuth","useAppAssertion","AppAssertionProviderMissingError","createDeferredProductAnalytics","IdentityBoundSessionError","useAuthStore","useAssetStore","useAssets","useAssetsStore","useAsset","useUploadProgress","useAssetLoading","useAssetErrors","useAssetsByApp","useAssetsByEntity","useAssetUsageCount","useIsAssetLinked","setOxyAssetInstance","useFileDownloadUrl","useFollow","useFollowerCounts","useSeedFollowStatuses","useStorage","useUserProfile","useUserProfiles","useCurrentUser","useUserById","useUserByUsername","useUsersBySessions","usePrivacySettings","useConnectedApps","useSessions","useSession","useDeviceSessions","useUserDevices","useSecurityInfo","useAccountStorageUsage","useSecurityActivity","useRecentSecurityActivity","useInfiniteSecurityActivity","useAuthMethods","useSignInMethods","useUserSubscription","useUserPayments","useUserWallet","useUserWalletTransactions","useUpdateProfile","useUploadAvatar","useUpdateAccountSettings","useUpdatePrivacySettings","useUpdateNotificationPreferences","useUpdateUserPreferences","useRevokeConnectedApp","useUploadFile","useSwitchSession","useLogoutSession","useLogoutAll","useUpdateDeviceName","useRemoveDevice","createProfileMutation","createGenericMutation","mutationKeys","queryKeys","invalidateAccountQueries","invalidateUserQueries","invalidateSessionQueries","invalidateDeviceQueries","invalidatePrivacyQueries","invalidateSecurityQueries","invalidateStorageQueries","invalidatePaymentsQueries","invalidateConnectedAppsQueries","invalidateAuthMethodsQueries","upsertCachedUser","upsertCachedUsers","CLEARABLE_USER_FIELDS","clearedFieldsFromProfileUpdate","clearedFieldsFromAccountUpdate","useMutationStatus","useOnlineStatus","useOxyEvent","handleAuthError","isInvalidSessionError","isTimeoutOrNetworkError","extractErrorMessage","useFileFiltering","OXY_OAUTH_STATE_STORAGE_KEY","OXY_OAUTH_CODE_VERIFIER_STORAGE_KEY","OxySignInButton","openOAuthPopup","OxyAuthPrompt","OxyOAuthCallback","OxyConsentScreen","RequireOxyAuth","FollowButton","FollowTargetButton","buildFollowMenuItems","resolveFollowPrimaryAction","FOLLOW_ACTION_LEAVES_ACTIVE","useFollowTarget","useFollowTargetStore","UNKNOWN_FOLLOW_STATUS","isFollowedGlobally","withApplicationMode","isCompleteFollowStatus","followRecordToStatus","followRecordsToStatusMap","PeableButton","OxyPayButton","LogoIcon","LogoText","ProfileButton","OxySignInPanel","OxySignUpPanel","OxyAccountPicker","OxyDeleteAccountPanel","OxyLinkCommonsPanel","OxyPasswordPanel","OxyAuthenticatorPanel","OxyAuthScreen","OxyAuthScreenHeader","OxyAuthLoading","OxyAuthTerms","OxySignInRequestSurface","useDeviceSwitcher","showBottomSheet","closeBottomSheet","useSurfaceHeader","SurfaceHeaderAction","openAccountDialog","closeAccountDialog","subscribeToAccountDialog","usePersonalPlans","usePersonalPlanSubscriptions","AccountInvitationAcceptance","DisplayCurrencySelector","useDisplayCurrency","useDisplayPrice"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,SAASA,aAAa,QAAyB,cAAc;AAC7D,SAASC,QAAQ,QAAQ,cAAc;AACvCD,aAAa,CAACC,QAAQ,CAACC,EAAgB,CAAC;;AAExC;AACA;AACA;AACA,SAASC,OAAO,IAAIC,WAAW,QAAQ,gCAA6B;AACpE,SAASC,MAAM,QAAQ,4BAAyB;AAChD;AACA;AACA;AACA,SAASC,cAAc,EAAEC,uBAAuB,QAAQ,4BAAyB;;AAEjF;AACA;AACA;AACA,SACEC,aAAa,EACbC,cAAc,EACdC,gBAAgB,EAChBC,kBAAkB,EAClBC,sBAAsB,QACjB,uBAAc;AAUrB,SAASC,OAAO,QAAQ,uBAAoB;AAC5C;AACA;AACA;AACA,SACEC,eAAe,EACfC,gCAAgC,QAC3B,0CAAuC;AAO9C,SAASC,8BAA8B,QAAQ,oCAAiC;AAEhF;AACA;AACA;AACA,SAASC,yBAAyB,QAAQ,iCAA8B;;AAExE;AACA;AACA;AACA,SAASC,YAAY,QAAQ,0BAAuB;AACpD,SACEC,aAAa,EACbC,SAAS,IAAIC,cAAc,EAC3BC,QAAQ,EACRC,iBAAiB,EACjBC,eAAe,EACfC,cAAc,EACdC,cAAc,EACdC,iBAAiB,EACjBC,kBAAkB,EAClBC,gBAAgB,QACX,2BAAwB;;AAE/B;AACA;AACA;AACA,SAAST,SAAS,EAAEU,mBAAmB,QAAQ,yBAAsB;AACrE,SAASC,kBAAkB,QAAQ,kCAA+B;AAClE,SAASC,SAAS,EAAEC,iBAAiB,EAAEC,qBAAqB,QAAQ,yBAAsB;AAC1F,SAASC,UAAU,QAAQ,0BAAuB;AAGlD;AACA;AACA;A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,cAAc,QAAQ,0CAAuC;AAEtE,SAASC,cAAc,QAAQ,0CAAuC;AAEtE,SAASC,gBAAgB,QAAQ,4CAAyC;AAE1E;AACA;AACA;AACA,SAASC,qBAAqB,QAAQ,iDAA8C;AAEpF,SAASC,mBAAmB,QAAQ,+CAA4C;AAEhF,SAASC,gBAAgB,QAAQ,4CAAyC;AAE1E,SAASC,qBAAqB,QAAQ,iDAA8C;AAEpF,SACEC,aAAa,EACbC,mBAAmB,EACnBC,cAAc,EACdC,YAAY,QACP,yCAAsC;AAG7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,uBAAuB,QAAQ,4CAAyC;AAIjF;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,iBAAiB,QAAQ,iCAA8B;AAGhE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAASC,eAAe,EAAEC,gBAAgB,QAAQ,uCAAoC;AAGtF;AACA;AACA;AACA,SAASC,gBAAgB,QAAmC,gCAA6B;AACzF,SACEC,mBAAmB,QAEd,wCAAqC;;AAE5C;AACA;AACA;AACA;AACA,SACEC,iBAAiB,EACjBC,kBAAkB,EAClBC,wBAAwB,QACnB,yCAAsC;AAO7C,SACEC,gBAAgB,EAChBC,4BAA4B,QACvB,wCAAqC;AAC5C,SAASC,2BAA2B,QAAQ,gDAA6C;AAEzF,SAASC,uBAAuB,QAAQ,4CAAyC;AACjF,SAASC,kBAAkB,QAAQ,kCAA+B;AAClE,SAASC,eAAe,QAAQ,+BAA4B","ignoreList":[]}
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * `useAppAssertion()` (ADR 0045): this app's Oxy-signed assertion of which app
5
+ * it is, for the signed-in session.
6
+ *
7
+ * `OxyProvider` mounts {@link AppAssertionProvider} itself and the manager
8
+ * obtains and refreshes the assertion on its own; an app never handles the
9
+ * proof. Something that calls a service which needs to know the app (Alia's
10
+ * SDK, for an agent confined to its application) attaches
11
+ * `await getAppAssertionHeaders()` to the request.
12
+ */
13
+
14
+ import { createContext, useContext, useEffect, useMemo, useRef, useSyncExternalStore } from 'react';
15
+ import { appIntegrityPlatform } from './appIntegrityPlatform';
16
+ import { AppAssertionManager } from "./appAssertionManager.js";
17
+ import { jsx as _jsx } from "react/jsx-runtime";
18
+ const AppAssertionContext = /*#__PURE__*/createContext(null);
19
+ export function AppAssertionProvider({
20
+ children,
21
+ oxyServices,
22
+ clientId,
23
+ userId,
24
+ sessionId,
25
+ storage,
26
+ storageKeyPrefix,
27
+ integrity = appIntegrityPlatform
28
+ }) {
29
+ // Read only when an iOS install needs its App Attest key id, never in render.
30
+ const storageRef = useRef(storage);
31
+ useEffect(() => {
32
+ storageRef.current = storage;
33
+ }, [storage]);
34
+ const manager = useMemo(() => new AppAssertionManager({
35
+ oxyServices,
36
+ clientId,
37
+ integrity,
38
+ storage: () => storageRef.current,
39
+ storageKeyPrefix
40
+ }), [oxyServices, clientId, integrity, storageKeyPrefix]);
41
+ useEffect(() => {
42
+ manager.setSession(userId && sessionId ? {
43
+ userId,
44
+ sessionId
45
+ } : null);
46
+ }, [manager, userId, sessionId]);
47
+ useEffect(() => () => manager.dispose(), [manager]);
48
+ return /*#__PURE__*/_jsx(AppAssertionContext.Provider, {
49
+ value: manager,
50
+ children: children
51
+ });
52
+ }
53
+ export class AppAssertionProviderMissingError extends Error {
54
+ code = 'oxy_provider_missing';
55
+ constructor() {
56
+ super('useAppAssertion() was called outside <OxyProvider>.');
57
+ this.name = 'AppAssertionProviderMissingError';
58
+ }
59
+ }
60
+
61
+ /** This app's assertion of which app it is, kept current for the signed-in session. */
62
+ export function useAppAssertion() {
63
+ const manager = useContext(AppAssertionContext);
64
+ if (!manager) throw new AppAssertionProviderMissingError();
65
+ const snapshot = useSyncExternalStore(manager.subscribe, manager.getSnapshot, manager.getSnapshot);
66
+ return {
67
+ ...snapshot,
68
+ getAppAssertion: manager.getAppAssertion,
69
+ getAppAssertionHeaders: manager.getAppAssertionHeaders
70
+ };
71
+ }
72
+ //# sourceMappingURL=AppAssertionContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createContext","useContext","useEffect","useMemo","useRef","useSyncExternalStore","appIntegrityPlatform","AppAssertionManager","jsx","_jsx","AppAssertionContext","AppAssertionProvider","children","oxyServices","clientId","userId","sessionId","storage","storageKeyPrefix","integrity","storageRef","current","manager","setSession","dispose","Provider","value","AppAssertionProviderMissingError","Error","code","constructor","name","useAppAssertion","snapshot","subscribe","getSnapshot","getAppAssertion","getAppAssertionHeaders"],"sourceRoot":"../../../../src","sources":["ui/appAssertion/AppAssertionContext.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SACEA,aAAa,EAEbC,UAAU,EACVC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,oBAAoB,QACf,OAAO;AAEd,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,mBAAmB,QAAmC,0BAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGvF,MAAMC,mBAAmB,gBAAGV,aAAa,CAA6B,IAAI,CAAC;AAe3E,OAAO,SAASW,oBAAoBA,CAAC;EACnCC,QAAQ;EACRC,WAAW;EACXC,QAAQ;EACRC,MAAM;EACNC,SAAS;EACTC,OAAO;EACPC,gBAAgB;EAChBC,SAAS,GAAGb;AACa,CAAC,EAAE;EAC5B;EACA,MAAMc,UAAU,GAAGhB,MAAM,CAA0Ba,OAAO,CAAC;EAC3Df,SAAS,CAAC,MAAM;IACdkB,UAAU,CAACC,OAAO,GAAGJ,OAAO;EAC9B,CAAC,EAAE,CAACA,OAAO,CAAC,CAAC;EAEb,MAAMK,OAAO,GAAGnB,OAAO,CACrB,MACE,IAAII,mBAAmB,CAAC;IACtBM,WAAW;IACXC,QAAQ;IACRK,SAAS;IACTF,OAAO,EAAEA,CAAA,KAAMG,UAAU,CAACC,OAAO;IACjCH;EACF,CAAC,CAAC,EACJ,CAACL,WAAW,EAAEC,QAAQ,EAAEK,SAAS,EAAED,gBAAgB,CACrD,CAAC;EAEDhB,SAAS,CAAC,MAAM;IACdoB,OAAO,CAACC,UAAU,CAACR,MAAM,IAAIC,SAAS,GAAG;MAAED,MAAM;MAAEC;IAAU,CAAC,GAAG,IAAI,CAAC;EACxE,CAAC,EAAE,CAACM,OAAO,EAAEP,MAAM,EAAEC,SAAS,CAAC,CAAC;EAEhCd,SAAS,CAAC,MAAM,MAAMoB,OAAO,CAACE,OAAO,CAAC,CAAC,EAAE,CAACF,OAAO,CAAC,CAAC;EAEnD,oBAAOb,IAAA,CAACC,mBAAmB,CAACe,QAAQ;IAACC,KAAK,EAAEJ,OAAQ;IAAAV,QAAA,EAAEA;EAAQ,CAA+B,CAAC;AAChG;AASA,OAAO,MAAMe,gCAAgC,SAASC,KAAK,CAAC;EACjDC,IAAI,GAAG,sBAAsB;EAEtCC,WAAWA,CAAA,EAAG;IACZ,KAAK,CAAC,qDAAqD,CAAC;IAC5D,IAAI,CAACC,IAAI,GAAG,kCAAkC;EAChD;AACF;;AAEA;AACA,OAAO,SAASC,eAAeA,CAAA,EAA0B;EACvD,MAAMV,OAAO,GAAGrB,UAAU,CAACS,mBAAmB,CAAC;EAC/C,IAAI,CAACY,OAAO,EAAE,MAAM,IAAIK,gCAAgC,CAAC,CAAC;EAC1D,MAAMM,QAAQ,GAAG5B,oBAAoB,CACnCiB,OAAO,CAACY,SAAS,EACjBZ,OAAO,CAACa,WAAW,EACnBb,OAAO,CAACa,WACV,CAAC;EACD,OAAO;IACL,GAAGF,QAAQ;IACXG,eAAe,EAAEd,OAAO,CAACc,eAAe;IACxCC,sBAAsB,EAAEf,OAAO,CAACe;EAClC,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,304 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * The app's assertion of which app it is (ADR 0045), obtained and refreshed for
5
+ * the signed-in session without any app code.
6
+ *
7
+ * One manager per `OxyProvider`. For the active session it resolves the app's
8
+ * application id from its registered `clientId`, proves the app by platform —
9
+ * the browser's `Origin` on the web, Play Integrity on Android, App Attest on
10
+ * iOS — trades the proof for an Oxy-signed `OXY-APP+JWT`, and refreshes it a
11
+ * minute before it expires. A session change drops the assertion at once: an
12
+ * assertion names exactly one person and one session.
13
+ *
14
+ * Outcomes are values, never thrown: `ready`, `unsupported` (this build cannot
15
+ * prove itself: no `clientId`, no native module, App Attest unavailable) or
16
+ * `unavailable` (Oxy refused or could not be reached). A refusal that will not
17
+ * change for this session (an unregistered origin or platform) is not retried
18
+ * until the session changes; anything else is retried with a backoff.
19
+ */
20
+
21
+ import { OXY_APP_ASSERTION_HEADER } from '@oxy.so/contracts/client';
22
+ /** Refresh this long before expiry. */
23
+ const REFRESH_BEFORE_MS = 60_000;
24
+ /** `getAppAssertion()` fetches anew when less than this is left. */
25
+ const MIN_REMAINING_MS = 30_000;
26
+ const RETRY_FIRST_MS = 30_000;
27
+ const RETRY_MAX_MS = 15 * 60_000;
28
+
29
+ /** Refusals that will not change for this session. */
30
+ const PERMANENT_REFUSALS = new Set(['application_unavailable', 'session_other_application', 'platform_not_registered', 'origin_not_registered', 'integrity_unconfigured']);
31
+ const IDLE = {
32
+ status: 'idle',
33
+ assertion: null,
34
+ applicationId: null,
35
+ platform: null,
36
+ expiresAt: null,
37
+ error: null
38
+ };
39
+ class Unsupported extends Error {
40
+ constructor(reason) {
41
+ super(reason);
42
+ this.reason = reason;
43
+ }
44
+ }
45
+ function errorCode(error) {
46
+ if (error instanceof Unsupported) return error.reason;
47
+ const code = error?.code;
48
+ return typeof code === 'string' && code.length > 0 ? code : 'request_failed';
49
+ }
50
+ export class AppAssertionManager {
51
+ snapshot = IDLE;
52
+ listeners = new Set();
53
+ session = null;
54
+ /** Bumped on every session change; a result for an older generation is dropped. */
55
+ generation = 0;
56
+ inflight = null;
57
+ timer = null;
58
+ retryMs = RETRY_FIRST_MS;
59
+ retryAt = 0;
60
+ applicationId = null;
61
+ preparedProject = null;
62
+ constructor(options) {
63
+ this.options = options;
64
+ this.now = options.now ?? Date.now;
65
+ this.setTimer = options.setTimer ?? ((run, ms) => setTimeout(run, ms));
66
+ this.clearTimer = options.clearTimer ?? (timer => clearTimeout(timer));
67
+ }
68
+ subscribe = listener => {
69
+ this.listeners.add(listener);
70
+ return () => {
71
+ this.listeners.delete(listener);
72
+ };
73
+ };
74
+ getSnapshot = () => this.snapshot;
75
+
76
+ /**
77
+ * A current assertion for the active session, obtaining one when there is
78
+ * none or it is about to expire; `null` when this app cannot have one now.
79
+ */
80
+ getAppAssertion = async () => {
81
+ const current = this.snapshot;
82
+ if (current.status === 'ready' && current.assertion && current.expiresAt !== null && current.expiresAt - this.now() > MIN_REMAINING_MS) {
83
+ return current.assertion;
84
+ }
85
+ if (!this.session || current.status === 'unsupported') return null;
86
+ if (current.status === 'unavailable' && this.now() < this.retryAt) return null;
87
+ return this.refresh();
88
+ };
89
+
90
+ /**
91
+ * `{ 'X-Oxy-App-Assertion': <assertion> }` for a request to a service that
92
+ * needs to know the app (Alia), or `{}` when there is none.
93
+ */
94
+ getAppAssertionHeaders = async () => {
95
+ const assertion = await this.getAppAssertion();
96
+ return assertion ? {
97
+ [OXY_APP_ASSERTION_HEADER]: assertion
98
+ } : {};
99
+ };
100
+
101
+ /** Follow the active session; `null` when signed out or not yet able to call Oxy. */
102
+ setSession(session) {
103
+ const same = session?.userId === this.session?.userId && session?.sessionId === this.session?.sessionId;
104
+ if (same) return;
105
+ this.session = session;
106
+ this.generation += 1;
107
+ this.inflight = null;
108
+ this.retryMs = RETRY_FIRST_MS;
109
+ this.retryAt = 0;
110
+ this.cancelTimer();
111
+ this.publish(IDLE);
112
+ if (session) void this.refresh();
113
+ }
114
+
115
+ /** Stop all work. A later `setSession` starts again. */
116
+ dispose() {
117
+ this.session = null;
118
+ this.generation += 1;
119
+ this.inflight = null;
120
+ this.cancelTimer();
121
+ }
122
+ refresh() {
123
+ if (this.inflight) return this.inflight;
124
+ const generation = this.generation;
125
+ const run = this.obtain().then(answer => {
126
+ if (generation !== this.generation) return null;
127
+ const expiresAt = Date.parse(answer.expiresAt);
128
+ this.retryMs = RETRY_FIRST_MS;
129
+ this.publish({
130
+ status: 'ready',
131
+ assertion: answer.assertion,
132
+ applicationId: answer.applicationId,
133
+ platform: answer.platform,
134
+ expiresAt,
135
+ error: null
136
+ });
137
+ this.schedule(Math.max(expiresAt - this.now() - REFRESH_BEFORE_MS, MIN_REMAINING_MS));
138
+ return answer.assertion;
139
+ }).catch(error => {
140
+ if (generation !== this.generation) return null;
141
+ const code = errorCode(error);
142
+ const unsupported = error instanceof Unsupported;
143
+ const current = this.snapshot;
144
+ if (!unsupported && !PERMANENT_REFUSALS.has(code) && current.status === 'ready' && current.expiresAt !== null && current.expiresAt - this.now() > MIN_REMAINING_MS) {
145
+ // The assertion in hand is still good: keep it, and try again soon.
146
+ this.schedule(Math.min(RETRY_FIRST_MS, current.expiresAt - this.now() - MIN_REMAINING_MS));
147
+ return current.assertion;
148
+ }
149
+ this.publish({
150
+ ...IDLE,
151
+ status: unsupported ? 'unsupported' : 'unavailable',
152
+ platform: this.options.integrity.platform,
153
+ error: code
154
+ });
155
+ if (!unsupported) {
156
+ if (PERMANENT_REFUSALS.has(code)) {
157
+ this.retryAt = Number.POSITIVE_INFINITY;
158
+ } else {
159
+ this.retryAt = this.now() + this.retryMs;
160
+ this.schedule(this.retryMs);
161
+ this.retryMs = Math.min(this.retryMs * 2, RETRY_MAX_MS);
162
+ }
163
+ }
164
+ return null;
165
+ }).finally(() => {
166
+ if (this.inflight === run) this.inflight = null;
167
+ });
168
+ this.inflight = run;
169
+ if (this.snapshot.status !== 'ready') this.publish({
170
+ ...this.snapshot,
171
+ status: 'pending'
172
+ });
173
+ return run;
174
+ }
175
+ async obtain() {
176
+ const applicationId = await this.resolveApplicationId();
177
+ const {
178
+ platform
179
+ } = this.options.integrity;
180
+ const assertions = this.options.oxyServices.apps.assertions;
181
+ if (platform === 'web') return assertions.create({
182
+ applicationId,
183
+ platform: 'web'
184
+ });
185
+ const integrity = await this.options.integrity.loadIntegrity();
186
+ if (!integrity) throw new Unsupported('integrity_module_unavailable');
187
+ if (platform === 'android') return this.proveAndroid(applicationId, integrity);
188
+ if (!integrity.isSupported) throw new Unsupported('app_attest_unsupported');
189
+ return this.proveIos(applicationId, integrity);
190
+ }
191
+ resolveApplicationId() {
192
+ const clientId = this.options.clientId;
193
+ if (!clientId) return Promise.reject(new Unsupported('client_id_missing'));
194
+ if (this.applicationId?.clientId !== clientId) {
195
+ const id = this.options.oxyServices.apps.getPublic(clientId).then(app => app.id);
196
+ id.catch(() => {
197
+ if (this.applicationId?.id === id) this.applicationId = null;
198
+ });
199
+ this.applicationId = {
200
+ clientId,
201
+ id
202
+ };
203
+ }
204
+ return this.applicationId.id;
205
+ }
206
+ async proveAndroid(applicationId, integrity) {
207
+ const assertions = this.options.oxyServices.apps.assertions;
208
+ const challenge = await assertions.challenge({
209
+ applicationId,
210
+ platform: 'android'
211
+ });
212
+ if (!challenge.cloudProjectNumber) throw new Unsupported('integrity_unconfigured');
213
+ try {
214
+ if (this.preparedProject !== challenge.cloudProjectNumber) {
215
+ await integrity.prepareIntegrityTokenProviderAsync(challenge.cloudProjectNumber);
216
+ this.preparedProject = challenge.cloudProjectNumber;
217
+ }
218
+ const integrityToken = await integrity.requestIntegrityCheckAsync(challenge.requestHash);
219
+ return await assertions.create({
220
+ applicationId,
221
+ platform: 'android',
222
+ proof: {
223
+ challenge: challenge.challenge,
224
+ integrityToken
225
+ }
226
+ });
227
+ } catch (error) {
228
+ // A provider Google invalidated is prepared again on the next attempt.
229
+ this.preparedProject = null;
230
+ throw error;
231
+ }
232
+ }
233
+ async proveIos(applicationId, integrity) {
234
+ const keyName = `${this.options.storageKeyPrefix}_app_attest_key_${applicationId}`;
235
+ const storage = this.options.storage();
236
+ const assertOnce = async keyId => {
237
+ const assertions = this.options.oxyServices.apps.assertions;
238
+ const challenge = await assertions.challenge({
239
+ applicationId,
240
+ platform: 'ios',
241
+ purpose: 'assertion'
242
+ });
243
+ const assertion = await integrity.generateAssertionAsync(keyId, challenge.requestHash);
244
+ return assertions.create({
245
+ applicationId,
246
+ platform: 'ios',
247
+ proof: {
248
+ challenge: challenge.challenge,
249
+ keyId,
250
+ assertion
251
+ }
252
+ });
253
+ };
254
+ const stored = await storage?.getItem(keyName).catch(() => null);
255
+ if (stored) {
256
+ try {
257
+ return await assertOnce(stored);
258
+ } catch (error) {
259
+ // Oxy no longer knows the key (swept, or never registered): attest a new one.
260
+ if (errorCode(error) !== 'attest_key_unknown') throw error;
261
+ await storage?.removeItem(keyName).catch(() => undefined);
262
+ }
263
+ }
264
+ const keyId = await this.attestKey(applicationId, integrity);
265
+ await storage?.setItem(keyName, keyId).catch(() => undefined);
266
+ return assertOnce(keyId);
267
+ }
268
+ async attestKey(applicationId, integrity) {
269
+ const assertions = this.options.oxyServices.apps.assertions;
270
+ const keyId = await integrity.generateKeyAsync();
271
+ const challenge = await assertions.challenge({
272
+ applicationId,
273
+ platform: 'ios',
274
+ purpose: 'attest_key'
275
+ });
276
+ const attestation = await integrity.attestKeyAsync(keyId, challenge.requestHash);
277
+ await assertions.registerAttestKey({
278
+ applicationId,
279
+ keyId,
280
+ challenge: challenge.challenge,
281
+ attestation
282
+ });
283
+ return keyId;
284
+ }
285
+ schedule(ms) {
286
+ this.cancelTimer();
287
+ const generation = this.generation;
288
+ this.timer = this.setTimer(() => {
289
+ this.timer = null;
290
+ if (generation === this.generation && this.session) void this.refresh();
291
+ }, ms);
292
+ }
293
+ cancelTimer() {
294
+ if (this.timer !== null) {
295
+ this.clearTimer(this.timer);
296
+ this.timer = null;
297
+ }
298
+ }
299
+ publish(next) {
300
+ this.snapshot = next;
301
+ for (const listener of this.listeners) listener();
302
+ }
303
+ }
304
+ //# sourceMappingURL=appAssertionManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["OXY_APP_ASSERTION_HEADER","REFRESH_BEFORE_MS","MIN_REMAINING_MS","RETRY_FIRST_MS","RETRY_MAX_MS","PERMANENT_REFUSALS","Set","IDLE","status","assertion","applicationId","platform","expiresAt","error","Unsupported","Error","constructor","reason","errorCode","code","length","AppAssertionManager","snapshot","listeners","session","generation","inflight","timer","retryMs","retryAt","preparedProject","options","now","Date","setTimer","run","ms","setTimeout","clearTimer","clearTimeout","subscribe","listener","add","delete","getSnapshot","getAppAssertion","current","refresh","getAppAssertionHeaders","setSession","same","userId","sessionId","cancelTimer","publish","dispose","obtain","then","answer","parse","schedule","Math","max","catch","unsupported","has","min","integrity","Number","POSITIVE_INFINITY","finally","resolveApplicationId","assertions","oxyServices","apps","create","loadIntegrity","proveAndroid","isSupported","proveIos","clientId","Promise","reject","id","getPublic","app","challenge","cloudProjectNumber","prepareIntegrityTokenProviderAsync","integrityToken","requestIntegrityCheckAsync","requestHash","proof","keyName","storageKeyPrefix","storage","assertOnce","keyId","purpose","generateAssertionAsync","stored","getItem","removeItem","undefined","attestKey","setItem","generateKeyAsync","attestation","attestKeyAsync","registerAttestKey","next"],"sourceRoot":"../../../../src","sources":["ui/appAssertion/appAssertionManager.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,wBAAwB,QAAQ,0BAA0B;AAoCnE;AACA,MAAMC,iBAAiB,GAAG,MAAM;AAChC;AACA,MAAMC,gBAAgB,GAAG,MAAM;AAC/B,MAAMC,cAAc,GAAG,MAAM;AAC7B,MAAMC,YAAY,GAAG,EAAE,GAAG,MAAM;;AAEhC;AACA,MAAMC,kBAAkB,GAAG,IAAIC,GAAG,CAAC,CACjC,yBAAyB,EACzB,2BAA2B,EAC3B,yBAAyB,EACzB,uBAAuB,EACvB,wBAAwB,CACzB,CAAC;AAEF,MAAMC,IAA0B,GAAG;EACjCC,MAAM,EAAE,MAAM;EACdC,SAAS,EAAE,IAAI;EACfC,aAAa,EAAE,IAAI;EACnBC,QAAQ,EAAE,IAAI;EACdC,SAAS,EAAE,IAAI;EACfC,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,CAACqC,iBAAiB,CAAC;MACjCnG,aAAa;MACbuF,KAAK;MACLX,SAAS,EAAEA,SAAS,CAACA,SAAS;MAC9BqB;IACF,CAAC,CAAC;IACF,OAAOV,KAAK;EACd;EAEQrC,QAAQA,CAACxB,EAAU,EAAQ;IACjC,IAAI,CAACiB,WAAW,CAAC,CAAC;IAClB,MAAM5B,UAAU,GAAG,IAAI,CAACA,UAAU;IAClC,IAAI,CAACE,KAAK,GAAG,IAAI,CAACO,QAAQ,CAAC,MAAM;MAC/B,IAAI,CAACP,KAAK,GAAG,IAAI;MACjB,IAAIF,UAAU,KAAK,IAAI,CAACA,UAAU,IAAI,IAAI,CAACD,OAAO,EAAE,KAAK,IAAI,CAACuB,OAAO,CAAC,CAAC;IACzE,CAAC,EAAEX,EAAE,CAAC;EACR;EAEQiB,WAAWA,CAAA,EAAS;IAC1B,IAAI,IAAI,CAAC1B,KAAK,KAAK,IAAI,EAAE;MACvB,IAAI,CAACW,UAAU,CAAC,IAAI,CAACX,KAAK,CAAC;MAC3B,IAAI,CAACA,KAAK,GAAG,IAAI;IACnB;EACF;EAEQ2B,OAAOA,CAACwD,IAA0B,EAAQ;IAChD,IAAI,CAACxF,QAAQ,GAAGwF,IAAI;IACpB,KAAK,MAAMrE,QAAQ,IAAI,IAAI,CAAClB,SAAS,EAAEkB,QAAQ,CAAC,CAAC;EACnD;AACF","ignoreList":[]}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Web: the app proves itself with the browser's `Origin`, which Oxy reads from
5
+ * the request itself (ADR 0045). Nothing to load.
6
+ *
7
+ * Native builds resolve `appIntegrityPlatform.native.ts` instead.
8
+ */
9
+
10
+ export const appIntegrityPlatform = {
11
+ platform: 'web',
12
+ loadIntegrity: async () => null
13
+ };
14
+ //# sourceMappingURL=appIntegrityPlatform.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["appIntegrityPlatform","platform","loadIntegrity"],"sourceRoot":"../../../../src","sources":["ui/appAssertion/appIntegrityPlatform.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;AAGA,OAAO,MAAMA,oBAA0C,GAAG;EACxDC,QAAQ,EAAE,KAAK;EACfC,aAAa,EAAE,MAAAA,CAAA,KAAY;AAC7B,CAAC","ignoreList":[]}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * iOS and Android: the app proves itself with App Attest or Play Integrity
5
+ * through `@expo/app-integrity` (ADR 0045).
6
+ *
7
+ * The module is loaded lazily, and its `import()` is a direct statement of a
8
+ * `try` block — the shape Metro marks OPTIONAL — so an app bundle that lacks
9
+ * the package, or a binary built before it was added (an over-the-air update
10
+ * of the JavaScript alone), still boots: `requireNativeModule` throws inside
11
+ * the import, and the app simply has no assertion.
12
+ */
13
+ import { Platform } from 'react-native';
14
+ async function loadIntegrity() {
15
+ try {
16
+ const integrity = await import('@expo/app-integrity');
17
+ return integrity;
18
+ } catch {
19
+ return null;
20
+ }
21
+ }
22
+ export const appIntegrityPlatform = {
23
+ platform: Platform.OS === 'ios' ? 'ios' : Platform.OS === 'android' ? 'android' : 'web',
24
+ loadIntegrity: Platform.OS === 'ios' || Platform.OS === 'android' ? loadIntegrity : async () => null
25
+ };
26
+ //# sourceMappingURL=appIntegrityPlatform.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Platform","loadIntegrity","integrity","appIntegrityPlatform","platform","OS"],"sourceRoot":"../../../../src","sources":["ui/appAssertion/appIntegrityPlatform.native.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,cAAc;AAGvC,eAAeC,aAAaA,CAAA,EAAuC;EACjE,IAAI;IACF,MAAMC,SAAS,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC;IACrD,OAAOA,SAAS;EAClB,CAAC,CAAC,MAAM;IACN,OAAO,IAAI;EACb;AACF;AAEA,OAAO,MAAMC,oBAA0C,GAAG;EACxDC,QAAQ,EAAEJ,QAAQ,CAACK,EAAE,KAAK,KAAK,GAAG,KAAK,GAAGL,QAAQ,CAACK,EAAE,KAAK,SAAS,GAAG,SAAS,GAAG,KAAK;EACvFJ,aAAa,EACXD,QAAQ,CAACK,EAAE,KAAK,KAAK,IAAIL,QAAQ,CAACK,EAAE,KAAK,SAAS,GAAGJ,aAAa,GAAG,YAAY;AACrF,CAAC","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=appIntegrityTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["ui/appAssertion/appIntegrityTypes.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+
3
+ import { useEffect, useState } from 'react';
4
+ import { View } from 'react-native';
5
+ import { Text } from '@oxy.so/bloom/typography';
6
+ import { Button } from '@oxy.so/bloom/button';
7
+ import { getNormalizedUserHandle } from '@oxy.so/core';
8
+ import { useOxy } from "../context/OxyContext.js";
9
+
10
+ /** The link never grants access on navigation, preview, sign-in or account switching. */
11
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
12
+ export function AccountInvitationAcceptance({
13
+ token
14
+ }) {
15
+ return /*#__PURE__*/_jsx(InvitationContent, {
16
+ token: token
17
+ }, token);
18
+ }
19
+ function InvitationContent({
20
+ token
21
+ }) {
22
+ const {
23
+ oxyServices,
24
+ user,
25
+ canUsePrivateApi,
26
+ openAccountDialog
27
+ } = useOxy();
28
+ const [preview, setPreview] = useState(null);
29
+ const [error, setError] = useState('');
30
+ const [busy, setBusy] = useState(false);
31
+ const [accepted, setAccepted] = useState(false);
32
+ useEffect(() => {
33
+ let alive = true;
34
+ setPreview(null);
35
+ setError('');
36
+ if (canUsePrivateApi && token) {
37
+ oxyServices.accounts.invitations.preview(token).then(value => {
38
+ if (alive) setPreview(value);
39
+ }).catch(reason => {
40
+ if (alive) setError(reason instanceof Error ? reason.message : 'Invitation unavailable');
41
+ });
42
+ }
43
+ return () => {
44
+ alive = false;
45
+ };
46
+ }, [oxyServices, canUsePrivateApi, token]);
47
+ const accept = async () => {
48
+ if (!user || !preview) return;
49
+ setBusy(true);
50
+ setError('');
51
+ try {
52
+ await oxyServices.accounts.invitations.accept(token, user.id);
53
+ setAccepted(true);
54
+ } catch (reason) {
55
+ setError(reason instanceof Error ? reason.message : 'Could not accept invitation');
56
+ } finally {
57
+ setBusy(false);
58
+ }
59
+ };
60
+ return /*#__PURE__*/_jsxs(View, {
61
+ className: "gap-space-16 p-space-24",
62
+ children: [/*#__PURE__*/_jsx(Text, {
63
+ className: "text-title font-semibold text-text",
64
+ children: "Account invitation"
65
+ }), canUsePrivateApi && token && !preview && !error ? /*#__PURE__*/_jsx(Text, {
66
+ accessibilityRole: "progressbar",
67
+ children: "Loading invitation\u2026"
68
+ }) : null, accepted ? /*#__PURE__*/_jsx(Text, {
69
+ children: "Invitation accepted. You can now access this account."
70
+ }) : /*#__PURE__*/_jsxs(_Fragment, {
71
+ children: [preview ? /*#__PURE__*/_jsxs(Text, {
72
+ children: ["Join ", preview.account.displayName ?? preview.account.username, " as", ' ', preview.invitation.role, "."]
73
+ }) : null, /*#__PURE__*/_jsxs(Text, {
74
+ children: ["Selected account:", ' ', user ? `${user.name?.displayName ?? getNormalizedUserHandle(user) ?? user.id} (${user.email ?? user.id})` : 'Not signed in']
75
+ }), /*#__PURE__*/_jsx(Text, {
76
+ children: "The selected account receives access. Its email can differ from the invitation address. No access is granted until you confirm."
77
+ }), /*#__PURE__*/_jsx(Button, {
78
+ disabled: busy,
79
+ onPress: () => openAccountDialog(),
80
+ children: user ? 'Change account' : 'Sign in or create account'
81
+ }), /*#__PURE__*/_jsx(Button, {
82
+ disabled: busy || !user || !preview || user.kind !== 'personal',
83
+ onPress: accept,
84
+ children: "Confirm and accept"
85
+ })]
86
+ }), error ? /*#__PURE__*/_jsx(Text, {
87
+ accessibilityRole: "alert",
88
+ children: error
89
+ }) : null, !token ? /*#__PURE__*/_jsx(Text, {
90
+ children: "This invitation link is incomplete."
91
+ }) : null]
92
+ });
93
+ }
94
+ //# sourceMappingURL=AccountInvitationAcceptance.js.map