@nascentdigital/funnel-apps 4.4.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/react/app/domain/AppService.d.ts +19 -0
- package/dist/react/app/domain/AppService.js +19 -0
- package/dist/react/app/domain/AppServiceClient.d.ts +7 -0
- package/dist/react/app/domain/AppServiceClient.js +57 -0
- package/dist/react/app/domain/AppState.d.ts +1 -0
- package/dist/react/app/domain/AppState.js +2 -0
- package/dist/react/app/domain/index.d.ts +3 -0
- package/dist/react/app/domain/index.js +19 -0
- package/dist/react/app/server/AbstractAppService.d.ts +17 -0
- package/dist/react/app/server/AbstractAppService.js +24 -0
- package/dist/react/app/server/AppServices.d.ts +11 -0
- package/dist/react/app/server/AppServices.js +92 -0
- package/dist/react/app/server/index.d.ts +4 -0
- package/dist/react/app/server/index.js +20 -0
- package/dist/react/app/web/App.d.ts +38 -0
- package/dist/react/app/web/App.js +116 -0
- package/dist/react/app/web/AppContainer.d.ts +16 -0
- package/dist/react/app/web/AppContainer.js +109 -0
- package/dist/react/app/web/AppContext.d.ts +7 -0
- package/dist/react/app/web/AppContext.js +6 -0
- package/dist/react/app/web/AppLayout.d.ts +7 -0
- package/dist/react/app/web/AppLayout.js +34 -0
- package/dist/react/app/web/AppPage.d.ts +13 -0
- package/dist/react/app/web/AppPage.js +30 -0
- package/dist/react/app/web/AppRoot.d.ts +7 -0
- package/dist/react/app/web/AppRoot.js +43 -0
- package/dist/react/app/web/index.d.ts +5 -0
- package/dist/react/app/web/index.js +21 -0
- package/dist/react/app/web/useApp.d.ts +2 -0
- package/dist/react/app/web/useApp.js +33 -0
- package/dist/react/auth0/server/Auth0IdentityService.d.ts +25 -0
- package/dist/react/auth0/server/Auth0IdentityService.js +84 -0
- package/dist/react/auth0/server/Auth0Profile.d.ts +19 -0
- package/dist/react/auth0/server/Auth0Profile.js +108 -0
- package/dist/react/auth0/server/Auth0ProfileFactory.d.ts +15 -0
- package/dist/react/auth0/server/Auth0ProfileFactory.js +51 -0
- package/dist/react/auth0/server/Auth0ProfileManagementService.d.ts +17 -0
- package/dist/react/auth0/server/Auth0ProfileManagementService.js +127 -0
- package/dist/react/auth0/server/Auth0ProfileServices.d.ts +13 -0
- package/dist/react/auth0/server/Auth0ProfileServices.js +19 -0
- package/dist/react/auth0/server/Auth0ProfileStore.d.ts +17 -0
- package/dist/react/auth0/server/Auth0ProfileStore.js +83 -0
- package/dist/react/auth0/server/Auth0ProfileUserService.d.ts +16 -0
- package/dist/react/auth0/server/Auth0ProfileUserService.js +48 -0
- package/dist/react/auth0/server/index.d.ts +4 -0
- package/dist/react/auth0/server/index.js +20 -0
- package/dist/react/auth0/web/Auth0IdentityClient.d.ts +34 -0
- package/dist/react/auth0/web/Auth0IdentityClient.js +200 -0
- package/dist/react/auth0/web/Auth0IdentityClientProvider.d.ts +35 -0
- package/dist/react/auth0/web/Auth0IdentityClientProvider.js +67 -0
- package/dist/react/auth0/web/index.d.ts +1 -0
- package/dist/react/auth0/web/index.js +17 -0
- package/dist/react/bridge/core/BridgeConnection.d.ts +6 -0
- package/dist/react/bridge/core/BridgeConnection.js +2 -0
- package/dist/react/bridge/core/BridgeConstants.d.ts +7 -0
- package/dist/react/bridge/core/BridgeConstants.js +15 -0
- package/dist/react/bridge/core/BridgeEvent.d.ts +52 -0
- package/dist/react/bridge/core/BridgeEvent.js +28 -0
- package/dist/react/bridge/core/BridgeMethod.d.ts +12 -0
- package/dist/react/bridge/core/BridgeMethod.js +2 -0
- package/dist/react/bridge/core/BridgeMethodCall.d.ts +23 -0
- package/dist/react/bridge/core/BridgeMethodCall.js +37 -0
- package/dist/react/bridge/core/BridgeMethods.d.ts +35 -0
- package/dist/react/bridge/core/BridgeMethods.js +2 -0
- package/dist/react/bridge/core/BridgeState.d.ts +24 -0
- package/dist/react/bridge/core/BridgeState.js +2 -0
- package/dist/react/bridge/core/index.d.ts +7 -0
- package/dist/react/bridge/core/index.js +23 -0
- package/dist/react/bridge/web/Bridge.d.ts +32 -0
- package/dist/react/bridge/web/Bridge.js +183 -0
- package/dist/react/bridge/web/BridgeContext.d.ts +8 -0
- package/dist/react/bridge/web/BridgeContext.js +6 -0
- package/dist/react/bridge/web/BridgeGlobals.d.ts +12 -0
- package/dist/react/bridge/web/BridgeGlobals.js +2 -0
- package/dist/react/bridge/web/BridgeProvider.d.ts +7 -0
- package/dist/react/bridge/web/BridgeProvider.js +36 -0
- package/dist/react/bridge/web/index.d.ts +6 -0
- package/dist/react/bridge/web/index.js +22 -0
- package/dist/react/bridge/web/useBridge.d.ts +3 -0
- package/dist/react/bridge/web/useBridge.js +39 -0
- package/dist/react/bridge/web/useBridgeState.d.ts +2 -0
- package/dist/react/bridge/web/useBridgeState.js +43 -0
- package/dist/react/bridge/web/useSafeArea.d.ts +1 -0
- package/dist/react/bridge/web/useSafeArea.js +11 -0
- package/dist/react/content/core/AppContentClient.d.ts +14 -0
- package/dist/react/content/core/AppContentClient.js +51 -0
- package/dist/react/content/core/ContentClientContext.d.ts +7 -0
- package/dist/react/content/core/ContentClientContext.js +6 -0
- package/dist/react/content/core/index.d.ts +1 -0
- package/dist/react/content/core/index.js +17 -0
- package/dist/react/content/domain/ContentAppRequest.d.ts +20 -0
- package/dist/react/content/domain/ContentAppRequest.js +11 -0
- package/dist/react/content/domain/index.d.ts +1 -0
- package/dist/react/content/domain/index.js +17 -0
- package/dist/react/content/server/ContentAppService.d.ts +11 -0
- package/dist/react/content/server/ContentAppService.js +34 -0
- package/dist/react/content/server/index.d.ts +1 -0
- package/dist/react/content/server/index.js +17 -0
- package/dist/react/content/web/ContentProvider.d.ts +5 -0
- package/dist/react/content/web/ContentProvider.js +17 -0
- package/dist/react/content/web/index.d.ts +6 -0
- package/dist/react/content/web/index.js +22 -0
- package/dist/react/content/web/useCollection.d.ts +10 -0
- package/dist/react/content/web/useCollection.js +22 -0
- package/dist/react/content/web/useCollections.d.ts +10 -0
- package/dist/react/content/web/useCollections.js +32 -0
- package/dist/react/content/web/useContentClient.d.ts +1 -0
- package/dist/react/content/web/useContentClient.js +9 -0
- package/dist/react/cookies/web/CookieService.d.ts +25 -0
- package/dist/react/cookies/web/CookieService.js +45 -0
- package/dist/react/cookies/web/CookieServiceContext.d.ts +7 -0
- package/dist/react/cookies/web/CookieServiceContext.js +6 -0
- package/dist/react/cookies/web/CookieServiceProvider.d.ts +6 -0
- package/dist/react/cookies/web/CookieServiceProvider.js +16 -0
- package/dist/react/cookies/web/index.d.ts +3 -0
- package/dist/react/cookies/web/index.js +19 -0
- package/dist/react/cookies/web/useCookieService.d.ts +2 -0
- package/dist/react/cookies/web/useCookieService.js +29 -0
- package/dist/react/identity/core/AbstractIdentityClient.d.ts +22 -0
- package/dist/react/identity/core/AbstractIdentityClient.js +31 -0
- package/dist/react/identity/core/IdentityClient.d.ts +22 -0
- package/dist/react/identity/core/IdentityClient.js +13 -0
- package/dist/react/identity/core/IdentityClientContext.d.ts +7 -0
- package/dist/react/identity/core/IdentityClientContext.js +6 -0
- package/dist/react/identity/core/index.d.ts +6 -0
- package/dist/react/identity/core/index.js +22 -0
- package/dist/react/identity/core/useIdentity.d.ts +10 -0
- package/dist/react/identity/core/useIdentity.js +39 -0
- package/dist/react/identity/core/useIdentityClient.d.ts +2 -0
- package/dist/react/identity/core/useIdentityClient.js +17 -0
- package/dist/react/identity/domain/AnonymousIdentity.d.ts +15 -0
- package/dist/react/identity/domain/AnonymousIdentity.js +27 -0
- package/dist/react/identity/domain/AuthenticatedIdentity.d.ts +25 -0
- package/dist/react/identity/domain/AuthenticatedIdentity.js +32 -0
- package/dist/react/identity/domain/Identity.d.ts +6 -0
- package/dist/react/identity/domain/Identity.js +2 -0
- package/dist/react/identity/domain/IdentityAppRequest.d.ts +8 -0
- package/dist/react/identity/domain/IdentityAppRequest.js +10 -0
- package/dist/react/identity/domain/index.d.ts +4 -0
- package/dist/react/identity/domain/index.js +20 -0
- package/dist/react/identity/server/IdentityAppService.d.ts +9 -0
- package/dist/react/identity/server/IdentityAppService.js +32 -0
- package/dist/react/identity/server/IdentityService.d.ts +17 -0
- package/dist/react/identity/server/IdentityService.js +25 -0
- package/dist/react/identity/server/index.d.ts +4 -0
- package/dist/react/identity/server/index.js +20 -0
- package/dist/react/identity/web/WebIdentityClientProvider.d.ts +8 -0
- package/dist/react/identity/web/WebIdentityClientProvider.js +27 -0
- package/dist/react/identity/web/WebIdentityProvider.d.ts +5 -0
- package/dist/react/identity/web/WebIdentityProvider.js +21 -0
- package/dist/react/identity/web/bridge/AppBridgeIdentityClient.d.ts +14 -0
- package/dist/react/identity/web/bridge/AppBridgeIdentityClient.js +47 -0
- package/dist/react/identity/web/bridge/AppBridgeIdentityClientProvider.d.ts +2 -0
- package/dist/react/identity/web/bridge/AppBridgeIdentityClientProvider.js +28 -0
- package/dist/react/identity/web/bridge/index.d.ts +1 -0
- package/dist/react/identity/web/bridge/index.js +17 -0
- package/dist/react/identity/web/index.d.ts +3 -0
- package/dist/react/identity/web/index.js +19 -0
- package/dist/react/nav/core/SpecSourceContext.d.ts +7 -0
- package/dist/react/nav/core/SpecSourceContext.js +6 -0
- package/dist/react/nav/core/index.d.ts +2 -0
- package/dist/react/nav/core/index.js +18 -0
- package/dist/react/nav/core/useSpec.d.ts +3 -0
- package/dist/react/nav/core/useSpec.js +30 -0
- package/dist/react/nav/domain/Icon.d.ts +2 -0
- package/dist/react/nav/domain/Icon.js +2 -0
- package/dist/react/nav/domain/Modal.d.ts +25 -0
- package/dist/react/nav/domain/Modal.js +28 -0
- package/dist/react/nav/domain/Navigation.d.ts +13 -0
- package/dist/react/nav/domain/Navigation.js +2 -0
- package/dist/react/nav/domain/NavigationCommand.d.ts +14 -0
- package/dist/react/nav/domain/NavigationCommand.js +2 -0
- package/dist/react/nav/domain/Route.d.ts +12 -0
- package/dist/react/nav/domain/Route.js +2 -0
- package/dist/react/nav/domain/Routes.d.ts +6 -0
- package/dist/react/nav/domain/Routes.js +74 -0
- package/dist/react/nav/domain/Screen.d.ts +24 -0
- package/dist/react/nav/domain/Screen.js +28 -0
- package/dist/react/nav/domain/Skeleton.d.ts +26 -0
- package/dist/react/nav/domain/Skeleton.js +2 -0
- package/dist/react/nav/domain/Spec.d.ts +33 -0
- package/dist/react/nav/domain/Spec.js +124 -0
- package/dist/react/nav/domain/SpecSource.d.ts +21 -0
- package/dist/react/nav/domain/SpecSource.js +28 -0
- package/dist/react/nav/domain/Stack.d.ts +35 -0
- package/dist/react/nav/domain/Stack.js +44 -0
- package/dist/react/nav/domain/Tabs.d.ts +37 -0
- package/dist/react/nav/domain/Tabs.js +45 -0
- package/dist/react/nav/domain/icons/ImageIcon.d.ts +2 -0
- package/dist/react/nav/domain/icons/ImageIcon.js +7 -0
- package/dist/react/nav/domain/icons/LucideIcon.d.ts +2 -0
- package/dist/react/nav/domain/icons/LucideIcon.js +7 -0
- package/dist/react/nav/domain/icons/index.d.ts +2 -0
- package/dist/react/nav/domain/icons/index.js +18 -0
- package/dist/react/nav/domain/index.d.ts +14 -0
- package/dist/react/nav/domain/index.js +30 -0
- package/dist/react/nav/domain/sources/AbstractSpecSource.d.ts +23 -0
- package/dist/react/nav/domain/sources/AbstractSpecSource.js +64 -0
- package/dist/react/nav/domain/sources/StaticSpecSource.d.ts +9 -0
- package/dist/react/nav/domain/sources/StaticSpecSource.js +16 -0
- package/dist/react/nav/domain/sources/index.d.ts +2 -0
- package/dist/react/nav/domain/sources/index.js +18 -0
- package/dist/react/nav/server/SpecService.d.ts +9 -0
- package/dist/react/nav/server/SpecService.js +31 -0
- package/dist/react/nav/server/exports.d.ts +1 -0
- package/dist/react/nav/server/exports.js +17 -0
- package/dist/react/nav/server/index.d.ts +2 -0
- package/dist/react/nav/server/index.js +38 -0
- package/dist/react/nav/web/WebSpecProvider.d.ts +2 -0
- package/dist/react/nav/web/WebSpecProvider.js +41 -0
- package/dist/react/nav/web/index.d.ts +3 -0
- package/dist/react/nav/web/index.js +19 -0
- package/dist/react/nav/web/navigator/NativeNavigator.d.ts +13 -0
- package/dist/react/nav/web/navigator/NativeNavigator.js +47 -0
- package/dist/react/nav/web/navigator/Navigator.d.ts +7 -0
- package/dist/react/nav/web/navigator/Navigator.js +2 -0
- package/dist/react/nav/web/navigator/NavigatorContext.d.ts +7 -0
- package/dist/react/nav/web/navigator/NavigatorContext.js +6 -0
- package/dist/react/nav/web/navigator/WebNavigator.d.ts +13 -0
- package/dist/react/nav/web/navigator/WebNavigator.js +38 -0
- package/dist/react/nav/web/navigator/index.d.ts +5 -0
- package/dist/react/nav/web/navigator/index.js +21 -0
- package/dist/react/nav/web/navigator/useNavigator.d.ts +1 -0
- package/dist/react/nav/web/navigator/useNavigator.js +17 -0
- package/dist/react/nav.d.ts +1 -0
- package/dist/react/nav.js +37 -0
- package/dist/react/profile/core/AbstractProfileClient.d.ts +18 -0
- package/dist/react/profile/core/AbstractProfileClient.js +31 -0
- package/dist/react/profile/core/ProfileClient.d.ts +21 -0
- package/dist/react/profile/core/ProfileClient.js +2 -0
- package/dist/react/profile/core/ProfileClientContext.d.ts +7 -0
- package/dist/react/profile/core/ProfileClientContext.js +6 -0
- package/dist/react/profile/core/index.d.ts +6 -0
- package/dist/react/profile/core/index.js +22 -0
- package/dist/react/profile/core/useProfile.d.ts +9 -0
- package/dist/react/profile/core/useProfile.js +47 -0
- package/dist/react/profile/core/useProfileClient.d.ts +2 -0
- package/dist/react/profile/core/useProfileClient.js +17 -0
- package/dist/react/profile/core/useProfileStore.d.ts +2 -0
- package/dist/react/profile/core/useProfileStore.js +28 -0
- package/dist/react/profile/domain/Profile.d.ts +80 -0
- package/dist/react/profile/domain/Profile.js +209 -0
- package/dist/react/profile/domain/ProfileAppRequest.d.ts +15 -0
- package/dist/react/profile/domain/ProfileAppRequest.js +12 -0
- package/dist/react/profile/domain/ProfileStore.d.ts +65 -0
- package/dist/react/profile/domain/ProfileStore.js +180 -0
- package/dist/react/profile/domain/index.d.ts +3 -0
- package/dist/react/profile/domain/index.js +19 -0
- package/dist/react/profile/server/ProfileAppService.d.ts +11 -0
- package/dist/react/profile/server/ProfileAppService.js +49 -0
- package/dist/react/profile/server/ProfileManagementService.d.ts +28 -0
- package/dist/react/profile/server/ProfileManagementService.js +3 -0
- package/dist/react/profile/server/ProfileServices.d.ts +22 -0
- package/dist/react/profile/server/ProfileServices.js +24 -0
- package/dist/react/profile/server/ProfileUserService.d.ts +5 -0
- package/dist/react/profile/server/ProfileUserService.js +2 -0
- package/dist/react/profile/server/index.d.ts +5 -0
- package/dist/react/profile/server/index.js +21 -0
- package/dist/react/profile/web/WebProfile.d.ts +11 -0
- package/dist/react/profile/web/WebProfile.js +37 -0
- package/dist/react/profile/web/WebProfileClient.d.ts +9 -0
- package/dist/react/profile/web/WebProfileClient.js +76 -0
- package/dist/react/profile/web/WebProfileProvider.d.ts +5 -0
- package/dist/react/profile/web/WebProfileProvider.js +62 -0
- package/dist/react/profile/web/WebProfileStore.d.ts +8 -0
- package/dist/react/profile/web/WebProfileStore.js +32 -0
- package/dist/react/profile/web/index.d.ts +3 -0
- package/dist/react/profile/web/index.js +19 -0
- package/dist/react/push/domain/PushAppRequest.d.ts +13 -0
- package/dist/react/push/domain/PushAppRequest.js +12 -0
- package/dist/react/push/domain/PushStore.d.ts +7 -0
- package/dist/react/push/domain/PushStore.js +9 -0
- package/dist/react/push/domain/index.d.ts +2 -0
- package/dist/react/push/domain/index.js +18 -0
- package/dist/react/push/server/PushService.d.ts +22 -0
- package/dist/react/push/server/PushService.js +57 -0
- package/dist/react/push/server/index.d.ts +3 -0
- package/dist/react/push/server/index.js +19 -0
- package/dist/react/push/server/keygen.d.ts +1 -0
- package/dist/react/push/server/keygen.js +8 -0
- package/dist/react/push/web/PushClient.d.ts +35 -0
- package/dist/react/push/web/PushClient.js +204 -0
- package/dist/react/push/web/PushContext.d.ts +7 -0
- package/dist/react/push/web/PushContext.js +6 -0
- package/dist/react/push/web/PushProvider.d.ts +6 -0
- package/dist/react/push/web/PushProvider.js +42 -0
- package/dist/react/push/web/index.d.ts +4 -0
- package/dist/react/push/web/index.js +20 -0
- package/dist/react/push/web/usePushClient.d.ts +3 -0
- package/dist/react/push/web/usePushClient.js +40 -0
- package/dist/react/server.d.ts +7 -0
- package/dist/react/server.js +23 -0
- package/dist/react/ui/web/HideSplash.d.ts +1 -0
- package/dist/react/ui/web/HideSplash.js +28 -0
- package/dist/react/ui/web/Link.d.ts +6 -0
- package/dist/react/ui/web/Link.js +12 -0
- package/dist/react/ui/web/SafeArea.d.ts +9 -0
- package/dist/react/ui/web/SafeArea.js +26 -0
- package/dist/react/ui/web/index.d.ts +3 -0
- package/dist/react/ui/web/index.js +19 -0
- package/dist/react/web.d.ts +10 -0
- package/dist/react/web.js +26 -0
- package/dist/reactnative/app/domain/AppService.d.ts +19 -0
- package/dist/reactnative/app/domain/AppService.js +19 -0
- package/dist/reactnative/app/domain/AppServiceClient.d.ts +7 -0
- package/dist/reactnative/app/domain/AppServiceClient.js +57 -0
- package/dist/reactnative/app/domain/AppState.d.ts +1 -0
- package/dist/reactnative/app/domain/AppState.js +2 -0
- package/dist/reactnative/app/domain/index.d.ts +3 -0
- package/dist/reactnative/app/domain/index.js +19 -0
- package/dist/reactnative/app/rn/AppContainer.d.ts +10 -0
- package/dist/reactnative/app/rn/AppContainer.js +77 -0
- package/dist/reactnative/app/rn/AppRoot.d.ts +5 -0
- package/dist/reactnative/app/rn/AppRoot.js +22 -0
- package/dist/reactnative/app/rn/AppServiceClient.d.ts +4 -0
- package/dist/reactnative/app/rn/AppServiceClient.js +44 -0
- package/dist/reactnative/app/rn/index.d.ts +5 -0
- package/dist/reactnative/app/rn/index.js +22 -0
- package/dist/reactnative/auth0/rn/Auth0IdentityClient.d.ts +33 -0
- package/dist/reactnative/auth0/rn/Auth0IdentityClient.js +234 -0
- package/dist/reactnative/auth0/rn/Auth0IdentityClientProvider.d.ts +27 -0
- package/dist/reactnative/auth0/rn/Auth0IdentityClientProvider.js +60 -0
- package/dist/reactnative/auth0/rn/index.d.ts +2 -0
- package/dist/reactnative/auth0/rn/index.js +18 -0
- package/dist/reactnative/bridge/core/BridgeConnection.d.ts +6 -0
- package/dist/reactnative/bridge/core/BridgeConnection.js +2 -0
- package/dist/reactnative/bridge/core/BridgeConstants.d.ts +7 -0
- package/dist/reactnative/bridge/core/BridgeConstants.js +15 -0
- package/dist/reactnative/bridge/core/BridgeEvent.d.ts +52 -0
- package/dist/reactnative/bridge/core/BridgeEvent.js +28 -0
- package/dist/reactnative/bridge/core/BridgeMethod.d.ts +12 -0
- package/dist/reactnative/bridge/core/BridgeMethod.js +2 -0
- package/dist/reactnative/bridge/core/BridgeMethodCall.d.ts +23 -0
- package/dist/reactnative/bridge/core/BridgeMethodCall.js +37 -0
- package/dist/reactnative/bridge/core/BridgeMethods.d.ts +35 -0
- package/dist/reactnative/bridge/core/BridgeMethods.js +2 -0
- package/dist/reactnative/bridge/core/BridgeState.d.ts +24 -0
- package/dist/reactnative/bridge/core/BridgeState.js +2 -0
- package/dist/reactnative/bridge/core/index.d.ts +7 -0
- package/dist/reactnative/bridge/core/index.js +23 -0
- package/dist/reactnative/bridge/rn/BridgeProxy.d.ts +35 -0
- package/dist/reactnative/bridge/rn/BridgeProxy.js +331 -0
- package/dist/reactnative/bridge/rn/BridgeProxyContext.d.ts +8 -0
- package/dist/reactnative/bridge/rn/BridgeProxyContext.js +6 -0
- package/dist/reactnative/bridge/rn/BridgeProxyProvider.d.ts +8 -0
- package/dist/reactnative/bridge/rn/BridgeProxyProvider.js +39 -0
- package/dist/reactnative/bridge/rn/BridgeWebview.d.ts +7 -0
- package/dist/reactnative/bridge/rn/BridgeWebview.js +51 -0
- package/dist/reactnative/bridge/rn/index.d.ts +7 -0
- package/dist/reactnative/bridge/rn/index.js +23 -0
- package/dist/reactnative/bridge/rn/useBridgeProxy.d.ts +3 -0
- package/dist/reactnative/bridge/rn/useBridgeProxy.js +38 -0
- package/dist/reactnative/bridge/rn/useBridgeProxyCalls.d.ts +3 -0
- package/dist/reactnative/bridge/rn/useBridgeProxyCalls.js +32 -0
- package/dist/reactnative/bridge/rn/useBridgeProxyState.d.ts +2 -0
- package/dist/reactnative/bridge/rn/useBridgeProxyState.js +46 -0
- package/dist/reactnative/identity/core/AbstractIdentityClient.d.ts +22 -0
- package/dist/reactnative/identity/core/AbstractIdentityClient.js +31 -0
- package/dist/reactnative/identity/core/IdentityClient.d.ts +22 -0
- package/dist/reactnative/identity/core/IdentityClient.js +13 -0
- package/dist/reactnative/identity/core/IdentityClientContext.d.ts +7 -0
- package/dist/reactnative/identity/core/IdentityClientContext.js +6 -0
- package/dist/reactnative/identity/core/index.d.ts +6 -0
- package/dist/reactnative/identity/core/index.js +22 -0
- package/dist/reactnative/identity/core/useIdentity.d.ts +10 -0
- package/dist/reactnative/identity/core/useIdentity.js +39 -0
- package/dist/reactnative/identity/core/useIdentityClient.d.ts +2 -0
- package/dist/reactnative/identity/core/useIdentityClient.js +17 -0
- package/dist/reactnative/identity/domain/AnonymousIdentity.d.ts +15 -0
- package/dist/reactnative/identity/domain/AnonymousIdentity.js +27 -0
- package/dist/reactnative/identity/domain/AuthenticatedIdentity.d.ts +25 -0
- package/dist/reactnative/identity/domain/AuthenticatedIdentity.js +32 -0
- package/dist/reactnative/identity/domain/Identity.d.ts +6 -0
- package/dist/reactnative/identity/domain/Identity.js +2 -0
- package/dist/reactnative/identity/domain/IdentityAppRequest.d.ts +8 -0
- package/dist/reactnative/identity/domain/IdentityAppRequest.js +10 -0
- package/dist/reactnative/identity/domain/index.d.ts +4 -0
- package/dist/reactnative/identity/domain/index.js +20 -0
- package/dist/reactnative/identity/rn/RNIdentityClientProvider.d.ts +8 -0
- package/dist/reactnative/identity/rn/RNIdentityClientProvider.js +22 -0
- package/dist/reactnative/identity/rn/RNIdentityProvider.d.ts +5 -0
- package/dist/reactnative/identity/rn/RNIdentityProvider.js +14 -0
- package/dist/reactnative/identity/rn/index.d.ts +3 -0
- package/dist/reactnative/identity/rn/index.js +19 -0
- package/dist/reactnative/nav/core/SpecSourceContext.d.ts +7 -0
- package/dist/reactnative/nav/core/SpecSourceContext.js +6 -0
- package/dist/reactnative/nav/core/index.d.ts +2 -0
- package/dist/reactnative/nav/core/index.js +18 -0
- package/dist/reactnative/nav/core/useSpec.d.ts +3 -0
- package/dist/reactnative/nav/core/useSpec.js +30 -0
- package/dist/reactnative/nav/domain/Icon.d.ts +2 -0
- package/dist/reactnative/nav/domain/Icon.js +2 -0
- package/dist/reactnative/nav/domain/Modal.d.ts +25 -0
- package/dist/reactnative/nav/domain/Modal.js +28 -0
- package/dist/reactnative/nav/domain/Navigation.d.ts +13 -0
- package/dist/reactnative/nav/domain/Navigation.js +2 -0
- package/dist/reactnative/nav/domain/NavigationCommand.d.ts +14 -0
- package/dist/reactnative/nav/domain/NavigationCommand.js +2 -0
- package/dist/reactnative/nav/domain/Route.d.ts +12 -0
- package/dist/reactnative/nav/domain/Route.js +2 -0
- package/dist/reactnative/nav/domain/Routes.d.ts +6 -0
- package/dist/reactnative/nav/domain/Routes.js +74 -0
- package/dist/reactnative/nav/domain/Screen.d.ts +24 -0
- package/dist/reactnative/nav/domain/Screen.js +28 -0
- package/dist/reactnative/nav/domain/Skeleton.d.ts +26 -0
- package/dist/reactnative/nav/domain/Skeleton.js +2 -0
- package/dist/reactnative/nav/domain/Spec.d.ts +33 -0
- package/dist/reactnative/nav/domain/Spec.js +124 -0
- package/dist/reactnative/nav/domain/SpecSource.d.ts +21 -0
- package/dist/reactnative/nav/domain/SpecSource.js +28 -0
- package/dist/reactnative/nav/domain/Stack.d.ts +35 -0
- package/dist/reactnative/nav/domain/Stack.js +44 -0
- package/dist/reactnative/nav/domain/Tabs.d.ts +37 -0
- package/dist/reactnative/nav/domain/Tabs.js +45 -0
- package/dist/reactnative/nav/domain/icons/ImageIcon.d.ts +2 -0
- package/dist/reactnative/nav/domain/icons/ImageIcon.js +7 -0
- package/dist/reactnative/nav/domain/icons/LucideIcon.d.ts +2 -0
- package/dist/reactnative/nav/domain/icons/LucideIcon.js +7 -0
- package/dist/reactnative/nav/domain/icons/index.d.ts +2 -0
- package/dist/reactnative/nav/domain/icons/index.js +18 -0
- package/dist/reactnative/nav/domain/index.d.ts +14 -0
- package/dist/reactnative/nav/domain/index.js +30 -0
- package/dist/reactnative/nav/domain/sources/AbstractSpecSource.d.ts +23 -0
- package/dist/reactnative/nav/domain/sources/AbstractSpecSource.js +64 -0
- package/dist/reactnative/nav/domain/sources/StaticSpecSource.d.ts +9 -0
- package/dist/reactnative/nav/domain/sources/StaticSpecSource.js +16 -0
- package/dist/reactnative/nav/domain/sources/index.d.ts +2 -0
- package/dist/reactnative/nav/domain/sources/index.js +18 -0
- package/dist/reactnative/nav/rn/NavigationEngine.d.ts +1 -0
- package/dist/reactnative/nav/rn/NavigationEngine.js +155 -0
- package/dist/reactnative/nav/rn/NavigationScreen.d.ts +9 -0
- package/dist/reactnative/nav/rn/NavigationScreen.js +215 -0
- package/dist/reactnative/nav/rn/RNSpecProvider.d.ts +2 -0
- package/dist/reactnative/nav/rn/RNSpecProvider.js +30 -0
- package/dist/reactnative/nav/rn/RNSpecSource.d.ts +5 -0
- package/dist/reactnative/nav/rn/RNSpecSource.js +30 -0
- package/dist/reactnative/nav/rn/index.d.ts +4 -0
- package/dist/reactnative/nav/rn/index.js +20 -0
- package/dist/reactnative/profile/domain/Profile.d.ts +80 -0
- package/dist/reactnative/profile/domain/Profile.js +209 -0
- package/dist/reactnative/profile/domain/ProfileAppRequest.d.ts +15 -0
- package/dist/reactnative/profile/domain/ProfileAppRequest.js +12 -0
- package/dist/reactnative/profile/domain/ProfileStore.d.ts +65 -0
- package/dist/reactnative/profile/domain/ProfileStore.js +180 -0
- package/dist/reactnative/profile/domain/index.d.ts +3 -0
- package/dist/reactnative/profile/domain/index.js +19 -0
- package/dist/reactnative/push/domain/PushAppRequest.d.ts +13 -0
- package/dist/reactnative/push/domain/PushAppRequest.js +12 -0
- package/dist/reactnative/push/domain/PushStore.d.ts +7 -0
- package/dist/reactnative/push/domain/PushStore.js +9 -0
- package/dist/reactnative/push/domain/index.d.ts +2 -0
- package/dist/reactnative/push/domain/index.js +18 -0
- package/dist/reactnative/push/rn/PushClient.d.ts +32 -0
- package/dist/reactnative/push/rn/PushClient.js +247 -0
- package/dist/reactnative/push/rn/PushContext.d.ts +7 -0
- package/dist/reactnative/push/rn/PushContext.js +6 -0
- package/dist/reactnative/push/rn/PushProvider.d.ts +2 -0
- package/dist/reactnative/push/rn/PushProvider.js +45 -0
- package/dist/reactnative/push/rn/index.d.ts +3 -0
- package/dist/reactnative/push/rn/index.js +19 -0
- package/dist/reactnative/push/rn/usePushClient.d.ts +3 -0
- package/dist/reactnative/push/rn/usePushClient.js +40 -0
- package/dist/reactnative/rn.d.ts +7 -0
- package/dist/reactnative/rn.js +23 -0
- package/dist/reactnative/ui/rn/Tailwind.d.ts +175 -0
- package/dist/reactnative/ui/rn/Tailwind.js +211 -0
- package/dist/reactnative/ui/rn/atomic/Button.d.ts +97 -0
- package/dist/reactnative/ui/rn/atomic/Button.js +75 -0
- package/dist/reactnative/ui/rn/atomic/TextField.d.ts +112 -0
- package/dist/reactnative/ui/rn/atomic/TextField.js +135 -0
- package/dist/reactnative/ui/rn/atomic/index.d.ts +2 -0
- package/dist/reactnative/ui/rn/atomic/index.js +18 -0
- package/dist/reactnative/ui/rn/index.d.ts +1 -0
- package/dist/reactnative/ui/rn/index.js +17 -0
- package/dist/styles/rn/_index.css +2 -0
- package/dist/styles/rn/atomic/Button.css +54 -0
- package/dist/styles/rn/atomic/TextField.css +77 -0
- package/dist/styles/rn/atomic/_index.css +2 -0
- package/dist/styles/rn/base/_index.css +1 -0
- package/dist/styles/rn/base/tailwind.css +3 -0
- package/dist/styles/rn.css +1 -0
- package/dist/styles/web/_index.css +1 -0
- package/dist/styles/web/layout/SafeArea.css +17 -0
- package/dist/styles/web/layout/_index.css +1 -0
- package/dist/styles/web.css +1 -0
- package/package.json +87 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Transform } from '@nascentdigital/funnel-core';
|
|
2
|
+
import { GetServerSideProps, GetServerSidePropsContext } from 'next';
|
|
3
|
+
import { FunctionComponent, PropsWithChildren } from 'react';
|
|
4
|
+
import { JsonObject } from 'type-fest';
|
|
5
|
+
export declare namespace AppPage {
|
|
6
|
+
type RenderProps<TData extends JsonObject = {}> = PropsWithChildren & {
|
|
7
|
+
data: TData;
|
|
8
|
+
};
|
|
9
|
+
function authenticated<TData extends JsonObject = {}>(Page: FunctionComponent<RenderProps<TData>>, fetchData?: Transform<GetServerSidePropsContext, TData> | Transform.Async<GetServerSidePropsContext, TData>): {
|
|
10
|
+
Component: (props: RenderProps<TData>) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
getServerSideProps: GetServerSideProps<RenderProps<TData>>;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AppPage = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
// namespace
|
|
6
|
+
var AppPage;
|
|
7
|
+
(function (AppPage) {
|
|
8
|
+
// authenticate page
|
|
9
|
+
function authenticated(Page, fetchData) {
|
|
10
|
+
// component
|
|
11
|
+
const Component = (props) => {
|
|
12
|
+
// render
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)(Page, Object.assign({}, props)));
|
|
14
|
+
};
|
|
15
|
+
// data fetching
|
|
16
|
+
const getServerSideProps = async (context) => {
|
|
17
|
+
// access the user session if needed
|
|
18
|
+
const data = fetchData
|
|
19
|
+
? await fetchData(context)
|
|
20
|
+
: {};
|
|
21
|
+
// return props
|
|
22
|
+
return {
|
|
23
|
+
props: { data }
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
// return props
|
|
27
|
+
return { Component, getServerSideProps };
|
|
28
|
+
}
|
|
29
|
+
AppPage.authenticated = authenticated;
|
|
30
|
+
})(AppPage || (exports.AppPage = AppPage = {}));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AppProps } from 'next/app';
|
|
2
|
+
import { BridgeState } from '../../bridge/core';
|
|
3
|
+
import { AppLayout } from './AppLayout';
|
|
4
|
+
export declare namespace AppRoot {
|
|
5
|
+
type CreateProps<TCustom extends BridgeState.Custom = BridgeState.Custom> = Omit<AppLayout.Props<TCustom>, 'children'>;
|
|
6
|
+
function create({ SplashScreen, LoginScreen, ErrorScreen, ...bridgeProps }: CreateProps): <TState extends BridgeState = BridgeState>({ Component, pageProps }: AppProps<TState>) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.AppRoot = void 0;
|
|
15
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
+
const react_1 = require("motion/react");
|
|
17
|
+
const router_1 = require("next/router");
|
|
18
|
+
const AppLayout_1 = require("./AppLayout");
|
|
19
|
+
// namespace
|
|
20
|
+
var AppRoot;
|
|
21
|
+
(function (AppRoot) {
|
|
22
|
+
function create(_a) {
|
|
23
|
+
var { SplashScreen, LoginScreen, ErrorScreen } = _a, bridgeProps = __rest(_a, ["SplashScreen", "LoginScreen", "ErrorScreen"]);
|
|
24
|
+
// create component
|
|
25
|
+
return function ({ Component, pageProps }) {
|
|
26
|
+
// bind hooks
|
|
27
|
+
const router = (0, router_1.useRouter)();
|
|
28
|
+
// render editor layout
|
|
29
|
+
if (router.pathname === '/editor/[[...path]]') {
|
|
30
|
+
return ((0, jsx_runtime_1.jsx)(Component, Object.assign({}, pageProps)));
|
|
31
|
+
}
|
|
32
|
+
// or app layout
|
|
33
|
+
else {
|
|
34
|
+
return ((0, jsx_runtime_1.jsx)(AppLayout_1.AppLayout, Object.assign({ SplashScreen: SplashScreen, LoginScreen: LoginScreen, ErrorScreen: ErrorScreen }, bridgeProps, { children: (0, jsx_runtime_1.jsx)("div", { className: "max-w-dvw min-h-dvh overflow-x-hidden select-none", children: (0, jsx_runtime_1.jsx)(react_1.AnimatePresence, { mode: "wait", children: (0, jsx_runtime_1.jsx)(react_1.motion.div, { className: "will-change-[opacity,filter]", initial: "initial", animate: "animate", exit: "exit", variants: {
|
|
35
|
+
initial: { opacity: 0, filter: 'blur(3px)' },
|
|
36
|
+
animate: { opacity: 1, filter: 'blur(0px)' },
|
|
37
|
+
exit: { opacity: 0, filter: 'blur(3px)' }
|
|
38
|
+
}, transition: { duration: 0.2 }, children: (0, jsx_runtime_1.jsx)(Component, Object.assign({}, pageProps)) }, router.pathname) }) }) })));
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
AppRoot.create = create;
|
|
43
|
+
})(AppRoot || (exports.AppRoot = AppRoot = {}));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("../domain"), exports);
|
|
18
|
+
__exportStar(require("./App"), exports);
|
|
19
|
+
__exportStar(require("./AppPage"), exports);
|
|
20
|
+
__exportStar(require("./AppRoot"), exports);
|
|
21
|
+
__exportStar(require("./useApp"), exports);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useApp = useApp;
|
|
4
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
5
|
+
const hooks_1 = require("@nascentdigital/funnel-ui/hooks");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const AppContext_1 = require("./AppContext");
|
|
8
|
+
// hook
|
|
9
|
+
function useApp(maybeApp) {
|
|
10
|
+
// bind memos + hooks
|
|
11
|
+
const context = (0, react_1.useContext)(AppContext_1.AppContext);
|
|
12
|
+
const app = maybeApp !== null && maybeApp !== void 0 ? maybeApp : context.app;
|
|
13
|
+
const touch = (0, hooks_1.useTouch)();
|
|
14
|
+
// bind worker
|
|
15
|
+
(0, react_1.useEffect)(() => {
|
|
16
|
+
// skip if there's no app
|
|
17
|
+
if (!app) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
// bind app
|
|
21
|
+
const subscriptions = [
|
|
22
|
+
app.state$.subscribe(() => touch())
|
|
23
|
+
];
|
|
24
|
+
// clear subscription on unmount
|
|
25
|
+
return () => subscriptions.forEach(subscription => subscription.unsubscribe());
|
|
26
|
+
}, [app, touch]);
|
|
27
|
+
// blow up if there's no app
|
|
28
|
+
if (!app) {
|
|
29
|
+
throw new funnel_core_1.InvalidOperationError('Cannot access useApp() outside of AppContainer scope');
|
|
30
|
+
}
|
|
31
|
+
// return app
|
|
32
|
+
return app;
|
|
33
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { NextRequest } from 'next/server';
|
|
2
|
+
import { AuthenticatedIdentity, Identity, IdentityService } from '../../identity/server';
|
|
3
|
+
export declare class Auth0IdentityService implements IdentityService {
|
|
4
|
+
private readonly _domain;
|
|
5
|
+
private readonly _audience;
|
|
6
|
+
private readonly _issuer;
|
|
7
|
+
private readonly _managementClient;
|
|
8
|
+
constructor(args: Auth0IdentityService.ConstructorArgs);
|
|
9
|
+
current(request: NextRequest): Promise<Identity>;
|
|
10
|
+
deleteIdentity(identity: AuthenticatedIdentity): Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* Verify request using the "Authorization" header
|
|
13
|
+
* @param request The request to verify
|
|
14
|
+
* @throws NotAuthenticatedError Missing header or request could not be authorized
|
|
15
|
+
*/
|
|
16
|
+
private verifyRequest;
|
|
17
|
+
}
|
|
18
|
+
export declare namespace Auth0IdentityService {
|
|
19
|
+
type ConstructorArgs = {
|
|
20
|
+
domain: string;
|
|
21
|
+
audience: string;
|
|
22
|
+
clientId: string;
|
|
23
|
+
clientSecret: string;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Auth0IdentityService = void 0;
|
|
4
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
5
|
+
const auth0_1 = require("auth0");
|
|
6
|
+
const jose_1 = require("jose");
|
|
7
|
+
const server_1 = require("../../identity/server");
|
|
8
|
+
// service
|
|
9
|
+
class Auth0IdentityService {
|
|
10
|
+
constructor(args) {
|
|
11
|
+
this._domain = args.domain;
|
|
12
|
+
this._audience = args.audience;
|
|
13
|
+
this._issuer = `https://${this._domain}/`;
|
|
14
|
+
this._managementClient = new auth0_1.ManagementClient({
|
|
15
|
+
domain: args.domain,
|
|
16
|
+
clientId: args.clientId,
|
|
17
|
+
clientSecret: args.clientSecret
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
async current(request) {
|
|
21
|
+
// try to create identity
|
|
22
|
+
try {
|
|
23
|
+
// verify jtw from request
|
|
24
|
+
const payload = await this.verifyRequest(request);
|
|
25
|
+
// return anonymous identity (if no id)
|
|
26
|
+
if (!payload.sub) {
|
|
27
|
+
console.warn('[Auth0IdentityService] JWT has no id (sub), returning anonymous identity');
|
|
28
|
+
return new server_1.AnonymousIdentity({ id: '' });
|
|
29
|
+
}
|
|
30
|
+
// return authenticated identity
|
|
31
|
+
return new server_1.AuthenticatedIdentity({
|
|
32
|
+
id: payload.sub,
|
|
33
|
+
verified: false
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
// handle error
|
|
37
|
+
catch (e) {
|
|
38
|
+
console.error('[Auth0IdentityService] Failed to get identity from jwt token', e);
|
|
39
|
+
// rethrow if isometric already
|
|
40
|
+
if (e instanceof funnel_core_1.IsometricError) {
|
|
41
|
+
throw e;
|
|
42
|
+
}
|
|
43
|
+
// otherwise throw server error
|
|
44
|
+
else {
|
|
45
|
+
throw new funnel_core_1.ServerError('Error authenticating request');
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
async deleteIdentity(identity) {
|
|
50
|
+
await this._managementClient.users.delete(identity.id);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Verify request using the "Authorization" header
|
|
54
|
+
* @param request The request to verify
|
|
55
|
+
* @throws NotAuthenticatedError Missing header or request could not be authorized
|
|
56
|
+
*/
|
|
57
|
+
async verifyRequest(request) {
|
|
58
|
+
// get authorization header
|
|
59
|
+
const authHeader = request.headers.get('Authorization');
|
|
60
|
+
if (!authHeader) {
|
|
61
|
+
throw new funnel_core_1.NotAuthenticatedError('Missing authorization header');
|
|
62
|
+
}
|
|
63
|
+
// get token from authorization header (Bearer <token>)
|
|
64
|
+
const token = authHeader.split(' ')[1];
|
|
65
|
+
// remote key set
|
|
66
|
+
const jwkSet = (0, jose_1.createRemoteJWKSet)(new URL(`${this._issuer}.well-known/jwks.json`));
|
|
67
|
+
// try to verify the token
|
|
68
|
+
try {
|
|
69
|
+
// verify token
|
|
70
|
+
const result = await (0, jose_1.jwtVerify)(token, jwkSet, {
|
|
71
|
+
issuer: this._issuer,
|
|
72
|
+
audience: this._audience,
|
|
73
|
+
});
|
|
74
|
+
// return jwt payload
|
|
75
|
+
return result.payload;
|
|
76
|
+
}
|
|
77
|
+
// handle error
|
|
78
|
+
catch (e) {
|
|
79
|
+
console.error('[Auth0IdentityService] token verify failed', e);
|
|
80
|
+
throw new funnel_core_1.NotAuthenticatedError('Invalid token');
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.Auth0IdentityService = Auth0IdentityService;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Management, ManagementClient } from 'auth0';
|
|
2
|
+
import { StringKeyOf } from 'type-fest';
|
|
3
|
+
import { Profile } from '../../profile/domain';
|
|
4
|
+
import { Auth0ProfileStore } from './Auth0ProfileStore';
|
|
5
|
+
export declare class Auth0Profile<TStores extends Profile.Stores = Profile.Stores> extends Profile<TStores> {
|
|
6
|
+
private readonly _managementClient;
|
|
7
|
+
private readonly _internalStoreKeyPrefix?;
|
|
8
|
+
constructor({ managementClient, internalStoreKeyPrefix, ...args }: Auth0Profile.ConstructorArgs<TStores>);
|
|
9
|
+
protected createStore(id: StringKeyOf<TStores>): Auth0ProfileStore;
|
|
10
|
+
save(): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
export declare namespace Auth0Profile {
|
|
13
|
+
type ConstructorArgs<TStores extends Profile.Stores> = Omit<Profile.ConstructorArgs<TStores>, '__editableProps'> & {
|
|
14
|
+
managementClient: ManagementClient;
|
|
15
|
+
internalStoreKeyPrefix?: string;
|
|
16
|
+
};
|
|
17
|
+
const KeyMapping: Record<Profile.Data.WritableProps, string>;
|
|
18
|
+
function toProfileData(data: Management.UserResponseSchema): Profile.Data.Core;
|
|
19
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.Auth0Profile = void 0;
|
|
15
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
16
|
+
const domain_1 = require("../../profile/domain");
|
|
17
|
+
const Auth0ProfileStore_1 = require("./Auth0ProfileStore");
|
|
18
|
+
// class
|
|
19
|
+
class Auth0Profile extends domain_1.Profile {
|
|
20
|
+
constructor(_a) {
|
|
21
|
+
var { managementClient, internalStoreKeyPrefix } = _a, args = __rest(_a, ["managementClient", "internalStoreKeyPrefix"]);
|
|
22
|
+
// construct base
|
|
23
|
+
super(Object.assign(Object.assign({}, args), { __editableProps: [
|
|
24
|
+
'email',
|
|
25
|
+
'nickname',
|
|
26
|
+
'name',
|
|
27
|
+
'firstName',
|
|
28
|
+
'lastName',
|
|
29
|
+
'picture'
|
|
30
|
+
] }));
|
|
31
|
+
// initialize instance variables
|
|
32
|
+
this._managementClient = managementClient;
|
|
33
|
+
this._internalStoreKeyPrefix = internalStoreKeyPrefix;
|
|
34
|
+
}
|
|
35
|
+
createStore(id) {
|
|
36
|
+
const { _eventBus, identity, _managementClient, _internalStoreKeyPrefix } = this;
|
|
37
|
+
return new Auth0ProfileStore_1.Auth0ProfileStore({
|
|
38
|
+
internalKeyPrefix: _internalStoreKeyPrefix,
|
|
39
|
+
eventBus: _eventBus,
|
|
40
|
+
identity,
|
|
41
|
+
managementClient: _managementClient,
|
|
42
|
+
data: {
|
|
43
|
+
id,
|
|
44
|
+
profileId: identity.id
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
async save() {
|
|
49
|
+
// bail if there is nothing to save
|
|
50
|
+
if (this._edits.size === 0 && this._deletes.size === 0) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
// transform edits
|
|
54
|
+
const edits = this._edits.entries()
|
|
55
|
+
.reduce((obj, [key, value]) => {
|
|
56
|
+
obj[Auth0Profile.KeyMapping[key]] = value;
|
|
57
|
+
return obj;
|
|
58
|
+
}, {});
|
|
59
|
+
// transform deletes
|
|
60
|
+
const deletes = Array.from(this._deletes)
|
|
61
|
+
.reduce((obj, id) => {
|
|
62
|
+
obj[Auth0Profile.KeyMapping[id]] = null;
|
|
63
|
+
return obj;
|
|
64
|
+
}, {});
|
|
65
|
+
// try to save
|
|
66
|
+
try {
|
|
67
|
+
// execute update request
|
|
68
|
+
const updatedData = await this._managementClient.users.update(this.id, Object.assign(Object.assign({}, edits), deletes));
|
|
69
|
+
// update data
|
|
70
|
+
this._data = Auth0Profile.toProfileData(updatedData);
|
|
71
|
+
// TODO: update stores too?
|
|
72
|
+
// clear changes
|
|
73
|
+
this._edits.clear();
|
|
74
|
+
this._deletes.clear();
|
|
75
|
+
// raise event
|
|
76
|
+
this.raiseEvent('saved');
|
|
77
|
+
}
|
|
78
|
+
// handle error
|
|
79
|
+
catch (e) {
|
|
80
|
+
console.error(`Error saving profile "${this.id}"`, e);
|
|
81
|
+
throw new funnel_core_1.ServerError(`Error saving profile "${this.id}"`);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
exports.Auth0Profile = Auth0Profile;
|
|
86
|
+
// extension
|
|
87
|
+
(function (Auth0Profile) {
|
|
88
|
+
// helpers
|
|
89
|
+
Auth0Profile.KeyMapping = {
|
|
90
|
+
email: 'email',
|
|
91
|
+
nickname: 'nickname',
|
|
92
|
+
name: 'name',
|
|
93
|
+
firstName: 'given_name',
|
|
94
|
+
lastName: 'family_name',
|
|
95
|
+
picture: 'picture',
|
|
96
|
+
};
|
|
97
|
+
function toProfileData(data) {
|
|
98
|
+
return {
|
|
99
|
+
email: data.email,
|
|
100
|
+
nickname: data.nickname,
|
|
101
|
+
name: data.name,
|
|
102
|
+
firstName: data.given_name,
|
|
103
|
+
lastName: data.family_name,
|
|
104
|
+
picture: data.picture,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
Auth0Profile.toProfileData = toProfileData;
|
|
108
|
+
})(Auth0Profile || (exports.Auth0Profile = Auth0Profile = {}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { EventBus } from '@nascentdigital/funnel-core';
|
|
2
|
+
import { Management, ManagementClient } from 'auth0';
|
|
3
|
+
import { Identity } from '../../identity/server';
|
|
4
|
+
import { Profile } from '../../profile/server';
|
|
5
|
+
import { Auth0Profile } from './Auth0Profile';
|
|
6
|
+
export declare namespace Auth0ProfileFactory {
|
|
7
|
+
function create(args: CreateArgs): Auth0Profile<Profile.Stores>;
|
|
8
|
+
type CreateArgs = {
|
|
9
|
+
data: Management.UserResponseSchema;
|
|
10
|
+
managementClient: ManagementClient;
|
|
11
|
+
identity?: Identity;
|
|
12
|
+
internalStoreKeyPrefix?: string;
|
|
13
|
+
eventBus?: EventBus;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Auth0ProfileFactory = void 0;
|
|
4
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
5
|
+
const server_1 = require("../../identity/server");
|
|
6
|
+
const Auth0Profile_1 = require("./Auth0Profile");
|
|
7
|
+
const Auth0ProfileStore_1 = require("./Auth0ProfileStore");
|
|
8
|
+
// factory
|
|
9
|
+
var Auth0ProfileFactory;
|
|
10
|
+
(function (Auth0ProfileFactory) {
|
|
11
|
+
function create(args) {
|
|
12
|
+
var _a, _b, _c, _d, _e, _f;
|
|
13
|
+
const { data, managementClient, internalStoreKeyPrefix } = args;
|
|
14
|
+
// create identity if needed
|
|
15
|
+
const identity = (_a = args.identity) !== null && _a !== void 0 ? _a : new server_1.AuthenticatedIdentity({
|
|
16
|
+
id: (_b = data.user_id) !== null && _b !== void 0 ? _b : '',
|
|
17
|
+
email: (_c = data.email) !== null && _c !== void 0 ? _c : '',
|
|
18
|
+
verified: data.email_verified || false,
|
|
19
|
+
nickname: data.nickname,
|
|
20
|
+
name: data.name || `${(_d = data.given_name) !== null && _d !== void 0 ? _d : ''} ${(_e = data.family_name) !== null && _e !== void 0 ? _e : ''}`.trim() || undefined
|
|
21
|
+
});
|
|
22
|
+
// create profile stores
|
|
23
|
+
const eventBus = (_f = args.eventBus) !== null && _f !== void 0 ? _f : new funnel_core_1.EventBus();
|
|
24
|
+
const stores = {};
|
|
25
|
+
if (data.app_metadata) {
|
|
26
|
+
Object.entries(data.app_metadata).forEach(([internalStoreKey, storeData]) => {
|
|
27
|
+
// convert to logical key
|
|
28
|
+
const externalKey = Auth0ProfileStore_1.Auth0ProfileStore.toExternalKey(internalStoreKey, internalStoreKeyPrefix);
|
|
29
|
+
// bail if data isn't an object
|
|
30
|
+
if (!funnel_core_1.Value.isObject(storeData)) {
|
|
31
|
+
throw new funnel_core_1.IllegalStateError(`Profile store "${externalKey}" data is not an object`);
|
|
32
|
+
}
|
|
33
|
+
// create store
|
|
34
|
+
stores[externalKey] = new Auth0ProfileStore_1.Auth0ProfileStore({
|
|
35
|
+
internalKeyPrefix: internalStoreKeyPrefix,
|
|
36
|
+
managementClient: managementClient,
|
|
37
|
+
eventBus,
|
|
38
|
+
identity,
|
|
39
|
+
data: Object.assign(Object.assign({}, storeData), { profileId: identity.id, id: externalKey })
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
// create profile
|
|
44
|
+
return new Auth0Profile_1.Auth0Profile(Object.assign(Object.assign({ managementClient,
|
|
45
|
+
internalStoreKeyPrefix,
|
|
46
|
+
eventBus,
|
|
47
|
+
identity,
|
|
48
|
+
stores }, Auth0Profile_1.Auth0Profile.toProfileData(data)), { id: identity.id }));
|
|
49
|
+
}
|
|
50
|
+
Auth0ProfileFactory.create = create;
|
|
51
|
+
})(Auth0ProfileFactory || (exports.Auth0ProfileFactory = Auth0ProfileFactory = {}));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ProfileManagementService } from '../../profile/server';
|
|
2
|
+
export declare class Auth0ProfileManagementService implements ProfileManagementService {
|
|
3
|
+
private readonly _managementClient;
|
|
4
|
+
private readonly _internalStoreKeyPrefix?;
|
|
5
|
+
constructor(args: Auth0ProfileManagementService.ConstructorArgs);
|
|
6
|
+
get(args: ProfileManagementService.Get.Args): Promise<ProfileManagementService.Get.Result>;
|
|
7
|
+
find(args?: ProfileManagementService.Find.Args): Promise<ProfileManagementService.Find.Result>;
|
|
8
|
+
private createProfile;
|
|
9
|
+
}
|
|
10
|
+
export declare namespace Auth0ProfileManagementService {
|
|
11
|
+
type ConstructorArgs = {
|
|
12
|
+
domain: string;
|
|
13
|
+
clientId: string;
|
|
14
|
+
clientSecret: string;
|
|
15
|
+
internalStoreKeyPrefix?: string;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.Auth0ProfileManagementService = void 0;
|
|
15
|
+
const auth0_1 = require("auth0");
|
|
16
|
+
const Auth0Profile_1 = require("./Auth0Profile");
|
|
17
|
+
const Auth0ProfileFactory_1 = require("./Auth0ProfileFactory");
|
|
18
|
+
// class
|
|
19
|
+
class Auth0ProfileManagementService {
|
|
20
|
+
constructor(args) {
|
|
21
|
+
this._managementClient = new auth0_1.ManagementClient({
|
|
22
|
+
domain: args.domain,
|
|
23
|
+
clientId: args.clientId,
|
|
24
|
+
clientSecret: args.clientSecret
|
|
25
|
+
});
|
|
26
|
+
this._internalStoreKeyPrefix = args.internalStoreKeyPrefix;
|
|
27
|
+
}
|
|
28
|
+
async get(args) {
|
|
29
|
+
// try to fetch data and create profile
|
|
30
|
+
try {
|
|
31
|
+
let data;
|
|
32
|
+
// get by id
|
|
33
|
+
if (args.id) {
|
|
34
|
+
data = await this._managementClient.users.get(args.id);
|
|
35
|
+
}
|
|
36
|
+
// get by email
|
|
37
|
+
else if (args.email) {
|
|
38
|
+
// find by email
|
|
39
|
+
const result = await this._managementClient.users.listUsersByEmail({ email: args.email.toLowerCase() });
|
|
40
|
+
// bail if no entry
|
|
41
|
+
if (result.length === 0) {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
// capture first result
|
|
45
|
+
data = result[0];
|
|
46
|
+
}
|
|
47
|
+
// otherwise bail if no arguments
|
|
48
|
+
else {
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
// create and return profile
|
|
52
|
+
return this.createProfile(data);
|
|
53
|
+
}
|
|
54
|
+
// handle error
|
|
55
|
+
catch (e) {
|
|
56
|
+
console.error('[Auth0ProfileManagementService] error getting profile', e);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
async find(args) {
|
|
60
|
+
// try to find profiles
|
|
61
|
+
try {
|
|
62
|
+
// build query string
|
|
63
|
+
const _a = args !== null && args !== void 0 ? args : {}, { pagination = { page: 1, pageSize: 2 } } = _a, query = __rest(_a, ["pagination"]);
|
|
64
|
+
const terms = Object.entries(query).map(([key, value]) => {
|
|
65
|
+
const auth0Key = Auth0Profile_1.Auth0Profile.KeyMapping[key];
|
|
66
|
+
return `${auth0Key}:"${value}"`;
|
|
67
|
+
});
|
|
68
|
+
const queryStr = terms.join(' AND ');
|
|
69
|
+
// find users
|
|
70
|
+
const result = await this._managementClient.users.list({
|
|
71
|
+
q: queryStr,
|
|
72
|
+
per_page: pagination.pageSize,
|
|
73
|
+
page: pagination.page - 1,
|
|
74
|
+
include_totals: true
|
|
75
|
+
});
|
|
76
|
+
// return iterator
|
|
77
|
+
return new Auth0Iterator(result, (data) => this.createProfile(data));
|
|
78
|
+
}
|
|
79
|
+
// handle error
|
|
80
|
+
catch (e) {
|
|
81
|
+
console.error('[Auth0ProfileManagementService] error finding profile', e);
|
|
82
|
+
throw e;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
createProfile(data) {
|
|
86
|
+
return Auth0ProfileFactory_1.Auth0ProfileFactory.create({
|
|
87
|
+
data,
|
|
88
|
+
managementClient: this._managementClient,
|
|
89
|
+
internalStoreKeyPrefix: this._internalStoreKeyPrefix
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.Auth0ProfileManagementService = Auth0ProfileManagementService;
|
|
94
|
+
// iterator
|
|
95
|
+
class Auth0Iterator {
|
|
96
|
+
constructor(_auth0Result, _factory) {
|
|
97
|
+
this._auth0Result = _auth0Result;
|
|
98
|
+
this._factory = _factory;
|
|
99
|
+
this.syncState();
|
|
100
|
+
}
|
|
101
|
+
get items() {
|
|
102
|
+
return this._items;
|
|
103
|
+
}
|
|
104
|
+
get page() {
|
|
105
|
+
return this._page;
|
|
106
|
+
}
|
|
107
|
+
get pageCount() {
|
|
108
|
+
return this._pageCount;
|
|
109
|
+
}
|
|
110
|
+
get totalItemCount() {
|
|
111
|
+
return this._totalItemCount;
|
|
112
|
+
}
|
|
113
|
+
get hasNextPage() {
|
|
114
|
+
return this._auth0Result.hasNextPage();
|
|
115
|
+
}
|
|
116
|
+
async nextPage() {
|
|
117
|
+
await this._auth0Result.getNextPage();
|
|
118
|
+
this.syncState();
|
|
119
|
+
}
|
|
120
|
+
syncState() {
|
|
121
|
+
const { total = 0, limit = 1, start = 0 } = this._auth0Result.response;
|
|
122
|
+
this._items = this._auth0Result.data.map(data => this._factory(data));
|
|
123
|
+
this._page = Math.ceil((start + 1) / limit);
|
|
124
|
+
this._pageCount = total === 0 ? 0 : Math.ceil(total / limit);
|
|
125
|
+
this._totalItemCount = total;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ProfileManagementService, ProfileServices, ProfileUserService } from '../../profile/server';
|
|
2
|
+
import { Auth0ProfileManagementService } from './Auth0ProfileManagementService';
|
|
3
|
+
import { Auth0ProfileUserService } from './Auth0ProfileUserService';
|
|
4
|
+
export declare class Auth0ProfileServices implements ProfileServices {
|
|
5
|
+
private readonly _userService;
|
|
6
|
+
private readonly _managementService;
|
|
7
|
+
constructor(args: Auth0ProfileServices.ConstructorArgs);
|
|
8
|
+
getManagementService(): ProfileManagementService;
|
|
9
|
+
getUserService(): ProfileUserService;
|
|
10
|
+
}
|
|
11
|
+
export declare namespace Auth0ProfileServices {
|
|
12
|
+
type ConstructorArgs = Auth0ProfileUserService.ConstructorArgs | Auth0ProfileManagementService.ConstructorArgs;
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Auth0ProfileServices = void 0;
|
|
4
|
+
const Auth0ProfileManagementService_1 = require("./Auth0ProfileManagementService");
|
|
5
|
+
const Auth0ProfileUserService_1 = require("./Auth0ProfileUserService");
|
|
6
|
+
// class
|
|
7
|
+
class Auth0ProfileServices {
|
|
8
|
+
constructor(args) {
|
|
9
|
+
this._userService = new Auth0ProfileUserService_1.Auth0ProfileUserService(args);
|
|
10
|
+
this._managementService = new Auth0ProfileManagementService_1.Auth0ProfileManagementService(args);
|
|
11
|
+
}
|
|
12
|
+
getManagementService() {
|
|
13
|
+
return this._managementService;
|
|
14
|
+
}
|
|
15
|
+
getUserService() {
|
|
16
|
+
return this._userService;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.Auth0ProfileServices = Auth0ProfileServices;
|