react-native-candle 0.1.14 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ReactNativeCandle.podspec +1 -42
- package/ios/Sources/HostingViewController.swift +13 -46
- package/ios/Sources/RNCandle.swift +15 -22
- package/lib/commonjs/index.js +2 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +3 -2
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/specs/RNCandle.nitro.d.ts +3 -2
- package/lib/typescript/commonjs/src/specs/RNCandle.nitro.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +3 -2
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/specs/RNCandle.nitro.d.ts +3 -2
- package/lib/typescript/module/src/specs/RNCandle.nitro.d.ts.map +1 -1
- package/nitrogen/generated/ios/c++/HybridRNCandleSpecSwift.hpp +12 -4
- package/nitrogen/generated/ios/swift/HybridRNCandleSpec.swift +3 -2
- package/nitrogen/generated/ios/swift/HybridRNCandleSpec_cxx.swift +32 -4
- package/nitrogen/generated/shared/c++/HybridRNCandleSpec.cpp +3 -2
- package/nitrogen/generated/shared/c++/HybridRNCandleSpec.hpp +3 -2
- package/package.json +1 -1
- package/plugin/withIosDeploymentTarget.js +2 -152
- package/src/index.ts +4 -1
- package/src/specs/RNCandle.nitro.ts +4 -2
|
@@ -22,47 +22,6 @@ Pod::Spec.new do |s|
|
|
|
22
22
|
"cpp/**/*.{hpp,cpp}",
|
|
23
23
|
]
|
|
24
24
|
|
|
25
|
-
spm_dependency(s,
|
|
26
|
-
url: "https://github.com/candlefinance/swift-security",
|
|
27
|
-
requirement: {
|
|
28
|
-
"kind": "branch",
|
|
29
|
-
"branch": "main"
|
|
30
|
-
},
|
|
31
|
-
products: ["SwiftSecurity"]
|
|
32
|
-
)
|
|
33
|
-
spm_dependency(s,
|
|
34
|
-
url: "https://github.com/apple/swift-openapi-urlsession",
|
|
35
|
-
requirement: {
|
|
36
|
-
"kind": "exactVersion",
|
|
37
|
-
"version": "1.0.2"
|
|
38
|
-
},
|
|
39
|
-
products: ["OpenAPIURLSession"]
|
|
40
|
-
)
|
|
41
|
-
spm_dependency(s,
|
|
42
|
-
url: "https://github.com/apple/swift-nio",
|
|
43
|
-
requirement: {
|
|
44
|
-
"kind": "exactVersion",
|
|
45
|
-
"version": "2.81.0"
|
|
46
|
-
},
|
|
47
|
-
products: ["NIO", "NIOHTTP1", "NIOWebSocket"]
|
|
48
|
-
)
|
|
49
|
-
spm_dependency(s,
|
|
50
|
-
url: "https://github.com/apple/swift-nio-ssl",
|
|
51
|
-
requirement: {
|
|
52
|
-
"kind": "exactVersion",
|
|
53
|
-
"version": "2.29.3"
|
|
54
|
-
},
|
|
55
|
-
products: ["NIOSSL"]
|
|
56
|
-
)
|
|
57
|
-
spm_dependency(s,
|
|
58
|
-
url: "https://github.com/apple/swift-nio-transport-services",
|
|
59
|
-
requirement: {
|
|
60
|
-
"kind": "exactVersion",
|
|
61
|
-
"version": "1.23.1"
|
|
62
|
-
},
|
|
63
|
-
products: ["NIOTransportServices"]
|
|
64
|
-
)
|
|
65
|
-
|
|
66
25
|
s.pod_target_xcconfig = {
|
|
67
26
|
# C++ compiler flags, mainly for folly.
|
|
68
27
|
"GCC_PREPROCESSOR_DEFINITIONS" => "$(inherited) FOLLY_NO_CONFIG FOLLY_CFG_NO_COROUTINES"
|
|
@@ -71,7 +30,7 @@ Pod::Spec.new do |s|
|
|
|
71
30
|
load 'nitrogen/generated/ios/ReactNativeCandle+autolinking.rb'
|
|
72
31
|
add_nitrogen_files(s)
|
|
73
32
|
|
|
74
|
-
s.dependency 'Candle', '3.0.
|
|
33
|
+
s.dependency 'Candle', '3.0.234-beta'
|
|
75
34
|
s.dependency 'React-jsi'
|
|
76
35
|
s.dependency 'React-callinvoker'
|
|
77
36
|
install_modules_dependencies(s)
|
|
@@ -1,56 +1,23 @@
|
|
|
1
1
|
import SwiftUI
|
|
2
2
|
import UIKit
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
super.init(nibName: nil, bundle: nil)
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
required init?(coder: NSCoder) {
|
|
14
|
-
fatalError("init(coder:) has not been implemented")
|
|
4
|
+
extension UIViewController {
|
|
5
|
+
func embed(_ child: UIViewController) {
|
|
6
|
+
addChild(child)
|
|
7
|
+
view.insertSubview(child.view, belowSubview: view.subviews.first ?? view)
|
|
8
|
+
child.view.pinEdges(to: view)
|
|
9
|
+
child.didMove(toParent: self)
|
|
15
10
|
}
|
|
16
|
-
|
|
17
|
-
override func viewDidLoad() {
|
|
18
|
-
super.viewDidLoad()
|
|
19
|
-
|
|
20
|
-
setup(withRootView: uiView)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
func setup<Content: View>(withRootView view: Content) {
|
|
24
|
-
self.children.forEach { $0.removeFromParent() }
|
|
25
|
-
self.view.subviews.forEach { $0.removeFromSuperview() }
|
|
26
|
-
let host = HostingWrapper(rootView: view)
|
|
27
|
-
host.add(to: self)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
11
|
}
|
|
31
12
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
controller.addChild(self)
|
|
36
|
-
controller.view.addSubview(view)
|
|
37
|
-
didMove(toParent: controller)
|
|
38
|
-
view.backgroundColor = .clear
|
|
39
|
-
view.translatesAutoresizingMaskIntoConstraints = false
|
|
13
|
+
extension UIView {
|
|
14
|
+
func pinEdges(to superview: UIView) {
|
|
15
|
+
translatesAutoresizingMaskIntoConstraints = false
|
|
40
16
|
NSLayoutConstraint.activate([
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
17
|
+
leadingAnchor.constraint(equalTo: superview.leadingAnchor),
|
|
18
|
+
trailingAnchor.constraint(equalTo: superview.trailingAnchor),
|
|
19
|
+
topAnchor.constraint(equalTo: superview.topAnchor),
|
|
20
|
+
bottomAnchor.constraint(equalTo: superview.bottomAnchor),
|
|
45
21
|
])
|
|
46
22
|
}
|
|
47
|
-
|
|
48
|
-
deinit {
|
|
49
|
-
removeFromParent()
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
public override func viewWillLayoutSubviews() {
|
|
53
|
-
super.viewWillLayoutSubviews()
|
|
54
|
-
updateViewConstraints()
|
|
55
|
-
}
|
|
56
23
|
}
|
|
@@ -8,13 +8,13 @@ import UIKit
|
|
|
8
8
|
@available(iOS 17.0, *)
|
|
9
9
|
final class HybridRNCandle: HybridRNCandleSpec {
|
|
10
10
|
|
|
11
|
-
private var rootVC:
|
|
11
|
+
private var rootVC: UIHostingController<CandleLinkSheetWrapper>?
|
|
12
12
|
|
|
13
13
|
private var cancellables = Set<AnyCancellable>()
|
|
14
14
|
|
|
15
15
|
var viewModel: CandleLinkViewModel {
|
|
16
16
|
get throws {
|
|
17
|
-
if let viewModel = rootVC?.
|
|
17
|
+
if let viewModel = rootVC?.rootView.viewModel {
|
|
18
18
|
return viewModel
|
|
19
19
|
}
|
|
20
20
|
throw RNClientError.badInitialization(message: "Failed to properly initialize the client.")
|
|
@@ -28,22 +28,12 @@ final class HybridRNCandle: HybridRNCandleSpec {
|
|
|
28
28
|
let wrapperView = CandleLinkSheetWrapper(
|
|
29
29
|
appUser: .init(
|
|
30
30
|
appKey: appUser.appKey, appSecret: appUser.appSecret, appUserID: appUser.appUserID))
|
|
31
|
-
let hostingVC =
|
|
31
|
+
let hostingVC = UIHostingController(rootView: wrapperView)
|
|
32
32
|
self.rootVC = hostingVC
|
|
33
|
-
guard let rootViewController = UIApplication.keyWindow?.rootViewController
|
|
34
|
-
let view = rootViewController.view,
|
|
35
|
-
let rootView = view.subviews.first
|
|
36
|
-
else {
|
|
33
|
+
guard let rootViewController = UIApplication.keyWindow?.rootViewController else {
|
|
37
34
|
throw RNClientError.badInitialization(message: "Application root view was not initialized.")
|
|
38
35
|
}
|
|
39
|
-
|
|
40
|
-
hostingVC.view.translatesAutoresizingMaskIntoConstraints = false
|
|
41
|
-
NSLayoutConstraint.activate([
|
|
42
|
-
hostingVC.view.heightAnchor.constraint(equalTo: view.heightAnchor),
|
|
43
|
-
hostingVC.view.widthAnchor.constraint(equalTo: view.widthAnchor),
|
|
44
|
-
hostingVC.view.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
45
|
-
hostingVC.view.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
46
|
-
])
|
|
36
|
+
rootViewController.embed(hostingVC)
|
|
47
37
|
}
|
|
48
38
|
}
|
|
49
39
|
|
|
@@ -96,18 +86,21 @@ final class HybridRNCandle: HybridRNCandleSpec {
|
|
|
96
86
|
}
|
|
97
87
|
}
|
|
98
88
|
|
|
99
|
-
public func
|
|
89
|
+
public func getAssetAccounts() throws -> Promise<String> {
|
|
100
90
|
.async {
|
|
101
|
-
|
|
102
|
-
return try self.encodeToJSONString(accounts)
|
|
91
|
+
return ""
|
|
103
92
|
}
|
|
104
93
|
}
|
|
105
94
|
|
|
106
|
-
public func
|
|
95
|
+
public func getTrades(span: String?) throws -> Promise<String> {
|
|
107
96
|
.async {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
97
|
+
return ""
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
func getTradeQuotes(span: String?) throws -> Promise<String> {
|
|
102
|
+
.async {
|
|
103
|
+
return ""
|
|
111
104
|
}
|
|
112
105
|
}
|
|
113
106
|
|
package/lib/commonjs/index.js
CHANGED
|
@@ -17,9 +17,10 @@ class CandleClient {
|
|
|
17
17
|
customerName,
|
|
18
18
|
showDynamicLoading = true,
|
|
19
19
|
presentationBackground = "default",
|
|
20
|
+
presentationStyle = "fullScreen",
|
|
20
21
|
onSuccess
|
|
21
22
|
}) {
|
|
22
|
-
this.candle.candleLinkSheet(true, services, cornerRadius, customerName, showDynamicLoading, presentationBackground,
|
|
23
|
+
this.candle.candleLinkSheet(true, services, cornerRadius, customerName, showDynamicLoading, presentationBackground, presentationStyle, onSuccess);
|
|
23
24
|
}
|
|
24
25
|
async getLinkedAccounts() {
|
|
25
26
|
return this.candle.getLinkedAccounts();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeNitroModules","require","CandleClient","constructor","appUser","CandleHybridObject","NitroModules","createHybridObject","candle","initialize","presentCandleLinkSheet","services","undefined","cornerRadius","customerName","showDynamicLoading","presentationBackground","onSuccess","candleLinkSheet","getLinkedAccounts","unlinkAccount","linkedAccountID","deleteUser","getAvailableTools","executeTool","tool","exports"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;AAAA,IAAAA,wBAAA,GAAAC,OAAA;
|
|
1
|
+
{"version":3,"names":["_reactNativeNitroModules","require","CandleClient","constructor","appUser","CandleHybridObject","NitroModules","createHybridObject","candle","initialize","presentCandleLinkSheet","services","undefined","cornerRadius","customerName","showDynamicLoading","presentationBackground","presentationStyle","onSuccess","candleLinkSheet","getLinkedAccounts","unlinkAccount","linkedAccountID","deleteUser","getAvailableTools","executeTool","tool","exports"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;AAAA,IAAAA,wBAAA,GAAAC,OAAA;AAUO,MAAMC,YAAY,CAAC;EAGxBC,WAAWA,CAACC,OAAgB,EAAE;IAC5B,MAAMC,kBAAkB,GACtBC,qCAAY,CAACC,kBAAkB,CAAW,UAAU,CAAC;IACvD,IAAI,CAACC,MAAM,GAAGH,kBAAkB;IAChC,IAAI,CAACG,MAAM,CAACC,UAAU,CAACL,OAAO,CAAC;EACjC;EAEOM,sBAAsBA,CAAC;IAC5BC,QAAQ,GAAGC,SAAS;IACpBC,YAAY,GAAG,EAAE;IACjBC,YAAY;IACZC,kBAAkB,GAAG,IAAI;IACzBC,sBAAsB,GAAG,SAAS;IAClCC,iBAAiB,GAAG,YAAY;IAChCC;EAUF,CAAC,EAAQ;IACP,IAAI,CAACV,MAAM,CAACW,eAAe,CACzB,IAAI,EACJR,QAAQ,EACRE,YAAY,EACZC,YAAY,EACZC,kBAAkB,EAClBC,sBAAsB,EACtBC,iBAAiB,EACjBC,SACF,CAAC;EACH;EAEA,MAAaE,iBAAiBA,CAAA,EAA6B;IACzD,OAAO,IAAI,CAACZ,MAAM,CAACY,iBAAiB,CAAC,CAAC;EACxC;EAEA,MAAaC,aAAaA,CAACC,eAAuB,EAAiB;IACjE,MAAM,IAAI,CAACd,MAAM,CAACa,aAAa,CAACC,eAAe,CAAC;EAClD;EAEA,MAAaC,UAAUA,CAAA,EAAkB;IACvC,MAAM,IAAI,CAACf,MAAM,CAACe,UAAU,CAAC,CAAC;EAChC;EAEA,MAAaC,iBAAiBA,CAAA,EAAwC;IACpE,OAAO,IAAI,CAAChB,MAAM,CAACgB,iBAAiB,CAAC,CAAC;EACxC;EAEA,MAAaC,WAAWA,CAACC,IAGxB,EAAmB;IAClB,OAAO,IAAI,CAAClB,MAAM,CAACiB,WAAW,CAACC,IAAI,CAAC;EACtC;AACF;AAACC,OAAA,CAAAzB,YAAA,GAAAA,YAAA","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -13,9 +13,10 @@ export class CandleClient {
|
|
|
13
13
|
customerName,
|
|
14
14
|
showDynamicLoading = true,
|
|
15
15
|
presentationBackground = "default",
|
|
16
|
+
presentationStyle = "fullScreen",
|
|
16
17
|
onSuccess
|
|
17
18
|
}) {
|
|
18
|
-
this.candle.candleLinkSheet(true, services, cornerRadius, customerName, showDynamicLoading, presentationBackground,
|
|
19
|
+
this.candle.candleLinkSheet(true, services, cornerRadius, customerName, showDynamicLoading, presentationBackground, presentationStyle, onSuccess);
|
|
19
20
|
}
|
|
20
21
|
async getLinkedAccounts() {
|
|
21
22
|
return this.candle.getLinkedAccounts();
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NitroModules","CandleClient","constructor","appUser","CandleHybridObject","createHybridObject","candle","initialize","presentCandleLinkSheet","services","undefined","cornerRadius","customerName","showDynamicLoading","presentationBackground","onSuccess","candleLinkSheet","getLinkedAccounts","unlinkAccount","linkedAccountID","deleteUser","getAvailableTools","executeTool","tool"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,4BAA4B;
|
|
1
|
+
{"version":3,"names":["NitroModules","CandleClient","constructor","appUser","CandleHybridObject","createHybridObject","candle","initialize","presentCandleLinkSheet","services","undefined","cornerRadius","customerName","showDynamicLoading","presentationBackground","presentationStyle","onSuccess","candleLinkSheet","getLinkedAccounts","unlinkAccount","linkedAccountID","deleteUser","getAvailableTools","executeTool","tool"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,4BAA4B;AAUzD,OAAO,MAAMC,YAAY,CAAC;EAGxBC,WAAWA,CAACC,OAAgB,EAAE;IAC5B,MAAMC,kBAAkB,GACtBJ,YAAY,CAACK,kBAAkB,CAAW,UAAU,CAAC;IACvD,IAAI,CAACC,MAAM,GAAGF,kBAAkB;IAChC,IAAI,CAACE,MAAM,CAACC,UAAU,CAACJ,OAAO,CAAC;EACjC;EAEOK,sBAAsBA,CAAC;IAC5BC,QAAQ,GAAGC,SAAS;IACpBC,YAAY,GAAG,EAAE;IACjBC,YAAY;IACZC,kBAAkB,GAAG,IAAI;IACzBC,sBAAsB,GAAG,SAAS;IAClCC,iBAAiB,GAAG,YAAY;IAChCC;EAUF,CAAC,EAAQ;IACP,IAAI,CAACV,MAAM,CAACW,eAAe,CACzB,IAAI,EACJR,QAAQ,EACRE,YAAY,EACZC,YAAY,EACZC,kBAAkB,EAClBC,sBAAsB,EACtBC,iBAAiB,EACjBC,SACF,CAAC;EACH;EAEA,MAAaE,iBAAiBA,CAAA,EAA6B;IACzD,OAAO,IAAI,CAACZ,MAAM,CAACY,iBAAiB,CAAC,CAAC;EACxC;EAEA,MAAaC,aAAaA,CAACC,eAAuB,EAAiB;IACjE,MAAM,IAAI,CAACd,MAAM,CAACa,aAAa,CAACC,eAAe,CAAC;EAClD;EAEA,MAAaC,UAAUA,CAAA,EAAkB;IACvC,MAAM,IAAI,CAACf,MAAM,CAACe,UAAU,CAAC,CAAC;EAChC;EAEA,MAAaC,iBAAiBA,CAAA,EAAwC;IACpE,OAAO,IAAI,CAAChB,MAAM,CAACgB,iBAAiB,CAAC,CAAC;EACxC;EAEA,MAAaC,WAAWA,CAACC,IAGxB,EAAmB;IAClB,OAAO,IAAI,CAAClB,MAAM,CAACiB,WAAW,CAACC,IAAI,CAAC;EACtC;AACF","ignoreList":[]}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import type { AppUser, LinkedAccount, PresentationBackground, Service } from "./specs/RNCandle.nitro";
|
|
1
|
+
import type { AppUser, LinkedAccount, PresentationBackground, PresentationStyle, Service } from "./specs/RNCandle.nitro";
|
|
2
2
|
export declare class CandleClient {
|
|
3
3
|
private candle;
|
|
4
4
|
constructor(appUser: AppUser);
|
|
5
|
-
presentCandleLinkSheet({ services, cornerRadius, customerName, showDynamicLoading, presentationBackground, onSuccess, }: {
|
|
5
|
+
presentCandleLinkSheet({ services, cornerRadius, customerName, showDynamicLoading, presentationBackground, presentationStyle, onSuccess, }: {
|
|
6
6
|
services?: Service[];
|
|
7
7
|
cornerRadius?: number;
|
|
8
8
|
customerName?: string;
|
|
9
9
|
showSandbox?: boolean;
|
|
10
10
|
showDynamicLoading?: boolean;
|
|
11
11
|
presentationBackground?: PresentationBackground;
|
|
12
|
+
presentationStyle?: PresentationStyle;
|
|
12
13
|
onSuccess: (account: LinkedAccount) => void;
|
|
13
14
|
}): void;
|
|
14
15
|
getLinkedAccounts(): Promise<LinkedAccount[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src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O,EAAE,CAAC"}
|
|
@@ -31,8 +31,9 @@ export interface RNCandle extends HybridObject<{
|
|
|
31
31
|
initialize(appUser: AppUser): void;
|
|
32
32
|
getLinkedAccounts(): Promise<LinkedAccount[]>;
|
|
33
33
|
unlinkAccount(linkedAccountID: string): Promise<void>;
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
getAssetAccounts(): Promise<string>;
|
|
35
|
+
getTrades(span: string | undefined): Promise<string>;
|
|
36
|
+
getTradeQuotes(span: string | undefined): Promise<string>;
|
|
36
37
|
deleteUser(): Promise<void>;
|
|
37
38
|
getAvailableTools(): Promise<Array<AnyMap>>;
|
|
38
39
|
executeTool(tool: ToolCall): Promise<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RNCandle.nitro.d.ts","sourceRoot":"","sources":["../../../../../src/specs/RNCandle.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAEvE,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,OAAO,GACf,WAAW,GACX,UAAU,GACV,OAAO,GACP,OAAO,GACP,SAAS,GACT,MAAM,GACN,MAAM,GACN,OAAO,GACP,QAAQ,GACR,UAAU,GACV,UAAU,GACV,kBAAkB,GAClB,gBAAgB,GAChB,iBAAiB,GACjB,aAAa,GACb,UAAU,GACV,UAAU,GACV,aAAa,GACb,gBAAgB,GAChB,QAAQ,GACR,UAAU,GACV,OAAO,GACP,OAAO,GACP,MAAM,GACN,WAAW,GACX,QAAQ,GACR,QAAQ,GACR,mBAAmB,GACnB,OAAO,GACP,QAAQ,GACR,SAAS,GACT,WAAW,GACX,UAAU,GACV,QAAQ,GACR,OAAO,GACP,aAAa,GACb,KAAK,GACL,YAAY,GACZ,OAAO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ACpB,QAAQ,EAAE,OAAO,EAAE,GAAG,SAAS,EAC/B,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,kBAAkB,EAAE,OAAO,EAC3B,sBAAsB,EAAE,sBAAsB,EAC9C,iBAAiB,EAAE,iBAAiB,EACpC,SAAS,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,GAC1C,IAAI,CAAC;IACR,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACnC,iBAAiB,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;IAC9C,aAAa,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"RNCandle.nitro.d.ts","sourceRoot":"","sources":["../../../../../src/specs/RNCandle.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAEvE,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,OAAO,GACf,WAAW,GACX,UAAU,GACV,OAAO,GACP,OAAO,GACP,SAAS,GACT,MAAM,GACN,MAAM,GACN,OAAO,GACP,QAAQ,GACR,UAAU,GACV,UAAU,GACV,kBAAkB,GAClB,gBAAgB,GAChB,iBAAiB,GACjB,aAAa,GACb,UAAU,GACV,UAAU,GACV,aAAa,GACb,gBAAgB,GAChB,QAAQ,GACR,UAAU,GACV,OAAO,GACP,OAAO,GACP,MAAM,GACN,WAAW,GACX,QAAQ,GACR,QAAQ,GACR,mBAAmB,GACnB,OAAO,GACP,QAAQ,GACR,SAAS,GACT,WAAW,GACX,UAAU,GACV,QAAQ,GACR,OAAO,GACP,aAAa,GACb,KAAK,GACL,YAAY,GACZ,OAAO,GACP,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AAQ,EAAE,OAAO,EAAE,GAAG,SAAS,EAC/B,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,kBAAkB,EAAE,OAAO,EAC3B,sBAAsB,EAAE,sBAAsB,EAC9C,iBAAiB,EAAE,iBAAiB,EACpC,SAAS,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,GAC1C,IAAI,CAAC;IACR,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACnC,iBAAiB,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;IAC9C,aAAa,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtD,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACpC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1D,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5B,iBAAiB,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAC5C,WAAW,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC9C"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import type { AppUser, LinkedAccount, PresentationBackground, Service } from "./specs/RNCandle.nitro";
|
|
1
|
+
import type { AppUser, LinkedAccount, PresentationBackground, PresentationStyle, Service } from "./specs/RNCandle.nitro";
|
|
2
2
|
export declare class CandleClient {
|
|
3
3
|
private candle;
|
|
4
4
|
constructor(appUser: AppUser);
|
|
5
|
-
presentCandleLinkSheet({ services, cornerRadius, customerName, showDynamicLoading, presentationBackground, onSuccess, }: {
|
|
5
|
+
presentCandleLinkSheet({ services, cornerRadius, customerName, showDynamicLoading, presentationBackground, presentationStyle, onSuccess, }: {
|
|
6
6
|
services?: Service[];
|
|
7
7
|
cornerRadius?: number;
|
|
8
8
|
customerName?: string;
|
|
9
9
|
showSandbox?: boolean;
|
|
10
10
|
showDynamicLoading?: boolean;
|
|
11
11
|
presentationBackground?: PresentationBackground;
|
|
12
|
+
presentationStyle?: PresentationStyle;
|
|
12
13
|
onSuccess: (account: LinkedAccount) => void;
|
|
13
14
|
}): void;
|
|
14
15
|
getLinkedAccounts(): Promise<LinkedAccount[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,OAAO,EACP,aAAa,EACb,sBAAsB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,OAAO,EACP,aAAa,EACb,sBAAsB,EACtB,iBAAiB,EAEjB,OAAO,EACR,MAAM,wBAAwB,CAAC;AAEhC,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAW;gBAEb,OAAO,EAAE,OAAO;IAOrB,sBAAsB,CAAC,EAC5B,QAAoB,EACpB,YAAiB,EACjB,YAAY,EACZ,kBAAyB,EACzB,sBAAkC,EAClC,iBAAgC,EAChC,SAAS,GACV,EAAE;QACD,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;QACrB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,sBAAsB,CAAC,EAAE,sBAAsB,CAAC;QAChD,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;QACtC,SAAS,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAC;KAC7C,GAAG,IAAI;IAaK,iBAAiB,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;IAI7C,aAAa,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIrD,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B,iBAAiB,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;IAIxD,WAAW,CAAC,IAAI,EAAE;QAC7B,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;KACnB,GAAG,OAAO,CAAC,MAAM,CAAC;CAGpB;AAED,YAAY,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -31,8 +31,9 @@ export interface RNCandle extends HybridObject<{
|
|
|
31
31
|
initialize(appUser: AppUser): void;
|
|
32
32
|
getLinkedAccounts(): Promise<LinkedAccount[]>;
|
|
33
33
|
unlinkAccount(linkedAccountID: string): Promise<void>;
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
getAssetAccounts(): Promise<string>;
|
|
35
|
+
getTrades(span: string | undefined): Promise<string>;
|
|
36
|
+
getTradeQuotes(span: string | undefined): Promise<string>;
|
|
36
37
|
deleteUser(): Promise<void>;
|
|
37
38
|
getAvailableTools(): Promise<Array<AnyMap>>;
|
|
38
39
|
executeTool(tool: ToolCall): Promise<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RNCandle.nitro.d.ts","sourceRoot":"","sources":["../../../../../src/specs/RNCandle.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAEvE,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,OAAO,GACf,WAAW,GACX,UAAU,GACV,OAAO,GACP,OAAO,GACP,SAAS,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AM,CAAC,CAAC;CAC9C"}
|
|
@@ -113,16 +113,24 @@ namespace margelo::nitro::rncandle {
|
|
|
113
113
|
auto __value = std::move(__result.value());
|
|
114
114
|
return __value;
|
|
115
115
|
}
|
|
116
|
-
inline std::shared_ptr<Promise<std::string>>
|
|
117
|
-
auto __result = _swiftPart.
|
|
116
|
+
inline std::shared_ptr<Promise<std::string>> getAssetAccounts() override {
|
|
117
|
+
auto __result = _swiftPart.getAssetAccounts();
|
|
118
118
|
if (__result.hasError()) [[unlikely]] {
|
|
119
119
|
std::rethrow_exception(__result.error());
|
|
120
120
|
}
|
|
121
121
|
auto __value = std::move(__result.value());
|
|
122
122
|
return __value;
|
|
123
123
|
}
|
|
124
|
-
inline std::shared_ptr<Promise<std::string>>
|
|
125
|
-
auto __result = _swiftPart.
|
|
124
|
+
inline std::shared_ptr<Promise<std::string>> getTrades(const std::optional<std::string>& span) override {
|
|
125
|
+
auto __result = _swiftPart.getTrades(span);
|
|
126
|
+
if (__result.hasError()) [[unlikely]] {
|
|
127
|
+
std::rethrow_exception(__result.error());
|
|
128
|
+
}
|
|
129
|
+
auto __value = std::move(__result.value());
|
|
130
|
+
return __value;
|
|
131
|
+
}
|
|
132
|
+
inline std::shared_ptr<Promise<std::string>> getTradeQuotes(const std::optional<std::string>& span) override {
|
|
133
|
+
auto __result = _swiftPart.getTradeQuotes(span);
|
|
126
134
|
if (__result.hasError()) [[unlikely]] {
|
|
127
135
|
std::rethrow_exception(__result.error());
|
|
128
136
|
}
|
|
@@ -21,8 +21,9 @@ public protocol HybridRNCandleSpec_protocol: HybridObject {
|
|
|
21
21
|
func initialize(appUser: AppUser) throws
|
|
22
22
|
func getLinkedAccounts() throws -> Promise<[LinkedAccount]>
|
|
23
23
|
func unlinkAccount(linkedAccountID: String) throws -> Promise<Void>
|
|
24
|
-
func
|
|
25
|
-
func
|
|
24
|
+
func getAssetAccounts() throws -> Promise<String>
|
|
25
|
+
func getTrades(span: String?) throws -> Promise<String>
|
|
26
|
+
func getTradeQuotes(span: String?) throws -> Promise<String>
|
|
26
27
|
func deleteUser() throws -> Promise<Void>
|
|
27
28
|
func getAvailableTools() throws -> Promise<[AnyMapHolder]>
|
|
28
29
|
func executeTool(tool: ToolCall) throws -> Promise<String>
|
|
@@ -203,9 +203,9 @@ public class HybridRNCandleSpec_cxx {
|
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
@inline(__always)
|
|
206
|
-
public final func
|
|
206
|
+
public final func getAssetAccounts() -> bridge.Result_std__shared_ptr_Promise_std__string___ {
|
|
207
207
|
do {
|
|
208
|
-
let __result = try self.__implementation.
|
|
208
|
+
let __result = try self.__implementation.getAssetAccounts()
|
|
209
209
|
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_std__string__ in
|
|
210
210
|
let __promise = bridge.create_std__shared_ptr_Promise_std__string__()
|
|
211
211
|
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_std__string__(__promise)
|
|
@@ -222,11 +222,39 @@ public class HybridRNCandleSpec_cxx {
|
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
@inline(__always)
|
|
225
|
-
public final func
|
|
225
|
+
public final func getTrades(span: bridge.std__optional_std__string_)
|
|
226
226
|
-> bridge.Result_std__shared_ptr_Promise_std__string___
|
|
227
227
|
{
|
|
228
228
|
do {
|
|
229
|
-
let __result = try self.__implementation.
|
|
229
|
+
let __result = try self.__implementation.getTrades(
|
|
230
|
+
span: { () -> String? in
|
|
231
|
+
if let __unwrapped = span.value {
|
|
232
|
+
return String(__unwrapped)
|
|
233
|
+
} else {
|
|
234
|
+
return nil
|
|
235
|
+
}
|
|
236
|
+
}())
|
|
237
|
+
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_std__string__ in
|
|
238
|
+
let __promise = bridge.create_std__shared_ptr_Promise_std__string__()
|
|
239
|
+
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_std__string__(__promise)
|
|
240
|
+
__result
|
|
241
|
+
.then({ __result in __promiseHolder.resolve(std.string(__result)) })
|
|
242
|
+
.catch({ __error in __promiseHolder.reject(__error.toCpp()) })
|
|
243
|
+
return __promise
|
|
244
|
+
}()
|
|
245
|
+
return bridge.create_Result_std__shared_ptr_Promise_std__string___(__resultCpp)
|
|
246
|
+
} catch (let __error) {
|
|
247
|
+
let __exceptionPtr = __error.toCpp()
|
|
248
|
+
return bridge.create_Result_std__shared_ptr_Promise_std__string___(__exceptionPtr)
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
@inline(__always)
|
|
253
|
+
public final func getTradeQuotes(span: bridge.std__optional_std__string_)
|
|
254
|
+
-> bridge.Result_std__shared_ptr_Promise_std__string___
|
|
255
|
+
{
|
|
256
|
+
do {
|
|
257
|
+
let __result = try self.__implementation.getTradeQuotes(
|
|
230
258
|
span: { () -> String? in
|
|
231
259
|
if let __unwrapped = span.value {
|
|
232
260
|
return String(__unwrapped)
|
|
@@ -18,8 +18,9 @@ namespace margelo::nitro::rncandle {
|
|
|
18
18
|
prototype.registerHybridMethod("initialize", &HybridRNCandleSpec::initialize);
|
|
19
19
|
prototype.registerHybridMethod("getLinkedAccounts", &HybridRNCandleSpec::getLinkedAccounts);
|
|
20
20
|
prototype.registerHybridMethod("unlinkAccount", &HybridRNCandleSpec::unlinkAccount);
|
|
21
|
-
prototype.registerHybridMethod("
|
|
22
|
-
prototype.registerHybridMethod("
|
|
21
|
+
prototype.registerHybridMethod("getAssetAccounts", &HybridRNCandleSpec::getAssetAccounts);
|
|
22
|
+
prototype.registerHybridMethod("getTrades", &HybridRNCandleSpec::getTrades);
|
|
23
|
+
prototype.registerHybridMethod("getTradeQuotes", &HybridRNCandleSpec::getTradeQuotes);
|
|
23
24
|
prototype.registerHybridMethod("deleteUser", &HybridRNCandleSpec::deleteUser);
|
|
24
25
|
prototype.registerHybridMethod("getAvailableTools", &HybridRNCandleSpec::getAvailableTools);
|
|
25
26
|
prototype.registerHybridMethod("executeTool", &HybridRNCandleSpec::executeTool);
|
|
@@ -76,8 +76,9 @@ namespace margelo::nitro::rncandle {
|
|
|
76
76
|
virtual void initialize(const AppUser& appUser) = 0;
|
|
77
77
|
virtual std::shared_ptr<Promise<std::vector<LinkedAccount>>> getLinkedAccounts() = 0;
|
|
78
78
|
virtual std::shared_ptr<Promise<void>> unlinkAccount(const std::string& linkedAccountID) = 0;
|
|
79
|
-
virtual std::shared_ptr<Promise<std::string>>
|
|
80
|
-
virtual std::shared_ptr<Promise<std::string>>
|
|
79
|
+
virtual std::shared_ptr<Promise<std::string>> getAssetAccounts() = 0;
|
|
80
|
+
virtual std::shared_ptr<Promise<std::string>> getTrades(const std::optional<std::string>& span) = 0;
|
|
81
|
+
virtual std::shared_ptr<Promise<std::string>> getTradeQuotes(const std::optional<std::string>& span) = 0;
|
|
81
82
|
virtual std::shared_ptr<Promise<void>> deleteUser() = 0;
|
|
82
83
|
virtual std::shared_ptr<Promise<std::vector<std::shared_ptr<AnyMap>>>> getAvailableTools() = 0;
|
|
83
84
|
virtual std::shared_ptr<Promise<std::string>> executeTool(const ToolCall& tool) = 0;
|
package/package.json
CHANGED
|
@@ -20,12 +20,6 @@ const plugin = (config, options = {}) => {
|
|
|
20
20
|
},
|
|
21
21
|
],
|
|
22
22
|
],
|
|
23
|
-
[
|
|
24
|
-
withXcodeProject,
|
|
25
|
-
async (config) => {
|
|
26
|
-
return withMyCustomBuildPhase(config);
|
|
27
|
-
},
|
|
28
|
-
],
|
|
29
23
|
]);
|
|
30
24
|
};
|
|
31
25
|
|
|
@@ -56,18 +50,9 @@ const withIosDeploymentTarget = async (config) => {
|
|
|
56
50
|
}
|
|
57
51
|
|
|
58
52
|
const setPreInstallHook = mergeContents({
|
|
59
|
-
tag: "
|
|
53
|
+
tag: "",
|
|
60
54
|
src: setDeploymentTarget.contents,
|
|
61
|
-
newSrc:
|
|
62
|
-
installer.pod_targets.each do |pod|
|
|
63
|
-
if pod.name.eql?('RNReanimated')
|
|
64
|
-
def pod.build_type;
|
|
65
|
-
# This is a workaround for the issue with the dynamic library
|
|
66
|
-
Pod::BuildType.static_library;
|
|
67
|
-
end
|
|
68
|
-
end
|
|
69
|
-
end
|
|
70
|
-
end`,
|
|
55
|
+
newSrc: ``,
|
|
71
56
|
anchor: /post_install do \|installer\|/i,
|
|
72
57
|
offset: 0,
|
|
73
58
|
comment: "#",
|
|
@@ -83,139 +68,4 @@ const withIosDeploymentTarget = async (config) => {
|
|
|
83
68
|
return config;
|
|
84
69
|
};
|
|
85
70
|
|
|
86
|
-
// This function adds a custom build phase to the Xcode project
|
|
87
|
-
// that removes signature files from the build directory
|
|
88
|
-
// for Xcode 15 and 16. This is a workaround for a known issue
|
|
89
|
-
// with these versions of Xcode.
|
|
90
|
-
// I think it's because of the duplicate symbol issue.
|
|
91
|
-
const withMyCustomBuildPhase = async (config) => {
|
|
92
|
-
// Duplicate symbols issue
|
|
93
|
-
const xcodeProject = config.modResults;
|
|
94
|
-
const shellScript = `if { [ "$XCODE_VERSION_MAJOR" = "1500" ] || [ "$XCODE_VERSION_MAJOR" = "1600" ]; } && [ "$CONFIGURATION" = "Release" ]; then
|
|
95
|
-
echo "Remove signature files (Xcode 15/16 workaround, only in Release)"
|
|
96
|
-
find "$BUILD_DIR/\${CONFIGURATION}-iphoneos" -name "*.signature" -type f | xargs -r rm
|
|
97
|
-
fi`;
|
|
98
|
-
|
|
99
|
-
xcodeProject.addBuildPhase(
|
|
100
|
-
[],
|
|
101
|
-
"PBXShellScriptBuildPhase",
|
|
102
|
-
"Remove Framework signature files (Xcode 15/16 workaround)",
|
|
103
|
-
null,
|
|
104
|
-
{
|
|
105
|
-
shellPath: "/bin/sh",
|
|
106
|
-
shellScript,
|
|
107
|
-
runOnlyForDeploymentPostprocessing: 1,
|
|
108
|
-
}
|
|
109
|
-
);
|
|
110
|
-
|
|
111
|
-
// reference the "props"
|
|
112
|
-
// const { version, repositoryUrl, repoName, productName } = {
|
|
113
|
-
// repositoryUrl: "https://github.com/candlefinance/candle-swift",
|
|
114
|
-
// repoName: "candle-swift",
|
|
115
|
-
// productName: "Candle",
|
|
116
|
-
// version: "fa0db96e9a73740bbd4977160894a45c6db96f51",
|
|
117
|
-
// };
|
|
118
|
-
// // get XCRemoteSwiftPackageReference section
|
|
119
|
-
// const spmReferences =
|
|
120
|
-
// xcodeProject.hash.project.objects["XCRemoteSwiftPackageReference"];
|
|
121
|
-
// // if doesn't exist (this is our first SPM package) create empty object
|
|
122
|
-
// if (!spmReferences) {
|
|
123
|
-
// xcodeProject.hash.project.objects["XCRemoteSwiftPackageReference"] = {};
|
|
124
|
-
// }
|
|
125
|
-
// // generate new ID
|
|
126
|
-
// const packageReferenceUUID = xcodeProject.generateUuid();
|
|
127
|
-
// // add XCRemoteSwiftPackageReference section
|
|
128
|
-
// xcodeProject.hash.project.objects["XCRemoteSwiftPackageReference"][
|
|
129
|
-
// `${packageReferenceUUID} /* XCRemoteSwiftPackageReference "${repoName}" */`
|
|
130
|
-
// ] = {
|
|
131
|
-
// isa: "XCRemoteSwiftPackageReference",
|
|
132
|
-
// repositoryURL: repositoryUrl,
|
|
133
|
-
// requirement: {
|
|
134
|
-
// kind: "revision",
|
|
135
|
-
// revision: version,
|
|
136
|
-
// },
|
|
137
|
-
// };
|
|
138
|
-
|
|
139
|
-
// get XCSwiftPackageProductDependency section
|
|
140
|
-
// const spmProducts =
|
|
141
|
-
// xcodeProject.hash.project.objects["XCSwiftPackageProductDependency"];
|
|
142
|
-
// // if doesn't exist (this is our first SPM package) create empty object
|
|
143
|
-
// if (!spmProducts) {
|
|
144
|
-
// xcodeProject.hash.project.objects["XCSwiftPackageProductDependency"] = {};
|
|
145
|
-
// }
|
|
146
|
-
// // generate new ID
|
|
147
|
-
// const packageUUID = xcodeProject.generateUuid();
|
|
148
|
-
// // add XCSwiftPackageProductDependency section
|
|
149
|
-
// xcodeProject.hash.project.objects["XCSwiftPackageProductDependency"][
|
|
150
|
-
// `${packageUUID} /* ${productName} */`
|
|
151
|
-
// ] = {
|
|
152
|
-
// isa: "XCSwiftPackageProductDependency",
|
|
153
|
-
// // from step before
|
|
154
|
-
// package: `${packageReferenceUUID} /* XCRemoteSwiftPackageReference "${repoName}" */`,
|
|
155
|
-
// productName: productName,
|
|
156
|
-
// };
|
|
157
|
-
|
|
158
|
-
// get main project ID
|
|
159
|
-
// const projectId = Object.keys(
|
|
160
|
-
// xcodeProject.hash.project.objects["PBXProject"]
|
|
161
|
-
// ).at(0);
|
|
162
|
-
// // create empty array for package references if it doesn't exist
|
|
163
|
-
// if (
|
|
164
|
-
// !xcodeProject.hash.project.objects["PBXProject"][projectId][
|
|
165
|
-
// "packageReferences"
|
|
166
|
-
// ]
|
|
167
|
-
// ) {
|
|
168
|
-
// xcodeProject.hash.project.objects["PBXProject"][projectId][
|
|
169
|
-
// "packageReferences"
|
|
170
|
-
// ] = [];
|
|
171
|
-
// }
|
|
172
|
-
// // add our package reference (use ID from first step)
|
|
173
|
-
// xcodeProject.hash.project.objects["PBXProject"][projectId][
|
|
174
|
-
// "packageReferences"
|
|
175
|
-
// ] = [
|
|
176
|
-
// ...xcodeProject.hash.project.objects["PBXProject"][projectId][
|
|
177
|
-
// "packageReferences"
|
|
178
|
-
// ],
|
|
179
|
-
// `${packageReferenceUUID} /* XCRemoteSwiftPackageReference "${repoName}" */`,
|
|
180
|
-
// ];
|
|
181
|
-
|
|
182
|
-
// // generate new ID
|
|
183
|
-
// const frameworkUUID = xcodeProject.generateUuid();
|
|
184
|
-
// // add comment and reference to our framework in PBXBuildFile section
|
|
185
|
-
// xcodeProject.hash.project.objects["PBXBuildFile"][
|
|
186
|
-
// `${frameworkUUID}_comment`
|
|
187
|
-
// ] = `${productName} in Frameworks`;
|
|
188
|
-
// xcodeProject.hash.project.objects["PBXBuildFile"][frameworkUUID] = {
|
|
189
|
-
// isa: "PBXBuildFile",
|
|
190
|
-
// productRef: packageUUID,
|
|
191
|
-
// productRef_comment: productName,
|
|
192
|
-
// };
|
|
193
|
-
|
|
194
|
-
// // get first build phase
|
|
195
|
-
// const buildPhaseId = Object.keys(
|
|
196
|
-
// xcodeProject.hash.project.objects["PBXFrameworksBuildPhase"]
|
|
197
|
-
// ).at(0);
|
|
198
|
-
// // create empty array for files if it doesn't exist
|
|
199
|
-
// if (
|
|
200
|
-
// !xcodeProject.hash.project.objects["PBXFrameworksBuildPhase"][buildPhaseId][
|
|
201
|
-
// "files"
|
|
202
|
-
// ]
|
|
203
|
-
// ) {
|
|
204
|
-
// xcodeProject.hash.project.objects["PBXFrameworksBuildPhase"][buildPhaseId][
|
|
205
|
-
// "files"
|
|
206
|
-
// ] = [];
|
|
207
|
-
// }
|
|
208
|
-
// // add our framework reference (use ID from step 4)
|
|
209
|
-
// xcodeProject.hash.project.objects["PBXFrameworksBuildPhase"][buildPhaseId][
|
|
210
|
-
// "files"
|
|
211
|
-
// ] = [
|
|
212
|
-
// ...xcodeProject.hash.project.objects["PBXFrameworksBuildPhase"][
|
|
213
|
-
// buildPhaseId
|
|
214
|
-
// ]["files"],
|
|
215
|
-
// `${frameworkUUID} /* ${productName} in Frameworks */`,
|
|
216
|
-
// ];
|
|
217
|
-
|
|
218
|
-
return config;
|
|
219
|
-
};
|
|
220
|
-
|
|
221
71
|
module.exports = plugin;
|
package/src/index.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type {
|
|
|
3
3
|
AppUser,
|
|
4
4
|
LinkedAccount,
|
|
5
5
|
PresentationBackground,
|
|
6
|
+
PresentationStyle,
|
|
6
7
|
RNCandle,
|
|
7
8
|
Service,
|
|
8
9
|
} from "./specs/RNCandle.nitro";
|
|
@@ -23,6 +24,7 @@ export class CandleClient {
|
|
|
23
24
|
customerName,
|
|
24
25
|
showDynamicLoading = true,
|
|
25
26
|
presentationBackground = "default",
|
|
27
|
+
presentationStyle = "fullScreen",
|
|
26
28
|
onSuccess,
|
|
27
29
|
}: {
|
|
28
30
|
services?: Service[];
|
|
@@ -31,6 +33,7 @@ export class CandleClient {
|
|
|
31
33
|
showSandbox?: boolean;
|
|
32
34
|
showDynamicLoading?: boolean;
|
|
33
35
|
presentationBackground?: PresentationBackground;
|
|
36
|
+
presentationStyle?: PresentationStyle;
|
|
34
37
|
onSuccess: (account: LinkedAccount) => void;
|
|
35
38
|
}): void {
|
|
36
39
|
this.candle.candleLinkSheet(
|
|
@@ -40,7 +43,7 @@ export class CandleClient {
|
|
|
40
43
|
customerName,
|
|
41
44
|
showDynamicLoading,
|
|
42
45
|
presentationBackground,
|
|
43
|
-
|
|
46
|
+
presentationStyle,
|
|
44
47
|
onSuccess
|
|
45
48
|
);
|
|
46
49
|
}
|
|
@@ -126,8 +126,10 @@ export interface RNCandle extends HybridObject<{ ios: "swift" }> {
|
|
|
126
126
|
initialize(appUser: AppUser): void;
|
|
127
127
|
getLinkedAccounts(): Promise<LinkedAccount[]>;
|
|
128
128
|
unlinkAccount(linkedAccountID: string): Promise<void>;
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
// FIXME: Make this type safe
|
|
130
|
+
getAssetAccounts(): Promise<string>;
|
|
131
|
+
getTrades(span: string | undefined): Promise<string>;
|
|
132
|
+
getTradeQuotes(span: string | undefined): Promise<string>;
|
|
131
133
|
deleteUser(): Promise<void>;
|
|
132
134
|
// FIXME: The return type should be a more specific type based on the actual tool calls available.
|
|
133
135
|
getAvailableTools(): Promise<Array<AnyMap>>;
|