adaptic-backend 1.0.76 → 1.0.77
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/Account.cjs +27 -18
- package/Alert.cjs +27 -18
- package/AlpacaAccount.cjs +48 -32
- package/Asset.cjs +21 -14
- package/Authenticator.cjs +27 -18
- package/Customer.cjs +39 -26
- package/NewsArticle.cjs +3 -2
- package/NewsArticleAssetSentiment.cjs +27 -18
- package/Order.cjs +54 -36
- package/Position.cjs +54 -36
- package/Session.cjs +27 -18
- package/Trade.cjs +57 -38
- package/User.cjs +48 -32
- package/package.json +1 -1
- package/server/Account.d.ts.map +1 -1
- package/server/Account.js.map +1 -1
- package/server/Account.mjs +27 -18
- package/server/Alert.d.ts.map +1 -1
- package/server/Alert.js.map +1 -1
- package/server/Alert.mjs +27 -18
- package/server/AlpacaAccount.d.ts.map +1 -1
- package/server/AlpacaAccount.js.map +1 -1
- package/server/AlpacaAccount.mjs +48 -32
- package/server/Asset.d.ts.map +1 -1
- package/server/Asset.js.map +1 -1
- package/server/Asset.mjs +21 -14
- package/server/Authenticator.d.ts.map +1 -1
- package/server/Authenticator.js.map +1 -1
- package/server/Authenticator.mjs +27 -18
- package/server/Customer.d.ts.map +1 -1
- package/server/Customer.js.map +1 -1
- package/server/Customer.mjs +39 -26
- package/server/NewsArticle.d.ts.map +1 -1
- package/server/NewsArticle.js.map +1 -1
- package/server/NewsArticle.mjs +3 -2
- package/server/NewsArticleAssetSentiment.d.ts.map +1 -1
- package/server/NewsArticleAssetSentiment.js.map +1 -1
- package/server/NewsArticleAssetSentiment.mjs +27 -18
- package/server/Order.d.ts.map +1 -1
- package/server/Order.js.map +1 -1
- package/server/Order.mjs +54 -36
- package/server/Position.d.ts.map +1 -1
- package/server/Position.js.map +1 -1
- package/server/Position.mjs +54 -36
- package/server/Session.d.ts.map +1 -1
- package/server/Session.js.map +1 -1
- package/server/Session.mjs +27 -18
- package/server/Trade.d.ts.map +1 -1
- package/server/Trade.js.map +1 -1
- package/server/Trade.mjs +57 -38
- package/server/User.d.ts.map +1 -1
- package/server/User.js.map +1 -1
- package/server/User.mjs +48 -32
package/Account.cjs
CHANGED
@@ -261,8 +261,9 @@ exports.Account = {
|
|
261
261
|
}
|
262
262
|
} : undefined,
|
263
263
|
sessions: props.user.sessions ?
|
264
|
-
|
265
|
-
?
|
264
|
+
Array.isArray(props.user.sessions) && props.user.sessions.length > 0
|
265
|
+
? props.user.sessions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
266
|
+
connect: props.user.sessions.map((item) => ({
|
266
267
|
id: item.id
|
267
268
|
}))
|
268
269
|
}
|
@@ -277,8 +278,9 @@ exports.Account = {
|
|
277
278
|
}))
|
278
279
|
} : undefined,
|
279
280
|
authenticators: props.user.authenticators ?
|
280
|
-
|
281
|
-
?
|
281
|
+
Array.isArray(props.user.authenticators) && props.user.authenticators.length > 0
|
282
|
+
? props.user.authenticators.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
283
|
+
connect: props.user.authenticators.map((item) => ({
|
282
284
|
id: item.id
|
283
285
|
}))
|
284
286
|
}
|
@@ -294,8 +296,9 @@ exports.Account = {
|
|
294
296
|
}))
|
295
297
|
} : undefined,
|
296
298
|
alpacaAccounts: props.user.alpacaAccounts ?
|
297
|
-
|
298
|
-
?
|
299
|
+
Array.isArray(props.user.alpacaAccounts) && props.user.alpacaAccounts.length > 0
|
300
|
+
? props.user.alpacaAccounts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
301
|
+
connect: props.user.alpacaAccounts.map((item) => ({
|
299
302
|
id: item.id
|
300
303
|
}))
|
301
304
|
}
|
@@ -820,8 +823,9 @@ exports.Account = {
|
|
820
823
|
}
|
821
824
|
} : undefined,
|
822
825
|
sessions: props.user.sessions ?
|
823
|
-
|
824
|
-
?
|
826
|
+
Array.isArray(props.user.sessions) && props.user.sessions.length > 0
|
827
|
+
? props.user.sessions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
828
|
+
connect: props.user.sessions.map((item) => ({
|
825
829
|
id: item.id
|
826
830
|
}))
|
827
831
|
}
|
@@ -836,8 +840,9 @@ exports.Account = {
|
|
836
840
|
}))
|
837
841
|
} : undefined,
|
838
842
|
authenticators: props.user.authenticators ?
|
839
|
-
|
840
|
-
?
|
843
|
+
Array.isArray(props.user.authenticators) && props.user.authenticators.length > 0
|
844
|
+
? props.user.authenticators.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
845
|
+
connect: props.user.authenticators.map((item) => ({
|
841
846
|
id: item.id
|
842
847
|
}))
|
843
848
|
}
|
@@ -853,8 +858,9 @@ exports.Account = {
|
|
853
858
|
}))
|
854
859
|
} : undefined,
|
855
860
|
alpacaAccounts: props.user.alpacaAccounts ?
|
856
|
-
|
857
|
-
?
|
861
|
+
Array.isArray(props.user.alpacaAccounts) && props.user.alpacaAccounts.length > 0
|
862
|
+
? props.user.alpacaAccounts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
863
|
+
connect: props.user.alpacaAccounts.map((item) => ({
|
858
864
|
id: item.id
|
859
865
|
}))
|
860
866
|
}
|
@@ -1156,8 +1162,9 @@ exports.Account = {
|
|
1156
1162
|
}
|
1157
1163
|
} : undefined,
|
1158
1164
|
sessions: prop.user.sessions ?
|
1159
|
-
|
1160
|
-
?
|
1165
|
+
Array.isArray(prop.user.sessions) && prop.user.sessions.length > 0
|
1166
|
+
? prop.user.sessions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
1167
|
+
connect: prop.user.sessions.map((item) => ({
|
1161
1168
|
id: item.id
|
1162
1169
|
}))
|
1163
1170
|
}
|
@@ -1172,8 +1179,9 @@ exports.Account = {
|
|
1172
1179
|
}))
|
1173
1180
|
} : undefined,
|
1174
1181
|
authenticators: prop.user.authenticators ?
|
1175
|
-
|
1176
|
-
?
|
1182
|
+
Array.isArray(prop.user.authenticators) && prop.user.authenticators.length > 0
|
1183
|
+
? prop.user.authenticators.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
1184
|
+
connect: prop.user.authenticators.map((item) => ({
|
1177
1185
|
id: item.id
|
1178
1186
|
}))
|
1179
1187
|
}
|
@@ -1189,8 +1197,9 @@ exports.Account = {
|
|
1189
1197
|
}))
|
1190
1198
|
} : undefined,
|
1191
1199
|
alpacaAccounts: prop.user.alpacaAccounts ?
|
1192
|
-
|
1193
|
-
?
|
1200
|
+
Array.isArray(prop.user.alpacaAccounts) && prop.user.alpacaAccounts.length > 0
|
1201
|
+
? prop.user.alpacaAccounts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
1202
|
+
connect: prop.user.alpacaAccounts.map((item) => ({
|
1194
1203
|
id: item.id
|
1195
1204
|
}))
|
1196
1205
|
}
|
package/Alert.cjs
CHANGED
@@ -330,8 +330,9 @@ exports.Alert = {
|
|
330
330
|
}
|
331
331
|
} : undefined,
|
332
332
|
trades: props.alpacaAccount.trades ?
|
333
|
-
|
334
|
-
?
|
333
|
+
Array.isArray(props.alpacaAccount.trades) && props.alpacaAccount.trades.length > 0
|
334
|
+
? props.alpacaAccount.trades.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
335
|
+
connect: props.alpacaAccount.trades.map((item) => ({
|
335
336
|
id: item.id
|
336
337
|
}))
|
337
338
|
}
|
@@ -354,8 +355,9 @@ exports.Alert = {
|
|
354
355
|
}))
|
355
356
|
} : undefined,
|
356
357
|
orders: props.alpacaAccount.orders ?
|
357
|
-
|
358
|
-
?
|
358
|
+
Array.isArray(props.alpacaAccount.orders) && props.alpacaAccount.orders.length > 0
|
359
|
+
? props.alpacaAccount.orders.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
360
|
+
connect: props.alpacaAccount.orders.map((item) => ({
|
359
361
|
id: item.id
|
360
362
|
}))
|
361
363
|
}
|
@@ -384,8 +386,9 @@ exports.Alert = {
|
|
384
386
|
}))
|
385
387
|
} : undefined,
|
386
388
|
positions: props.alpacaAccount.positions ?
|
387
|
-
|
388
|
-
?
|
389
|
+
Array.isArray(props.alpacaAccount.positions) && props.alpacaAccount.positions.length > 0
|
390
|
+
? props.alpacaAccount.positions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
391
|
+
connect: props.alpacaAccount.positions.map((item) => ({
|
389
392
|
id: item.id
|
390
393
|
}))
|
391
394
|
}
|
@@ -1082,8 +1085,9 @@ exports.Alert = {
|
|
1082
1085
|
}
|
1083
1086
|
} : undefined,
|
1084
1087
|
trades: props.alpacaAccount.trades ?
|
1085
|
-
|
1086
|
-
?
|
1088
|
+
Array.isArray(props.alpacaAccount.trades) && props.alpacaAccount.trades.length > 0
|
1089
|
+
? props.alpacaAccount.trades.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
1090
|
+
connect: props.alpacaAccount.trades.map((item) => ({
|
1087
1091
|
id: item.id
|
1088
1092
|
}))
|
1089
1093
|
}
|
@@ -1106,8 +1110,9 @@ exports.Alert = {
|
|
1106
1110
|
}))
|
1107
1111
|
} : undefined,
|
1108
1112
|
orders: props.alpacaAccount.orders ?
|
1109
|
-
|
1110
|
-
?
|
1113
|
+
Array.isArray(props.alpacaAccount.orders) && props.alpacaAccount.orders.length > 0
|
1114
|
+
? props.alpacaAccount.orders.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
1115
|
+
connect: props.alpacaAccount.orders.map((item) => ({
|
1111
1116
|
id: item.id
|
1112
1117
|
}))
|
1113
1118
|
}
|
@@ -1136,8 +1141,9 @@ exports.Alert = {
|
|
1136
1141
|
}))
|
1137
1142
|
} : undefined,
|
1138
1143
|
positions: props.alpacaAccount.positions ?
|
1139
|
-
|
1140
|
-
?
|
1144
|
+
Array.isArray(props.alpacaAccount.positions) && props.alpacaAccount.positions.length > 0
|
1145
|
+
? props.alpacaAccount.positions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
1146
|
+
connect: props.alpacaAccount.positions.map((item) => ({
|
1141
1147
|
id: item.id
|
1142
1148
|
}))
|
1143
1149
|
}
|
@@ -1537,8 +1543,9 @@ exports.Alert = {
|
|
1537
1543
|
}
|
1538
1544
|
} : undefined,
|
1539
1545
|
trades: prop.alpacaAccount.trades ?
|
1540
|
-
|
1541
|
-
?
|
1546
|
+
Array.isArray(prop.alpacaAccount.trades) && prop.alpacaAccount.trades.length > 0
|
1547
|
+
? prop.alpacaAccount.trades.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
1548
|
+
connect: prop.alpacaAccount.trades.map((item) => ({
|
1542
1549
|
id: item.id
|
1543
1550
|
}))
|
1544
1551
|
}
|
@@ -1561,8 +1568,9 @@ exports.Alert = {
|
|
1561
1568
|
}))
|
1562
1569
|
} : undefined,
|
1563
1570
|
orders: prop.alpacaAccount.orders ?
|
1564
|
-
|
1565
|
-
?
|
1571
|
+
Array.isArray(prop.alpacaAccount.orders) && prop.alpacaAccount.orders.length > 0
|
1572
|
+
? prop.alpacaAccount.orders.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
1573
|
+
connect: prop.alpacaAccount.orders.map((item) => ({
|
1566
1574
|
id: item.id
|
1567
1575
|
}))
|
1568
1576
|
}
|
@@ -1591,8 +1599,9 @@ exports.Alert = {
|
|
1591
1599
|
}))
|
1592
1600
|
} : undefined,
|
1593
1601
|
positions: prop.alpacaAccount.positions ?
|
1594
|
-
|
1595
|
-
?
|
1602
|
+
Array.isArray(prop.alpacaAccount.positions) && prop.alpacaAccount.positions.length > 0
|
1603
|
+
? prop.alpacaAccount.positions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
1604
|
+
connect: prop.alpacaAccount.positions.map((item) => ({
|
1596
1605
|
id: item.id
|
1597
1606
|
}))
|
1598
1607
|
}
|
package/AlpacaAccount.cjs
CHANGED
@@ -349,8 +349,9 @@ exports.AlpacaAccount = {
|
|
349
349
|
}
|
350
350
|
} : undefined,
|
351
351
|
accounts: props.user.accounts ?
|
352
|
-
|
353
|
-
?
|
352
|
+
Array.isArray(props.user.accounts) && props.user.accounts.length > 0
|
353
|
+
? props.user.accounts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
354
|
+
connect: props.user.accounts.map((item) => ({
|
354
355
|
id: item.id
|
355
356
|
}))
|
356
357
|
}
|
@@ -373,8 +374,9 @@ exports.AlpacaAccount = {
|
|
373
374
|
}))
|
374
375
|
} : undefined,
|
375
376
|
sessions: props.user.sessions ?
|
376
|
-
|
377
|
-
?
|
377
|
+
Array.isArray(props.user.sessions) && props.user.sessions.length > 0
|
378
|
+
? props.user.sessions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
379
|
+
connect: props.user.sessions.map((item) => ({
|
378
380
|
id: item.id
|
379
381
|
}))
|
380
382
|
}
|
@@ -389,8 +391,9 @@ exports.AlpacaAccount = {
|
|
389
391
|
}))
|
390
392
|
} : undefined,
|
391
393
|
authenticators: props.user.authenticators ?
|
392
|
-
|
393
|
-
?
|
394
|
+
Array.isArray(props.user.authenticators) && props.user.authenticators.length > 0
|
395
|
+
? props.user.authenticators.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
396
|
+
connect: props.user.authenticators.map((item) => ({
|
394
397
|
id: item.id
|
395
398
|
}))
|
396
399
|
}
|
@@ -409,8 +412,9 @@ exports.AlpacaAccount = {
|
|
409
412
|
}
|
410
413
|
} : undefined,
|
411
414
|
trades: props.trades ?
|
412
|
-
|
413
|
-
?
|
415
|
+
Array.isArray(props.trades) && props.trades.length > 0
|
416
|
+
? props.trades.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
417
|
+
connect: props.trades.map((item) => ({
|
414
418
|
id: item.id
|
415
419
|
}))
|
416
420
|
}
|
@@ -501,8 +505,9 @@ exports.AlpacaAccount = {
|
|
501
505
|
}
|
502
506
|
} : undefined,
|
503
507
|
actions: item.actions ?
|
504
|
-
|
505
|
-
?
|
508
|
+
Array.isArray(item.actions) && item.actions.length > 0
|
509
|
+
? item.actions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
510
|
+
connect: item.actions.map((item) => ({
|
506
511
|
id: item.id
|
507
512
|
}))
|
508
513
|
}
|
@@ -523,8 +528,9 @@ exports.AlpacaAccount = {
|
|
523
528
|
}))
|
524
529
|
} : undefined,
|
525
530
|
orders: props.orders ?
|
526
|
-
|
527
|
-
?
|
531
|
+
Array.isArray(props.orders) && props.orders.length > 0
|
532
|
+
? props.orders.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
533
|
+
connect: props.orders.map((item) => ({
|
528
534
|
id: item.id
|
529
535
|
}))
|
530
536
|
}
|
@@ -643,8 +649,9 @@ exports.AlpacaAccount = {
|
|
643
649
|
}))
|
644
650
|
} : undefined,
|
645
651
|
positions: props.positions ?
|
646
|
-
|
647
|
-
?
|
652
|
+
Array.isArray(props.positions) && props.positions.length > 0
|
653
|
+
? props.positions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
654
|
+
connect: props.positions.map((item) => ({
|
648
655
|
id: item.id
|
649
656
|
}))
|
650
657
|
}
|
@@ -741,8 +748,9 @@ exports.AlpacaAccount = {
|
|
741
748
|
}))
|
742
749
|
} : undefined,
|
743
750
|
alerts: props.alerts ?
|
744
|
-
|
745
|
-
?
|
751
|
+
Array.isArray(props.alerts) && props.alerts.length > 0
|
752
|
+
? props.alerts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
753
|
+
connect: props.alerts.map((item) => ({
|
746
754
|
id: item.id
|
747
755
|
}))
|
748
756
|
}
|
@@ -1355,8 +1363,9 @@ exports.AlpacaAccount = {
|
|
1355
1363
|
}
|
1356
1364
|
} : undefined,
|
1357
1365
|
accounts: props.user.accounts ?
|
1358
|
-
|
1359
|
-
?
|
1366
|
+
Array.isArray(props.user.accounts) && props.user.accounts.length > 0
|
1367
|
+
? props.user.accounts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
1368
|
+
connect: props.user.accounts.map((item) => ({
|
1360
1369
|
id: item.id
|
1361
1370
|
}))
|
1362
1371
|
}
|
@@ -1379,8 +1388,9 @@ exports.AlpacaAccount = {
|
|
1379
1388
|
}))
|
1380
1389
|
} : undefined,
|
1381
1390
|
sessions: props.user.sessions ?
|
1382
|
-
|
1383
|
-
?
|
1391
|
+
Array.isArray(props.user.sessions) && props.user.sessions.length > 0
|
1392
|
+
? props.user.sessions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
1393
|
+
connect: props.user.sessions.map((item) => ({
|
1384
1394
|
id: item.id
|
1385
1395
|
}))
|
1386
1396
|
}
|
@@ -1395,8 +1405,9 @@ exports.AlpacaAccount = {
|
|
1395
1405
|
}))
|
1396
1406
|
} : undefined,
|
1397
1407
|
authenticators: props.user.authenticators ?
|
1398
|
-
|
1399
|
-
?
|
1408
|
+
Array.isArray(props.user.authenticators) && props.user.authenticators.length > 0
|
1409
|
+
? props.user.authenticators.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
1410
|
+
connect: props.user.authenticators.map((item) => ({
|
1400
1411
|
id: item.id
|
1401
1412
|
}))
|
1402
1413
|
}
|
@@ -1813,8 +1824,9 @@ exports.AlpacaAccount = {
|
|
1813
1824
|
}
|
1814
1825
|
} : undefined,
|
1815
1826
|
actions: item.actions ?
|
1816
|
-
|
1817
|
-
?
|
1827
|
+
Array.isArray(item.actions) && item.actions.length > 0
|
1828
|
+
? item.actions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
1829
|
+
connect: item.actions.map((item) => ({
|
1818
1830
|
id: item.id
|
1819
1831
|
}))
|
1820
1832
|
}
|
@@ -2972,8 +2984,9 @@ exports.AlpacaAccount = {
|
|
2972
2984
|
}
|
2973
2985
|
} : undefined,
|
2974
2986
|
accounts: prop.user.accounts ?
|
2975
|
-
|
2976
|
-
?
|
2987
|
+
Array.isArray(prop.user.accounts) && prop.user.accounts.length > 0
|
2988
|
+
? prop.user.accounts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
2989
|
+
connect: prop.user.accounts.map((item) => ({
|
2977
2990
|
id: item.id
|
2978
2991
|
}))
|
2979
2992
|
}
|
@@ -2996,8 +3009,9 @@ exports.AlpacaAccount = {
|
|
2996
3009
|
}))
|
2997
3010
|
} : undefined,
|
2998
3011
|
sessions: prop.user.sessions ?
|
2999
|
-
|
3000
|
-
?
|
3012
|
+
Array.isArray(prop.user.sessions) && prop.user.sessions.length > 0
|
3013
|
+
? prop.user.sessions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
3014
|
+
connect: prop.user.sessions.map((item) => ({
|
3001
3015
|
id: item.id
|
3002
3016
|
}))
|
3003
3017
|
}
|
@@ -3012,8 +3026,9 @@ exports.AlpacaAccount = {
|
|
3012
3026
|
}))
|
3013
3027
|
} : undefined,
|
3014
3028
|
authenticators: prop.user.authenticators ?
|
3015
|
-
|
3016
|
-
?
|
3029
|
+
Array.isArray(prop.user.authenticators) && prop.user.authenticators.length > 0
|
3030
|
+
? prop.user.authenticators.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
3031
|
+
connect: prop.user.authenticators.map((item) => ({
|
3017
3032
|
id: item.id
|
3018
3033
|
}))
|
3019
3034
|
}
|
@@ -3430,8 +3445,9 @@ exports.AlpacaAccount = {
|
|
3430
3445
|
}
|
3431
3446
|
} : undefined,
|
3432
3447
|
actions: item.actions ?
|
3433
|
-
|
3434
|
-
?
|
3448
|
+
Array.isArray(item.actions) && item.actions.length > 0
|
3449
|
+
? item.actions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
3450
|
+
connect: item.actions.map((item) => ({
|
3435
3451
|
id: item.id
|
3436
3452
|
}))
|
3437
3453
|
}
|
package/Asset.cjs
CHANGED
@@ -324,8 +324,9 @@ exports.Asset = {
|
|
324
324
|
sellPrice: props.sellPrice !== undefined ? props.sellPrice : undefined,
|
325
325
|
buyPrice: props.buyPrice !== undefined ? props.buyPrice : undefined,
|
326
326
|
trades: props.trades ?
|
327
|
-
|
328
|
-
?
|
327
|
+
Array.isArray(props.trades) && props.trades.length > 0
|
328
|
+
? props.trades.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
329
|
+
connect: props.trades.map((item) => ({
|
329
330
|
id: item.id
|
330
331
|
}))
|
331
332
|
}
|
@@ -364,8 +365,9 @@ exports.Asset = {
|
|
364
365
|
}
|
365
366
|
} : undefined,
|
366
367
|
actions: item.actions ?
|
367
|
-
|
368
|
-
?
|
368
|
+
Array.isArray(item.actions) && item.actions.length > 0
|
369
|
+
? item.actions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
370
|
+
connect: item.actions.map((item) => ({
|
369
371
|
id: item.id
|
370
372
|
}))
|
371
373
|
}
|
@@ -386,8 +388,9 @@ exports.Asset = {
|
|
386
388
|
}))
|
387
389
|
} : undefined,
|
388
390
|
orders: props.orders ?
|
389
|
-
|
390
|
-
?
|
391
|
+
Array.isArray(props.orders) && props.orders.length > 0
|
392
|
+
? props.orders.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
393
|
+
connect: props.orders.map((item) => ({
|
391
394
|
id: item.id
|
392
395
|
}))
|
393
396
|
}
|
@@ -454,8 +457,9 @@ exports.Asset = {
|
|
454
457
|
}))
|
455
458
|
} : undefined,
|
456
459
|
positions: props.positions ?
|
457
|
-
|
458
|
-
?
|
460
|
+
Array.isArray(props.positions) && props.positions.length > 0
|
461
|
+
? props.positions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
462
|
+
connect: props.positions.map((item) => ({
|
459
463
|
id: item.id
|
460
464
|
}))
|
461
465
|
}
|
@@ -500,8 +504,9 @@ exports.Asset = {
|
|
500
504
|
}))
|
501
505
|
} : undefined,
|
502
506
|
newsMentions: props.newsMentions ?
|
503
|
-
|
504
|
-
?
|
507
|
+
Array.isArray(props.newsMentions) && props.newsMentions.length > 0
|
508
|
+
? props.newsMentions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
509
|
+
connect: props.newsMentions.map((item) => ({
|
505
510
|
id: item.id
|
506
511
|
}))
|
507
512
|
}
|
@@ -1236,8 +1241,9 @@ exports.Asset = {
|
|
1236
1241
|
}
|
1237
1242
|
} : undefined,
|
1238
1243
|
actions: item.actions ?
|
1239
|
-
|
1240
|
-
?
|
1244
|
+
Array.isArray(item.actions) && item.actions.length > 0
|
1245
|
+
? item.actions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
1246
|
+
connect: item.actions.map((item) => ({
|
1241
1247
|
id: item.id
|
1242
1248
|
}))
|
1243
1249
|
}
|
@@ -2056,8 +2062,9 @@ exports.Asset = {
|
|
2056
2062
|
}
|
2057
2063
|
} : undefined,
|
2058
2064
|
actions: item.actions ?
|
2059
|
-
|
2060
|
-
?
|
2065
|
+
Array.isArray(item.actions) && item.actions.length > 0
|
2066
|
+
? item.actions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
2067
|
+
connect: item.actions.map((item) => ({
|
2061
2068
|
id: item.id
|
2062
2069
|
}))
|
2063
2070
|
}
|
package/Authenticator.cjs
CHANGED
@@ -254,8 +254,9 @@ exports.Authenticator = {
|
|
254
254
|
}
|
255
255
|
} : undefined,
|
256
256
|
accounts: props.user.accounts ?
|
257
|
-
|
258
|
-
?
|
257
|
+
Array.isArray(props.user.accounts) && props.user.accounts.length > 0
|
258
|
+
? props.user.accounts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
259
|
+
connect: props.user.accounts.map((item) => ({
|
259
260
|
id: item.id
|
260
261
|
}))
|
261
262
|
}
|
@@ -278,8 +279,9 @@ exports.Authenticator = {
|
|
278
279
|
}))
|
279
280
|
} : undefined,
|
280
281
|
sessions: props.user.sessions ?
|
281
|
-
|
282
|
-
?
|
282
|
+
Array.isArray(props.user.sessions) && props.user.sessions.length > 0
|
283
|
+
? props.user.sessions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
284
|
+
connect: props.user.sessions.map((item) => ({
|
283
285
|
id: item.id
|
284
286
|
}))
|
285
287
|
}
|
@@ -294,8 +296,9 @@ exports.Authenticator = {
|
|
294
296
|
}))
|
295
297
|
} : undefined,
|
296
298
|
alpacaAccounts: props.user.alpacaAccounts ?
|
297
|
-
|
298
|
-
?
|
299
|
+
Array.isArray(props.user.alpacaAccounts) && props.user.alpacaAccounts.length > 0
|
300
|
+
? props.user.alpacaAccounts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
301
|
+
connect: props.user.alpacaAccounts.map((item) => ({
|
299
302
|
id: item.id
|
300
303
|
}))
|
301
304
|
}
|
@@ -820,8 +823,9 @@ exports.Authenticator = {
|
|
820
823
|
}
|
821
824
|
} : undefined,
|
822
825
|
accounts: props.user.accounts ?
|
823
|
-
|
824
|
-
?
|
826
|
+
Array.isArray(props.user.accounts) && props.user.accounts.length > 0
|
827
|
+
? props.user.accounts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
828
|
+
connect: props.user.accounts.map((item) => ({
|
825
829
|
id: item.id
|
826
830
|
}))
|
827
831
|
}
|
@@ -844,8 +848,9 @@ exports.Authenticator = {
|
|
844
848
|
}))
|
845
849
|
} : undefined,
|
846
850
|
sessions: props.user.sessions ?
|
847
|
-
|
848
|
-
?
|
851
|
+
Array.isArray(props.user.sessions) && props.user.sessions.length > 0
|
852
|
+
? props.user.sessions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
853
|
+
connect: props.user.sessions.map((item) => ({
|
849
854
|
id: item.id
|
850
855
|
}))
|
851
856
|
}
|
@@ -860,8 +865,9 @@ exports.Authenticator = {
|
|
860
865
|
}))
|
861
866
|
} : undefined,
|
862
867
|
alpacaAccounts: props.user.alpacaAccounts ?
|
863
|
-
|
864
|
-
?
|
868
|
+
Array.isArray(props.user.alpacaAccounts) && props.user.alpacaAccounts.length > 0
|
869
|
+
? props.user.alpacaAccounts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
870
|
+
connect: props.user.alpacaAccounts.map((item) => ({
|
865
871
|
id: item.id
|
866
872
|
}))
|
867
873
|
}
|
@@ -1170,8 +1176,9 @@ exports.Authenticator = {
|
|
1170
1176
|
}
|
1171
1177
|
} : undefined,
|
1172
1178
|
accounts: prop.user.accounts ?
|
1173
|
-
|
1174
|
-
?
|
1179
|
+
Array.isArray(prop.user.accounts) && prop.user.accounts.length > 0
|
1180
|
+
? prop.user.accounts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
1181
|
+
connect: prop.user.accounts.map((item) => ({
|
1175
1182
|
id: item.id
|
1176
1183
|
}))
|
1177
1184
|
}
|
@@ -1194,8 +1201,9 @@ exports.Authenticator = {
|
|
1194
1201
|
}))
|
1195
1202
|
} : undefined,
|
1196
1203
|
sessions: prop.user.sessions ?
|
1197
|
-
|
1198
|
-
?
|
1204
|
+
Array.isArray(prop.user.sessions) && prop.user.sessions.length > 0
|
1205
|
+
? prop.user.sessions.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
1206
|
+
connect: prop.user.sessions.map((item) => ({
|
1199
1207
|
id: item.id
|
1200
1208
|
}))
|
1201
1209
|
}
|
@@ -1210,8 +1218,9 @@ exports.Authenticator = {
|
|
1210
1218
|
}))
|
1211
1219
|
} : undefined,
|
1212
1220
|
alpacaAccounts: prop.user.alpacaAccounts ?
|
1213
|
-
|
1214
|
-
?
|
1221
|
+
Array.isArray(prop.user.alpacaAccounts) && prop.user.alpacaAccounts.length > 0
|
1222
|
+
? prop.user.alpacaAccounts.every((item) => typeof item === 'object' && 'id' in item && Object.keys(item).length === 1) && {
|
1223
|
+
connect: prop.user.alpacaAccounts.map((item) => ({
|
1215
1224
|
id: item.id
|
1216
1225
|
}))
|
1217
1226
|
}
|