react-native-candle 0.1.15 → 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/ios/Sources/HostingViewController.swift +13 -46
- package/ios/Sources/RNCandle.swift +15 -19
- 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/src/index.ts +4 -1
- package/src/specs/RNCandle.nitro.ts +4 -2
|
@@ -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,15 +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
|
-
|
|
91
|
+
return ""
|
|
102
92
|
}
|
|
103
93
|
}
|
|
104
94
|
|
|
105
|
-
public func
|
|
95
|
+
public func getTrades(span: String?) throws -> Promise<String> {
|
|
106
96
|
.async {
|
|
107
|
-
|
|
97
|
+
return ""
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
func getTradeQuotes(span: String?) throws -> Promise<String> {
|
|
102
|
+
.async {
|
|
103
|
+
return ""
|
|
108
104
|
}
|
|
109
105
|
}
|
|
110
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/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,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,MAAM,GACN,OAAO,GACP,UAAU,GACV,WAAW,GACX,SAAS,GACT,MAAM,GACN,WAAW,GACX,WAAW,GACX,aAAa,GACb,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,aAAa,GACb,WAAW,GACX,UAAU,GACV,YAAY,GACZ,UAAU,GACV,GAAG,GACH,UAAU,GACV,WAAW,GACX,QAAQ,GACR,UAAU,GACV,WAAW,GACX,UAAU,GACV,SAAS,GACT,UAAU,GACV,UAAU,GACV,QAAQ,GACR,WAAW,GACX,gBAAgB,GAChB,iBAAiB,GACjB,qBAAqB,GACrB,KAAK,GACL,OAAO,GACP,KAAK,GACL,YAAY,GACZ,QAAQ,GACR,YA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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,MAAM,GACN,OAAO,GACP,UAAU,GACV,WAAW,GACX,SAAS,GACT,MAAM,GACN,WAAW,GACX,WAAW,GACX,aAAa,GACb,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,aAAa,GACb,WAAW,GACX,UAAU,GACV,YAAY,GACZ,UAAU,GACV,GAAG,GACH,UAAU,GACV,WAAW,GACX,QAAQ,GACR,UAAU,GACV,WAAW,GACX,UAAU,GACV,SAAS,GACT,UAAU,GACV,UAAU,GACV,QAAQ,GACR,WAAW,GACX,gBAAgB,GAChB,iBAAiB,GACjB,qBAAqB,GACrB,KAAK,GACL,OAAO,GACP,KAAK,GACL,YAAY,GACZ,QAAQ,GACR,YAAY,GAC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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,KA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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,GACP,MAAM,GACN,OAAO,GACP,UAAU,G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,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,MAAM,GACN,OAAO,GACP,UAAU,GACV,WA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,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"}
|
|
@@ -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
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>>;
|