adaptic-backend 1.0.158 → 1.0.160
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 +435 -58
- package/Action.cjs +966 -121
- package/Alert.cjs +593 -89
- package/AlpacaAccount.cjs +1161 -134
- package/Asset.cjs +1029 -137
- package/Authenticator.cjs +438 -54
- package/Customer.cjs +435 -64
- package/EconomicEvent.cjs +9 -3
- package/NewsArticle.cjs +255 -30
- package/NewsArticleAssetSentiment.cjs +427 -65
- package/Order.cjs +867 -129
- package/Position.cjs +945 -141
- package/Session.cjs +438 -54
- package/StopLoss.cjs +552 -69
- package/TakeProfit.cjs +552 -69
- package/Trade.cjs +1042 -153
- package/User.cjs +480 -73
- package/VerificationToken.cjs +9 -3
- package/generated/typegraphql-prisma/enhance.cjs +11 -7
- package/generated/typegraphql-prisma/enhance.d.ts.map +1 -1
- package/generated/typegraphql-prisma/enhance.js.map +1 -1
- package/generated/typegraphql-prisma/models/Asset.cjs +2 -2
- package/generated/typegraphql-prisma/models/Asset.d.ts +2 -2
- package/generated/typegraphql-prisma/models/Asset.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/AssetAvgOrderByAggregateInput.cjs +56 -0
- package/generated/typegraphql-prisma/resolvers/inputs/AssetAvgOrderByAggregateInput.d.ts +5 -0
- package/generated/typegraphql-prisma/resolvers/inputs/AssetAvgOrderByAggregateInput.d.ts.map +1 -0
- package/generated/typegraphql-prisma/resolvers/inputs/AssetAvgOrderByAggregateInput.js.map +1 -0
- package/generated/typegraphql-prisma/resolvers/inputs/AssetCreateInput.cjs +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetCreateInput.d.ts +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetCreateInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/AssetCreateManyInput.cjs +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetCreateManyInput.d.ts +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetCreateManyInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/AssetCreateWithoutNewsMentionsInput.cjs +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetCreateWithoutNewsMentionsInput.d.ts +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetCreateWithoutNewsMentionsInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/AssetCreateWithoutOrdersInput.cjs +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetCreateWithoutOrdersInput.d.ts +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetCreateWithoutOrdersInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/AssetCreateWithoutPositionsInput.cjs +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetCreateWithoutPositionsInput.d.ts +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetCreateWithoutPositionsInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/AssetCreateWithoutTradesInput.cjs +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetCreateWithoutTradesInput.d.ts +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetCreateWithoutTradesInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/AssetOrderByWithAggregationInput.cjs +14 -0
- package/generated/typegraphql-prisma/resolvers/inputs/AssetOrderByWithAggregationInput.d.ts +4 -0
- package/generated/typegraphql-prisma/resolvers/inputs/AssetOrderByWithAggregationInput.d.ts.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/AssetOrderByWithAggregationInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/AssetScalarWhereWithAggregatesInput.cjs +3 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetScalarWhereWithAggregatesInput.d.ts +3 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetScalarWhereWithAggregatesInput.d.ts.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/AssetScalarWhereWithAggregatesInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/AssetSumOrderByAggregateInput.cjs +56 -0
- package/generated/typegraphql-prisma/resolvers/inputs/AssetSumOrderByAggregateInput.d.ts +5 -0
- package/generated/typegraphql-prisma/resolvers/inputs/AssetSumOrderByAggregateInput.d.ts.map +1 -0
- package/generated/typegraphql-prisma/resolvers/inputs/AssetSumOrderByAggregateInput.js.map +1 -0
- package/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateInput.cjs +3 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateInput.d.ts +3 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateInput.d.ts.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateManyMutationInput.cjs +3 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateManyMutationInput.d.ts +3 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateManyMutationInput.d.ts.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateManyMutationInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutNewsMentionsInput.cjs +3 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutNewsMentionsInput.d.ts +3 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutNewsMentionsInput.d.ts.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutNewsMentionsInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutOrdersInput.cjs +3 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutOrdersInput.d.ts +3 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutOrdersInput.d.ts.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutOrdersInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutPositionsInput.cjs +3 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutPositionsInput.d.ts +3 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutPositionsInput.d.ts.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutPositionsInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutTradesInput.cjs +3 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutTradesInput.d.ts +3 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutTradesInput.d.ts.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutTradesInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/AssetWhereInput.cjs +3 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetWhereInput.d.ts +3 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetWhereInput.d.ts.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/AssetWhereInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/AssetWhereUniqueInput.cjs +3 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetWhereUniqueInput.d.ts +3 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetWhereUniqueInput.d.ts.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/AssetWhereUniqueInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/index.cjs +17 -13
- package/generated/typegraphql-prisma/resolvers/inputs/index.d.ts +2 -0
- package/generated/typegraphql-prisma/resolvers/inputs/index.d.ts.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/index.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/outputs/AggregateAsset.cjs +14 -0
- package/generated/typegraphql-prisma/resolvers/outputs/AggregateAsset.d.ts +4 -0
- package/generated/typegraphql-prisma/resolvers/outputs/AggregateAsset.d.ts.map +1 -1
- package/generated/typegraphql-prisma/resolvers/outputs/AggregateAsset.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/outputs/AssetAvgAggregate.cjs +55 -0
- package/generated/typegraphql-prisma/resolvers/outputs/AssetAvgAggregate.d.ts +5 -0
- package/generated/typegraphql-prisma/resolvers/outputs/AssetAvgAggregate.d.ts.map +1 -0
- package/generated/typegraphql-prisma/resolvers/outputs/AssetAvgAggregate.js.map +1 -0
- package/generated/typegraphql-prisma/resolvers/outputs/AssetGroupBy.cjs +16 -2
- package/generated/typegraphql-prisma/resolvers/outputs/AssetGroupBy.d.ts +6 -2
- package/generated/typegraphql-prisma/resolvers/outputs/AssetGroupBy.d.ts.map +1 -1
- package/generated/typegraphql-prisma/resolvers/outputs/AssetGroupBy.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/outputs/AssetMaxAggregate.cjs +2 -2
- package/generated/typegraphql-prisma/resolvers/outputs/AssetMaxAggregate.d.ts +2 -2
- package/generated/typegraphql-prisma/resolvers/outputs/AssetMaxAggregate.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/outputs/AssetMinAggregate.cjs +2 -2
- package/generated/typegraphql-prisma/resolvers/outputs/AssetMinAggregate.d.ts +2 -2
- package/generated/typegraphql-prisma/resolvers/outputs/AssetMinAggregate.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/outputs/AssetSumAggregate.cjs +55 -0
- package/generated/typegraphql-prisma/resolvers/outputs/AssetSumAggregate.d.ts +5 -0
- package/generated/typegraphql-prisma/resolvers/outputs/AssetSumAggregate.d.ts.map +1 -0
- package/generated/typegraphql-prisma/resolvers/outputs/AssetSumAggregate.js.map +1 -0
- package/generated/typegraphql-prisma/resolvers/outputs/CreateManyAssetAndReturnOutputType.cjs +2 -2
- package/generated/typegraphql-prisma/resolvers/outputs/CreateManyAssetAndReturnOutputType.d.ts +2 -2
- package/generated/typegraphql-prisma/resolvers/outputs/CreateManyAssetAndReturnOutputType.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/outputs/index.cjs +7 -3
- package/generated/typegraphql-prisma/resolvers/outputs/index.d.ts +2 -0
- package/generated/typegraphql-prisma/resolvers/outputs/index.d.ts.map +1 -1
- package/generated/typegraphql-prisma/resolvers/outputs/index.js.map +1 -1
- package/package.json +1 -1
- package/server/Account.d.ts.map +1 -1
- package/server/Account.js.map +1 -1
- package/server/Account.mjs +435 -58
- package/server/Action.d.ts.map +1 -1
- package/server/Action.js.map +1 -1
- package/server/Action.mjs +966 -121
- package/server/Alert.d.ts.map +1 -1
- package/server/Alert.js.map +1 -1
- package/server/Alert.mjs +593 -89
- package/server/AlpacaAccount.d.ts.map +1 -1
- package/server/AlpacaAccount.js.map +1 -1
- package/server/AlpacaAccount.mjs +1161 -134
- package/server/Asset.d.ts.map +1 -1
- package/server/Asset.js.map +1 -1
- package/server/Asset.mjs +1029 -137
- package/server/Authenticator.d.ts.map +1 -1
- package/server/Authenticator.js.map +1 -1
- package/server/Authenticator.mjs +438 -54
- package/server/Customer.d.ts.map +1 -1
- package/server/Customer.js.map +1 -1
- package/server/Customer.mjs +435 -64
- package/server/EconomicEvent.d.ts.map +1 -1
- package/server/EconomicEvent.js.map +1 -1
- package/server/EconomicEvent.mjs +9 -3
- package/server/NewsArticle.d.ts.map +1 -1
- package/server/NewsArticle.js.map +1 -1
- package/server/NewsArticle.mjs +255 -30
- package/server/NewsArticleAssetSentiment.d.ts.map +1 -1
- package/server/NewsArticleAssetSentiment.js.map +1 -1
- package/server/NewsArticleAssetSentiment.mjs +427 -65
- package/server/Order.d.ts.map +1 -1
- package/server/Order.js.map +1 -1
- package/server/Order.mjs +867 -129
- package/server/Position.d.ts.map +1 -1
- package/server/Position.js.map +1 -1
- package/server/Position.mjs +945 -141
- package/server/Session.d.ts.map +1 -1
- package/server/Session.js.map +1 -1
- package/server/Session.mjs +438 -54
- package/server/StopLoss.d.ts.map +1 -1
- package/server/StopLoss.js.map +1 -1
- package/server/StopLoss.mjs +552 -69
- package/server/TakeProfit.d.ts.map +1 -1
- package/server/TakeProfit.js.map +1 -1
- package/server/TakeProfit.mjs +552 -69
- package/server/Trade.d.ts.map +1 -1
- package/server/Trade.js.map +1 -1
- package/server/Trade.mjs +1042 -153
- package/server/User.d.ts.map +1 -1
- package/server/User.js.map +1 -1
- package/server/User.mjs +480 -73
- package/server/VerificationToken.d.ts.map +1 -1
- package/server/VerificationToken.js.map +1 -1
- package/server/VerificationToken.mjs +9 -3
- package/server/generated/typegraphql-prisma/enhance.d.ts.map +1 -1
- package/server/generated/typegraphql-prisma/enhance.js.map +1 -1
- package/server/generated/typegraphql-prisma/enhance.mjs +11 -7
- package/server/generated/typegraphql-prisma/models/Asset.d.ts +2 -2
- package/server/generated/typegraphql-prisma/models/Asset.js.map +1 -1
- package/server/generated/typegraphql-prisma/models/Asset.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetAvgOrderByAggregateInput.d.ts +5 -0
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetAvgOrderByAggregateInput.d.ts.map +1 -0
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetAvgOrderByAggregateInput.js.map +1 -0
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetAvgOrderByAggregateInput.mjs +32 -0
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetCreateInput.d.ts +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetCreateInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetCreateInput.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetCreateManyInput.d.ts +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetCreateManyInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetCreateManyInput.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetCreateWithoutNewsMentionsInput.d.ts +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetCreateWithoutNewsMentionsInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetCreateWithoutNewsMentionsInput.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetCreateWithoutOrdersInput.d.ts +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetCreateWithoutOrdersInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetCreateWithoutOrdersInput.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetCreateWithoutPositionsInput.d.ts +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetCreateWithoutPositionsInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetCreateWithoutPositionsInput.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetCreateWithoutTradesInput.d.ts +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetCreateWithoutTradesInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetCreateWithoutTradesInput.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetOrderByWithAggregationInput.d.ts +4 -0
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetOrderByWithAggregationInput.d.ts.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetOrderByWithAggregationInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetOrderByWithAggregationInput.mjs +16 -0
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetScalarWhereWithAggregatesInput.d.ts +3 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetScalarWhereWithAggregatesInput.d.ts.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetScalarWhereWithAggregatesInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetScalarWhereWithAggregatesInput.mjs +3 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetSumOrderByAggregateInput.d.ts +5 -0
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetSumOrderByAggregateInput.d.ts.map +1 -0
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetSumOrderByAggregateInput.js.map +1 -0
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetSumOrderByAggregateInput.mjs +32 -0
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateInput.d.ts +3 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateInput.d.ts.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateInput.mjs +3 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateManyMutationInput.d.ts +3 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateManyMutationInput.d.ts.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateManyMutationInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateManyMutationInput.mjs +3 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutNewsMentionsInput.d.ts +3 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutNewsMentionsInput.d.ts.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutNewsMentionsInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutNewsMentionsInput.mjs +3 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutOrdersInput.d.ts +3 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutOrdersInput.d.ts.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutOrdersInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutOrdersInput.mjs +3 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutPositionsInput.d.ts +3 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutPositionsInput.d.ts.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutPositionsInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutPositionsInput.mjs +3 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutTradesInput.d.ts +3 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutTradesInput.d.ts.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutTradesInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetUpdateWithoutTradesInput.mjs +3 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetWhereInput.d.ts +3 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetWhereInput.d.ts.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetWhereInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetWhereInput.mjs +3 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetWhereUniqueInput.d.ts +3 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetWhereUniqueInput.d.ts.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetWhereUniqueInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetWhereUniqueInput.mjs +3 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/index.d.ts +2 -0
- package/server/generated/typegraphql-prisma/resolvers/inputs/index.d.ts.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/index.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/index.mjs +2 -0
- package/server/generated/typegraphql-prisma/resolvers/outputs/AggregateAsset.d.ts +4 -0
- package/server/generated/typegraphql-prisma/resolvers/outputs/AggregateAsset.d.ts.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/outputs/AggregateAsset.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/outputs/AggregateAsset.mjs +16 -0
- package/server/generated/typegraphql-prisma/resolvers/outputs/AssetAvgAggregate.d.ts +5 -0
- package/server/generated/typegraphql-prisma/resolvers/outputs/AssetAvgAggregate.d.ts.map +1 -0
- package/server/generated/typegraphql-prisma/resolvers/outputs/AssetAvgAggregate.js.map +1 -0
- package/server/generated/typegraphql-prisma/resolvers/outputs/AssetAvgAggregate.mjs +31 -0
- package/server/generated/typegraphql-prisma/resolvers/outputs/AssetGroupBy.d.ts +6 -2
- package/server/generated/typegraphql-prisma/resolvers/outputs/AssetGroupBy.d.ts.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/outputs/AssetGroupBy.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/outputs/AssetGroupBy.mjs +18 -2
- package/server/generated/typegraphql-prisma/resolvers/outputs/AssetMaxAggregate.d.ts +2 -2
- package/server/generated/typegraphql-prisma/resolvers/outputs/AssetMaxAggregate.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/outputs/AssetMaxAggregate.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/outputs/AssetMinAggregate.d.ts +2 -2
- package/server/generated/typegraphql-prisma/resolvers/outputs/AssetMinAggregate.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/outputs/AssetMinAggregate.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/outputs/AssetSumAggregate.d.ts +5 -0
- package/server/generated/typegraphql-prisma/resolvers/outputs/AssetSumAggregate.d.ts.map +1 -0
- package/server/generated/typegraphql-prisma/resolvers/outputs/AssetSumAggregate.js.map +1 -0
- package/server/generated/typegraphql-prisma/resolvers/outputs/AssetSumAggregate.mjs +31 -0
- package/server/generated/typegraphql-prisma/resolvers/outputs/CreateManyAssetAndReturnOutputType.d.ts +2 -2
- package/server/generated/typegraphql-prisma/resolvers/outputs/CreateManyAssetAndReturnOutputType.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/outputs/CreateManyAssetAndReturnOutputType.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/outputs/index.d.ts +2 -0
- package/server/generated/typegraphql-prisma/resolvers/outputs/index.d.ts.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/outputs/index.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/outputs/index.mjs +2 -0
package/server/Asset.mjs
CHANGED
@@ -304,7 +304,15 @@ export const Asset = {
|
|
304
304
|
}
|
305
305
|
: { connectOrCreate: props.trades.map((item) => ({
|
306
306
|
where: {
|
307
|
-
id: item.id !== undefined ?
|
307
|
+
id: item.id !== undefined ? {
|
308
|
+
equals: item.id
|
309
|
+
} : undefined,
|
310
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
311
|
+
equals: item.alpacaAccountId
|
312
|
+
} : undefined,
|
313
|
+
assetId: item.assetId !== undefined ? {
|
314
|
+
equals: item.assetId
|
315
|
+
} : undefined,
|
308
316
|
},
|
309
317
|
create: {
|
310
318
|
qty: item.qty !== undefined ? item.qty : undefined,
|
@@ -326,7 +334,12 @@ export const Asset = {
|
|
326
334
|
}
|
327
335
|
: { connectOrCreate: {
|
328
336
|
where: {
|
329
|
-
id: item.alpacaAccount.id !== undefined ?
|
337
|
+
id: item.alpacaAccount.id !== undefined ? {
|
338
|
+
equals: item.alpacaAccount.id
|
339
|
+
} : undefined,
|
340
|
+
userId: item.alpacaAccount.userId !== undefined ? {
|
341
|
+
equals: item.alpacaAccount.userId
|
342
|
+
} : undefined,
|
330
343
|
},
|
331
344
|
create: {
|
332
345
|
type: item.alpacaAccount.type !== undefined ? item.alpacaAccount.type : undefined,
|
@@ -346,7 +359,9 @@ export const Asset = {
|
|
346
359
|
}
|
347
360
|
: { connectOrCreate: {
|
348
361
|
where: {
|
349
|
-
id: item.alpacaAccount.user.id !== undefined ?
|
362
|
+
id: item.alpacaAccount.user.id !== undefined ? {
|
363
|
+
equals: item.alpacaAccount.user.id
|
364
|
+
} : undefined,
|
350
365
|
email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
|
351
366
|
name: item.alpacaAccount.user.name !== undefined ? {
|
352
367
|
equals: item.alpacaAccount.user.name
|
@@ -375,7 +390,18 @@ export const Asset = {
|
|
375
390
|
}
|
376
391
|
: { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
|
377
392
|
where: {
|
378
|
-
id: item.id !== undefined ?
|
393
|
+
id: item.id !== undefined ? {
|
394
|
+
equals: item.id
|
395
|
+
} : undefined,
|
396
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
397
|
+
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
398
|
+
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
399
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
400
|
+
equals: item.alpacaAccountId
|
401
|
+
} : undefined,
|
402
|
+
assetId: item.assetId !== undefined ? {
|
403
|
+
equals: item.assetId
|
404
|
+
} : undefined,
|
379
405
|
},
|
380
406
|
create: {
|
381
407
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
@@ -411,7 +437,15 @@ export const Asset = {
|
|
411
437
|
}
|
412
438
|
: { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
|
413
439
|
where: {
|
414
|
-
id: item.id !== undefined ?
|
440
|
+
id: item.id !== undefined ? {
|
441
|
+
equals: item.id
|
442
|
+
} : undefined,
|
443
|
+
assetId: item.assetId !== undefined ? {
|
444
|
+
equals: item.assetId
|
445
|
+
} : undefined,
|
446
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
447
|
+
equals: item.alpacaAccountId
|
448
|
+
} : undefined,
|
415
449
|
},
|
416
450
|
create: {
|
417
451
|
averageEntryPrice: item.averageEntryPrice !== undefined ? item.averageEntryPrice : undefined,
|
@@ -438,7 +472,12 @@ export const Asset = {
|
|
438
472
|
}
|
439
473
|
: { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
|
440
474
|
where: {
|
441
|
-
id: item.id !== undefined ?
|
475
|
+
id: item.id !== undefined ? {
|
476
|
+
equals: item.id
|
477
|
+
} : undefined,
|
478
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
479
|
+
equals: item.alpacaAccountId
|
480
|
+
} : undefined,
|
442
481
|
},
|
443
482
|
create: {
|
444
483
|
message: item.message !== undefined ? item.message : undefined,
|
@@ -458,7 +497,12 @@ export const Asset = {
|
|
458
497
|
}
|
459
498
|
: { connectOrCreate: item.actions.map((item) => ({
|
460
499
|
where: {
|
461
|
-
id: item.id !== undefined ?
|
500
|
+
id: item.id !== undefined ? {
|
501
|
+
equals: item.id
|
502
|
+
} : undefined,
|
503
|
+
tradeId: item.tradeId !== undefined ? {
|
504
|
+
equals: item.tradeId
|
505
|
+
} : undefined,
|
462
506
|
},
|
463
507
|
create: {
|
464
508
|
sequence: item.sequence !== undefined ? item.sequence : undefined,
|
@@ -474,7 +518,18 @@ export const Asset = {
|
|
474
518
|
}
|
475
519
|
: { connectOrCreate: {
|
476
520
|
where: {
|
477
|
-
id: item.order.id !== undefined ?
|
521
|
+
id: item.order.id !== undefined ? {
|
522
|
+
equals: item.order.id
|
523
|
+
} : undefined,
|
524
|
+
clientOrderId: item.order.clientOrderId !== undefined ? item.order.clientOrderId : undefined,
|
525
|
+
actionId: item.order.actionId !== undefined ? item.order.actionId : undefined,
|
526
|
+
stopLossId: item.order.stopLossId !== undefined ? item.order.stopLossId : undefined,
|
527
|
+
alpacaAccountId: item.order.alpacaAccountId !== undefined ? {
|
528
|
+
equals: item.order.alpacaAccountId
|
529
|
+
} : undefined,
|
530
|
+
assetId: item.order.assetId !== undefined ? {
|
531
|
+
equals: item.order.assetId
|
532
|
+
} : undefined,
|
478
533
|
},
|
479
534
|
create: {
|
480
535
|
clientOrderId: item.order.clientOrderId !== undefined ? item.order.clientOrderId : undefined,
|
@@ -516,7 +571,18 @@ export const Asset = {
|
|
516
571
|
}
|
517
572
|
: { connectOrCreate: props.orders.map((item) => ({
|
518
573
|
where: {
|
519
|
-
id: item.id !== undefined ?
|
574
|
+
id: item.id !== undefined ? {
|
575
|
+
equals: item.id
|
576
|
+
} : undefined,
|
577
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
578
|
+
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
579
|
+
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
580
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
581
|
+
equals: item.alpacaAccountId
|
582
|
+
} : undefined,
|
583
|
+
assetId: item.assetId !== undefined ? {
|
584
|
+
equals: item.assetId
|
585
|
+
} : undefined,
|
520
586
|
},
|
521
587
|
create: {
|
522
588
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
@@ -549,7 +615,10 @@ export const Asset = {
|
|
549
615
|
}
|
550
616
|
: { connectOrCreate: {
|
551
617
|
where: {
|
552
|
-
id: item.stopLoss.id !== undefined ?
|
618
|
+
id: item.stopLoss.id !== undefined ? {
|
619
|
+
equals: item.stopLoss.id
|
620
|
+
} : undefined,
|
621
|
+
orderId: item.stopLoss.orderId !== undefined ? item.stopLoss.orderId : undefined,
|
553
622
|
},
|
554
623
|
create: {
|
555
624
|
stopPrice: item.stopLoss.stopPrice !== undefined ? item.stopLoss.stopPrice : undefined,
|
@@ -565,7 +634,10 @@ export const Asset = {
|
|
565
634
|
}
|
566
635
|
: { connectOrCreate: {
|
567
636
|
where: {
|
568
|
-
id: item.takeProfit.id !== undefined ?
|
637
|
+
id: item.takeProfit.id !== undefined ? {
|
638
|
+
equals: item.takeProfit.id
|
639
|
+
} : undefined,
|
640
|
+
orderId: item.takeProfit.orderId !== undefined ? item.takeProfit.orderId : undefined,
|
569
641
|
},
|
570
642
|
create: {
|
571
643
|
limitPrice: item.takeProfit.limitPrice !== undefined ? item.takeProfit.limitPrice : undefined,
|
@@ -581,7 +653,12 @@ export const Asset = {
|
|
581
653
|
}
|
582
654
|
: { connectOrCreate: {
|
583
655
|
where: {
|
584
|
-
id: item.alpacaAccount.id !== undefined ?
|
656
|
+
id: item.alpacaAccount.id !== undefined ? {
|
657
|
+
equals: item.alpacaAccount.id
|
658
|
+
} : undefined,
|
659
|
+
userId: item.alpacaAccount.userId !== undefined ? {
|
660
|
+
equals: item.alpacaAccount.userId
|
661
|
+
} : undefined,
|
585
662
|
},
|
586
663
|
create: {
|
587
664
|
type: item.alpacaAccount.type !== undefined ? item.alpacaAccount.type : undefined,
|
@@ -601,7 +678,9 @@ export const Asset = {
|
|
601
678
|
}
|
602
679
|
: { connectOrCreate: {
|
603
680
|
where: {
|
604
|
-
id: item.alpacaAccount.user.id !== undefined ?
|
681
|
+
id: item.alpacaAccount.user.id !== undefined ? {
|
682
|
+
equals: item.alpacaAccount.user.id
|
683
|
+
} : undefined,
|
605
684
|
email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
|
606
685
|
name: item.alpacaAccount.user.name !== undefined ? {
|
607
686
|
equals: item.alpacaAccount.user.name
|
@@ -630,7 +709,15 @@ export const Asset = {
|
|
630
709
|
}
|
631
710
|
: { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
|
632
711
|
where: {
|
633
|
-
id: item.id !== undefined ?
|
712
|
+
id: item.id !== undefined ? {
|
713
|
+
equals: item.id
|
714
|
+
} : undefined,
|
715
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
716
|
+
equals: item.alpacaAccountId
|
717
|
+
} : undefined,
|
718
|
+
assetId: item.assetId !== undefined ? {
|
719
|
+
equals: item.assetId
|
720
|
+
} : undefined,
|
634
721
|
},
|
635
722
|
create: {
|
636
723
|
qty: item.qty !== undefined ? item.qty : undefined,
|
@@ -655,7 +742,15 @@ export const Asset = {
|
|
655
742
|
}
|
656
743
|
: { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
|
657
744
|
where: {
|
658
|
-
id: item.id !== undefined ?
|
745
|
+
id: item.id !== undefined ? {
|
746
|
+
equals: item.id
|
747
|
+
} : undefined,
|
748
|
+
assetId: item.assetId !== undefined ? {
|
749
|
+
equals: item.assetId
|
750
|
+
} : undefined,
|
751
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
752
|
+
equals: item.alpacaAccountId
|
753
|
+
} : undefined,
|
659
754
|
},
|
660
755
|
create: {
|
661
756
|
averageEntryPrice: item.averageEntryPrice !== undefined ? item.averageEntryPrice : undefined,
|
@@ -682,7 +777,12 @@ export const Asset = {
|
|
682
777
|
}
|
683
778
|
: { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
|
684
779
|
where: {
|
685
|
-
id: item.id !== undefined ?
|
780
|
+
id: item.id !== undefined ? {
|
781
|
+
equals: item.id
|
782
|
+
} : undefined,
|
783
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
784
|
+
equals: item.alpacaAccountId
|
785
|
+
} : undefined,
|
686
786
|
},
|
687
787
|
create: {
|
688
788
|
message: item.message !== undefined ? item.message : undefined,
|
@@ -702,7 +802,12 @@ export const Asset = {
|
|
702
802
|
}
|
703
803
|
: { connectOrCreate: {
|
704
804
|
where: {
|
705
|
-
id: item.action.id !== undefined ?
|
805
|
+
id: item.action.id !== undefined ? {
|
806
|
+
equals: item.action.id
|
807
|
+
} : undefined,
|
808
|
+
tradeId: item.action.tradeId !== undefined ? {
|
809
|
+
equals: item.action.tradeId
|
810
|
+
} : undefined,
|
706
811
|
},
|
707
812
|
create: {
|
708
813
|
sequence: item.action.sequence !== undefined ? item.action.sequence : undefined,
|
@@ -718,7 +823,15 @@ export const Asset = {
|
|
718
823
|
}
|
719
824
|
: { connectOrCreate: {
|
720
825
|
where: {
|
721
|
-
id: item.action.trade.id !== undefined ?
|
826
|
+
id: item.action.trade.id !== undefined ? {
|
827
|
+
equals: item.action.trade.id
|
828
|
+
} : undefined,
|
829
|
+
alpacaAccountId: item.action.trade.alpacaAccountId !== undefined ? {
|
830
|
+
equals: item.action.trade.alpacaAccountId
|
831
|
+
} : undefined,
|
832
|
+
assetId: item.action.trade.assetId !== undefined ? {
|
833
|
+
equals: item.action.trade.assetId
|
834
|
+
} : undefined,
|
722
835
|
},
|
723
836
|
create: {
|
724
837
|
qty: item.action.trade.qty !== undefined ? item.action.trade.qty : undefined,
|
@@ -749,7 +862,15 @@ export const Asset = {
|
|
749
862
|
}
|
750
863
|
: { connectOrCreate: props.positions.map((item) => ({
|
751
864
|
where: {
|
752
|
-
id: item.id !== undefined ?
|
865
|
+
id: item.id !== undefined ? {
|
866
|
+
equals: item.id
|
867
|
+
} : undefined,
|
868
|
+
assetId: item.assetId !== undefined ? {
|
869
|
+
equals: item.assetId
|
870
|
+
} : undefined,
|
871
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
872
|
+
equals: item.alpacaAccountId
|
873
|
+
} : undefined,
|
753
874
|
},
|
754
875
|
create: {
|
755
876
|
averageEntryPrice: item.averageEntryPrice !== undefined ? item.averageEntryPrice : undefined,
|
@@ -773,7 +894,12 @@ export const Asset = {
|
|
773
894
|
}
|
774
895
|
: { connectOrCreate: {
|
775
896
|
where: {
|
776
|
-
id: item.alpacaAccount.id !== undefined ?
|
897
|
+
id: item.alpacaAccount.id !== undefined ? {
|
898
|
+
equals: item.alpacaAccount.id
|
899
|
+
} : undefined,
|
900
|
+
userId: item.alpacaAccount.userId !== undefined ? {
|
901
|
+
equals: item.alpacaAccount.userId
|
902
|
+
} : undefined,
|
777
903
|
},
|
778
904
|
create: {
|
779
905
|
type: item.alpacaAccount.type !== undefined ? item.alpacaAccount.type : undefined,
|
@@ -793,7 +919,9 @@ export const Asset = {
|
|
793
919
|
}
|
794
920
|
: { connectOrCreate: {
|
795
921
|
where: {
|
796
|
-
id: item.alpacaAccount.user.id !== undefined ?
|
922
|
+
id: item.alpacaAccount.user.id !== undefined ? {
|
923
|
+
equals: item.alpacaAccount.user.id
|
924
|
+
} : undefined,
|
797
925
|
email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
|
798
926
|
name: item.alpacaAccount.user.name !== undefined ? {
|
799
927
|
equals: item.alpacaAccount.user.name
|
@@ -822,7 +950,15 @@ export const Asset = {
|
|
822
950
|
}
|
823
951
|
: { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
|
824
952
|
where: {
|
825
|
-
id: item.id !== undefined ?
|
953
|
+
id: item.id !== undefined ? {
|
954
|
+
equals: item.id
|
955
|
+
} : undefined,
|
956
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
957
|
+
equals: item.alpacaAccountId
|
958
|
+
} : undefined,
|
959
|
+
assetId: item.assetId !== undefined ? {
|
960
|
+
equals: item.assetId
|
961
|
+
} : undefined,
|
826
962
|
},
|
827
963
|
create: {
|
828
964
|
qty: item.qty !== undefined ? item.qty : undefined,
|
@@ -847,7 +983,18 @@ export const Asset = {
|
|
847
983
|
}
|
848
984
|
: { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
|
849
985
|
where: {
|
850
|
-
id: item.id !== undefined ?
|
986
|
+
id: item.id !== undefined ? {
|
987
|
+
equals: item.id
|
988
|
+
} : undefined,
|
989
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
990
|
+
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
991
|
+
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
992
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
993
|
+
equals: item.alpacaAccountId
|
994
|
+
} : undefined,
|
995
|
+
assetId: item.assetId !== undefined ? {
|
996
|
+
equals: item.assetId
|
997
|
+
} : undefined,
|
851
998
|
},
|
852
999
|
create: {
|
853
1000
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
@@ -883,7 +1030,12 @@ export const Asset = {
|
|
883
1030
|
}
|
884
1031
|
: { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
|
885
1032
|
where: {
|
886
|
-
id: item.id !== undefined ?
|
1033
|
+
id: item.id !== undefined ? {
|
1034
|
+
equals: item.id
|
1035
|
+
} : undefined,
|
1036
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
1037
|
+
equals: item.alpacaAccountId
|
1038
|
+
} : undefined,
|
887
1039
|
},
|
888
1040
|
create: {
|
889
1041
|
message: item.message !== undefined ? item.message : undefined,
|
@@ -906,8 +1058,16 @@ export const Asset = {
|
|
906
1058
|
}
|
907
1059
|
: { connectOrCreate: props.newsMentions.map((item) => ({
|
908
1060
|
where: {
|
909
|
-
id: item.id !== undefined ?
|
1061
|
+
id: item.id !== undefined ? {
|
1062
|
+
equals: item.id
|
1063
|
+
} : undefined,
|
910
1064
|
url: item.url !== undefined ? item.url : undefined,
|
1065
|
+
assetId: item.assetId !== undefined ? {
|
1066
|
+
equals: item.assetId
|
1067
|
+
} : undefined,
|
1068
|
+
newsArticleId: item.newsArticleId !== undefined ? {
|
1069
|
+
equals: item.newsArticleId
|
1070
|
+
} : undefined,
|
911
1071
|
},
|
912
1072
|
create: {
|
913
1073
|
url: item.url !== undefined ? item.url : undefined,
|
@@ -922,7 +1082,9 @@ export const Asset = {
|
|
922
1082
|
}
|
923
1083
|
: { connectOrCreate: {
|
924
1084
|
where: {
|
925
|
-
id: item.news.id !== undefined ?
|
1085
|
+
id: item.news.id !== undefined ? {
|
1086
|
+
equals: item.news.id
|
1087
|
+
} : undefined,
|
926
1088
|
url: item.news.url !== undefined ? item.news.url : undefined,
|
927
1089
|
title: item.news.title !== undefined ? {
|
928
1090
|
equals: item.news.title
|
@@ -1071,7 +1233,9 @@ export const Asset = {
|
|
1071
1233
|
}`;
|
1072
1234
|
const variables = {
|
1073
1235
|
where: {
|
1074
|
-
id: props.id !== undefined ?
|
1236
|
+
id: props.id !== undefined ? {
|
1237
|
+
equals: props.id
|
1238
|
+
} : undefined,
|
1075
1239
|
symbol: props.symbol !== undefined ? props.symbol : undefined,
|
1076
1240
|
name: props.name !== undefined ? props.name : undefined,
|
1077
1241
|
type: props.type !== undefined ? props.type : undefined,
|
@@ -1125,8 +1289,6 @@ export const Asset = {
|
|
1125
1289
|
sharesOutstanding: props.sharesOutstanding !== undefined ? props.sharesOutstanding : undefined,
|
1126
1290
|
dividendDate: props.dividendDate !== undefined ? props.dividendDate : undefined,
|
1127
1291
|
exDividendDate: props.exDividendDate !== undefined ? props.exDividendDate : undefined,
|
1128
|
-
askPrice: props.askPrice !== undefined ? props.askPrice : undefined,
|
1129
|
-
bidPrice: props.bidPrice !== undefined ? props.bidPrice : undefined,
|
1130
1292
|
createdAt: props.createdAt !== undefined ? props.createdAt : undefined,
|
1131
1293
|
updatedAt: props.updatedAt !== undefined ? props.updatedAt : undefined,
|
1132
1294
|
},
|
@@ -1308,7 +1470,15 @@ export const Asset = {
|
|
1308
1470
|
trades: props.trades ? {
|
1309
1471
|
upsert: props.trades.map((item) => ({
|
1310
1472
|
where: {
|
1311
|
-
id: item.id !== undefined ?
|
1473
|
+
id: item.id !== undefined ? {
|
1474
|
+
equals: item.id
|
1475
|
+
} : undefined,
|
1476
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
1477
|
+
equals: item.alpacaAccountId
|
1478
|
+
} : undefined,
|
1479
|
+
assetId: item.assetId !== undefined ? {
|
1480
|
+
equals: item.assetId
|
1481
|
+
} : undefined,
|
1312
1482
|
},
|
1313
1483
|
update: {
|
1314
1484
|
id: item.id !== undefined ? {
|
@@ -1353,6 +1523,9 @@ export const Asset = {
|
|
1353
1523
|
id: item.alpacaAccount.id !== undefined ? {
|
1354
1524
|
equals: item.alpacaAccount.id
|
1355
1525
|
} : undefined,
|
1526
|
+
userId: item.alpacaAccount.userId !== undefined ? {
|
1527
|
+
equals: item.alpacaAccount.userId
|
1528
|
+
} : undefined,
|
1356
1529
|
},
|
1357
1530
|
update: {
|
1358
1531
|
id: item.alpacaAccount.id !== undefined ? {
|
@@ -1454,7 +1627,18 @@ export const Asset = {
|
|
1454
1627
|
orders: item.alpacaAccount.orders ? {
|
1455
1628
|
upsert: item.alpacaAccount.orders.map((item) => ({
|
1456
1629
|
where: {
|
1457
|
-
id: item.id !== undefined ?
|
1630
|
+
id: item.id !== undefined ? {
|
1631
|
+
equals: item.id
|
1632
|
+
} : undefined,
|
1633
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
1634
|
+
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
1635
|
+
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
1636
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
1637
|
+
equals: item.alpacaAccountId
|
1638
|
+
} : undefined,
|
1639
|
+
assetId: item.assetId !== undefined ? {
|
1640
|
+
equals: item.assetId
|
1641
|
+
} : undefined,
|
1458
1642
|
},
|
1459
1643
|
update: {
|
1460
1644
|
id: item.id !== undefined ? {
|
@@ -1556,7 +1740,15 @@ export const Asset = {
|
|
1556
1740
|
positions: item.alpacaAccount.positions ? {
|
1557
1741
|
upsert: item.alpacaAccount.positions.map((item) => ({
|
1558
1742
|
where: {
|
1559
|
-
id: item.id !== undefined ?
|
1743
|
+
id: item.id !== undefined ? {
|
1744
|
+
equals: item.id
|
1745
|
+
} : undefined,
|
1746
|
+
assetId: item.assetId !== undefined ? {
|
1747
|
+
equals: item.assetId
|
1748
|
+
} : undefined,
|
1749
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
1750
|
+
equals: item.alpacaAccountId
|
1751
|
+
} : undefined,
|
1560
1752
|
},
|
1561
1753
|
update: {
|
1562
1754
|
id: item.id !== undefined ? {
|
@@ -1622,7 +1814,12 @@ export const Asset = {
|
|
1622
1814
|
alerts: item.alpacaAccount.alerts ? {
|
1623
1815
|
upsert: item.alpacaAccount.alerts.map((item) => ({
|
1624
1816
|
where: {
|
1625
|
-
id: item.id !== undefined ?
|
1817
|
+
id: item.id !== undefined ? {
|
1818
|
+
equals: item.id
|
1819
|
+
} : undefined,
|
1820
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
1821
|
+
equals: item.alpacaAccountId
|
1822
|
+
} : undefined,
|
1626
1823
|
},
|
1627
1824
|
update: {
|
1628
1825
|
id: item.id !== undefined ? {
|
@@ -1664,7 +1861,9 @@ export const Asset = {
|
|
1664
1861
|
}
|
1665
1862
|
: { connectOrCreate: {
|
1666
1863
|
where: {
|
1667
|
-
id: item.alpacaAccount.user.id !== undefined ?
|
1864
|
+
id: item.alpacaAccount.user.id !== undefined ? {
|
1865
|
+
equals: item.alpacaAccount.user.id
|
1866
|
+
} : undefined,
|
1668
1867
|
email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
|
1669
1868
|
name: item.alpacaAccount.user.name !== undefined ? {
|
1670
1869
|
equals: item.alpacaAccount.user.name
|
@@ -1693,7 +1892,18 @@ export const Asset = {
|
|
1693
1892
|
}
|
1694
1893
|
: { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
|
1695
1894
|
where: {
|
1696
|
-
id: item.id !== undefined ?
|
1895
|
+
id: item.id !== undefined ? {
|
1896
|
+
equals: item.id
|
1897
|
+
} : undefined,
|
1898
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
1899
|
+
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
1900
|
+
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
1901
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
1902
|
+
equals: item.alpacaAccountId
|
1903
|
+
} : undefined,
|
1904
|
+
assetId: item.assetId !== undefined ? {
|
1905
|
+
equals: item.assetId
|
1906
|
+
} : undefined,
|
1697
1907
|
},
|
1698
1908
|
create: {
|
1699
1909
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
@@ -1729,7 +1939,15 @@ export const Asset = {
|
|
1729
1939
|
}
|
1730
1940
|
: { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
|
1731
1941
|
where: {
|
1732
|
-
id: item.id !== undefined ?
|
1942
|
+
id: item.id !== undefined ? {
|
1943
|
+
equals: item.id
|
1944
|
+
} : undefined,
|
1945
|
+
assetId: item.assetId !== undefined ? {
|
1946
|
+
equals: item.assetId
|
1947
|
+
} : undefined,
|
1948
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
1949
|
+
equals: item.alpacaAccountId
|
1950
|
+
} : undefined,
|
1733
1951
|
},
|
1734
1952
|
create: {
|
1735
1953
|
averageEntryPrice: item.averageEntryPrice !== undefined ? item.averageEntryPrice : undefined,
|
@@ -1756,7 +1974,12 @@ export const Asset = {
|
|
1756
1974
|
}
|
1757
1975
|
: { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
|
1758
1976
|
where: {
|
1759
|
-
id: item.id !== undefined ?
|
1977
|
+
id: item.id !== undefined ? {
|
1978
|
+
equals: item.id
|
1979
|
+
} : undefined,
|
1980
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
1981
|
+
equals: item.alpacaAccountId
|
1982
|
+
} : undefined,
|
1760
1983
|
},
|
1761
1984
|
create: {
|
1762
1985
|
message: item.message !== undefined ? item.message : undefined,
|
@@ -1771,7 +1994,12 @@ export const Asset = {
|
|
1771
1994
|
actions: item.actions ? {
|
1772
1995
|
upsert: item.actions.map((item) => ({
|
1773
1996
|
where: {
|
1774
|
-
id: item.id !== undefined ?
|
1997
|
+
id: item.id !== undefined ? {
|
1998
|
+
equals: item.id
|
1999
|
+
} : undefined,
|
2000
|
+
tradeId: item.tradeId !== undefined ? {
|
2001
|
+
equals: item.tradeId
|
2002
|
+
} : undefined,
|
1775
2003
|
},
|
1776
2004
|
update: {
|
1777
2005
|
id: item.id !== undefined ? {
|
@@ -1798,6 +2026,18 @@ export const Asset = {
|
|
1798
2026
|
id: item.order.id !== undefined ? {
|
1799
2027
|
equals: item.order.id
|
1800
2028
|
} : undefined,
|
2029
|
+
clientOrderId: item.order.clientOrderId !== undefined ? {
|
2030
|
+
equals: item.order.clientOrderId
|
2031
|
+
} : undefined,
|
2032
|
+
alpacaAccountId: item.order.alpacaAccountId !== undefined ? {
|
2033
|
+
equals: item.order.alpacaAccountId
|
2034
|
+
} : undefined,
|
2035
|
+
assetId: item.order.assetId !== undefined ? {
|
2036
|
+
equals: item.order.assetId
|
2037
|
+
} : undefined,
|
2038
|
+
actionId: item.order.actionId !== undefined ? {
|
2039
|
+
equals: item.order.actionId
|
2040
|
+
} : undefined,
|
1801
2041
|
},
|
1802
2042
|
update: {
|
1803
2043
|
id: item.order.id !== undefined ? {
|
@@ -1911,7 +2151,18 @@ export const Asset = {
|
|
1911
2151
|
}
|
1912
2152
|
: { connectOrCreate: {
|
1913
2153
|
where: {
|
1914
|
-
id: item.order.id !== undefined ?
|
2154
|
+
id: item.order.id !== undefined ? {
|
2155
|
+
equals: item.order.id
|
2156
|
+
} : undefined,
|
2157
|
+
clientOrderId: item.order.clientOrderId !== undefined ? item.order.clientOrderId : undefined,
|
2158
|
+
actionId: item.order.actionId !== undefined ? item.order.actionId : undefined,
|
2159
|
+
stopLossId: item.order.stopLossId !== undefined ? item.order.stopLossId : undefined,
|
2160
|
+
alpacaAccountId: item.order.alpacaAccountId !== undefined ? {
|
2161
|
+
equals: item.order.alpacaAccountId
|
2162
|
+
} : undefined,
|
2163
|
+
assetId: item.order.assetId !== undefined ? {
|
2164
|
+
equals: item.order.assetId
|
2165
|
+
} : undefined,
|
1915
2166
|
},
|
1916
2167
|
create: {
|
1917
2168
|
clientOrderId: item.order.clientOrderId !== undefined ? item.order.clientOrderId : undefined,
|
@@ -1963,7 +2214,12 @@ export const Asset = {
|
|
1963
2214
|
}
|
1964
2215
|
: { connectOrCreate: {
|
1965
2216
|
where: {
|
1966
|
-
id: item.alpacaAccount.id !== undefined ?
|
2217
|
+
id: item.alpacaAccount.id !== undefined ? {
|
2218
|
+
equals: item.alpacaAccount.id
|
2219
|
+
} : undefined,
|
2220
|
+
userId: item.alpacaAccount.userId !== undefined ? {
|
2221
|
+
equals: item.alpacaAccount.userId
|
2222
|
+
} : undefined,
|
1967
2223
|
},
|
1968
2224
|
create: {
|
1969
2225
|
type: item.alpacaAccount.type !== undefined ? item.alpacaAccount.type : undefined,
|
@@ -1983,7 +2239,9 @@ export const Asset = {
|
|
1983
2239
|
}
|
1984
2240
|
: { connectOrCreate: {
|
1985
2241
|
where: {
|
1986
|
-
id: item.alpacaAccount.user.id !== undefined ?
|
2242
|
+
id: item.alpacaAccount.user.id !== undefined ? {
|
2243
|
+
equals: item.alpacaAccount.user.id
|
2244
|
+
} : undefined,
|
1987
2245
|
email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
|
1988
2246
|
name: item.alpacaAccount.user.name !== undefined ? {
|
1989
2247
|
equals: item.alpacaAccount.user.name
|
@@ -2012,7 +2270,18 @@ export const Asset = {
|
|
2012
2270
|
}
|
2013
2271
|
: { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
|
2014
2272
|
where: {
|
2015
|
-
id: item.id !== undefined ?
|
2273
|
+
id: item.id !== undefined ? {
|
2274
|
+
equals: item.id
|
2275
|
+
} : undefined,
|
2276
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
2277
|
+
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
2278
|
+
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
2279
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
2280
|
+
equals: item.alpacaAccountId
|
2281
|
+
} : undefined,
|
2282
|
+
assetId: item.assetId !== undefined ? {
|
2283
|
+
equals: item.assetId
|
2284
|
+
} : undefined,
|
2016
2285
|
},
|
2017
2286
|
create: {
|
2018
2287
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
@@ -2048,7 +2317,15 @@ export const Asset = {
|
|
2048
2317
|
}
|
2049
2318
|
: { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
|
2050
2319
|
where: {
|
2051
|
-
id: item.id !== undefined ?
|
2320
|
+
id: item.id !== undefined ? {
|
2321
|
+
equals: item.id
|
2322
|
+
} : undefined,
|
2323
|
+
assetId: item.assetId !== undefined ? {
|
2324
|
+
equals: item.assetId
|
2325
|
+
} : undefined,
|
2326
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
2327
|
+
equals: item.alpacaAccountId
|
2328
|
+
} : undefined,
|
2052
2329
|
},
|
2053
2330
|
create: {
|
2054
2331
|
averageEntryPrice: item.averageEntryPrice !== undefined ? item.averageEntryPrice : undefined,
|
@@ -2075,7 +2352,12 @@ export const Asset = {
|
|
2075
2352
|
}
|
2076
2353
|
: { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
|
2077
2354
|
where: {
|
2078
|
-
id: item.id !== undefined ?
|
2355
|
+
id: item.id !== undefined ? {
|
2356
|
+
equals: item.id
|
2357
|
+
} : undefined,
|
2358
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
2359
|
+
equals: item.alpacaAccountId
|
2360
|
+
} : undefined,
|
2079
2361
|
},
|
2080
2362
|
create: {
|
2081
2363
|
message: item.message !== undefined ? item.message : undefined,
|
@@ -2095,7 +2377,12 @@ export const Asset = {
|
|
2095
2377
|
}
|
2096
2378
|
: { connectOrCreate: item.actions.map((item) => ({
|
2097
2379
|
where: {
|
2098
|
-
id: item.id !== undefined ?
|
2380
|
+
id: item.id !== undefined ? {
|
2381
|
+
equals: item.id
|
2382
|
+
} : undefined,
|
2383
|
+
tradeId: item.tradeId !== undefined ? {
|
2384
|
+
equals: item.tradeId
|
2385
|
+
} : undefined,
|
2099
2386
|
},
|
2100
2387
|
create: {
|
2101
2388
|
sequence: item.sequence !== undefined ? item.sequence : undefined,
|
@@ -2111,7 +2398,18 @@ export const Asset = {
|
|
2111
2398
|
}
|
2112
2399
|
: { connectOrCreate: {
|
2113
2400
|
where: {
|
2114
|
-
id: item.order.id !== undefined ?
|
2401
|
+
id: item.order.id !== undefined ? {
|
2402
|
+
equals: item.order.id
|
2403
|
+
} : undefined,
|
2404
|
+
clientOrderId: item.order.clientOrderId !== undefined ? item.order.clientOrderId : undefined,
|
2405
|
+
actionId: item.order.actionId !== undefined ? item.order.actionId : undefined,
|
2406
|
+
stopLossId: item.order.stopLossId !== undefined ? item.order.stopLossId : undefined,
|
2407
|
+
alpacaAccountId: item.order.alpacaAccountId !== undefined ? {
|
2408
|
+
equals: item.order.alpacaAccountId
|
2409
|
+
} : undefined,
|
2410
|
+
assetId: item.order.assetId !== undefined ? {
|
2411
|
+
equals: item.order.assetId
|
2412
|
+
} : undefined,
|
2115
2413
|
},
|
2116
2414
|
create: {
|
2117
2415
|
clientOrderId: item.order.clientOrderId !== undefined ? item.order.clientOrderId : undefined,
|
@@ -2148,7 +2446,18 @@ export const Asset = {
|
|
2148
2446
|
orders: props.orders ? {
|
2149
2447
|
upsert: props.orders.map((item) => ({
|
2150
2448
|
where: {
|
2151
|
-
id: item.id !== undefined ?
|
2449
|
+
id: item.id !== undefined ? {
|
2450
|
+
equals: item.id
|
2451
|
+
} : undefined,
|
2452
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
2453
|
+
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
2454
|
+
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
2455
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
2456
|
+
equals: item.alpacaAccountId
|
2457
|
+
} : undefined,
|
2458
|
+
assetId: item.assetId !== undefined ? {
|
2459
|
+
equals: item.assetId
|
2460
|
+
} : undefined,
|
2152
2461
|
},
|
2153
2462
|
update: {
|
2154
2463
|
id: item.id !== undefined ? {
|
@@ -2226,6 +2535,9 @@ export const Asset = {
|
|
2226
2535
|
id: item.stopLoss.id !== undefined ? {
|
2227
2536
|
equals: item.stopLoss.id
|
2228
2537
|
} : undefined,
|
2538
|
+
orderId: item.stopLoss.orderId !== undefined ? {
|
2539
|
+
equals: item.stopLoss.orderId
|
2540
|
+
} : undefined,
|
2229
2541
|
},
|
2230
2542
|
update: {
|
2231
2543
|
id: item.stopLoss.id !== undefined ? {
|
@@ -2250,6 +2562,9 @@ export const Asset = {
|
|
2250
2562
|
id: item.takeProfit.id !== undefined ? {
|
2251
2563
|
equals: item.takeProfit.id
|
2252
2564
|
} : undefined,
|
2565
|
+
orderId: item.takeProfit.orderId !== undefined ? {
|
2566
|
+
equals: item.takeProfit.orderId
|
2567
|
+
} : undefined,
|
2253
2568
|
},
|
2254
2569
|
update: {
|
2255
2570
|
id: item.takeProfit.id !== undefined ? {
|
@@ -2274,6 +2589,9 @@ export const Asset = {
|
|
2274
2589
|
id: item.alpacaAccount.id !== undefined ? {
|
2275
2590
|
equals: item.alpacaAccount.id
|
2276
2591
|
} : undefined,
|
2592
|
+
userId: item.alpacaAccount.userId !== undefined ? {
|
2593
|
+
equals: item.alpacaAccount.userId
|
2594
|
+
} : undefined,
|
2277
2595
|
},
|
2278
2596
|
update: {
|
2279
2597
|
id: item.alpacaAccount.id !== undefined ? {
|
@@ -2375,7 +2693,15 @@ export const Asset = {
|
|
2375
2693
|
trades: item.alpacaAccount.trades ? {
|
2376
2694
|
upsert: item.alpacaAccount.trades.map((item) => ({
|
2377
2695
|
where: {
|
2378
|
-
id: item.id !== undefined ?
|
2696
|
+
id: item.id !== undefined ? {
|
2697
|
+
equals: item.id
|
2698
|
+
} : undefined,
|
2699
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
2700
|
+
equals: item.alpacaAccountId
|
2701
|
+
} : undefined,
|
2702
|
+
assetId: item.assetId !== undefined ? {
|
2703
|
+
equals: item.assetId
|
2704
|
+
} : undefined,
|
2379
2705
|
},
|
2380
2706
|
update: {
|
2381
2707
|
id: item.id !== undefined ? {
|
@@ -2433,7 +2759,15 @@ export const Asset = {
|
|
2433
2759
|
positions: item.alpacaAccount.positions ? {
|
2434
2760
|
upsert: item.alpacaAccount.positions.map((item) => ({
|
2435
2761
|
where: {
|
2436
|
-
id: item.id !== undefined ?
|
2762
|
+
id: item.id !== undefined ? {
|
2763
|
+
equals: item.id
|
2764
|
+
} : undefined,
|
2765
|
+
assetId: item.assetId !== undefined ? {
|
2766
|
+
equals: item.assetId
|
2767
|
+
} : undefined,
|
2768
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
2769
|
+
equals: item.alpacaAccountId
|
2770
|
+
} : undefined,
|
2437
2771
|
},
|
2438
2772
|
update: {
|
2439
2773
|
id: item.id !== undefined ? {
|
@@ -2499,7 +2833,12 @@ export const Asset = {
|
|
2499
2833
|
alerts: item.alpacaAccount.alerts ? {
|
2500
2834
|
upsert: item.alpacaAccount.alerts.map((item) => ({
|
2501
2835
|
where: {
|
2502
|
-
id: item.id !== undefined ?
|
2836
|
+
id: item.id !== undefined ? {
|
2837
|
+
equals: item.id
|
2838
|
+
} : undefined,
|
2839
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
2840
|
+
equals: item.alpacaAccountId
|
2841
|
+
} : undefined,
|
2503
2842
|
},
|
2504
2843
|
update: {
|
2505
2844
|
id: item.id !== undefined ? {
|
@@ -2541,7 +2880,9 @@ export const Asset = {
|
|
2541
2880
|
}
|
2542
2881
|
: { connectOrCreate: {
|
2543
2882
|
where: {
|
2544
|
-
id: item.alpacaAccount.user.id !== undefined ?
|
2883
|
+
id: item.alpacaAccount.user.id !== undefined ? {
|
2884
|
+
equals: item.alpacaAccount.user.id
|
2885
|
+
} : undefined,
|
2545
2886
|
email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
|
2546
2887
|
name: item.alpacaAccount.user.name !== undefined ? {
|
2547
2888
|
equals: item.alpacaAccount.user.name
|
@@ -2570,7 +2911,15 @@ export const Asset = {
|
|
2570
2911
|
}
|
2571
2912
|
: { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
|
2572
2913
|
where: {
|
2573
|
-
id: item.id !== undefined ?
|
2914
|
+
id: item.id !== undefined ? {
|
2915
|
+
equals: item.id
|
2916
|
+
} : undefined,
|
2917
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
2918
|
+
equals: item.alpacaAccountId
|
2919
|
+
} : undefined,
|
2920
|
+
assetId: item.assetId !== undefined ? {
|
2921
|
+
equals: item.assetId
|
2922
|
+
} : undefined,
|
2574
2923
|
},
|
2575
2924
|
create: {
|
2576
2925
|
qty: item.qty !== undefined ? item.qty : undefined,
|
@@ -2595,7 +2944,15 @@ export const Asset = {
|
|
2595
2944
|
}
|
2596
2945
|
: { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
|
2597
2946
|
where: {
|
2598
|
-
id: item.id !== undefined ?
|
2947
|
+
id: item.id !== undefined ? {
|
2948
|
+
equals: item.id
|
2949
|
+
} : undefined,
|
2950
|
+
assetId: item.assetId !== undefined ? {
|
2951
|
+
equals: item.assetId
|
2952
|
+
} : undefined,
|
2953
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
2954
|
+
equals: item.alpacaAccountId
|
2955
|
+
} : undefined,
|
2599
2956
|
},
|
2600
2957
|
create: {
|
2601
2958
|
averageEntryPrice: item.averageEntryPrice !== undefined ? item.averageEntryPrice : undefined,
|
@@ -2622,7 +2979,12 @@ export const Asset = {
|
|
2622
2979
|
}
|
2623
2980
|
: { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
|
2624
2981
|
where: {
|
2625
|
-
id: item.id !== undefined ?
|
2982
|
+
id: item.id !== undefined ? {
|
2983
|
+
equals: item.id
|
2984
|
+
} : undefined,
|
2985
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
2986
|
+
equals: item.alpacaAccountId
|
2987
|
+
} : undefined,
|
2626
2988
|
},
|
2627
2989
|
create: {
|
2628
2990
|
message: item.message !== undefined ? item.message : undefined,
|
@@ -2640,6 +3002,9 @@ export const Asset = {
|
|
2640
3002
|
id: item.action.id !== undefined ? {
|
2641
3003
|
equals: item.action.id
|
2642
3004
|
} : undefined,
|
3005
|
+
tradeId: item.action.tradeId !== undefined ? {
|
3006
|
+
equals: item.action.tradeId
|
3007
|
+
} : undefined,
|
2643
3008
|
},
|
2644
3009
|
update: {
|
2645
3010
|
id: item.action.id !== undefined ? {
|
@@ -2666,6 +3031,12 @@ export const Asset = {
|
|
2666
3031
|
id: item.action.trade.id !== undefined ? {
|
2667
3032
|
equals: item.action.trade.id
|
2668
3033
|
} : undefined,
|
3034
|
+
alpacaAccountId: item.action.trade.alpacaAccountId !== undefined ? {
|
3035
|
+
equals: item.action.trade.alpacaAccountId
|
3036
|
+
} : undefined,
|
3037
|
+
assetId: item.action.trade.assetId !== undefined ? {
|
3038
|
+
equals: item.action.trade.assetId
|
3039
|
+
} : undefined,
|
2669
3040
|
},
|
2670
3041
|
update: {
|
2671
3042
|
id: item.action.trade.id !== undefined ? {
|
@@ -2735,7 +3106,15 @@ export const Asset = {
|
|
2735
3106
|
}
|
2736
3107
|
: { connectOrCreate: {
|
2737
3108
|
where: {
|
2738
|
-
id: item.action.trade.id !== undefined ?
|
3109
|
+
id: item.action.trade.id !== undefined ? {
|
3110
|
+
equals: item.action.trade.id
|
3111
|
+
} : undefined,
|
3112
|
+
alpacaAccountId: item.action.trade.alpacaAccountId !== undefined ? {
|
3113
|
+
equals: item.action.trade.alpacaAccountId
|
3114
|
+
} : undefined,
|
3115
|
+
assetId: item.action.trade.assetId !== undefined ? {
|
3116
|
+
equals: item.action.trade.assetId
|
3117
|
+
} : undefined,
|
2739
3118
|
},
|
2740
3119
|
create: {
|
2741
3120
|
qty: item.action.trade.qty !== undefined ? item.action.trade.qty : undefined,
|
@@ -2787,7 +3166,10 @@ export const Asset = {
|
|
2787
3166
|
}
|
2788
3167
|
: { connectOrCreate: {
|
2789
3168
|
where: {
|
2790
|
-
id: item.stopLoss.id !== undefined ?
|
3169
|
+
id: item.stopLoss.id !== undefined ? {
|
3170
|
+
equals: item.stopLoss.id
|
3171
|
+
} : undefined,
|
3172
|
+
orderId: item.stopLoss.orderId !== undefined ? item.stopLoss.orderId : undefined,
|
2791
3173
|
},
|
2792
3174
|
create: {
|
2793
3175
|
stopPrice: item.stopLoss.stopPrice !== undefined ? item.stopLoss.stopPrice : undefined,
|
@@ -2803,7 +3185,10 @@ export const Asset = {
|
|
2803
3185
|
}
|
2804
3186
|
: { connectOrCreate: {
|
2805
3187
|
where: {
|
2806
|
-
id: item.takeProfit.id !== undefined ?
|
3188
|
+
id: item.takeProfit.id !== undefined ? {
|
3189
|
+
equals: item.takeProfit.id
|
3190
|
+
} : undefined,
|
3191
|
+
orderId: item.takeProfit.orderId !== undefined ? item.takeProfit.orderId : undefined,
|
2807
3192
|
},
|
2808
3193
|
create: {
|
2809
3194
|
limitPrice: item.takeProfit.limitPrice !== undefined ? item.takeProfit.limitPrice : undefined,
|
@@ -2819,7 +3204,12 @@ export const Asset = {
|
|
2819
3204
|
}
|
2820
3205
|
: { connectOrCreate: {
|
2821
3206
|
where: {
|
2822
|
-
id: item.alpacaAccount.id !== undefined ?
|
3207
|
+
id: item.alpacaAccount.id !== undefined ? {
|
3208
|
+
equals: item.alpacaAccount.id
|
3209
|
+
} : undefined,
|
3210
|
+
userId: item.alpacaAccount.userId !== undefined ? {
|
3211
|
+
equals: item.alpacaAccount.userId
|
3212
|
+
} : undefined,
|
2823
3213
|
},
|
2824
3214
|
create: {
|
2825
3215
|
type: item.alpacaAccount.type !== undefined ? item.alpacaAccount.type : undefined,
|
@@ -2839,7 +3229,9 @@ export const Asset = {
|
|
2839
3229
|
}
|
2840
3230
|
: { connectOrCreate: {
|
2841
3231
|
where: {
|
2842
|
-
id: item.alpacaAccount.user.id !== undefined ?
|
3232
|
+
id: item.alpacaAccount.user.id !== undefined ? {
|
3233
|
+
equals: item.alpacaAccount.user.id
|
3234
|
+
} : undefined,
|
2843
3235
|
email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
|
2844
3236
|
name: item.alpacaAccount.user.name !== undefined ? {
|
2845
3237
|
equals: item.alpacaAccount.user.name
|
@@ -2868,7 +3260,15 @@ export const Asset = {
|
|
2868
3260
|
}
|
2869
3261
|
: { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
|
2870
3262
|
where: {
|
2871
|
-
id: item.id !== undefined ?
|
3263
|
+
id: item.id !== undefined ? {
|
3264
|
+
equals: item.id
|
3265
|
+
} : undefined,
|
3266
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
3267
|
+
equals: item.alpacaAccountId
|
3268
|
+
} : undefined,
|
3269
|
+
assetId: item.assetId !== undefined ? {
|
3270
|
+
equals: item.assetId
|
3271
|
+
} : undefined,
|
2872
3272
|
},
|
2873
3273
|
create: {
|
2874
3274
|
qty: item.qty !== undefined ? item.qty : undefined,
|
@@ -2893,7 +3293,15 @@ export const Asset = {
|
|
2893
3293
|
}
|
2894
3294
|
: { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
|
2895
3295
|
where: {
|
2896
|
-
id: item.id !== undefined ?
|
3296
|
+
id: item.id !== undefined ? {
|
3297
|
+
equals: item.id
|
3298
|
+
} : undefined,
|
3299
|
+
assetId: item.assetId !== undefined ? {
|
3300
|
+
equals: item.assetId
|
3301
|
+
} : undefined,
|
3302
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
3303
|
+
equals: item.alpacaAccountId
|
3304
|
+
} : undefined,
|
2897
3305
|
},
|
2898
3306
|
create: {
|
2899
3307
|
averageEntryPrice: item.averageEntryPrice !== undefined ? item.averageEntryPrice : undefined,
|
@@ -2920,7 +3328,12 @@ export const Asset = {
|
|
2920
3328
|
}
|
2921
3329
|
: { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
|
2922
3330
|
where: {
|
2923
|
-
id: item.id !== undefined ?
|
3331
|
+
id: item.id !== undefined ? {
|
3332
|
+
equals: item.id
|
3333
|
+
} : undefined,
|
3334
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
3335
|
+
equals: item.alpacaAccountId
|
3336
|
+
} : undefined,
|
2924
3337
|
},
|
2925
3338
|
create: {
|
2926
3339
|
message: item.message !== undefined ? item.message : undefined,
|
@@ -2940,7 +3353,12 @@ export const Asset = {
|
|
2940
3353
|
}
|
2941
3354
|
: { connectOrCreate: {
|
2942
3355
|
where: {
|
2943
|
-
id: item.action.id !== undefined ?
|
3356
|
+
id: item.action.id !== undefined ? {
|
3357
|
+
equals: item.action.id
|
3358
|
+
} : undefined,
|
3359
|
+
tradeId: item.action.tradeId !== undefined ? {
|
3360
|
+
equals: item.action.tradeId
|
3361
|
+
} : undefined,
|
2944
3362
|
},
|
2945
3363
|
create: {
|
2946
3364
|
sequence: item.action.sequence !== undefined ? item.action.sequence : undefined,
|
@@ -2956,7 +3374,15 @@ export const Asset = {
|
|
2956
3374
|
}
|
2957
3375
|
: { connectOrCreate: {
|
2958
3376
|
where: {
|
2959
|
-
id: item.action.trade.id !== undefined ?
|
3377
|
+
id: item.action.trade.id !== undefined ? {
|
3378
|
+
equals: item.action.trade.id
|
3379
|
+
} : undefined,
|
3380
|
+
alpacaAccountId: item.action.trade.alpacaAccountId !== undefined ? {
|
3381
|
+
equals: item.action.trade.alpacaAccountId
|
3382
|
+
} : undefined,
|
3383
|
+
assetId: item.action.trade.assetId !== undefined ? {
|
3384
|
+
equals: item.action.trade.assetId
|
3385
|
+
} : undefined,
|
2960
3386
|
},
|
2961
3387
|
create: {
|
2962
3388
|
qty: item.action.trade.qty !== undefined ? item.action.trade.qty : undefined,
|
@@ -2982,7 +3408,15 @@ export const Asset = {
|
|
2982
3408
|
positions: props.positions ? {
|
2983
3409
|
upsert: props.positions.map((item) => ({
|
2984
3410
|
where: {
|
2985
|
-
id: item.id !== undefined ?
|
3411
|
+
id: item.id !== undefined ? {
|
3412
|
+
equals: item.id
|
3413
|
+
} : undefined,
|
3414
|
+
assetId: item.assetId !== undefined ? {
|
3415
|
+
equals: item.assetId
|
3416
|
+
} : undefined,
|
3417
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
3418
|
+
equals: item.alpacaAccountId
|
3419
|
+
} : undefined,
|
2986
3420
|
},
|
2987
3421
|
update: {
|
2988
3422
|
id: item.id !== undefined ? {
|
@@ -3033,6 +3467,9 @@ export const Asset = {
|
|
3033
3467
|
id: item.alpacaAccount.id !== undefined ? {
|
3034
3468
|
equals: item.alpacaAccount.id
|
3035
3469
|
} : undefined,
|
3470
|
+
userId: item.alpacaAccount.userId !== undefined ? {
|
3471
|
+
equals: item.alpacaAccount.userId
|
3472
|
+
} : undefined,
|
3036
3473
|
},
|
3037
3474
|
update: {
|
3038
3475
|
id: item.alpacaAccount.id !== undefined ? {
|
@@ -3134,7 +3571,15 @@ export const Asset = {
|
|
3134
3571
|
trades: item.alpacaAccount.trades ? {
|
3135
3572
|
upsert: item.alpacaAccount.trades.map((item) => ({
|
3136
3573
|
where: {
|
3137
|
-
id: item.id !== undefined ?
|
3574
|
+
id: item.id !== undefined ? {
|
3575
|
+
equals: item.id
|
3576
|
+
} : undefined,
|
3577
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
3578
|
+
equals: item.alpacaAccountId
|
3579
|
+
} : undefined,
|
3580
|
+
assetId: item.assetId !== undefined ? {
|
3581
|
+
equals: item.assetId
|
3582
|
+
} : undefined,
|
3138
3583
|
},
|
3139
3584
|
update: {
|
3140
3585
|
id: item.id !== undefined ? {
|
@@ -3192,7 +3637,18 @@ export const Asset = {
|
|
3192
3637
|
orders: item.alpacaAccount.orders ? {
|
3193
3638
|
upsert: item.alpacaAccount.orders.map((item) => ({
|
3194
3639
|
where: {
|
3195
|
-
id: item.id !== undefined ?
|
3640
|
+
id: item.id !== undefined ? {
|
3641
|
+
equals: item.id
|
3642
|
+
} : undefined,
|
3643
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
3644
|
+
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
3645
|
+
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
3646
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
3647
|
+
equals: item.alpacaAccountId
|
3648
|
+
} : undefined,
|
3649
|
+
assetId: item.assetId !== undefined ? {
|
3650
|
+
equals: item.assetId
|
3651
|
+
} : undefined,
|
3196
3652
|
},
|
3197
3653
|
update: {
|
3198
3654
|
id: item.id !== undefined ? {
|
@@ -3294,7 +3750,12 @@ export const Asset = {
|
|
3294
3750
|
alerts: item.alpacaAccount.alerts ? {
|
3295
3751
|
upsert: item.alpacaAccount.alerts.map((item) => ({
|
3296
3752
|
where: {
|
3297
|
-
id: item.id !== undefined ?
|
3753
|
+
id: item.id !== undefined ? {
|
3754
|
+
equals: item.id
|
3755
|
+
} : undefined,
|
3756
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
3757
|
+
equals: item.alpacaAccountId
|
3758
|
+
} : undefined,
|
3298
3759
|
},
|
3299
3760
|
update: {
|
3300
3761
|
id: item.id !== undefined ? {
|
@@ -3336,7 +3797,9 @@ export const Asset = {
|
|
3336
3797
|
}
|
3337
3798
|
: { connectOrCreate: {
|
3338
3799
|
where: {
|
3339
|
-
id: item.alpacaAccount.user.id !== undefined ?
|
3800
|
+
id: item.alpacaAccount.user.id !== undefined ? {
|
3801
|
+
equals: item.alpacaAccount.user.id
|
3802
|
+
} : undefined,
|
3340
3803
|
email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
|
3341
3804
|
name: item.alpacaAccount.user.name !== undefined ? {
|
3342
3805
|
equals: item.alpacaAccount.user.name
|
@@ -3365,7 +3828,15 @@ export const Asset = {
|
|
3365
3828
|
}
|
3366
3829
|
: { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
|
3367
3830
|
where: {
|
3368
|
-
id: item.id !== undefined ?
|
3831
|
+
id: item.id !== undefined ? {
|
3832
|
+
equals: item.id
|
3833
|
+
} : undefined,
|
3834
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
3835
|
+
equals: item.alpacaAccountId
|
3836
|
+
} : undefined,
|
3837
|
+
assetId: item.assetId !== undefined ? {
|
3838
|
+
equals: item.assetId
|
3839
|
+
} : undefined,
|
3369
3840
|
},
|
3370
3841
|
create: {
|
3371
3842
|
qty: item.qty !== undefined ? item.qty : undefined,
|
@@ -3390,7 +3861,18 @@ export const Asset = {
|
|
3390
3861
|
}
|
3391
3862
|
: { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
|
3392
3863
|
where: {
|
3393
|
-
id: item.id !== undefined ?
|
3864
|
+
id: item.id !== undefined ? {
|
3865
|
+
equals: item.id
|
3866
|
+
} : undefined,
|
3867
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
3868
|
+
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
3869
|
+
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
3870
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
3871
|
+
equals: item.alpacaAccountId
|
3872
|
+
} : undefined,
|
3873
|
+
assetId: item.assetId !== undefined ? {
|
3874
|
+
equals: item.assetId
|
3875
|
+
} : undefined,
|
3394
3876
|
},
|
3395
3877
|
create: {
|
3396
3878
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
@@ -3426,7 +3908,12 @@ export const Asset = {
|
|
3426
3908
|
}
|
3427
3909
|
: { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
|
3428
3910
|
where: {
|
3429
|
-
id: item.id !== undefined ?
|
3911
|
+
id: item.id !== undefined ? {
|
3912
|
+
equals: item.id
|
3913
|
+
} : undefined,
|
3914
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
3915
|
+
equals: item.alpacaAccountId
|
3916
|
+
} : undefined,
|
3430
3917
|
},
|
3431
3918
|
create: {
|
3432
3919
|
message: item.message !== undefined ? item.message : undefined,
|
@@ -3461,7 +3948,12 @@ export const Asset = {
|
|
3461
3948
|
}
|
3462
3949
|
: { connectOrCreate: {
|
3463
3950
|
where: {
|
3464
|
-
id: item.alpacaAccount.id !== undefined ?
|
3951
|
+
id: item.alpacaAccount.id !== undefined ? {
|
3952
|
+
equals: item.alpacaAccount.id
|
3953
|
+
} : undefined,
|
3954
|
+
userId: item.alpacaAccount.userId !== undefined ? {
|
3955
|
+
equals: item.alpacaAccount.userId
|
3956
|
+
} : undefined,
|
3465
3957
|
},
|
3466
3958
|
create: {
|
3467
3959
|
type: item.alpacaAccount.type !== undefined ? item.alpacaAccount.type : undefined,
|
@@ -3481,7 +3973,9 @@ export const Asset = {
|
|
3481
3973
|
}
|
3482
3974
|
: { connectOrCreate: {
|
3483
3975
|
where: {
|
3484
|
-
id: item.alpacaAccount.user.id !== undefined ?
|
3976
|
+
id: item.alpacaAccount.user.id !== undefined ? {
|
3977
|
+
equals: item.alpacaAccount.user.id
|
3978
|
+
} : undefined,
|
3485
3979
|
email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
|
3486
3980
|
name: item.alpacaAccount.user.name !== undefined ? {
|
3487
3981
|
equals: item.alpacaAccount.user.name
|
@@ -3510,7 +4004,15 @@ export const Asset = {
|
|
3510
4004
|
}
|
3511
4005
|
: { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
|
3512
4006
|
where: {
|
3513
|
-
id: item.id !== undefined ?
|
4007
|
+
id: item.id !== undefined ? {
|
4008
|
+
equals: item.id
|
4009
|
+
} : undefined,
|
4010
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
4011
|
+
equals: item.alpacaAccountId
|
4012
|
+
} : undefined,
|
4013
|
+
assetId: item.assetId !== undefined ? {
|
4014
|
+
equals: item.assetId
|
4015
|
+
} : undefined,
|
3514
4016
|
},
|
3515
4017
|
create: {
|
3516
4018
|
qty: item.qty !== undefined ? item.qty : undefined,
|
@@ -3535,7 +4037,18 @@ export const Asset = {
|
|
3535
4037
|
}
|
3536
4038
|
: { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
|
3537
4039
|
where: {
|
3538
|
-
id: item.id !== undefined ?
|
4040
|
+
id: item.id !== undefined ? {
|
4041
|
+
equals: item.id
|
4042
|
+
} : undefined,
|
4043
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
4044
|
+
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
4045
|
+
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
4046
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
4047
|
+
equals: item.alpacaAccountId
|
4048
|
+
} : undefined,
|
4049
|
+
assetId: item.assetId !== undefined ? {
|
4050
|
+
equals: item.assetId
|
4051
|
+
} : undefined,
|
3539
4052
|
},
|
3540
4053
|
create: {
|
3541
4054
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
@@ -3571,7 +4084,12 @@ export const Asset = {
|
|
3571
4084
|
}
|
3572
4085
|
: { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
|
3573
4086
|
where: {
|
3574
|
-
id: item.id !== undefined ?
|
4087
|
+
id: item.id !== undefined ? {
|
4088
|
+
equals: item.id
|
4089
|
+
} : undefined,
|
4090
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
4091
|
+
equals: item.alpacaAccountId
|
4092
|
+
} : undefined,
|
3575
4093
|
},
|
3576
4094
|
create: {
|
3577
4095
|
message: item.message !== undefined ? item.message : undefined,
|
@@ -3589,8 +4107,16 @@ export const Asset = {
|
|
3589
4107
|
newsMentions: props.newsMentions ? {
|
3590
4108
|
upsert: props.newsMentions.map((item) => ({
|
3591
4109
|
where: {
|
3592
|
-
id: item.id !== undefined ?
|
4110
|
+
id: item.id !== undefined ? {
|
4111
|
+
equals: item.id
|
4112
|
+
} : undefined,
|
3593
4113
|
url: item.url !== undefined ? item.url : undefined,
|
4114
|
+
assetId: item.assetId !== undefined ? {
|
4115
|
+
equals: item.assetId
|
4116
|
+
} : undefined,
|
4117
|
+
newsArticleId: item.newsArticleId !== undefined ? {
|
4118
|
+
equals: item.newsArticleId
|
4119
|
+
} : undefined,
|
3594
4120
|
},
|
3595
4121
|
update: {
|
3596
4122
|
id: item.id !== undefined ? {
|
@@ -3696,7 +4222,9 @@ export const Asset = {
|
|
3696
4222
|
}
|
3697
4223
|
: { connectOrCreate: {
|
3698
4224
|
where: {
|
3699
|
-
id: item.news.id !== undefined ?
|
4225
|
+
id: item.news.id !== undefined ? {
|
4226
|
+
equals: item.news.id
|
4227
|
+
} : undefined,
|
3700
4228
|
url: item.news.url !== undefined ? item.news.url : undefined,
|
3701
4229
|
title: item.news.title !== undefined ? {
|
3702
4230
|
equals: item.news.title
|
@@ -3756,7 +4284,9 @@ export const Asset = {
|
|
3756
4284
|
}`;
|
3757
4285
|
const variables = props.map(prop => ({
|
3758
4286
|
where: {
|
3759
|
-
id: prop.id !== undefined ?
|
4287
|
+
id: prop.id !== undefined ? {
|
4288
|
+
equals: prop.id
|
4289
|
+
} : undefined,
|
3760
4290
|
symbol: prop.symbol !== undefined ? prop.symbol : undefined,
|
3761
4291
|
name: prop.name !== undefined ? prop.name : undefined,
|
3762
4292
|
type: prop.type !== undefined ? prop.type : undefined,
|
@@ -3810,8 +4340,6 @@ export const Asset = {
|
|
3810
4340
|
sharesOutstanding: prop.sharesOutstanding !== undefined ? prop.sharesOutstanding : undefined,
|
3811
4341
|
dividendDate: prop.dividendDate !== undefined ? prop.dividendDate : undefined,
|
3812
4342
|
exDividendDate: prop.exDividendDate !== undefined ? prop.exDividendDate : undefined,
|
3813
|
-
askPrice: prop.askPrice !== undefined ? prop.askPrice : undefined,
|
3814
|
-
bidPrice: prop.bidPrice !== undefined ? prop.bidPrice : undefined,
|
3815
4343
|
createdAt: prop.createdAt !== undefined ? prop.createdAt : undefined,
|
3816
4344
|
updatedAt: prop.updatedAt !== undefined ? prop.updatedAt : undefined,
|
3817
4345
|
},
|
@@ -3993,7 +4521,15 @@ export const Asset = {
|
|
3993
4521
|
trades: prop.trades ? {
|
3994
4522
|
upsert: prop.trades.map((item) => ({
|
3995
4523
|
where: {
|
3996
|
-
id: item.id !== undefined ?
|
4524
|
+
id: item.id !== undefined ? {
|
4525
|
+
equals: item.id
|
4526
|
+
} : undefined,
|
4527
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
4528
|
+
equals: item.alpacaAccountId
|
4529
|
+
} : undefined,
|
4530
|
+
assetId: item.assetId !== undefined ? {
|
4531
|
+
equals: item.assetId
|
4532
|
+
} : undefined,
|
3997
4533
|
},
|
3998
4534
|
update: {
|
3999
4535
|
id: item.id !== undefined ? {
|
@@ -4038,6 +4574,9 @@ export const Asset = {
|
|
4038
4574
|
id: item.alpacaAccount.id !== undefined ? {
|
4039
4575
|
equals: item.alpacaAccount.id
|
4040
4576
|
} : undefined,
|
4577
|
+
userId: item.alpacaAccount.userId !== undefined ? {
|
4578
|
+
equals: item.alpacaAccount.userId
|
4579
|
+
} : undefined,
|
4041
4580
|
},
|
4042
4581
|
update: {
|
4043
4582
|
id: item.alpacaAccount.id !== undefined ? {
|
@@ -4139,7 +4678,18 @@ export const Asset = {
|
|
4139
4678
|
orders: item.alpacaAccount.orders ? {
|
4140
4679
|
upsert: item.alpacaAccount.orders.map((item) => ({
|
4141
4680
|
where: {
|
4142
|
-
id: item.id !== undefined ?
|
4681
|
+
id: item.id !== undefined ? {
|
4682
|
+
equals: item.id
|
4683
|
+
} : undefined,
|
4684
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
4685
|
+
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
4686
|
+
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
4687
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
4688
|
+
equals: item.alpacaAccountId
|
4689
|
+
} : undefined,
|
4690
|
+
assetId: item.assetId !== undefined ? {
|
4691
|
+
equals: item.assetId
|
4692
|
+
} : undefined,
|
4143
4693
|
},
|
4144
4694
|
update: {
|
4145
4695
|
id: item.id !== undefined ? {
|
@@ -4241,7 +4791,15 @@ export const Asset = {
|
|
4241
4791
|
positions: item.alpacaAccount.positions ? {
|
4242
4792
|
upsert: item.alpacaAccount.positions.map((item) => ({
|
4243
4793
|
where: {
|
4244
|
-
id: item.id !== undefined ?
|
4794
|
+
id: item.id !== undefined ? {
|
4795
|
+
equals: item.id
|
4796
|
+
} : undefined,
|
4797
|
+
assetId: item.assetId !== undefined ? {
|
4798
|
+
equals: item.assetId
|
4799
|
+
} : undefined,
|
4800
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
4801
|
+
equals: item.alpacaAccountId
|
4802
|
+
} : undefined,
|
4245
4803
|
},
|
4246
4804
|
update: {
|
4247
4805
|
id: item.id !== undefined ? {
|
@@ -4307,7 +4865,12 @@ export const Asset = {
|
|
4307
4865
|
alerts: item.alpacaAccount.alerts ? {
|
4308
4866
|
upsert: item.alpacaAccount.alerts.map((item) => ({
|
4309
4867
|
where: {
|
4310
|
-
id: item.id !== undefined ?
|
4868
|
+
id: item.id !== undefined ? {
|
4869
|
+
equals: item.id
|
4870
|
+
} : undefined,
|
4871
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
4872
|
+
equals: item.alpacaAccountId
|
4873
|
+
} : undefined,
|
4311
4874
|
},
|
4312
4875
|
update: {
|
4313
4876
|
id: item.id !== undefined ? {
|
@@ -4349,7 +4912,9 @@ export const Asset = {
|
|
4349
4912
|
}
|
4350
4913
|
: { connectOrCreate: {
|
4351
4914
|
where: {
|
4352
|
-
id: item.alpacaAccount.user.id !== undefined ?
|
4915
|
+
id: item.alpacaAccount.user.id !== undefined ? {
|
4916
|
+
equals: item.alpacaAccount.user.id
|
4917
|
+
} : undefined,
|
4353
4918
|
email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
|
4354
4919
|
name: item.alpacaAccount.user.name !== undefined ? {
|
4355
4920
|
equals: item.alpacaAccount.user.name
|
@@ -4378,7 +4943,18 @@ export const Asset = {
|
|
4378
4943
|
}
|
4379
4944
|
: { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
|
4380
4945
|
where: {
|
4381
|
-
id: item.id !== undefined ?
|
4946
|
+
id: item.id !== undefined ? {
|
4947
|
+
equals: item.id
|
4948
|
+
} : undefined,
|
4949
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
4950
|
+
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
4951
|
+
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
4952
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
4953
|
+
equals: item.alpacaAccountId
|
4954
|
+
} : undefined,
|
4955
|
+
assetId: item.assetId !== undefined ? {
|
4956
|
+
equals: item.assetId
|
4957
|
+
} : undefined,
|
4382
4958
|
},
|
4383
4959
|
create: {
|
4384
4960
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
@@ -4414,7 +4990,15 @@ export const Asset = {
|
|
4414
4990
|
}
|
4415
4991
|
: { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
|
4416
4992
|
where: {
|
4417
|
-
id: item.id !== undefined ?
|
4993
|
+
id: item.id !== undefined ? {
|
4994
|
+
equals: item.id
|
4995
|
+
} : undefined,
|
4996
|
+
assetId: item.assetId !== undefined ? {
|
4997
|
+
equals: item.assetId
|
4998
|
+
} : undefined,
|
4999
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
5000
|
+
equals: item.alpacaAccountId
|
5001
|
+
} : undefined,
|
4418
5002
|
},
|
4419
5003
|
create: {
|
4420
5004
|
averageEntryPrice: item.averageEntryPrice !== undefined ? item.averageEntryPrice : undefined,
|
@@ -4441,7 +5025,12 @@ export const Asset = {
|
|
4441
5025
|
}
|
4442
5026
|
: { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
|
4443
5027
|
where: {
|
4444
|
-
id: item.id !== undefined ?
|
5028
|
+
id: item.id !== undefined ? {
|
5029
|
+
equals: item.id
|
5030
|
+
} : undefined,
|
5031
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
5032
|
+
equals: item.alpacaAccountId
|
5033
|
+
} : undefined,
|
4445
5034
|
},
|
4446
5035
|
create: {
|
4447
5036
|
message: item.message !== undefined ? item.message : undefined,
|
@@ -4456,7 +5045,12 @@ export const Asset = {
|
|
4456
5045
|
actions: item.actions ? {
|
4457
5046
|
upsert: item.actions.map((item) => ({
|
4458
5047
|
where: {
|
4459
|
-
id: item.id !== undefined ?
|
5048
|
+
id: item.id !== undefined ? {
|
5049
|
+
equals: item.id
|
5050
|
+
} : undefined,
|
5051
|
+
tradeId: item.tradeId !== undefined ? {
|
5052
|
+
equals: item.tradeId
|
5053
|
+
} : undefined,
|
4460
5054
|
},
|
4461
5055
|
update: {
|
4462
5056
|
id: item.id !== undefined ? {
|
@@ -4483,6 +5077,18 @@ export const Asset = {
|
|
4483
5077
|
id: item.order.id !== undefined ? {
|
4484
5078
|
equals: item.order.id
|
4485
5079
|
} : undefined,
|
5080
|
+
clientOrderId: item.order.clientOrderId !== undefined ? {
|
5081
|
+
equals: item.order.clientOrderId
|
5082
|
+
} : undefined,
|
5083
|
+
alpacaAccountId: item.order.alpacaAccountId !== undefined ? {
|
5084
|
+
equals: item.order.alpacaAccountId
|
5085
|
+
} : undefined,
|
5086
|
+
assetId: item.order.assetId !== undefined ? {
|
5087
|
+
equals: item.order.assetId
|
5088
|
+
} : undefined,
|
5089
|
+
actionId: item.order.actionId !== undefined ? {
|
5090
|
+
equals: item.order.actionId
|
5091
|
+
} : undefined,
|
4486
5092
|
},
|
4487
5093
|
update: {
|
4488
5094
|
id: item.order.id !== undefined ? {
|
@@ -4596,7 +5202,18 @@ export const Asset = {
|
|
4596
5202
|
}
|
4597
5203
|
: { connectOrCreate: {
|
4598
5204
|
where: {
|
4599
|
-
id: item.order.id !== undefined ?
|
5205
|
+
id: item.order.id !== undefined ? {
|
5206
|
+
equals: item.order.id
|
5207
|
+
} : undefined,
|
5208
|
+
clientOrderId: item.order.clientOrderId !== undefined ? item.order.clientOrderId : undefined,
|
5209
|
+
actionId: item.order.actionId !== undefined ? item.order.actionId : undefined,
|
5210
|
+
stopLossId: item.order.stopLossId !== undefined ? item.order.stopLossId : undefined,
|
5211
|
+
alpacaAccountId: item.order.alpacaAccountId !== undefined ? {
|
5212
|
+
equals: item.order.alpacaAccountId
|
5213
|
+
} : undefined,
|
5214
|
+
assetId: item.order.assetId !== undefined ? {
|
5215
|
+
equals: item.order.assetId
|
5216
|
+
} : undefined,
|
4600
5217
|
},
|
4601
5218
|
create: {
|
4602
5219
|
clientOrderId: item.order.clientOrderId !== undefined ? item.order.clientOrderId : undefined,
|
@@ -4648,7 +5265,12 @@ export const Asset = {
|
|
4648
5265
|
}
|
4649
5266
|
: { connectOrCreate: {
|
4650
5267
|
where: {
|
4651
|
-
id: item.alpacaAccount.id !== undefined ?
|
5268
|
+
id: item.alpacaAccount.id !== undefined ? {
|
5269
|
+
equals: item.alpacaAccount.id
|
5270
|
+
} : undefined,
|
5271
|
+
userId: item.alpacaAccount.userId !== undefined ? {
|
5272
|
+
equals: item.alpacaAccount.userId
|
5273
|
+
} : undefined,
|
4652
5274
|
},
|
4653
5275
|
create: {
|
4654
5276
|
type: item.alpacaAccount.type !== undefined ? item.alpacaAccount.type : undefined,
|
@@ -4668,7 +5290,9 @@ export const Asset = {
|
|
4668
5290
|
}
|
4669
5291
|
: { connectOrCreate: {
|
4670
5292
|
where: {
|
4671
|
-
id: item.alpacaAccount.user.id !== undefined ?
|
5293
|
+
id: item.alpacaAccount.user.id !== undefined ? {
|
5294
|
+
equals: item.alpacaAccount.user.id
|
5295
|
+
} : undefined,
|
4672
5296
|
email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
|
4673
5297
|
name: item.alpacaAccount.user.name !== undefined ? {
|
4674
5298
|
equals: item.alpacaAccount.user.name
|
@@ -4697,7 +5321,18 @@ export const Asset = {
|
|
4697
5321
|
}
|
4698
5322
|
: { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
|
4699
5323
|
where: {
|
4700
|
-
id: item.id !== undefined ?
|
5324
|
+
id: item.id !== undefined ? {
|
5325
|
+
equals: item.id
|
5326
|
+
} : undefined,
|
5327
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
5328
|
+
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
5329
|
+
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
5330
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
5331
|
+
equals: item.alpacaAccountId
|
5332
|
+
} : undefined,
|
5333
|
+
assetId: item.assetId !== undefined ? {
|
5334
|
+
equals: item.assetId
|
5335
|
+
} : undefined,
|
4701
5336
|
},
|
4702
5337
|
create: {
|
4703
5338
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
@@ -4733,7 +5368,15 @@ export const Asset = {
|
|
4733
5368
|
}
|
4734
5369
|
: { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
|
4735
5370
|
where: {
|
4736
|
-
id: item.id !== undefined ?
|
5371
|
+
id: item.id !== undefined ? {
|
5372
|
+
equals: item.id
|
5373
|
+
} : undefined,
|
5374
|
+
assetId: item.assetId !== undefined ? {
|
5375
|
+
equals: item.assetId
|
5376
|
+
} : undefined,
|
5377
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
5378
|
+
equals: item.alpacaAccountId
|
5379
|
+
} : undefined,
|
4737
5380
|
},
|
4738
5381
|
create: {
|
4739
5382
|
averageEntryPrice: item.averageEntryPrice !== undefined ? item.averageEntryPrice : undefined,
|
@@ -4760,7 +5403,12 @@ export const Asset = {
|
|
4760
5403
|
}
|
4761
5404
|
: { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
|
4762
5405
|
where: {
|
4763
|
-
id: item.id !== undefined ?
|
5406
|
+
id: item.id !== undefined ? {
|
5407
|
+
equals: item.id
|
5408
|
+
} : undefined,
|
5409
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
5410
|
+
equals: item.alpacaAccountId
|
5411
|
+
} : undefined,
|
4764
5412
|
},
|
4765
5413
|
create: {
|
4766
5414
|
message: item.message !== undefined ? item.message : undefined,
|
@@ -4780,7 +5428,12 @@ export const Asset = {
|
|
4780
5428
|
}
|
4781
5429
|
: { connectOrCreate: item.actions.map((item) => ({
|
4782
5430
|
where: {
|
4783
|
-
id: item.id !== undefined ?
|
5431
|
+
id: item.id !== undefined ? {
|
5432
|
+
equals: item.id
|
5433
|
+
} : undefined,
|
5434
|
+
tradeId: item.tradeId !== undefined ? {
|
5435
|
+
equals: item.tradeId
|
5436
|
+
} : undefined,
|
4784
5437
|
},
|
4785
5438
|
create: {
|
4786
5439
|
sequence: item.sequence !== undefined ? item.sequence : undefined,
|
@@ -4796,7 +5449,18 @@ export const Asset = {
|
|
4796
5449
|
}
|
4797
5450
|
: { connectOrCreate: {
|
4798
5451
|
where: {
|
4799
|
-
id: item.order.id !== undefined ?
|
5452
|
+
id: item.order.id !== undefined ? {
|
5453
|
+
equals: item.order.id
|
5454
|
+
} : undefined,
|
5455
|
+
clientOrderId: item.order.clientOrderId !== undefined ? item.order.clientOrderId : undefined,
|
5456
|
+
actionId: item.order.actionId !== undefined ? item.order.actionId : undefined,
|
5457
|
+
stopLossId: item.order.stopLossId !== undefined ? item.order.stopLossId : undefined,
|
5458
|
+
alpacaAccountId: item.order.alpacaAccountId !== undefined ? {
|
5459
|
+
equals: item.order.alpacaAccountId
|
5460
|
+
} : undefined,
|
5461
|
+
assetId: item.order.assetId !== undefined ? {
|
5462
|
+
equals: item.order.assetId
|
5463
|
+
} : undefined,
|
4800
5464
|
},
|
4801
5465
|
create: {
|
4802
5466
|
clientOrderId: item.order.clientOrderId !== undefined ? item.order.clientOrderId : undefined,
|
@@ -4833,7 +5497,18 @@ export const Asset = {
|
|
4833
5497
|
orders: prop.orders ? {
|
4834
5498
|
upsert: prop.orders.map((item) => ({
|
4835
5499
|
where: {
|
4836
|
-
id: item.id !== undefined ?
|
5500
|
+
id: item.id !== undefined ? {
|
5501
|
+
equals: item.id
|
5502
|
+
} : undefined,
|
5503
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
5504
|
+
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
5505
|
+
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
5506
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
5507
|
+
equals: item.alpacaAccountId
|
5508
|
+
} : undefined,
|
5509
|
+
assetId: item.assetId !== undefined ? {
|
5510
|
+
equals: item.assetId
|
5511
|
+
} : undefined,
|
4837
5512
|
},
|
4838
5513
|
update: {
|
4839
5514
|
id: item.id !== undefined ? {
|
@@ -4911,6 +5586,9 @@ export const Asset = {
|
|
4911
5586
|
id: item.stopLoss.id !== undefined ? {
|
4912
5587
|
equals: item.stopLoss.id
|
4913
5588
|
} : undefined,
|
5589
|
+
orderId: item.stopLoss.orderId !== undefined ? {
|
5590
|
+
equals: item.stopLoss.orderId
|
5591
|
+
} : undefined,
|
4914
5592
|
},
|
4915
5593
|
update: {
|
4916
5594
|
id: item.stopLoss.id !== undefined ? {
|
@@ -4935,6 +5613,9 @@ export const Asset = {
|
|
4935
5613
|
id: item.takeProfit.id !== undefined ? {
|
4936
5614
|
equals: item.takeProfit.id
|
4937
5615
|
} : undefined,
|
5616
|
+
orderId: item.takeProfit.orderId !== undefined ? {
|
5617
|
+
equals: item.takeProfit.orderId
|
5618
|
+
} : undefined,
|
4938
5619
|
},
|
4939
5620
|
update: {
|
4940
5621
|
id: item.takeProfit.id !== undefined ? {
|
@@ -4959,6 +5640,9 @@ export const Asset = {
|
|
4959
5640
|
id: item.alpacaAccount.id !== undefined ? {
|
4960
5641
|
equals: item.alpacaAccount.id
|
4961
5642
|
} : undefined,
|
5643
|
+
userId: item.alpacaAccount.userId !== undefined ? {
|
5644
|
+
equals: item.alpacaAccount.userId
|
5645
|
+
} : undefined,
|
4962
5646
|
},
|
4963
5647
|
update: {
|
4964
5648
|
id: item.alpacaAccount.id !== undefined ? {
|
@@ -5060,7 +5744,15 @@ export const Asset = {
|
|
5060
5744
|
trades: item.alpacaAccount.trades ? {
|
5061
5745
|
upsert: item.alpacaAccount.trades.map((item) => ({
|
5062
5746
|
where: {
|
5063
|
-
id: item.id !== undefined ?
|
5747
|
+
id: item.id !== undefined ? {
|
5748
|
+
equals: item.id
|
5749
|
+
} : undefined,
|
5750
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
5751
|
+
equals: item.alpacaAccountId
|
5752
|
+
} : undefined,
|
5753
|
+
assetId: item.assetId !== undefined ? {
|
5754
|
+
equals: item.assetId
|
5755
|
+
} : undefined,
|
5064
5756
|
},
|
5065
5757
|
update: {
|
5066
5758
|
id: item.id !== undefined ? {
|
@@ -5118,7 +5810,15 @@ export const Asset = {
|
|
5118
5810
|
positions: item.alpacaAccount.positions ? {
|
5119
5811
|
upsert: item.alpacaAccount.positions.map((item) => ({
|
5120
5812
|
where: {
|
5121
|
-
id: item.id !== undefined ?
|
5813
|
+
id: item.id !== undefined ? {
|
5814
|
+
equals: item.id
|
5815
|
+
} : undefined,
|
5816
|
+
assetId: item.assetId !== undefined ? {
|
5817
|
+
equals: item.assetId
|
5818
|
+
} : undefined,
|
5819
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
5820
|
+
equals: item.alpacaAccountId
|
5821
|
+
} : undefined,
|
5122
5822
|
},
|
5123
5823
|
update: {
|
5124
5824
|
id: item.id !== undefined ? {
|
@@ -5184,7 +5884,12 @@ export const Asset = {
|
|
5184
5884
|
alerts: item.alpacaAccount.alerts ? {
|
5185
5885
|
upsert: item.alpacaAccount.alerts.map((item) => ({
|
5186
5886
|
where: {
|
5187
|
-
id: item.id !== undefined ?
|
5887
|
+
id: item.id !== undefined ? {
|
5888
|
+
equals: item.id
|
5889
|
+
} : undefined,
|
5890
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
5891
|
+
equals: item.alpacaAccountId
|
5892
|
+
} : undefined,
|
5188
5893
|
},
|
5189
5894
|
update: {
|
5190
5895
|
id: item.id !== undefined ? {
|
@@ -5226,7 +5931,9 @@ export const Asset = {
|
|
5226
5931
|
}
|
5227
5932
|
: { connectOrCreate: {
|
5228
5933
|
where: {
|
5229
|
-
id: item.alpacaAccount.user.id !== undefined ?
|
5934
|
+
id: item.alpacaAccount.user.id !== undefined ? {
|
5935
|
+
equals: item.alpacaAccount.user.id
|
5936
|
+
} : undefined,
|
5230
5937
|
email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
|
5231
5938
|
name: item.alpacaAccount.user.name !== undefined ? {
|
5232
5939
|
equals: item.alpacaAccount.user.name
|
@@ -5255,7 +5962,15 @@ export const Asset = {
|
|
5255
5962
|
}
|
5256
5963
|
: { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
|
5257
5964
|
where: {
|
5258
|
-
id: item.id !== undefined ?
|
5965
|
+
id: item.id !== undefined ? {
|
5966
|
+
equals: item.id
|
5967
|
+
} : undefined,
|
5968
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
5969
|
+
equals: item.alpacaAccountId
|
5970
|
+
} : undefined,
|
5971
|
+
assetId: item.assetId !== undefined ? {
|
5972
|
+
equals: item.assetId
|
5973
|
+
} : undefined,
|
5259
5974
|
},
|
5260
5975
|
create: {
|
5261
5976
|
qty: item.qty !== undefined ? item.qty : undefined,
|
@@ -5280,7 +5995,15 @@ export const Asset = {
|
|
5280
5995
|
}
|
5281
5996
|
: { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
|
5282
5997
|
where: {
|
5283
|
-
id: item.id !== undefined ?
|
5998
|
+
id: item.id !== undefined ? {
|
5999
|
+
equals: item.id
|
6000
|
+
} : undefined,
|
6001
|
+
assetId: item.assetId !== undefined ? {
|
6002
|
+
equals: item.assetId
|
6003
|
+
} : undefined,
|
6004
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
6005
|
+
equals: item.alpacaAccountId
|
6006
|
+
} : undefined,
|
5284
6007
|
},
|
5285
6008
|
create: {
|
5286
6009
|
averageEntryPrice: item.averageEntryPrice !== undefined ? item.averageEntryPrice : undefined,
|
@@ -5307,7 +6030,12 @@ export const Asset = {
|
|
5307
6030
|
}
|
5308
6031
|
: { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
|
5309
6032
|
where: {
|
5310
|
-
id: item.id !== undefined ?
|
6033
|
+
id: item.id !== undefined ? {
|
6034
|
+
equals: item.id
|
6035
|
+
} : undefined,
|
6036
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
6037
|
+
equals: item.alpacaAccountId
|
6038
|
+
} : undefined,
|
5311
6039
|
},
|
5312
6040
|
create: {
|
5313
6041
|
message: item.message !== undefined ? item.message : undefined,
|
@@ -5325,6 +6053,9 @@ export const Asset = {
|
|
5325
6053
|
id: item.action.id !== undefined ? {
|
5326
6054
|
equals: item.action.id
|
5327
6055
|
} : undefined,
|
6056
|
+
tradeId: item.action.tradeId !== undefined ? {
|
6057
|
+
equals: item.action.tradeId
|
6058
|
+
} : undefined,
|
5328
6059
|
},
|
5329
6060
|
update: {
|
5330
6061
|
id: item.action.id !== undefined ? {
|
@@ -5351,6 +6082,12 @@ export const Asset = {
|
|
5351
6082
|
id: item.action.trade.id !== undefined ? {
|
5352
6083
|
equals: item.action.trade.id
|
5353
6084
|
} : undefined,
|
6085
|
+
alpacaAccountId: item.action.trade.alpacaAccountId !== undefined ? {
|
6086
|
+
equals: item.action.trade.alpacaAccountId
|
6087
|
+
} : undefined,
|
6088
|
+
assetId: item.action.trade.assetId !== undefined ? {
|
6089
|
+
equals: item.action.trade.assetId
|
6090
|
+
} : undefined,
|
5354
6091
|
},
|
5355
6092
|
update: {
|
5356
6093
|
id: item.action.trade.id !== undefined ? {
|
@@ -5420,7 +6157,15 @@ export const Asset = {
|
|
5420
6157
|
}
|
5421
6158
|
: { connectOrCreate: {
|
5422
6159
|
where: {
|
5423
|
-
id: item.action.trade.id !== undefined ?
|
6160
|
+
id: item.action.trade.id !== undefined ? {
|
6161
|
+
equals: item.action.trade.id
|
6162
|
+
} : undefined,
|
6163
|
+
alpacaAccountId: item.action.trade.alpacaAccountId !== undefined ? {
|
6164
|
+
equals: item.action.trade.alpacaAccountId
|
6165
|
+
} : undefined,
|
6166
|
+
assetId: item.action.trade.assetId !== undefined ? {
|
6167
|
+
equals: item.action.trade.assetId
|
6168
|
+
} : undefined,
|
5424
6169
|
},
|
5425
6170
|
create: {
|
5426
6171
|
qty: item.action.trade.qty !== undefined ? item.action.trade.qty : undefined,
|
@@ -5472,7 +6217,10 @@ export const Asset = {
|
|
5472
6217
|
}
|
5473
6218
|
: { connectOrCreate: {
|
5474
6219
|
where: {
|
5475
|
-
id: item.stopLoss.id !== undefined ?
|
6220
|
+
id: item.stopLoss.id !== undefined ? {
|
6221
|
+
equals: item.stopLoss.id
|
6222
|
+
} : undefined,
|
6223
|
+
orderId: item.stopLoss.orderId !== undefined ? item.stopLoss.orderId : undefined,
|
5476
6224
|
},
|
5477
6225
|
create: {
|
5478
6226
|
stopPrice: item.stopLoss.stopPrice !== undefined ? item.stopLoss.stopPrice : undefined,
|
@@ -5488,7 +6236,10 @@ export const Asset = {
|
|
5488
6236
|
}
|
5489
6237
|
: { connectOrCreate: {
|
5490
6238
|
where: {
|
5491
|
-
id: item.takeProfit.id !== undefined ?
|
6239
|
+
id: item.takeProfit.id !== undefined ? {
|
6240
|
+
equals: item.takeProfit.id
|
6241
|
+
} : undefined,
|
6242
|
+
orderId: item.takeProfit.orderId !== undefined ? item.takeProfit.orderId : undefined,
|
5492
6243
|
},
|
5493
6244
|
create: {
|
5494
6245
|
limitPrice: item.takeProfit.limitPrice !== undefined ? item.takeProfit.limitPrice : undefined,
|
@@ -5504,7 +6255,12 @@ export const Asset = {
|
|
5504
6255
|
}
|
5505
6256
|
: { connectOrCreate: {
|
5506
6257
|
where: {
|
5507
|
-
id: item.alpacaAccount.id !== undefined ?
|
6258
|
+
id: item.alpacaAccount.id !== undefined ? {
|
6259
|
+
equals: item.alpacaAccount.id
|
6260
|
+
} : undefined,
|
6261
|
+
userId: item.alpacaAccount.userId !== undefined ? {
|
6262
|
+
equals: item.alpacaAccount.userId
|
6263
|
+
} : undefined,
|
5508
6264
|
},
|
5509
6265
|
create: {
|
5510
6266
|
type: item.alpacaAccount.type !== undefined ? item.alpacaAccount.type : undefined,
|
@@ -5524,7 +6280,9 @@ export const Asset = {
|
|
5524
6280
|
}
|
5525
6281
|
: { connectOrCreate: {
|
5526
6282
|
where: {
|
5527
|
-
id: item.alpacaAccount.user.id !== undefined ?
|
6283
|
+
id: item.alpacaAccount.user.id !== undefined ? {
|
6284
|
+
equals: item.alpacaAccount.user.id
|
6285
|
+
} : undefined,
|
5528
6286
|
email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
|
5529
6287
|
name: item.alpacaAccount.user.name !== undefined ? {
|
5530
6288
|
equals: item.alpacaAccount.user.name
|
@@ -5553,7 +6311,15 @@ export const Asset = {
|
|
5553
6311
|
}
|
5554
6312
|
: { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
|
5555
6313
|
where: {
|
5556
|
-
id: item.id !== undefined ?
|
6314
|
+
id: item.id !== undefined ? {
|
6315
|
+
equals: item.id
|
6316
|
+
} : undefined,
|
6317
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
6318
|
+
equals: item.alpacaAccountId
|
6319
|
+
} : undefined,
|
6320
|
+
assetId: item.assetId !== undefined ? {
|
6321
|
+
equals: item.assetId
|
6322
|
+
} : undefined,
|
5557
6323
|
},
|
5558
6324
|
create: {
|
5559
6325
|
qty: item.qty !== undefined ? item.qty : undefined,
|
@@ -5578,7 +6344,15 @@ export const Asset = {
|
|
5578
6344
|
}
|
5579
6345
|
: { connectOrCreate: item.alpacaAccount.positions.map((item) => ({
|
5580
6346
|
where: {
|
5581
|
-
id: item.id !== undefined ?
|
6347
|
+
id: item.id !== undefined ? {
|
6348
|
+
equals: item.id
|
6349
|
+
} : undefined,
|
6350
|
+
assetId: item.assetId !== undefined ? {
|
6351
|
+
equals: item.assetId
|
6352
|
+
} : undefined,
|
6353
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
6354
|
+
equals: item.alpacaAccountId
|
6355
|
+
} : undefined,
|
5582
6356
|
},
|
5583
6357
|
create: {
|
5584
6358
|
averageEntryPrice: item.averageEntryPrice !== undefined ? item.averageEntryPrice : undefined,
|
@@ -5605,7 +6379,12 @@ export const Asset = {
|
|
5605
6379
|
}
|
5606
6380
|
: { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
|
5607
6381
|
where: {
|
5608
|
-
id: item.id !== undefined ?
|
6382
|
+
id: item.id !== undefined ? {
|
6383
|
+
equals: item.id
|
6384
|
+
} : undefined,
|
6385
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
6386
|
+
equals: item.alpacaAccountId
|
6387
|
+
} : undefined,
|
5609
6388
|
},
|
5610
6389
|
create: {
|
5611
6390
|
message: item.message !== undefined ? item.message : undefined,
|
@@ -5625,7 +6404,12 @@ export const Asset = {
|
|
5625
6404
|
}
|
5626
6405
|
: { connectOrCreate: {
|
5627
6406
|
where: {
|
5628
|
-
id: item.action.id !== undefined ?
|
6407
|
+
id: item.action.id !== undefined ? {
|
6408
|
+
equals: item.action.id
|
6409
|
+
} : undefined,
|
6410
|
+
tradeId: item.action.tradeId !== undefined ? {
|
6411
|
+
equals: item.action.tradeId
|
6412
|
+
} : undefined,
|
5629
6413
|
},
|
5630
6414
|
create: {
|
5631
6415
|
sequence: item.action.sequence !== undefined ? item.action.sequence : undefined,
|
@@ -5641,7 +6425,15 @@ export const Asset = {
|
|
5641
6425
|
}
|
5642
6426
|
: { connectOrCreate: {
|
5643
6427
|
where: {
|
5644
|
-
id: item.action.trade.id !== undefined ?
|
6428
|
+
id: item.action.trade.id !== undefined ? {
|
6429
|
+
equals: item.action.trade.id
|
6430
|
+
} : undefined,
|
6431
|
+
alpacaAccountId: item.action.trade.alpacaAccountId !== undefined ? {
|
6432
|
+
equals: item.action.trade.alpacaAccountId
|
6433
|
+
} : undefined,
|
6434
|
+
assetId: item.action.trade.assetId !== undefined ? {
|
6435
|
+
equals: item.action.trade.assetId
|
6436
|
+
} : undefined,
|
5645
6437
|
},
|
5646
6438
|
create: {
|
5647
6439
|
qty: item.action.trade.qty !== undefined ? item.action.trade.qty : undefined,
|
@@ -5667,7 +6459,15 @@ export const Asset = {
|
|
5667
6459
|
positions: prop.positions ? {
|
5668
6460
|
upsert: prop.positions.map((item) => ({
|
5669
6461
|
where: {
|
5670
|
-
id: item.id !== undefined ?
|
6462
|
+
id: item.id !== undefined ? {
|
6463
|
+
equals: item.id
|
6464
|
+
} : undefined,
|
6465
|
+
assetId: item.assetId !== undefined ? {
|
6466
|
+
equals: item.assetId
|
6467
|
+
} : undefined,
|
6468
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
6469
|
+
equals: item.alpacaAccountId
|
6470
|
+
} : undefined,
|
5671
6471
|
},
|
5672
6472
|
update: {
|
5673
6473
|
id: item.id !== undefined ? {
|
@@ -5718,6 +6518,9 @@ export const Asset = {
|
|
5718
6518
|
id: item.alpacaAccount.id !== undefined ? {
|
5719
6519
|
equals: item.alpacaAccount.id
|
5720
6520
|
} : undefined,
|
6521
|
+
userId: item.alpacaAccount.userId !== undefined ? {
|
6522
|
+
equals: item.alpacaAccount.userId
|
6523
|
+
} : undefined,
|
5721
6524
|
},
|
5722
6525
|
update: {
|
5723
6526
|
id: item.alpacaAccount.id !== undefined ? {
|
@@ -5819,7 +6622,15 @@ export const Asset = {
|
|
5819
6622
|
trades: item.alpacaAccount.trades ? {
|
5820
6623
|
upsert: item.alpacaAccount.trades.map((item) => ({
|
5821
6624
|
where: {
|
5822
|
-
id: item.id !== undefined ?
|
6625
|
+
id: item.id !== undefined ? {
|
6626
|
+
equals: item.id
|
6627
|
+
} : undefined,
|
6628
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
6629
|
+
equals: item.alpacaAccountId
|
6630
|
+
} : undefined,
|
6631
|
+
assetId: item.assetId !== undefined ? {
|
6632
|
+
equals: item.assetId
|
6633
|
+
} : undefined,
|
5823
6634
|
},
|
5824
6635
|
update: {
|
5825
6636
|
id: item.id !== undefined ? {
|
@@ -5877,7 +6688,18 @@ export const Asset = {
|
|
5877
6688
|
orders: item.alpacaAccount.orders ? {
|
5878
6689
|
upsert: item.alpacaAccount.orders.map((item) => ({
|
5879
6690
|
where: {
|
5880
|
-
id: item.id !== undefined ?
|
6691
|
+
id: item.id !== undefined ? {
|
6692
|
+
equals: item.id
|
6693
|
+
} : undefined,
|
6694
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
6695
|
+
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
6696
|
+
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
6697
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
6698
|
+
equals: item.alpacaAccountId
|
6699
|
+
} : undefined,
|
6700
|
+
assetId: item.assetId !== undefined ? {
|
6701
|
+
equals: item.assetId
|
6702
|
+
} : undefined,
|
5881
6703
|
},
|
5882
6704
|
update: {
|
5883
6705
|
id: item.id !== undefined ? {
|
@@ -5979,7 +6801,12 @@ export const Asset = {
|
|
5979
6801
|
alerts: item.alpacaAccount.alerts ? {
|
5980
6802
|
upsert: item.alpacaAccount.alerts.map((item) => ({
|
5981
6803
|
where: {
|
5982
|
-
id: item.id !== undefined ?
|
6804
|
+
id: item.id !== undefined ? {
|
6805
|
+
equals: item.id
|
6806
|
+
} : undefined,
|
6807
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
6808
|
+
equals: item.alpacaAccountId
|
6809
|
+
} : undefined,
|
5983
6810
|
},
|
5984
6811
|
update: {
|
5985
6812
|
id: item.id !== undefined ? {
|
@@ -6021,7 +6848,9 @@ export const Asset = {
|
|
6021
6848
|
}
|
6022
6849
|
: { connectOrCreate: {
|
6023
6850
|
where: {
|
6024
|
-
id: item.alpacaAccount.user.id !== undefined ?
|
6851
|
+
id: item.alpacaAccount.user.id !== undefined ? {
|
6852
|
+
equals: item.alpacaAccount.user.id
|
6853
|
+
} : undefined,
|
6025
6854
|
email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
|
6026
6855
|
name: item.alpacaAccount.user.name !== undefined ? {
|
6027
6856
|
equals: item.alpacaAccount.user.name
|
@@ -6050,7 +6879,15 @@ export const Asset = {
|
|
6050
6879
|
}
|
6051
6880
|
: { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
|
6052
6881
|
where: {
|
6053
|
-
id: item.id !== undefined ?
|
6882
|
+
id: item.id !== undefined ? {
|
6883
|
+
equals: item.id
|
6884
|
+
} : undefined,
|
6885
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
6886
|
+
equals: item.alpacaAccountId
|
6887
|
+
} : undefined,
|
6888
|
+
assetId: item.assetId !== undefined ? {
|
6889
|
+
equals: item.assetId
|
6890
|
+
} : undefined,
|
6054
6891
|
},
|
6055
6892
|
create: {
|
6056
6893
|
qty: item.qty !== undefined ? item.qty : undefined,
|
@@ -6075,7 +6912,18 @@ export const Asset = {
|
|
6075
6912
|
}
|
6076
6913
|
: { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
|
6077
6914
|
where: {
|
6078
|
-
id: item.id !== undefined ?
|
6915
|
+
id: item.id !== undefined ? {
|
6916
|
+
equals: item.id
|
6917
|
+
} : undefined,
|
6918
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
6919
|
+
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
6920
|
+
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
6921
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
6922
|
+
equals: item.alpacaAccountId
|
6923
|
+
} : undefined,
|
6924
|
+
assetId: item.assetId !== undefined ? {
|
6925
|
+
equals: item.assetId
|
6926
|
+
} : undefined,
|
6079
6927
|
},
|
6080
6928
|
create: {
|
6081
6929
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
@@ -6111,7 +6959,12 @@ export const Asset = {
|
|
6111
6959
|
}
|
6112
6960
|
: { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
|
6113
6961
|
where: {
|
6114
|
-
id: item.id !== undefined ?
|
6962
|
+
id: item.id !== undefined ? {
|
6963
|
+
equals: item.id
|
6964
|
+
} : undefined,
|
6965
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
6966
|
+
equals: item.alpacaAccountId
|
6967
|
+
} : undefined,
|
6115
6968
|
},
|
6116
6969
|
create: {
|
6117
6970
|
message: item.message !== undefined ? item.message : undefined,
|
@@ -6146,7 +6999,12 @@ export const Asset = {
|
|
6146
6999
|
}
|
6147
7000
|
: { connectOrCreate: {
|
6148
7001
|
where: {
|
6149
|
-
id: item.alpacaAccount.id !== undefined ?
|
7002
|
+
id: item.alpacaAccount.id !== undefined ? {
|
7003
|
+
equals: item.alpacaAccount.id
|
7004
|
+
} : undefined,
|
7005
|
+
userId: item.alpacaAccount.userId !== undefined ? {
|
7006
|
+
equals: item.alpacaAccount.userId
|
7007
|
+
} : undefined,
|
6150
7008
|
},
|
6151
7009
|
create: {
|
6152
7010
|
type: item.alpacaAccount.type !== undefined ? item.alpacaAccount.type : undefined,
|
@@ -6166,7 +7024,9 @@ export const Asset = {
|
|
6166
7024
|
}
|
6167
7025
|
: { connectOrCreate: {
|
6168
7026
|
where: {
|
6169
|
-
id: item.alpacaAccount.user.id !== undefined ?
|
7027
|
+
id: item.alpacaAccount.user.id !== undefined ? {
|
7028
|
+
equals: item.alpacaAccount.user.id
|
7029
|
+
} : undefined,
|
6170
7030
|
email: item.alpacaAccount.user.email !== undefined ? item.alpacaAccount.user.email : undefined,
|
6171
7031
|
name: item.alpacaAccount.user.name !== undefined ? {
|
6172
7032
|
equals: item.alpacaAccount.user.name
|
@@ -6195,7 +7055,15 @@ export const Asset = {
|
|
6195
7055
|
}
|
6196
7056
|
: { connectOrCreate: item.alpacaAccount.trades.map((item) => ({
|
6197
7057
|
where: {
|
6198
|
-
id: item.id !== undefined ?
|
7058
|
+
id: item.id !== undefined ? {
|
7059
|
+
equals: item.id
|
7060
|
+
} : undefined,
|
7061
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
7062
|
+
equals: item.alpacaAccountId
|
7063
|
+
} : undefined,
|
7064
|
+
assetId: item.assetId !== undefined ? {
|
7065
|
+
equals: item.assetId
|
7066
|
+
} : undefined,
|
6199
7067
|
},
|
6200
7068
|
create: {
|
6201
7069
|
qty: item.qty !== undefined ? item.qty : undefined,
|
@@ -6220,7 +7088,18 @@ export const Asset = {
|
|
6220
7088
|
}
|
6221
7089
|
: { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
|
6222
7090
|
where: {
|
6223
|
-
id: item.id !== undefined ?
|
7091
|
+
id: item.id !== undefined ? {
|
7092
|
+
equals: item.id
|
7093
|
+
} : undefined,
|
7094
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
7095
|
+
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
7096
|
+
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
7097
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
7098
|
+
equals: item.alpacaAccountId
|
7099
|
+
} : undefined,
|
7100
|
+
assetId: item.assetId !== undefined ? {
|
7101
|
+
equals: item.assetId
|
7102
|
+
} : undefined,
|
6224
7103
|
},
|
6225
7104
|
create: {
|
6226
7105
|
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
@@ -6256,7 +7135,12 @@ export const Asset = {
|
|
6256
7135
|
}
|
6257
7136
|
: { connectOrCreate: item.alpacaAccount.alerts.map((item) => ({
|
6258
7137
|
where: {
|
6259
|
-
id: item.id !== undefined ?
|
7138
|
+
id: item.id !== undefined ? {
|
7139
|
+
equals: item.id
|
7140
|
+
} : undefined,
|
7141
|
+
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
7142
|
+
equals: item.alpacaAccountId
|
7143
|
+
} : undefined,
|
6260
7144
|
},
|
6261
7145
|
create: {
|
6262
7146
|
message: item.message !== undefined ? item.message : undefined,
|
@@ -6274,8 +7158,16 @@ export const Asset = {
|
|
6274
7158
|
newsMentions: prop.newsMentions ? {
|
6275
7159
|
upsert: prop.newsMentions.map((item) => ({
|
6276
7160
|
where: {
|
6277
|
-
id: item.id !== undefined ?
|
7161
|
+
id: item.id !== undefined ? {
|
7162
|
+
equals: item.id
|
7163
|
+
} : undefined,
|
6278
7164
|
url: item.url !== undefined ? item.url : undefined,
|
7165
|
+
assetId: item.assetId !== undefined ? {
|
7166
|
+
equals: item.assetId
|
7167
|
+
} : undefined,
|
7168
|
+
newsArticleId: item.newsArticleId !== undefined ? {
|
7169
|
+
equals: item.newsArticleId
|
7170
|
+
} : undefined,
|
6279
7171
|
},
|
6280
7172
|
update: {
|
6281
7173
|
id: item.id !== undefined ? {
|
@@ -6381,7 +7273,9 @@ export const Asset = {
|
|
6381
7273
|
}
|
6382
7274
|
: { connectOrCreate: {
|
6383
7275
|
where: {
|
6384
|
-
id: item.news.id !== undefined ?
|
7276
|
+
id: item.news.id !== undefined ? {
|
7277
|
+
equals: item.news.id
|
7278
|
+
} : undefined,
|
6385
7279
|
url: item.news.url !== undefined ? item.news.url : undefined,
|
6386
7280
|
title: item.news.title !== undefined ? {
|
6387
7281
|
equals: item.news.title
|
@@ -6476,7 +7370,9 @@ export const Asset = {
|
|
6476
7370
|
}`;
|
6477
7371
|
const variables = {
|
6478
7372
|
where: {
|
6479
|
-
id: props.id !== undefined ?
|
7373
|
+
id: props.id !== undefined ? {
|
7374
|
+
equals: props.id
|
7375
|
+
} : undefined,
|
6480
7376
|
symbol: props.symbol !== undefined ? props.symbol : undefined,
|
6481
7377
|
name: props.name !== undefined ? props.name : undefined,
|
6482
7378
|
type: props.type !== undefined ? props.type : undefined,
|
@@ -6530,8 +7426,6 @@ export const Asset = {
|
|
6530
7426
|
sharesOutstanding: props.sharesOutstanding !== undefined ? props.sharesOutstanding : undefined,
|
6531
7427
|
dividendDate: props.dividendDate !== undefined ? props.dividendDate : undefined,
|
6532
7428
|
exDividendDate: props.exDividendDate !== undefined ? props.exDividendDate : undefined,
|
6533
|
-
askPrice: props.askPrice !== undefined ? props.askPrice : undefined,
|
6534
|
-
bidPrice: props.bidPrice !== undefined ? props.bidPrice : undefined,
|
6535
7429
|
createdAt: props.createdAt !== undefined ? props.createdAt : undefined,
|
6536
7430
|
updatedAt: props.updatedAt !== undefined ? props.updatedAt : undefined,
|
6537
7431
|
},
|
@@ -6656,8 +7550,6 @@ export const Asset = {
|
|
6656
7550
|
sharesOutstanding: props.sharesOutstanding !== undefined ? props.sharesOutstanding : undefined,
|
6657
7551
|
dividendDate: props.dividendDate !== undefined ? props.dividendDate : undefined,
|
6658
7552
|
exDividendDate: props.exDividendDate !== undefined ? props.exDividendDate : undefined,
|
6659
|
-
askPrice: props.askPrice !== undefined ? props.askPrice : undefined,
|
6660
|
-
bidPrice: props.bidPrice !== undefined ? props.bidPrice : undefined,
|
6661
7553
|
createdAt: props.createdAt !== undefined ? props.createdAt : undefined,
|
6662
7554
|
updatedAt: props.updatedAt !== undefined ? props.updatedAt : undefined,
|
6663
7555
|
},
|