react-native-insider 5.0.1 → 5.1.0-nh

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.
@@ -5,4 +5,4 @@
5
5
  # the repo. Unless a later match takes precedence,
6
6
  # @global-owner1 and @global-owner2 will be requested for
7
7
  # review when someone opens a pull request.
8
- * @MahammadMD @tugcearar
8
+ * @melih-useinsider
@@ -10,7 +10,7 @@ jobs:
10
10
  runs-on: ubuntu-latest
11
11
  steps:
12
12
  - name: Repository Dispatch
13
- uses: peter-evans/repository-dispatch@v1
13
+ uses: peter-evans/repository-dispatch@v2
14
14
  with:
15
15
  token: ${{ secrets.GIT_TOKEN }}
16
16
  repository: useinsider/mobile-devops
@@ -0,0 +1,12 @@
1
+ name: gitleaks
2
+ on: [push]
3
+
4
+ jobs:
5
+ gitleaks:
6
+ runs-on: self-hosted
7
+ steps:
8
+ - uses: actions/checkout@v3
9
+ with:
10
+ fetch-depth: '2'
11
+ - name: gitleaks-action
12
+ uses: zricethezav/gitleaks-action@master
@@ -0,0 +1,63 @@
1
+ name: React Native Insider Release
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ version_name:
7
+ required: true
8
+ description: The new version name of the SDK to be released (5.0.2)
9
+
10
+ jobs:
11
+ release:
12
+ if: github.actor == 'sonerdm' || github.actor == 'melih-useinsider'
13
+ name: Create Release
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ - name: Checkout code
18
+ uses: actions/checkout@v3
19
+ with:
20
+ ref: develop
21
+
22
+ - name: Setup node
23
+ uses: actions/setup-node@v3.2.0
24
+ with:
25
+ node-version: 12
26
+ registry-url: https://registry.npmjs.org/
27
+
28
+ - name: Publish RN SDK
29
+ run: |
30
+ npm ci
31
+ npm test
32
+ npm publish
33
+ text=":atom_symbol: React Native SDK is published with version: ${{ github.event.inputs.version_name }}"
34
+ ./slack_notifier.sh mob-deployment mob-sdk-releaser "$text"
35
+ env:
36
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
37
+
38
+ release-nh:
39
+ needs: release
40
+ name: Create NH Release
41
+ runs-on: ubuntu-latest
42
+
43
+ steps:
44
+ - name: Checkout code
45
+ uses: actions/checkout@v3
46
+ with:
47
+ ref: develop-nh
48
+
49
+ - name: Setup node
50
+ uses: actions/setup-node@v3.2.0
51
+ with:
52
+ node-version: 12
53
+ registry-url: https://registry.npmjs.org/
54
+
55
+ - name: Publish RN NH SDK
56
+ run: |
57
+ npm ci
58
+ npm test
59
+ npm publish
60
+ text=":atom_symbol: React Native NH SDK is published with version: ${{ github.event.inputs.version_name }}-nh"
61
+ ./slack_notifier.sh mob-deployment mob-sdk-releaser "$text"
62
+ env:
63
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -0,0 +1,22 @@
1
+ name: Release Task Merger
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ version_name:
7
+ required: true
8
+ description: The new version name of the SDK to be released (5.0.2)
9
+
10
+ jobs:
11
+ sdk_releaser:
12
+ if: github.actor == 'sonerdm' || github.actor == 'melih-useinsider'
13
+ name: Trigger mobile-devops repository task merger
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - name: Repository Dispatch
17
+ uses: peter-evans/repository-dispatch@v1
18
+ with:
19
+ token: ${{ secrets.GIT_TOKEN }}
20
+ repository: useinsider/mobile-devops
21
+ event-type: sdk-release-module
22
+ client-payload: '{"repo-name": "react-native-insider", "sdk_version_name": "${{ github.event.inputs.version_name }}"}'
@@ -0,0 +1,41 @@
1
+ name: Release Version Setter
2
+
3
+ on:
4
+ repository_dispatch:
5
+ types: [trigger-release-version-setter]
6
+
7
+ jobs:
8
+ release_version_setter:
9
+ name: Run Version Setter
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Checkout code
13
+ uses: actions/checkout@v3
14
+ with:
15
+ ref: develop
16
+
17
+ - name: Configure AWS credentials
18
+ uses: aws-actions/configure-aws-credentials@v1
19
+ with:
20
+ aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
21
+ aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
22
+ aws-region: eu-west-1
23
+
24
+ - name: Run release_version.sh
25
+ run: |
26
+ ./release_version.sh ${{ github.event.client_payload.sdk_version_name }}
27
+
28
+ - name: Push changes to develop
29
+ run: |
30
+ git config --global user.name 'sonerdm'
31
+ git config --global user.email 'soner@useinsider.com'
32
+ git remote set-url origin https://x-access-token:${{ secrets.GIT_TOKEN }}@github.com/${{ github.repository }}
33
+ git commit -am "Release version ${{ github.event.client_payload.sdk_version_name }}"
34
+ git push
35
+ env:
36
+ GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
37
+
38
+ - name: Notify QAs
39
+ run: |
40
+ text=":tatakae: React Native SDK is ready to test with version: ${{ github.event.client_payload.sdk_version_name }} <!subteam^SUUGFQNVA|mobileqa>"
41
+ ./slack_notifier.sh mob-deployment mob-sdk-releaser "$text"
package/RNInsider.podspec CHANGED
@@ -9,11 +9,11 @@ Pod::Spec.new do |s|
9
9
  s.authors = package_json['author']
10
10
  s.license = 'MIT'
11
11
  s.platform = :ios, '10.0'
12
- s.source = {:http => 'https://mobilesdk.useinsider.com/iOS/12.0.0/InsiderMobileIOSFramework.zip'}
12
+ s.source = {:http => 'https://mobilesdk.useinsider.com/iOS/12.4.0/InsiderMobileIOSFramework.zip'}
13
13
  s.source_files = 'ios/RNInsider/*.{h,m}'
14
14
  s.requires_arc = true
15
15
  s.static_framework = true
16
16
  s.dependency 'React'
17
- s.dependency 'InsiderMobile', '12.0.0'
17
+ s.dependency 'InsiderMobile', '12.4.0'
18
18
  s.dependency 'InsiderHybrid', '1.1.2'
19
19
  end
@@ -1,4 +1,3 @@
1
-
2
1
  buildscript {
3
2
  repositories {
4
3
  jcenter()
@@ -9,7 +8,7 @@ buildscript {
9
8
  }
10
9
 
11
10
  dependencies {
12
- classpath 'com.android.tools.build:gradle:3.6.1'
11
+ classpath 'com.android.tools.build:gradle:7.2.1'
13
12
  }
14
13
  }
15
14
 
@@ -20,10 +19,10 @@ def getVersionFromPartner(config, fallback) {
20
19
  }
21
20
 
22
21
  android {
23
- compileSdkVersion getVersionFromPartner('compileSdkVersion', 30)
22
+ compileSdkVersion getVersionFromPartner('compileSdkVersion', 32)
24
23
 
25
24
  defaultConfig {
26
- minSdkVersion getVersionFromPartner('minSdkVersion', 17)
25
+ minSdkVersion getVersionFromPartner('minSdkVersion', 19)
27
26
  multiDexEnabled true
28
27
  }
29
28
  }
@@ -36,18 +35,14 @@ android {
36
35
 
37
36
  dependencies {
38
37
  implementation "com.facebook.react:react-native:${getVersionFromPartner('reactNativeVersion', '+')}"
39
- implementation ('com.useinsider:insider:13.0.2')
38
+
39
+ implementation ('com.useinsider:insider:13.3.1-nh')
40
40
  implementation ('com.useinsider:insiderhybrid:1.1.3')
41
41
 
42
- implementation 'com.google.android.play:core:1.10.3'
43
42
  implementation 'androidx.legacy:legacy-support-v4:1.0.0'
44
- implementation 'com.google.android.gms:play-services-location:17.0.0'
45
- implementation 'com.google.firebase:firebase-messaging:20.0.0'
46
- implementation 'com.google.android.gms:play-services-ads:16.0.0'
47
- implementation 'androidx.lifecycle:lifecycle-process:2.3.1'
48
-
49
- implementation 'com.huawei.hms:push:5.3.0.304'
50
- implementation 'com.huawei.hms:ads-identifier:3.4.34.301'
51
- implementation 'com.huawei.hms:location:4.0.4.300'
43
+ implementation 'com.google.android.gms:play-services-location:20.0.0'
44
+ implementation 'com.google.android.gms:play-services-ads:21.0.0'
45
+ implementation 'com.google.firebase:firebase-messaging:23.0.5'
46
+ implementation 'androidx.lifecycle:lifecycle-process:2.4.1'
52
47
 
53
48
  }
@@ -223,6 +223,15 @@ public class RNInsiderModule extends ReactContextBaseJavaModule {
223
223
  }
224
224
  }
225
225
 
226
+ @ReactMethod
227
+ public void setWhatsappOptin(boolean whatsappOptin) {
228
+ try {
229
+ Insider.Instance.getCurrentUser().setWhatsappOptin(whatsappOptin);
230
+ } catch (Exception e) {
231
+ Insider.Instance.putException(e);
232
+ }
233
+ }
234
+
226
235
  @ReactMethod
227
236
  public void login(ReadableMap identifiers) {
228
237
  try {
@@ -592,10 +601,6 @@ public class RNInsiderModule extends ReactContextBaseJavaModule {
592
601
  }
593
602
  String provider = Insider.Instance.getCurrentProvider(reactContext);
594
603
  switch (provider) {
595
- case "huawei":
596
- com.huawei.hms.push.RemoteMessage hmsRemoteMessage = new com.huawei.hms.push.RemoteMessage.Builder("insider").setData(remoteMessageStringMap).build();
597
- Insider.Instance.handleHMSNotification(reactContext, hmsRemoteMessage);
598
- break;
599
604
  case "other":
600
605
  case "google":
601
606
  RemoteMessage fcmRemoteMessage = new RemoteMessage.Builder("insider").setData(remoteMessageStringMap).build();
@@ -0,0 +1,7 @@
1
+ 5.0.2 RELEASE
2
+
3
+ Updated Android to 13.1.0
4
+ MOB-11450 | Cart Page Issue Fixed
5
+ MOB-11160 | Packages Updated
6
+ MOB-11541 | JSON parsed data for Android Message Center Added
7
+ MOB-10883 | Watsapp Optin Added
package/index.js CHANGED
@@ -155,6 +155,22 @@ export default class RNInsider {
155
155
  Insider.putErrorLog(generateJSONErrorString(error));
156
156
  }
157
157
  }
158
+
159
+ static getMessageCenterDataArray(limit: number, startDate: Date, endDate: Date, callback: Function) {
160
+ if (shouldNotProceed() || limit == null || startDate == null || endDate == null || callback == null || startDate.getTime() === endDate.getTime() ||
161
+ startDate.getTime() > endDate.getTime()) return;
162
+ try {
163
+ Insider.getMessageCenterData(limit, startDate.toISOString(), endDate.toISOString(), (messageCenterData) => {
164
+ if (Platform.OS !== 'ios') {
165
+ callback(JSON.parse(messageCenterData || '[]'));
166
+ return;
167
+ }
168
+ callback(messageCenterData.data);
169
+ });
170
+ } catch (error) {
171
+ Insider.putErrorLog(generateJSONErrorString(error));
172
+ }
173
+ }
158
174
 
159
175
  static getSmartRecommendation(recommendationID: number, locale: string, currency: string, callback: Function) {
160
176
  if (shouldNotProceed() || recommendationID == null || locale == null || currency == null || callback == null) return;
@@ -245,14 +261,14 @@ export default class RNInsider {
245
261
 
246
262
  static visitCartPage(products: Array<RNInsiderProduct>) {
247
263
  if (shouldNotProceed() || products == null) return;
248
- let productMap = {};
249
264
  let mappedProducts = new Array(products.length);
250
265
  try {
251
- products.forEach((product, i) => {
252
- productMap['productMustMap'] = product.productMustMap;
253
- productMap['productOptMap'] = product.productOptMap;
254
- mappedProducts[i] = productMap;
255
- });
266
+ products.forEach((product, i) => {
267
+ let productMap = {};
268
+ productMap['productMustMap'] = product.productMustMap;
269
+ productMap['productOptMap'] = product.productOptMap;
270
+ mappedProducts[i] = productMap;
271
+ });
256
272
  Insider.visitCartPage(mappedProducts);
257
273
  } catch (error) {
258
274
  Insider.putErrorLog(generateJSONErrorString(error));
@@ -152,6 +152,14 @@ RCT_EXPORT_METHOD(setLocationOptin:(BOOL)value) {
152
152
  }
153
153
  }
154
154
 
155
+ RCT_EXPORT_METHOD(setWhatsappOptin:(BOOL)value) {
156
+ @try {
157
+ [Insider getCurrentUser].setWhatsappOptin(value);
158
+ } @catch (NSException *e) {
159
+ [Insider sendError:e desc:[NSString stringWithFormat:@"%s:%d", __func__, __LINE__]];
160
+ }
161
+ }
162
+
155
163
  RCT_EXPORT_METHOD(login:(NSDictionary *)identifiers) {
156
164
  @try {
157
165
  if (!identifiers) return;
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
- "name": "react-native-insider",
3
- "version": "5.0.1",
4
- "description": "React Native Insider SDK",
5
- "main": "index.js",
6
- "keywords": [
7
- "react-native",
8
- "ios",
9
- "android",
10
- "notifications",
11
- "push",
12
- "apns",
13
- "fcm",
14
- "insider"
15
- ],
16
- "author": "insidermobile",
17
- "homepage": "https://github.com/useinsider/react-native-insider"
2
+ "name": "react-native-insider",
3
+ "version": "5.1.0-nh",
4
+ "description": "React Native Insider SDK",
5
+ "main": "index.js",
6
+ "keywords": [
7
+ "react-native",
8
+ "ios",
9
+ "android",
10
+ "notifications",
11
+ "push",
12
+ "apns",
13
+ "fcm",
14
+ "insider"
15
+ ],
16
+ "author": "insidermobile",
17
+ "homepage": "https://github.com/useinsider/react-native-insider"
18
18
  }
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env bash
2
+
3
+ NEW_RN_VERSION_NAME=$1
4
+
5
+ packagejson_file_path="package.json"
6
+ podspec_file_path="RNInsider.podspec"
7
+ gradle_file_path="android/build.gradle"
8
+
9
+ CURRENT_RN_SDK_VERSION=$(sed -n 3p $packagejson_file_path | cut -d '"' -f 4)
10
+
11
+ CURRENT_iOS_VERSION=$(sed -n 17p $podspec_file_path | awk '{print $3}' | sed 's/^.//;s/.$//')
12
+ CURRENT_iOS_HYBRID_VERSION=$(sed -n 18p $podspec_file_path | awk '{print $3}' | sed 's/^.//;s/.$//')
13
+
14
+ CURRENT_ANDROID_VERSION=$(sed -n 39p $gradle_file_path | awk '{print $2}' | awk -F : '{print $3}' | cut -d "'" -f 1)
15
+ CURRENT_ANDROID_HYBRID_VERSION=$(sed -n 40p $gradle_file_path | awk '{print $2}' | awk -F : '{print $3}' | cut -d "'" -f 1)
16
+
17
+ LATEST_iOS_VERSION=$(aws s3 ls s3://mobilesdk.useinsider.com/iOS/ --recursive | sort | tail -n 1 | awk '{print $4}' | awk -F / '{print $2}')
18
+ LATEST_iOS_HYBRID_VERSION=$(aws s3 ls s3://mobilesdk.useinsider.com/iOSHybrid/ --recursive | sort | tail -n 1 | awk '{print $4}' | awk -F / '{print $2}')
19
+
20
+ LATEST_ANDROID_VERSION=$(aws s3 ls s3://mobilesdk.useinsider.com/android/com/useinsider/insider/ --recursive | sort | tail -n 1 | awk '{print $4}' | awk -F / '{print $5}' | cut -d "-" -f 1)
21
+ LATEST_ANDROID_HYBRID_VERSION=$(aws s3 ls s3://mobilesdk.useinsider.com/android/com/useinsider/insiderhybrid/ --recursive | sort | tail -n 1 | awk '{print $4}' | awk -F / '{print $5}')
22
+
23
+ # Set new version in package.json
24
+ sed -i "s/$CURRENT_RN_SDK_VERSION/$NEW_RN_VERSION_NAME/" $packagejson_file_path
25
+
26
+ # Set new version in podspec
27
+ sed -i "s/$CURRENT_iOS_VERSION/$LATEST_iOS_VERSION/;s/$CURRENT_iOS_HYBRID_VERSION/$LATEST_iOS_HYBRID_VERSION/" $podspec_file_path
28
+
29
+ # Set new version in build.gradle
30
+ sed -i "s/$CURRENT_ANDROID_VERSION/$LATEST_ANDROID_VERSION/;s/$CURRENT_ANDROID_HYBRID_VERSION/$LATEST_ANDROID_HYBRID_VERSION/" $gradle_file_path
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env bash
2
+ SLACK_ENDPOINT="https://mobile.useinsider.com/api/lilith/slack_notifier"
3
+
4
+ CHANNEL=$1
5
+ USERNAME=$2
6
+ TEXT="$3"
7
+
8
+ generate_post_data()
9
+ {
10
+ cat <<EOF
11
+ {
12
+ "channel": "$CHANNEL",
13
+ "message": "$TEXT",
14
+ "username": "$USERNAME"
15
+ }
16
+ EOF
17
+ }
18
+
19
+ curl -i -H "Content-Type:application/json" -X POST --data "$(generate_post_data)" $SLACK_ENDPOINT >/dev/null 2>&1
@@ -4,257 +4,267 @@ import RNInsiderIdentifier from 'react-native-insider/src/InsiderIdentifier';
4
4
  const Insider = NativeModules.RNInsider;
5
5
 
6
6
  function shouldNotProceed() {
7
- return Insider == null;
7
+ return Insider == null;
8
8
  }
9
9
 
10
10
  function generateJSONErrorString(error) {
11
- return '[JavaScript Error] ' + error;
11
+ return '[JavaScript Error] ' + error;
12
12
  }
13
13
 
14
14
  export default class RNInsiderUser {
15
- setGender(value: number) {
16
- if (shouldNotProceed() || value == null) return this;
17
- try {
18
- Insider.setGender(value);
19
- } catch (error) {
20
- Insider.putErrorLog(generateJSONErrorString(error));
15
+ setGender(value: number) {
16
+ if (shouldNotProceed() || value == null) return this;
17
+ try {
18
+ Insider.setGender(value);
19
+ } catch (error) {
20
+ Insider.putErrorLog(generateJSONErrorString(error));
21
+ }
22
+ return this;
21
23
  }
22
- return this;
23
- }
24
24
 
25
- setBirthday(value: Date) {
26
- if (shouldNotProceed() || value == null) return this;
27
- try {
28
- Insider.setBirthday(value.toISOString());
29
- } catch (error) {
30
- Insider.putErrorLog(generateJSONErrorString(error));
25
+ setBirthday(value: Date) {
26
+ if (shouldNotProceed() || value == null) return this;
27
+ try {
28
+ Insider.setBirthday(value.toISOString());
29
+ } catch (error) {
30
+ Insider.putErrorLog(generateJSONErrorString(error));
31
+ }
32
+ return this;
31
33
  }
32
- return this;
33
- }
34
34
 
35
- setName(value: string) {
36
- if (shouldNotProceed() || value == null) return this;
37
- try {
38
- Insider.setName(value);
39
- } catch (error) {
40
- Insider.putErrorLog(generateJSONErrorString(error));
35
+ setName(value: string) {
36
+ if (shouldNotProceed() || value == null) return this;
37
+ try {
38
+ Insider.setName(value);
39
+ } catch (error) {
40
+ Insider.putErrorLog(generateJSONErrorString(error));
41
+ }
42
+ return this;
41
43
  }
42
- return this;
43
- }
44
44
 
45
- setSurname(value: string) {
46
- if (shouldNotProceed() || value == null) return this;
47
- try {
48
- Insider.setSurname(value);
49
- } catch (error) {
50
- Insider.putErrorLog(generateJSONErrorString(error));
45
+ setSurname(value: string) {
46
+ if (shouldNotProceed() || value == null) return this;
47
+ try {
48
+ Insider.setSurname(value);
49
+ } catch (error) {
50
+ Insider.putErrorLog(generateJSONErrorString(error));
51
+ }
52
+ return this;
51
53
  }
52
- return this;
53
- }
54
54
 
55
- setAge(value: number) {
56
- if (shouldNotProceed() || value == null) return this;
57
- try {
58
- Insider.setAge(value);
59
- } catch (error) {
60
- Insider.putErrorLog(generateJSONErrorString(error));
55
+ setAge(value: number) {
56
+ if (shouldNotProceed() || value == null) return this;
57
+ try {
58
+ Insider.setAge(value);
59
+ } catch (error) {
60
+ Insider.putErrorLog(generateJSONErrorString(error));
61
+ }
62
+ return this;
61
63
  }
62
- return this;
63
- }
64
64
 
65
- // setEmail(value: string) {
66
- // if (shouldNotProceed() || value == null) return this;
67
- // try {
68
- // Insider.setEmail(value);
69
- // } catch (error) {
70
- // Insider.putErrorLog(generateJSONErrorString(error));
71
- // }
72
- // return this;
73
- // }
65
+ // setEmail(value: string) {
66
+ // if (shouldNotProceed() || value == null) return this;
67
+ // try {
68
+ // Insider.setEmail(value);
69
+ // } catch (error) {
70
+ // Insider.putErrorLog(generateJSONErrorString(error));
71
+ // }
72
+ // return this;
73
+ // }
74
74
 
75
- // setPhoneNumber(value: string) {
76
- // if (shouldNotProceed() || value == null) return this;
77
- // try {
78
- // Insider.setPhoneNumber(value);
79
- // } catch (error) {
80
- // Insider.putErrorLog(generateJSONErrorString(error));
81
- // }
82
- // return this;
83
- // }
75
+ // setPhoneNumber(value: string) {
76
+ // if (shouldNotProceed() || value == null) return this;
77
+ // try {
78
+ // Insider.setPhoneNumber(value);
79
+ // } catch (error) {
80
+ // Insider.putErrorLog(generateJSONErrorString(error));
81
+ // }
82
+ // return this;
83
+ // }
84
84
 
85
- setLanguage(value: string) {
86
- if (shouldNotProceed() || value == null) return this;
87
- try {
88
- Insider.setLanguage(value);
89
- } catch (error) {
90
- Insider.putErrorLog(generateJSONErrorString(error));
85
+ setLanguage(value: string) {
86
+ if (shouldNotProceed() || value == null) return this;
87
+ try {
88
+ Insider.setLanguage(value);
89
+ } catch (error) {
90
+ Insider.putErrorLog(generateJSONErrorString(error));
91
+ }
92
+ return this;
91
93
  }
92
- return this;
93
- }
94
94
 
95
- setLocale(value: string) {
96
- if (shouldNotProceed() || value == null) return this;
97
- try {
98
- Insider.setLocale(value);
99
- } catch (error) {
100
- Insider.putErrorLog(generateJSONErrorString(error));
95
+ setLocale(value: string) {
96
+ if (shouldNotProceed() || value == null) return this;
97
+ try {
98
+ Insider.setLocale(value);
99
+ } catch (error) {
100
+ Insider.putErrorLog(generateJSONErrorString(error));
101
+ }
102
+ return this;
101
103
  }
102
- return this;
103
- }
104
104
 
105
- setFacebookID(value: string) {
106
- if (shouldNotProceed() || value == null) return this;
107
- try {
108
- Insider.setFacebookID(value);
109
- } catch (error) {
110
- Insider.putErrorLog(generateJSONErrorString(error));
105
+ setFacebookID(value: string) {
106
+ if (shouldNotProceed() || value == null) return this;
107
+ try {
108
+ Insider.setFacebookID(value);
109
+ } catch (error) {
110
+ Insider.putErrorLog(generateJSONErrorString(error));
111
+ }
112
+ return this;
111
113
  }
112
- return this;
113
- }
114
114
 
115
- setTwitterID(value: string) {
116
- if (shouldNotProceed() || value == null) return this;
117
- try {
118
- Insider.setTwitterID(value);
119
- } catch (error) {
120
- Insider.putErrorLog(generateJSONErrorString(error));
115
+ setTwitterID(value: string) {
116
+ if (shouldNotProceed() || value == null) return this;
117
+ try {
118
+ Insider.setTwitterID(value);
119
+ } catch (error) {
120
+ Insider.putErrorLog(generateJSONErrorString(error));
121
+ }
122
+ return this;
121
123
  }
122
- return this;
123
- }
124
124
 
125
- setEmailOptin(value: boolean) {
126
- if (shouldNotProceed() || value == null) return this;
127
- try {
128
- Insider.setEmailOptin(value);
129
- } catch (error) {
130
- Insider.putErrorLog(generateJSONErrorString(error));
125
+ setEmailOptin(value: boolean) {
126
+ if (shouldNotProceed() || value == null) return this;
127
+ try {
128
+ Insider.setEmailOptin(value);
129
+ } catch (error) {
130
+ Insider.putErrorLog(generateJSONErrorString(error));
131
+ }
132
+ return this;
131
133
  }
132
- return this;
133
- }
134
134
 
135
- setSMSOptin(value: boolean) {
136
- if (shouldNotProceed() || value == null) return this;
137
- try {
138
- Insider.setSMSOptin(value);
139
- } catch (error) {
140
- Insider.putErrorLog(generateJSONErrorString(error));
135
+ setSMSOptin(value: boolean) {
136
+ if (shouldNotProceed() || value == null) return this;
137
+ try {
138
+ Insider.setSMSOptin(value);
139
+ } catch (error) {
140
+ Insider.putErrorLog(generateJSONErrorString(error));
141
+ }
142
+ return this;
141
143
  }
142
- return this;
143
- }
144
144
 
145
- setPushOptin(value: boolean) {
146
- if (shouldNotProceed() || value == null) return this;
147
- try {
148
- Insider.setPushOptin(value);
149
- } catch (error) {
150
- Insider.putErrorLog(generateJSONErrorString(error));
145
+ setPushOptin(value: boolean) {
146
+ if (shouldNotProceed() || value == null) return this;
147
+ try {
148
+ Insider.setPushOptin(value);
149
+ } catch (error) {
150
+ Insider.putErrorLog(generateJSONErrorString(error));
151
+ }
152
+ return this;
151
153
  }
152
- return this;
153
- }
154
154
 
155
- setLocationOptin(value: boolean) {
156
- if (shouldNotProceed() || value == null) return this;
157
- try {
158
- Insider.setLocationOptin(value);
159
- } catch (error) {
160
- Insider.putErrorLog(generateJSONErrorString(error));
155
+ setLocationOptin(value: boolean) {
156
+ if (shouldNotProceed() || value == null) return this;
157
+ try {
158
+ Insider.setLocationOptin(value);
159
+ } catch (error) {
160
+ Insider.putErrorLog(generateJSONErrorString(error));
161
+ }
162
+ return this;
161
163
  }
162
- return this;
163
- }
164
164
 
165
- login(identifiers: RNInsiderIdentifier, insiderIDResult: Function) {
166
- if (shouldNotProceed()) {return this;}
167
- try {
168
- if (insiderIDResult != null) {
169
- Insider.loginWithReturningID(identifiers.identifiers, insiderIDResult);
165
+ setWhatsappOptin(value: boolean) {
166
+ if (shouldNotProceed() || value == null) return this;
167
+ try {
168
+ Insider.setWhatsappOptin(value);
169
+ } catch (error) {
170
+ Insider.putErrorLog(generateJSONErrorString(error));
171
+ }
172
+ return this;
173
+ }
174
+
175
+ login(identifiers: RNInsiderIdentifier, insiderIDResult: Function) {
176
+ if (shouldNotProceed()) { return this; }
177
+ try {
178
+ if (insiderIDResult != null) {
179
+ Insider.loginWithReturningID(identifiers.identifiers, insiderIDResult);
170
180
 
171
- return;
172
- }
181
+ return;
182
+ }
173
183
 
174
- Insider.login(identifiers.identifiers);
175
- } catch (error) {
176
- Insider.putErrorLog(generateJSONErrorString(error));
184
+ Insider.login(identifiers.identifiers);
185
+ } catch (error) {
186
+ Insider.putErrorLog(generateJSONErrorString(error));
187
+ }
188
+ return this;
177
189
  }
178
- return this;
179
- }
180
190
 
181
- logout() {
182
- if (shouldNotProceed()) return this;
183
- try {
184
- Insider.logout();
185
- } catch (error) {
186
- Insider.putErrorLog(generateJSONErrorString(error));
191
+ logout() {
192
+ if (shouldNotProceed()) return this;
193
+ try {
194
+ Insider.logout();
195
+ } catch (error) {
196
+ Insider.putErrorLog(generateJSONErrorString(error));
197
+ }
198
+ return this;
187
199
  }
188
- return this;
189
- }
190
200
 
191
- setCustomAttributeWithString(key: string, value: string) {
192
- if (shouldNotProceed() || key == null || value == null) return this;
193
- try {
194
- Insider.setCustomAttributeWithString(key, value);
195
- } catch (error) {
196
- Insider.putErrorLog(generateJSONErrorString(error));
201
+ setCustomAttributeWithString(key: string, value: string) {
202
+ if (shouldNotProceed() || key == null || value == null) return this;
203
+ try {
204
+ Insider.setCustomAttributeWithString(key, value);
205
+ } catch (error) {
206
+ Insider.putErrorLog(generateJSONErrorString(error));
207
+ }
208
+ return this;
197
209
  }
198
- return this;
199
- }
200
210
 
201
- setCustomAttributeWithInt(key: string, value: number) {
202
- if (shouldNotProceed() || key == null || value == null) return this;
203
- try {
204
- Insider.setCustomAttributeWithInt(key, value);
205
- } catch (error) {
206
- Insider.putErrorLog(generateJSONErrorString(error));
211
+ setCustomAttributeWithInt(key: string, value: number) {
212
+ if (shouldNotProceed() || key == null || value == null) return this;
213
+ try {
214
+ Insider.setCustomAttributeWithInt(key, value);
215
+ } catch (error) {
216
+ Insider.putErrorLog(generateJSONErrorString(error));
217
+ }
218
+ return this;
207
219
  }
208
- return this;
209
- }
210
220
 
211
- setCustomAttributeWithDouble(key: string, value: number) {
212
- if (shouldNotProceed() || key == null || value == null) return this;
213
- try {
214
- Insider.setCustomAttributeWithDouble(key, value);
215
- } catch (error) {
216
- Insider.putErrorLog(generateJSONErrorString(error));
221
+ setCustomAttributeWithDouble(key: string, value: number) {
222
+ if (shouldNotProceed() || key == null || value == null) return this;
223
+ try {
224
+ Insider.setCustomAttributeWithDouble(key, value);
225
+ } catch (error) {
226
+ Insider.putErrorLog(generateJSONErrorString(error));
227
+ }
228
+ return this;
217
229
  }
218
- return this;
219
- }
220
230
 
221
- setCustomAttributeWithBoolean(key: string, value: boolean) {
222
- if (shouldNotProceed() || key == null || value == null) return this;
223
- try {
224
- Insider.setCustomAttributeWithBoolean(key, value);
225
- } catch (error) {
226
- Insider.putErrorLog(generateJSONErrorString(error));
231
+ setCustomAttributeWithBoolean(key: string, value: boolean) {
232
+ if (shouldNotProceed() || key == null || value == null) return this;
233
+ try {
234
+ Insider.setCustomAttributeWithBoolean(key, value);
235
+ } catch (error) {
236
+ Insider.putErrorLog(generateJSONErrorString(error));
237
+ }
238
+ return this;
227
239
  }
228
- return this;
229
- }
230
240
 
231
- setCustomAttributeWithDate(key: string, value: Date) {
232
- if (shouldNotProceed() || key == null || value == null) return this;
233
- try {
234
- Insider.setCustomAttributeWithDate(key, value.toISOString());
235
- } catch (error) {
236
- Insider.putErrorLog(generateJSONErrorString(error));
241
+ setCustomAttributeWithDate(key: string, value: Date) {
242
+ if (shouldNotProceed() || key == null || value == null) return this;
243
+ try {
244
+ Insider.setCustomAttributeWithDate(key, value.toISOString());
245
+ } catch (error) {
246
+ Insider.putErrorLog(generateJSONErrorString(error));
247
+ }
248
+ return this;
237
249
  }
238
- return this;
239
- }
240
250
 
241
- setCustomAttributeWithArray(key: string, value: string[]) {
242
- if (shouldNotProceed() || key == null || value == null) return this;
243
- try {
244
- Insider.setCustomAttributeWithArray(key, value);
245
- } catch (error) {
246
- Insider.putErrorLog(generateJSONErrorString(error));
251
+ setCustomAttributeWithArray(key: string, value: string[]) {
252
+ if (shouldNotProceed() || key == null || value == null) return this;
253
+ try {
254
+ Insider.setCustomAttributeWithArray(key, value);
255
+ } catch (error) {
256
+ Insider.putErrorLog(generateJSONErrorString(error));
257
+ }
258
+ return this;
247
259
  }
248
- return this;
249
- }
250
260
 
251
- unsetCustomAttribute(key: string) {
252
- if (shouldNotProceed() || key == null) return this;
253
- try {
254
- Insider.unsetCustomAttribute(key);
255
- } catch (error) {
256
- Insider.putErrorLog(generateJSONErrorString(error));
261
+ unsetCustomAttribute(key: string) {
262
+ if (shouldNotProceed() || key == null) return this;
263
+ try {
264
+ Insider.unsetCustomAttribute(key);
265
+ } catch (error) {
266
+ Insider.putErrorLog(generateJSONErrorString(error));
267
+ }
268
+ return this;
257
269
  }
258
- return this;
259
- }
260
- }
270
+ }
@@ -1,59 +0,0 @@
1
- name: NPM Publish
2
-
3
- on:
4
- push:
5
- tags:
6
- - "*"
7
-
8
- jobs:
9
- release:
10
- name: Create Release
11
- runs-on: ubuntu-latest
12
-
13
- steps:
14
- - name: Checkout code
15
- uses: actions/checkout@v2
16
- with:
17
- ref: develop
18
-
19
- - name: Set release name
20
- run: echo "RELEASE_NAME=$(echo ${GITHUB_REF:10})" >> $GITHUB_ENV
21
-
22
- - name: Create release
23
- id: create_release
24
- uses: actions/create-release@v1
25
- env:
26
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27
- with:
28
- tag_name: ${{ github.ref }}
29
- release_name: ${{ env.RELEASE_NAME }}
30
- body_path: changelog/${{ env.RELEASE_NAME }}.md
31
- draft: false
32
- prerelease: false
33
- build:
34
- runs-on: ubuntu-latest
35
- steps:
36
- - uses: actions/checkout@v2
37
- - uses: actions/setup-node@v1
38
- with:
39
- node-version: 12
40
- - run: npm ci
41
- - run: npm test
42
-
43
- publish-npm:
44
- needs: build
45
- runs-on: ubuntu-latest
46
- steps:
47
- - uses: actions/checkout@v2
48
- - uses: actions/setup-node@v1
49
- with:
50
- node-version: 12
51
- registry-url: https://registry.npmjs.org/
52
- - run: npm ci
53
- - run: npm publish
54
- env:
55
- NODE_AUTH_TOKEN: ${{secrets.npm_token}}
56
- - run: |
57
- text=":atom_symbol: A new version of React Native SDK is published."
58
- object='{"text": "'"$text"'"}'
59
- curl -X POST -H 'Content-type: application/json' --data "$object" https://hooks.slack.com/services/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
@@ -1,58 +0,0 @@
1
- name: NPM Publish
2
-
3
- on:
4
- repository_dispatch:
5
- types: sdk-deploy
6
-
7
- jobs:
8
- release:
9
- name: Create Release
10
- runs-on: ubuntu-latest
11
-
12
- steps:
13
- - name: Checkout code
14
- uses: actions/checkout@v2
15
- with:
16
- ref: develop
17
-
18
- - name: Set release name
19
- run: echo "RELEASE_NAME=${{ github.event.client_payload.sdk_version }}" >> $GITHUB_ENV
20
-
21
- - name: Create release
22
- id: create_release
23
- uses: actions/create-release@v1
24
- env:
25
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26
- with:
27
- tag_name: ${{ github.event.client_payload.sdk_version }}
28
- release_name: ${{ env.RELEASE_NAME }}
29
- body: ${{ github.event.client_payload.description }}
30
- draft: false
31
- prerelease: false
32
- build:
33
- runs-on: ubuntu-latest
34
- steps:
35
- - uses: actions/checkout@v2
36
- - uses: actions/setup-node@v1
37
- with:
38
- node-version: 12
39
- - run: npm ci
40
- - run: npm test
41
-
42
- publish-npm:
43
- needs: build
44
- runs-on: ubuntu-latest
45
- steps:
46
- - uses: actions/checkout@v2
47
- - uses: actions/setup-node@v1
48
- with:
49
- node-version: 12
50
- registry-url: https://registry.npmjs.org/
51
- - run: npm ci
52
- - run: npm publish
53
- env:
54
- NODE_AUTH_TOKEN: ${{secrets.npm_token}}
55
- - run: |
56
- text=":atom_symbol: A new version of React Native SDK is published."
57
- object='{"text": "'"$text"'"}'
58
- curl -X POST -H 'Content-type: application/json' --data "$object" https://hooks.slack.com/services/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
@@ -1,3 +0,0 @@
1
- 5.0.1 RELEASE
2
-
3
- Updatyed Play Core Library 1.10.3