react-native-candle 0.1.12 → 0.1.14
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/CandleLinkSheetWrapperView.swift +179 -38
- package/ios/Sources/CandleLinkViewModel.swift +3 -11
- package/ios/Sources/RNCandle.swift +301 -100
- package/ios/Sources/UIApplication++.swift +0 -1
- package/lib/commonjs/index.js +33 -41
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js +31 -35
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +23 -19
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/specs/RNCandle.nitro.d.ts +12 -6
- package/lib/typescript/commonjs/src/specs/RNCandle.nitro.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +23 -19
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/specs/RNCandle.nitro.d.ts +12 -6
- package/lib/typescript/module/src/specs/RNCandle.nitro.d.ts.map +1 -1
- package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Bridge.cpp +20 -4
- package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Bridge.hpp +99 -20
- package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Umbrella.hpp +6 -0
- package/nitrogen/generated/ios/c++/HybridRNCandleSpecSwift.hpp +15 -3
- package/nitrogen/generated/ios/swift/AppUser.swift +75 -0
- package/nitrogen/generated/ios/swift/Func_void_LinkedAccount.swift +44 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_std__shared_ptr_AnyMap__.swift +47 -0
- package/nitrogen/generated/ios/swift/HybridRNCandleSpec.swift +4 -2
- package/nitrogen/generated/ios/swift/HybridRNCandleSpec_cxx.swift +40 -12
- package/nitrogen/generated/ios/swift/Service.swift +292 -0
- package/nitrogen/generated/shared/c++/AppUser.hpp +78 -0
- package/nitrogen/generated/shared/c++/HybridRNCandleSpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridRNCandleSpec.hpp +10 -3
- package/nitrogen/generated/shared/c++/Service.hpp +292 -0
- package/package.json +1 -1
- package/src/index.ts +55 -55
- package/src/specs/RNCandle.nitro.ts +86 -6
|
@@ -36,6 +36,79 @@ namespace margelo::nitro::rncandle {
|
|
|
36
36
|
SANDBOX SWIFT_NAME(sandbox) = 4,
|
|
37
37
|
UBER SWIFT_NAME(uber) = 5,
|
|
38
38
|
LYFT SWIFT_NAME(lyft) = 6,
|
|
39
|
+
CHIME SWIFT_NAME(chime) = 7,
|
|
40
|
+
PAYPAL SWIFT_NAME(paypal) = 8,
|
|
41
|
+
COINBASE SWIFT_NAME(coinbase) = 9,
|
|
42
|
+
DISCOVER SWIFT_NAME(discover) = 10,
|
|
43
|
+
AMERICAN_EXPRESS SWIFT_NAME(americanExpress) = 11,
|
|
44
|
+
JPMORGAN_CHASE SWIFT_NAME(jpmorganChase) = 12,
|
|
45
|
+
BANK_OF_AMERICA SWIFT_NAME(bankOfAmerica) = 13,
|
|
46
|
+
CAPITAL_ONE SWIFT_NAME(capitalOne) = 14,
|
|
47
|
+
CITIBANK SWIFT_NAME(citibank) = 15,
|
|
48
|
+
VANGUARD SWIFT_NAME(vanguard) = 16,
|
|
49
|
+
WELLS_FARGO SWIFT_NAME(wellsFargo) = 17,
|
|
50
|
+
CHARLES_SCHWAB SWIFT_NAME(charlesSchwab) = 18,
|
|
51
|
+
KALSHI SWIFT_NAME(kalshi) = 19,
|
|
52
|
+
EXPERIAN SWIFT_NAME(experian) = 20,
|
|
53
|
+
WAYMO SWIFT_NAME(waymo) = 21,
|
|
54
|
+
REVEL SWIFT_NAME(revel) = 22,
|
|
55
|
+
TURO SWIFT_NAME(turo) = 23,
|
|
56
|
+
GETAROUND SWIFT_NAME(getaround) = 24,
|
|
57
|
+
ZIPCAR SWIFT_NAME(zipcar) = 25,
|
|
58
|
+
AIRBNB SWIFT_NAME(airbnb) = 26,
|
|
59
|
+
AMERICAN_AIRLINES SWIFT_NAME(americanAirlines) = 27,
|
|
60
|
+
DELTA SWIFT_NAME(delta) = 28,
|
|
61
|
+
UNITED SWIFT_NAME(united) = 29,
|
|
62
|
+
JETBLUE SWIFT_NAME(jetblue) = 30,
|
|
63
|
+
SOUTHWEST SWIFT_NAME(southwest) = 31,
|
|
64
|
+
HAWAIIAN SWIFT_NAME(hawaiian) = 32,
|
|
65
|
+
HOTELS SWIFT_NAME(hotels) = 33,
|
|
66
|
+
GEICO SWIFT_NAME(geico) = 34,
|
|
67
|
+
PROGRESSIVE SWIFT_NAME(progressive) = 35,
|
|
68
|
+
AAA SWIFT_NAME(aaa) = 36,
|
|
69
|
+
STATE_FARM SWIFT_NAME(stateFarm) = 37,
|
|
70
|
+
HERTZ SWIFT_NAME(hertz) = 38,
|
|
71
|
+
AVIS SWIFT_NAME(avis) = 39,
|
|
72
|
+
TESLA SWIFT_NAME(tesla) = 40,
|
|
73
|
+
DOORDASH SWIFT_NAME(doordash) = 41,
|
|
74
|
+
UBER_EATS SWIFT_NAME(uberEats) = 42,
|
|
75
|
+
GRUBHUB SWIFT_NAME(grubhub) = 43,
|
|
76
|
+
RESY SWIFT_NAME(resy) = 44,
|
|
77
|
+
OPENTABLE SWIFT_NAME(opentable) = 45,
|
|
78
|
+
STARBUCKS SWIFT_NAME(starbucks) = 46,
|
|
79
|
+
BLUE_BOTTLE SWIFT_NAME(blueBottle) = 47,
|
|
80
|
+
COSTCO SWIFT_NAME(costco) = 48,
|
|
81
|
+
AMAZON SWIFT_NAME(amazon) = 49,
|
|
82
|
+
WALMART SWIFT_NAME(walmart) = 50,
|
|
83
|
+
WHOLE_FOODS SWIFT_NAME(wholeFoods) = 51,
|
|
84
|
+
MCDONALDS SWIFT_NAME(mcdonalds) = 52,
|
|
85
|
+
CHIPOTLE SWIFT_NAME(chipotle) = 53,
|
|
86
|
+
SWEETGREEN SWIFT_NAME(sweetgreen) = 54,
|
|
87
|
+
SNAPCHAT SWIFT_NAME(snapchat) = 55,
|
|
88
|
+
X SWIFT_NAME(x) = 56,
|
|
89
|
+
FACEBOOK SWIFT_NAME(facebook) = 57,
|
|
90
|
+
INSTAGRAM SWIFT_NAME(instagram) = 58,
|
|
91
|
+
SIGNAL SWIFT_NAME(signal) = 59,
|
|
92
|
+
WHATSAPP SWIFT_NAME(whatsapp) = 60,
|
|
93
|
+
MESSENGER SWIFT_NAME(messenger) = 61,
|
|
94
|
+
LINKEDIN SWIFT_NAME(linkedin) = 62,
|
|
95
|
+
DISCORD SWIFT_NAME(discord) = 63,
|
|
96
|
+
MESSAGES SWIFT_NAME(messages) = 64,
|
|
97
|
+
TELEGRAM SWIFT_NAME(telegram) = 65,
|
|
98
|
+
REDDIT SWIFT_NAME(reddit) = 66,
|
|
99
|
+
PINTEREST SWIFT_NAME(pinterest) = 67,
|
|
100
|
+
NEW_YORK_TIMES SWIFT_NAME(newYorkTimes) = 68,
|
|
101
|
+
WASHINGTON_POST SWIFT_NAME(washingtonPost) = 69,
|
|
102
|
+
WALL_STREET_JOURNAL SWIFT_NAME(wallStreetJournal) = 70,
|
|
103
|
+
CNN SWIFT_NAME(cnn) = 71,
|
|
104
|
+
YAHOO SWIFT_NAME(yahoo) = 72,
|
|
105
|
+
FOX SWIFT_NAME(fox) = 73,
|
|
106
|
+
PERPLEXITY SWIFT_NAME(perplexity) = 74,
|
|
107
|
+
OPENAI SWIFT_NAME(openai) = 75,
|
|
108
|
+
POLYMARKET SWIFT_NAME(polymarket) = 76,
|
|
109
|
+
ESPN SWIFT_NAME(espn) = 77,
|
|
110
|
+
YOUTUBE SWIFT_NAME(youtube) = 78,
|
|
111
|
+
NETFLIX SWIFT_NAME(netflix) = 79,
|
|
39
112
|
} CLOSED_ENUM;
|
|
40
113
|
|
|
41
114
|
} // namespace margelo::nitro::rncandle
|
|
@@ -57,6 +130,79 @@ namespace margelo::nitro {
|
|
|
57
130
|
case hashString("sandbox"): return Service::SANDBOX;
|
|
58
131
|
case hashString("uber"): return Service::UBER;
|
|
59
132
|
case hashString("lyft"): return Service::LYFT;
|
|
133
|
+
case hashString("chime"): return Service::CHIME;
|
|
134
|
+
case hashString("paypal"): return Service::PAYPAL;
|
|
135
|
+
case hashString("coinbase"): return Service::COINBASE;
|
|
136
|
+
case hashString("discover"): return Service::DISCOVER;
|
|
137
|
+
case hashString("american_express"): return Service::AMERICAN_EXPRESS;
|
|
138
|
+
case hashString("jpmorgan_chase"): return Service::JPMORGAN_CHASE;
|
|
139
|
+
case hashString("bank_of_america"): return Service::BANK_OF_AMERICA;
|
|
140
|
+
case hashString("capital_one"): return Service::CAPITAL_ONE;
|
|
141
|
+
case hashString("citibank"): return Service::CITIBANK;
|
|
142
|
+
case hashString("vanguard"): return Service::VANGUARD;
|
|
143
|
+
case hashString("wells_fargo"): return Service::WELLS_FARGO;
|
|
144
|
+
case hashString("charles_schwab"): return Service::CHARLES_SCHWAB;
|
|
145
|
+
case hashString("kalshi"): return Service::KALSHI;
|
|
146
|
+
case hashString("experian"): return Service::EXPERIAN;
|
|
147
|
+
case hashString("waymo"): return Service::WAYMO;
|
|
148
|
+
case hashString("revel"): return Service::REVEL;
|
|
149
|
+
case hashString("turo"): return Service::TURO;
|
|
150
|
+
case hashString("getaround"): return Service::GETAROUND;
|
|
151
|
+
case hashString("zipcar"): return Service::ZIPCAR;
|
|
152
|
+
case hashString("airbnb"): return Service::AIRBNB;
|
|
153
|
+
case hashString("american_airlines"): return Service::AMERICAN_AIRLINES;
|
|
154
|
+
case hashString("delta"): return Service::DELTA;
|
|
155
|
+
case hashString("united"): return Service::UNITED;
|
|
156
|
+
case hashString("jetblue"): return Service::JETBLUE;
|
|
157
|
+
case hashString("southwest"): return Service::SOUTHWEST;
|
|
158
|
+
case hashString("hawaiian"): return Service::HAWAIIAN;
|
|
159
|
+
case hashString("hotels"): return Service::HOTELS;
|
|
160
|
+
case hashString("geico"): return Service::GEICO;
|
|
161
|
+
case hashString("progressive"): return Service::PROGRESSIVE;
|
|
162
|
+
case hashString("aaa"): return Service::AAA;
|
|
163
|
+
case hashString("state_farm"): return Service::STATE_FARM;
|
|
164
|
+
case hashString("hertz"): return Service::HERTZ;
|
|
165
|
+
case hashString("avis"): return Service::AVIS;
|
|
166
|
+
case hashString("tesla"): return Service::TESLA;
|
|
167
|
+
case hashString("doordash"): return Service::DOORDASH;
|
|
168
|
+
case hashString("uber_eats"): return Service::UBER_EATS;
|
|
169
|
+
case hashString("grubhub"): return Service::GRUBHUB;
|
|
170
|
+
case hashString("resy"): return Service::RESY;
|
|
171
|
+
case hashString("opentable"): return Service::OPENTABLE;
|
|
172
|
+
case hashString("starbucks"): return Service::STARBUCKS;
|
|
173
|
+
case hashString("blue_bottle"): return Service::BLUE_BOTTLE;
|
|
174
|
+
case hashString("costco"): return Service::COSTCO;
|
|
175
|
+
case hashString("amazon"): return Service::AMAZON;
|
|
176
|
+
case hashString("walmart"): return Service::WALMART;
|
|
177
|
+
case hashString("whole_foods"): return Service::WHOLE_FOODS;
|
|
178
|
+
case hashString("mcdonalds"): return Service::MCDONALDS;
|
|
179
|
+
case hashString("chipotle"): return Service::CHIPOTLE;
|
|
180
|
+
case hashString("sweetgreen"): return Service::SWEETGREEN;
|
|
181
|
+
case hashString("snapchat"): return Service::SNAPCHAT;
|
|
182
|
+
case hashString("x"): return Service::X;
|
|
183
|
+
case hashString("facebook"): return Service::FACEBOOK;
|
|
184
|
+
case hashString("instagram"): return Service::INSTAGRAM;
|
|
185
|
+
case hashString("signal"): return Service::SIGNAL;
|
|
186
|
+
case hashString("whatsapp"): return Service::WHATSAPP;
|
|
187
|
+
case hashString("messenger"): return Service::MESSENGER;
|
|
188
|
+
case hashString("linkedin"): return Service::LINKEDIN;
|
|
189
|
+
case hashString("discord"): return Service::DISCORD;
|
|
190
|
+
case hashString("messages"): return Service::MESSAGES;
|
|
191
|
+
case hashString("telegram"): return Service::TELEGRAM;
|
|
192
|
+
case hashString("reddit"): return Service::REDDIT;
|
|
193
|
+
case hashString("pinterest"): return Service::PINTEREST;
|
|
194
|
+
case hashString("new_york_times"): return Service::NEW_YORK_TIMES;
|
|
195
|
+
case hashString("washington_post"): return Service::WASHINGTON_POST;
|
|
196
|
+
case hashString("wall_street_journal"): return Service::WALL_STREET_JOURNAL;
|
|
197
|
+
case hashString("cnn"): return Service::CNN;
|
|
198
|
+
case hashString("yahoo"): return Service::YAHOO;
|
|
199
|
+
case hashString("fox"): return Service::FOX;
|
|
200
|
+
case hashString("perplexity"): return Service::PERPLEXITY;
|
|
201
|
+
case hashString("openai"): return Service::OPENAI;
|
|
202
|
+
case hashString("polymarket"): return Service::POLYMARKET;
|
|
203
|
+
case hashString("espn"): return Service::ESPN;
|
|
204
|
+
case hashString("youtube"): return Service::YOUTUBE;
|
|
205
|
+
case hashString("netflix"): return Service::NETFLIX;
|
|
60
206
|
default: [[unlikely]]
|
|
61
207
|
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum Service - invalid value!");
|
|
62
208
|
}
|
|
@@ -70,6 +216,79 @@ namespace margelo::nitro {
|
|
|
70
216
|
case Service::SANDBOX: return JSIConverter<std::string>::toJSI(runtime, "sandbox");
|
|
71
217
|
case Service::UBER: return JSIConverter<std::string>::toJSI(runtime, "uber");
|
|
72
218
|
case Service::LYFT: return JSIConverter<std::string>::toJSI(runtime, "lyft");
|
|
219
|
+
case Service::CHIME: return JSIConverter<std::string>::toJSI(runtime, "chime");
|
|
220
|
+
case Service::PAYPAL: return JSIConverter<std::string>::toJSI(runtime, "paypal");
|
|
221
|
+
case Service::COINBASE: return JSIConverter<std::string>::toJSI(runtime, "coinbase");
|
|
222
|
+
case Service::DISCOVER: return JSIConverter<std::string>::toJSI(runtime, "discover");
|
|
223
|
+
case Service::AMERICAN_EXPRESS: return JSIConverter<std::string>::toJSI(runtime, "american_express");
|
|
224
|
+
case Service::JPMORGAN_CHASE: return JSIConverter<std::string>::toJSI(runtime, "jpmorgan_chase");
|
|
225
|
+
case Service::BANK_OF_AMERICA: return JSIConverter<std::string>::toJSI(runtime, "bank_of_america");
|
|
226
|
+
case Service::CAPITAL_ONE: return JSIConverter<std::string>::toJSI(runtime, "capital_one");
|
|
227
|
+
case Service::CITIBANK: return JSIConverter<std::string>::toJSI(runtime, "citibank");
|
|
228
|
+
case Service::VANGUARD: return JSIConverter<std::string>::toJSI(runtime, "vanguard");
|
|
229
|
+
case Service::WELLS_FARGO: return JSIConverter<std::string>::toJSI(runtime, "wells_fargo");
|
|
230
|
+
case Service::CHARLES_SCHWAB: return JSIConverter<std::string>::toJSI(runtime, "charles_schwab");
|
|
231
|
+
case Service::KALSHI: return JSIConverter<std::string>::toJSI(runtime, "kalshi");
|
|
232
|
+
case Service::EXPERIAN: return JSIConverter<std::string>::toJSI(runtime, "experian");
|
|
233
|
+
case Service::WAYMO: return JSIConverter<std::string>::toJSI(runtime, "waymo");
|
|
234
|
+
case Service::REVEL: return JSIConverter<std::string>::toJSI(runtime, "revel");
|
|
235
|
+
case Service::TURO: return JSIConverter<std::string>::toJSI(runtime, "turo");
|
|
236
|
+
case Service::GETAROUND: return JSIConverter<std::string>::toJSI(runtime, "getaround");
|
|
237
|
+
case Service::ZIPCAR: return JSIConverter<std::string>::toJSI(runtime, "zipcar");
|
|
238
|
+
case Service::AIRBNB: return JSIConverter<std::string>::toJSI(runtime, "airbnb");
|
|
239
|
+
case Service::AMERICAN_AIRLINES: return JSIConverter<std::string>::toJSI(runtime, "american_airlines");
|
|
240
|
+
case Service::DELTA: return JSIConverter<std::string>::toJSI(runtime, "delta");
|
|
241
|
+
case Service::UNITED: return JSIConverter<std::string>::toJSI(runtime, "united");
|
|
242
|
+
case Service::JETBLUE: return JSIConverter<std::string>::toJSI(runtime, "jetblue");
|
|
243
|
+
case Service::SOUTHWEST: return JSIConverter<std::string>::toJSI(runtime, "southwest");
|
|
244
|
+
case Service::HAWAIIAN: return JSIConverter<std::string>::toJSI(runtime, "hawaiian");
|
|
245
|
+
case Service::HOTELS: return JSIConverter<std::string>::toJSI(runtime, "hotels");
|
|
246
|
+
case Service::GEICO: return JSIConverter<std::string>::toJSI(runtime, "geico");
|
|
247
|
+
case Service::PROGRESSIVE: return JSIConverter<std::string>::toJSI(runtime, "progressive");
|
|
248
|
+
case Service::AAA: return JSIConverter<std::string>::toJSI(runtime, "aaa");
|
|
249
|
+
case Service::STATE_FARM: return JSIConverter<std::string>::toJSI(runtime, "state_farm");
|
|
250
|
+
case Service::HERTZ: return JSIConverter<std::string>::toJSI(runtime, "hertz");
|
|
251
|
+
case Service::AVIS: return JSIConverter<std::string>::toJSI(runtime, "avis");
|
|
252
|
+
case Service::TESLA: return JSIConverter<std::string>::toJSI(runtime, "tesla");
|
|
253
|
+
case Service::DOORDASH: return JSIConverter<std::string>::toJSI(runtime, "doordash");
|
|
254
|
+
case Service::UBER_EATS: return JSIConverter<std::string>::toJSI(runtime, "uber_eats");
|
|
255
|
+
case Service::GRUBHUB: return JSIConverter<std::string>::toJSI(runtime, "grubhub");
|
|
256
|
+
case Service::RESY: return JSIConverter<std::string>::toJSI(runtime, "resy");
|
|
257
|
+
case Service::OPENTABLE: return JSIConverter<std::string>::toJSI(runtime, "opentable");
|
|
258
|
+
case Service::STARBUCKS: return JSIConverter<std::string>::toJSI(runtime, "starbucks");
|
|
259
|
+
case Service::BLUE_BOTTLE: return JSIConverter<std::string>::toJSI(runtime, "blue_bottle");
|
|
260
|
+
case Service::COSTCO: return JSIConverter<std::string>::toJSI(runtime, "costco");
|
|
261
|
+
case Service::AMAZON: return JSIConverter<std::string>::toJSI(runtime, "amazon");
|
|
262
|
+
case Service::WALMART: return JSIConverter<std::string>::toJSI(runtime, "walmart");
|
|
263
|
+
case Service::WHOLE_FOODS: return JSIConverter<std::string>::toJSI(runtime, "whole_foods");
|
|
264
|
+
case Service::MCDONALDS: return JSIConverter<std::string>::toJSI(runtime, "mcdonalds");
|
|
265
|
+
case Service::CHIPOTLE: return JSIConverter<std::string>::toJSI(runtime, "chipotle");
|
|
266
|
+
case Service::SWEETGREEN: return JSIConverter<std::string>::toJSI(runtime, "sweetgreen");
|
|
267
|
+
case Service::SNAPCHAT: return JSIConverter<std::string>::toJSI(runtime, "snapchat");
|
|
268
|
+
case Service::X: return JSIConverter<std::string>::toJSI(runtime, "x");
|
|
269
|
+
case Service::FACEBOOK: return JSIConverter<std::string>::toJSI(runtime, "facebook");
|
|
270
|
+
case Service::INSTAGRAM: return JSIConverter<std::string>::toJSI(runtime, "instagram");
|
|
271
|
+
case Service::SIGNAL: return JSIConverter<std::string>::toJSI(runtime, "signal");
|
|
272
|
+
case Service::WHATSAPP: return JSIConverter<std::string>::toJSI(runtime, "whatsapp");
|
|
273
|
+
case Service::MESSENGER: return JSIConverter<std::string>::toJSI(runtime, "messenger");
|
|
274
|
+
case Service::LINKEDIN: return JSIConverter<std::string>::toJSI(runtime, "linkedin");
|
|
275
|
+
case Service::DISCORD: return JSIConverter<std::string>::toJSI(runtime, "discord");
|
|
276
|
+
case Service::MESSAGES: return JSIConverter<std::string>::toJSI(runtime, "messages");
|
|
277
|
+
case Service::TELEGRAM: return JSIConverter<std::string>::toJSI(runtime, "telegram");
|
|
278
|
+
case Service::REDDIT: return JSIConverter<std::string>::toJSI(runtime, "reddit");
|
|
279
|
+
case Service::PINTEREST: return JSIConverter<std::string>::toJSI(runtime, "pinterest");
|
|
280
|
+
case Service::NEW_YORK_TIMES: return JSIConverter<std::string>::toJSI(runtime, "new_york_times");
|
|
281
|
+
case Service::WASHINGTON_POST: return JSIConverter<std::string>::toJSI(runtime, "washington_post");
|
|
282
|
+
case Service::WALL_STREET_JOURNAL: return JSIConverter<std::string>::toJSI(runtime, "wall_street_journal");
|
|
283
|
+
case Service::CNN: return JSIConverter<std::string>::toJSI(runtime, "cnn");
|
|
284
|
+
case Service::YAHOO: return JSIConverter<std::string>::toJSI(runtime, "yahoo");
|
|
285
|
+
case Service::FOX: return JSIConverter<std::string>::toJSI(runtime, "fox");
|
|
286
|
+
case Service::PERPLEXITY: return JSIConverter<std::string>::toJSI(runtime, "perplexity");
|
|
287
|
+
case Service::OPENAI: return JSIConverter<std::string>::toJSI(runtime, "openai");
|
|
288
|
+
case Service::POLYMARKET: return JSIConverter<std::string>::toJSI(runtime, "polymarket");
|
|
289
|
+
case Service::ESPN: return JSIConverter<std::string>::toJSI(runtime, "espn");
|
|
290
|
+
case Service::YOUTUBE: return JSIConverter<std::string>::toJSI(runtime, "youtube");
|
|
291
|
+
case Service::NETFLIX: return JSIConverter<std::string>::toJSI(runtime, "netflix");
|
|
73
292
|
default: [[unlikely]]
|
|
74
293
|
throw std::invalid_argument("Cannot convert Service to JS - invalid value: "
|
|
75
294
|
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
@@ -88,6 +307,79 @@ namespace margelo::nitro {
|
|
|
88
307
|
case hashString("sandbox"):
|
|
89
308
|
case hashString("uber"):
|
|
90
309
|
case hashString("lyft"):
|
|
310
|
+
case hashString("chime"):
|
|
311
|
+
case hashString("paypal"):
|
|
312
|
+
case hashString("coinbase"):
|
|
313
|
+
case hashString("discover"):
|
|
314
|
+
case hashString("american_express"):
|
|
315
|
+
case hashString("jpmorgan_chase"):
|
|
316
|
+
case hashString("bank_of_america"):
|
|
317
|
+
case hashString("capital_one"):
|
|
318
|
+
case hashString("citibank"):
|
|
319
|
+
case hashString("vanguard"):
|
|
320
|
+
case hashString("wells_fargo"):
|
|
321
|
+
case hashString("charles_schwab"):
|
|
322
|
+
case hashString("kalshi"):
|
|
323
|
+
case hashString("experian"):
|
|
324
|
+
case hashString("waymo"):
|
|
325
|
+
case hashString("revel"):
|
|
326
|
+
case hashString("turo"):
|
|
327
|
+
case hashString("getaround"):
|
|
328
|
+
case hashString("zipcar"):
|
|
329
|
+
case hashString("airbnb"):
|
|
330
|
+
case hashString("american_airlines"):
|
|
331
|
+
case hashString("delta"):
|
|
332
|
+
case hashString("united"):
|
|
333
|
+
case hashString("jetblue"):
|
|
334
|
+
case hashString("southwest"):
|
|
335
|
+
case hashString("hawaiian"):
|
|
336
|
+
case hashString("hotels"):
|
|
337
|
+
case hashString("geico"):
|
|
338
|
+
case hashString("progressive"):
|
|
339
|
+
case hashString("aaa"):
|
|
340
|
+
case hashString("state_farm"):
|
|
341
|
+
case hashString("hertz"):
|
|
342
|
+
case hashString("avis"):
|
|
343
|
+
case hashString("tesla"):
|
|
344
|
+
case hashString("doordash"):
|
|
345
|
+
case hashString("uber_eats"):
|
|
346
|
+
case hashString("grubhub"):
|
|
347
|
+
case hashString("resy"):
|
|
348
|
+
case hashString("opentable"):
|
|
349
|
+
case hashString("starbucks"):
|
|
350
|
+
case hashString("blue_bottle"):
|
|
351
|
+
case hashString("costco"):
|
|
352
|
+
case hashString("amazon"):
|
|
353
|
+
case hashString("walmart"):
|
|
354
|
+
case hashString("whole_foods"):
|
|
355
|
+
case hashString("mcdonalds"):
|
|
356
|
+
case hashString("chipotle"):
|
|
357
|
+
case hashString("sweetgreen"):
|
|
358
|
+
case hashString("snapchat"):
|
|
359
|
+
case hashString("x"):
|
|
360
|
+
case hashString("facebook"):
|
|
361
|
+
case hashString("instagram"):
|
|
362
|
+
case hashString("signal"):
|
|
363
|
+
case hashString("whatsapp"):
|
|
364
|
+
case hashString("messenger"):
|
|
365
|
+
case hashString("linkedin"):
|
|
366
|
+
case hashString("discord"):
|
|
367
|
+
case hashString("messages"):
|
|
368
|
+
case hashString("telegram"):
|
|
369
|
+
case hashString("reddit"):
|
|
370
|
+
case hashString("pinterest"):
|
|
371
|
+
case hashString("new_york_times"):
|
|
372
|
+
case hashString("washington_post"):
|
|
373
|
+
case hashString("wall_street_journal"):
|
|
374
|
+
case hashString("cnn"):
|
|
375
|
+
case hashString("yahoo"):
|
|
376
|
+
case hashString("fox"):
|
|
377
|
+
case hashString("perplexity"):
|
|
378
|
+
case hashString("openai"):
|
|
379
|
+
case hashString("polymarket"):
|
|
380
|
+
case hashString("espn"):
|
|
381
|
+
case hashString("youtube"):
|
|
382
|
+
case hashString("netflix"):
|
|
91
383
|
return true;
|
|
92
384
|
default:
|
|
93
385
|
return false;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
1
|
import { NitroModules } from "react-native-nitro-modules";
|
|
2
2
|
import type {
|
|
3
|
+
AppUser,
|
|
3
4
|
LinkedAccount,
|
|
4
5
|
PresentationBackground,
|
|
5
|
-
PresentationStyle,
|
|
6
6
|
RNCandle,
|
|
7
7
|
Service,
|
|
8
8
|
} from "./specs/RNCandle.nitro";
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
export class CandleClient {
|
|
11
|
+
private candle: RNCandle;
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
cornerRadius?: number;
|
|
24
|
-
customerName?: string;
|
|
25
|
-
showSandbox?: boolean;
|
|
26
|
-
showDynamicLoading?: boolean;
|
|
27
|
-
presentationBackground?: PresentationBackground;
|
|
28
|
-
presentationStyle?: PresentationStyle;
|
|
29
|
-
onSuccess: (account: string) => void;
|
|
30
|
-
}): void {
|
|
31
|
-
CandleHybridObject.candleLinkSheet(
|
|
32
|
-
true,
|
|
33
|
-
services,
|
|
34
|
-
cornerRadius,
|
|
13
|
+
constructor(appUser: AppUser) {
|
|
14
|
+
const CandleHybridObject =
|
|
15
|
+
NitroModules.createHybridObject<RNCandle>("RNCandle");
|
|
16
|
+
this.candle = CandleHybridObject;
|
|
17
|
+
this.candle.initialize(appUser);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
public presentCandleLinkSheet({
|
|
21
|
+
services = undefined,
|
|
22
|
+
cornerRadius = 24,
|
|
35
23
|
customerName,
|
|
36
|
-
showDynamicLoading,
|
|
37
|
-
presentationBackground,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
24
|
+
showDynamicLoading = true,
|
|
25
|
+
presentationBackground = "default",
|
|
26
|
+
onSuccess,
|
|
27
|
+
}: {
|
|
28
|
+
services?: Service[];
|
|
29
|
+
cornerRadius?: number;
|
|
30
|
+
customerName?: string;
|
|
31
|
+
showSandbox?: boolean;
|
|
32
|
+
showDynamicLoading?: boolean;
|
|
33
|
+
presentationBackground?: PresentationBackground;
|
|
34
|
+
onSuccess: (account: LinkedAccount) => void;
|
|
35
|
+
}): void {
|
|
36
|
+
this.candle.candleLinkSheet(
|
|
37
|
+
true,
|
|
38
|
+
services,
|
|
39
|
+
cornerRadius,
|
|
40
|
+
customerName,
|
|
41
|
+
showDynamicLoading,
|
|
42
|
+
presentationBackground,
|
|
43
|
+
"fullScreen",
|
|
44
|
+
onSuccess
|
|
45
|
+
);
|
|
46
|
+
}
|
|
42
47
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
48
|
+
public async getLinkedAccounts(): Promise<LinkedAccount[]> {
|
|
49
|
+
return this.candle.getLinkedAccounts();
|
|
50
|
+
}
|
|
46
51
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
52
|
+
public async unlinkAccount(linkedAccountID: string): Promise<void> {
|
|
53
|
+
await this.candle.unlinkAccount(linkedAccountID);
|
|
54
|
+
}
|
|
50
55
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
56
|
+
public async deleteUser(): Promise<void> {
|
|
57
|
+
await this.candle.deleteUser();
|
|
58
|
+
}
|
|
54
59
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
60
|
+
public async getAvailableTools(): Promise<Array<Record<string, any>>> {
|
|
61
|
+
return this.candle.getAvailableTools();
|
|
62
|
+
}
|
|
58
63
|
|
|
59
|
-
|
|
60
|
-
|
|
64
|
+
public async executeTool(tool: {
|
|
65
|
+
name: string;
|
|
66
|
+
arguments: string;
|
|
67
|
+
}): Promise<string> {
|
|
68
|
+
return this.candle.executeTool(tool);
|
|
69
|
+
}
|
|
61
70
|
}
|
|
62
71
|
|
|
63
|
-
export
|
|
64
|
-
return await CandleHybridObject.getAvailableTools();
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export async function executeTool(tool: {
|
|
68
|
-
name: string;
|
|
69
|
-
arguments: string;
|
|
70
|
-
}): Promise<string> {
|
|
71
|
-
return await CandleHybridObject.executeTool(tool);
|
|
72
|
-
}
|
|
72
|
+
export type { LinkedAccount, AppUser };
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import type { HybridObject } from "react-native-nitro-modules";
|
|
1
|
+
import type { AnyMap, HybridObject } from "react-native-nitro-modules";
|
|
2
|
+
|
|
3
|
+
export type AppUser = {
|
|
4
|
+
appKey: string;
|
|
5
|
+
appSecret: string;
|
|
6
|
+
appUserID?: string;
|
|
7
|
+
};
|
|
2
8
|
|
|
3
9
|
export type Service =
|
|
4
10
|
| "robinhood"
|
|
@@ -7,7 +13,80 @@ export type Service =
|
|
|
7
13
|
| "apple"
|
|
8
14
|
| "sandbox"
|
|
9
15
|
| "uber"
|
|
10
|
-
| "lyft"
|
|
16
|
+
| "lyft"
|
|
17
|
+
| "chime"
|
|
18
|
+
| "paypal"
|
|
19
|
+
| "coinbase"
|
|
20
|
+
| "discover"
|
|
21
|
+
| "american_express"
|
|
22
|
+
| "jpmorgan_chase"
|
|
23
|
+
| "bank_of_america"
|
|
24
|
+
| "capital_one"
|
|
25
|
+
| "citibank"
|
|
26
|
+
| "vanguard"
|
|
27
|
+
| "wells_fargo"
|
|
28
|
+
| "charles_schwab"
|
|
29
|
+
| "kalshi"
|
|
30
|
+
| "experian"
|
|
31
|
+
| "waymo"
|
|
32
|
+
| "revel"
|
|
33
|
+
| "turo"
|
|
34
|
+
| "getaround"
|
|
35
|
+
| "zipcar"
|
|
36
|
+
| "airbnb"
|
|
37
|
+
| "american_airlines"
|
|
38
|
+
| "delta"
|
|
39
|
+
| "united"
|
|
40
|
+
| "jetblue"
|
|
41
|
+
| "southwest"
|
|
42
|
+
| "hawaiian"
|
|
43
|
+
| "hotels"
|
|
44
|
+
| "geico"
|
|
45
|
+
| "progressive"
|
|
46
|
+
| "aaa"
|
|
47
|
+
| "state_farm"
|
|
48
|
+
| "hertz"
|
|
49
|
+
| "avis"
|
|
50
|
+
| "tesla"
|
|
51
|
+
| "doordash"
|
|
52
|
+
| "uber_eats"
|
|
53
|
+
| "grubhub"
|
|
54
|
+
| "resy"
|
|
55
|
+
| "opentable"
|
|
56
|
+
| "starbucks"
|
|
57
|
+
| "blue_bottle"
|
|
58
|
+
| "costco"
|
|
59
|
+
| "amazon"
|
|
60
|
+
| "walmart"
|
|
61
|
+
| "whole_foods"
|
|
62
|
+
| "mcdonalds"
|
|
63
|
+
| "chipotle"
|
|
64
|
+
| "sweetgreen"
|
|
65
|
+
| "snapchat"
|
|
66
|
+
| "x"
|
|
67
|
+
| "facebook"
|
|
68
|
+
| "instagram"
|
|
69
|
+
| "signal"
|
|
70
|
+
| "whatsapp"
|
|
71
|
+
| "messenger"
|
|
72
|
+
| "linkedin"
|
|
73
|
+
| "discord"
|
|
74
|
+
| "messages"
|
|
75
|
+
| "telegram"
|
|
76
|
+
| "reddit"
|
|
77
|
+
| "pinterest"
|
|
78
|
+
| "new_york_times"
|
|
79
|
+
| "washington_post"
|
|
80
|
+
| "wall_street_journal"
|
|
81
|
+
| "cnn"
|
|
82
|
+
| "yahoo"
|
|
83
|
+
| "fox"
|
|
84
|
+
| "perplexity"
|
|
85
|
+
| "openai"
|
|
86
|
+
| "polymarket"
|
|
87
|
+
| "espn"
|
|
88
|
+
| "youtube"
|
|
89
|
+
| "netflix";
|
|
11
90
|
|
|
12
91
|
export type PresentationBackground = "default" | "blur";
|
|
13
92
|
export type PresentationStyle = "sheet" | "fullScreen";
|
|
@@ -21,12 +100,12 @@ export type Details = {
|
|
|
21
100
|
accountOpened: string | undefined;
|
|
22
101
|
};
|
|
23
102
|
|
|
24
|
-
export
|
|
103
|
+
export type LinkedAccount = {
|
|
25
104
|
serviceUserID: string;
|
|
26
105
|
details: Details | undefined;
|
|
27
106
|
linkedAccountID: string;
|
|
28
107
|
service: Service;
|
|
29
|
-
}
|
|
108
|
+
};
|
|
30
109
|
|
|
31
110
|
export type ToolCall = {
|
|
32
111
|
name: string;
|
|
@@ -42,14 +121,15 @@ export interface RNCandle extends HybridObject<{ ios: "swift" }> {
|
|
|
42
121
|
showDynamicLoading: boolean,
|
|
43
122
|
presentationBackground: PresentationBackground,
|
|
44
123
|
presentationStyle: PresentationStyle,
|
|
45
|
-
onSuccess: (account:
|
|
124
|
+
onSuccess: (account: LinkedAccount) => void
|
|
46
125
|
): void;
|
|
126
|
+
initialize(appUser: AppUser): void;
|
|
47
127
|
getLinkedAccounts(): Promise<LinkedAccount[]>;
|
|
48
128
|
unlinkAccount(linkedAccountID: string): Promise<void>;
|
|
49
129
|
getFiatAccounts(): Promise<string>;
|
|
50
130
|
getActivity(span: string | undefined): Promise<string>;
|
|
51
131
|
deleteUser(): Promise<void>;
|
|
52
132
|
// FIXME: The return type should be a more specific type based on the actual tool calls available.
|
|
53
|
-
getAvailableTools(): Promise<
|
|
133
|
+
getAvailableTools(): Promise<Array<AnyMap>>;
|
|
54
134
|
executeTool(tool: ToolCall): Promise<string>;
|
|
55
135
|
}
|