@abihealth/goapp-react-native 1.26.0-beta → 1.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.28.0](https://github.com/abiglobalhealth/react-native-sdk/compare/goapp-react-native-v1.27.0-beta...goapp-react-native-v1.28.0) (2025-05-09)
4
+
5
+
6
+ ### Features
7
+
8
+ * remove auth from sdk ([#190](https://github.com/abiglobalhealth/react-native-sdk/issues/190)) ([76cea1f](https://github.com/abiglobalhealth/react-native-sdk/commit/76cea1f5f97128cf9c54b78f2cf62ed77bc0d733))
9
+
10
+ ## [1.27.0-beta](https://github.com/abiglobalhealth/react-native-sdk/compare/goapp-react-native-v1.26.0-beta...goapp-react-native-v1.27.0-beta) (2025-05-08)
11
+
12
+
13
+ ### Features
14
+
15
+ * refactor authentication flow to consolidate token retrieval and add subPartnerName support ([#188](https://github.com/abiglobalhealth/react-native-sdk/issues/188)) ([56c2f57](https://github.com/abiglobalhealth/react-native-sdk/commit/56c2f57981ddff8f2372e5767e3d006318a9f8d5))
16
+
3
17
  ## [1.26.0-beta](https://github.com/abiglobalhealth/react-native-sdk/compare/goapp-react-native-v1.25.0-beta...goapp-react-native-v1.26.0-beta) (2025-05-08)
4
18
 
5
19
 
@@ -1,7 +1,6 @@
1
1
  import { REGION } from './models/region';
2
2
  type BaseUrls = {
3
3
  ws: string;
4
- api: string;
5
4
  sdk: string;
6
5
  };
7
6
  export declare const getBaseUrl: (region: REGION) => BaseUrls;
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getBaseUrl = void 0;
4
4
  var getBaseUrl = function (region) { return ({
5
- api: "https://".concat(region, ".api.abi.ai"),
6
5
  sdk: "https://".concat(region, ".sdk.abi.ai"),
7
6
  ws: "wss://".concat(region, ".sdk-ws.abi.ai")
8
7
  }); };
package/dist/index.d.ts CHANGED
@@ -3,7 +3,6 @@ import { FindingAnimation } from './common/animations/FindingAnimation/animation
3
3
  import { HorizontalLoadingAnimation } from './common/animations/HorizontalLoadingAnimation/animation';
4
4
  import { LoadingCircleAnimation } from './common/animations/LoadingCircleAnimation/animation';
5
5
  import { LoadingDotsAnimation } from './common/animations/LoadingDotsAnimation/animation';
6
- import { getPartnerToken, getUserToken } from './common/api/auth';
7
6
  import { BackgroundPattern } from './common/components/BackgroundPattern';
8
7
  import { Button } from './common/components/Button';
9
8
  import { CancelConsultationButton } from './common/components/CancelConsultationButton';
@@ -70,4 +69,4 @@ import { JoinVideoCallScreen } from './video-consultations/screens/JoinVideoCall
70
69
  import { ProcessingPrescriptionScreen } from './video-consultations/screens/ProcessingPrescriptionScreen';
71
70
  import VideoCallScreen from './video-consultations/screens/VideoCallScreen';
72
71
  export { AbiLogoIcon, AgoraWrapper, Animation, AnswerScreen, AttachmentPreviewModal, BackArrowIcon, BackgroundPattern, Button, CallingAnimation, CancelConsultationButton, CancelModal, Card, CASE_TYPE, Checkbox, CloseConsultationModal, CloseIcon, Consultation, CONSULTATION_STATUS, // TODO check this after last refactor
73
- ConsultationProvider, DateInput, DeliveryAddressScreen, DoctorIcon, DoctorProfileCard, DoctorProfileModal, EndingVideoScreen, EndVideoCallModal, FadeIn, FindingAnimation, FormPrescription, FormWrapper, getPartnerToken, getProfessionalLabel, getUserToken, Header, HKDeliveryAddressSchema, HorizontalLoadingAnimation, IndicationCategory, IndicationCategoryType, InfoIcon, Input, isAndroid, isIOS, JoinVideoCallScreen, License, LoadingCircleAnimation, LoadingDotsAnimation, MatchingScreen, MatchScreen, Modal, NoConsultationFoundScreen, PhoneInput, PlaneIcon, PreparingSummaryScreen, Prescription, PRESCRIPTION_STATUS, PrescriptionHomeScreen, ProcessingPrescriptionScreen, Professional, Question, QuestionType, RatingScreen, Reminder, requiredCheckbox, requiredString, ScreenWrapper, SearchableDropDown, Select, Slide, Text, TextConsultation, TextConsultationHomeScreen, TextConsultationIcon, Theme, TwoOptionsModal, useConsultation, useTheme, useTranslation, validPhone, VideoCallScreen, VideoConsultation, VideoConsultationIcon };
72
+ ConsultationProvider, DateInput, DeliveryAddressScreen, DoctorIcon, DoctorProfileCard, DoctorProfileModal, EndingVideoScreen, EndVideoCallModal, FadeIn, FindingAnimation, FormPrescription, FormWrapper, getProfessionalLabel, Header, HKDeliveryAddressSchema, HorizontalLoadingAnimation, IndicationCategory, IndicationCategoryType, InfoIcon, Input, isAndroid, isIOS, JoinVideoCallScreen, License, LoadingCircleAnimation, LoadingDotsAnimation, MatchingScreen, MatchScreen, Modal, NoConsultationFoundScreen, PhoneInput, PlaneIcon, PreparingSummaryScreen, Prescription, PRESCRIPTION_STATUS, PrescriptionHomeScreen, ProcessingPrescriptionScreen, Professional, Question, QuestionType, RatingScreen, Reminder, requiredCheckbox, requiredString, ScreenWrapper, SearchableDropDown, Select, Slide, Text, TextConsultation, TextConsultationHomeScreen, TextConsultationIcon, Theme, TwoOptionsModal, useConsultation, useTheme, useTranslation, validPhone, VideoCallScreen, VideoConsultation, VideoConsultationIcon };
package/dist/index.js CHANGED
@@ -3,8 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.PreparingSummaryScreen = exports.PlaneIcon = exports.PhoneInput = exports.NoConsultationFoundScreen = exports.Modal = exports.MatchScreen = exports.MatchingScreen = exports.LoadingDotsAnimation = exports.LoadingCircleAnimation = exports.JoinVideoCallScreen = exports.isIOS = exports.isAndroid = exports.Input = exports.InfoIcon = exports.IndicationCategory = exports.HorizontalLoadingAnimation = exports.HKDeliveryAddressSchema = exports.Header = exports.getUserToken = exports.getProfessionalLabel = exports.getPartnerToken = exports.FormWrapper = exports.FormPrescription = exports.FindingAnimation = exports.FadeIn = exports.EndVideoCallModal = exports.EndingVideoScreen = exports.DoctorProfileModal = exports.DoctorProfileCard = exports.DoctorIcon = exports.DeliveryAddressScreen = exports.DateInput = exports.ConsultationProvider = exports.CONSULTATION_STATUS = exports.CloseIcon = exports.CloseConsultationModal = exports.Checkbox = exports.CASE_TYPE = exports.Card = exports.CancelModal = exports.CancelConsultationButton = exports.CallingAnimation = exports.Button = exports.BackgroundPattern = exports.BackArrowIcon = exports.AttachmentPreviewModal = exports.AnswerScreen = exports.Animation = exports.AgoraWrapper = exports.AbiLogoIcon = void 0;
7
- exports.VideoConsultationIcon = exports.VideoConsultation = exports.VideoCallScreen = exports.validPhone = exports.useTranslation = exports.useTheme = exports.useConsultation = exports.TwoOptionsModal = exports.TextConsultationIcon = exports.TextConsultationHomeScreen = exports.TextConsultation = exports.Text = exports.Slide = exports.Select = exports.SearchableDropDown = exports.ScreenWrapper = exports.requiredString = exports.requiredCheckbox = exports.Reminder = exports.RatingScreen = exports.QuestionType = exports.ProcessingPrescriptionScreen = exports.PrescriptionHomeScreen = exports.PRESCRIPTION_STATUS = void 0;
6
+ exports.PrescriptionHomeScreen = exports.PRESCRIPTION_STATUS = exports.PreparingSummaryScreen = exports.PlaneIcon = exports.PhoneInput = exports.NoConsultationFoundScreen = exports.Modal = exports.MatchScreen = exports.MatchingScreen = exports.LoadingDotsAnimation = exports.LoadingCircleAnimation = exports.JoinVideoCallScreen = exports.isIOS = exports.isAndroid = exports.Input = exports.InfoIcon = exports.IndicationCategory = exports.HorizontalLoadingAnimation = exports.HKDeliveryAddressSchema = exports.Header = exports.getProfessionalLabel = exports.FormWrapper = exports.FormPrescription = exports.FindingAnimation = exports.FadeIn = exports.EndVideoCallModal = exports.EndingVideoScreen = exports.DoctorProfileModal = exports.DoctorProfileCard = exports.DoctorIcon = exports.DeliveryAddressScreen = exports.DateInput = exports.ConsultationProvider = exports.CONSULTATION_STATUS = exports.CloseIcon = exports.CloseConsultationModal = exports.Checkbox = exports.CASE_TYPE = exports.Card = exports.CancelModal = exports.CancelConsultationButton = exports.CallingAnimation = exports.Button = exports.BackgroundPattern = exports.BackArrowIcon = exports.AttachmentPreviewModal = exports.AnswerScreen = exports.Animation = exports.AgoraWrapper = exports.AbiLogoIcon = void 0;
7
+ exports.VideoConsultationIcon = exports.VideoConsultation = exports.VideoCallScreen = exports.validPhone = exports.useTranslation = exports.useTheme = exports.useConsultation = exports.TwoOptionsModal = exports.TextConsultationIcon = exports.TextConsultationHomeScreen = exports.TextConsultation = exports.Text = exports.Slide = exports.Select = exports.SearchableDropDown = exports.ScreenWrapper = exports.requiredString = exports.requiredCheckbox = exports.Reminder = exports.RatingScreen = exports.QuestionType = exports.ProcessingPrescriptionScreen = void 0;
8
8
  var Animation_1 = require("./common/animations/Animation");
9
9
  Object.defineProperty(exports, "Animation", { enumerable: true, get: function () { return Animation_1.Animation; } });
10
10
  var animation_1 = require("./common/animations/FindingAnimation/animation");
@@ -15,9 +15,6 @@ var animation_3 = require("./common/animations/LoadingCircleAnimation/animation"
15
15
  Object.defineProperty(exports, "LoadingCircleAnimation", { enumerable: true, get: function () { return animation_3.LoadingCircleAnimation; } });
16
16
  var animation_4 = require("./common/animations/LoadingDotsAnimation/animation");
17
17
  Object.defineProperty(exports, "LoadingDotsAnimation", { enumerable: true, get: function () { return animation_4.LoadingDotsAnimation; } });
18
- var auth_1 = require("./common/api/auth");
19
- Object.defineProperty(exports, "getPartnerToken", { enumerable: true, get: function () { return auth_1.getPartnerToken; } });
20
- Object.defineProperty(exports, "getUserToken", { enumerable: true, get: function () { return auth_1.getUserToken; } });
21
18
  var BackgroundPattern_1 = require("./common/components/BackgroundPattern");
22
19
  Object.defineProperty(exports, "BackgroundPattern", { enumerable: true, get: function () { return BackgroundPattern_1.BackgroundPattern; } });
23
20
  var Button_1 = require("./common/components/Button");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abihealth/goapp-react-native",
3
- "version": "1.26.0-beta",
3
+ "version": "1.28.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org/"
@@ -1,3 +0,0 @@
1
- import { AuthorizationResponse, PartnerAuthorizationRequest, UserAuthorizationRequest } from './models/auth';
2
- export declare const getPartnerToken: (_: PartnerAuthorizationRequest) => Promise<AuthorizationResponse>;
3
- export declare const getUserToken: (_: UserAuthorizationRequest) => Promise<AuthorizationResponse>;
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getUserToken = exports.getPartnerToken = void 0;
4
- var config_1 = require("./config");
5
- var PARTNER_AUTH_URL = 'partner/authorization/token';
6
- var USER_AUTH_URL = 'user/authorization/token';
7
- // TODO: REMOVE and use ./base one when euw1.api.abi.ai is available
8
- var getBaseUrl = function (_) { return ({
9
- api: "https://client-api.abi.ai"
10
- }); };
11
- var getPartnerToken = function (_a) {
12
- var region = _a.region, clientKey = _a.clientKey;
13
- return config_1.axios
14
- .post("".concat(getBaseUrl(region).api, "/").concat(PARTNER_AUTH_URL), undefined, {
15
- headers: {
16
- 'x-api-key': clientKey
17
- }
18
- })
19
- .then(function (response) { return response === null || response === void 0 ? void 0 : response.data; });
20
- };
21
- exports.getPartnerToken = getPartnerToken;
22
- var getUserToken = function (_a) {
23
- var userId = _a.userId, region = _a.region, partnerToken = _a.partnerToken;
24
- return config_1.axios
25
- .post("".concat(getBaseUrl(region).api, "/").concat(USER_AUTH_URL), {
26
- userId: userId
27
- }, {
28
- headers: {
29
- Authorization: "Bearer ".concat(partnerToken)
30
- }
31
- })
32
- .then(function (response) { return response === null || response === void 0 ? void 0 : response.data; });
33
- };
34
- exports.getUserToken = getUserToken;
@@ -1,14 +0,0 @@
1
- import { REGION } from './region';
2
- export interface PartnerAuthorizationRequest {
3
- clientKey: string;
4
- region: REGION;
5
- }
6
- export interface UserAuthorizationRequest {
7
- userId: string;
8
- region: REGION;
9
- partnerToken: string;
10
- }
11
- export interface AuthorizationResponse {
12
- access_token: string;
13
- refresh_token: string;
14
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });