@bigbinary/neeto-commons-rn 1.8.5 → 2.0.3
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/README.md +64 -0
- package/eslint-config/index.js +84 -17
- package/eslint-config/rules/no-dangling-constants.js +1 -1
- package/lib/typescript/api/app_version.d.ts +10 -0
- package/lib/typescript/api/app_version.d.ts.map +1 -0
- package/lib/typescript/api/auth.d.ts +26 -0
- package/lib/typescript/api/auth.d.ts.map +1 -0
- package/lib/typescript/api/global_roles.d.ts +10 -0
- package/lib/typescript/api/global_roles.d.ts.map +1 -0
- package/lib/typescript/api/notifications.d.ts +38 -0
- package/lib/typescript/api/notifications.d.ts.map +1 -0
- package/lib/typescript/api/organization_roles.d.ts +11 -0
- package/lib/typescript/api/organization_roles.d.ts.map +1 -0
- package/lib/typescript/api/profile.d.ts +15 -0
- package/lib/typescript/api/profile.d.ts.map +1 -0
- package/lib/typescript/api/team_members.d.ts +34 -0
- package/lib/typescript/api/team_members.d.ts.map +1 -0
- package/lib/typescript/auth/index.d.ts +3 -0
- package/lib/typescript/auth/index.d.ts.map +1 -0
- package/lib/typescript/components/AppVersion.d.ts +2 -0
- package/lib/typescript/components/AppVersion.d.ts.map +1 -0
- package/lib/typescript/components/BottomSheet.d.ts +9 -0
- package/lib/typescript/components/BottomSheet.d.ts.map +1 -0
- package/lib/typescript/components/BottomSheetMenu.d.ts +7 -0
- package/lib/typescript/components/BottomSheetMenu.d.ts.map +1 -0
- package/lib/typescript/components/ConfirmSheet.d.ts +15 -0
- package/lib/typescript/components/ConfirmSheet.d.ts.map +1 -0
- package/lib/typescript/components/EmptyView.d.ts +19 -0
- package/lib/typescript/components/EmptyView.d.ts.map +1 -0
- package/lib/typescript/components/Header/BaseHeader.d.ts +7 -0
- package/lib/typescript/components/Header/BaseHeader.d.ts.map +1 -0
- package/lib/typescript/components/Header/ScreenHeader.d.ts +7 -0
- package/lib/typescript/components/Header/ScreenHeader.d.ts.map +1 -0
- package/lib/typescript/components/Header.d.ts +22 -0
- package/lib/typescript/components/Header.d.ts.map +1 -0
- package/lib/typescript/components/HyperlinkText.d.ts +17 -0
- package/lib/typescript/components/HyperlinkText.d.ts.map +1 -0
- package/lib/typescript/components/LineLoader.d.ts +13 -0
- package/lib/typescript/components/LineLoader.d.ts.map +1 -0
- package/lib/typescript/components/NotificationIcon.d.ts +6 -0
- package/lib/typescript/components/NotificationIcon.d.ts.map +1 -0
- package/lib/typescript/components/NotificationPreferenceList.d.ts +14 -0
- package/lib/typescript/components/NotificationPreferenceList.d.ts.map +1 -0
- package/lib/typescript/components/OfflineScreen.d.ts +7 -0
- package/lib/typescript/components/OfflineScreen.d.ts.map +1 -0
- package/lib/typescript/components/OrganizationItem.d.ts +8 -0
- package/lib/typescript/components/OrganizationItem.d.ts.map +1 -0
- package/lib/typescript/components/SocialButton.d.ts +11 -0
- package/lib/typescript/components/SocialButton.d.ts.map +1 -0
- package/lib/typescript/components/TextWithUrl.d.ts +7 -0
- package/lib/typescript/components/TextWithUrl.d.ts.map +1 -0
- package/lib/typescript/components/ToggleSwitch.d.ts +8 -0
- package/lib/typescript/components/ToggleSwitch.d.ts.map +1 -0
- package/lib/typescript/components/WorkspaceSwitcherPane.d.ts +9 -0
- package/lib/typescript/components/WorkspaceSwitcherPane.d.ts.map +1 -0
- package/lib/typescript/components/constants.d.ts +7 -0
- package/lib/typescript/components/constants.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +14 -0
- package/lib/typescript/components/index.d.ts.map +1 -0
- package/lib/typescript/config/axios/caseConversion.d.ts +4 -0
- package/lib/typescript/config/axios/caseConversion.d.ts.map +1 -0
- package/lib/typescript/config/axios/constants.d.ts +4 -0
- package/lib/typescript/config/axios/constants.d.ts.map +1 -0
- package/lib/typescript/config/axios/index.d.ts +13 -0
- package/lib/typescript/config/axios/index.d.ts.map +1 -0
- package/lib/typescript/config/axios/networkErrorHandler.d.ts +5 -0
- package/lib/typescript/config/axios/networkErrorHandler.d.ts.map +1 -0
- package/lib/typescript/config/axios/paramsSerializer.d.ts +3 -0
- package/lib/typescript/config/axios/paramsSerializer.d.ts.map +1 -0
- package/lib/typescript/config/axios/types.d.ts +10 -0
- package/lib/typescript/config/axios/types.d.ts.map +1 -0
- package/lib/typescript/config/bugsnag.d.ts +4 -0
- package/lib/typescript/config/bugsnag.d.ts.map +1 -0
- package/lib/typescript/config/dayjs.d.ts +23 -0
- package/lib/typescript/config/dayjs.d.ts.map +1 -0
- package/lib/typescript/config/googleSignin.d.ts +2 -0
- package/lib/typescript/config/googleSignin.d.ts.map +1 -0
- package/lib/typescript/config/index.d.ts +2 -0
- package/lib/typescript/config/index.d.ts.map +1 -0
- package/lib/typescript/config/validations.d.ts +2 -0
- package/lib/typescript/config/validations.d.ts.map +1 -0
- package/lib/typescript/constants/index.d.ts +8 -0
- package/lib/typescript/constants/index.d.ts.map +1 -0
- package/lib/typescript/contexts/index.d.ts +2 -0
- package/lib/typescript/contexts/index.d.ts.map +1 -0
- package/lib/typescript/contexts/localization.d.ts +26 -0
- package/lib/typescript/contexts/localization.d.ts.map +1 -0
- package/lib/typescript/helpers/asyncStore.d.ts +6 -0
- package/lib/typescript/helpers/asyncStore.d.ts.map +1 -0
- package/lib/typescript/helpers/index.d.ts +2 -0
- package/lib/typescript/helpers/index.d.ts.map +1 -0
- package/lib/typescript/helpers/keychain.d.ts +4 -0
- package/lib/typescript/helpers/keychain.d.ts.map +1 -0
- package/lib/typescript/helpers/notifications/apnsToken.d.ts +2 -0
- package/lib/typescript/helpers/notifications/apnsToken.d.ts.map +1 -0
- package/lib/typescript/helpers/notifications/constants.d.ts +5 -0
- package/lib/typescript/helpers/notifications/constants.d.ts.map +1 -0
- package/lib/typescript/helpers/notifications/getDeviceToken.d.ts +2 -0
- package/lib/typescript/helpers/notifications/getDeviceToken.d.ts.map +1 -0
- package/lib/typescript/helpers/notifications/index.d.ts +4 -0
- package/lib/typescript/helpers/notifications/index.d.ts.map +1 -0
- package/lib/typescript/helpers/notifications/registerBackgroundHandlers.d.ts +3 -0
- package/lib/typescript/helpers/notifications/registerBackgroundHandlers.d.ts.map +1 -0
- package/lib/typescript/helpers/notifications/types.d.ts +19 -0
- package/lib/typescript/helpers/notifications/types.d.ts.map +1 -0
- package/lib/typescript/helpers/notifications/usePushNotification.d.ts +7 -0
- package/lib/typescript/helpers/notifications/usePushNotification.d.ts.map +1 -0
- package/lib/typescript/helpers/scale.d.ts +2 -0
- package/lib/typescript/helpers/scale.d.ts.map +1 -0
- package/lib/typescript/helpers/utils.d.ts +5 -0
- package/lib/typescript/helpers/utils.d.ts.map +1 -0
- package/lib/typescript/hooks/index.d.ts +3 -0
- package/lib/typescript/hooks/index.d.ts.map +1 -0
- package/lib/typescript/hooks/query/queryKeys.d.ts +9 -0
- package/lib/typescript/hooks/query/queryKeys.d.ts.map +1 -0
- package/lib/typescript/hooks/query/useAppVersionApi.d.ts +2 -0
- package/lib/typescript/hooks/query/useAppVersionApi.d.ts.map +1 -0
- package/lib/typescript/hooks/query/useAuth.d.ts +27 -0
- package/lib/typescript/hooks/query/useAuth.d.ts.map +1 -0
- package/lib/typescript/hooks/query/useNotification.d.ts +19 -0
- package/lib/typescript/hooks/query/useNotification.d.ts.map +1 -0
- package/lib/typescript/hooks/query/useProfile.d.ts +9 -0
- package/lib/typescript/hooks/query/useProfile.d.ts.map +1 -0
- package/lib/typescript/hooks/query/useRolesApi.d.ts +4 -0
- package/lib/typescript/hooks/query/useRolesApi.d.ts.map +1 -0
- package/lib/typescript/hooks/query/useTeamMembersApi.d.ts +23 -0
- package/lib/typescript/hooks/query/useTeamMembersApi.d.ts.map +1 -0
- package/lib/typescript/hooks/useAppState.d.ts +2 -0
- package/lib/typescript/hooks/useAppState.d.ts.map +1 -0
- package/lib/typescript/hooks/usePushNotificationPermissions.d.ts +2 -0
- package/lib/typescript/hooks/usePushNotificationPermissions.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +9 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/initializers/index.d.ts +3 -0
- package/lib/typescript/initializers/index.d.ts.map +1 -0
- package/lib/typescript/initializers/logRocket.d.ts +2 -0
- package/lib/typescript/initializers/logRocket.d.ts.map +1 -0
- package/lib/typescript/localization/i18n.d.ts +4 -0
- package/lib/typescript/localization/i18n.d.ts.map +1 -0
- package/lib/typescript/localization/index.d.ts +7 -0
- package/lib/typescript/localization/index.d.ts.map +1 -0
- package/lib/typescript/navigation/navigationService.d.ts +14 -0
- package/lib/typescript/navigation/navigationService.d.ts.map +1 -0
- package/lib/typescript/navigation/screenNames.d.ts +10 -0
- package/lib/typescript/navigation/screenNames.d.ts.map +1 -0
- package/lib/typescript/navigation/stacks.d.ts +3 -0
- package/lib/typescript/navigation/stacks.d.ts.map +1 -0
- package/lib/typescript/navigation/types.d.ts +24 -0
- package/lib/typescript/navigation/types.d.ts.map +1 -0
- package/lib/typescript/providers/NeetoCommonsRNProvider.d.ts +14 -0
- package/lib/typescript/providers/NeetoCommonsRNProvider.d.ts.map +1 -0
- package/lib/typescript/providers/index.d.ts +2 -0
- package/lib/typescript/providers/index.d.ts.map +1 -0
- package/lib/typescript/screens/NotificationsScreen.d.ts +11 -0
- package/lib/typescript/screens/NotificationsScreen.d.ts.map +1 -0
- package/lib/typescript/screens/authentication/AuthOptions.d.ts +7 -0
- package/lib/typescript/screens/authentication/AuthOptions.d.ts.map +1 -0
- package/lib/typescript/screens/authentication/IncompleteOnboardingInfo.d.ts +4 -0
- package/lib/typescript/screens/authentication/IncompleteOnboardingInfo.d.ts.map +1 -0
- package/lib/typescript/screens/authentication/LoginScreen.d.ts +3 -0
- package/lib/typescript/screens/authentication/LoginScreen.d.ts.map +1 -0
- package/lib/typescript/screens/authentication/OTPVerificationScreen.d.ts +4 -0
- package/lib/typescript/screens/authentication/OTPVerificationScreen.d.ts.map +1 -0
- package/lib/typescript/screens/authentication/Organization.d.ts +11 -0
- package/lib/typescript/screens/authentication/Organization.d.ts.map +1 -0
- package/lib/typescript/screens/authentication/SubDomainScreen.d.ts +4 -0
- package/lib/typescript/screens/authentication/SubDomainScreen.d.ts.map +1 -0
- package/lib/typescript/screens/authentication/constants.d.ts +17 -0
- package/lib/typescript/screens/authentication/constants.d.ts.map +1 -0
- package/lib/typescript/screens/index.d.ts +11 -0
- package/lib/typescript/screens/index.d.ts.map +1 -0
- package/lib/typescript/screens/profile/ChatWidget.d.ts +3 -0
- package/lib/typescript/screens/profile/ChatWidget.d.ts.map +1 -0
- package/lib/typescript/screens/profile/ProfileScreen.d.ts +12 -0
- package/lib/typescript/screens/profile/ProfileScreen.d.ts.map +1 -0
- package/lib/typescript/screens/profile/UserData.d.ts +21 -0
- package/lib/typescript/screens/profile/UserData.d.ts.map +1 -0
- package/lib/typescript/screens/team_members/Add.d.ts +4 -0
- package/lib/typescript/screens/team_members/Add.d.ts.map +1 -0
- package/lib/typescript/screens/team_members/Card.d.ts +9 -0
- package/lib/typescript/screens/team_members/Card.d.ts.map +1 -0
- package/lib/typescript/screens/team_members/Checkbox.d.ts +11 -0
- package/lib/typescript/screens/team_members/Checkbox.d.ts.map +1 -0
- package/lib/typescript/screens/team_members/Edit.d.ts +5 -0
- package/lib/typescript/screens/team_members/Edit.d.ts.map +1 -0
- package/lib/typescript/screens/team_members/Email.d.ts +11 -0
- package/lib/typescript/screens/team_members/Email.d.ts.map +1 -0
- package/lib/typescript/screens/team_members/LoadingCard.d.ts +6 -0
- package/lib/typescript/screens/team_members/LoadingCard.d.ts.map +1 -0
- package/lib/typescript/screens/team_members/ProductSelect.d.ts +11 -0
- package/lib/typescript/screens/team_members/ProductSelect.d.ts.map +1 -0
- package/lib/typescript/screens/team_members/RolesRadioGroup.d.ts +14 -0
- package/lib/typescript/screens/team_members/RolesRadioGroup.d.ts.map +1 -0
- package/lib/typescript/screens/team_members/SaveButtons.d.ts +10 -0
- package/lib/typescript/screens/team_members/SaveButtons.d.ts.map +1 -0
- package/lib/typescript/screens/team_members/constants.d.ts +16 -0
- package/lib/typescript/screens/team_members/constants.d.ts.map +1 -0
- package/lib/typescript/screens/team_members/index.d.ts +16 -0
- package/lib/typescript/screens/team_members/index.d.ts.map +1 -0
- package/lib/typescript/screens/team_members/utils.d.ts +20 -0
- package/lib/typescript/screens/team_members/utils.d.ts.map +1 -0
- package/lib/typescript/slices/auth.d.ts +31 -0
- package/lib/typescript/slices/auth.d.ts.map +1 -0
- package/lib/typescript/slices/index.d.ts +6 -0
- package/lib/typescript/slices/index.d.ts.map +1 -0
- package/lib/typescript/store/hooks.d.ts +6 -0
- package/lib/typescript/store/hooks.d.ts.map +1 -0
- package/lib/typescript/store/index.d.ts +18 -0
- package/lib/typescript/store/index.d.ts.map +1 -0
- package/lib/typescript/store/utils.d.ts +8 -0
- package/lib/typescript/store/utils.d.ts.map +1 -0
- package/lib/typescript/utils/apiHelpers.d.ts +5 -0
- package/lib/typescript/utils/apiHelpers.d.ts.map +1 -0
- package/package.json +267 -70
- package/src/api/app_version.ts +24 -0
- package/src/api/auth.ts +68 -0
- package/src/api/global_roles.ts +15 -0
- package/src/api/notifications.ts +66 -0
- package/src/api/organization_roles.ts +17 -0
- package/src/api/profile.ts +17 -0
- package/src/api/team_members.ts +39 -0
- package/src/assets/images/apple-logo.svg +3 -0
- package/src/assets/images/google-logo.svg +6 -0
- package/src/auth/index.ts +2 -0
- package/src/components/AppVersion.ts +154 -0
- package/src/components/BottomSheet.ts +9 -0
- package/src/components/BottomSheetMenu.ts +6 -0
- package/src/components/ConfirmSheet.ts +15 -0
- package/src/components/EmptyView.tsx +40 -0
- package/src/components/Header/BaseHeader.ts +6 -0
- package/src/components/Header/ScreenHeader.ts +6 -0
- package/src/components/Header.tsx +139 -0
- package/src/components/HyperlinkText.tsx +34 -0
- package/src/components/LineLoader.tsx +23 -0
- package/src/components/NotificationIcon.tsx +53 -0
- package/src/components/NotificationPreferenceList.tsx +132 -0
- package/src/components/OfflineScreen.tsx +89 -0
- package/src/components/OrganizationItem.tsx +67 -0
- package/src/components/SocialButton.tsx +78 -0
- package/src/components/TextWithUrl.ts +6 -0
- package/src/components/ToggleSwitch.tsx +89 -0
- package/src/components/WorkspaceSwitcherPane.tsx +113 -0
- package/src/components/constants.ts +16 -0
- package/src/components/index.ts +13 -0
- package/src/config/axios/caseConversion.ts +60 -0
- package/src/config/axios/constants.ts +17 -0
- package/src/config/axios/index.ts +291 -0
- package/src/config/axios/networkErrorHandler.ts +47 -0
- package/src/config/axios/paramsSerializer.ts +9 -0
- package/src/config/axios/types.ts +13 -0
- package/src/config/bugsnag.ts +48 -0
- package/src/config/dayjs.ts +42 -0
- package/src/config/googleSignin.ts +36 -0
- package/src/config/index.ts +11 -0
- package/src/config/validations.ts +15 -0
- package/src/constants/index.ts +9 -0
- package/src/contexts/index.ts +4 -0
- package/src/contexts/localization.tsx +183 -0
- package/src/helpers/asyncStore.ts +39 -0
- package/src/helpers/index.ts +1 -0
- package/src/helpers/keychain.ts +46 -0
- package/src/helpers/notifications/apnsToken.ts +69 -0
- package/src/helpers/notifications/constants.ts +34 -0
- package/src/helpers/notifications/getDeviceToken.ts +17 -0
- package/src/helpers/notifications/index.ts +3 -0
- package/src/helpers/notifications/registerBackgroundHandlers.ts +62 -0
- package/src/helpers/notifications/types.ts +27 -0
- package/src/helpers/notifications/usePushNotification.ts +208 -0
- package/src/helpers/scale.ts +4 -0
- package/src/helpers/utils.ts +68 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/query/queryKeys.ts +8 -0
- package/src/hooks/query/useAppVersionApi.ts +12 -0
- package/src/hooks/query/useAuth.ts +253 -0
- package/src/hooks/query/useNotification.ts +130 -0
- package/src/hooks/query/useProfile.ts +21 -0
- package/src/hooks/query/useRolesApi.ts +25 -0
- package/src/hooks/query/useTeamMembersApi.ts +109 -0
- package/src/hooks/useAppState.ts +16 -0
- package/src/hooks/usePushNotificationPermissions.ts +111 -0
- package/src/index.ts +8 -0
- package/src/initializers/index.ts +3 -0
- package/src/initializers/logRocket.ts +25 -0
- package/src/localization/i18n.ts +19 -0
- package/src/localization/index.ts +14 -0
- package/src/navigation/navigationService.ts +37 -0
- package/src/navigation/screenNames.ts +11 -0
- package/src/navigation/stacks.tsx +30 -0
- package/src/navigation/types.ts +19 -0
- package/src/providers/NeetoCommonsRNProvider.tsx +77 -0
- package/src/providers/index.ts +1 -0
- package/src/screens/NotificationsScreen.tsx +290 -0
- package/src/screens/authentication/AuthOptions.tsx +254 -0
- package/src/screens/authentication/IncompleteOnboardingInfo.tsx +110 -0
- package/src/screens/authentication/LoginScreen.tsx +170 -0
- package/src/screens/authentication/OTPVerificationScreen.tsx +235 -0
- package/src/screens/authentication/Organization.tsx +102 -0
- package/src/screens/authentication/SubDomainScreen.tsx +176 -0
- package/src/screens/authentication/constants.ts +30 -0
- package/src/screens/index.ts +10 -0
- package/src/screens/profile/ChatWidget.tsx +8 -0
- package/src/screens/profile/ProfileScreen.tsx +251 -0
- package/src/screens/profile/UserData.tsx +92 -0
- package/src/screens/team_members/Add.tsx +248 -0
- package/src/screens/team_members/Card.tsx +124 -0
- package/src/screens/team_members/Checkbox.tsx +88 -0
- package/src/screens/team_members/Edit.tsx +171 -0
- package/src/screens/team_members/Email.tsx +59 -0
- package/src/screens/team_members/LoadingCard.tsx +75 -0
- package/src/screens/team_members/ProductSelect.tsx +218 -0
- package/src/screens/team_members/RolesRadioGroup.tsx +135 -0
- package/src/screens/team_members/SaveButtons.tsx +62 -0
- package/src/screens/team_members/constants.ts +33 -0
- package/src/screens/team_members/index.tsx +223 -0
- package/src/screens/team_members/utils.ts +84 -0
- package/src/slices/auth.ts +86 -0
- package/src/slices/index.ts +7 -0
- package/src/store/hooks.ts +8 -0
- package/src/store/index.ts +47 -0
- package/src/store/utils.ts +36 -0
- package/src/utils/apiHelpers.ts +7 -0
- package/types/assets.d.ts +38 -0
- package/types/neeto-icons-rn.d.ts +548 -0
- package/api/app_version.js +0 -1
- package/api/auth.js +0 -1
- package/api/global_roles.js +0 -1
- package/api/notifications.js +0 -1
- package/api/organization_roles.js +0 -1
- package/api/profile.js +0 -1
- package/api/team_members.js +0 -1
- package/auth/index.d.ts +0 -9
- package/auth/index.js +0 -1
- package/components/AppVersion.js +0 -1
- package/components/BottomSheet.js +0 -1
- package/components/BottomSheetMenu.js +0 -1
- package/components/ConfirmSheet.js +0 -1
- package/components/EmptyView.js +0 -1
- package/components/Header/BaseHeader.js +0 -1
- package/components/Header/ScreenHeader.js +0 -1
- package/components/Header.js +0 -1
- package/components/HyperlinkText.js +0 -1
- package/components/LineLoader.js +0 -1
- package/components/NotificationIcon.js +0 -1
- package/components/OfflineScreen.js +0 -1
- package/components/TextWithUrl.js +0 -1
- package/components/WorkspaceSwitcherPane.js +0 -1
- package/components/constants.js +0 -1
- package/components/index.js +0 -1
- package/config/axios/caseConversion.js +0 -1
- package/config/axios/constants.js +0 -1
- package/config/axios/index.js +0 -1
- package/config/axios/networkErrorHandler.js +0 -1
- package/config/axios/paramsSerializer.js +0 -1
- package/config/bugsnag.js +0 -1
- package/config/dayjs.js +0 -1
- package/config/googleSignin.js +0 -1
- package/config/index.js +0 -1
- package/config/validations.js +0 -1
- package/constants/index.d.ts +0 -5
- package/constants/index.js +0 -1
- package/contexts/index.js +0 -0
- package/contexts/localization.js +0 -1
- package/helpers/asyncStore.js +0 -1
- package/helpers/index.d.ts +0 -13
- package/helpers/index.js +0 -1
- package/helpers/keychain.d.ts +0 -4
- package/helpers/keychain.js +0 -1
- package/helpers/notifications/index.d.ts +0 -8
- package/helpers/notifications/index.js +0 -1
- package/helpers/notifications/usePushNotification.js +0 -1
- package/helpers/scale.js +0 -1
- package/helpers/utils.js +0 -1
- package/hooks/index.d.ts +0 -11
- package/hooks/index.js +0 -1
- package/hooks/query/constants.js +0 -1
- package/hooks/query/queryKeys.js +0 -1
- package/hooks/query/useAppVersionApi.js +0 -1
- package/hooks/query/useAuth.js +0 -1
- package/hooks/query/useNotification.js +0 -1
- package/hooks/query/useProfile.js +0 -1
- package/hooks/query/useRolesApi.js +0 -1
- package/hooks/query/useTeamMembersApi.js +0 -1
- package/hooks/useAppState.js +0 -1
- package/hooks/usePushNotificationPermissions.js +0 -1
- package/initializers/index.js +0 -1
- package/initializers/logRocket.js +0 -1
- package/localization/index.js +0 -1
- package/localization/translations/it.json +0 -13
- package/navigation/navigationService.js +0 -1
- package/navigation/screenNames.js +0 -1
- package/navigation/stacks.js +0 -1
- package/providers/NeetoCommonsRNProvider.js +0 -1
- package/providers/index.d.ts +0 -16
- package/providers/index.js +0 -1
- package/screens/NotificationsScreen.js +0 -1
- package/screens/authentication/AuthOptions.js +0 -1
- package/screens/authentication/IncompleteOnboardingInfo.js +0 -1
- package/screens/authentication/LoginScreen.js +0 -1
- package/screens/authentication/OTPVerificationScreen.js +0 -1
- package/screens/authentication/Organization.js +0 -1
- package/screens/authentication/SubDomainScreen.js +0 -1
- package/screens/authentication/constants.js +0 -1
- package/screens/index.js +0 -1
- package/screens/profile/ChatWidget.js +0 -1
- package/screens/profile/ProfileScreen.js +0 -1
- package/screens/profile/UserData.js +0 -1
- package/screens/team_members/Add.js +0 -1
- package/screens/team_members/Card.js +0 -1
- package/screens/team_members/Checkbox.js +0 -1
- package/screens/team_members/Edit.js +0 -1
- package/screens/team_members/Email.js +0 -1
- package/screens/team_members/LoadingCard.js +0 -1
- package/screens/team_members/ProductSelect.js +0 -1
- package/screens/team_members/RolesRadioGroup.js +0 -1
- package/screens/team_members/SaveButtons.js +0 -1
- package/screens/team_members/constants.js +0 -1
- package/screens/team_members/index.js +0 -1
- package/screens/team_members/utils.js +0 -1
- package/slices/auth.js +0 -1
- package/slices/index.js +0 -1
- package/store/index.d.ts +0 -7
- package/store/index.js +0 -1
- package/store/utils.js +0 -1
- package/utils/apiHelpers.js +0 -1
- /package/{assets → src/assets}/images/empty.svg +0 -0
- /package/{assets → src/assets}/images/wifi.png +0 -0
- /package/{localization → src/localization}/translations/en.json +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type PersistConfig } from "redux-persist";
|
|
2
|
+
import { rootReducer } from "../slices";
|
|
3
|
+
export type CommonsState = ReturnType<typeof rootReducer>;
|
|
4
|
+
export type RootState = CommonsState & Record<string, unknown>;
|
|
5
|
+
declare const persistConfig: PersistConfig<CommonsState>;
|
|
6
|
+
declare const Persistor: import("redux-persist").Persistor;
|
|
7
|
+
declare const Store: {
|
|
8
|
+
dispatch: import("redux-thunk").ThunkDispatch<{
|
|
9
|
+
auth: import("../slices/auth").AuthState;
|
|
10
|
+
} & import("redux-persist/es/persistReducer").PersistPartial, undefined, import("redux").UnknownAction>;
|
|
11
|
+
} & import("redux").Store<{
|
|
12
|
+
auth: import("../slices/auth").AuthState;
|
|
13
|
+
} & import("redux-persist/es/persistReducer").PersistPartial, import("redux").UnknownAction, unknown> & {
|
|
14
|
+
Persistor: import("redux-persist").Persistor;
|
|
15
|
+
};
|
|
16
|
+
export type AppDispatch = typeof Store.dispatch;
|
|
17
|
+
export { Store, Persistor, persistConfig };
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/store/index.ts"],"names":[],"mappings":"AAEA,OAAO,EASL,KAAK,aAAa,EACnB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAIxC,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAC1D,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE/D,QAAA,MAAM,aAAa,EAAE,aAAa,CAAC,YAAY,CAI9C,CAAC;AAaF,QAAA,MAAM,SAAS,mCAA0B,CAAC;AAI1C,QAAA,MAAM,KAAK;;;;;;;;CAA0C,CAAC;AAEtD,MAAM,MAAM,WAAW,GAAG,OAAO,KAAK,CAAC,QAAQ,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Reducer } from "redux";
|
|
2
|
+
interface UpdateRootReducerOptions {
|
|
3
|
+
reducers: Record<string, Reducer>;
|
|
4
|
+
blacklistedReducers?: string[];
|
|
5
|
+
}
|
|
6
|
+
export declare const updateRootReducer: ({ reducers, blacklistedReducers, }: UpdateRootReducerOptions) => void;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/store/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,OAAO,EAAE,MAAM,OAAO,CAAC;AAOtD,UAAU,wBAAwB;IAChC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;CAChC;AAED,eAAO,MAAM,iBAAiB,GAAI,oCAG/B,wBAAwB,SAoB1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiHelpers.d.ts","sourceRoot":"","sources":["../../../src/utils/apiHelpers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,GAAI,2BAG5B;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB,WAAyD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,43 +1,153 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-commons-rn",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
3
|
+
"version": "2.0.3",
|
|
4
|
+
"license": "UNLICENSED",
|
|
5
|
+
"main": "./src/index.ts",
|
|
6
|
+
"react-native": "./src/index.ts",
|
|
7
|
+
"types": "./lib/typescript/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./lib/typescript/index.d.ts",
|
|
11
|
+
"react-native": "./src/index.ts",
|
|
12
|
+
"default": "./src/index.ts"
|
|
13
|
+
},
|
|
14
|
+
"./auth": {
|
|
15
|
+
"types": "./lib/typescript/auth/index.d.ts",
|
|
16
|
+
"react-native": "./src/auth/index.ts",
|
|
17
|
+
"default": "./src/auth/index.ts"
|
|
18
|
+
},
|
|
19
|
+
"./components": {
|
|
20
|
+
"types": "./lib/typescript/components/index.d.ts",
|
|
21
|
+
"react-native": "./src/components/index.ts",
|
|
22
|
+
"default": "./src/components/index.ts"
|
|
23
|
+
},
|
|
24
|
+
"./config": {
|
|
25
|
+
"types": "./lib/typescript/config/index.d.ts",
|
|
26
|
+
"react-native": "./src/config/index.ts",
|
|
27
|
+
"default": "./src/config/index.ts"
|
|
28
|
+
},
|
|
29
|
+
"./constants": {
|
|
30
|
+
"types": "./lib/typescript/constants/index.d.ts",
|
|
31
|
+
"react-native": "./src/constants/index.ts",
|
|
32
|
+
"default": "./src/constants/index.ts"
|
|
33
|
+
},
|
|
34
|
+
"./contexts": {
|
|
35
|
+
"types": "./lib/typescript/contexts/index.d.ts",
|
|
36
|
+
"react-native": "./src/contexts/index.ts",
|
|
37
|
+
"default": "./src/contexts/index.ts"
|
|
38
|
+
},
|
|
39
|
+
"./helpers": {
|
|
40
|
+
"types": "./lib/typescript/helpers/index.d.ts",
|
|
41
|
+
"react-native": "./src/helpers/index.ts",
|
|
42
|
+
"default": "./src/helpers/index.ts"
|
|
43
|
+
},
|
|
44
|
+
"./helpers/notifications": {
|
|
45
|
+
"types": "./lib/typescript/helpers/notifications/index.d.ts",
|
|
46
|
+
"react-native": "./src/helpers/notifications/index.ts",
|
|
47
|
+
"default": "./src/helpers/notifications/index.ts"
|
|
48
|
+
},
|
|
49
|
+
"./hooks": {
|
|
50
|
+
"types": "./lib/typescript/hooks/index.d.ts",
|
|
51
|
+
"react-native": "./src/hooks/index.ts",
|
|
52
|
+
"default": "./src/hooks/index.ts"
|
|
53
|
+
},
|
|
54
|
+
"./initializers": {
|
|
55
|
+
"types": "./lib/typescript/initializers/index.d.ts",
|
|
56
|
+
"react-native": "./src/initializers/index.ts",
|
|
57
|
+
"default": "./src/initializers/index.ts"
|
|
58
|
+
},
|
|
59
|
+
"./localization": {
|
|
60
|
+
"types": "./lib/typescript/localization/index.d.ts",
|
|
61
|
+
"react-native": "./src/localization/index.ts",
|
|
62
|
+
"default": "./src/localization/index.ts"
|
|
63
|
+
},
|
|
64
|
+
"./providers": {
|
|
65
|
+
"types": "./lib/typescript/providers/index.d.ts",
|
|
66
|
+
"react-native": "./src/providers/index.ts",
|
|
67
|
+
"default": "./src/providers/index.ts"
|
|
68
|
+
},
|
|
69
|
+
"./screens": {
|
|
70
|
+
"types": "./lib/typescript/screens/index.d.ts",
|
|
71
|
+
"react-native": "./src/screens/index.ts",
|
|
72
|
+
"default": "./src/screens/index.ts"
|
|
73
|
+
},
|
|
74
|
+
"./slices": {
|
|
75
|
+
"types": "./lib/typescript/slices/index.d.ts",
|
|
76
|
+
"react-native": "./src/slices/index.ts",
|
|
77
|
+
"default": "./src/slices/index.ts"
|
|
78
|
+
},
|
|
79
|
+
"./store": {
|
|
80
|
+
"types": "./lib/typescript/store/index.d.ts",
|
|
81
|
+
"react-native": "./src/store/index.ts",
|
|
82
|
+
"default": "./src/store/index.ts"
|
|
83
|
+
},
|
|
84
|
+
"./eslint-config": "./eslint-config/index.js",
|
|
85
|
+
"./package.json": "./package.json",
|
|
86
|
+
"./*": {
|
|
87
|
+
"types": "./lib/typescript/*.d.ts",
|
|
88
|
+
"react-native": "./src/*",
|
|
89
|
+
"default": "./src/*"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
5
92
|
"files": [
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"config",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"localization",
|
|
15
|
-
"initializers",
|
|
16
|
-
"navigation",
|
|
17
|
-
"providers",
|
|
18
|
-
"store",
|
|
19
|
-
"slices",
|
|
20
|
-
"screens",
|
|
21
|
-
"assets",
|
|
22
|
-
"utils",
|
|
23
|
-
"eslint-config"
|
|
93
|
+
"src",
|
|
94
|
+
"lib",
|
|
95
|
+
"types",
|
|
96
|
+
"eslint-config",
|
|
97
|
+
"!src/app",
|
|
98
|
+
"!**/__tests__",
|
|
99
|
+
"!**/*.stories.tsx",
|
|
100
|
+
"!**/.*"
|
|
24
101
|
],
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
102
|
+
"scripts": {
|
|
103
|
+
"build": "bob build",
|
|
104
|
+
"typecheck": "tsc --noEmit",
|
|
105
|
+
"android:staging": "react-native run-android --variant=stagingdebug --appIdSuffix=staging",
|
|
106
|
+
"android:staging-release": "react-native run-android --variant=stagingrelease --appIdSuffix=staging",
|
|
107
|
+
"android:dev": "react-native run-android --variant=developmentdebug --appIdSuffix=dev",
|
|
108
|
+
"android:dev-release": "react-native run-android --variant=developmentrelease --appIdSuffix=dev",
|
|
109
|
+
"android:prod": "react-native run-android --variant=productiondebug",
|
|
110
|
+
"android:prod-release": "react-native run-android --variant=productionrelease",
|
|
111
|
+
"ios:dev": "react-native run-ios --scheme 'Development'",
|
|
112
|
+
"ios:prod": "react-native run-ios --scheme 'Production'",
|
|
113
|
+
"ios:staging": "react-native run-ios --scheme 'Staging' --configuration 'DebugStaging'",
|
|
114
|
+
"start": "react-native start",
|
|
115
|
+
"test": "jest",
|
|
116
|
+
"lint": "eslint .",
|
|
117
|
+
"format": "prettier --write .",
|
|
118
|
+
"precommit": "lint-staged",
|
|
119
|
+
"boa": "bash ./offloadAndroidApps.sh",
|
|
120
|
+
"pod": "pod-install",
|
|
121
|
+
"prepare": "husky",
|
|
122
|
+
"updateVersion": "npm version ${1} --no-git-tag-version",
|
|
123
|
+
"fastlane:match:appstore": "cd ios && fastlane match appstore",
|
|
124
|
+
"fastlane:match:dev": "cd ios && fastlane match development",
|
|
125
|
+
"fastlane:ios:staging": "yarn fastlane:env:staging && cd ios && fastlane staging",
|
|
126
|
+
"fastlane:ios:prod": "yarn fastlane:env:prod && cd ios && fastlane production",
|
|
127
|
+
"fastlane:android:staging": "yarn fastlane:env:staging && cd android && fastlane staging",
|
|
128
|
+
"fastlane:android:prod": "yarn fastlane:env:prod && cd android && fastlane production",
|
|
129
|
+
"fastlane:env:staging": "cp ./.env.staging ./android/fastlane/.env && cp ./.env.staging ./ios/fastlane/.env",
|
|
130
|
+
"fastlane:env:prod": "cp ./.env.production ./android/fastlane/.env && cp ./.env.production ./ios/fastlane/.env",
|
|
131
|
+
"yalc:publish": "yarn build && yalc publish"
|
|
132
|
+
},
|
|
133
|
+
"lint-staged": {
|
|
134
|
+
"src/**/*.{js,es6,jsx,ts,tsx}": [
|
|
135
|
+
"prettier --write",
|
|
136
|
+
"eslint --fix"
|
|
137
|
+
]
|
|
29
138
|
},
|
|
30
139
|
"peerDependencies": {
|
|
31
140
|
"@babel/eslint-parser": "^7.19.1",
|
|
32
141
|
"@bigbinary/app-version-control": "^1.1.6",
|
|
33
|
-
"@bigbinary/neetoui-rn": ">=
|
|
142
|
+
"@bigbinary/neetoui-rn": ">=3.0.0",
|
|
34
143
|
"@eslint/js": "^9.26.0",
|
|
35
144
|
"@gorhom/bottom-sheet": ">=5.0.0",
|
|
36
|
-
"@react-
|
|
37
|
-
"@react-
|
|
145
|
+
"@react-native-firebase/app": "^25.1.0",
|
|
146
|
+
"@react-native-firebase/messaging": "^25.1.0",
|
|
38
147
|
"@react-navigation/native": "^6.0.13",
|
|
39
148
|
"@react-navigation/native-stack": ">=6.9.8",
|
|
40
|
-
"
|
|
149
|
+
"@tanstack/react-query": "^5.0.0",
|
|
150
|
+
"axios": ">=1.18.0",
|
|
41
151
|
"dayjs": "^1.11.6",
|
|
42
152
|
"eslint": "^9.26.0",
|
|
43
153
|
"eslint-config-prettier": "^9.1.0",
|
|
@@ -50,70 +160,135 @@
|
|
|
50
160
|
"eslint-plugin-react-native": "^5.0.0",
|
|
51
161
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
52
162
|
"globals": "^15.15.0",
|
|
53
|
-
"react": ">=
|
|
54
|
-
"react-native": ">=0.
|
|
55
|
-
"react-native-
|
|
56
|
-
"react-native-gesture-handler": ">=2.
|
|
163
|
+
"react": ">=19.0.0 <20",
|
|
164
|
+
"react-native": ">=0.78.0",
|
|
165
|
+
"react-native-config": "^1.4.5",
|
|
166
|
+
"react-native-gesture-handler": ">=2.16.1",
|
|
57
167
|
"react-native-keychain": "10.0.0",
|
|
58
|
-
"react-native-
|
|
59
|
-
"react-native-
|
|
60
|
-
"react-native-
|
|
61
|
-
"react-native-
|
|
62
|
-
"react-
|
|
63
|
-
"
|
|
64
|
-
"react-redux": "^8.0.5",
|
|
65
|
-
"redux": "^4.1.2",
|
|
168
|
+
"react-native-notify-kit": "^10.5.0",
|
|
169
|
+
"react-native-reanimated": ">=3.16.0",
|
|
170
|
+
"react-native-safe-area-context": ">=4.0.0",
|
|
171
|
+
"react-native-svg": ">=15.0.0",
|
|
172
|
+
"react-redux": "^9.0.0",
|
|
173
|
+
"redux": "^5.0.0",
|
|
66
174
|
"redux-persist": "^6.0.0",
|
|
67
|
-
"
|
|
175
|
+
"typescript-eslint": "^8.0.0"
|
|
68
176
|
},
|
|
69
177
|
"dependencies": {
|
|
70
178
|
"@bigbinary/neeto-cist": "^1.0.15",
|
|
71
|
-
"@
|
|
72
|
-
"@bugsnag/react-
|
|
179
|
+
"@bigbinary/neeto-icons-rn": "^1.20.74",
|
|
180
|
+
"@bugsnag/plugin-react-navigation": "^8",
|
|
181
|
+
"@bugsnag/react-native": "^8",
|
|
73
182
|
"@invertase/react-native-apple-authentication": "^2.2.2",
|
|
74
|
-
"@logrocket/react-native": "^
|
|
75
|
-
"@react-native-async-storage/async-storage": "^
|
|
76
|
-
"@react-native-community/netinfo": "^
|
|
77
|
-
"@react-native-google-signin/google-signin": "^
|
|
78
|
-
"@reduxjs/toolkit": "^
|
|
183
|
+
"@logrocket/react-native": "^3",
|
|
184
|
+
"@react-native-async-storage/async-storage": "^3",
|
|
185
|
+
"@react-native-community/netinfo": "^12",
|
|
186
|
+
"@react-native-google-signin/google-signin": "^16",
|
|
187
|
+
"@reduxjs/toolkit": "^2",
|
|
79
188
|
"compare-versions": "^6.0.0-rc.1",
|
|
80
189
|
"formik": "^2.2.9",
|
|
190
|
+
"i18next": "^26.3.6",
|
|
81
191
|
"qs": "^6.15.2",
|
|
82
|
-
"ramda": "^0.
|
|
192
|
+
"ramda": "^0.29.0",
|
|
83
193
|
"react-content-loader": "^6.1.0",
|
|
84
|
-
"react-
|
|
85
|
-
"react-native-
|
|
86
|
-
"react-native-
|
|
87
|
-
"react-native-permissions": "^
|
|
88
|
-
"react-native-push-notification": "^8.1.1",
|
|
194
|
+
"react-i18next": "^17.0.11",
|
|
195
|
+
"react-native-device-info": "^15",
|
|
196
|
+
"react-native-hyperlink": "^0.1.0",
|
|
197
|
+
"react-native-permissions": "^5",
|
|
89
198
|
"react-native-remix-icon": "^0.4.0",
|
|
90
|
-
"react-native-
|
|
91
|
-
"react-native-webview": "^
|
|
92
|
-
"
|
|
93
|
-
|
|
199
|
+
"react-native-size-matters": "^0.4.0",
|
|
200
|
+
"react-native-webview": "^14",
|
|
201
|
+
"yup": "^1"
|
|
202
|
+
},
|
|
203
|
+
"devDependencies": {
|
|
204
|
+
"@babel/cli": "^7.18.10",
|
|
205
|
+
"@babel/core": "^7.29.6",
|
|
206
|
+
"@babel/eslint-parser": "^7.19.1",
|
|
207
|
+
"@babel/runtime": "^7.12.5",
|
|
208
|
+
"@bigbinary/app-version-control": "^1.1.6",
|
|
209
|
+
"@bigbinary/neetoui-rn": "^3.0.0",
|
|
210
|
+
"@bugsnag/source-maps": "^2.3.1",
|
|
211
|
+
"@eslint/js": "^9.26.0",
|
|
212
|
+
"@gorhom/bottom-sheet": "^5",
|
|
213
|
+
"@react-native-firebase/app": "^25.1.0",
|
|
214
|
+
"@react-native-firebase/messaging": "^25.1.0",
|
|
215
|
+
"@react-native/babel-preset": "^0.78.0",
|
|
216
|
+
"@react-navigation/native": "^6.0.13",
|
|
217
|
+
"@react-navigation/native-stack": "6.9.8",
|
|
218
|
+
"@shopify/flash-list": "^2.3.2",
|
|
219
|
+
"@tanstack/react-query": "^5",
|
|
220
|
+
"@testing-library/react-native": "^14.0.1",
|
|
221
|
+
"@types/jest": "^29.5.14",
|
|
222
|
+
"@types/qs": "^6.9.0",
|
|
223
|
+
"@types/ramda": "^0.29.0",
|
|
224
|
+
"@types/react": "^19.0.0",
|
|
225
|
+
"axios": "^1.18.0",
|
|
226
|
+
"babel-plugin-module-resolver": "^4.1.0",
|
|
227
|
+
"babel-plugin-transform-remove-console": "^6.9.4",
|
|
228
|
+
"dayjs": "^1.11.6",
|
|
229
|
+
"eslint": "^9.26.0",
|
|
230
|
+
"eslint-config-prettier": "^9.1.0",
|
|
231
|
+
"eslint-import-resolver-babel-module": "^5.3.1",
|
|
232
|
+
"eslint-plugin-import": "^2.31.0",
|
|
233
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
234
|
+
"eslint-plugin-promise": "^7.2.1",
|
|
235
|
+
"eslint-plugin-react": "^7.37.5",
|
|
236
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
237
|
+
"eslint-plugin-react-native": "^5.0.0",
|
|
238
|
+
"eslint-plugin-unused-imports": "^4.1.4",
|
|
239
|
+
"globals": "^15.15.0",
|
|
240
|
+
"husky": "^9",
|
|
241
|
+
"jest": "^29.7.0",
|
|
242
|
+
"jest-transform-stub": "^2.0.0",
|
|
243
|
+
"lint-staged": "^11.0.0",
|
|
244
|
+
"prettier": "^3.9.6",
|
|
245
|
+
"react": "19.0.0",
|
|
246
|
+
"react-native": "0.78.3",
|
|
247
|
+
"react-native-builder-bob": "^0.43.0",
|
|
248
|
+
"react-native-config": "^1.4.5",
|
|
249
|
+
"react-native-edge-to-edge": "^1.8.1",
|
|
250
|
+
"react-native-gesture-handler": "^2.28.0",
|
|
251
|
+
"react-native-keychain": "10.0.0",
|
|
252
|
+
"react-native-nitro-modules": "0.35.7",
|
|
253
|
+
"react-native-notify-kit": "^10.5.0",
|
|
254
|
+
"react-native-reanimated": "^3.19.0",
|
|
255
|
+
"react-native-safe-area-context": "^5.8.0",
|
|
256
|
+
"react-native-screens": "~4.6.0",
|
|
257
|
+
"react-native-size-matters": "^0.4.0",
|
|
258
|
+
"react-native-svg": "^15.15.5",
|
|
259
|
+
"react-native-svg-transformer": "^1.0.0",
|
|
260
|
+
"react-native-toast-message": "^2",
|
|
261
|
+
"react-native-unistyles": "3.2.5",
|
|
262
|
+
"react-native-version": "^4.0.0",
|
|
263
|
+
"react-redux": "^9.2.0",
|
|
264
|
+
"redux": "^5.0.1",
|
|
265
|
+
"redux-persist": "^6.0.0",
|
|
266
|
+
"test-renderer": "1.0.0",
|
|
267
|
+
"typescript": "^5.7.0",
|
|
268
|
+
"typescript-eslint": "^8.0.0"
|
|
94
269
|
},
|
|
95
270
|
"jest": {
|
|
96
271
|
"preset": "react-native",
|
|
272
|
+
"transform": {
|
|
273
|
+
"^.+\\.(js|jsx|ts|tsx)$": "babel-jest",
|
|
274
|
+
"^.+\\.(bmp|gif|jpg|jpeg|mp4|png|psd|svg|webp)$": "react-native/jest/assetFileTransformer.js"
|
|
275
|
+
},
|
|
97
276
|
"moduleNameMapper": {
|
|
98
|
-
".+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$": "jest-transform-stub"
|
|
277
|
+
".+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$": "jest-transform-stub",
|
|
278
|
+
"^@bigbinary/neeto-icons-rn$": "<rootDir>/node_modules/@bigbinary/neeto-icons-rn/dist/icons/index.ts"
|
|
99
279
|
},
|
|
100
280
|
"setupFiles": [
|
|
281
|
+
"./node_modules/react-native-gesture-handler/jestSetup.js",
|
|
282
|
+
"react-native-unistyles/mocks",
|
|
101
283
|
"<rootDir>/jest/setup.js"
|
|
102
284
|
],
|
|
103
|
-
"setupFilesAfterEnv": [
|
|
104
|
-
"./node_modules/jest-enzyme/lib/index.js"
|
|
105
|
-
],
|
|
106
285
|
"moduleDirectories": [
|
|
107
286
|
"node_modules",
|
|
108
287
|
"src"
|
|
109
288
|
],
|
|
110
289
|
"transformIgnorePatterns": [
|
|
111
|
-
"node_modules/(?!react-native|react-navigation)/"
|
|
112
|
-
]
|
|
113
|
-
"testEnvironment": "jsdom"
|
|
114
|
-
},
|
|
115
|
-
"resolutions": {
|
|
116
|
-
"cheerio": "1.0.0-rc.3"
|
|
290
|
+
"node_modules/(?!(jest-)?react-native|@react-native(-community)?|@react-navigation|react-navigation|@bigbinary|@gorhom|@invertase|react-native-.*)/"
|
|
291
|
+
]
|
|
117
292
|
},
|
|
118
293
|
"peerDependenciesMeta": {
|
|
119
294
|
"@babel/eslint-parser": {
|
|
@@ -154,6 +329,28 @@
|
|
|
154
329
|
},
|
|
155
330
|
"globals": {
|
|
156
331
|
"optional": true
|
|
332
|
+
},
|
|
333
|
+
"typescript-eslint": {
|
|
334
|
+
"optional": true
|
|
157
335
|
}
|
|
158
|
-
}
|
|
159
|
-
|
|
336
|
+
},
|
|
337
|
+
"resolutions": {
|
|
338
|
+
"shell-quote": "1.10.0",
|
|
339
|
+
"svgo": "3.3.4",
|
|
340
|
+
"linkify-it": "5.0.2",
|
|
341
|
+
"brace-expansion": "1.1.18"
|
|
342
|
+
},
|
|
343
|
+
"react-native-builder-bob": {
|
|
344
|
+
"source": "src",
|
|
345
|
+
"output": "lib",
|
|
346
|
+
"targets": [
|
|
347
|
+
[
|
|
348
|
+
"typescript",
|
|
349
|
+
{
|
|
350
|
+
"project": "tsconfig.build.json"
|
|
351
|
+
}
|
|
352
|
+
]
|
|
353
|
+
]
|
|
354
|
+
},
|
|
355
|
+
"packageManager": "yarn@4.18.0"
|
|
356
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
import Config from "react-native-config";
|
|
3
|
+
|
|
4
|
+
import { Store } from "../store";
|
|
5
|
+
import { appVersionsUrl } from "../utils/apiHelpers";
|
|
6
|
+
|
|
7
|
+
export interface AppVersionInfo {
|
|
8
|
+
version: string;
|
|
9
|
+
force_update?: boolean;
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const fetch = () => {
|
|
14
|
+
// `String` keeps the pre-TypeScript behaviour for an unset appName, where
|
|
15
|
+
// template interpolation produced the literal "null" in the URL.
|
|
16
|
+
const appName = String(Store.getState().auth.appName);
|
|
17
|
+
const environment = Config.ENVIRONMENT === "staging" ? "net" : "com";
|
|
18
|
+
|
|
19
|
+
return axios.get<AppVersionInfo>(appVersionsUrl({ appName, environment }));
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const appVersionApi = { fetch };
|
|
23
|
+
|
|
24
|
+
export default appVersionApi;
|
package/src/api/auth.ts
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Platform } from "react-native";
|
|
2
|
+
|
|
3
|
+
import axios from "axios";
|
|
4
|
+
|
|
5
|
+
import { type Organization } from "../slices/auth";
|
|
6
|
+
import { Store } from "../store";
|
|
7
|
+
|
|
8
|
+
// Exported because it surfaces in the inferred return type of the mutations
|
|
9
|
+
// in useAuth, and a declaration cannot reference a type it cannot name.
|
|
10
|
+
export interface OrganizationsResponse {
|
|
11
|
+
organizations: Organization[];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const generateOTPAPI = async ({ email }: { email: string }) => {
|
|
15
|
+
const {
|
|
16
|
+
data: { user_id },
|
|
17
|
+
} = await axios.post<{ user_id: string }>("/api/mobile/v1/generate_otp", {
|
|
18
|
+
user: { email },
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
return user_id;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const verifyOTPAPI = ({
|
|
25
|
+
code,
|
|
26
|
+
userId,
|
|
27
|
+
}: {
|
|
28
|
+
code: string;
|
|
29
|
+
userId: string;
|
|
30
|
+
}) =>
|
|
31
|
+
axios.post<OrganizationsResponse>("/api/mobile/v1/verify_otp", {
|
|
32
|
+
user: { otp_number: code, user_id: userId },
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export const loginWithGoogleAPI = async ({
|
|
36
|
+
serverAuthCode,
|
|
37
|
+
}: {
|
|
38
|
+
serverAuthCode: string;
|
|
39
|
+
}) => {
|
|
40
|
+
const appName = Store.getState().auth.appName;
|
|
41
|
+
|
|
42
|
+
return await axios.post<OrganizationsResponse>(
|
|
43
|
+
`/api/mobile/v1/google_login?code=${serverAuthCode}&app_name=${appName}&device=${Platform.OS}`
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const loginWithAppleAPI = async ({
|
|
48
|
+
authorizationCode,
|
|
49
|
+
identityToken,
|
|
50
|
+
}: {
|
|
51
|
+
authorizationCode: string;
|
|
52
|
+
identityToken: string;
|
|
53
|
+
}) => {
|
|
54
|
+
const appName = Store.getState().auth.appName;
|
|
55
|
+
|
|
56
|
+
return await axios.post<OrganizationsResponse>(
|
|
57
|
+
`/api/mobile/v1/apple_login?code=${authorizationCode}&id_token=${identityToken}&app_name=${appName}&device=${Platform.OS}`
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export const fetchOrganizationDetailsAPI = async ({
|
|
62
|
+
subdomain,
|
|
63
|
+
}: {
|
|
64
|
+
subdomain: string;
|
|
65
|
+
}) =>
|
|
66
|
+
await axios.get<{ organization?: { is_onboard?: boolean } }>(
|
|
67
|
+
`/api/mobile/v1/organizations/${subdomain}`
|
|
68
|
+
);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
|
|
3
|
+
export interface GlobalRole {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
app_name: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const fetch = () => axios.get<GlobalRole[]>("/neeto_team_members/global_roles");
|
|
10
|
+
|
|
11
|
+
const globalRolesApi = {
|
|
12
|
+
fetch,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default globalRolesApi;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
|
|
3
|
+
// The notification list item as the neeto_notifications engine returns it.
|
|
4
|
+
export interface NotificationItem {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
// The list endpoint names the copy `body`; the FCM data payload calls the
|
|
8
|
+
// same thing `message` (see helpers/notifications/types).
|
|
9
|
+
body: string;
|
|
10
|
+
read_at: string | null;
|
|
11
|
+
created_at: string;
|
|
12
|
+
url?: string;
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface NotificationsPage {
|
|
17
|
+
notifications: NotificationItem[];
|
|
18
|
+
total_count: number;
|
|
19
|
+
unread_count: number;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface RegisterDevicePayload {
|
|
23
|
+
device: {
|
|
24
|
+
device_token: string;
|
|
25
|
+
platform: string;
|
|
26
|
+
[key: string]: unknown;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const registerDeviceTokenAPI = async (payload: RegisterDevicePayload) =>
|
|
31
|
+
await axios.post("/neeto_notifications/api/v1/devices", payload);
|
|
32
|
+
|
|
33
|
+
export const deleteDeviceTokenAPI = async ({
|
|
34
|
+
notificationDeviceId,
|
|
35
|
+
}: {
|
|
36
|
+
notificationDeviceId: string;
|
|
37
|
+
}) => {
|
|
38
|
+
const url = `/neeto_notifications/api/v1/devices/${notificationDeviceId}`;
|
|
39
|
+
|
|
40
|
+
return await axios.delete(url);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const fetchNotificationsAPI = async ({ page }: { page: number }) =>
|
|
44
|
+
await axios.get<NotificationsPage>(
|
|
45
|
+
"/neeto_notifications/api/v1/notifications",
|
|
46
|
+
{
|
|
47
|
+
params: { page },
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
export const markReadUnReadNotificationAPI = async ({
|
|
52
|
+
notificationId,
|
|
53
|
+
readAt,
|
|
54
|
+
}: {
|
|
55
|
+
notificationId: string;
|
|
56
|
+
readAt: string | null;
|
|
57
|
+
}) =>
|
|
58
|
+
await axios.put(
|
|
59
|
+
`/neeto_notifications/api/v1/notifications/${notificationId}`,
|
|
60
|
+
{
|
|
61
|
+
notification: { read_at: readAt },
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
export const markAllNotificationsReadAPI = async () =>
|
|
66
|
+
await axios.post("/neeto_notifications/api/v1/notifications/mark_all_read");
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
|
|
3
|
+
export interface OrganizationRole {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const fetch = () =>
|
|
9
|
+
axios.get<{ organization_roles: OrganizationRole[] }>(
|
|
10
|
+
"/neeto_team_members/organization_roles"
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
const organizationRolesApi = {
|
|
14
|
+
fetch,
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export default organizationRolesApi;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
|
|
3
|
+
export interface Permission {
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface Profile {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
email: string;
|
|
11
|
+
profile_image_url?: string | null;
|
|
12
|
+
permissions?: Permission[];
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const getProfileApi = () =>
|
|
17
|
+
axios.get<{ user: Profile }>("/api/mobile/v1/profile");
|