react-native-mytatva-rn-sdk 1.2.31 → 1.2.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/android/build.gradle +144 -141
  2. package/android/src/main/AndroidManifest.xml +4 -1
  3. package/android/src/main/AndroidManifestNew.xml +141 -138
  4. package/android/src/main/java/com/mytatvarnsdk/CgmTrackyLibModule.kt +71 -71
  5. package/android/src/main/java/com/mytatvarnsdk/MainApplication.kt +4 -4
  6. package/android/src/main/java/com/mytatvarnsdk/activity/ConnectSensorActivity.kt +13 -2
  7. package/android/src/main/java/com/mytatvarnsdk/activity/PermissionActivity.kt +6 -0
  8. package/android/src/main/java/com/mytatvarnsdk/activity/PlaceSensorActivity.kt +82 -65
  9. package/android/src/main/java/com/mytatvarnsdk/activity/PlaceTransmitterActivity.kt +106 -89
  10. package/android/src/main/java/com/mytatvarnsdk/activity/SearchTransmitterActivity.kt +13 -7
  11. package/android/src/main/java/com/mytatvarnsdk/activity/SensorConnectSuccessActivity.kt +6 -0
  12. package/android/src/main/java/com/mytatvarnsdk/activity/StartCGMActivity.kt +63 -57
  13. package/android/src/main/java/com/mytatvarnsdk/activity/VideoActivity.kt +94 -0
  14. package/android/src/main/res/drawable/radio_button_background.xml +1 -1
  15. package/android/src/main/res/drawable/radio_checked.xml +1 -1
  16. package/android/src/main/res/layout/activity_connect_sensor.xml +497 -495
  17. package/android/src/main/res/layout/activity_place_sensor.xml +250 -238
  18. package/android/src/main/res/layout/activity_place_transmitter.xml +219 -207
  19. package/android/src/main/res/layout/activity_search_transmitter.xml +716 -714
  20. package/android/src/main/res/layout/activity_start_cgmactivity.xml +153 -153
  21. package/android/src/main/res/layout/activity_video.xml +32 -0
  22. package/android/src/main/res/values/styles.xml +1 -3
  23. package/ios/Database/KLTDatabaseHandler.m +8 -0
  24. package/lib/commonjs/CGMConnect.js +2 -2
  25. package/lib/commonjs/CGMConnect.js.map +1 -1
  26. package/lib/module/CGMConnect.js +2 -2
  27. package/lib/module/CGMConnect.js.map +1 -1
  28. package/lib/typescript/CGMConnect.d.ts +1 -1
  29. package/package.json +1 -1
  30. package/src/CGMConnect.ts +2 -2
@@ -1,175 +1,175 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
2
  <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
- xmlns:app="http://schemas.android.com/apk/res-auto"
4
- android:id="@+id/main"
5
- android:layout_width="match_parent"
6
- android:layout_height="match_parent"
7
- android:background="@android:color/white">
3
+ xmlns:app="http://schemas.android.com/apk/res-auto"
4
+ android:id="@+id/main"
5
+ android:layout_width="match_parent"
6
+ android:layout_height="match_parent"
7
+ android:background="@android:color/white">
8
8
 
9
9
 
10
- <include
11
- android:id="@+id/toolbar"
12
- layout="@layout/layout_toolbar" />
10
+ <include
11
+ android:id="@+id/toolbar"
12
+ layout="@layout/layout_toolbar" />
13
13
 
14
- <View
15
- android:id="@+id/divider"
16
- android:layout_width="match_parent"
17
- android:layout_height="2dp"
18
- android:background="#F2F4F7"
19
- app:layout_constraintTop_toBottomOf="@+id/toolbar" />
20
-
21
- <!-- Title -->
22
- <TextView
23
- android:id="@+id/tvTitle"
24
- android:layout_width="wrap_content"
25
- android:layout_height="wrap_content"
26
- android:layout_marginTop="16dp"
27
- android:fontFamily="@font/playfairdisplay_bold"
28
- android:text="Before You Start"
29
- android:textColor="@android:color/black"
30
- android:textSize="28sp"
31
- android:textStyle="bold"
32
- app:layout_constraintEnd_toEndOf="parent"
33
- app:layout_constraintStart_toStartOf="parent"
34
- app:layout_constraintTop_toBottomOf="@id/divider" />
35
-
36
- <!-- Instructions Text -->
37
- <TextView
38
- android:id="@+id/tvInstructions"
39
- android:layout_width="0dp"
40
- android:layout_height="wrap_content"
41
- android:layout_marginStart="24dp"
42
- android:layout_marginTop="16dp"
43
- android:layout_marginEnd="24dp"
44
- android:fontFamily="@font/roboto_regular"
45
- android:gravity="center"
46
- android:text="Make sure your transmitter is fully charged. Put it in the charging pod until the blinking white light turns blue. This takes about 15 minutes"
47
- android:textColor="#667085"
48
- android:textSize="15sp"
49
- app:layout_constraintEnd_toEndOf="parent"
50
- app:layout_constraintStart_toStartOf="parent"
51
- app:layout_constraintTop_toBottomOf="@id/tvTitle" />
52
-
53
- <!-- Main Charging Pod Image -->
54
- <ImageView
55
- android:id="@+id/ivChargingPod"
56
- android:layout_width="150dp"
57
- android:layout_height="150dp"
58
- android:layout_marginStart="20dp"
59
- android:layout_marginTop="20dp"
60
- android:layout_marginEnd="20dp"
61
- android:scaleType="centerCrop"
62
- android:src="@drawable/img_charging_pod_full"
63
- app:layout_constraintEnd_toEndOf="parent"
64
- app:layout_constraintStart_toStartOf="parent"
65
- app:layout_constraintTop_toBottomOf="@id/tvInstructions" />
66
-
67
- <!-- Charging Indicators Card -->
68
- <androidx.cardview.widget.CardView
69
- android:id="@+id/cardIndicators"
70
- android:layout_width="0dp"
71
- android:layout_height="wrap_content"
72
- android:layout_marginStart="24dp"
73
- android:layout_marginTop="24dp"
74
- android:layout_marginEnd="24dp"
75
- app:cardBackgroundColor="#F5F5F5"
76
- app:cardCornerRadius="12dp"
77
- app:cardElevation="0dp"
78
- app:layout_constraintEnd_toEndOf="parent"
79
- app:layout_constraintStart_toStartOf="parent"
80
- app:layout_constraintTop_toBottomOf="@id/ivChargingPod">
81
-
82
- <androidx.constraintlayout.widget.ConstraintLayout
83
- android:layout_width="match_parent"
84
- android:layout_height="wrap_content"
85
- android:paddingVertical="15dp">
86
-
87
-
88
- <!-- Charging Indicator -->
89
- <ImageView
90
- android:id="@+id/ivChargingIndicator"
91
- android:layout_width="100dp"
92
- android:layout_height="50dp"
93
- android:src="@drawable/img_charging_indicator"
94
- app:layout_constraintStart_toStartOf="parent"
95
- app:layout_constraintTop_toTopOf="parent" />
14
+ <View
15
+ android:id="@+id/divider"
16
+ android:layout_width="match_parent"
17
+ android:layout_height="2dp"
18
+ android:background="#F2F4F7"
19
+ app:layout_constraintTop_toBottomOf="@+id/toolbar" />
96
20
 
97
- <TextView
98
- android:id="@+id/tvChargingTitle"
99
- android:layout_width="0dp"
21
+ <!-- Title -->
22
+ <TextView
23
+ android:id="@+id/tvTitle"
24
+ android:layout_width="wrap_content"
100
25
  android:layout_height="wrap_content"
101
- android:layout_marginStart="16dp"
102
- android:fontFamily="@font/roboto_semibold"
103
- android:text="Charging"
104
- android:textColor="#101828"
105
- android:textSize="16sp"
106
- app:layout_constraintBottom_toTopOf="@+id/tvChargingDescription"
26
+ android:layout_marginTop="16dp"
27
+ android:fontFamily="@font/playfairdisplay_bold"
28
+ android:text="Before You Start"
29
+ android:textColor="@android:color/black"
30
+ android:textSize="28sp"
31
+ android:textStyle="bold"
107
32
  app:layout_constraintEnd_toEndOf="parent"
108
- app:layout_constraintStart_toEndOf="@id/ivChargingIndicator"
109
- app:layout_constraintTop_toTopOf="@id/ivChargingIndicator" />
33
+ app:layout_constraintStart_toStartOf="parent"
34
+ app:layout_constraintTop_toBottomOf="@id/divider" />
110
35
 
111
- <TextView
112
- android:id="@+id/tvChargingDescription"
36
+ <!-- Instructions Text -->
37
+ <TextView
38
+ android:id="@+id/tvInstructions"
113
39
  android:layout_width="0dp"
114
40
  android:layout_height="wrap_content"
115
- android:layout_marginStart="16dp"
41
+ android:layout_marginStart="24dp"
42
+ android:layout_marginTop="16dp"
43
+ android:layout_marginEnd="24dp"
116
44
  android:fontFamily="@font/roboto_regular"
117
- android:text="Flashing White Indicator"
118
- android:textColor="#636363"
119
- android:textSize="13sp"
120
- app:layout_constraintBottom_toBottomOf="@+id/ivChargingIndicator"
45
+ android:gravity="center"
46
+ android:text="Make sure your transmitter is fully charged. Put it in the charging pod until the blinking white light turns blue. This takes about 15 minutes"
47
+ android:textColor="#667085"
48
+ android:textSize="15sp"
49
+ app:layout_constraintEnd_toEndOf="parent"
50
+ app:layout_constraintStart_toStartOf="parent"
51
+ app:layout_constraintTop_toBottomOf="@id/tvTitle" />
52
+
53
+ <!-- Main Charging Pod Image -->
54
+ <ImageView
55
+ android:id="@+id/ivChargingPod"
56
+ android:layout_width="150dp"
57
+ android:layout_height="150dp"
58
+ android:layout_marginStart="20dp"
59
+ android:layout_marginTop="20dp"
60
+ android:layout_marginEnd="20dp"
61
+ android:scaleType="centerCrop"
62
+ android:src="@drawable/img_charging_pod_full"
121
63
  app:layout_constraintEnd_toEndOf="parent"
122
- app:layout_constraintStart_toEndOf="@id/ivChargingIndicator"
123
- app:layout_constraintTop_toBottomOf="@id/tvChargingTitle" />
124
-
125
- <!-- Fully Charged Indicator -->
126
- <ImageView
127
- android:id="@+id/ivFullyChargedIndicator"
128
- android:layout_width="100dp"
129
- android:layout_height="50dp"
130
- android:layout_marginTop="24dp"
131
- android:src="@drawable/img_charging_indicator"
132
64
  app:layout_constraintStart_toStartOf="parent"
133
- app:layout_constraintTop_toBottomOf="@id/ivChargingIndicator" />
65
+ app:layout_constraintTop_toBottomOf="@id/tvInstructions" />
134
66
 
135
- <TextView
136
- android:id="@+id/tvFullyChargedTitle"
67
+ <!-- Charging Indicators Card -->
68
+ <androidx.cardview.widget.CardView
69
+ android:id="@+id/cardIndicators"
137
70
  android:layout_width="0dp"
138
71
  android:layout_height="wrap_content"
139
- android:layout_marginStart="16dp"
140
- android:fontFamily="@font/roboto_semibold"
141
- android:text="Fully Charged"
142
- android:textColor="#101828"
143
- android:textSize="16sp"
144
- app:layout_constraintBottom_toTopOf="@+id/tvFullyChargedDescription"
72
+ android:layout_marginStart="24dp"
73
+ android:layout_marginTop="24dp"
74
+ android:layout_marginEnd="24dp"
75
+ app:cardBackgroundColor="#F5F5F5"
76
+ app:cardCornerRadius="12dp"
77
+ app:cardElevation="0dp"
145
78
  app:layout_constraintEnd_toEndOf="parent"
146
- app:layout_constraintStart_toEndOf="@id/ivFullyChargedIndicator"
147
- app:layout_constraintTop_toTopOf="@id/ivFullyChargedIndicator" />
148
-
149
- <TextView
150
- android:id="@+id/tvFullyChargedDescription"
151
- android:layout_width="0dp"
79
+ app:layout_constraintStart_toStartOf="parent"
80
+ app:layout_constraintTop_toBottomOf="@id/ivChargingPod">
81
+
82
+ <androidx.constraintlayout.widget.ConstraintLayout
83
+ android:layout_width="match_parent"
84
+ android:layout_height="wrap_content"
85
+ android:paddingVertical="15dp">
86
+
87
+
88
+ <!-- Charging Indicator -->
89
+ <ImageView
90
+ android:id="@+id/ivChargingIndicator"
91
+ android:layout_width="100dp"
92
+ android:layout_height="50dp"
93
+ android:src="@drawable/img_charging_indicator"
94
+ app:layout_constraintStart_toStartOf="parent"
95
+ app:layout_constraintTop_toTopOf="parent" />
96
+
97
+ <TextView
98
+ android:id="@+id/tvChargingTitle"
99
+ android:layout_width="0dp"
100
+ android:layout_height="wrap_content"
101
+ android:layout_marginStart="16dp"
102
+ android:fontFamily="@font/roboto_semibold"
103
+ android:text="Charging"
104
+ android:textColor="#101828"
105
+ android:textSize="16sp"
106
+ app:layout_constraintBottom_toTopOf="@+id/tvChargingDescription"
107
+ app:layout_constraintEnd_toEndOf="parent"
108
+ app:layout_constraintStart_toEndOf="@id/ivChargingIndicator"
109
+ app:layout_constraintTop_toTopOf="@id/ivChargingIndicator" />
110
+
111
+ <TextView
112
+ android:id="@+id/tvChargingDescription"
113
+ android:layout_width="0dp"
114
+ android:layout_height="wrap_content"
115
+ android:layout_marginStart="16dp"
116
+ android:fontFamily="@font/roboto_regular"
117
+ android:text="Flashing White Indicator"
118
+ android:textColor="#636363"
119
+ android:textSize="13sp"
120
+ app:layout_constraintBottom_toBottomOf="@+id/ivChargingIndicator"
121
+ app:layout_constraintEnd_toEndOf="parent"
122
+ app:layout_constraintStart_toEndOf="@id/ivChargingIndicator"
123
+ app:layout_constraintTop_toBottomOf="@id/tvChargingTitle" />
124
+
125
+ <!-- Fully Charged Indicator -->
126
+ <ImageView
127
+ android:id="@+id/ivFullyChargedIndicator"
128
+ android:layout_width="100dp"
129
+ android:layout_height="50dp"
130
+ android:layout_marginTop="24dp"
131
+ android:src="@drawable/img_charging_indicator"
132
+ app:layout_constraintStart_toStartOf="parent"
133
+ app:layout_constraintTop_toBottomOf="@id/ivChargingIndicator" />
134
+
135
+ <TextView
136
+ android:id="@+id/tvFullyChargedTitle"
137
+ android:layout_width="0dp"
138
+ android:layout_height="wrap_content"
139
+ android:layout_marginStart="16dp"
140
+ android:fontFamily="@font/roboto_semibold"
141
+ android:text="Fully Charged"
142
+ android:textColor="#101828"
143
+ android:textSize="16sp"
144
+ app:layout_constraintBottom_toTopOf="@+id/tvFullyChargedDescription"
145
+ app:layout_constraintEnd_toEndOf="parent"
146
+ app:layout_constraintStart_toEndOf="@id/ivFullyChargedIndicator"
147
+ app:layout_constraintTop_toTopOf="@id/ivFullyChargedIndicator" />
148
+
149
+ <TextView
150
+ android:id="@+id/tvFullyChargedDescription"
151
+ android:layout_width="0dp"
152
+ android:layout_height="wrap_content"
153
+ android:layout_marginStart="16dp"
154
+ android:fontFamily="@font/roboto_regular"
155
+ android:text="Blue Indicator"
156
+ android:textColor="#636363"
157
+ android:textSize="13sp"
158
+ app:layout_constraintBottom_toBottomOf="@+id/ivFullyChargedIndicator"
159
+ app:layout_constraintEnd_toEndOf="parent"
160
+ app:layout_constraintStart_toEndOf="@id/ivFullyChargedIndicator"
161
+ app:layout_constraintTop_toBottomOf="@id/tvFullyChargedTitle" />
162
+
163
+ </androidx.constraintlayout.widget.ConstraintLayout>
164
+ </androidx.cardview.widget.CardView>
165
+
166
+ <include
167
+ android:id="@+id/commonButton"
168
+ layout="@layout/layout_button"
169
+ android:layout_width="match_parent"
152
170
  android:layout_height="wrap_content"
153
- android:layout_marginStart="16dp"
154
- android:fontFamily="@font/roboto_regular"
155
- android:text="Blue Indicator"
156
- android:textColor="#636363"
157
- android:textSize="13sp"
158
- app:layout_constraintBottom_toBottomOf="@+id/ivFullyChargedIndicator"
171
+ app:layout_constraintBottom_toBottomOf="parent"
159
172
  app:layout_constraintEnd_toEndOf="parent"
160
- app:layout_constraintStart_toEndOf="@id/ivFullyChargedIndicator"
161
- app:layout_constraintTop_toBottomOf="@id/tvFullyChargedTitle" />
162
-
163
- </androidx.constraintlayout.widget.ConstraintLayout>
164
- </androidx.cardview.widget.CardView>
165
-
166
- <include
167
- android:id="@+id/commonButton"
168
- layout="@layout/layout_button"
169
- android:layout_width="match_parent"
170
- android:layout_height="wrap_content"
171
- app:layout_constraintBottom_toBottomOf="parent"
172
- app:layout_constraintEnd_toEndOf="parent"
173
- app:layout_constraintStart_toStartOf="parent" />
173
+ app:layout_constraintStart_toStartOf="parent" />
174
174
 
175
175
  </androidx.constraintlayout.widget.ConstraintLayout>
@@ -0,0 +1,32 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
+ xmlns:app="http://schemas.android.com/apk/res-auto"
4
+ xmlns:tools="http://schemas.android.com/tools"
5
+ android:id="@+id/main"
6
+ android:layout_width="match_parent"
7
+ android:layout_height="match_parent"
8
+ android:background="#E6000000"
9
+ tools:context=".activity.VideoActivity">
10
+
11
+ <com.pierfrancescosoffritti.androidyoutubeplayer.core.player.views.YouTubePlayerView
12
+ android:id="@+id/youtube_player_view"
13
+ android:layout_width="match_parent"
14
+ android:layout_height="wrap_content"
15
+ app:autoPlay="true"
16
+ app:layout_constraintBottom_toBottomOf="parent"
17
+ app:layout_constraintEnd_toEndOf="parent"
18
+ app:layout_constraintStart_toStartOf="parent"
19
+ app:layout_constraintTop_toTopOf="parent"
20
+ app:videoId="r5Zemc4R044" />
21
+
22
+ <FrameLayout
23
+ android:id="@+id/full_screen_view_container"
24
+ android:layout_width="match_parent"
25
+ android:layout_height="match_parent"
26
+ android:visibility="gone"
27
+ app:layout_constraintBottom_toBottomOf="parent"
28
+ app:layout_constraintEnd_toEndOf="parent"
29
+ app:layout_constraintStart_toStartOf="parent"
30
+ app:layout_constraintTop_toTopOf="parent" />
31
+
32
+ </androidx.constraintlayout.widget.ConstraintLayout>
@@ -100,11 +100,9 @@
100
100
  </style>
101
101
 
102
102
  <style name="CustomRadioButton" parent="Widget.AppCompat.CompoundButton.RadioButton">
103
- <item name="android:button">@drawable/transparent_drawable</item>
104
- <item name="android:background">@drawable/radio_button_background</item>
103
+ <item name="android:button">@null</item>
105
104
  <item name="android:padding">10dp</item>
106
105
  <item name="android:fontFamily">@font/roboto_regular</item>
107
- <item name="android:textColor">@color/radio_text_selector</item>
108
106
  </style>
109
107
 
110
108
 
@@ -263,6 +263,10 @@
263
263
  // 根据条件查询Receivedata表
264
264
 
265
265
  - (NSArray *)queryReceiveDataWithDevice:(Device *)currentDevice needUserBG:(BOOL)needUserBG {
266
+ if (!self.context) {
267
+ NSLog(@"Core Data context is nil");
268
+ return @[];
269
+ }
266
270
  NSEntityDescription *entity = [NSEntityDescription entityForName:@"ReceiveDataInfo" inManagedObjectContext:self.context];
267
271
  NSFetchRequest *request = [[NSFetchRequest alloc] init];
268
272
  NSPredicate *predicate;
@@ -273,6 +277,10 @@
273
277
  }
274
278
  request.entity = entity;
275
279
  request.predicate = predicate;
280
+ if (!entity) {
281
+ NSLog(@"Entity 'ReceiveDataInfo' not found in Core Data model");
282
+ return @[];
283
+ }
276
284
  NSArray *resendDatas = [self.context executeFetchRequest:request error:nil];
277
285
  resendDatas = [resendDatas sortedArrayUsingDescriptors:@[[NSSortDescriptor sortDescriptorWithKey:@"receiveDateTime" ascending:YES]]];
278
286
  return resendDatas;
@@ -102,10 +102,10 @@ const helpCGM = async token => {
102
102
  }
103
103
  };
104
104
  exports.helpCGM = helpCGM;
105
- const observeTransmitterUnbindStatusHandler = async token => {
105
+ const observeTransmitterUnbindStatusHandler = async (token, apiResponse) => {
106
106
  console.log('observeTransmitterUnbindStatusHandler====');
107
107
  try {
108
- const result = await cgmLib.observeTransmitterUnbindStatus(token);
108
+ const result = await cgmLib.observeTransmitterUnbindStatus(token, apiResponse);
109
109
  console.log(result);
110
110
  } catch (error) {
111
111
  console.error(error);
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","eventSubscription","LINKING_ERROR","Platform","select","ios","default","cgmLib","NativeModules","CgmTrackyLib","Proxy","get","Error","initializeCGMEventListener","callback","iosEventEmitter","NativeEventEmitter","remove","OS","DeviceEventEmitter","addListener","eventData","status","removeCGMEventListener","startCGM","token","console","log","result","startCgmTracky","error","exports","reconnectCGM","reconnectCgmTracky","observeAllGlucoseDataHandler","observeAllGlucoseData","deviceStatus","observeDeviceStatus","helpCGM","openHelpSupport","observeTransmitterUnbindStatusHandler","observeTransmitterUnbindStatus","observeResetLogoutHandler","resetCgmState","stopCGM"],"sources":["CGMConnect.ts"],"sourcesContent":["import { DeviceEventEmitter, EmitterSubscription, NativeEventEmitter, NativeModules, Platform } from \"react-native\";\n\n\n\n\nlet eventSubscription: EmitterSubscription | null = null;\n\nconst LINKING_ERROR =\n `The package 'react-native-mytatva-rn-sdk' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo Go\\n';\n\nconst cgmLib = NativeModules.CgmTrackyLib\n ? NativeModules.CgmTrackyLib\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\n\n\nfunction initializeCGMEventListener(\n callback: (eventData: any) => void\n) {\n const iosEventEmitter = new NativeEventEmitter(cgmLib);\n if (eventSubscription) {\n eventSubscription.remove();\n }\n\n if (Platform.OS === 'android') {\n eventSubscription = DeviceEventEmitter.addListener(\n 'cgmDeviceEvent',\n (eventData: any) => {\n const { status } = eventData;\n if (status === 'WARM_PERIOD_STARTED') {\n callback(eventData);\n } else {\n callback(eventData);\n }\n }\n );\n } \n else if (Platform.OS === 'ios' && iosEventEmitter) {\n eventSubscription = iosEventEmitter.addListener(\n 'cgmDeviceEvent',\n (eventData: any) => {\n const { status } = eventData;\n if (status === 'WARM_PERIOD_STARTED') {\n callback(eventData);\n } else {\n callback(eventData);\n }\n }\n );\n }\n}\n\nfunction removeCGMEventListener() {\n if (eventSubscription) {\n eventSubscription.remove();\n eventSubscription = null;\n }\n}\n\n\n\nconst startCGM = async (token: string) => {\n console.log('token====startCGM', token);\n try {\n const result = await cgmLib.startCgmTracky(token);\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n };\n\n const reconnectCGM = async (token: string) => {\n console.log('reconnectCGM====');\n try {\n const result = await cgmLib.reconnectCgmTracky(token);\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n };\n\n\n const observeAllGlucoseDataHandler = async (token: string) => {\n console.log('observeAllGlucoseDataHandler====');\n try {\n if(Platform.OS === 'android') { \n const result = await cgmLib.observeAllGlucoseData(token);\n const deviceStatus = await cgmLib.observeDeviceStatus(token);\n console.log(result);\n console.log(deviceStatus);\n }\n else if(Platform.OS === 'ios') {\n const result = await cgmLib.observeAllGlucoseData(token);\n console.log(result);\n }\n } catch (error) {\n console.log('error====', error);\n console.error(error);\n }\n };\n\n\nconst helpCGM = async (token: string) => {\n console.log('helpCGM====');\n try {\n const result = await cgmLib.openHelpSupport();\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n};\n\nconst observeTransmitterUnbindStatusHandler = async (token: string) => {\n console.log('observeTransmitterUnbindStatusHandler====');\n try {\n const result = await cgmLib.observeTransmitterUnbindStatus(token);\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n};\n\nconst observeResetLogoutHandler = async () => {\n console.log('observeResetLogoutHandler====');\n try {\n const result = await cgmLib.resetCgmState();\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n};\n\n\n\nconst stopCGM = async () => {\n // Implementation\n};\n\nexport { startCGM, stopCGM, initializeCGMEventListener, removeCGMEventListener, observeAllGlucoseDataHandler, reconnectCGM, helpCGM, observeTransmitterUnbindStatusHandler, observeResetLogoutHandler };"],"mappings":";;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAIC,iBAA6C,GAAG,IAAI;AAExD,MAAMC,aAAa,GACjB,sFAAsF,GAC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C,CAAC;IAC3CjB,OAAO,CAACC,GAAG,CAACC,MAAM,CAAC;EACrB,CAAC,CAAC,OAAOE,KAAK,EAAE;IACdJ,OAAO,CAACI,KAAK,CAACA,KAAK,CAAC;EACtB;AACF,CAAC;AAACC,OAAA,CAAAW,yBAAA,GAAAA,yBAAA;AAIF,MAAME,OAAO,GAAG,MAAAA,CAAA,KAAY;EAC1B;AAAA,CACD;AAACb,OAAA,CAAAa,OAAA,GAAAA,OAAA","ignoreList":[]}
1
+ {"version":3,"names":["_reactNative","require","eventSubscription","LINKING_ERROR","Platform","select","ios","default","cgmLib","NativeModules","CgmTrackyLib","Proxy","get","Error","initializeCGMEventListener","callback","iosEventEmitter","NativeEventEmitter","remove","OS","DeviceEventEmitter","addListener","eventData","status","removeCGMEventListener","startCGM","token","console","log","result","startCgmTracky","error","exports","reconnectCGM","reconnectCgmTracky","observeAllGlucoseDataHandler","observeAllGlucoseData","deviceStatus","observeDeviceStatus","helpCGM","openHelpSupport","observeTransmitterUnbindStatusHandler","apiResponse","observeTransmitterUnbindStatus","observeResetLogoutHandler","resetCgmState","stopCGM"],"sources":["CGMConnect.ts"],"sourcesContent":["import { DeviceEventEmitter, EmitterSubscription, NativeEventEmitter, NativeModules, Platform } from \"react-native\";\n\n\n\n\nlet eventSubscription: EmitterSubscription | null = null;\n\nconst LINKING_ERROR =\n `The package 'react-native-mytatva-rn-sdk' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo Go\\n';\n\nconst cgmLib = NativeModules.CgmTrackyLib\n ? NativeModules.CgmTrackyLib\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\n\n\nfunction initializeCGMEventListener(\n callback: (eventData: any) => void\n) {\n const iosEventEmitter = new NativeEventEmitter(cgmLib);\n if (eventSubscription) {\n eventSubscription.remove();\n }\n\n if (Platform.OS === 'android') {\n eventSubscription = DeviceEventEmitter.addListener(\n 'cgmDeviceEvent',\n (eventData: any) => {\n const { status } = eventData;\n if (status === 'WARM_PERIOD_STARTED') {\n callback(eventData);\n } else {\n callback(eventData);\n }\n }\n );\n } \n else if (Platform.OS === 'ios' && iosEventEmitter) {\n eventSubscription = iosEventEmitter.addListener(\n 'cgmDeviceEvent',\n (eventData: any) => {\n const { status } = eventData;\n if (status === 'WARM_PERIOD_STARTED') {\n callback(eventData);\n } else {\n callback(eventData);\n }\n }\n );\n }\n}\n\nfunction removeCGMEventListener() {\n if (eventSubscription) {\n eventSubscription.remove();\n eventSubscription = null;\n }\n}\n\n\n\nconst startCGM = async (token: string) => {\n console.log('token====startCGM', token);\n try {\n const result = await cgmLib.startCgmTracky(token);\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n };\n\n const reconnectCGM = async (token: string) => {\n console.log('reconnectCGM====');\n try {\n const result = await cgmLib.reconnectCgmTracky(token);\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n };\n\n\n const observeAllGlucoseDataHandler = async (token: string) => {\n console.log('observeAllGlucoseDataHandler====');\n try {\n if(Platform.OS === 'android') { \n const result = await cgmLib.observeAllGlucoseData(token);\n const deviceStatus = await cgmLib.observeDeviceStatus(token);\n console.log(result);\n console.log(deviceStatus);\n }\n else if(Platform.OS === 'ios') {\n const result = await cgmLib.observeAllGlucoseData(token);\n console.log(result);\n }\n } catch (error) {\n console.log('error====', error);\n console.error(error);\n }\n };\n\n\nconst helpCGM = async (token: string) => {\n console.log('helpCGM====');\n try {\n const result = await cgmLib.openHelpSupport();\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n};\n\nconst observeTransmitterUnbindStatusHandler = async (token: string, apiResponse: string) => {\n console.log('observeTransmitterUnbindStatusHandler====');\n try {\n const result = await cgmLib.observeTransmitterUnbindStatus(token, apiResponse);\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n};\n\nconst observeResetLogoutHandler = async () => {\n console.log('observeResetLogoutHandler====');\n try {\n const result = await cgmLib.resetCgmState();\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n};\n\n\n\nconst stopCGM = async () => {\n // Implementation\n};\n\nexport { startCGM, stopCGM, initializeCGMEventListener, removeCGMEventListener, observeAllGlucoseDataHandler, reconnectCGM, helpCGM, observeTransmitterUnbindStatusHandler, observeResetLogoutHandler };"],"mappings":";;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAIC,iBAA6C,GAAG,IAAI;AAExD,MAAMC,aAAa,GACjB,sFAAsF,GACtFC,qBAAQ,CAACC,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,MAAM,GAAGC,0BAAa,CAACC,YAAY,GACrCD,0BAAa,CAACC,YAAY,GAC1B,IAAIC,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACV,aAAa,CAAC;EAChC;AACF,CACF,CAAC;AAIL,SAASW,0BAA0BA,CACjCC,QAAkC,EAClC;EACA,MAAMC,eAAe,GAAG,IAAIC,+BAAkB,CAACT,MAAM,CAAC;EACtD,IAAIN,iBAAiB,EAAE;IACrBA,iBAAiB,CAACgB,MAAM,CAAC,CAAC;EAC5B;EAEA,IAAId,qBAAQ,CAACe,EAAE,KAAK,SAAS,EAAE;IAC7BjB,iBAAiB,GAAGkB,+BAAkB,CAACC,WAAW,CAChD,gBAAgB,EACfC,SAAc,IAAK;MAClB,MAAM;QAAEC;MAAO,CAAC,GAAGD,SAAS;MAC5B,IAAIC,MAAM,KAAK,qBAAqB,EAAE;QACpCR,QAAQ,CAACO,SAAS,CAAC;MACrB,CAAC,MAAM;QACLP,QAAQ,CAACO,SAAS,CAAC;MACrB;IACF,CACF,CAAC;EACH,CAAC,MACI,IAAIlB,qBAAQ,CAACe,EAAE,KAAK,KAAK,IAAIH,e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8B,CAACjB,KAAK,EAAEgB,WAAW,CAAC;IAC9Ef,OAAO,CAACC,GAAG,CAACC,MAAM,CAAC;EACrB,CAAC,CAAC,OAAOE,KAAK,EAAE;IACdJ,OAAO,CAACI,KAAK,CAACA,KAAK,CAAC;EACtB;AACF,CAAC;AAACC,OAAA,CAAAS,qCAAA,GAAAA,qCAAA;AAEF,MAAMG,yBAAyB,GAAG,MAAAA,CAAA,KAAY;EAC5CjB,OAAO,CAACC,GAAG,CAAC,+BAA+B,CAAC;EAC5C,IAAI;IACF,MAAMC,MAAM,GAAG,MAAMrB,MAAM,CAACqC,aAAa,CAAC,CAAC;IAC3ClB,OAAO,CAACC,GAAG,CAACC,MAAM,CAAC;EACrB,CAAC,CAAC,OAAOE,KAAK,EAAE;IACdJ,OAAO,CAACI,KAAK,CAACA,KAAK,CAAC;EACtB;AACF,CAAC;AAACC,OAAA,CAAAY,yBAAA,GAAAA,yBAAA;AAIF,MAAME,OAAO,GAAG,MAAAA,CAAA,KAAY;EAC1B;AAAA,CACD;AAACd,OAAA,CAAAc,OAAA,GAAAA,OAAA","ignoreList":[]}
@@ -88,10 +88,10 @@ const helpCGM = async token => {
88
88
  console.error(error);
89
89
  }
90
90
  };
91
- const observeTransmitterUnbindStatusHandler = async token => {
91
+ const observeTransmitterUnbindStatusHandler = async (token, apiResponse) => {
92
92
  console.log('observeTransmitterUnbindStatusHandler====');
93
93
  try {
94
- const result = await cgmLib.observeTransmitterUnbindStatus(token);
94
+ const result = await cgmLib.observeTransmitterUnbindStatus(token, apiResponse);
95
95
  console.log(result);
96
96
  } catch (error) {
97
97
  console.error(error);
@@ -1 +1 @@
1
- {"version":3,"names":["DeviceEventEmitter","NativeEventEmitter","NativeModules","Platform","eventSubscription","LINKING_ERROR","select","ios","default","cgmLib","CgmTrackyLib","Proxy","get","Error","initializeCGMEventListener","callback","iosEventEmitter","remove","OS","addListener","eventData","status","removeCGMEventListener","startCGM","token","console","log","result","startCgmTracky","error","reconnectCGM","reconnectCgmTracky","observeAllGlucoseDataHandler","observeAllGlucoseData","deviceStatus","observeDeviceStatus","helpCGM","openHelpSupport","observeTransmitterUnbindStatusHandler","observeTransmitterUnbindStatus","observeResetLogoutHandler","resetCgmState","stopCGM"],"sources":["CGMConnect.ts"],"sourcesContent":["import { DeviceEventEmitter, EmitterSubscription, NativeEventEmitter, NativeModules, Platform } from \"react-native\";\n\n\n\n\nlet eventSubscription: EmitterSubscription | null = null;\n\nconst LINKING_ERROR =\n `The package 'react-native-mytatva-rn-sdk' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo Go\\n';\n\nconst cgmLib = NativeModules.CgmTrackyLib\n ? NativeModules.CgmTrackyLib\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\n\n\nfunction initializeCGMEventListener(\n callback: (eventData: any) => void\n) {\n const iosEventEmitter = new NativeEventEmitter(cgmLib);\n if (eventSubscription) {\n eventSubscription.remove();\n }\n\n if (Platform.OS === 'android') {\n eventSubscription = DeviceEventEmitter.addListener(\n 'cgmDeviceEvent',\n (eventData: any) => {\n const { status } = eventData;\n if (status === 'WARM_PERIOD_STARTED') {\n callback(eventData);\n } else {\n callback(eventData);\n }\n }\n );\n } \n else if (Platform.OS === 'ios' && iosEventEmitter) {\n eventSubscription = iosEventEmitter.addListener(\n 'cgmDeviceEvent',\n (eventData: any) => {\n const { status } = eventData;\n if (status === 'WARM_PERIOD_STARTED') {\n callback(eventData);\n } else {\n callback(eventData);\n }\n }\n );\n }\n}\n\nfunction removeCGMEventListener() {\n if (eventSubscription) {\n eventSubscription.remove();\n eventSubscription = null;\n }\n}\n\n\n\nconst startCGM = async (token: string) => {\n console.log('token====startCGM', token);\n try {\n const result = await cgmLib.startCgmTracky(token);\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n };\n\n const reconnectCGM = async (token: string) => {\n console.log('reconnectCGM====');\n try {\n const result = await cgmLib.reconnectCgmTracky(token);\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n };\n\n\n const observeAllGlucoseDataHandler = async (token: string) => {\n console.log('observeAllGlucoseDataHandler====');\n try {\n if(Platform.OS === 'android') { \n const result = await cgmLib.observeAllGlucoseData(token);\n const deviceStatus = await cgmLib.observeDeviceStatus(token);\n console.log(result);\n console.log(deviceStatus);\n }\n else if(Platform.OS === 'ios') {\n const result = await cgmLib.observeAllGlucoseData(token);\n console.log(result);\n }\n } catch (error) {\n console.log('error====', error);\n console.error(error);\n }\n };\n\n\nconst helpCGM = async (token: string) => {\n console.log('helpCGM====');\n try {\n const result = await cgmLib.openHelpSupport();\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n};\n\nconst observeTransmitterUnbindStatusHandler = async (token: string) => {\n console.log('observeTransmitterUnbindStatusHandler====');\n try {\n const result = await cgmLib.observeTransmitterUnbindStatus(token);\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n};\n\nconst observeResetLogoutHandler = async () => {\n console.log('observeResetLogoutHandler====');\n try {\n const result = await cgmLib.resetCgmState();\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n};\n\n\n\nconst stopCGM = async () => {\n // Implementation\n};\n\nexport { startCGM, stopCGM, initializeCGMEventListener, removeCGMEventListener, observeAllGlucoseDataHandler, reconnectCGM, helpCGM, observeTransmitterUnbindStatusHandler, observeResetLogoutHandler };"],"mappings":"AAAA,SAASA,kBAAkB,EAAuBC,kBAAkB,EAAEC,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAKnH,IAAIC,iBAA6C,GAAG,IAAI;AAExD,MAAMC,aAAa,GACjB,sFAAsF,GACtFF,QAAQ,CAACG,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,MAAM,GAAGP,aAAa,CAACQ,YAAY,GACrCR,aA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viceEventEmitter","NativeEventEmitter","NativeModules","Platform","eventSubscription","LINKING_ERROR","select","ios","default","cgmLib","CgmTrackyLib","Proxy","get","Error","initializeCGMEventListener","callback","iosEventEmitter","remove","OS","addListener","eventData","status","removeCGMEventListener","startCGM","token","console","log","result","startCgmTracky","error","reconnectCGM","reconnectCgmTracky","observeAllGlucoseDataHandler","observeAllGlucoseData","deviceStatus","observeDeviceStatus","helpCGM","openHelpSupport","observeTransmitterUnbindStatusHandler","apiResponse","observeTransmitterUnbindStatus","observeResetLogoutHandler","resetCgmState","stopCGM"],"sources":["CGMConnect.ts"],"sourcesContent":["import { DeviceEventEmitter, EmitterSubscription, NativeEventEmitter, NativeModules, Platform } from \"react-native\";\n\n\n\n\nlet eventSubscription: EmitterSubscription | null = null;\n\nconst LINKING_ERROR =\n `The package 'react-native-mytatva-rn-sdk' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo Go\\n';\n\nconst cgmLib = NativeModules.CgmTrackyLib\n ? NativeModules.CgmTrackyLib\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\n\n\nfunction initializeCGMEventListener(\n callback: (eventData: any) => void\n) {\n const iosEventEmitter = new NativeEventEmitter(cgmLib);\n if (eventSubscription) {\n eventSubscription.remove();\n }\n\n if (Platform.OS === 'android') {\n eventSubscription = DeviceEventEmitter.addListener(\n 'cgmDeviceEvent',\n (eventData: any) => {\n const { status } = eventData;\n if (status === 'WARM_PERIOD_STARTED') {\n callback(eventData);\n } else {\n callback(eventData);\n }\n }\n );\n } \n else if (Platform.OS === 'ios' && iosEventEmitter) {\n eventSubscription = iosEventEmitter.addListener(\n 'cgmDeviceEvent',\n (eventData: any) => {\n const { status } = eventData;\n if (status === 'WARM_PERIOD_STARTED') {\n callback(eventData);\n } else {\n callback(eventData);\n }\n }\n );\n }\n}\n\nfunction removeCGMEventListener() {\n if (eventSubscription) {\n eventSubscription.remove();\n eventSubscription = null;\n }\n}\n\n\n\nconst startCGM = async (token: string) => {\n console.log('token====startCGM', token);\n try {\n const result = await cgmLib.startCgmTracky(token);\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n };\n\n const reconnectCGM = async (token: string) => {\n console.log('reconnectCGM====');\n try {\n const result = await cgmLib.reconnectCgmTracky(token);\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n };\n\n\n const observeAllGlucoseDataHandler = async (token: string) => {\n console.log('observeAllGlucoseDataHandler====');\n try {\n if(Platform.OS === 'android') { \n const result = await cgmLib.observeAllGlucoseData(token);\n const deviceStatus = await cgmLib.observeDeviceStatus(token);\n console.log(result);\n console.log(deviceStatus);\n }\n else if(Platform.OS === 'ios') {\n const result = await cgmLib.observeAllGlucoseData(token);\n console.log(result);\n }\n } catch (error) {\n console.log('error====', error);\n console.error(error);\n }\n };\n\n\nconst helpCGM = async (token: string) => {\n console.log('helpCGM====');\n try {\n const result = await cgmLib.openHelpSupport();\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n};\n\nconst observeTransmitterUnbindStatusHandler = async (token: string, apiResponse: string) => {\n console.log('observeTransmitterUnbindStatusHandler====');\n try {\n const result = await cgmLib.observeTransmitterUnbindStatus(token, apiResponse);\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n};\n\nconst observeResetLogoutHandler = async () => {\n console.log('observeResetLogoutHandler====');\n try {\n const result = await cgmLib.resetCgmState();\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n};\n\n\n\nconst stopCGM = async () => {\n // Implementation\n};\n\nexport { startCGM, stopCGM, initializeCGMEventListener, removeCGMEventListener, observeAllGlucoseDataHandler, reconnectCGM, helpCGM, observeTransmitterUnbindStatusHandler, observeResetLogoutHandler };"],"mappings":"AAAA,SAASA,kBAAkB,EAAuBC,kBAAkB,EAAEC,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAKnH,IAAIC,iBAA6C,GAAG,I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KAAK,CAAC;EACtB;AACF,CAAC;AAID,MAAMc,OAAO,GAAG,MAAAA,CAAA,KAAY;EAC1B;AAAA,CACD;AAED,SAASpB,QAAQ,EAAEoB,OAAO,EAAE7B,0BAA0B,EAAEQ,sBAAsB,EAAEU,4BAA4B,EAAEF,YAAY,EAAEM,OAAO,EAAEE,qCAAqC,EAAEG,yBAAyB","ignoreList":[]}
@@ -4,7 +4,7 @@ declare const startCGM: (token: string) => Promise<void>;
4
4
  declare const reconnectCGM: (token: string) => Promise<void>;
5
5
  declare const observeAllGlucoseDataHandler: (token: string) => Promise<void>;
6
6
  declare const helpCGM: (token: string) => Promise<void>;
7
- declare const observeTransmitterUnbindStatusHandler: (token: string) => Promise<void>;
7
+ declare const observeTransmitterUnbindStatusHandler: (token: string, apiResponse: string) => Promise<void>;
8
8
  declare const observeResetLogoutHandler: () => Promise<void>;
9
9
  declare const stopCGM: () => Promise<void>;
10
10
  export { startCGM, stopCGM, initializeCGMEventListener, removeCGMEventListener, observeAllGlucoseDataHandler, reconnectCGM, helpCGM, observeTransmitterUnbindStatusHandler, observeResetLogoutHandler };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-mytatva-rn-sdk",
3
- "version": "1.2.31",
3
+ "version": "1.2.33",
4
4
  "description": "a package to inject data into visit health pwa",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
package/src/CGMConnect.ts CHANGED
@@ -120,10 +120,10 @@ const helpCGM = async (token: string) => {
120
120
  }
121
121
  };
122
122
 
123
- const observeTransmitterUnbindStatusHandler = async (token: string) => {
123
+ const observeTransmitterUnbindStatusHandler = async (token: string, apiResponse: string) => {
124
124
  console.log('observeTransmitterUnbindStatusHandler====');
125
125
  try {
126
- const result = await cgmLib.observeTransmitterUnbindStatus(token);
126
+ const result = await cgmLib.observeTransmitterUnbindStatus(token, apiResponse);
127
127
  console.log(result);
128
128
  } catch (error) {
129
129
  console.error(error);