react-native-candle 0.1.42 → 0.1.44
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 -1
- package/ios/Sources/CandleActionViewModel.swift +4 -7
- package/ios/Sources/CandleLinkSheetWrapperView.swift +40 -59
- package/ios/Sources/CandleLinkViewModel.swift +21 -31
- package/ios/Sources/CandleTradeExecutionSheetWrapper.swift +14 -23
- package/ios/Sources/HostingViewController.swift +26 -26
- package/ios/Sources/RNCandle.swift +159 -1307
- package/ios/Sources/Types.swift +847 -0
- package/ios/Sources/UIApplication++.swift +5 -9
- package/lib/commonjs/context.js +17 -0
- package/lib/commonjs/context.js.map +1 -0
- package/lib/commonjs/index.js +17 -407
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/provider.js +117 -0
- package/lib/commonjs/provider.js.map +1 -0
- package/lib/commonjs/types.js +271 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/module/context.js +12 -0
- package/lib/module/context.js.map +1 -0
- package/lib/module/index.js +2 -408
- package/lib/module/index.js.map +1 -1
- package/lib/module/package.json +1 -0
- package/lib/module/provider.js +111 -0
- package/lib/module/provider.js.map +1 -0
- package/lib/module/types.js +256 -0
- package/lib/module/types.js.map +1 -0
- package/lib/typescript/commonjs/src/context.d.ts +47 -0
- package/lib/typescript/commonjs/src/context.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +4 -166
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/provider.d.ts +8 -0
- package/lib/typescript/commonjs/src/provider.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/specs/RNCandle.nitro.d.ts +22 -24
- package/lib/typescript/commonjs/src/specs/RNCandle.nitro.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types.d.ts +125 -0
- package/lib/typescript/commonjs/src/types.d.ts.map +1 -0
- package/lib/typescript/module/src/context.d.ts +47 -0
- package/lib/typescript/module/src/context.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +4 -166
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/provider.d.ts +8 -0
- package/lib/typescript/module/src/provider.d.ts.map +1 -0
- package/lib/typescript/module/src/specs/RNCandle.nitro.d.ts +22 -24
- package/lib/typescript/module/src/specs/RNCandle.nitro.d.ts.map +1 -1
- package/lib/typescript/module/src/types.d.ts +125 -0
- package/lib/typescript/module/src/types.d.ts.map +1 -0
- package/nitrogen/generated/.gitattributes +1 -1
- package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Bridge.cpp +15 -31
- package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Bridge.hpp +379 -242
- package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Umbrella.hpp +23 -22
- package/nitrogen/generated/ios/ReactNativeCandleAutolinking.mm +1 -1
- package/nitrogen/generated/ios/ReactNativeCandleAutolinking.swift +2 -4
- package/nitrogen/generated/ios/c++/HybridRNCandleSpecSwift.hpp +36 -42
- package/nitrogen/generated/ios/swift/ActiveLinkedAccountDetails.swift +6 -3
- package/nitrogen/generated/ios/swift/AssetAccount.swift +6 -3
- package/nitrogen/generated/ios/swift/AssetAccountKind.swift +4 -4
- package/nitrogen/generated/ios/swift/AssetAccountRef.swift +5 -5
- package/nitrogen/generated/ios/swift/{AssetAccountQuery.swift → AssetAccountsQuery.swift} +7 -6
- package/nitrogen/generated/ios/swift/Counterparty.swift +8 -3
- package/nitrogen/generated/ios/swift/CounterpartyKind.swift +42 -0
- package/nitrogen/generated/ios/swift/FiatAccount.swift +4 -2
- package/nitrogen/generated/ios/swift/FiatAsset.swift +2 -1
- package/nitrogen/generated/ios/swift/FiatAssetQuoteRequest.swift +4 -2
- package/nitrogen/generated/ios/swift/FiatAssetRef.swift +2 -1
- package/nitrogen/generated/ios/swift/Func_void_LinkedAccount.swift +5 -5
- package/nitrogen/generated/ios/swift/HybridRNCandleSpec.swift +7 -7
- package/nitrogen/generated/ios/swift/HybridRNCandleSpec_cxx.swift +40 -65
- package/nitrogen/generated/ios/swift/LinkedAccountDetails.swift +15 -3
- package/nitrogen/generated/ios/swift/{StatePayload.swift → LinkedAccountState.swift} +6 -6
- package/nitrogen/generated/ios/swift/LinkedAccountStatusRef.swift +4 -3
- package/nitrogen/generated/ios/swift/MarketAccount.swift +5 -5
- package/nitrogen/generated/ios/swift/MarketAssetKind.swift +38 -0
- package/nitrogen/generated/ios/swift/MarketAssetQuoteRequest.swift +11 -8
- package/nitrogen/generated/ios/swift/MarketTradeAsset.swift +7 -7
- package/nitrogen/generated/ios/swift/MarketTradeAssetRef.swift +5 -5
- package/nitrogen/generated/ios/swift/MerchantCounterparty.swift +2 -1
- package/nitrogen/generated/ios/swift/TradeAsset.swift +10 -5
- package/nitrogen/generated/ios/swift/TradeAssetKind.swift +54 -0
- package/nitrogen/generated/ios/swift/TradeAssetQuoteRequest.swift +15 -4
- package/nitrogen/generated/ios/swift/TradeAssetRef.swift +11 -5
- package/nitrogen/generated/ios/swift/TradeExecutionResult.swift +4 -2
- package/nitrogen/generated/ios/swift/{TradeQuoteRequest.swift → TradeQuotesRequest.swift} +7 -6
- package/nitrogen/generated/ios/swift/{TradeQuery.swift → TradesQuery.swift} +29 -45
- package/nitrogen/generated/ios/swift/TransportAssetQuoteRequest.swift +12 -6
- package/nitrogen/generated/shared/c++/ACHAccountKind.hpp +7 -9
- package/nitrogen/generated/shared/c++/ACHDetails.hpp +7 -9
- package/nitrogen/generated/shared/c++/ActiveLinkedAccountDetails.hpp +4 -6
- package/nitrogen/generated/shared/c++/Address.hpp +4 -6
- package/nitrogen/generated/shared/c++/AssetAccount.hpp +14 -16
- package/nitrogen/generated/shared/c++/AssetAccountKind.hpp +15 -17
- package/nitrogen/generated/shared/c++/AssetAccountRef.hpp +12 -12
- package/nitrogen/generated/shared/c++/{AssetAccountQuery.hpp → AssetAccountsQuery.hpp} +14 -16
- package/nitrogen/generated/shared/c++/AssetAccountsResponse.hpp +11 -13
- package/nitrogen/generated/shared/c++/Coordinates.hpp +4 -6
- package/nitrogen/generated/shared/c++/Counterparty.hpp +14 -16
- package/nitrogen/generated/shared/c++/CounterpartyKind.hpp +80 -0
- package/nitrogen/generated/shared/c++/FiatAccount.hpp +16 -18
- package/nitrogen/generated/shared/c++/FiatAsset.hpp +7 -9
- package/nitrogen/generated/shared/c++/FiatAssetQuoteRequest.hpp +4 -6
- package/nitrogen/generated/shared/c++/FiatAssetRef.hpp +4 -6
- package/nitrogen/generated/shared/c++/FiatMarketAccountKind.hpp +13 -15
- package/nitrogen/generated/shared/c++/HybridRNCandleSpec.cpp +1 -2
- package/nitrogen/generated/shared/c++/HybridRNCandleSpec.hpp +17 -27
- package/nitrogen/generated/shared/c++/InactiveLinkedAccountDetails.hpp +4 -6
- package/nitrogen/generated/shared/c++/LinkedAccount.hpp +10 -12
- package/nitrogen/generated/shared/c++/LinkedAccountDetails.hpp +14 -16
- package/nitrogen/generated/shared/c++/LinkedAccountRef.hpp +4 -6
- package/nitrogen/generated/shared/c++/{StatePayload.hpp → LinkedAccountState.hpp} +15 -17
- package/nitrogen/generated/shared/c++/LinkedAccountStatusRef.hpp +15 -17
- package/nitrogen/generated/shared/c++/MarketAccount.hpp +18 -17
- package/nitrogen/generated/shared/c++/MarketAssetKind.hpp +76 -0
- package/nitrogen/generated/shared/c++/MarketAssetQuoteRequest.hpp +12 -12
- package/nitrogen/generated/shared/c++/MarketTradeAsset.hpp +15 -14
- package/nitrogen/generated/shared/c++/MarketTradeAssetRef.hpp +12 -12
- package/nitrogen/generated/shared/c++/MerchantCounterparty.hpp +8 -10
- package/nitrogen/generated/shared/c++/MerchantLocation.hpp +4 -6
- package/nitrogen/generated/shared/c++/NothingAsset.hpp +4 -6
- package/nitrogen/generated/shared/c++/NothingAssetQuoteRequest.hpp +4 -6
- package/nitrogen/generated/shared/c++/NothingAssetRef.hpp +4 -6
- package/nitrogen/generated/shared/c++/OtherAsset.hpp +4 -6
- package/nitrogen/generated/shared/c++/OtherAssetRef.hpp +4 -6
- package/nitrogen/generated/shared/c++/PresentationBackground.hpp +7 -9
- package/nitrogen/generated/shared/c++/PresentationStyle.hpp +7 -9
- package/nitrogen/generated/shared/c++/Service.hpp +163 -165
- package/nitrogen/generated/shared/c++/ServiceCounterparty.hpp +7 -9
- package/nitrogen/generated/shared/c++/Trade.hpp +16 -18
- package/nitrogen/generated/shared/c++/TradeAsset.hpp +20 -22
- package/nitrogen/generated/shared/c++/TradeAssetKind.hpp +92 -0
- package/nitrogen/generated/shared/c++/TradeAssetQuoteRequest.hpp +17 -19
- package/nitrogen/generated/shared/c++/TradeAssetRef.hpp +20 -22
- package/nitrogen/generated/shared/c++/TradeExecutionResult.hpp +8 -10
- package/nitrogen/generated/shared/c++/TradeQuote.hpp +10 -12
- package/nitrogen/generated/shared/c++/{TradeQuoteRequest.hpp → TradeQuotesRequest.hpp} +17 -19
- package/nitrogen/generated/shared/c++/TradeQuotesResponse.hpp +11 -13
- package/nitrogen/generated/shared/c++/TradeRef.hpp +10 -12
- package/nitrogen/generated/shared/c++/TradeState.hpp +9 -11
- package/nitrogen/generated/shared/c++/TradesQuery.hpp +89 -0
- package/nitrogen/generated/shared/c++/TradesResponse.hpp +11 -13
- package/nitrogen/generated/shared/c++/TransportAccount.hpp +10 -12
- package/nitrogen/generated/shared/c++/TransportAccountKind.hpp +9 -11
- package/nitrogen/generated/shared/c++/TransportAsset.hpp +19 -21
- package/nitrogen/generated/shared/c++/TransportAssetQuoteRequest.hpp +16 -18
- package/nitrogen/generated/shared/c++/TransportAssetRef.hpp +4 -6
- package/nitrogen/generated/shared/c++/UnavailableLinkedAccountDetails.hpp +4 -6
- package/nitrogen/generated/shared/c++/UserCounterparty.hpp +4 -6
- package/nitrogen/generated/shared/c++/WireDetails.hpp +4 -6
- package/package.json +9 -11
- package/src/context.ts +86 -0
- package/src/index.ts +4 -634
- package/src/provider.tsx +152 -0
- package/src/specs/RNCandle.nitro.ts +38 -29
- package/src/types.ts +462 -0
- package/nitrogen/generated/ios/swift/AppUser.swift +0 -75
- package/nitrogen/generated/ios/swift/Func_void_std__string.swift +0 -44
- package/nitrogen/generated/ios/swift/Func_void_std__vector_std__shared_ptr_AnyMap__.swift +0 -47
- package/nitrogen/generated/ios/swift/ToolCall.swift +0 -44
- package/nitrogen/generated/shared/c++/AppUser.hpp +0 -78
- package/nitrogen/generated/shared/c++/ToolCall.hpp +0 -73
- package/nitrogen/generated/shared/c++/TradeQuery.hpp +0 -86
|
@@ -115,180 +115,178 @@ namespace margelo::nitro::rncandle {
|
|
|
115
115
|
|
|
116
116
|
namespace margelo::nitro {
|
|
117
117
|
|
|
118
|
-
using namespace margelo::nitro::rncandle;
|
|
119
|
-
|
|
120
118
|
// C++ Service <> JS Service (union)
|
|
121
119
|
template <>
|
|
122
|
-
struct JSIConverter<Service> final {
|
|
123
|
-
static inline Service fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
120
|
+
struct JSIConverter<margelo::nitro::rncandle::Service> final {
|
|
121
|
+
static inline margelo::nitro::rncandle::Service fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
124
122
|
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
125
123
|
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
126
|
-
case hashString("robinhood"): return Service::ROBINHOOD;
|
|
127
|
-
case hashString("cash_app"): return Service::CASH_APP;
|
|
128
|
-
case hashString("venmo"): return Service::VENMO;
|
|
129
|
-
case hashString("apple"): return Service::APPLE;
|
|
130
|
-
case hashString("sandbox"): return Service::SANDBOX;
|
|
131
|
-
case hashString("uber"): return Service::UBER;
|
|
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;
|
|
124
|
+
case hashString("robinhood"): return margelo::nitro::rncandle::Service::ROBINHOOD;
|
|
125
|
+
case hashString("cash_app"): return margelo::nitro::rncandle::Service::CASH_APP;
|
|
126
|
+
case hashString("venmo"): return margelo::nitro::rncandle::Service::VENMO;
|
|
127
|
+
case hashString("apple"): return margelo::nitro::rncandle::Service::APPLE;
|
|
128
|
+
case hashString("sandbox"): return margelo::nitro::rncandle::Service::SANDBOX;
|
|
129
|
+
case hashString("uber"): return margelo::nitro::rncandle::Service::UBER;
|
|
130
|
+
case hashString("lyft"): return margelo::nitro::rncandle::Service::LYFT;
|
|
131
|
+
case hashString("chime"): return margelo::nitro::rncandle::Service::CHIME;
|
|
132
|
+
case hashString("paypal"): return margelo::nitro::rncandle::Service::PAYPAL;
|
|
133
|
+
case hashString("coinbase"): return margelo::nitro::rncandle::Service::COINBASE;
|
|
134
|
+
case hashString("discover"): return margelo::nitro::rncandle::Service::DISCOVER;
|
|
135
|
+
case hashString("american_express"): return margelo::nitro::rncandle::Service::AMERICAN_EXPRESS;
|
|
136
|
+
case hashString("jpmorgan_chase"): return margelo::nitro::rncandle::Service::JPMORGAN_CHASE;
|
|
137
|
+
case hashString("bank_of_america"): return margelo::nitro::rncandle::Service::BANK_OF_AMERICA;
|
|
138
|
+
case hashString("capital_one"): return margelo::nitro::rncandle::Service::CAPITAL_ONE;
|
|
139
|
+
case hashString("citibank"): return margelo::nitro::rncandle::Service::CITIBANK;
|
|
140
|
+
case hashString("vanguard"): return margelo::nitro::rncandle::Service::VANGUARD;
|
|
141
|
+
case hashString("wells_fargo"): return margelo::nitro::rncandle::Service::WELLS_FARGO;
|
|
142
|
+
case hashString("charles_schwab"): return margelo::nitro::rncandle::Service::CHARLES_SCHWAB;
|
|
143
|
+
case hashString("kalshi"): return margelo::nitro::rncandle::Service::KALSHI;
|
|
144
|
+
case hashString("experian"): return margelo::nitro::rncandle::Service::EXPERIAN;
|
|
145
|
+
case hashString("waymo"): return margelo::nitro::rncandle::Service::WAYMO;
|
|
146
|
+
case hashString("revel"): return margelo::nitro::rncandle::Service::REVEL;
|
|
147
|
+
case hashString("turo"): return margelo::nitro::rncandle::Service::TURO;
|
|
148
|
+
case hashString("getaround"): return margelo::nitro::rncandle::Service::GETAROUND;
|
|
149
|
+
case hashString("zipcar"): return margelo::nitro::rncandle::Service::ZIPCAR;
|
|
150
|
+
case hashString("airbnb"): return margelo::nitro::rncandle::Service::AIRBNB;
|
|
151
|
+
case hashString("american_airlines"): return margelo::nitro::rncandle::Service::AMERICAN_AIRLINES;
|
|
152
|
+
case hashString("delta"): return margelo::nitro::rncandle::Service::DELTA;
|
|
153
|
+
case hashString("united"): return margelo::nitro::rncandle::Service::UNITED;
|
|
154
|
+
case hashString("jetblue"): return margelo::nitro::rncandle::Service::JETBLUE;
|
|
155
|
+
case hashString("southwest"): return margelo::nitro::rncandle::Service::SOUTHWEST;
|
|
156
|
+
case hashString("hawaiian"): return margelo::nitro::rncandle::Service::HAWAIIAN;
|
|
157
|
+
case hashString("hotels"): return margelo::nitro::rncandle::Service::HOTELS;
|
|
158
|
+
case hashString("geico"): return margelo::nitro::rncandle::Service::GEICO;
|
|
159
|
+
case hashString("progressive"): return margelo::nitro::rncandle::Service::PROGRESSIVE;
|
|
160
|
+
case hashString("aaa"): return margelo::nitro::rncandle::Service::AAA;
|
|
161
|
+
case hashString("state_farm"): return margelo::nitro::rncandle::Service::STATE_FARM;
|
|
162
|
+
case hashString("hertz"): return margelo::nitro::rncandle::Service::HERTZ;
|
|
163
|
+
case hashString("avis"): return margelo::nitro::rncandle::Service::AVIS;
|
|
164
|
+
case hashString("tesla"): return margelo::nitro::rncandle::Service::TESLA;
|
|
165
|
+
case hashString("doordash"): return margelo::nitro::rncandle::Service::DOORDASH;
|
|
166
|
+
case hashString("uber_eats"): return margelo::nitro::rncandle::Service::UBER_EATS;
|
|
167
|
+
case hashString("grubhub"): return margelo::nitro::rncandle::Service::GRUBHUB;
|
|
168
|
+
case hashString("resy"): return margelo::nitro::rncandle::Service::RESY;
|
|
169
|
+
case hashString("opentable"): return margelo::nitro::rncandle::Service::OPENTABLE;
|
|
170
|
+
case hashString("starbucks"): return margelo::nitro::rncandle::Service::STARBUCKS;
|
|
171
|
+
case hashString("blue_bottle"): return margelo::nitro::rncandle::Service::BLUE_BOTTLE;
|
|
172
|
+
case hashString("costco"): return margelo::nitro::rncandle::Service::COSTCO;
|
|
173
|
+
case hashString("amazon"): return margelo::nitro::rncandle::Service::AMAZON;
|
|
174
|
+
case hashString("walmart"): return margelo::nitro::rncandle::Service::WALMART;
|
|
175
|
+
case hashString("whole_foods"): return margelo::nitro::rncandle::Service::WHOLE_FOODS;
|
|
176
|
+
case hashString("mcdonalds"): return margelo::nitro::rncandle::Service::MCDONALDS;
|
|
177
|
+
case hashString("chipotle"): return margelo::nitro::rncandle::Service::CHIPOTLE;
|
|
178
|
+
case hashString("sweetgreen"): return margelo::nitro::rncandle::Service::SWEETGREEN;
|
|
179
|
+
case hashString("snapchat"): return margelo::nitro::rncandle::Service::SNAPCHAT;
|
|
180
|
+
case hashString("x"): return margelo::nitro::rncandle::Service::X;
|
|
181
|
+
case hashString("facebook"): return margelo::nitro::rncandle::Service::FACEBOOK;
|
|
182
|
+
case hashString("instagram"): return margelo::nitro::rncandle::Service::INSTAGRAM;
|
|
183
|
+
case hashString("signal"): return margelo::nitro::rncandle::Service::SIGNAL;
|
|
184
|
+
case hashString("whatsapp"): return margelo::nitro::rncandle::Service::WHATSAPP;
|
|
185
|
+
case hashString("messenger"): return margelo::nitro::rncandle::Service::MESSENGER;
|
|
186
|
+
case hashString("linkedin"): return margelo::nitro::rncandle::Service::LINKEDIN;
|
|
187
|
+
case hashString("discord"): return margelo::nitro::rncandle::Service::DISCORD;
|
|
188
|
+
case hashString("messages"): return margelo::nitro::rncandle::Service::MESSAGES;
|
|
189
|
+
case hashString("telegram"): return margelo::nitro::rncandle::Service::TELEGRAM;
|
|
190
|
+
case hashString("reddit"): return margelo::nitro::rncandle::Service::REDDIT;
|
|
191
|
+
case hashString("pinterest"): return margelo::nitro::rncandle::Service::PINTEREST;
|
|
192
|
+
case hashString("new_york_times"): return margelo::nitro::rncandle::Service::NEW_YORK_TIMES;
|
|
193
|
+
case hashString("washington_post"): return margelo::nitro::rncandle::Service::WASHINGTON_POST;
|
|
194
|
+
case hashString("wall_street_journal"): return margelo::nitro::rncandle::Service::WALL_STREET_JOURNAL;
|
|
195
|
+
case hashString("cnn"): return margelo::nitro::rncandle::Service::CNN;
|
|
196
|
+
case hashString("yahoo"): return margelo::nitro::rncandle::Service::YAHOO;
|
|
197
|
+
case hashString("fox"): return margelo::nitro::rncandle::Service::FOX;
|
|
198
|
+
case hashString("perplexity"): return margelo::nitro::rncandle::Service::PERPLEXITY;
|
|
199
|
+
case hashString("openai"): return margelo::nitro::rncandle::Service::OPENAI;
|
|
200
|
+
case hashString("polymarket"): return margelo::nitro::rncandle::Service::POLYMARKET;
|
|
201
|
+
case hashString("espn"): return margelo::nitro::rncandle::Service::ESPN;
|
|
202
|
+
case hashString("youtube"): return margelo::nitro::rncandle::Service::YOUTUBE;
|
|
203
|
+
case hashString("netflix"): return margelo::nitro::rncandle::Service::NETFLIX;
|
|
206
204
|
default: [[unlikely]]
|
|
207
205
|
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum Service - invalid value!");
|
|
208
206
|
}
|
|
209
207
|
}
|
|
210
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, Service arg) {
|
|
208
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::rncandle::Service arg) {
|
|
211
209
|
switch (arg) {
|
|
212
|
-
case Service::ROBINHOOD: return JSIConverter<std::string>::toJSI(runtime, "robinhood");
|
|
213
|
-
case Service::CASH_APP: return JSIConverter<std::string>::toJSI(runtime, "cash_app");
|
|
214
|
-
case Service::VENMO: return JSIConverter<std::string>::toJSI(runtime, "venmo");
|
|
215
|
-
case Service::APPLE: return JSIConverter<std::string>::toJSI(runtime, "apple");
|
|
216
|
-
case Service::SANDBOX: return JSIConverter<std::string>::toJSI(runtime, "sandbox");
|
|
217
|
-
case Service::UBER: return JSIConverter<std::string>::toJSI(runtime, "uber");
|
|
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");
|
|
210
|
+
case margelo::nitro::rncandle::Service::ROBINHOOD: return JSIConverter<std::string>::toJSI(runtime, "robinhood");
|
|
211
|
+
case margelo::nitro::rncandle::Service::CASH_APP: return JSIConverter<std::string>::toJSI(runtime, "cash_app");
|
|
212
|
+
case margelo::nitro::rncandle::Service::VENMO: return JSIConverter<std::string>::toJSI(runtime, "venmo");
|
|
213
|
+
case margelo::nitro::rncandle::Service::APPLE: return JSIConverter<std::string>::toJSI(runtime, "apple");
|
|
214
|
+
case margelo::nitro::rncandle::Service::SANDBOX: return JSIConverter<std::string>::toJSI(runtime, "sandbox");
|
|
215
|
+
case margelo::nitro::rncandle::Service::UBER: return JSIConverter<std::string>::toJSI(runtime, "uber");
|
|
216
|
+
case margelo::nitro::rncandle::Service::LYFT: return JSIConverter<std::string>::toJSI(runtime, "lyft");
|
|
217
|
+
case margelo::nitro::rncandle::Service::CHIME: return JSIConverter<std::string>::toJSI(runtime, "chime");
|
|
218
|
+
case margelo::nitro::rncandle::Service::PAYPAL: return JSIConverter<std::string>::toJSI(runtime, "paypal");
|
|
219
|
+
case margelo::nitro::rncandle::Service::COINBASE: return JSIConverter<std::string>::toJSI(runtime, "coinbase");
|
|
220
|
+
case margelo::nitro::rncandle::Service::DISCOVER: return JSIConverter<std::string>::toJSI(runtime, "discover");
|
|
221
|
+
case margelo::nitro::rncandle::Service::AMERICAN_EXPRESS: return JSIConverter<std::string>::toJSI(runtime, "american_express");
|
|
222
|
+
case margelo::nitro::rncandle::Service::JPMORGAN_CHASE: return JSIConverter<std::string>::toJSI(runtime, "jpmorgan_chase");
|
|
223
|
+
case margelo::nitro::rncandle::Service::BANK_OF_AMERICA: return JSIConverter<std::string>::toJSI(runtime, "bank_of_america");
|
|
224
|
+
case margelo::nitro::rncandle::Service::CAPITAL_ONE: return JSIConverter<std::string>::toJSI(runtime, "capital_one");
|
|
225
|
+
case margelo::nitro::rncandle::Service::CITIBANK: return JSIConverter<std::string>::toJSI(runtime, "citibank");
|
|
226
|
+
case margelo::nitro::rncandle::Service::VANGUARD: return JSIConverter<std::string>::toJSI(runtime, "vanguard");
|
|
227
|
+
case margelo::nitro::rncandle::Service::WELLS_FARGO: return JSIConverter<std::string>::toJSI(runtime, "wells_fargo");
|
|
228
|
+
case margelo::nitro::rncandle::Service::CHARLES_SCHWAB: return JSIConverter<std::string>::toJSI(runtime, "charles_schwab");
|
|
229
|
+
case margelo::nitro::rncandle::Service::KALSHI: return JSIConverter<std::string>::toJSI(runtime, "kalshi");
|
|
230
|
+
case margelo::nitro::rncandle::Service::EXPERIAN: return JSIConverter<std::string>::toJSI(runtime, "experian");
|
|
231
|
+
case margelo::nitro::rncandle::Service::WAYMO: return JSIConverter<std::string>::toJSI(runtime, "waymo");
|
|
232
|
+
case margelo::nitro::rncandle::Service::REVEL: return JSIConverter<std::string>::toJSI(runtime, "revel");
|
|
233
|
+
case margelo::nitro::rncandle::Service::TURO: return JSIConverter<std::string>::toJSI(runtime, "turo");
|
|
234
|
+
case margelo::nitro::rncandle::Service::GETAROUND: return JSIConverter<std::string>::toJSI(runtime, "getaround");
|
|
235
|
+
case margelo::nitro::rncandle::Service::ZIPCAR: return JSIConverter<std::string>::toJSI(runtime, "zipcar");
|
|
236
|
+
case margelo::nitro::rncandle::Service::AIRBNB: return JSIConverter<std::string>::toJSI(runtime, "airbnb");
|
|
237
|
+
case margelo::nitro::rncandle::Service::AMERICAN_AIRLINES: return JSIConverter<std::string>::toJSI(runtime, "american_airlines");
|
|
238
|
+
case margelo::nitro::rncandle::Service::DELTA: return JSIConverter<std::string>::toJSI(runtime, "delta");
|
|
239
|
+
case margelo::nitro::rncandle::Service::UNITED: return JSIConverter<std::string>::toJSI(runtime, "united");
|
|
240
|
+
case margelo::nitro::rncandle::Service::JETBLUE: return JSIConverter<std::string>::toJSI(runtime, "jetblue");
|
|
241
|
+
case margelo::nitro::rncandle::Service::SOUTHWEST: return JSIConverter<std::string>::toJSI(runtime, "southwest");
|
|
242
|
+
case margelo::nitro::rncandle::Service::HAWAIIAN: return JSIConverter<std::string>::toJSI(runtime, "hawaiian");
|
|
243
|
+
case margelo::nitro::rncandle::Service::HOTELS: return JSIConverter<std::string>::toJSI(runtime, "hotels");
|
|
244
|
+
case margelo::nitro::rncandle::Service::GEICO: return JSIConverter<std::string>::toJSI(runtime, "geico");
|
|
245
|
+
case margelo::nitro::rncandle::Service::PROGRESSIVE: return JSIConverter<std::string>::toJSI(runtime, "progressive");
|
|
246
|
+
case margelo::nitro::rncandle::Service::AAA: return JSIConverter<std::string>::toJSI(runtime, "aaa");
|
|
247
|
+
case margelo::nitro::rncandle::Service::STATE_FARM: return JSIConverter<std::string>::toJSI(runtime, "state_farm");
|
|
248
|
+
case margelo::nitro::rncandle::Service::HERTZ: return JSIConverter<std::string>::toJSI(runtime, "hertz");
|
|
249
|
+
case margelo::nitro::rncandle::Service::AVIS: return JSIConverter<std::string>::toJSI(runtime, "avis");
|
|
250
|
+
case margelo::nitro::rncandle::Service::TESLA: return JSIConverter<std::string>::toJSI(runtime, "tesla");
|
|
251
|
+
case margelo::nitro::rncandle::Service::DOORDASH: return JSIConverter<std::string>::toJSI(runtime, "doordash");
|
|
252
|
+
case margelo::nitro::rncandle::Service::UBER_EATS: return JSIConverter<std::string>::toJSI(runtime, "uber_eats");
|
|
253
|
+
case margelo::nitro::rncandle::Service::GRUBHUB: return JSIConverter<std::string>::toJSI(runtime, "grubhub");
|
|
254
|
+
case margelo::nitro::rncandle::Service::RESY: return JSIConverter<std::string>::toJSI(runtime, "resy");
|
|
255
|
+
case margelo::nitro::rncandle::Service::OPENTABLE: return JSIConverter<std::string>::toJSI(runtime, "opentable");
|
|
256
|
+
case margelo::nitro::rncandle::Service::STARBUCKS: return JSIConverter<std::string>::toJSI(runtime, "starbucks");
|
|
257
|
+
case margelo::nitro::rncandle::Service::BLUE_BOTTLE: return JSIConverter<std::string>::toJSI(runtime, "blue_bottle");
|
|
258
|
+
case margelo::nitro::rncandle::Service::COSTCO: return JSIConverter<std::string>::toJSI(runtime, "costco");
|
|
259
|
+
case margelo::nitro::rncandle::Service::AMAZON: return JSIConverter<std::string>::toJSI(runtime, "amazon");
|
|
260
|
+
case margelo::nitro::rncandle::Service::WALMART: return JSIConverter<std::string>::toJSI(runtime, "walmart");
|
|
261
|
+
case margelo::nitro::rncandle::Service::WHOLE_FOODS: return JSIConverter<std::string>::toJSI(runtime, "whole_foods");
|
|
262
|
+
case margelo::nitro::rncandle::Service::MCDONALDS: return JSIConverter<std::string>::toJSI(runtime, "mcdonalds");
|
|
263
|
+
case margelo::nitro::rncandle::Service::CHIPOTLE: return JSIConverter<std::string>::toJSI(runtime, "chipotle");
|
|
264
|
+
case margelo::nitro::rncandle::Service::SWEETGREEN: return JSIConverter<std::string>::toJSI(runtime, "sweetgreen");
|
|
265
|
+
case margelo::nitro::rncandle::Service::SNAPCHAT: return JSIConverter<std::string>::toJSI(runtime, "snapchat");
|
|
266
|
+
case margelo::nitro::rncandle::Service::X: return JSIConverter<std::string>::toJSI(runtime, "x");
|
|
267
|
+
case margelo::nitro::rncandle::Service::FACEBOOK: return JSIConverter<std::string>::toJSI(runtime, "facebook");
|
|
268
|
+
case margelo::nitro::rncandle::Service::INSTAGRAM: return JSIConverter<std::string>::toJSI(runtime, "instagram");
|
|
269
|
+
case margelo::nitro::rncandle::Service::SIGNAL: return JSIConverter<std::string>::toJSI(runtime, "signal");
|
|
270
|
+
case margelo::nitro::rncandle::Service::WHATSAPP: return JSIConverter<std::string>::toJSI(runtime, "whatsapp");
|
|
271
|
+
case margelo::nitro::rncandle::Service::MESSENGER: return JSIConverter<std::string>::toJSI(runtime, "messenger");
|
|
272
|
+
case margelo::nitro::rncandle::Service::LINKEDIN: return JSIConverter<std::string>::toJSI(runtime, "linkedin");
|
|
273
|
+
case margelo::nitro::rncandle::Service::DISCORD: return JSIConverter<std::string>::toJSI(runtime, "discord");
|
|
274
|
+
case margelo::nitro::rncandle::Service::MESSAGES: return JSIConverter<std::string>::toJSI(runtime, "messages");
|
|
275
|
+
case margelo::nitro::rncandle::Service::TELEGRAM: return JSIConverter<std::string>::toJSI(runtime, "telegram");
|
|
276
|
+
case margelo::nitro::rncandle::Service::REDDIT: return JSIConverter<std::string>::toJSI(runtime, "reddit");
|
|
277
|
+
case margelo::nitro::rncandle::Service::PINTEREST: return JSIConverter<std::string>::toJSI(runtime, "pinterest");
|
|
278
|
+
case margelo::nitro::rncandle::Service::NEW_YORK_TIMES: return JSIConverter<std::string>::toJSI(runtime, "new_york_times");
|
|
279
|
+
case margelo::nitro::rncandle::Service::WASHINGTON_POST: return JSIConverter<std::string>::toJSI(runtime, "washington_post");
|
|
280
|
+
case margelo::nitro::rncandle::Service::WALL_STREET_JOURNAL: return JSIConverter<std::string>::toJSI(runtime, "wall_street_journal");
|
|
281
|
+
case margelo::nitro::rncandle::Service::CNN: return JSIConverter<std::string>::toJSI(runtime, "cnn");
|
|
282
|
+
case margelo::nitro::rncandle::Service::YAHOO: return JSIConverter<std::string>::toJSI(runtime, "yahoo");
|
|
283
|
+
case margelo::nitro::rncandle::Service::FOX: return JSIConverter<std::string>::toJSI(runtime, "fox");
|
|
284
|
+
case margelo::nitro::rncandle::Service::PERPLEXITY: return JSIConverter<std::string>::toJSI(runtime, "perplexity");
|
|
285
|
+
case margelo::nitro::rncandle::Service::OPENAI: return JSIConverter<std::string>::toJSI(runtime, "openai");
|
|
286
|
+
case margelo::nitro::rncandle::Service::POLYMARKET: return JSIConverter<std::string>::toJSI(runtime, "polymarket");
|
|
287
|
+
case margelo::nitro::rncandle::Service::ESPN: return JSIConverter<std::string>::toJSI(runtime, "espn");
|
|
288
|
+
case margelo::nitro::rncandle::Service::YOUTUBE: return JSIConverter<std::string>::toJSI(runtime, "youtube");
|
|
289
|
+
case margelo::nitro::rncandle::Service::NETFLIX: return JSIConverter<std::string>::toJSI(runtime, "netflix");
|
|
292
290
|
default: [[unlikely]]
|
|
293
291
|
throw std::invalid_argument("Cannot convert Service to JS - invalid value: "
|
|
294
292
|
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
@@ -43,22 +43,20 @@ namespace margelo::nitro::rncandle {
|
|
|
43
43
|
|
|
44
44
|
namespace margelo::nitro {
|
|
45
45
|
|
|
46
|
-
using namespace margelo::nitro::rncandle;
|
|
47
|
-
|
|
48
46
|
// C++ ServiceCounterparty <> JS ServiceCounterparty (object)
|
|
49
47
|
template <>
|
|
50
|
-
struct JSIConverter<ServiceCounterparty> final {
|
|
51
|
-
static inline ServiceCounterparty fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
48
|
+
struct JSIConverter<margelo::nitro::rncandle::ServiceCounterparty> final {
|
|
49
|
+
static inline margelo::nitro::rncandle::ServiceCounterparty fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
52
50
|
jsi::Object obj = arg.asObject(runtime);
|
|
53
|
-
return ServiceCounterparty(
|
|
51
|
+
return margelo::nitro::rncandle::ServiceCounterparty(
|
|
54
52
|
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "kind")),
|
|
55
|
-
JSIConverter<Service>::fromJSI(runtime, obj.getProperty(runtime, "service"))
|
|
53
|
+
JSIConverter<margelo::nitro::rncandle::Service>::fromJSI(runtime, obj.getProperty(runtime, "service"))
|
|
56
54
|
);
|
|
57
55
|
}
|
|
58
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const ServiceCounterparty& arg) {
|
|
56
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rncandle::ServiceCounterparty& arg) {
|
|
59
57
|
jsi::Object obj(runtime);
|
|
60
58
|
obj.setProperty(runtime, "kind", JSIConverter<std::string>::toJSI(runtime, arg.kind));
|
|
61
|
-
obj.setProperty(runtime, "service", JSIConverter<Service>::toJSI(runtime, arg.service));
|
|
59
|
+
obj.setProperty(runtime, "service", JSIConverter<margelo::nitro::rncandle::Service>::toJSI(runtime, arg.service));
|
|
62
60
|
return obj;
|
|
63
61
|
}
|
|
64
62
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -67,7 +65,7 @@ namespace margelo::nitro {
|
|
|
67
65
|
}
|
|
68
66
|
jsi::Object obj = value.getObject(runtime);
|
|
69
67
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "kind"))) return false;
|
|
70
|
-
if (!JSIConverter<Service>::canConvert(runtime, obj.getProperty(runtime, "service"))) return false;
|
|
68
|
+
if (!JSIConverter<margelo::nitro::rncandle::Service>::canConvert(runtime, obj.getProperty(runtime, "service"))) return false;
|
|
71
69
|
return true;
|
|
72
70
|
}
|
|
73
71
|
};
|
|
@@ -52,28 +52,26 @@ namespace margelo::nitro::rncandle {
|
|
|
52
52
|
|
|
53
53
|
namespace margelo::nitro {
|
|
54
54
|
|
|
55
|
-
using namespace margelo::nitro::rncandle;
|
|
56
|
-
|
|
57
55
|
// C++ Trade <> JS Trade (object)
|
|
58
56
|
template <>
|
|
59
|
-
struct JSIConverter<Trade> final {
|
|
60
|
-
static inline Trade fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
57
|
+
struct JSIConverter<margelo::nitro::rncandle::Trade> final {
|
|
58
|
+
static inline margelo::nitro::rncandle::Trade fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
61
59
|
jsi::Object obj = arg.asObject(runtime);
|
|
62
|
-
return Trade(
|
|
60
|
+
return margelo::nitro::rncandle::Trade(
|
|
63
61
|
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "dateTime")),
|
|
64
|
-
JSIConverter<TradeState>::fromJSI(runtime, obj.getProperty(runtime, "state")),
|
|
65
|
-
JSIConverter<Counterparty>::fromJSI(runtime, obj.getProperty(runtime, "counterparty")),
|
|
66
|
-
JSIConverter<TradeAsset>::fromJSI(runtime, obj.getProperty(runtime, "lost")),
|
|
67
|
-
JSIConverter<TradeAsset>::fromJSI(runtime, obj.getProperty(runtime, "gained"))
|
|
62
|
+
JSIConverter<margelo::nitro::rncandle::TradeState>::fromJSI(runtime, obj.getProperty(runtime, "state")),
|
|
63
|
+
JSIConverter<margelo::nitro::rncandle::Counterparty>::fromJSI(runtime, obj.getProperty(runtime, "counterparty")),
|
|
64
|
+
JSIConverter<margelo::nitro::rncandle::TradeAsset>::fromJSI(runtime, obj.getProperty(runtime, "lost")),
|
|
65
|
+
JSIConverter<margelo::nitro::rncandle::TradeAsset>::fromJSI(runtime, obj.getProperty(runtime, "gained"))
|
|
68
66
|
);
|
|
69
67
|
}
|
|
70
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const Trade& arg) {
|
|
68
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rncandle::Trade& arg) {
|
|
71
69
|
jsi::Object obj(runtime);
|
|
72
70
|
obj.setProperty(runtime, "dateTime", JSIConverter<std::string>::toJSI(runtime, arg.dateTime));
|
|
73
|
-
obj.setProperty(runtime, "state", JSIConverter<TradeState>::toJSI(runtime, arg.state));
|
|
74
|
-
obj.setProperty(runtime, "counterparty", JSIConverter<Counterparty>::toJSI(runtime, arg.counterparty));
|
|
75
|
-
obj.setProperty(runtime, "lost", JSIConverter<TradeAsset>::toJSI(runtime, arg.lost));
|
|
76
|
-
obj.setProperty(runtime, "gained", JSIConverter<TradeAsset>::toJSI(runtime, arg.gained));
|
|
71
|
+
obj.setProperty(runtime, "state", JSIConverter<margelo::nitro::rncandle::TradeState>::toJSI(runtime, arg.state));
|
|
72
|
+
obj.setProperty(runtime, "counterparty", JSIConverter<margelo::nitro::rncandle::Counterparty>::toJSI(runtime, arg.counterparty));
|
|
73
|
+
obj.setProperty(runtime, "lost", JSIConverter<margelo::nitro::rncandle::TradeAsset>::toJSI(runtime, arg.lost));
|
|
74
|
+
obj.setProperty(runtime, "gained", JSIConverter<margelo::nitro::rncandle::TradeAsset>::toJSI(runtime, arg.gained));
|
|
77
75
|
return obj;
|
|
78
76
|
}
|
|
79
77
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -82,10 +80,10 @@ namespace margelo::nitro {
|
|
|
82
80
|
}
|
|
83
81
|
jsi::Object obj = value.getObject(runtime);
|
|
84
82
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "dateTime"))) return false;
|
|
85
|
-
if (!JSIConverter<TradeState>::canConvert(runtime, obj.getProperty(runtime, "state"))) return false;
|
|
86
|
-
if (!JSIConverter<Counterparty>::canConvert(runtime, obj.getProperty(runtime, "counterparty"))) return false;
|
|
87
|
-
if (!JSIConverter<TradeAsset>::canConvert(runtime, obj.getProperty(runtime, "lost"))) return false;
|
|
88
|
-
if (!JSIConverter<TradeAsset>::canConvert(runtime, obj.getProperty(runtime, "gained"))) return false;
|
|
83
|
+
if (!JSIConverter<margelo::nitro::rncandle::TradeState>::canConvert(runtime, obj.getProperty(runtime, "state"))) return false;
|
|
84
|
+
if (!JSIConverter<margelo::nitro::rncandle::Counterparty>::canConvert(runtime, obj.getProperty(runtime, "counterparty"))) return false;
|
|
85
|
+
if (!JSIConverter<margelo::nitro::rncandle::TradeAsset>::canConvert(runtime, obj.getProperty(runtime, "lost"))) return false;
|
|
86
|
+
if (!JSIConverter<margelo::nitro::rncandle::TradeAsset>::canConvert(runtime, obj.getProperty(runtime, "gained"))) return false;
|
|
89
87
|
return true;
|
|
90
88
|
}
|
|
91
89
|
};
|
|
@@ -29,8 +29,8 @@ namespace margelo::nitro::rncandle { struct OtherAsset; }
|
|
|
29
29
|
// Forward declaration of `NothingAsset` to properly resolve imports.
|
|
30
30
|
namespace margelo::nitro::rncandle { struct NothingAsset; }
|
|
31
31
|
|
|
32
|
-
#include <optional>
|
|
33
32
|
#include "FiatAsset.hpp"
|
|
33
|
+
#include <optional>
|
|
34
34
|
#include "MarketTradeAsset.hpp"
|
|
35
35
|
#include "TransportAsset.hpp"
|
|
36
36
|
#include "OtherAsset.hpp"
|
|
@@ -58,28 +58,26 @@ namespace margelo::nitro::rncandle {
|
|
|
58
58
|
|
|
59
59
|
namespace margelo::nitro {
|
|
60
60
|
|
|
61
|
-
using namespace margelo::nitro::rncandle;
|
|
62
|
-
|
|
63
61
|
// C++ TradeAsset <> JS TradeAsset (object)
|
|
64
62
|
template <>
|
|
65
|
-
struct JSIConverter<TradeAsset> final {
|
|
66
|
-
static inline TradeAsset fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
63
|
+
struct JSIConverter<margelo::nitro::rncandle::TradeAsset> final {
|
|
64
|
+
static inline margelo::nitro::rncandle::TradeAsset fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
67
65
|
jsi::Object obj = arg.asObject(runtime);
|
|
68
|
-
return TradeAsset(
|
|
69
|
-
JSIConverter<std::optional<FiatAsset>>::fromJSI(runtime, obj.getProperty(runtime, "fiatAsset")),
|
|
70
|
-
JSIConverter<std::optional<MarketTradeAsset>>::fromJSI(runtime, obj.getProperty(runtime, "marketTradeAsset")),
|
|
71
|
-
JSIConverter<std::optional<TransportAsset>>::fromJSI(runtime, obj.getProperty(runtime, "transportAsset")),
|
|
72
|
-
JSIConverter<std::optional<OtherAsset>>::fromJSI(runtime, obj.getProperty(runtime, "otherAsset")),
|
|
73
|
-
JSIConverter<std::optional<NothingAsset>>::fromJSI(runtime, obj.getProperty(runtime, "nothingAsset"))
|
|
66
|
+
return margelo::nitro::rncandle::TradeAsset(
|
|
67
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::FiatAsset>>::fromJSI(runtime, obj.getProperty(runtime, "fiatAsset")),
|
|
68
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::MarketTradeAsset>>::fromJSI(runtime, obj.getProperty(runtime, "marketTradeAsset")),
|
|
69
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::TransportAsset>>::fromJSI(runtime, obj.getProperty(runtime, "transportAsset")),
|
|
70
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::OtherAsset>>::fromJSI(runtime, obj.getProperty(runtime, "otherAsset")),
|
|
71
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::NothingAsset>>::fromJSI(runtime, obj.getProperty(runtime, "nothingAsset"))
|
|
74
72
|
);
|
|
75
73
|
}
|
|
76
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const TradeAsset& arg) {
|
|
74
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rncandle::TradeAsset& arg) {
|
|
77
75
|
jsi::Object obj(runtime);
|
|
78
|
-
obj.setProperty(runtime, "fiatAsset", JSIConverter<std::optional<FiatAsset>>::toJSI(runtime, arg.fiatAsset));
|
|
79
|
-
obj.setProperty(runtime, "marketTradeAsset", JSIConverter<std::optional<MarketTradeAsset>>::toJSI(runtime, arg.marketTradeAsset));
|
|
80
|
-
obj.setProperty(runtime, "transportAsset", JSIConverter<std::optional<TransportAsset>>::toJSI(runtime, arg.transportAsset));
|
|
81
|
-
obj.setProperty(runtime, "otherAsset", JSIConverter<std::optional<OtherAsset>>::toJSI(runtime, arg.otherAsset));
|
|
82
|
-
obj.setProperty(runtime, "nothingAsset", JSIConverter<std::optional<NothingAsset>>::toJSI(runtime, arg.nothingAsset));
|
|
76
|
+
obj.setProperty(runtime, "fiatAsset", JSIConverter<std::optional<margelo::nitro::rncandle::FiatAsset>>::toJSI(runtime, arg.fiatAsset));
|
|
77
|
+
obj.setProperty(runtime, "marketTradeAsset", JSIConverter<std::optional<margelo::nitro::rncandle::MarketTradeAsset>>::toJSI(runtime, arg.marketTradeAsset));
|
|
78
|
+
obj.setProperty(runtime, "transportAsset", JSIConverter<std::optional<margelo::nitro::rncandle::TransportAsset>>::toJSI(runtime, arg.transportAsset));
|
|
79
|
+
obj.setProperty(runtime, "otherAsset", JSIConverter<std::optional<margelo::nitro::rncandle::OtherAsset>>::toJSI(runtime, arg.otherAsset));
|
|
80
|
+
obj.setProperty(runtime, "nothingAsset", JSIConverter<std::optional<margelo::nitro::rncandle::NothingAsset>>::toJSI(runtime, arg.nothingAsset));
|
|
83
81
|
return obj;
|
|
84
82
|
}
|
|
85
83
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -87,11 +85,11 @@ namespace margelo::nitro {
|
|
|
87
85
|
return false;
|
|
88
86
|
}
|
|
89
87
|
jsi::Object obj = value.getObject(runtime);
|
|
90
|
-
if (!JSIConverter<std::optional<FiatAsset>>::canConvert(runtime, obj.getProperty(runtime, "fiatAsset"))) return false;
|
|
91
|
-
if (!JSIConverter<std::optional<MarketTradeAsset>>::canConvert(runtime, obj.getProperty(runtime, "marketTradeAsset"))) return false;
|
|
92
|
-
if (!JSIConverter<std::optional<TransportAsset>>::canConvert(runtime, obj.getProperty(runtime, "transportAsset"))) return false;
|
|
93
|
-
if (!JSIConverter<std::optional<OtherAsset>>::canConvert(runtime, obj.getProperty(runtime, "otherAsset"))) return false;
|
|
94
|
-
if (!JSIConverter<std::optional<NothingAsset>>::canConvert(runtime, obj.getProperty(runtime, "nothingAsset"))) return false;
|
|
88
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::FiatAsset>>::canConvert(runtime, obj.getProperty(runtime, "fiatAsset"))) return false;
|
|
89
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::MarketTradeAsset>>::canConvert(runtime, obj.getProperty(runtime, "marketTradeAsset"))) return false;
|
|
90
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::TransportAsset>>::canConvert(runtime, obj.getProperty(runtime, "transportAsset"))) return false;
|
|
91
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::OtherAsset>>::canConvert(runtime, obj.getProperty(runtime, "otherAsset"))) return false;
|
|
92
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::NothingAsset>>::canConvert(runtime, obj.getProperty(runtime, "nothingAsset"))) return false;
|
|
95
93
|
return true;
|
|
96
94
|
}
|
|
97
95
|
};
|