api-gateway-react-native 0.1.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 (51) hide show
  1. package/ApiGatwayReactNativeSdk.podspec +36 -0
  2. package/LICENSE +20 -0
  3. package/README.md +159 -0
  4. package/android/build.gradle +84 -0
  5. package/android/gradle.properties +5 -0
  6. package/android/libs/apiGateway-release.aar +0 -0
  7. package/android/src/main/AndroidManifest.xml +2 -0
  8. package/android/src/main/java/com/apigatwayreactnativesdk/ApiGatwayReactNativeSdkModule.kt +32 -0
  9. package/android/src/main/java/com/apigatwayreactnativesdk/ApiGatwayReactNativeSdkPackage.kt +19 -0
  10. package/ios/ApiGatewayReactNativeSdk-Bridging-Header.h +3 -0
  11. package/ios/ApiGatewayWrapper.swift +26 -0
  12. package/ios/ApiGatwayReactNativeSdk.h +4 -0
  13. package/ios/ApiGatwayReactNativeSdk.mm +29 -0
  14. package/ios/TNApiGetwaySDK.xcframework/Info.plist +44 -0
  15. package/ios/TNApiGetwaySDK.xcframework/ios-arm64/TNApiGetwaySDK.framework/Headers/TNApiGatewayCrypto.h +34 -0
  16. package/ios/TNApiGetwaySDK.xcframework/ios-arm64/TNApiGetwaySDK.framework/Headers/TNApiGetwaySDK.h +13 -0
  17. package/ios/TNApiGetwaySDK.xcframework/ios-arm64/TNApiGetwaySDK.framework/Info.plist +0 -0
  18. package/ios/TNApiGetwaySDK.xcframework/ios-arm64/TNApiGetwaySDK.framework/Modules/TNApiGetwaySDK.swiftmodule/arm64-apple-ios.abi.json +1419 -0
  19. package/ios/TNApiGetwaySDK.xcframework/ios-arm64/TNApiGetwaySDK.framework/Modules/TNApiGetwaySDK.swiftmodule/arm64-apple-ios.private.swiftinterface +57 -0
  20. package/ios/TNApiGetwaySDK.xcframework/ios-arm64/TNApiGetwaySDK.framework/Modules/TNApiGetwaySDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  21. package/ios/TNApiGetwaySDK.xcframework/ios-arm64/TNApiGetwaySDK.framework/Modules/TNApiGetwaySDK.swiftmodule/arm64-apple-ios.swiftinterface +57 -0
  22. package/ios/TNApiGetwaySDK.xcframework/ios-arm64/TNApiGetwaySDK.framework/Modules/module.modulemap +6 -0
  23. package/ios/TNApiGetwaySDK.xcframework/ios-arm64/TNApiGetwaySDK.framework/TNApiGetwaySDK +0 -0
  24. package/ios/TNApiGetwaySDK.xcframework/ios-arm64/TNApiGetwaySDK.framework/_CodeSignature/CodeResources +201 -0
  25. package/ios/TNApiGetwaySDK.xcframework/ios-arm64_x86_64-simulator/TNApiGetwaySDK.framework/Headers/TNApiGatewayCrypto.h +34 -0
  26. package/ios/TNApiGetwaySDK.xcframework/ios-arm64_x86_64-simulator/TNApiGetwaySDK.framework/Headers/TNApiGetwaySDK.h +13 -0
  27. package/ios/TNApiGetwaySDK.xcframework/ios-arm64_x86_64-simulator/TNApiGetwaySDK.framework/Info.plist +0 -0
  28. package/ios/TNApiGetwaySDK.xcframework/ios-arm64_x86_64-simulator/TNApiGetwaySDK.framework/Modules/TNApiGetwaySDK.swiftmodule/arm64-apple-ios-simulator.abi.json +1419 -0
  29. package/ios/TNApiGetwaySDK.xcframework/ios-arm64_x86_64-simulator/TNApiGetwaySDK.framework/Modules/TNApiGetwaySDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +57 -0
  30. package/ios/TNApiGetwaySDK.xcframework/ios-arm64_x86_64-simulator/TNApiGetwaySDK.framework/Modules/TNApiGetwaySDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  31. package/ios/TNApiGetwaySDK.xcframework/ios-arm64_x86_64-simulator/TNApiGetwaySDK.framework/Modules/TNApiGetwaySDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +57 -0
  32. package/ios/TNApiGetwaySDK.xcframework/ios-arm64_x86_64-simulator/TNApiGetwaySDK.framework/Modules/TNApiGetwaySDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +1419 -0
  33. package/ios/TNApiGetwaySDK.xcframework/ios-arm64_x86_64-simulator/TNApiGetwaySDK.framework/Modules/TNApiGetwaySDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +57 -0
  34. package/ios/TNApiGetwaySDK.xcframework/ios-arm64_x86_64-simulator/TNApiGetwaySDK.framework/Modules/TNApiGetwaySDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  35. package/ios/TNApiGetwaySDK.xcframework/ios-arm64_x86_64-simulator/TNApiGetwaySDK.framework/Modules/TNApiGetwaySDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +57 -0
  36. package/ios/TNApiGetwaySDK.xcframework/ios-arm64_x86_64-simulator/TNApiGetwaySDK.framework/Modules/module.modulemap +6 -0
  37. package/ios/TNApiGetwaySDK.xcframework/ios-arm64_x86_64-simulator/TNApiGetwaySDK.framework/TNApiGetwaySDK +0 -0
  38. package/ios/TNApiGetwaySDK.xcframework/ios-arm64_x86_64-simulator/TNApiGetwaySDK.framework/_CodeSignature/CodeResources +256 -0
  39. package/lib/module/NativeApiGatwayReactNativeSdk.js +14 -0
  40. package/lib/module/NativeApiGatwayReactNativeSdk.js.map +1 -0
  41. package/lib/module/index.js +16 -0
  42. package/lib/module/index.js.map +1 -0
  43. package/lib/module/package.json +1 -0
  44. package/lib/typescript/package.json +1 -0
  45. package/lib/typescript/src/NativeApiGatwayReactNativeSdk.d.ts +6 -0
  46. package/lib/typescript/src/NativeApiGatwayReactNativeSdk.d.ts.map +1 -0
  47. package/lib/typescript/src/index.d.ts +9 -0
  48. package/lib/typescript/src/index.d.ts.map +1 -0
  49. package/package.json +169 -0
  50. package/src/NativeApiGatwayReactNativeSdk.ts +26 -0
  51. package/src/index.tsx +13 -0
@@ -0,0 +1,57 @@
1
+ // swift-interface-format-version: 1.0
2
+ // swift-compiler-version: Apple Swift version 6.2.1 effective-5.10 (swiftlang-6.2.1.4.8 clang-1700.4.4.1)
3
+ // swift-module-flags: -target arm64-apple-ios18.1 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-experimental-feature DebugDescriptionMacro -enable-bare-slash-regex -module-name TNApiGetwaySDK
4
+ // swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.2.1
5
+ import Foundation
6
+ import Swift
7
+ @_exported import TNApiGetwaySDK
8
+ import UIKit
9
+ import _Concurrency
10
+ import _StringProcessing
11
+ import _SwiftConcurrencyShims
12
+ @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc public class ApiGatewayHeaderProvider : ObjectiveC.NSObject {
13
+ @objc public static let shared: TNApiGetwaySDK.ApiGatewayHeaderProvider
14
+ @objc public func getHeaders() -> [Swift.String : Swift.String]
15
+ @objc deinit
16
+ }
17
+ @_hasMissingDesignatedInitializers final public class Config {
18
+ public static var isDebuggable: Swift.Bool
19
+ @objc deinit
20
+ }
21
+ @_hasMissingDesignatedInitializers public class FrameworkConfig {
22
+ public static let shared: TNApiGetwaySDK.FrameworkConfig
23
+ public var json: [Swift.String : Any]
24
+ public var debugMode: Swift.Bool
25
+ @objc deinit
26
+ }
27
+ @objc @_inheritsConvenienceInitializers @objcMembers public class FrameworkProtocol : Foundation.URLProtocol {
28
+ @objc override dynamic public class func canInit(with request: Foundation.URLRequest) -> Swift.Bool
29
+ @objc override dynamic public class func canonicalRequest(for request: Foundation.URLRequest) -> Foundation.URLRequest
30
+ @objc override dynamic public func startLoading()
31
+ @objc override dynamic public func stopLoading()
32
+ #if compiler(>=5.3) && $NonescapableTypes
33
+ @objc override dynamic public init(request: Foundation.URLRequest, cachedResponse: Foundation.CachedURLResponse?, client: (any Foundation.URLProtocolClient)?)
34
+ #endif
35
+ @objc deinit
36
+ }
37
+ @_hasMissingDesignatedInitializers final public class Logger {
38
+ #if compiler(>=5.3) && $NonescapableTypes
39
+ public static func d(_ message: Swift.String, tag: Swift.String? = nil)
40
+ #endif
41
+ #if compiler(>=5.3) && $NonescapableTypes
42
+ public static func i(_ message: Swift.String, tag: Swift.String? = nil)
43
+ #endif
44
+ #if compiler(>=5.3) && $NonescapableTypes
45
+ public static func e(_ message: Swift.String, tag: Swift.String? = nil, error: (any Swift.Error)? = nil)
46
+ #endif
47
+ #if compiler(>=5.3) && $NonescapableTypes
48
+ public static func w(_ message: Swift.String, tag: Swift.String? = nil)
49
+ #endif
50
+ @objc deinit
51
+ }
52
+ @_hasMissingDesignatedInitializers final public class TimeProvider {
53
+ public static let shared: TNApiGetwaySDK.TimeProvider
54
+ final public func nowSeconds() -> Swift.Int
55
+ final public func isSynced() -> Swift.Bool
56
+ @objc deinit
57
+ }
@@ -0,0 +1,57 @@
1
+ // swift-interface-format-version: 1.0
2
+ // swift-compiler-version: Apple Swift version 6.2.1 effective-5.10 (swiftlang-6.2.1.4.8 clang-1700.4.4.1)
3
+ // swift-module-flags: -target arm64-apple-ios18.1 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-experimental-feature DebugDescriptionMacro -enable-bare-slash-regex -module-name TNApiGetwaySDK
4
+ // swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.2.1
5
+ import Foundation
6
+ import Swift
7
+ @_exported import TNApiGetwaySDK
8
+ import UIKit
9
+ import _Concurrency
10
+ import _StringProcessing
11
+ import _SwiftConcurrencyShims
12
+ @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc public class ApiGatewayHeaderProvider : ObjectiveC.NSObject {
13
+ @objc public static let shared: TNApiGetwaySDK.ApiGatewayHeaderProvider
14
+ @objc public func getHeaders() -> [Swift.String : Swift.String]
15
+ @objc deinit
16
+ }
17
+ @_hasMissingDesignatedInitializers final public class Config {
18
+ public static var isDebuggable: Swift.Bool
19
+ @objc deinit
20
+ }
21
+ @_hasMissingDesignatedInitializers public class FrameworkConfig {
22
+ public static let shared: TNApiGetwaySDK.FrameworkConfig
23
+ public var json: [Swift.String : Any]
24
+ public var debugMode: Swift.Bool
25
+ @objc deinit
26
+ }
27
+ @objc @_inheritsConvenienceInitializers @objcMembers public class FrameworkProtocol : Foundation.URLProtocol {
28
+ @objc override dynamic public class func canInit(with request: Foundation.URLRequest) -> Swift.Bool
29
+ @objc override dynamic public class func canonicalRequest(for request: Foundation.URLRequest) -> Foundation.URLRequest
30
+ @objc override dynamic public func startLoading()
31
+ @objc override dynamic public func stopLoading()
32
+ #if compiler(>=5.3) && $NonescapableTypes
33
+ @objc override dynamic public init(request: Foundation.URLRequest, cachedResponse: Foundation.CachedURLResponse?, client: (any Foundation.URLProtocolClient)?)
34
+ #endif
35
+ @objc deinit
36
+ }
37
+ @_hasMissingDesignatedInitializers final public class Logger {
38
+ #if compiler(>=5.3) && $NonescapableTypes
39
+ public static func d(_ message: Swift.String, tag: Swift.String? = nil)
40
+ #endif
41
+ #if compiler(>=5.3) && $NonescapableTypes
42
+ public static func i(_ message: Swift.String, tag: Swift.String? = nil)
43
+ #endif
44
+ #if compiler(>=5.3) && $NonescapableTypes
45
+ public static func e(_ message: Swift.String, tag: Swift.String? = nil, error: (any Swift.Error)? = nil)
46
+ #endif
47
+ #if compiler(>=5.3) && $NonescapableTypes
48
+ public static func w(_ message: Swift.String, tag: Swift.String? = nil)
49
+ #endif
50
+ @objc deinit
51
+ }
52
+ @_hasMissingDesignatedInitializers final public class TimeProvider {
53
+ public static let shared: TNApiGetwaySDK.TimeProvider
54
+ final public func nowSeconds() -> Swift.Int
55
+ final public func isSynced() -> Swift.Bool
56
+ @objc deinit
57
+ }
@@ -0,0 +1,6 @@
1
+ framework module TNApiGetwaySDK {
2
+ umbrella header "TNApiGetwaySDK.h"
3
+ export *
4
+
5
+ module * { export * }
6
+ }
@@ -0,0 +1,201 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>files</key>
6
+ <dict>
7
+ <key>.gitignore</key>
8
+ <data>
9
+ 6J1uNysVXPkg2iEYHwVMZk9znVE=
10
+ </data>
11
+ <key>Headers/TNApiGatewayCrypto.h</key>
12
+ <data>
13
+ 0f15dSbkHIkr4Ofj8MWfESQtcdM=
14
+ </data>
15
+ <key>Headers/TNApiGetwaySDK.h</key>
16
+ <data>
17
+ p9jtQhFiVA+sYVQwNDz46088l7I=
18
+ </data>
19
+ <key>Info.plist</key>
20
+ <data>
21
+ 59Hcqv6c8oTA/1yvY/KeYTUqBvQ=
22
+ </data>
23
+ <key>Modules/TNApiGetwaySDK.swiftmodule/arm64-apple-ios.abi.json</key>
24
+ <data>
25
+ gRILf2Jn5xocP5QMiLmySfHrWrE=
26
+ </data>
27
+ <key>Modules/TNApiGetwaySDK.swiftmodule/arm64-apple-ios.private.swiftinterface</key>
28
+ <data>
29
+ 96oW6OZ0s8+IvKBLyF4LRlLJEPA=
30
+ </data>
31
+ <key>Modules/TNApiGetwaySDK.swiftmodule/arm64-apple-ios.swiftdoc</key>
32
+ <data>
33
+ 9J4Glo0Vwa4ayF47WRW+xh0fuTo=
34
+ </data>
35
+ <key>Modules/TNApiGetwaySDK.swiftmodule/arm64-apple-ios.swiftinterface</key>
36
+ <data>
37
+ 96oW6OZ0s8+IvKBLyF4LRlLJEPA=
38
+ </data>
39
+ <key>Modules/TNApiGetwaySDK.swiftmodule/arm64-apple-ios.swiftmodule</key>
40
+ <data>
41
+ ZnwFDs93Ea9R03De6blM9HH33hM=
42
+ </data>
43
+ <key>Modules/module.modulemap</key>
44
+ <data>
45
+ nsf8srj+nliqvPbnSIxPsj+DSNg=
46
+ </data>
47
+ </dict>
48
+ <key>files2</key>
49
+ <dict>
50
+ <key>.gitignore</key>
51
+ <dict>
52
+ <key>hash2</key>
53
+ <data>
54
+ XkMP713upWxaWO4u7uiWDqmVu79ssDyOahW2IuJ+X0Y=
55
+ </data>
56
+ </dict>
57
+ <key>Headers/TNApiGatewayCrypto.h</key>
58
+ <dict>
59
+ <key>hash2</key>
60
+ <data>
61
+ cjOuGHuFEHIi6GBfAkeKPT9CmYOxSaIvDPXZ3Op1h9M=
62
+ </data>
63
+ </dict>
64
+ <key>Headers/TNApiGetwaySDK.h</key>
65
+ <dict>
66
+ <key>hash2</key>
67
+ <data>
68
+ Pw7UJ64+ivB5mbgTaHOvP2KvFgmhlpzU6k3f6Ax1EOk=
69
+ </data>
70
+ </dict>
71
+ <key>Modules/TNApiGetwaySDK.swiftmodule/arm64-apple-ios.abi.json</key>
72
+ <dict>
73
+ <key>hash2</key>
74
+ <data>
75
+ LiKI+WFYyLwa8ZeCw7c05j38J5WE1loF3XxlguqD5fs=
76
+ </data>
77
+ </dict>
78
+ <key>Modules/TNApiGetwaySDK.swiftmodule/arm64-apple-ios.private.swiftinterface</key>
79
+ <dict>
80
+ <key>hash2</key>
81
+ <data>
82
+ OLLLj9fG9fBVupNelD0itU53EpS2jxbEgMBfjCMfwd4=
83
+ </data>
84
+ </dict>
85
+ <key>Modules/TNApiGetwaySDK.swiftmodule/arm64-apple-ios.swiftdoc</key>
86
+ <dict>
87
+ <key>hash2</key>
88
+ <data>
89
+ t04yNUiM/VV8kA5B3fROxGooIqVgZ9o/mq/+S48DNg4=
90
+ </data>
91
+ </dict>
92
+ <key>Modules/TNApiGetwaySDK.swiftmodule/arm64-apple-ios.swiftinterface</key>
93
+ <dict>
94
+ <key>hash2</key>
95
+ <data>
96
+ OLLLj9fG9fBVupNelD0itU53EpS2jxbEgMBfjCMfwd4=
97
+ </data>
98
+ </dict>
99
+ <key>Modules/TNApiGetwaySDK.swiftmodule/arm64-apple-ios.swiftmodule</key>
100
+ <dict>
101
+ <key>hash2</key>
102
+ <data>
103
+ Ja5TytcXSgDY8NKeTDDUVvH4ABCIIj5cDvSrNxc/9nI=
104
+ </data>
105
+ </dict>
106
+ <key>Modules/module.modulemap</key>
107
+ <dict>
108
+ <key>hash2</key>
109
+ <data>
110
+ zbm/oAAuUIwjSF0maA9De9dORpYgwjlKe5KuXKeeHBc=
111
+ </data>
112
+ </dict>
113
+ </dict>
114
+ <key>rules</key>
115
+ <dict>
116
+ <key>^.*</key>
117
+ <true/>
118
+ <key>^.*\.lproj/</key>
119
+ <dict>
120
+ <key>optional</key>
121
+ <true/>
122
+ <key>weight</key>
123
+ <real>1000</real>
124
+ </dict>
125
+ <key>^.*\.lproj/locversion.plist$</key>
126
+ <dict>
127
+ <key>omit</key>
128
+ <true/>
129
+ <key>weight</key>
130
+ <real>1100</real>
131
+ </dict>
132
+ <key>^Base\.lproj/</key>
133
+ <dict>
134
+ <key>weight</key>
135
+ <real>1010</real>
136
+ </dict>
137
+ <key>^version.plist$</key>
138
+ <true/>
139
+ </dict>
140
+ <key>rules2</key>
141
+ <dict>
142
+ <key>.*\.dSYM($|/)</key>
143
+ <dict>
144
+ <key>weight</key>
145
+ <real>11</real>
146
+ </dict>
147
+ <key>^(.*/)?\.DS_Store$</key>
148
+ <dict>
149
+ <key>omit</key>
150
+ <true/>
151
+ <key>weight</key>
152
+ <real>2000</real>
153
+ </dict>
154
+ <key>^.*</key>
155
+ <true/>
156
+ <key>^.*\.lproj/</key>
157
+ <dict>
158
+ <key>optional</key>
159
+ <true/>
160
+ <key>weight</key>
161
+ <real>1000</real>
162
+ </dict>
163
+ <key>^.*\.lproj/locversion.plist$</key>
164
+ <dict>
165
+ <key>omit</key>
166
+ <true/>
167
+ <key>weight</key>
168
+ <real>1100</real>
169
+ </dict>
170
+ <key>^Base\.lproj/</key>
171
+ <dict>
172
+ <key>weight</key>
173
+ <real>1010</real>
174
+ </dict>
175
+ <key>^Info\.plist$</key>
176
+ <dict>
177
+ <key>omit</key>
178
+ <true/>
179
+ <key>weight</key>
180
+ <real>20</real>
181
+ </dict>
182
+ <key>^PkgInfo$</key>
183
+ <dict>
184
+ <key>omit</key>
185
+ <true/>
186
+ <key>weight</key>
187
+ <real>20</real>
188
+ </dict>
189
+ <key>^embedded\.provisionprofile$</key>
190
+ <dict>
191
+ <key>weight</key>
192
+ <real>20</real>
193
+ </dict>
194
+ <key>^version\.plist$</key>
195
+ <dict>
196
+ <key>weight</key>
197
+ <real>20</real>
198
+ </dict>
199
+ </dict>
200
+ </dict>
201
+ </plist>
@@ -0,0 +1,34 @@
1
+ //
2
+ // TNApiGatewayCrypto.h
3
+ // TNMapSDK
4
+ //
5
+
6
+ #import <Foundation/Foundation.h>
7
+
8
+ NS_ASSUME_NONNULL_BEGIN
9
+
10
+ @interface TNApiGatewayCrypto : NSObject
11
+
12
+ /// Equivalent to nativeGenerateAESKey()
13
+ + (NSString *)generateAESKey;
14
+
15
+ /// Equivalent to nativeMethod()
16
+ + (NSDictionary<NSString *, NSString *> *)encryptPayloadForHeaders:(NSString *)jsonString
17
+ publicKeyPEM:(NSString *)publicKeyPEM
18
+ dataIdentity:(NSString *)dataIdentity
19
+ clientIdentity:(NSString *)clientIdentity;
20
+
21
+ /// Equivalent to nativeDataIdentityMethod()
22
+ + (NSString *)encryptAESKey:(NSString *)aesKeyBase64
23
+ publicKeyPEM:(NSString *)publicKeyPEM;
24
+
25
+ /// Equivalent to nativeClientIdentityMethod()
26
+ + (NSString *)encryptClientPayload:(NSString *)jsonString
27
+ aesKeyBase64:(NSString *)aesKeyBase64;
28
+
29
+ /// Equivalent to nativeGetServerTime()
30
+ + (NSTimeInterval)fetchServerTime;
31
+
32
+ @end
33
+
34
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,13 @@
1
+ //
2
+ // TNApiGetwaySDK.h
3
+ // TNApiGetwaySDK
4
+ //
5
+
6
+ //#import <Foundation/Foundation.h>
7
+
8
+ // Public headers of your framework:
9
+ #import <TNApiGetwaySDK/TNApiGatewayCrypto.h>
10
+
11
+
12
+ // FOUNDATION_EXPORT double TNApiGetwaySDKVersionNumber;
13
+ // FOUNDATION_EXPORT const unsigned char TNApiGetwaySDKVersionString[];