airbridge-react-native-sdk-restricted 2.8.9 → 2.9.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.
Files changed (142) hide show
  1. package/airbridge-react-native-sdk-restricted.podspec +1 -1
  2. package/android/build.gradle +1 -1
  3. package/android/src/main/java/co/ab180/airbridge/reactnative/AirbridgeInAppPurchase.java +32 -0
  4. package/android/src/main/java/co/ab180/airbridge/reactnative/AirbridgeRN.java +2 -1
  5. package/changelog.md +5 -0
  6. package/index.d.ts +40 -0
  7. package/ios/AirbridgeRN/AirbridgeInAppPurchase.h +16 -0
  8. package/ios/AirbridgeRN/AirbridgeInAppPurchase.m +30 -0
  9. package/ios/AirbridgeRN.xcodeproj/project.pbxproj +16 -0
  10. package/ios/copy-config.rb +1 -1
  11. package/package.json +1 -1
  12. package/src/Airbridge.js +25 -0
  13. package/src/InAppPurchase.js +38 -0
  14. package/src/WebInterface.js +1 -1
  15. package/.github/actions/add-github-check/action.yml +0 -78
  16. package/.github/actions/add-github-comment/action.yml +0 -48
  17. package/.github/actions/add-slack-message/action.yml +0 -32
  18. package/.github/actions/edit-github-check/action.yml +0 -59
  19. package/.github/actions/edit-github-comment/action.yml +0 -41
  20. package/.github/pull_request_template.md +0 -5
  21. package/.github/readme.md +0 -53
  22. package/.github/workflows/build.yml +0 -367
  23. package/.github/workflows/gitflow.yml +0 -20
  24. package/.github/workflows/release-restricted.yml +0 -35
  25. package/.github/workflows/release.yml +0 -32
  26. package/qa/.bundle/config +0 -2
  27. package/qa/.eslintrc.js +0 -4
  28. package/qa/.prettierrc.js +0 -7
  29. package/qa/.watchmanconfig +0 -1
  30. package/qa/Gemfile +0 -9
  31. package/qa/Gemfile.lock +0 -105
  32. package/qa/__tests__/App.test.tsx +0 -17
  33. package/qa/airbridge.json +0 -7
  34. package/qa/android/app/build.gradle +0 -130
  35. package/qa/android/app/debug.keystore +0 -0
  36. package/qa/android/app/google-services.json +0 -29
  37. package/qa/android/app/proguard-rules.pro +0 -10
  38. package/qa/android/app/src/debug/AndroidManifest.xml +0 -9
  39. package/qa/android/app/src/main/AndroidManifest.xml +0 -65
  40. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/ConfigurationLoader.kt +0 -49
  41. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/MainActivity.kt +0 -35
  42. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/MainApplication.kt +0 -46
  43. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/module/DeviceInfoInteractor.kt +0 -60
  44. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/module/DeviceInfoUtils.kt +0 -115
  45. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/module/IdentifiersInteractor.kt +0 -83
  46. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/module/InstallReferrerInteractor.kt +0 -91
  47. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/module/ModuleInjector.kt +0 -22
  48. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/module/PermissionInteractor.kt +0 -55
  49. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/module/UserInfoInteractor.kt +0 -74
  50. package/qa/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -37
  51. package/qa/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  52. package/qa/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  53. package/qa/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  54. package/qa/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  55. package/qa/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  56. package/qa/android/app/src/main/res/values/strings.xml +0 -3
  57. package/qa/android/app/src/main/res/values/styles.xml +0 -9
  58. package/qa/android/build.gradle +0 -28
  59. package/qa/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  60. package/qa/android/gradle/wrapper/gradle-wrapper.properties +0 -7
  61. package/qa/android/gradle.properties +0 -41
  62. package/qa/android/gradlew +0 -249
  63. package/qa/android/gradlew.bat +0 -92
  64. package/qa/android/settings.gradle +0 -4
  65. package/qa/app.json +0 -4
  66. package/qa/babel.config.js +0 -3
  67. package/qa/index.js +0 -5
  68. package/qa/ios/.xcode.env +0 -11
  69. package/qa/ios/AirbridgeQA/AirbridgeQA.entitlements +0 -17
  70. package/qa/ios/AirbridgeQA/AppDelegate.h +0 -6
  71. package/qa/ios/AirbridgeQA/AppDelegate.mm +0 -123
  72. package/qa/ios/AirbridgeQA/DeviceInfoInteractor.m +0 -14
  73. package/qa/ios/AirbridgeQA/DeviceInfoInteractor.swift +0 -151
  74. package/qa/ios/AirbridgeQA/IdentifiersInteractor.m +0 -14
  75. package/qa/ios/AirbridgeQA/IdentifiersInteractor.swift +0 -40
  76. package/qa/ios/AirbridgeQA/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
  77. package/qa/ios/AirbridgeQA/Images.xcassets/Contents.json +0 -6
  78. package/qa/ios/AirbridgeQA/Info.plist +0 -66
  79. package/qa/ios/AirbridgeQA/LaunchScreen.storyboard +0 -47
  80. package/qa/ios/AirbridgeQA/PermissionInteractor.m +0 -14
  81. package/qa/ios/AirbridgeQA/PermissionInteractor.swift +0 -19
  82. package/qa/ios/AirbridgeQA/PrivacyInfo.xcprivacy +0 -39
  83. package/qa/ios/AirbridgeQA/UserInfoInteractor.m +0 -57
  84. package/qa/ios/AirbridgeQA/UserInfoInteractor.swift +0 -49
  85. package/qa/ios/AirbridgeQA/main.m +0 -10
  86. package/qa/ios/AirbridgeQA.xcodeproj/project.pbxproj +0 -790
  87. package/qa/ios/AirbridgeQA.xcodeproj/xcshareddata/xcschemes/AirbridgeQA.xcscheme +0 -88
  88. package/qa/ios/AirbridgeQA.xcworkspace/contents.xcworkspacedata +0 -10
  89. package/qa/ios/AirbridgeQA.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  90. package/qa/ios/AirbridgeQATests/AirbridgeQATests.m +0 -66
  91. package/qa/ios/AirbridgeQATests/Info.plist +0 -24
  92. package/qa/ios/GoogleService-Info.plist +0 -30
  93. package/qa/ios/Library/airbridge-ios-sdk-qa-library.podspec +0 -26
  94. package/qa/ios/Podfile +0 -44
  95. package/qa/ios/Podfile.lock +0 -1634
  96. package/qa/jest.config.js +0 -3
  97. package/qa/metro.config.js +0 -67
  98. package/qa/package-lock.json +0 -14289
  99. package/qa/package.json +0 -47
  100. package/qa/resource/arrow_back.png +0 -0
  101. package/qa/resource/home.png +0 -0
  102. package/qa/resource/info.png +0 -0
  103. package/qa/resource/link.png +0 -0
  104. package/qa/resource/refresh.png +0 -0
  105. package/qa/resource/token.png +0 -0
  106. package/qa/source/App.js +0 -58
  107. package/qa/source/common/Colors.js +0 -20
  108. package/qa/source/common/FCMService.js +0 -94
  109. package/qa/source/common/Native.ts +0 -39
  110. package/qa/source/common/Storage.js +0 -13
  111. package/qa/source/common/Styles.js +0 -39
  112. package/qa/source/component/AttributeEntryInputDialog.js +0 -117
  113. package/qa/source/component/AttributeTypeInputDialog.js +0 -100
  114. package/qa/source/component/ConfirmDialog.js +0 -72
  115. package/qa/source/component/CustomButton.js +0 -50
  116. package/qa/source/component/CustomEventParamsDialog.js +0 -150
  117. package/qa/source/component/CustomTextInput.js +0 -40
  118. package/qa/source/component/EntryInputDialog.js +0 -89
  119. package/qa/source/component/HorizontalPreference.js +0 -46
  120. package/qa/source/component/ImageButton.js +0 -35
  121. package/qa/source/component/InjectInputDialog.js +0 -80
  122. package/qa/source/component/MessageDialog.js +0 -81
  123. package/qa/source/component/UrlInputDialog.js +0 -80
  124. package/qa/source/component/ValueInputDialog.js +0 -80
  125. package/qa/source/component/VerticalPreference.js +0 -42
  126. package/qa/source/navigations/Stack.js +0 -110
  127. package/qa/source/pages/Browse.js +0 -118
  128. package/qa/source/pages/DeviceInfo.js +0 -135
  129. package/qa/source/pages/Event.js +0 -171
  130. package/qa/source/pages/Home.js +0 -136
  131. package/qa/source/pages/Identifiers.js +0 -108
  132. package/qa/source/pages/InstallReferrer.js +0 -64
  133. package/qa/source/pages/Placement.js +0 -38
  134. package/qa/source/pages/RequestPermissions.tsx +0 -41
  135. package/qa/source/pages/UserInfo.js +0 -168
  136. package/qa/source/pages/appInfo.js +0 -22
  137. package/qa/tsconfig.json +0 -3
  138. package/scripts/addiOSFramework.js +0 -48
  139. package/scripts/build-qa.sh +0 -64
  140. package/scripts/change_restricted.sh +0 -21
  141. package/scripts/update_native_version.sh +0 -104
  142. package/source/module/Attribution.ts +0 -60
@@ -26,7 +26,7 @@ Pod::Spec.new do |s|
26
26
  s.public_header_files = 'ios/AirbridgeRN/AirbridgeRN.h'
27
27
 
28
28
  s.dependency 'React'
29
- s.dependency 'AirBridgeRestricted', '1.37.3'
29
+ s.dependency 'AirBridgeRestricted', '1.40.1'
30
30
 
31
31
  s.pod_target_xcconfig = {
32
32
  'DEFINES_MODULE' => 'YES'
@@ -25,7 +25,7 @@ rootProject.allprojects {
25
25
 
26
26
  dependencies {
27
27
  implementation 'com.facebook.react:react-native:+'
28
- api 'io.airbridge:sdk-android-restricted:2.25.0'
28
+ api 'io.airbridge:sdk-android-restricted:2.27.0'
29
29
  implementation 'com.android.installreferrer:installreferrer:2.1'
30
30
  }
31
31
 
@@ -0,0 +1,32 @@
1
+ package co.ab180.airbridge.reactnative;
2
+
3
+ import androidx.annotation.NonNull;
4
+
5
+ import com.facebook.react.bridge.ReactApplicationContext;
6
+ import com.facebook.react.bridge.ReactContextBaseJavaModule;
7
+ import com.facebook.react.bridge.ReactMethod;
8
+
9
+ import co.ab180.airbridge.Airbridge;
10
+
11
+ public class AirbridgeInAppPurchase extends ReactContextBaseJavaModule {
12
+
13
+ public AirbridgeInAppPurchase(ReactApplicationContext reactContext) {
14
+ super(reactContext);
15
+ }
16
+
17
+ @ReactMethod
18
+ public void startInAppPurchaseTracking() {
19
+ Airbridge.startInAppPurchaseTracking();
20
+ }
21
+
22
+ @ReactMethod
23
+ public void stopInAppPurchaseTracking() {
24
+ Airbridge.stopInAppPurchaseTracking();
25
+ }
26
+
27
+ @NonNull
28
+ @Override
29
+ public String getName() {
30
+ return "AirbridgeInAppPurchase";
31
+ }
32
+ }
@@ -95,7 +95,8 @@ public class AirbridgeRN implements ReactPackage {
95
95
  new AirbridgeState(reactContext),
96
96
  new AirbridgePlacement(reactContext),
97
97
  new AirbridgeAttribution(reactContext),
98
- new AirbridgeLifecycle(reactContext)
98
+ new AirbridgeLifecycle(reactContext),
99
+ new AirbridgeInAppPurchase(reactContext)
99
100
  );
100
101
  }
101
102
 
package/changelog.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 2.9.0
2
+
3
+ **ADDED**
4
+ * Add interface for IAP event tracking.
5
+
1
6
  ## 2.8.9
2
7
 
3
8
  **FIXED**
package/index.d.ts CHANGED
@@ -8,6 +8,7 @@ declare module "airbridge-react-native-sdk-restricted" {
8
8
  deeplink: Deeplink;
9
9
  state: State;
10
10
  placement: Placement;
11
+ inAppPurchase: InAppPurchase;
11
12
 
12
13
  /**
13
14
  * Set device alias
@@ -50,6 +51,24 @@ declare module "airbridge-react-native-sdk-restricted" {
50
51
  webToken: string,
51
52
  postCommandFunction: (command: string) => string,
52
53
  ): WebInterface;
54
+
55
+ /**
56
+ * make airbridge start in-app purchase tracking
57
+ * This function is experimental and may change in future versions.
58
+ * Use it with caution.
59
+ *
60
+ * @experimental
61
+ */
62
+ startInAppPurchaseTracking(): void;
63
+
64
+ /**
65
+ * make airbridge stop in-app purchase tracking
66
+ * This function is experimental and may change in future versions.
67
+ * Use it with caution.
68
+ *
69
+ * @experimental
70
+ */
71
+ stopInAppPurchaseTracking(): void;
53
72
  }
54
73
 
55
74
  /**
@@ -189,6 +208,27 @@ declare module "airbridge-react-native-sdk-restricted" {
189
208
  handle(command: string): void;
190
209
  }
191
210
 
211
+ class InAppPurchase {
212
+
213
+ /**
214
+ * make airbridge start in-app purchase tracking
215
+ * This function is experimental and may change in future versions.
216
+ * Use it with caution.
217
+ *
218
+ * @experimental
219
+ */
220
+ startInAppPurchaseTracking(): void;
221
+
222
+ /**
223
+ * make airbridge stop in-app purchase tracking
224
+ * This function is experimental and may change in future versions.
225
+ * Use it with caution.
226
+ *
227
+ * @experimental
228
+ */
229
+ stopInAppPurchaseTracking(): void;
230
+ }
231
+
192
232
  /**
193
233
  * @property {string} [action] event group name 1
194
234
  * @property {string} [label] event group name 2
@@ -0,0 +1,16 @@
1
+ //
2
+ // AirbridgeInAppPurchase.h
3
+ // Pods
4
+ //
5
+ // Created by ab180 on 3/6/25.
6
+ //
7
+
8
+ #import <React/RCTBridgeModule.h>
9
+
10
+ NS_ASSUME_NONNULL_BEGIN
11
+
12
+ @interface AirbridgeInAppPurchase : NSObject <RCTBridgeModule>
13
+
14
+ @end
15
+
16
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,30 @@
1
+ //
2
+ // AirbridgeInAppPurchase.m
3
+ // airbridge-react-native-sdk
4
+ //
5
+ // Created by ab180 on 3/6/25.
6
+ //
7
+
8
+ #import "AirbridgeInAppPurchase.h"
9
+
10
+ #import <Foundation/Foundation.h>
11
+
12
+ #import <AirBridge/AirBridge.h>
13
+
14
+ @implementation AirbridgeInAppPurchase
15
+
16
+ //
17
+ // react native method
18
+ //
19
+
20
+ RCT_EXPORT_MODULE();
21
+
22
+ RCT_EXPORT_METHOD(startInAppPurchaseTracking) {
23
+ [AirBridge startInAppPurchaseTracking];
24
+ }
25
+
26
+ RCT_EXPORT_METHOD(stopInAppPurchaseTracking) {
27
+ [AirBridge stopInAppPurchaseTracking];
28
+ }
29
+
30
+ @end
@@ -7,6 +7,10 @@
7
7
  objects = {
8
8
 
9
9
  /* Begin PBXBuildFile section */
10
+ 633D2E2C2D79B84B00130326 /* AirbridgeInAppPurchase.h in Headers */ = {isa = PBXBuildFile; fileRef = 633D2E2A2D79B84B00130326 /* AirbridgeInAppPurchase.h */; };
11
+ 633D2E2D2D79B84B00130326 /* AirbridgeInAppPurchase.m in Sources */ = {isa = PBXBuildFile; fileRef = 633D2E2B2D79B84B00130326 /* AirbridgeInAppPurchase.m */; };
12
+ 633D2E302D79B85700130326 /* AirbridgeAttribution.h in Headers */ = {isa = PBXBuildFile; fileRef = 633D2E2E2D79B85700130326 /* AirbridgeAttribution.h */; };
13
+ 633D2E312D79B85700130326 /* AirbridgeAttribution.m in Sources */ = {isa = PBXBuildFile; fileRef = 633D2E2F2D79B85700130326 /* AirbridgeAttribution.m */; };
10
14
  9F2C4C132B9EC9EE0064A9B7 /* ARNHex.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F2C4C112B9EC9EE0064A9B7 /* ARNHex.m */; };
11
15
  9F2C4C142B9EC9EE0064A9B7 /* ARNHex.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F2C4C122B9EC9EE0064A9B7 /* ARNHex.h */; };
12
16
  C300721F24A0B6C3003F8073 /* ARNConfigReader.h in Headers */ = {isa = PBXBuildFile; fileRef = C300721D24A0B6C3003F8073 /* ARNConfigReader.h */; };
@@ -55,6 +59,10 @@
55
59
 
56
60
  /* Begin PBXFileReference section */
57
61
  134814201AA4EA6300B7C361 /* libAirbridgeRN.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libAirbridgeRN.a; sourceTree = BUILT_PRODUCTS_DIR; };
62
+ 633D2E2A2D79B84B00130326 /* AirbridgeInAppPurchase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AirbridgeInAppPurchase.h; sourceTree = "<group>"; };
63
+ 633D2E2B2D79B84B00130326 /* AirbridgeInAppPurchase.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AirbridgeInAppPurchase.m; sourceTree = "<group>"; };
64
+ 633D2E2E2D79B85700130326 /* AirbridgeAttribution.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AirbridgeAttribution.h; sourceTree = "<group>"; };
65
+ 633D2E2F2D79B85700130326 /* AirbridgeAttribution.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AirbridgeAttribution.m; sourceTree = "<group>"; };
58
66
  9F2C4C112B9EC9EE0064A9B7 /* ARNHex.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARNHex.m; sourceTree = "<group>"; };
59
67
  9F2C4C122B9EC9EE0064A9B7 /* ARNHex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARNHex.h; sourceTree = "<group>"; };
60
68
  C300721D24A0B6C3003F8073 /* ARNConfigReader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ARNConfigReader.h; sourceTree = "<group>"; };
@@ -114,6 +122,10 @@
114
122
  C3BF1EDF2264485C00271B03 /* AirbridgeRN */ = {
115
123
  isa = PBXGroup;
116
124
  children = (
125
+ 633D2E2E2D79B85700130326 /* AirbridgeAttribution.h */,
126
+ 633D2E2F2D79B85700130326 /* AirbridgeAttribution.m */,
127
+ 633D2E2A2D79B84B00130326 /* AirbridgeInAppPurchase.h */,
128
+ 633D2E2B2D79B84B00130326 /* AirbridgeInAppPurchase.m */,
117
129
  9F2C4C122B9EC9EE0064A9B7 /* ARNHex.h */,
118
130
  9F2C4C112B9EC9EE0064A9B7 /* ARNHex.m */,
119
131
  C34284B42266E7040060226A /* AirbridgeRN.h */,
@@ -146,8 +158,10 @@
146
158
  C34284B62266E7040060226A /* AirbridgeRN.h in Headers */,
147
159
  C39C1CD123029BD100CECBD8 /* AirbridgePlacement.h in Headers */,
148
160
  C355603C226427C000D6D240 /* AirbridgeEvent.h in Headers */,
161
+ 633D2E2C2D79B84B00130326 /* AirbridgeInAppPurchase.h in Headers */,
149
162
  C35560342264267700D6D240 /* AirbridgeDeeplink.h in Headers */,
150
163
  C35819CA2273324400DCD619 /* AirbridgeState.h in Headers */,
164
+ 633D2E302D79B85700130326 /* AirbridgeAttribution.h in Headers */,
151
165
  C300721F24A0B6C3003F8073 /* ARNConfigReader.h in Headers */,
152
166
  );
153
167
  runOnlyForDeploymentPostprocessing = 0;
@@ -236,9 +250,11 @@
236
250
  C355603D226427C000D6D240 /* AirbridgeEvent.m in Sources */,
237
251
  C39C1CD223029BD100CECBD8 /* AirbridgePlacement.m in Sources */,
238
252
  C35819CB2273324400DCD619 /* AirbridgeState.m in Sources */,
253
+ 633D2E312D79B85700130326 /* AirbridgeAttribution.m in Sources */,
239
254
  C300722024A0B6C3003F8073 /* ARNConfigReader.m in Sources */,
240
255
  C37E9CFA249856EC00BC790F /* ARNGet.m in Sources */,
241
256
  9F2C4C132B9EC9EE0064A9B7 /* ARNHex.m in Sources */,
257
+ 633D2E2D2D79B84B00130326 /* AirbridgeInAppPurchase.m in Sources */,
242
258
  C34284B72266E7040060226A /* AirbridgeRN.m in Sources */,
243
259
  C35560352264267700D6D240 /* AirbridgeDeeplink.m in Sources */,
244
260
  );
@@ -10,7 +10,7 @@ ios_project_file=File.join(
10
10
 
11
11
  project = Xcodeproj::Project.open(ios_project_file)
12
12
  target = project.targets.first
13
- phase = target.shell_script_build_phases().bsearch {|phase| phase.name == "[Airbridge] Copy airbridge.json"}
13
+ phase = target.shell_script_build_phases().select {|phase| phase.name == "[Airbridge] Copy airbridge.json"}[0]
14
14
  script = (
15
15
  "if [ -r ${SRCROOT}/../airbridge.json ]; then" + "\n" \
16
16
  + " cp ${SRCROOT}/../airbridge.json ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/airbridge.json" + "\n" \
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "airbridge-react-native-sdk-restricted",
3
- "version": "2.8.9",
3
+ "version": "2.9.0",
4
4
  "description": "Airbridge SDK for React Native",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
package/src/Airbridge.js CHANGED
@@ -3,6 +3,7 @@ import Deeplink from './Deeplink';
3
3
  import State from './State';
4
4
  import Placement from './Placement';
5
5
  import WebInterface from './WebInterface';
6
+ import InAppPurchase from './InAppPurchase';
6
7
 
7
8
  /**
8
9
  * @class Airbridge
@@ -21,6 +22,8 @@ class Airbridge {
21
22
  this.state = State;
22
23
  /** @type {Placement} */
23
24
  this.placement = Placement;
25
+ /** @type {InAppPurchase} */
26
+ this.inAppPurchase = InAppPurchase
24
27
  }
25
28
 
26
29
  /**
@@ -77,6 +80,28 @@ class Airbridge {
77
80
  createWebInterface(webToken, postCommandFunction) {
78
81
  return new WebInterface(webToken, postCommandFunction, this.state, this.event);
79
82
  }
83
+
84
+ /**
85
+ * make airbridge start in-app purchase tracking
86
+ * This function is experimental and may change in future versions.
87
+ * Use it with caution.
88
+ *
89
+ * @experimental
90
+ */
91
+ startInAppPurchaseTracking() {
92
+ this.inAppPurchase.startInAppPurchaseTracking();
93
+ }
94
+
95
+ /**
96
+ * make airbridge stop in-app purchase tracking
97
+ * This function is experimental and may change in future versions.
98
+ * Use it with caution.
99
+ *
100
+ * @experimental
101
+ */
102
+ stopInAppPurchaseTracking() {
103
+ this.inAppPurchase.stopInAppPurchaseTracking();
104
+ }
80
105
  }
81
106
 
82
107
  export default new Airbridge();
@@ -0,0 +1,38 @@
1
+ import { NativeModules } from 'react-native';
2
+ import _ from './tool/_';
3
+
4
+ const { AirbridgeInAppPurchase } = NativeModules;
5
+
6
+ /**
7
+ * class for In-app Purhcase tracking (singleton)
8
+ */
9
+ class InAppPurchase {
10
+ /**
11
+ * @hideconstructor
12
+ */
13
+ constructor() {}
14
+
15
+ /**
16
+ * make airbridge start in-app purchase tracking
17
+ * This function is experimental and may change in future versions.
18
+ * Use it with caution.
19
+ *
20
+ * @experimental
21
+ */
22
+ startInAppPurchaseTracking() {
23
+ AirbridgeInAppPurchase.startInAppPurchaseTracking();
24
+ }
25
+
26
+ /**
27
+ * make airbridge stop in-app purchase tracking
28
+ * This function is experimental and may change in future versions.
29
+ * Use it with caution.
30
+ *
31
+ * @experimental
32
+ */
33
+ stopInAppPurchaseTracking() {
34
+ AirbridgeInAppPurchase.stopInAppPurchaseTracking();
35
+ }
36
+ }
37
+
38
+ export default new InAppPurchase();
@@ -26,7 +26,7 @@ class WebInterface {
26
26
 
27
27
  const getScript = function (webToken, postCommand) {
28
28
  const jsonSchemaVersion = 4;
29
- const sdkVersion = '2.8.9';
29
+ const sdkVersion = '2.9.0';
30
30
 
31
31
  return `
32
32
  AirbridgeNative = {};
@@ -1,78 +0,0 @@
1
- name: 'Add GitHub check'
2
- description: Add GitHub check
3
-
4
- inputs:
5
- owner:
6
- description: Owner of repository
7
- type: string
8
- default: ${context.repo.owner}
9
- required: false
10
- repository:
11
- description: Repository of release
12
- type: string
13
- default: ${context.repo.repo}
14
- required: false
15
- name:
16
- description: Name of check
17
- type: string
18
- default: ${{ github.workflow }}
19
- required: false
20
- pull-request-number:
21
- description: Pull request of check
22
- type: string
23
- default: ${context.issue.number}
24
- required: false
25
- detail-url:
26
- description: Detail URL of check
27
- type: string
28
- default: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
29
- required: false
30
- conclusion:
31
- description: Conclusion of check if status is completed (success, failure)
32
- type: string
33
- default: 'success'
34
- required: false
35
- token:
36
- description: GitHub Token
37
- type: string
38
- required: false
39
- status:
40
- description: Status of check (queued, in_progress, completed)
41
- type: string
42
- required: true
43
-
44
- outputs:
45
- check-id:
46
- description: ID of added check
47
- value: ${{ steps.add-check.outputs.result }}
48
- runs:
49
- using: 'composite'
50
- steps:
51
- - name: Add check
52
- id: add-check
53
- uses: actions/github-script@v7
54
- with:
55
- script: |
56
- const { data: { id: id } } = await github.rest.checks.create({
57
- owner: `${{ inputs.owner }}`,
58
- repo: `${{ inputs.repository }}`,
59
- name: `${{ inputs.name }}`,
60
- head_sha: await (async () => {
61
- const { data: { head: { sha: sha } } } = await github.rest.pulls.get({
62
- owner: `${{ inputs.owner }}`,
63
- repo: `${{ inputs.repository }}`,
64
- pull_number: `${{ inputs.pull-request-number }}`,
65
- })
66
- return sha
67
- })(),
68
- details_url: `${{ inputs.detail-url }}`,
69
- status: `${{ inputs.status }}`,
70
- conclusion: (() => {
71
- if (`${{ inputs.status }}` !== 'completed') {
72
- return undefined
73
- }
74
- return `${{ inputs.conclusion }}`
75
- })(),
76
- })
77
- return id
78
- github-token: ${{ inputs.token || env.GITHUB_TOKEN || github.token }}
@@ -1,48 +0,0 @@
1
- name: 'Add GitHub comment'
2
- description: Add GitHub comment
3
-
4
- inputs:
5
- issue-number:
6
- description: Issue to comment
7
- type: string
8
- default: ${context.issue.number}
9
- required: false
10
- owner:
11
- description: Owner of repository
12
- type: string
13
- default: ${context.repo.owner}
14
- required: false
15
- repository:
16
- description: Repository of release
17
- type: string
18
- default: ${context.repo.repo}
19
- required: false
20
- token:
21
- description: GitHub Token
22
- type: string
23
- required: false
24
- comment:
25
- description: Comment
26
- type: string
27
- required: true
28
-
29
- outputs:
30
- comment-id:
31
- description: ID of added comment
32
- value: ${{ steps.add-comment.outputs.result }}
33
- runs:
34
- using: 'composite'
35
- steps:
36
- - name: Add comment
37
- id: add-comment
38
- uses: actions/github-script@v7
39
- with:
40
- script: |
41
- const { data: { id: id } } = await github.rest.issues.createComment({
42
- issue_number: `${{ inputs.issue-number }}`,
43
- owner: `${{ inputs.owner }}`,
44
- repo: `${{ inputs.repository }}`,
45
- body: `${{ inputs.comment }}`,
46
- })
47
- return id
48
- github-token: ${{ inputs.token || env.GITHUB_TOKEN || github.token }}
@@ -1,32 +0,0 @@
1
- name: 'Add Slack message'
2
- description: Add Slack message
3
-
4
- inputs:
5
- incoming-webhook-url:
6
- description: Slack incoming webhook url to add message
7
- type: string
8
- required: true
9
- message:
10
- description: Message
11
- type: string
12
- required: true
13
-
14
- runs:
15
- using: 'composite'
16
- steps:
17
- - name: Add Slack message
18
- uses: slackapi/slack-github-action@v1.25.0
19
- with:
20
- payload: |
21
- {
22
- "blocks": [{
23
- "type": "section",
24
- "text": {
25
- "type": "mrkdwn",
26
- "text": "${{ inputs.message }}"
27
- }
28
- }]
29
- }
30
- env:
31
- SLACK_WEBHOOK_URL: ${{ inputs.incoming-webhook-url }}
32
- SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
@@ -1,59 +0,0 @@
1
- name: 'Edit GitHub check'
2
- description: Edit GitHub check
3
-
4
- inputs:
5
- owner:
6
- description: Owner of repository
7
- type: string
8
- default: ${context.repo.owner}
9
- required: false
10
- repository:
11
- description: Repository of release
12
- type: string
13
- default: ${context.repo.repo}
14
- required: false
15
- check-id:
16
- description: Check id to edit
17
- type: string
18
- required: true
19
- detail-url:
20
- description: Detail URL of check
21
- type: string
22
- default: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
23
- required: false
24
- conclusion:
25
- description: Conclusion of check if status is completed (success, failure)
26
- type: string
27
- default: 'success'
28
- required: false
29
- token:
30
- description: GitHub Token
31
- type: string
32
- required: false
33
- status:
34
- description: Status of check (queued, in_progress, completed)
35
- type: string
36
- required: true
37
-
38
- runs:
39
- using: 'composite'
40
- steps:
41
- - name: Edit check
42
- id: edit-check
43
- uses: actions/github-script@v7
44
- with:
45
- script: |
46
- await github.rest.checks.update({
47
- owner: `${{ inputs.owner }}`,
48
- repo: `${{ inputs.repository }}`,
49
- check_run_id: `${{ inputs.check-id }}`,
50
- details_url: `${{ inputs.detail-url }}`,
51
- status: `${{ inputs.status }}`,
52
- conclusion: (() => {
53
- if (`${{ inputs.status }}` !== `completed`) {
54
- return undefined
55
- }
56
- return `${{ inputs.conclusion }}`
57
- })(),
58
- })
59
- github-token: ${{ inputs.token || env.GITHUB_TOKEN || github.token }}
@@ -1,41 +0,0 @@
1
- name: 'Edit GitHub comment'
2
- description: Edit GitHub comment
3
-
4
- inputs:
5
- owner:
6
- description: Owner of repository
7
- type: string
8
- default: ${context.repo.owner}
9
- required: false
10
- repository:
11
- description: Repository of release
12
- type: string
13
- default: ${context.repo.repo}
14
- required: false
15
- comment-id:
16
- description: Comment id to edit
17
- type: string
18
- required: true
19
- token:
20
- description: GitHub Token
21
- type: string
22
- required: false
23
- comment:
24
- description: Comment
25
- type: string
26
- required: true
27
-
28
- runs:
29
- using: 'composite'
30
- steps:
31
- - name: Edit comment
32
- uses: actions/github-script@v7
33
- with:
34
- script: |
35
- await github.rest.issues.updateComment({
36
- owner: `${{ inputs.owner }}`,
37
- repo: `${{ inputs.repository }}`,
38
- comment_id: `${{ inputs.comment-id }}`,
39
- body: `${{ inputs.comment }}`,
40
- })
41
- github-token: ${{ inputs.token || env.GITHUB_TOKEN || github.token }}
@@ -1,5 +0,0 @@
1
- ## Summary
2
- -
3
-
4
- ## Changes
5
- -
package/.github/readme.md DELETED
@@ -1,53 +0,0 @@
1
- # airbridge-react-native-sdk
2
-
3
- ## Requirements
4
-
5
- * Xcode
6
- * Android Studio
7
- * Cocoapods
8
- * Node.js
9
-
10
- ## Test
11
-
12
- 1. cd qa
13
- 2. `npm run ios` or `npm run android`
14
-
15
- > Run application using Xcode or Android Studio can lead below error.
16
-
17
- ```
18
- No bundle URL present.
19
-
20
- Make sure you're running a packager server or have included a .jsbundle file in your application bundle.
21
- ```
22
-
23
- ## Deployment
24
-
25
- ### Release
26
-
27
- ```
28
- npm publish
29
- ```
30
-
31
- ## Monitoring
32
-
33
- * Newrelic
34
- * 접속: https://insights.newrelic.com/
35
- * Kibana
36
- * 접속: http://kibana.ab180.co
37
- * Index pattern: `airbridge-fmt-*-event-results-*`
38
- * Snowflake
39
- * 접속: https://sj55259.ap-northeast-1.aws.snowflakecomputing.com/console
40
-
41
- ## Logging
42
-
43
- * Kibana
44
- * 접속: http://kibana.ab180.co
45
- * Index pattern: `airbridge-sdk-logs*`
46
-
47
- ## Disability Response Manual
48
-
49
- ### Revert
50
-
51
- ```
52
- npm unpublish airbridge-react-native-sdk@{version}
53
- ```