adaptic-backend 1.0.179 → 1.0.180
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 +15 -37
- package/Action.cjs +23 -61
- package/Alert.cjs +13 -31
- package/AlpacaAccount.cjs +30 -82
- package/Asset.cjs +30 -82
- package/Authenticator.cjs +15 -37
- package/Customer.cjs +15 -37
- package/EconomicEvent.cjs +8 -16
- package/MarketSentiment.cjs +8 -16
- package/NewsArticle.cjs +15 -37
- package/NewsArticleAssetSentiment.cjs +13 -31
- package/Order.cjs +11 -25
- package/Position.cjs +18 -46
- package/ScheduledOptionOrder.cjs +8 -16
- package/Session.cjs +15 -37
- package/StopLoss.cjs +9 -19
- package/TakeProfit.cjs +9 -19
- package/Trade.cjs +21 -55
- package/User.cjs +13 -31
- package/VerificationToken.cjs +8 -16
- package/client.cjs +3 -0
- package/client.d.ts +1 -0
- package/generated/typegraphql-prisma/enhance.cjs +1 -1
- package/generated/typegraphql-prisma/enhance.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/OrderWhereUniqueInput.cjs +6 -7
- package/generated/typegraphql-prisma/resolvers/inputs/OrderWhereUniqueInput.d.ts +1 -2
- package/generated/typegraphql-prisma/resolvers/inputs/OrderWhereUniqueInput.d.ts.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/OrderWhereUniqueInput.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 +8 -30
- package/server/Action.d.ts.map +1 -1
- package/server/Action.js.map +1 -1
- package/server/Action.mjs +16 -54
- package/server/Alert.d.ts.map +1 -1
- package/server/Alert.js.map +1 -1
- package/server/Alert.mjs +6 -24
- package/server/AlpacaAccount.d.ts.map +1 -1
- package/server/AlpacaAccount.js.map +1 -1
- package/server/AlpacaAccount.mjs +23 -75
- package/server/Asset.d.ts.map +1 -1
- package/server/Asset.js.map +1 -1
- package/server/Asset.mjs +23 -75
- package/server/Authenticator.d.ts.map +1 -1
- package/server/Authenticator.js.map +1 -1
- package/server/Authenticator.mjs +8 -30
- package/server/Customer.d.ts.map +1 -1
- package/server/Customer.js.map +1 -1
- package/server/Customer.mjs +8 -30
- package/server/EconomicEvent.d.ts.map +1 -1
- package/server/EconomicEvent.js.map +1 -1
- package/server/EconomicEvent.mjs +1 -9
- package/server/MarketSentiment.d.ts.map +1 -1
- package/server/MarketSentiment.js.map +1 -1
- package/server/MarketSentiment.mjs +1 -9
- package/server/NewsArticle.d.ts.map +1 -1
- package/server/NewsArticle.js.map +1 -1
- package/server/NewsArticle.mjs +8 -30
- package/server/NewsArticleAssetSentiment.d.ts.map +1 -1
- package/server/NewsArticleAssetSentiment.js.map +1 -1
- package/server/NewsArticleAssetSentiment.mjs +6 -24
- package/server/Order.d.ts.map +1 -1
- package/server/Order.js.map +1 -1
- package/server/Order.mjs +4 -18
- package/server/Position.d.ts.map +1 -1
- package/server/Position.js.map +1 -1
- package/server/Position.mjs +11 -39
- package/server/ScheduledOptionOrder.d.ts.map +1 -1
- package/server/ScheduledOptionOrder.js.map +1 -1
- package/server/ScheduledOptionOrder.mjs +1 -9
- package/server/Session.d.ts.map +1 -1
- package/server/Session.js.map +1 -1
- package/server/Session.mjs +8 -30
- package/server/StopLoss.d.ts.map +1 -1
- package/server/StopLoss.js.map +1 -1
- package/server/StopLoss.mjs +2 -12
- package/server/TakeProfit.d.ts.map +1 -1
- package/server/TakeProfit.js.map +1 -1
- package/server/TakeProfit.mjs +2 -12
- package/server/Trade.d.ts.map +1 -1
- package/server/Trade.js.map +1 -1
- package/server/Trade.mjs +14 -48
- package/server/User.d.ts.map +1 -1
- package/server/User.js.map +1 -1
- package/server/User.mjs +6 -24
- package/server/VerificationToken.d.ts.map +1 -1
- package/server/VerificationToken.js.map +1 -1
- package/server/VerificationToken.mjs +1 -9
- package/server/client.d.ts +1 -0
- package/server/client.d.ts.map +1 -1
- package/server/client.js.map +1 -1
- package/server/client.mjs +2 -0
- package/server/generated/typegraphql-prisma/enhance.js.map +1 -1
- package/server/generated/typegraphql-prisma/enhance.mjs +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/OrderWhereUniqueInput.d.ts +1 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/OrderWhereUniqueInput.d.ts.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/OrderWhereUniqueInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/OrderWhereUniqueInput.mjs +7 -8
package/Asset.cjs
CHANGED
@@ -242,7 +242,6 @@ exports.Asset = {
|
|
242
242
|
* @returns The created Asset or null.
|
243
243
|
*/
|
244
244
|
async create(props) {
|
245
|
-
const client = (0, client_2.createApolloClient)();
|
246
245
|
const CREATE_ONE_ASSET = (0, client_1.gql) `
|
247
246
|
mutation createOneAsset($data: AssetCreateInput!) {
|
248
247
|
createOneAsset(data: $data) {
|
@@ -396,11 +395,9 @@ exports.Asset = {
|
|
396
395
|
: { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
|
397
396
|
where: {
|
398
397
|
id: item.id !== undefined ? item.id : undefined,
|
398
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
399
399
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
400
400
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
401
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
402
|
-
equals: item.clientOrderId
|
403
|
-
} : undefined,
|
404
401
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
405
402
|
equals: item.alpacaAccountId
|
406
403
|
} : undefined,
|
@@ -522,11 +519,9 @@ exports.Asset = {
|
|
522
519
|
: { connectOrCreate: {
|
523
520
|
where: {
|
524
521
|
id: item.order.id !== undefined ? item.order.id : undefined,
|
522
|
+
clientOrderId: item.order.clientOrderId !== undefined ? item.order.clientOrderId : undefined,
|
525
523
|
actionId: item.order.actionId !== undefined ? item.order.actionId : undefined,
|
526
524
|
stopLossId: item.order.stopLossId !== undefined ? item.order.stopLossId : undefined,
|
527
|
-
clientOrderId: item.order.clientOrderId !== undefined ? {
|
528
|
-
equals: item.order.clientOrderId
|
529
|
-
} : undefined,
|
530
525
|
alpacaAccountId: item.order.alpacaAccountId !== undefined ? {
|
531
526
|
equals: item.order.alpacaAccountId
|
532
527
|
} : undefined,
|
@@ -578,11 +573,9 @@ exports.Asset = {
|
|
578
573
|
: { connectOrCreate: props.orders.map((item) => ({
|
579
574
|
where: {
|
580
575
|
id: item.id !== undefined ? item.id : undefined,
|
576
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
581
577
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
582
578
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
583
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
584
|
-
equals: item.clientOrderId
|
585
|
-
} : undefined,
|
586
579
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
587
580
|
equals: item.alpacaAccountId
|
588
581
|
} : undefined,
|
@@ -969,11 +962,9 @@ exports.Asset = {
|
|
969
962
|
: { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
|
970
963
|
where: {
|
971
964
|
id: item.id !== undefined ? item.id : undefined,
|
965
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
972
966
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
973
967
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
974
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
975
|
-
equals: item.clientOrderId
|
976
|
-
} : undefined,
|
977
968
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
978
969
|
equals: item.alpacaAccountId
|
979
970
|
} : undefined,
|
@@ -1096,7 +1087,7 @@ exports.Asset = {
|
|
1096
1087
|
};
|
1097
1088
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
1098
1089
|
try {
|
1099
|
-
const response = await client.mutate({ mutation: CREATE_ONE_ASSET, variables: filteredVariables });
|
1090
|
+
const response = await client_2.client.mutate({ mutation: CREATE_ONE_ASSET, variables: filteredVariables });
|
1100
1091
|
if (response.errors && response.errors.length > 0)
|
1101
1092
|
throw new Error(response.errors[0].message);
|
1102
1093
|
if (response && response.data && response.data.createOneAsset) {
|
@@ -1117,7 +1108,6 @@ exports.Asset = {
|
|
1117
1108
|
* @returns The count of created records or null.
|
1118
1109
|
*/
|
1119
1110
|
async createMany(props) {
|
1120
|
-
const client = (0, client_2.createApolloClient)();
|
1121
1111
|
const CREATE_MANY_ASSET = (0, client_1.gql) `
|
1122
1112
|
mutation createManyAsset($data: [AssetCreateManyInput!]!) {
|
1123
1113
|
createManyAsset(data: $data) {
|
@@ -1185,7 +1175,7 @@ exports.Asset = {
|
|
1185
1175
|
};
|
1186
1176
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
1187
1177
|
try {
|
1188
|
-
const response = await client.mutate({ mutation: CREATE_MANY_ASSET, variables: filteredVariables });
|
1178
|
+
const response = await client_2.client.mutate({ mutation: CREATE_MANY_ASSET, variables: filteredVariables });
|
1189
1179
|
if (response.errors && response.errors.length > 0)
|
1190
1180
|
throw new Error(response.errors[0].message);
|
1191
1181
|
if (response && response.data && response.data.createManyAsset) {
|
@@ -1206,7 +1196,6 @@ exports.Asset = {
|
|
1206
1196
|
* @returns The updated Asset or null.
|
1207
1197
|
*/
|
1208
1198
|
async update(props) {
|
1209
|
-
const client = (0, client_2.createApolloClient)();
|
1210
1199
|
const UPDATE_ONE_ASSET = (0, client_1.gql) `
|
1211
1200
|
mutation updateOneAsset($data: AssetUpdateInput!, $where: AssetWhereUniqueInput!) {
|
1212
1201
|
updateOneAsset(data: $data, where: $where) {
|
@@ -1606,11 +1595,9 @@ exports.Asset = {
|
|
1606
1595
|
upsert: item.alpacaAccount.orders.map((item) => ({
|
1607
1596
|
where: {
|
1608
1597
|
id: item.id !== undefined ? item.id : undefined,
|
1598
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
1609
1599
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
1610
1600
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
1611
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
1612
|
-
equals: item.clientOrderId
|
1613
|
-
} : undefined,
|
1614
1601
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
1615
1602
|
equals: item.alpacaAccountId
|
1616
1603
|
} : undefined,
|
@@ -1881,11 +1868,9 @@ exports.Asset = {
|
|
1881
1868
|
: { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
|
1882
1869
|
where: {
|
1883
1870
|
id: item.id !== undefined ? item.id : undefined,
|
1871
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
1884
1872
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
1885
1873
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
1886
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
1887
|
-
equals: item.clientOrderId
|
1888
|
-
} : undefined,
|
1889
1874
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
1890
1875
|
equals: item.alpacaAccountId
|
1891
1876
|
} : undefined,
|
@@ -2147,11 +2132,9 @@ exports.Asset = {
|
|
2147
2132
|
: { connectOrCreate: {
|
2148
2133
|
where: {
|
2149
2134
|
id: item.order.id !== undefined ? item.order.id : undefined,
|
2135
|
+
clientOrderId: item.order.clientOrderId !== undefined ? item.order.clientOrderId : undefined,
|
2150
2136
|
actionId: item.order.actionId !== undefined ? item.order.actionId : undefined,
|
2151
2137
|
stopLossId: item.order.stopLossId !== undefined ? item.order.stopLossId : undefined,
|
2152
|
-
clientOrderId: item.order.clientOrderId !== undefined ? {
|
2153
|
-
equals: item.order.clientOrderId
|
2154
|
-
} : undefined,
|
2155
2138
|
alpacaAccountId: item.order.alpacaAccountId !== undefined ? {
|
2156
2139
|
equals: item.order.alpacaAccountId
|
2157
2140
|
} : undefined,
|
@@ -2265,11 +2248,9 @@ exports.Asset = {
|
|
2265
2248
|
: { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
|
2266
2249
|
where: {
|
2267
2250
|
id: item.id !== undefined ? item.id : undefined,
|
2251
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
2268
2252
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
2269
2253
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
2270
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
2271
|
-
equals: item.clientOrderId
|
2272
|
-
} : undefined,
|
2273
2254
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
2274
2255
|
equals: item.alpacaAccountId
|
2275
2256
|
} : undefined,
|
@@ -2391,11 +2372,9 @@ exports.Asset = {
|
|
2391
2372
|
: { connectOrCreate: {
|
2392
2373
|
where: {
|
2393
2374
|
id: item.order.id !== undefined ? item.order.id : undefined,
|
2375
|
+
clientOrderId: item.order.clientOrderId !== undefined ? item.order.clientOrderId : undefined,
|
2394
2376
|
actionId: item.order.actionId !== undefined ? item.order.actionId : undefined,
|
2395
2377
|
stopLossId: item.order.stopLossId !== undefined ? item.order.stopLossId : undefined,
|
2396
|
-
clientOrderId: item.order.clientOrderId !== undefined ? {
|
2397
|
-
equals: item.order.clientOrderId
|
2398
|
-
} : undefined,
|
2399
2378
|
alpacaAccountId: item.order.alpacaAccountId !== undefined ? {
|
2400
2379
|
equals: item.order.alpacaAccountId
|
2401
2380
|
} : undefined,
|
@@ -2442,11 +2421,9 @@ exports.Asset = {
|
|
2442
2421
|
upsert: props.orders.map((item) => ({
|
2443
2422
|
where: {
|
2444
2423
|
id: item.id !== undefined ? item.id : undefined,
|
2424
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
2445
2425
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
2446
2426
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
2447
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
2448
|
-
equals: item.clientOrderId
|
2449
|
-
} : undefined,
|
2450
2427
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
2451
2428
|
equals: item.alpacaAccountId
|
2452
2429
|
} : undefined,
|
@@ -3616,11 +3593,9 @@ exports.Asset = {
|
|
3616
3593
|
upsert: item.alpacaAccount.orders.map((item) => ({
|
3617
3594
|
where: {
|
3618
3595
|
id: item.id !== undefined ? item.id : undefined,
|
3596
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
3619
3597
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
3620
3598
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
3621
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
3622
|
-
equals: item.clientOrderId
|
3623
|
-
} : undefined,
|
3624
3599
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
3625
3600
|
equals: item.alpacaAccountId
|
3626
3601
|
} : undefined,
|
@@ -3846,11 +3821,9 @@ exports.Asset = {
|
|
3846
3821
|
: { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
|
3847
3822
|
where: {
|
3848
3823
|
id: item.id !== undefined ? item.id : undefined,
|
3824
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
3849
3825
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
3850
3826
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
3851
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
3852
|
-
equals: item.clientOrderId
|
3853
|
-
} : undefined,
|
3854
3827
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
3855
3828
|
equals: item.alpacaAccountId
|
3856
3829
|
} : undefined,
|
@@ -4018,11 +3991,9 @@ exports.Asset = {
|
|
4018
3991
|
: { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
|
4019
3992
|
where: {
|
4020
3993
|
id: item.id !== undefined ? item.id : undefined,
|
3994
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
4021
3995
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
4022
3996
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
4023
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
4024
|
-
equals: item.clientOrderId
|
4025
|
-
} : undefined,
|
4026
3997
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
4027
3998
|
equals: item.alpacaAccountId
|
4028
3999
|
} : undefined,
|
@@ -4231,7 +4202,7 @@ exports.Asset = {
|
|
4231
4202
|
};
|
4232
4203
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
4233
4204
|
try {
|
4234
|
-
const response = await client.mutate({ mutation: UPDATE_ONE_ASSET, variables: filteredVariables });
|
4205
|
+
const response = await client_2.client.mutate({ mutation: UPDATE_ONE_ASSET, variables: filteredVariables });
|
4235
4206
|
if (response.errors && response.errors.length > 0)
|
4236
4207
|
throw new Error(response.errors[0].message);
|
4237
4208
|
if (response && response.data && response.data.updateOneAsset) {
|
@@ -4252,7 +4223,6 @@ exports.Asset = {
|
|
4252
4223
|
* @returns The count of created records or null.
|
4253
4224
|
*/
|
4254
4225
|
async updateMany(props) {
|
4255
|
-
const client = (0, client_2.createApolloClient)();
|
4256
4226
|
const UPDATE_MANY_ASSET = (0, client_1.gql) `
|
4257
4227
|
mutation updateManyAsset($data: [AssetCreateManyInput!]!) {
|
4258
4228
|
updateManyAsset(data: $data) {
|
@@ -4652,11 +4622,9 @@ exports.Asset = {
|
|
4652
4622
|
upsert: item.alpacaAccount.orders.map((item) => ({
|
4653
4623
|
where: {
|
4654
4624
|
id: item.id !== undefined ? item.id : undefined,
|
4625
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
4655
4626
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
4656
4627
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
4657
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
4658
|
-
equals: item.clientOrderId
|
4659
|
-
} : undefined,
|
4660
4628
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
4661
4629
|
equals: item.alpacaAccountId
|
4662
4630
|
} : undefined,
|
@@ -4927,11 +4895,9 @@ exports.Asset = {
|
|
4927
4895
|
: { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
|
4928
4896
|
where: {
|
4929
4897
|
id: item.id !== undefined ? item.id : undefined,
|
4898
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
4930
4899
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
4931
4900
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
4932
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
4933
|
-
equals: item.clientOrderId
|
4934
|
-
} : undefined,
|
4935
4901
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
4936
4902
|
equals: item.alpacaAccountId
|
4937
4903
|
} : undefined,
|
@@ -5193,11 +5159,9 @@ exports.Asset = {
|
|
5193
5159
|
: { connectOrCreate: {
|
5194
5160
|
where: {
|
5195
5161
|
id: item.order.id !== undefined ? item.order.id : undefined,
|
5162
|
+
clientOrderId: item.order.clientOrderId !== undefined ? item.order.clientOrderId : undefined,
|
5196
5163
|
actionId: item.order.actionId !== undefined ? item.order.actionId : undefined,
|
5197
5164
|
stopLossId: item.order.stopLossId !== undefined ? item.order.stopLossId : undefined,
|
5198
|
-
clientOrderId: item.order.clientOrderId !== undefined ? {
|
5199
|
-
equals: item.order.clientOrderId
|
5200
|
-
} : undefined,
|
5201
5165
|
alpacaAccountId: item.order.alpacaAccountId !== undefined ? {
|
5202
5166
|
equals: item.order.alpacaAccountId
|
5203
5167
|
} : undefined,
|
@@ -5311,11 +5275,9 @@ exports.Asset = {
|
|
5311
5275
|
: { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
|
5312
5276
|
where: {
|
5313
5277
|
id: item.id !== undefined ? item.id : undefined,
|
5278
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
5314
5279
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
5315
5280
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
5316
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
5317
|
-
equals: item.clientOrderId
|
5318
|
-
} : undefined,
|
5319
5281
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
5320
5282
|
equals: item.alpacaAccountId
|
5321
5283
|
} : undefined,
|
@@ -5437,11 +5399,9 @@ exports.Asset = {
|
|
5437
5399
|
: { connectOrCreate: {
|
5438
5400
|
where: {
|
5439
5401
|
id: item.order.id !== undefined ? item.order.id : undefined,
|
5402
|
+
clientOrderId: item.order.clientOrderId !== undefined ? item.order.clientOrderId : undefined,
|
5440
5403
|
actionId: item.order.actionId !== undefined ? item.order.actionId : undefined,
|
5441
5404
|
stopLossId: item.order.stopLossId !== undefined ? item.order.stopLossId : undefined,
|
5442
|
-
clientOrderId: item.order.clientOrderId !== undefined ? {
|
5443
|
-
equals: item.order.clientOrderId
|
5444
|
-
} : undefined,
|
5445
5405
|
alpacaAccountId: item.order.alpacaAccountId !== undefined ? {
|
5446
5406
|
equals: item.order.alpacaAccountId
|
5447
5407
|
} : undefined,
|
@@ -5488,11 +5448,9 @@ exports.Asset = {
|
|
5488
5448
|
upsert: prop.orders.map((item) => ({
|
5489
5449
|
where: {
|
5490
5450
|
id: item.id !== undefined ? item.id : undefined,
|
5451
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
5491
5452
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
5492
5453
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
5493
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
5494
|
-
equals: item.clientOrderId
|
5495
|
-
} : undefined,
|
5496
5454
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
5497
5455
|
equals: item.alpacaAccountId
|
5498
5456
|
} : undefined,
|
@@ -6662,11 +6620,9 @@ exports.Asset = {
|
|
6662
6620
|
upsert: item.alpacaAccount.orders.map((item) => ({
|
6663
6621
|
where: {
|
6664
6622
|
id: item.id !== undefined ? item.id : undefined,
|
6623
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
6665
6624
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
6666
6625
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
6667
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
6668
|
-
equals: item.clientOrderId
|
6669
|
-
} : undefined,
|
6670
6626
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
6671
6627
|
equals: item.alpacaAccountId
|
6672
6628
|
} : undefined,
|
@@ -6892,11 +6848,9 @@ exports.Asset = {
|
|
6892
6848
|
: { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
|
6893
6849
|
where: {
|
6894
6850
|
id: item.id !== undefined ? item.id : undefined,
|
6851
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
6895
6852
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
6896
6853
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
6897
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
6898
|
-
equals: item.clientOrderId
|
6899
|
-
} : undefined,
|
6900
6854
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
6901
6855
|
equals: item.alpacaAccountId
|
6902
6856
|
} : undefined,
|
@@ -7064,11 +7018,9 @@ exports.Asset = {
|
|
7064
7018
|
: { connectOrCreate: item.alpacaAccount.orders.map((item) => ({
|
7065
7019
|
where: {
|
7066
7020
|
id: item.id !== undefined ? item.id : undefined,
|
7021
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
7067
7022
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
7068
7023
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
7069
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
7070
|
-
equals: item.clientOrderId
|
7071
|
-
} : undefined,
|
7072
7024
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
7073
7025
|
equals: item.alpacaAccountId
|
7074
7026
|
} : undefined,
|
@@ -7277,7 +7229,7 @@ exports.Asset = {
|
|
7277
7229
|
}));
|
7278
7230
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
7279
7231
|
try {
|
7280
|
-
const response = await client.mutate({ mutation: UPDATE_MANY_ASSET, variables: filteredVariables });
|
7232
|
+
const response = await client_2.client.mutate({ mutation: UPDATE_MANY_ASSET, variables: filteredVariables });
|
7281
7233
|
if (response.errors && response.errors.length > 0)
|
7282
7234
|
throw new Error(response.errors[0].message);
|
7283
7235
|
if (response && response.data && response.data.updateManyAsset) {
|
@@ -7298,7 +7250,6 @@ exports.Asset = {
|
|
7298
7250
|
* @returns The deleted Asset or null.
|
7299
7251
|
*/
|
7300
7252
|
async delete(props) {
|
7301
|
-
const client = (0, client_2.createApolloClient)();
|
7302
7253
|
const DELETE_ONE_ASSET = (0, client_1.gql) `
|
7303
7254
|
mutation deleteOneAsset($where: AssetWhereUniqueInput!) {
|
7304
7255
|
deleteOneAsset(where: $where) {
|
@@ -7312,7 +7263,7 @@ exports.Asset = {
|
|
7312
7263
|
};
|
7313
7264
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
7314
7265
|
try {
|
7315
|
-
const response = await client.mutate({ mutation: DELETE_ONE_ASSET, variables: filteredVariables });
|
7266
|
+
const response = await client_2.client.mutate({ mutation: DELETE_ONE_ASSET, variables: filteredVariables });
|
7316
7267
|
if (response.errors && response.errors.length > 0)
|
7317
7268
|
throw new Error(response.errors[0].message);
|
7318
7269
|
if (response && response.data && response.data.deleteOneAsset) {
|
@@ -7334,7 +7285,6 @@ exports.Asset = {
|
|
7334
7285
|
*/
|
7335
7286
|
async get(props) {
|
7336
7287
|
var _a, _b;
|
7337
|
-
const client = (0, client_2.createApolloClient)();
|
7338
7288
|
const GET_ASSET = (0, client_1.gql) `
|
7339
7289
|
query getAsset($where: AssetWhereUniqueInput!) {
|
7340
7290
|
getAsset(where: $where) {
|
@@ -7403,7 +7353,7 @@ exports.Asset = {
|
|
7403
7353
|
};
|
7404
7354
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
7405
7355
|
try {
|
7406
|
-
const response = await client.query({ query: GET_ASSET, variables: filteredVariables });
|
7356
|
+
const response = await client_2.client.query({ query: GET_ASSET, variables: filteredVariables });
|
7407
7357
|
if (response.errors && response.errors.length > 0)
|
7408
7358
|
throw new Error(response.errors[0].message);
|
7409
7359
|
return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.getAsset) !== null && _b !== void 0 ? _b : null;
|
@@ -7424,7 +7374,6 @@ exports.Asset = {
|
|
7424
7374
|
*/
|
7425
7375
|
async getAll() {
|
7426
7376
|
var _a, _b;
|
7427
|
-
const client = (0, client_2.createApolloClient)();
|
7428
7377
|
const GET_ALL_ASSET = (0, client_1.gql) `
|
7429
7378
|
query getAllAsset {
|
7430
7379
|
assets {
|
@@ -7432,7 +7381,7 @@ exports.Asset = {
|
|
7432
7381
|
}
|
7433
7382
|
}`;
|
7434
7383
|
try {
|
7435
|
-
const response = await client.query({ query: GET_ALL_ASSET });
|
7384
|
+
const response = await client_2.client.query({ query: GET_ALL_ASSET });
|
7436
7385
|
if (response.errors && response.errors.length > 0)
|
7437
7386
|
throw new Error(response.errors[0].message);
|
7438
7387
|
return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.assets) !== null && _b !== void 0 ? _b : null;
|
@@ -7453,7 +7402,6 @@ exports.Asset = {
|
|
7453
7402
|
* @returns An array of found Asset records or null.
|
7454
7403
|
*/
|
7455
7404
|
async findMany(props) {
|
7456
|
-
const client = (0, client_2.createApolloClient)();
|
7457
7405
|
const FIND_MANY_ASSET = (0, client_1.gql) `
|
7458
7406
|
query findManyAsset($where: AssetWhereInput!) {
|
7459
7407
|
assets(where: $where) {
|
@@ -7528,7 +7476,7 @@ exports.Asset = {
|
|
7528
7476
|
};
|
7529
7477
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
7530
7478
|
try {
|
7531
|
-
const response = await client.query({ query: FIND_MANY_ASSET, variables: filteredVariables });
|
7479
|
+
const response = await client_2.client.query({ query: FIND_MANY_ASSET, variables: filteredVariables });
|
7532
7480
|
if (response.errors && response.errors.length > 0)
|
7533
7481
|
throw new Error(response.errors[0].message);
|
7534
7482
|
if (response && response.data && response.data.Assets) {
|
package/Authenticator.cjs
CHANGED
@@ -195,7 +195,6 @@ exports.Authenticator = {
|
|
195
195
|
* @returns The created Authenticator or null.
|
196
196
|
*/
|
197
197
|
async create(props) {
|
198
|
-
const client = (0, client_2.createApolloClient)();
|
199
198
|
const CREATE_ONE_AUTHENTICATOR = (0, client_1.gql) `
|
200
199
|
mutation createOneAuthenticator($data: AuthenticatorCreateInput!) {
|
201
200
|
createOneAuthenticator(data: $data) {
|
@@ -378,11 +377,9 @@ exports.Authenticator = {
|
|
378
377
|
: { connectOrCreate: item.orders.map((item) => ({
|
379
378
|
where: {
|
380
379
|
id: item.id !== undefined ? item.id : undefined,
|
380
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
381
381
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
382
382
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
383
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
384
|
-
equals: item.clientOrderId
|
385
|
-
} : undefined,
|
386
383
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
387
384
|
equals: item.alpacaAccountId
|
388
385
|
} : undefined,
|
@@ -483,7 +480,7 @@ exports.Authenticator = {
|
|
483
480
|
};
|
484
481
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
485
482
|
try {
|
486
|
-
const response = await client.mutate({ mutation: CREATE_ONE_AUTHENTICATOR, variables: filteredVariables });
|
483
|
+
const response = await client_2.client.mutate({ mutation: CREATE_ONE_AUTHENTICATOR, variables: filteredVariables });
|
487
484
|
if (response.errors && response.errors.length > 0)
|
488
485
|
throw new Error(response.errors[0].message);
|
489
486
|
if (response && response.data && response.data.createOneAuthenticator) {
|
@@ -504,7 +501,6 @@ exports.Authenticator = {
|
|
504
501
|
* @returns The count of created records or null.
|
505
502
|
*/
|
506
503
|
async createMany(props) {
|
507
|
-
const client = (0, client_2.createApolloClient)();
|
508
504
|
const CREATE_MANY_AUTHENTICATOR = (0, client_1.gql) `
|
509
505
|
mutation createManyAuthenticator($data: [AuthenticatorCreateManyInput!]!) {
|
510
506
|
createManyAuthenticator(data: $data) {
|
@@ -521,7 +517,7 @@ exports.Authenticator = {
|
|
521
517
|
};
|
522
518
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
523
519
|
try {
|
524
|
-
const response = await client.mutate({ mutation: CREATE_MANY_AUTHENTICATOR, variables: filteredVariables });
|
520
|
+
const response = await client_2.client.mutate({ mutation: CREATE_MANY_AUTHENTICATOR, variables: filteredVariables });
|
525
521
|
if (response.errors && response.errors.length > 0)
|
526
522
|
throw new Error(response.errors[0].message);
|
527
523
|
if (response && response.data && response.data.createManyAuthenticator) {
|
@@ -542,7 +538,6 @@ exports.Authenticator = {
|
|
542
538
|
* @returns The updated Authenticator or null.
|
543
539
|
*/
|
544
540
|
async update(props) {
|
545
|
-
const client = (0, client_2.createApolloClient)();
|
546
541
|
const UPDATE_ONE_AUTHENTICATOR = (0, client_1.gql) `
|
547
542
|
mutation updateOneAuthenticator($data: AuthenticatorUpdateInput!, $where: AuthenticatorWhereUniqueInput!) {
|
548
543
|
updateOneAuthenticator(data: $data, where: $where) {
|
@@ -878,11 +873,9 @@ exports.Authenticator = {
|
|
878
873
|
upsert: item.orders.map((item) => ({
|
879
874
|
where: {
|
880
875
|
id: item.id !== undefined ? item.id : undefined,
|
876
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
881
877
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
882
878
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
883
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
884
|
-
equals: item.clientOrderId
|
885
|
-
} : undefined,
|
886
879
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
887
880
|
equals: item.alpacaAccountId
|
888
881
|
} : undefined,
|
@@ -1155,11 +1148,9 @@ exports.Authenticator = {
|
|
1155
1148
|
: { connectOrCreate: item.orders.map((item) => ({
|
1156
1149
|
where: {
|
1157
1150
|
id: item.id !== undefined ? item.id : undefined,
|
1151
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
1158
1152
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
1159
1153
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
1160
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
1161
|
-
equals: item.clientOrderId
|
1162
|
-
} : undefined,
|
1163
1154
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
1164
1155
|
equals: item.alpacaAccountId
|
1165
1156
|
} : undefined,
|
@@ -1410,11 +1401,9 @@ exports.Authenticator = {
|
|
1410
1401
|
: { connectOrCreate: item.orders.map((item) => ({
|
1411
1402
|
where: {
|
1412
1403
|
id: item.id !== undefined ? item.id : undefined,
|
1404
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
1413
1405
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
1414
1406
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
1415
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
1416
|
-
equals: item.clientOrderId
|
1417
|
-
} : undefined,
|
1418
1407
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
1419
1408
|
equals: item.alpacaAccountId
|
1420
1409
|
} : undefined,
|
@@ -1515,7 +1504,7 @@ exports.Authenticator = {
|
|
1515
1504
|
};
|
1516
1505
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
1517
1506
|
try {
|
1518
|
-
const response = await client.mutate({ mutation: UPDATE_ONE_AUTHENTICATOR, variables: filteredVariables });
|
1507
|
+
const response = await client_2.client.mutate({ mutation: UPDATE_ONE_AUTHENTICATOR, variables: filteredVariables });
|
1519
1508
|
if (response.errors && response.errors.length > 0)
|
1520
1509
|
throw new Error(response.errors[0].message);
|
1521
1510
|
if (response && response.data && response.data.updateOneAuthenticator) {
|
@@ -1536,7 +1525,6 @@ exports.Authenticator = {
|
|
1536
1525
|
* @returns The count of created records or null.
|
1537
1526
|
*/
|
1538
1527
|
async updateMany(props) {
|
1539
|
-
const client = (0, client_2.createApolloClient)();
|
1540
1528
|
const UPDATE_MANY_AUTHENTICATOR = (0, client_1.gql) `
|
1541
1529
|
mutation updateManyAuthenticator($data: [AuthenticatorCreateManyInput!]!) {
|
1542
1530
|
updateManyAuthenticator(data: $data) {
|
@@ -1872,11 +1860,9 @@ exports.Authenticator = {
|
|
1872
1860
|
upsert: item.orders.map((item) => ({
|
1873
1861
|
where: {
|
1874
1862
|
id: item.id !== undefined ? item.id : undefined,
|
1863
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
1875
1864
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
1876
1865
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
1877
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
1878
|
-
equals: item.clientOrderId
|
1879
|
-
} : undefined,
|
1880
1866
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
1881
1867
|
equals: item.alpacaAccountId
|
1882
1868
|
} : undefined,
|
@@ -2149,11 +2135,9 @@ exports.Authenticator = {
|
|
2149
2135
|
: { connectOrCreate: item.orders.map((item) => ({
|
2150
2136
|
where: {
|
2151
2137
|
id: item.id !== undefined ? item.id : undefined,
|
2138
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
2152
2139
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
2153
2140
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
2154
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
2155
|
-
equals: item.clientOrderId
|
2156
|
-
} : undefined,
|
2157
2141
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
2158
2142
|
equals: item.alpacaAccountId
|
2159
2143
|
} : undefined,
|
@@ -2404,11 +2388,9 @@ exports.Authenticator = {
|
|
2404
2388
|
: { connectOrCreate: item.orders.map((item) => ({
|
2405
2389
|
where: {
|
2406
2390
|
id: item.id !== undefined ? item.id : undefined,
|
2391
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
2407
2392
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
2408
2393
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
2409
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
2410
|
-
equals: item.clientOrderId
|
2411
|
-
} : undefined,
|
2412
2394
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
2413
2395
|
equals: item.alpacaAccountId
|
2414
2396
|
} : undefined,
|
@@ -2509,7 +2491,7 @@ exports.Authenticator = {
|
|
2509
2491
|
}));
|
2510
2492
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
2511
2493
|
try {
|
2512
|
-
const response = await client.mutate({ mutation: UPDATE_MANY_AUTHENTICATOR, variables: filteredVariables });
|
2494
|
+
const response = await client_2.client.mutate({ mutation: UPDATE_MANY_AUTHENTICATOR, variables: filteredVariables });
|
2513
2495
|
if (response.errors && response.errors.length > 0)
|
2514
2496
|
throw new Error(response.errors[0].message);
|
2515
2497
|
if (response && response.data && response.data.updateManyAuthenticator) {
|
@@ -2530,7 +2512,6 @@ exports.Authenticator = {
|
|
2530
2512
|
* @returns The deleted Authenticator or null.
|
2531
2513
|
*/
|
2532
2514
|
async delete(props) {
|
2533
|
-
const client = (0, client_2.createApolloClient)();
|
2534
2515
|
const DELETE_ONE_AUTHENTICATOR = (0, client_1.gql) `
|
2535
2516
|
mutation deleteOneAuthenticator($where: AuthenticatorWhereUniqueInput!) {
|
2536
2517
|
deleteOneAuthenticator(where: $where) {
|
@@ -2544,7 +2525,7 @@ exports.Authenticator = {
|
|
2544
2525
|
};
|
2545
2526
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
2546
2527
|
try {
|
2547
|
-
const response = await client.mutate({ mutation: DELETE_ONE_AUTHENTICATOR, variables: filteredVariables });
|
2528
|
+
const response = await client_2.client.mutate({ mutation: DELETE_ONE_AUTHENTICATOR, variables: filteredVariables });
|
2548
2529
|
if (response.errors && response.errors.length > 0)
|
2549
2530
|
throw new Error(response.errors[0].message);
|
2550
2531
|
if (response && response.data && response.data.deleteOneAuthenticator) {
|
@@ -2566,7 +2547,6 @@ exports.Authenticator = {
|
|
2566
2547
|
*/
|
2567
2548
|
async get(props) {
|
2568
2549
|
var _a, _b;
|
2569
|
-
const client = (0, client_2.createApolloClient)();
|
2570
2550
|
const GET_AUTHENTICATOR = (0, client_1.gql) `
|
2571
2551
|
query getAuthenticator($where: AuthenticatorWhereUniqueInput!) {
|
2572
2552
|
getAuthenticator(where: $where) {
|
@@ -2588,7 +2568,7 @@ exports.Authenticator = {
|
|
2588
2568
|
};
|
2589
2569
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
2590
2570
|
try {
|
2591
|
-
const response = await client.query({ query: GET_AUTHENTICATOR, variables: filteredVariables });
|
2571
|
+
const response = await client_2.client.query({ query: GET_AUTHENTICATOR, variables: filteredVariables });
|
2592
2572
|
if (response.errors && response.errors.length > 0)
|
2593
2573
|
throw new Error(response.errors[0].message);
|
2594
2574
|
return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.getAuthenticator) !== null && _b !== void 0 ? _b : null;
|
@@ -2609,7 +2589,6 @@ exports.Authenticator = {
|
|
2609
2589
|
*/
|
2610
2590
|
async getAll() {
|
2611
2591
|
var _a, _b;
|
2612
|
-
const client = (0, client_2.createApolloClient)();
|
2613
2592
|
const GET_ALL_AUTHENTICATOR = (0, client_1.gql) `
|
2614
2593
|
query getAllAuthenticator {
|
2615
2594
|
authenticators {
|
@@ -2617,7 +2596,7 @@ exports.Authenticator = {
|
|
2617
2596
|
}
|
2618
2597
|
}`;
|
2619
2598
|
try {
|
2620
|
-
const response = await client.query({ query: GET_ALL_AUTHENTICATOR });
|
2599
|
+
const response = await client_2.client.query({ query: GET_ALL_AUTHENTICATOR });
|
2621
2600
|
if (response.errors && response.errors.length > 0)
|
2622
2601
|
throw new Error(response.errors[0].message);
|
2623
2602
|
return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.authenticators) !== null && _b !== void 0 ? _b : null;
|
@@ -2638,7 +2617,6 @@ exports.Authenticator = {
|
|
2638
2617
|
* @returns An array of found Authenticator records or null.
|
2639
2618
|
*/
|
2640
2619
|
async findMany(props) {
|
2641
|
-
const client = (0, client_2.createApolloClient)();
|
2642
2620
|
const FIND_MANY_AUTHENTICATOR = (0, client_1.gql) `
|
2643
2621
|
query findManyAuthenticator($where: AuthenticatorWhereInput!) {
|
2644
2622
|
authenticators(where: $where) {
|
@@ -2662,7 +2640,7 @@ exports.Authenticator = {
|
|
2662
2640
|
};
|
2663
2641
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
2664
2642
|
try {
|
2665
|
-
const response = await client.query({ query: FIND_MANY_AUTHENTICATOR, variables: filteredVariables });
|
2643
|
+
const response = await client_2.client.query({ query: FIND_MANY_AUTHENTICATOR, variables: filteredVariables });
|
2666
2644
|
if (response.errors && response.errors.length > 0)
|
2667
2645
|
throw new Error(response.errors[0].message);
|
2668
2646
|
if (response && response.data && response.data.Authenticators) {
|