@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.
- package/lib/commonjs/assets/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/icons/manifest.json +5 -4
- package/lib/commonjs/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/lib/commonjs/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/lib/commonjs/assets/fonts/icons/manifest.json +5 -4
- package/lib/commonjs/index.js +45 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/appAssertion/AppAssertionContext.js +79 -0
- package/lib/commonjs/ui/appAssertion/AppAssertionContext.js.map +1 -0
- package/lib/commonjs/ui/appAssertion/appAssertionManager.js +309 -0
- package/lib/commonjs/ui/appAssertion/appAssertionManager.js.map +1 -0
- package/lib/commonjs/ui/appAssertion/appIntegrityPlatform.js +18 -0
- package/lib/commonjs/ui/appAssertion/appIntegrityPlatform.js.map +1 -0
- package/lib/commonjs/ui/appAssertion/appIntegrityPlatform.native.js +30 -0
- package/lib/commonjs/ui/appAssertion/appIntegrityPlatform.native.js.map +1 -0
- package/lib/commonjs/ui/appAssertion/appIntegrityTypes.js +6 -0
- package/lib/commonjs/ui/appAssertion/appIntegrityTypes.js.map +1 -0
- package/lib/commonjs/ui/components/AccountInvitationAcceptance.js +97 -0
- package/lib/commonjs/ui/components/AccountInvitationAcceptance.js.map +1 -0
- package/lib/commonjs/ui/components/DisplayCurrencySelector.js +49 -0
- package/lib/commonjs/ui/components/DisplayCurrencySelector.js.map +1 -0
- package/lib/commonjs/ui/components/fileManagement/FileAppAccessSection.js +121 -0
- package/lib/commonjs/ui/components/fileManagement/FileAppAccessSection.js.map +1 -0
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +6 -2
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +10 -1
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/mutationKeys.js +4 -0
- package/lib/commonjs/ui/hooks/mutations/mutationKeys.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +49 -1
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/queryKeys.js +6 -1
- package/lib/commonjs/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useFileQueries.js +35 -1
- package/lib/commonjs/ui/hooks/queries/useFileQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/useDisplayCurrency.js +77 -0
- package/lib/commonjs/ui/hooks/useDisplayCurrency.js.map +1 -0
- package/lib/commonjs/ui/hooks/useDisplayPrice.js +59 -0
- package/lib/commonjs/ui/hooks/useDisplayPrice.js.map +1 -0
- package/lib/commonjs/ui/icons/subsetGlyphMaps.js +1 -0
- package/lib/commonjs/ui/icons/subsetGlyphMaps.js.map +1 -1
- package/lib/commonjs/ui/index.js +7 -0
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountMembersScreen.js +63 -20
- package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PreferencesScreen.js +4 -3
- package/lib/commonjs/ui/screens/PreferencesScreen.js.map +1 -1
- package/lib/module/assets/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/lib/module/assets/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/lib/module/assets/assets/fonts/icons/manifest.json +5 -4
- package/lib/module/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/lib/module/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/lib/module/assets/fonts/icons/manifest.json +5 -4
- package/lib/module/index.js +8 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/appAssertion/AppAssertionContext.js +72 -0
- package/lib/module/ui/appAssertion/AppAssertionContext.js.map +1 -0
- package/lib/module/ui/appAssertion/appAssertionManager.js +304 -0
- package/lib/module/ui/appAssertion/appAssertionManager.js.map +1 -0
- package/lib/module/ui/appAssertion/appIntegrityPlatform.js +14 -0
- package/lib/module/ui/appAssertion/appIntegrityPlatform.js.map +1 -0
- package/lib/module/ui/appAssertion/appIntegrityPlatform.native.js +26 -0
- package/lib/module/ui/appAssertion/appIntegrityPlatform.native.js.map +1 -0
- package/lib/module/ui/appAssertion/appIntegrityTypes.js +4 -0
- package/lib/module/ui/appAssertion/appIntegrityTypes.js.map +1 -0
- package/lib/module/ui/components/AccountInvitationAcceptance.js +94 -0
- package/lib/module/ui/components/AccountInvitationAcceptance.js.map +1 -0
- package/lib/module/ui/components/DisplayCurrencySelector.js +44 -0
- package/lib/module/ui/components/DisplayCurrencySelector.js.map +1 -0
- package/lib/module/ui/components/fileManagement/FileAppAccessSection.js +116 -0
- package/lib/module/ui/components/fileManagement/FileAppAccessSection.js.map +1 -0
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js +6 -2
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +10 -1
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/mutations/mutationKeys.js +4 -0
- package/lib/module/ui/hooks/mutations/mutationKeys.js.map +1 -1
- package/lib/module/ui/hooks/mutations/useAccountMutations.js +47 -0
- package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/module/ui/hooks/queries/queryKeys.js +6 -1
- package/lib/module/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/module/ui/hooks/queries/useFileQueries.js +33 -1
- package/lib/module/ui/hooks/queries/useFileQueries.js.map +1 -1
- package/lib/module/ui/hooks/useDisplayCurrency.js +72 -0
- package/lib/module/ui/hooks/useDisplayCurrency.js.map +1 -0
- package/lib/module/ui/hooks/useDisplayPrice.js +56 -0
- package/lib/module/ui/hooks/useDisplayPrice.js.map +1 -0
- package/lib/module/ui/icons/subsetGlyphMaps.js +1 -0
- package/lib/module/ui/icons/subsetGlyphMaps.js.map +1 -1
- package/lib/module/ui/index.js +1 -0
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/screens/AccountMembersScreen.js +63 -20
- package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/module/ui/screens/PreferencesScreen.js +4 -3
- package/lib/module/ui/screens/PreferencesScreen.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +7 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/appAssertion/AppAssertionContext.d.ts +41 -0
- package/lib/typescript/commonjs/ui/appAssertion/AppAssertionContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/appAssertion/appAssertionManager.d.ts +92 -0
- package/lib/typescript/commonjs/ui/appAssertion/appAssertionManager.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/appAssertion/appIntegrityPlatform.d.ts +9 -0
- package/lib/typescript/commonjs/ui/appAssertion/appIntegrityPlatform.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/appAssertion/appIntegrityPlatform.native.d.ts +3 -0
- package/lib/typescript/commonjs/ui/appAssertion/appIntegrityPlatform.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/appAssertion/appIntegrityTypes.d.ts +22 -0
- package/lib/typescript/commonjs/ui/appAssertion/appIntegrityTypes.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/AccountInvitationAcceptance.d.ts +5 -0
- package/lib/typescript/commonjs/ui/components/AccountInvitationAcceptance.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/DisplayCurrencySelector.d.ts +3 -0
- package/lib/typescript/commonjs/ui/components/DisplayCurrencySelector.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/fileManagement/FileAppAccessSection.d.ts +15 -0
- package/lib/typescript/commonjs/ui/components/fileManagement/FileAppAccessSection.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts +2 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/mutationKeys.d.ts +3 -0
- package/lib/typescript/commonjs/ui/hooks/mutations/mutationKeys.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +20 -2
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts +5 -0
- package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useFileQueries.d.ts +11 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useFileQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/usePersonalPlans.d.ts +2 -1
- package/lib/typescript/commonjs/ui/hooks/queries/usePersonalPlans.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useDisplayCurrency.d.ts +11 -0
- package/lib/typescript/commonjs/ui/hooks/useDisplayCurrency.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/useDisplayPrice.d.ts +6 -0
- package/lib/typescript/commonjs/ui/hooks/useDisplayPrice.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/icons/MaterialCommunityIcons.d.ts +1 -1
- package/lib/typescript/commonjs/ui/icons/MaterialCommunityIcons.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/icons/subsetGlyphMaps.d.ts +1 -0
- package/lib/typescript/commonjs/ui/icons/subsetGlyphMaps.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/index.d.ts +2 -0
- package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountMembersScreen.d.ts +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountMembersScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PreferencesScreen.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +7 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/appAssertion/AppAssertionContext.d.ts +41 -0
- package/lib/typescript/module/ui/appAssertion/AppAssertionContext.d.ts.map +1 -0
- package/lib/typescript/module/ui/appAssertion/appAssertionManager.d.ts +92 -0
- package/lib/typescript/module/ui/appAssertion/appAssertionManager.d.ts.map +1 -0
- package/lib/typescript/module/ui/appAssertion/appIntegrityPlatform.d.ts +9 -0
- package/lib/typescript/module/ui/appAssertion/appIntegrityPlatform.d.ts.map +1 -0
- package/lib/typescript/module/ui/appAssertion/appIntegrityPlatform.native.d.ts +3 -0
- package/lib/typescript/module/ui/appAssertion/appIntegrityPlatform.native.d.ts.map +1 -0
- package/lib/typescript/module/ui/appAssertion/appIntegrityTypes.d.ts +22 -0
- package/lib/typescript/module/ui/appAssertion/appIntegrityTypes.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/AccountInvitationAcceptance.d.ts +5 -0
- package/lib/typescript/module/ui/components/AccountInvitationAcceptance.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/DisplayCurrencySelector.d.ts +3 -0
- package/lib/typescript/module/ui/components/DisplayCurrencySelector.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/fileManagement/FileAppAccessSection.d.ts +15 -0
- package/lib/typescript/module/ui/components/fileManagement/FileAppAccessSection.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts +2 -1
- package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/mutationKeys.d.ts +3 -0
- package/lib/typescript/module/ui/hooks/mutations/mutationKeys.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +20 -2
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts +5 -0
- package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/useFileQueries.d.ts +11 -1
- package/lib/typescript/module/ui/hooks/queries/useFileQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/usePersonalPlans.d.ts +2 -1
- package/lib/typescript/module/ui/hooks/queries/usePersonalPlans.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useDisplayCurrency.d.ts +11 -0
- package/lib/typescript/module/ui/hooks/useDisplayCurrency.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/useDisplayPrice.d.ts +6 -0
- package/lib/typescript/module/ui/hooks/useDisplayPrice.d.ts.map +1 -0
- package/lib/typescript/module/ui/icons/MaterialCommunityIcons.d.ts +1 -1
- package/lib/typescript/module/ui/icons/MaterialCommunityIcons.d.ts.map +1 -1
- package/lib/typescript/module/ui/icons/subsetGlyphMaps.d.ts +1 -0
- package/lib/typescript/module/ui/icons/subsetGlyphMaps.d.ts.map +1 -1
- package/lib/typescript/module/ui/index.d.ts +2 -0
- package/lib/typescript/module/ui/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountMembersScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/AccountMembersScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts.map +1 -1
- package/package.json +9 -6
- package/src/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/src/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/src/assets/fonts/icons/manifest.json +5 -4
- package/src/index.ts +17 -0
- package/src/ui/appAssertion/AppAssertionContext.tsx +109 -0
- package/src/ui/appAssertion/appAssertionManager.ts +363 -0
- package/src/ui/appAssertion/appIntegrityPlatform.native.ts +27 -0
- package/src/ui/appAssertion/appIntegrityPlatform.ts +12 -0
- package/src/ui/appAssertion/appIntegrityTypes.ts +23 -0
- package/src/ui/components/AccountInvitationAcceptance.tsx +90 -0
- package/src/ui/components/DisplayCurrencySelector.tsx +38 -0
- package/src/ui/components/__tests__/AccountInvitationAcceptance.test.tsx +61 -0
- package/src/ui/components/fileManagement/FileAppAccessSection.tsx +111 -0
- package/src/ui/components/fileManagement/FileDetailsModal.tsx +5 -1
- package/src/ui/context/OxyContext.tsx +13 -1
- package/src/ui/hooks/mutations/mutationKeys.ts +5 -0
- package/src/ui/hooks/mutations/useAccountMutations.ts +33 -0
- package/src/ui/hooks/queries/queryKeys.ts +5 -0
- package/src/ui/hooks/queries/useFileQueries.ts +44 -2
- package/src/ui/hooks/useDisplayCurrency.ts +64 -0
- package/src/ui/hooks/useDisplayPrice.ts +40 -0
- package/src/ui/icons/subsetGlyphMaps.ts +1 -0
- package/src/ui/index.ts +2 -0
- package/src/ui/screens/AccountMembersScreen.tsx +71 -27
- package/src/ui/screens/PreferencesScreen.tsx +2 -0
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* infinite scroll, pull-to-refresh, and optimistic upload reconciliation.
|
|
10
10
|
*/
|
|
11
11
|
import { type InfiniteData, type QueryClient } from '@tanstack/react-query';
|
|
12
|
-
import type { FileMetadata } from '@oxy.so/core';
|
|
12
|
+
import type { FileApplicationAccess, FileMetadata } from '@oxy.so/core';
|
|
13
13
|
/** Files fetched per page. */
|
|
14
14
|
export declare const FILES_PAGE_SIZE = 40;
|
|
15
15
|
/** Raw file record as returned by `oxyServices.assets.list` / `assetUpload`. */
|
|
@@ -63,4 +63,14 @@ export declare function removeFileFromCache(queryClient: QueryClient, ownerId: s
|
|
|
63
63
|
export declare function replaceFileInCache(queryClient: QueryClient, ownerId: string | undefined, oldId: string, newFile: FileMetadata): void;
|
|
64
64
|
/** Shallow-merge a metadata patch into a cached file (e.g. visibility change). */
|
|
65
65
|
export declare function patchFileMetadataInCache(queryClient: QueryClient, ownerId: string | undefined, fileId: string, metadataPatch: Record<string, unknown>): void;
|
|
66
|
+
/**
|
|
67
|
+
* The applications that can open one of the owner's files with their own
|
|
68
|
+
* token: one that stored it for the person, or one the person attached it to.
|
|
69
|
+
* Fetched when `enabled` (the owner's own file); `staleTime: 0` re-reads it
|
|
70
|
+
* every time the details open, since an application can gain access at any
|
|
71
|
+
* time (a new upload on the person's behalf).
|
|
72
|
+
*/
|
|
73
|
+
export declare const useFileAppAccess: (fileId: string, enabled?: boolean) => import("@tanstack/react-query").UseQueryResult<FileApplicationAccess[], Error>;
|
|
74
|
+
/** Drop one application from a file's cached access list (the optimistic half of a revoke). */
|
|
75
|
+
export declare function removeAppAccessFromCache(queryClient: QueryClient, fileId: string, applicationId: string): FileApplicationAccess[] | undefined;
|
|
66
76
|
//# sourceMappingURL=useFileQueries.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFileQueries.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/queries/useFileQueries.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"useFileQueries.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/queries/useFileQueries.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAIxE,8BAA8B;AAC9B,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC,gFAAgF;AAChF,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB,2DAA2D;IAC3D,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,kEAAkE;IAClE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,0CAA0C;AAC1C,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC,aAAa,CAAC,CAAC;AAE5D,4EAA4E;AAC5E,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,WAAW,GAAG,YAAY,CAgBnE;AAED,wFAAwF;AACxF,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,OAAO,CAAC;AAEnD,8DAA8D;AAC9D,wBAAgB,eAAe,CAC7B,QAAQ,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,EAClE,MAAM,EAAE,MAAM,GACb,aAAa,CAQf;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,GAAI,UAAU,MAAM,EAAE,UAAS,gBAA4B,wGAmB3F,CAAC;AAiBF,sDAAsD;AACtD,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,IAAI,EAAE,YAAY,GACjB,IAAI,CAUN;AAED,6EAA6E;AAC7E,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,gBAA4B,GACpC,IAAI,CAKN;AAED,qEAAqE;AACrE,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,YAAY,GACpB,IAAI,CAIN;AAED,kFAAkF;AAClF,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACrC,IAAI,CAYN;AAID;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,MAAM,EAAE,iBAAc,mFAS9D,CAAC;AAEF,+FAA+F;AAC/F,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,MAAM,GACpB,qBAAqB,EAAE,GAAG,SAAS,CAUrC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export declare function usePersonalPlans(): import("@tanstack/react-query").UseQueryResult<{
|
|
3
3
|
schemaVersion: 1;
|
|
4
4
|
state: "unconfigured" | "configured";
|
|
5
|
-
purchase: "unavailable";
|
|
5
|
+
purchase: "unavailable" | "available";
|
|
6
6
|
plans: {
|
|
7
7
|
kind: "oxy_one";
|
|
8
8
|
displayName: string;
|
|
@@ -60,5 +60,6 @@ export declare function usePersonalPlanSubscriptions(): import("@tanstack/react-
|
|
|
60
60
|
displayName: string;
|
|
61
61
|
}[];
|
|
62
62
|
}[];
|
|
63
|
+
canRenew?: boolean | undefined;
|
|
63
64
|
}[], Error>;
|
|
64
65
|
//# sourceMappingURL=usePersonalPlans.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePersonalPlans.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/queries/usePersonalPlans.ts"],"names":[],"mappings":"AAIA,iFAAiF;AACjF,wBAAgB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"usePersonalPlans.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/queries/usePersonalPlans.ts"],"names":[],"mappings":"AAIA,iFAAiF;AACjF,wBAAgB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;aA0Bk1O,CAAC;;;;;;;;;UAnBl3O;AAED,kFAAkF;AAClF,wBAAgB,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;YAe3C"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type UserPreferences } from '@oxy.so/core';
|
|
2
|
+
export type DisplayCurrency = NonNullable<UserPreferences['displayCurrency']>;
|
|
3
|
+
export declare const DISPLAY_CURRENCIES: readonly DisplayCurrency[];
|
|
4
|
+
/** Account-scoped server preference. A late save can never replace another account. */
|
|
5
|
+
export declare function useDisplayCurrency(): {
|
|
6
|
+
currency: DisplayCurrency;
|
|
7
|
+
selectCurrency: (next: DisplayCurrency) => void;
|
|
8
|
+
isSaving: boolean;
|
|
9
|
+
error: Error | null;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=useDisplayCurrency.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDisplayCurrency.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useDisplayCurrency.ts"],"names":[],"mappings":"AAEA,OAAO,EAAwB,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAO1E,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAC9E,eAAO,MAAM,kBAAkB,EAAE,SAAS,eAAe,EAA2B,CAAC;AAYrF,uFAAuF;AACvF,wBAAgB,kBAAkB;;2BA6BF,eAAe;;;EAW9C"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Display conversion only. Pricing and checkout request bodies retain their source units. */
|
|
2
|
+
export declare function useDisplayPrice(): {
|
|
3
|
+
currency: import("./useDisplayCurrency.js").DisplayCurrency;
|
|
4
|
+
formatUsd: (minorUnits: number) => string;
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=useDisplayPrice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDisplayPrice.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useDisplayPrice.ts"],"names":[],"mappings":"AAMA,8FAA8F;AAC9F,wBAAgB,eAAe;;4BAkBE,MAAM;EActC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/** Glyphs are decorative: hidden from assistive technology (see `decorativeIconSet`). */
|
|
2
|
-
declare const MaterialCommunityIcons: import("@expo/vector-icons/build/createIconSet").Icon<"function" | "devices" | "sort" | "at" | "security" | "account" | "message" | "network" | "email" | "bio" | "phone" | "web" | "read" | "android" | "logout" | "store" | "label" | "pan" | "text" | "solid" | "scale" | "link" | "loading" | "image" | "key" | "resize" | "ellipse" | "switch" | "opacity" | "wrap" | "alert" | "radio" | "contain" | "account-circle" | "account-cog-outline" | "account-eye-outline" | "account-group" | "account-multiple" | "account-multiple-outline" | "account-outline" | "account-plus" | "account-search" | "account-switch" | "alert-circle" | "alert-circle-outline" | "apps" | "archive" | "archive-arrow-down" | "arrow-down" | "arrow-left" | "arrow-up" | "bell" | "bell-outline" | "briefcase-outline" | "bug" | "bullhorn" | "cake-variant" | "cake-variant-outline" | "calendar" | "calendar-outline" | "camera" | "camera-outline" | "cancel" | "card" | "card-outline" | "cart-outline" | "cellphone" | "cellphone-basic" | "cellphone-message" | "cellphone-screenshot" | "chart-line" | "check-all" | "check-circle" | "chevron-down" | "chevron-up" | "chip" | "circle-outline" | "clock" | "clock-outline" | "close" | "close-circle" | "cloud-outline" | "cloud-upload" | "cloud-upload-outline" | "code-tags" | "cog" | "cog-outline" | "contacts" | "content-copy" | "controller" | "cookie" | "credit-card" | "cube-outline" | "database-outline" | "decimal" | "delete" | "delete-outline" | "dots-horizontal" | "download" | "download-outline" | "earth" | "ellipse-outline" | "email-outline" | "eye" | "eye-off-outline" | "file" | "file-document" | "file-document-edit-outline" | "file-document-outline" | "file-excel-outline" | "file-outline" | "file-pdf-box" | "filter-outline" | "flash" | "folder" | "folder-image" | "folder-open-outline" | "folder-outline" | "folder-zip-outline" | "ghost" | "gift" | "gift-outline" | "grid" | "heart" | "heart-outline" | "help-circle" | "help-circle-outline" | "history" | "image-multiple-outline" | "image-outline" | "information" | "information-outline" | "leaf" | "library" | "link-variant" | "lock-outline" | "magnify" | "map-marker" | "map-marker-multiple" | "map-marker-outline" | "message-outline" | "minus-circle" | "motion" | "music-note-outline" | "null" | "numeric" | "open-in-app" | "openid" | "palette" | "palette-outline" | "pencil-outline" | "phone-outline" | "play" | "plus" | "plus-circle" | "post" | "presentation" | "pulse" | "react" | "receipt-outline" | "rocket" | "school-outline" | "server" | "share-outline" | "shield" | "shield-account-outline" | "shield-check" | "shield-search" | "signature" | "sort-alphabetical-variant" | "sort-numeric-variant" | "star" | "sync" | "tag" | "tag-outline" | "text-box-outline" | "theme-light-dark" | "transfer" | "translate" | "trash-can-outline" | "tray-arrow-down" | "trophy" | "trophy-outline" | "update" | "video-outline" | "volume-off" | "wallet" | "wallet-outline" | "watch" | "wifi" | "wifi-off" | "wrench" | "xml", "OxyServicesMaterialCommunityIcons">;
|
|
2
|
+
declare const MaterialCommunityIcons: import("@expo/vector-icons/build/createIconSet").Icon<"function" | "devices" | "sort" | "at" | "security" | "account" | "message" | "network" | "email" | "bio" | "phone" | "web" | "read" | "android" | "logout" | "store" | "label" | "pan" | "text" | "solid" | "scale" | "link" | "loading" | "image" | "key" | "resize" | "ellipse" | "switch" | "opacity" | "wrap" | "alert" | "radio" | "contain" | "account-circle" | "account-cog-outline" | "account-eye-outline" | "account-group" | "account-multiple" | "account-multiple-outline" | "account-outline" | "account-plus" | "account-search" | "account-switch" | "alert-circle" | "alert-circle-outline" | "apps" | "archive" | "archive-arrow-down" | "arrow-down" | "arrow-left" | "arrow-up" | "bell" | "bell-outline" | "briefcase-outline" | "bug" | "bullhorn" | "cake-variant" | "cake-variant-outline" | "calendar" | "calendar-outline" | "camera" | "camera-outline" | "cancel" | "card" | "card-outline" | "cart-outline" | "cellphone" | "cellphone-basic" | "cellphone-message" | "cellphone-screenshot" | "chart-line" | "check-all" | "check-circle" | "chevron-down" | "chevron-up" | "chip" | "circle-outline" | "clock" | "clock-outline" | "close" | "close-circle" | "cloud-outline" | "cloud-upload" | "cloud-upload-outline" | "code-tags" | "cog" | "cog-outline" | "contacts" | "content-copy" | "controller" | "cookie" | "credit-card" | "cube-outline" | "database-outline" | "decimal" | "delete" | "delete-outline" | "dots-horizontal" | "download" | "download-outline" | "earth" | "ellipse-outline" | "email-outline" | "eye" | "eye-off-outline" | "file" | "file-document" | "file-document-edit-outline" | "file-document-outline" | "file-excel-outline" | "file-outline" | "file-pdf-box" | "filter-outline" | "flash" | "folder" | "folder-image" | "folder-open-outline" | "folder-outline" | "folder-zip-outline" | "ghost" | "gift" | "gift-outline" | "grid" | "heart" | "heart-outline" | "help-circle" | "help-circle-outline" | "history" | "image-multiple-outline" | "image-outline" | "information" | "information-outline" | "leaf" | "library" | "link-variant" | "lock-outline" | "magnify" | "map-marker" | "map-marker-multiple" | "map-marker-outline" | "message-outline" | "minus-circle" | "motion" | "music-note-outline" | "null" | "numeric" | "open-in-app" | "openid" | "palette" | "palette-outline" | "pencil-outline" | "phone-outline" | "play" | "plus" | "plus-circle" | "post" | "presentation" | "pulse" | "react" | "receipt-outline" | "rocket" | "school-outline" | "server" | "share-outline" | "shield" | "shield-account-outline" | "shield-check" | "shield-search" | "signature" | "sort-alphabetical-variant" | "sort-numeric-variant" | "star" | "sync" | "tag" | "tag-outline" | "text-box-outline" | "theme-light-dark" | "transfer" | "translate" | "trash-can-outline" | "tray-arrow-down" | "trophy" | "trophy-outline" | "update" | "upload" | "video-outline" | "volume-off" | "wallet" | "wallet-outline" | "watch" | "wifi" | "wifi-off" | "wrench" | "xml", "OxyServicesMaterialCommunityIcons">;
|
|
3
3
|
export default MaterialCommunityIcons;
|
|
4
4
|
//# sourceMappingURL=MaterialCommunityIcons.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MaterialCommunityIcons.d.ts","sourceRoot":"","sources":["../../../../../src/ui/icons/MaterialCommunityIcons.ts"],"names":[],"mappings":"AAKA,yFAAyF;AACzF,QAAA,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"MaterialCommunityIcons.d.ts","sourceRoot":"","sources":["../../../../../src/ui/icons/MaterialCommunityIcons.ts"],"names":[],"mappings":"AAKA,yFAAyF;AACzF,QAAA,MAAM,sBAAsB,y9FAG3B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -322,6 +322,7 @@ export declare const materialCommunityIconsGlyphMap: {
|
|
|
322
322
|
readonly trophy: 984376;
|
|
323
323
|
readonly "trophy-outline": 984378;
|
|
324
324
|
readonly update: 984752;
|
|
325
|
+
readonly upload: 984402;
|
|
325
326
|
readonly "video-outline": 986076;
|
|
326
327
|
readonly "volume-off": 984449;
|
|
327
328
|
readonly wallet: 984452;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subsetGlyphMaps.d.ts","sourceRoot":"","sources":["../../../../../src/ui/icons/subsetGlyphMaps.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4InB,CAAC;AAEX,eAAO,MAAM,8BAA8B
|
|
1
|
+
{"version":3,"file":"subsetGlyphMaps.d.ts","sourceRoot":"","sources":["../../../../../src/ui/icons/subsetGlyphMaps.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4InB,CAAC;AAEX,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmMjC,CAAC"}
|
|
@@ -29,6 +29,8 @@ export { default as OxyPayButton } from './components/OxyPayButton.js';
|
|
|
29
29
|
export type { OxyPayButtonProps } from './components/OxyPayButton.js';
|
|
30
30
|
export { default as ProfileButton } from './components/ProfileButton.js';
|
|
31
31
|
export { useOxy, useOptionalOxy, OxyProviderMissingError } from './context/OxyContext.js';
|
|
32
|
+
export { useAppAssertion } from './appAssertion/AppAssertionContext.js';
|
|
33
|
+
export type { UseAppAssertionResult } from './appAssertion/AppAssertionContext.js';
|
|
32
34
|
export { useAuth } from './hooks/useAuth.js';
|
|
33
35
|
export type { AuthActions, AuthState, SignInOutcome, UseAuthReturn } from './hooks/useAuth.js';
|
|
34
36
|
export { useFollow, useSeedFollowStatuses } from './hooks/useFollow.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAMH,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,6BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,iCAA8B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,+BAA4B,CAAC;AACtE,YAAY,EAAE,kBAAkB,EAAE,MAAM,+BAA4B,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA4B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA4B,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,gCAA6B,CAAC;AAC7D,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,gCAA6B,CAAC;AAE7F,YAAY,EAAE,oBAAoB,EAAE,MAAM,oCAAiC,CAAC;AAC5E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,8BAA2B,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,8BAA2B,CAAC;AACpE,YAAY,EAAE,iBAAiB,EAAE,MAAM,8BAA2B,CAAC;AACnE,8CAA8C;AAC9C,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,8BAA2B,CAAC;AACpE,mDAAmD;AACnD,YAAY,EAAE,iBAAiB,EAAE,MAAM,8BAA2B,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,+BAA4B,CAAC;AAGtE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,yBAAsB,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAiB,CAAC;AAC1C,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAiB,CAAC;AAC5F,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,sBAAmB,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAoB,CAAC;AAChD,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,uBAAoB,CAAC;AAM9E,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAoB,CAAC;AAGlD,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,0BAAuB,CAAC;AAC/B,YAAY,EAAE,sBAAsB,EAAE,MAAM,0BAAuB,CAAC;AAEpE,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,mCAAgC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAMH,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,6BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,iCAA8B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,+BAA4B,CAAC;AACtE,YAAY,EAAE,kBAAkB,EAAE,MAAM,+BAA4B,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA4B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA4B,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,gCAA6B,CAAC;AAC7D,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,gCAA6B,CAAC;AAE7F,YAAY,EAAE,oBAAoB,EAAE,MAAM,oCAAiC,CAAC;AAC5E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,8BAA2B,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,8BAA2B,CAAC;AACpE,YAAY,EAAE,iBAAiB,EAAE,MAAM,8BAA2B,CAAC;AACnE,8CAA8C;AAC9C,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,8BAA2B,CAAC;AACpE,mDAAmD;AACnD,YAAY,EAAE,iBAAiB,EAAE,MAAM,8BAA2B,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,+BAA4B,CAAC;AAGtE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,yBAAsB,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAoC,CAAC;AACrE,YAAY,EAAE,qBAAqB,EAAE,MAAM,uCAAoC,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAiB,CAAC;AAC1C,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAiB,CAAC;AAC5F,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,sBAAmB,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAoB,CAAC;AAChD,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,uBAAoB,CAAC;AAM9E,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAoB,CAAC;AAGlD,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,0BAAuB,CAAC;AAC/B,YAAY,EAAE,sBAAsB,EAAE,MAAM,0BAAuB,CAAC;AAEpE,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,mCAAgC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { BaseScreenProps } from '../types/navigation.js';
|
|
3
3
|
/**
|
|
4
|
-
* Manage the members of an account (invite by
|
|
4
|
+
* Manage the members of an account (invite by email, change roles,
|
|
5
5
|
* remove, transfer ownership). Gated on the caller's `callerMembership`
|
|
6
6
|
* permissions. Receives the target `accountId` via navigation props.
|
|
7
7
|
*/
|
|
@@ -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;AAc/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"AccountMembersScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/AccountMembersScreen.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAc/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;AAa3D;;;;GAIG;AACH,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAufnD,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreferencesScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/PreferencesScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"PreferencesScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/PreferencesScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAQzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;;AAyL3D,wBAA6C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxy.so/services",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.12.0",
|
|
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",
|
|
@@ -140,14 +140,16 @@
|
|
|
140
140
|
},
|
|
141
141
|
"dependencies": {
|
|
142
142
|
"@expo/config-plugins": "57.0.9",
|
|
143
|
-
"@oxy.so/contracts": "^4.
|
|
144
|
-
"color": "^5.0.3"
|
|
143
|
+
"@oxy.so/contracts": "^4.24.0",
|
|
144
|
+
"color": "^5.0.3",
|
|
145
|
+
"@peable.to/sdk": "0.2.7"
|
|
145
146
|
},
|
|
146
147
|
"devDependencies": {
|
|
147
148
|
"@commitlint/cli": "^21.2.1",
|
|
148
149
|
"@commitlint/config-conventional": "^21.2.0",
|
|
150
|
+
"@expo/app-integrity": "~57.0.2",
|
|
149
151
|
"@expo/vector-icons": "^15.0.3",
|
|
150
|
-
"@oxy.so/core": "4.
|
|
152
|
+
"@oxy.so/core": "4.21.0",
|
|
151
153
|
"@react-native-async-storage/async-storage": "^2.0.0",
|
|
152
154
|
"@react-native-community/netinfo": "^12.0.1",
|
|
153
155
|
"@react-native/babel-preset": "^0.86.2",
|
|
@@ -196,11 +198,12 @@
|
|
|
196
198
|
"zustand": "^5.0.14"
|
|
197
199
|
},
|
|
198
200
|
"//@oxy.so/bloom": "RE-RAISE THIS FLOOR ON EVERY BREAKING BLOOM RELEASE, in the same commit as the root package.json catalog entry and the code that requires it. The breaking position is the MAJOR, so `^3.0.1` means `>=3.0.1 <4.0.0`: 3.x minors are admitted on semver's additive promise, and Bloom 4.0.0 is refused until someone raises this deliberately. The CAP is the part that is load-bearing. An earlier revision of this key recorded the opposite trade -- an uncapped `>=` floor, accepted so that intentionally-breaking Bloom 0.x minors would not be blocked -- and that trade is closed by evidence rather than by preference: an unbounded range is exactly what let `bun install` pair this package with Bloom 1.0.0 and emit no warning at all, and 1.0.0 broke it four ways (a deleted provider, a renamed confirm option, a renamed Chip fill, and two REMOVED SUBPATHS that fail at bundle time, before any typecheck runs). A floor is a claim about what was measured; a cap is the claim that nothing beyond it was. RAISED TO 3.0.1 from `^2.1.0`. Bloom 3.0.0 breaks exactly two things -- `PageHeader` defaults to `presentation=\"floating\"` and stops hiding the title under `transparent`, and `Field disabled` now reaches the control that reads the field context -- and THIS PACKAGE IMPORTS NEITHER: it renders no `PageHeader` and no `Field`, and 3.0 removes no subpath (unlike 2.0.0, which is why that floor cost code changes and this one does not). Its six `transparent` occurrences are CSS colour values, not the PageHeader prop. The cap had to move rather than widen to a union, because leaving `^2.1.0` in place is what made `bun install` resolve a SECOND, nested Bloom 2.12.4 under this package for any app on Bloom 3 -- two copies of a library whose 3.0 contracts (`control-surface`, `TopEdgeProvider`, `ScrollOffsetProvider`) are React contexts, so a provider from one copy cannot be read by a consumer from the other. Mention's `oxyRuntimeCompatibility` test is what caught it; nothing in a typecheck can. RAISED AGAIN TO 3.2.0 from `^3.0.1`, for the same class of reason the 2.x note records, only in the other direction: 3.2.0 ADDS the per-glyph icon subpaths (`@oxy.so/bloom/icons/RiAtLine`) that this package's screens now import instead of the `@oxy.so/bloom/icons` barrel, and a missing subpath fails at bundle time, in the consumer's Metro, long after this package has typechecked and shipped. `^3.0.1` would have admitted Bloom 3.0.1 and 3.1.0, neither of which has those subpaths, so the floor is the only thing standing between a consumer and a red build. Nothing else about 3.1.0 or 3.2.0 is required here; the cap stays at the major. RAISED TO ^4.2.0: FollowButton now delegates its visuals to Bloom media-header FollowButton with loading, textStyle and large size; the new shared UI contracts require one Bloom4 context across Services and its consumer. RAISED TO ^4.31.0: the sign-in and account screens type one-time codes into `InputOtp` with `type=\"alphanumeric\"` (the long sign-in code and backup codes), which 4.31.0 adds; older 4.x drops the letters. RAISED TO ^4.35.0: every password field passes `revealable` to `TextFieldInput` (the eye button, 4.35.0); older 4.x drops the prop silently and the password cannot be shown. The provider also mounts `@oxy.so/bloom/locale` (4.32.0+). RAISED TO ^5.1.0 (services 9.0.0, a major because consumers must move to Bloom 5 with it): Bloom 5.0.0 types `Card`'s `style` without radius, border width or `overflow` (geometry goes through `radius`/`border`/`clipContent`) and stops clipping a Card's children by default, so `BenefitList`'s `overflow: 'visible'` became both a type error and unnecessary; it is removed. The cap MOVES rather than widening to a `^4 || ^5` union, for the reason the 3.0.1 note records: a union lets an app resolve a second, nested Bloom copy and split the React contexts. The floor is 5.1.0 because that is the version measured here (every package builds and tests against it); 5.0.0 was not measured. RAISED TO ^6.0.0 (services 10.0.0, a major because consumers must move to Bloom 6 with it, and because this package's own `FollowButton`/`FollowTargetButton` `size` moves with Bloom's vocabulary): Bloom 6.0.0 removes the duplicate spellings its 5.x types still admitted, and this package used four of them. The control `size` narrows to `xs|sm|md|lg`, so every `small`/`medium`/`large` handed to a Bloom control became `sm`/`md`/`lg`, and the Follow buttons' public `size` became `sm|md|lg` because it is passed straight through to Bloom's media-header `FollowButton`. `Switch` is controlled by `checked`/`onCheckedChange`, not `value`/`onValueChange`. `Button` has no `variant`: each call site names `appearance` and `tone` (the pair the 5.x recipe resolved the variant to, so nothing repaints), `LinkButton`'s colour is `linkTone`, and `PeableButton` renders `InverseButton`. `Card` takes `appearance=\"outline\"` for `variant=\"outlined\"`. The deprecated spellings Bloom 6 still accepts (`isInvalid`, Chip `color`/`variant`) are not breaks and are left alone. The cap MOVES rather than widening to a `^5 || ^6` union, for the reason the 3.0.1 note records: a union lets an app resolve a second, nested Bloom copy and split the React contexts. The floor is 6.0.0 because that is the version measured when this raise was made; the workspace catalog has since moved to ^6.2.0, which adds only the `cover-header` subpath this package does not import, so the floor stays. MAINTENANCE 6.2.1: floor >=6.2.1 and cap <6.3.0 deliberately admit only the reviewed patch line with native Back/X completion and SVG paint/resize fixes. Known 6.4.0 lacks these fixes; the exact root catalog pin prevents a caret from selecting it. A broader minor range requires forward-port and consumer acceptance. VERIFIED 7.1.2: the additional >=7.1.2 <7.2.0 line contains the reviewed native fixes. Services build/types and the website real browser provider/theme tests pass with one byte-verified Bloom copy at both the root and Services importer. The root catalog remains pinned to 6.2.1; consumers explicitly choose one supported line. Versions 6.3.x, 6.4.x and 7.1.0/7.1.1 remain excluded. VERIFIED 7.7.0: admit the progressive media-preview release as another explicit line, so consumers selecting it share one Bloom provider/theme/font context with Services. Existing supported lines and the workspace catalog stay unchanged; unreviewed 7.2-7.6 and 7.8+ remain excluded. VERIFIED 7.13.1: admit the accessible bottom-sheet dialog release so consumers selecting this line share Bloom surface, theme and overlay contexts with Services. Stable Services 11.1.1 validates the unchanged 11.1.0 source against 7.13.1 with 1040 tests, types and packed exports; the existing catalog and other supported peer lines stay unchanged. VERIFIED 7.14.0: the additive outlined Stepper release is covered by Services build, types and 1040 tests against the published package on the 11.1 maintenance branch. VERIFIED 7.15.0: additive Button focus, hover and keyboard events; the stable maintenance line passes types and all 1040 tests against the official package, preserving the existing peer lines. VERIFIED 7.16.1: the stable 11.1 maintenance line passes types and all 1040 tests against the official Accordion, rating and Dialog release; packed exports are verified. Preserve every existing peer line. VERIFIED 7.17.0: Services 11.1.5 maintenance types, 1040 tests, fresh build and packed exports pass against the official additive Carousel/Search and dialog-focus release. Preserve the existing catalog and peer lines on main. VERIFIED 7.18/7.19: the 11.1 maintenance line passed types and 1040 tests separately against both official releases; this main line passed types and all 1042 tests against 7.19.0 after building its workspace dependencies. The root catalog remains 6.2.1; apps choose one admitted line. VERIFIED 7.20.0: additive viewport observation, opt-in Meter/RatingBar reveal and Dialog minimum side gutter; Services types and all 1042 tests pass against the release candidate tarball. Existing peer lines and the workspace catalog remain unchanged. VERIFIED 7.21.0: configurable Dialog/BottomSheet backdrop and transition preserve defaults; this main line passes types and all 1042 tests against the byte-verified release candidate. Existing supported peer lines and the workspace catalog remain unchanged. VERIFIED 7.22.0: controlled Collapsible and rich RadioGroup composition preserve Services compatibility; maintenance Services types and all 1040 tests pass against the release candidate, with unchanged 11.1.0 runtime source. Mercaria validates the composed purchase panels in eight browser scenarios and all four client typechecks. VERIFIED 7.27.0: exact ColorScope roles, local mode and portal propagation preserve Services defaults. This main line passes types and all 114 suites / 1042 tests against the official 7.27.0 package with a single Bloom resolution. Stable 11.1.13 maintenance also passes types and all 113 suites / 1040 tests. Preserve the existing main catalog and earlier admitted peer lines. VERIFIED 7.28.0: types and all 114 suites / 1042 tests pass with the official CSS 3.1.0-rc.0 / NativeWind 5.0.0-rc.0 compiler pair. Maintenance also verifies Expo 56.0.23 and RN 0.85.3; no runtime source or framework peer changes are required. VERIFIED 7.29.0: TypeScript and all 114 suites / 1042 tests pass with the paired NativeWind 5.0.0-rc.0 and react-native-css 3.1.0-rc.0. Optional gallery lifecycle callback preserves existing surface behavior; runtime source unchanged. VERIFIED 7.30.0: TypeScript and all 114 suites / 1042 tests pass against the video-overlay release candidate with one Bloom runtime; existing framework catalog and runtime source stay unchanged. VERIFIED 7.31.0: TypeScript and all 114 suites / 1042 tests pass against the official 7.31.0 package with one Bloom runtime. It adds the `video-view` subpath (expo-video's VideoView with `playsInline` on, so web video plays inline on iPhone Safari) and routes MediaSurface through it; this package imports neither, and runtime source and framework catalog stay unchanged. VERIFIED 7.32.0 AND 7.33.0 (11.2.0-oxy-one.4): each official package installed as the one Bloom resolution; types and all 115 suites / 1050 tests pass against both (and against the 6.2.1 catalog). 7.32.0 adds the shared agent-avatar renderer and Clippo; 7.33.0 adds the lean `settings-modal/modal` and `settings-modal/fields` entries. Both are additive (no subpath removed, no peer or dependency changed) and this package imports neither family. The cap moves to <7.34.0 so a 7.33 patch (7.33.1 restores web TextField side padding) needs no services release. The root catalog stays 6.2.1. Same verification and fix as maintenance 11.1.18. VERIFIED 8.0.0 (11.2.0-oxy-one.4): types and all 115 suites / 1050 tests pass with 8.0.0 as the one Bloom resolution. Its only break is that `LinkPreviewCard` leaves the root barrel for `@oxy.so/bloom/link-preview` (its cover now loads through `expo-image`, which the root barrel must not link); this package imports neither. The 8.0 line is admitted beside 7.x, so an app moves to Bloom 8 without a services major. VERIFIED 8.1.1 AND 9.0.0 (11.2.0-oxy-one.5): each installed as the one Bloom resolution (8.1.1 from the registry, 9.0.0 from the packed release candidate); types and all 115 suites / 1050 tests pass against both, and against the 6.2.1 catalog. 8.1.x adds the unified agent-avatar renderer and changes nothing this package imports. 9.0.0 removes the `small` / `medium` / `large` spellings from control sizes (Chip, Badge, Sidebar, Rating and others), renames `AlertDialog` / `Command` `visible` + `onClose` to `open` + `onOpenChange`, replaces the composer's `listening` with `voiceState`, and swaps the glass material for blur and tint; this package used one of those, Chip `size=\"small\"` (three screens), now `sm`, which every admitted line accepts. The 8.1 minor joins the 8.0 line (one 8.x range) and the 9.0 line is admitted beside the earlier ones. The root catalog stays 6.2.1. VERIFIED 10.0.0 (11.2.0-oxy-one.7): installed from the registry as the one Bloom resolution; types and all 115 suites / 1050 tests pass. 10.0.0 makes an avatar one flat `AvatarCharacter` and removes `AvatarConfig` with its constants from `@oxy.so/bloom/agent-avatar`; this package imports nothing from that family, so nothing here changes. The 10.0 line is admitted beside the earlier ones. The root catalog stays 6.2.1.",
|
|
199
|
-
"//@oxy.so/core": "The core peer is the root catalog's `^4.
|
|
201
|
+
"//@oxy.so/core": "The core peer is the root catalog's `^4.21.0` (>=4.21.0 <5.0.0), and contracts is a `workspace:^` dependency (packed as ^<its version>). Both were EXACT pins: core since the Oxy One prerelease (4.5.0-oxy-one.0, which a caret range could not admit) and contracts by `workspace:*`; the reason left with the prerelease, and an exact pin made every core or contracts minor a peer conflict or a second nested copy in each app until services was republished. The FLOOR is the core this package is built and tested against and needs (4.21.0: `assets.listAppAccess` / `revokeAppAccess` for \"Apps with access\"; 4.18.0 before it: `assets.list({ status: 'trash' })`, `FileMetadata.trashedAt`, `AssetLiveStatus`); raise it, in the same commit, to the first core a change here requires. The CAP is the major: core 4.x minors are admitted on semver's additive promise, and core 5.0.0 is refused until it is measured here, because a second core copy splits the one OxyServices instance and session an app shares with this package.",
|
|
200
202
|
"peerDependencies": {
|
|
203
|
+
"@expo/app-integrity": ">=56.0.0 <58.0.0",
|
|
201
204
|
"@expo/vector-icons": "^15.0.3",
|
|
202
205
|
"@oxy.so/bloom": ">=6.2.1 <6.3.0 || >=7.1.2 <7.2.0 || >=7.7.0 <7.8.0 || >=7.13.1 <7.34.0 || >=8.0.0 <8.2.0 || >=9.0.0 <9.1.0 || >=10.0.0",
|
|
203
|
-
"@oxy.so/core": "^4.
|
|
206
|
+
"@oxy.so/core": "^4.21.0",
|
|
204
207
|
"@react-native-async-storage/async-storage": "^2.0.0",
|
|
205
208
|
"@react-native-community/netinfo": ">=11.4.1 <13.0.0",
|
|
206
209
|
"@tanstack/query-async-storage-persister": "^5.101",
|
|
Binary file
|
|
Binary file
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"fontFamily": "OxyServicesIonicons",
|
|
7
7
|
"file": "src/assets/fonts/icons/OxyServicesIonicons.ttf",
|
|
8
8
|
"bytes": 43160,
|
|
9
|
-
"sha256": "
|
|
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":
|
|
156
|
-
"sha256": "
|
|
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": "
|
|
356
|
+
"glyphMapsSha256": "b0a3d21006a83bf10deac1c8e5bb1a4dacac3c0afe9d445ed856f766f49b6c01"
|
|
356
357
|
}
|
package/src/index.ts
CHANGED
|
@@ -58,6 +58,18 @@ export type {
|
|
|
58
58
|
} from './ui/runtime';
|
|
59
59
|
export type { LogoutResult, OxyContextState } from './ui/context/OxyContext';
|
|
60
60
|
export { useAuth } from './ui/hooks/useAuth';
|
|
61
|
+
// This app's Oxy-signed assertion of which app it is (ADR 0045), obtained and
|
|
62
|
+
// refreshed by the provider; attach `getAppAssertionHeaders()` to a request
|
|
63
|
+
// for a service that needs to know the app.
|
|
64
|
+
export {
|
|
65
|
+
useAppAssertion,
|
|
66
|
+
AppAssertionProviderMissingError,
|
|
67
|
+
} from './ui/appAssertion/AppAssertionContext';
|
|
68
|
+
export type { UseAppAssertionResult } from './ui/appAssertion/AppAssertionContext';
|
|
69
|
+
export type {
|
|
70
|
+
AppAssertionSnapshot,
|
|
71
|
+
AppAssertionStatus,
|
|
72
|
+
} from './ui/appAssertion/appAssertionManager';
|
|
61
73
|
export type { AuthState, AuthActions, SignInOutcome, UseAuthReturn } from './ui/hooks/useAuth';
|
|
62
74
|
export { createDeferredProductAnalytics } from './ui/analytics/productAnalytics';
|
|
63
75
|
export type { OxyProductEvent, ProductAnalytics } from './ui/analytics/productAnalytics';
|
|
@@ -453,3 +465,8 @@ export {
|
|
|
453
465
|
usePersonalPlans,
|
|
454
466
|
usePersonalPlanSubscriptions,
|
|
455
467
|
} from './ui/hooks/queries/usePersonalPlans';
|
|
468
|
+
export { AccountInvitationAcceptance } from './ui/components/AccountInvitationAcceptance';
|
|
469
|
+
|
|
470
|
+
export { DisplayCurrencySelector } from './ui/components/DisplayCurrencySelector';
|
|
471
|
+
export { useDisplayCurrency } from './ui/hooks/useDisplayCurrency';
|
|
472
|
+
export { useDisplayPrice } from './ui/hooks/useDisplayPrice';
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `useAppAssertion()` (ADR 0045): this app's Oxy-signed assertion of which app
|
|
3
|
+
* it is, for the signed-in session.
|
|
4
|
+
*
|
|
5
|
+
* `OxyProvider` mounts {@link AppAssertionProvider} itself and the manager
|
|
6
|
+
* obtains and refreshes the assertion on its own; an app never handles the
|
|
7
|
+
* proof. Something that calls a service which needs to know the app (Alia's
|
|
8
|
+
* SDK, for an agent confined to its application) attaches
|
|
9
|
+
* `await getAppAssertionHeaders()` to the request.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import type { OxyServices } from '@oxy.so/core';
|
|
13
|
+
import {
|
|
14
|
+
createContext,
|
|
15
|
+
type ReactNode,
|
|
16
|
+
useContext,
|
|
17
|
+
useEffect,
|
|
18
|
+
useMemo,
|
|
19
|
+
useRef,
|
|
20
|
+
useSyncExternalStore,
|
|
21
|
+
} from 'react';
|
|
22
|
+
import type { StorageInterface } from '../utils/storageHelpers';
|
|
23
|
+
import { appIntegrityPlatform } from './appIntegrityPlatform';
|
|
24
|
+
import { AppAssertionManager, type AppAssertionSnapshot } from './appAssertionManager';
|
|
25
|
+
import type { AppIntegrityPlatform } from './appIntegrityTypes';
|
|
26
|
+
|
|
27
|
+
const AppAssertionContext = createContext<AppAssertionManager | null>(null);
|
|
28
|
+
|
|
29
|
+
export interface AppAssertionProviderProps {
|
|
30
|
+
readonly children: ReactNode;
|
|
31
|
+
readonly oxyServices: OxyServices;
|
|
32
|
+
readonly clientId: string | null;
|
|
33
|
+
/** The signed-in person, once the session can call Oxy; `null` otherwise. */
|
|
34
|
+
readonly userId: string | null;
|
|
35
|
+
readonly sessionId: string | null;
|
|
36
|
+
readonly storage: StorageInterface | null;
|
|
37
|
+
readonly storageKeyPrefix: string;
|
|
38
|
+
/** Replaces the build's own platform, in tests. */
|
|
39
|
+
readonly integrity?: AppIntegrityPlatform;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function AppAssertionProvider({
|
|
43
|
+
children,
|
|
44
|
+
oxyServices,
|
|
45
|
+
clientId,
|
|
46
|
+
userId,
|
|
47
|
+
sessionId,
|
|
48
|
+
storage,
|
|
49
|
+
storageKeyPrefix,
|
|
50
|
+
integrity = appIntegrityPlatform,
|
|
51
|
+
}: AppAssertionProviderProps) {
|
|
52
|
+
// Read only when an iOS install needs its App Attest key id, never in render.
|
|
53
|
+
const storageRef = useRef<StorageInterface | null>(storage);
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
storageRef.current = storage;
|
|
56
|
+
}, [storage]);
|
|
57
|
+
|
|
58
|
+
const manager = useMemo(
|
|
59
|
+
() =>
|
|
60
|
+
new AppAssertionManager({
|
|
61
|
+
oxyServices,
|
|
62
|
+
clientId,
|
|
63
|
+
integrity,
|
|
64
|
+
storage: () => storageRef.current,
|
|
65
|
+
storageKeyPrefix,
|
|
66
|
+
}),
|
|
67
|
+
[oxyServices, clientId, integrity, storageKeyPrefix],
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
useEffect(() => {
|
|
71
|
+
manager.setSession(userId && sessionId ? { userId, sessionId } : null);
|
|
72
|
+
}, [manager, userId, sessionId]);
|
|
73
|
+
|
|
74
|
+
useEffect(() => () => manager.dispose(), [manager]);
|
|
75
|
+
|
|
76
|
+
return <AppAssertionContext.Provider value={manager}>{children}</AppAssertionContext.Provider>;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface UseAppAssertionResult extends AppAssertionSnapshot {
|
|
80
|
+
/** A current assertion, obtained now when there is none or it is about to expire; `null` when there can be none. */
|
|
81
|
+
readonly getAppAssertion: () => Promise<string | null>;
|
|
82
|
+
/** `{ 'X-Oxy-App-Assertion': <assertion> }`, or `{}` when there is none. */
|
|
83
|
+
readonly getAppAssertionHeaders: () => Promise<Record<string, string>>;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export class AppAssertionProviderMissingError extends Error {
|
|
87
|
+
readonly code = 'oxy_provider_missing';
|
|
88
|
+
|
|
89
|
+
constructor() {
|
|
90
|
+
super('useAppAssertion() was called outside <OxyProvider>.');
|
|
91
|
+
this.name = 'AppAssertionProviderMissingError';
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** This app's assertion of which app it is, kept current for the signed-in session. */
|
|
96
|
+
export function useAppAssertion(): UseAppAssertionResult {
|
|
97
|
+
const manager = useContext(AppAssertionContext);
|
|
98
|
+
if (!manager) throw new AppAssertionProviderMissingError();
|
|
99
|
+
const snapshot = useSyncExternalStore(
|
|
100
|
+
manager.subscribe,
|
|
101
|
+
manager.getSnapshot,
|
|
102
|
+
manager.getSnapshot,
|
|
103
|
+
);
|
|
104
|
+
return {
|
|
105
|
+
...snapshot,
|
|
106
|
+
getAppAssertion: manager.getAppAssertion,
|
|
107
|
+
getAppAssertionHeaders: manager.getAppAssertionHeaders,
|
|
108
|
+
};
|
|
109
|
+
}
|