adaptic-backend 1.0.14 → 1.0.16
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/AIRecommendation.d.ts +2 -3
- package/AIRecommendation.js +20 -10
- package/Account.d.ts +2 -3
- package/Account.js +6 -7
- package/Alert.d.ts +2 -3
- package/Alert.js +15 -7
- package/Asset.d.ts +2 -3
- package/Asset.js +19 -10
- package/Authenticator.d.ts +2 -3
- package/Authenticator.js +6 -7
- package/Customer.d.ts +2 -3
- package/Customer.js +6 -7
- package/EconomicEvent.d.ts +2 -3
- package/EconomicEvent.js +6 -7
- package/EnvironmentVariable.d.ts +2 -3
- package/EnvironmentVariable.js +15 -7
- package/Holding.d.ts +2 -3
- package/Holding.js +20 -10
- package/News.d.ts +2 -3
- package/News.js +20 -13
- package/NewsAssetSentiment.d.ts +2 -3
- package/NewsAssetSentiment.js +15 -10
- package/Order.d.ts +2 -3
- package/Order.js +20 -10
- package/PerformanceMetric.d.ts +2 -3
- package/PerformanceMetric.js +15 -7
- package/RiskAllocation.d.ts +2 -3
- package/RiskAllocation.js +15 -7
- package/Session.d.ts +2 -3
- package/Session.js +6 -7
- package/Trade.d.ts +2 -3
- package/Trade.js +20 -10
- package/TradeStep.d.ts +2 -3
- package/TradeStep.js +13 -13
- package/TradingAccount.d.ts +2 -3
- package/TradingAccount.js +40 -31
- package/User.d.ts +2 -3
- package/User.js +36 -25
- package/VerificationToken.d.ts +2 -3
- package/VerificationToken.js +6 -7
- package/generated/typegraphql-prisma/enhance.js +2 -2
- package/generated/typegraphql-prisma/enhance.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/AssetWhereUniqueInput.d.ts +1 -2
- package/generated/typegraphql-prisma/resolvers/inputs/AssetWhereUniqueInput.d.ts.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/AssetWhereUniqueInput.js +6 -7
- package/generated/typegraphql-prisma/resolvers/inputs/AssetWhereUniqueInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/NewsWhereUniqueInput.d.ts +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/NewsWhereUniqueInput.d.ts.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/NewsWhereUniqueInput.js +6 -6
- package/generated/typegraphql-prisma/resolvers/inputs/NewsWhereUniqueInput.js.map +1 -1
- package/package.json +1 -1
- package/server/AIRecommendation.d.ts +2 -3
- package/server/AIRecommendation.d.ts.map +1 -1
- package/server/AIRecommendation.js.map +1 -1
- package/server/AIRecommendation.mjs +20 -10
- package/server/Account.d.ts +2 -3
- package/server/Account.d.ts.map +1 -1
- package/server/Account.js.map +1 -1
- package/server/Account.mjs +6 -7
- package/server/Alert.d.ts +2 -3
- package/server/Alert.d.ts.map +1 -1
- package/server/Alert.js.map +1 -1
- package/server/Alert.mjs +15 -7
- package/server/Asset.d.ts +2 -3
- package/server/Asset.d.ts.map +1 -1
- package/server/Asset.js.map +1 -1
- package/server/Asset.mjs +19 -10
- package/server/Authenticator.d.ts +2 -3
- package/server/Authenticator.d.ts.map +1 -1
- package/server/Authenticator.js.map +1 -1
- package/server/Authenticator.mjs +6 -7
- package/server/Customer.d.ts +2 -3
- package/server/Customer.d.ts.map +1 -1
- package/server/Customer.js.map +1 -1
- package/server/Customer.mjs +6 -7
- package/server/EconomicEvent.d.ts +2 -3
- package/server/EconomicEvent.d.ts.map +1 -1
- package/server/EconomicEvent.js.map +1 -1
- package/server/EconomicEvent.mjs +6 -7
- package/server/EnvironmentVariable.d.ts +2 -3
- package/server/EnvironmentVariable.d.ts.map +1 -1
- package/server/EnvironmentVariable.js.map +1 -1
- package/server/EnvironmentVariable.mjs +15 -7
- package/server/Holding.d.ts +2 -3
- package/server/Holding.d.ts.map +1 -1
- package/server/Holding.js.map +1 -1
- package/server/Holding.mjs +20 -10
- package/server/News.d.ts +2 -3
- package/server/News.d.ts.map +1 -1
- package/server/News.js.map +1 -1
- package/server/News.mjs +20 -13
- package/server/NewsAssetSentiment.d.ts +2 -3
- package/server/NewsAssetSentiment.d.ts.map +1 -1
- package/server/NewsAssetSentiment.js.map +1 -1
- package/server/NewsAssetSentiment.mjs +15 -10
- package/server/Order.d.ts +2 -3
- package/server/Order.d.ts.map +1 -1
- package/server/Order.js.map +1 -1
- package/server/Order.mjs +20 -10
- package/server/PerformanceMetric.d.ts +2 -3
- package/server/PerformanceMetric.d.ts.map +1 -1
- package/server/PerformanceMetric.js.map +1 -1
- package/server/PerformanceMetric.mjs +15 -7
- package/server/RiskAllocation.d.ts +2 -3
- package/server/RiskAllocation.d.ts.map +1 -1
- package/server/RiskAllocation.js.map +1 -1
- package/server/RiskAllocation.mjs +15 -7
- package/server/Session.d.ts +2 -3
- package/server/Session.d.ts.map +1 -1
- package/server/Session.js.map +1 -1
- package/server/Session.mjs +6 -7
- package/server/Trade.d.ts +2 -3
- package/server/Trade.d.ts.map +1 -1
- package/server/Trade.js.map +1 -1
- package/server/Trade.mjs +20 -10
- package/server/TradeStep.d.ts +2 -3
- package/server/TradeStep.d.ts.map +1 -1
- package/server/TradeStep.js.map +1 -1
- package/server/TradeStep.mjs +13 -13
- package/server/TradingAccount.d.ts +2 -3
- package/server/TradingAccount.d.ts.map +1 -1
- package/server/TradingAccount.js.map +1 -1
- package/server/TradingAccount.mjs +40 -31
- package/server/User.d.ts +2 -3
- package/server/User.d.ts.map +1 -1
- package/server/User.js.map +1 -1
- package/server/User.mjs +36 -25
- package/server/VerificationToken.d.ts +2 -3
- package/server/VerificationToken.d.ts.map +1 -1
- package/server/VerificationToken.js.map +1 -1
- package/server/VerificationToken.mjs +6 -7
- package/server/generated/typegraphql-prisma/enhance.js.map +1 -1
- package/server/generated/typegraphql-prisma/enhance.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/AssetWhereUniqueInput.d.ts +1 -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 +7 -8
- package/server/generated/typegraphql-prisma/resolvers/inputs/NewsWhereUniqueInput.d.ts +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/NewsWhereUniqueInput.d.ts.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/NewsWhereUniqueInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/NewsWhereUniqueInput.mjs +7 -7
package/Order.js
CHANGED
|
@@ -555,6 +555,9 @@ exports.Order = {
|
|
|
555
555
|
connectOrCreate: props.portfolio.environmentVariables.map((item) => ({
|
|
556
556
|
where: {
|
|
557
557
|
id: item.id !== undefined ? item.id : undefined,
|
|
558
|
+
key: item.key !== undefined ? {
|
|
559
|
+
equals: item.key
|
|
560
|
+
} : undefined,
|
|
558
561
|
},
|
|
559
562
|
create: {
|
|
560
563
|
key: item.key !== undefined ? item.key : undefined,
|
|
@@ -570,9 +573,8 @@ exports.Order = {
|
|
|
570
573
|
connectOrCreate: {
|
|
571
574
|
where: {
|
|
572
575
|
id: props.asset.id !== undefined ? props.asset.id : undefined,
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
} : undefined,
|
|
576
|
+
symbol: props.asset.symbol !== undefined ? props.asset.symbol : undefined,
|
|
577
|
+
name: props.asset.name !== undefined ? props.asset.name : undefined,
|
|
576
578
|
},
|
|
577
579
|
create: {
|
|
578
580
|
symbol: props.asset.symbol !== undefined ? props.asset.symbol : undefined,
|
|
@@ -694,7 +696,6 @@ exports.Order = {
|
|
|
694
696
|
},
|
|
695
697
|
/**
|
|
696
698
|
* Update a single Order record.
|
|
697
|
-
* @param id - Unique identifier of the record to update.
|
|
698
699
|
* @param props - Properties to update.
|
|
699
700
|
* @param client - Apollo Client instance.
|
|
700
701
|
* @returns The updated Order or null.
|
|
@@ -1665,6 +1666,9 @@ exports.Order = {
|
|
|
1665
1666
|
upsert: props.portfolio.environmentVariables.map((item) => ({
|
|
1666
1667
|
where: {
|
|
1667
1668
|
id: item.id !== undefined ? item.id : undefined,
|
|
1669
|
+
key: item.key !== undefined ? {
|
|
1670
|
+
equals: item.key
|
|
1671
|
+
} : undefined,
|
|
1668
1672
|
},
|
|
1669
1673
|
update: {
|
|
1670
1674
|
key: item.key !== undefined ? {
|
|
@@ -1786,6 +1790,9 @@ exports.Order = {
|
|
|
1786
1790
|
connectOrCreate: props.portfolio.environmentVariables.map((item) => ({
|
|
1787
1791
|
where: {
|
|
1788
1792
|
id: item.id !== undefined ? item.id : undefined,
|
|
1793
|
+
key: item.key !== undefined ? {
|
|
1794
|
+
equals: item.key
|
|
1795
|
+
} : undefined,
|
|
1789
1796
|
},
|
|
1790
1797
|
create: {
|
|
1791
1798
|
key: item.key !== undefined ? item.key : undefined,
|
|
@@ -1803,6 +1810,9 @@ exports.Order = {
|
|
|
1803
1810
|
id: props.asset.id !== undefined ? {
|
|
1804
1811
|
equals: props.asset.id
|
|
1805
1812
|
} : undefined,
|
|
1813
|
+
symbol: props.asset.symbol !== undefined ? {
|
|
1814
|
+
equals: props.asset.symbol
|
|
1815
|
+
} : undefined,
|
|
1806
1816
|
name: props.asset.name !== undefined ? {
|
|
1807
1817
|
equals: props.asset.name
|
|
1808
1818
|
} : undefined,
|
|
@@ -1995,7 +2005,7 @@ exports.Order = {
|
|
|
1995
2005
|
},
|
|
1996
2006
|
/**
|
|
1997
2007
|
* Delete a single Order record.
|
|
1998
|
-
* @param
|
|
2008
|
+
* @param props - Properties to update.
|
|
1999
2009
|
* @param client - Apollo Client instance.
|
|
2000
2010
|
* @returns The deleted Order or null.
|
|
2001
2011
|
*/
|
|
@@ -2287,7 +2297,7 @@ exports.Order = {
|
|
|
2287
2297
|
},
|
|
2288
2298
|
/**
|
|
2289
2299
|
* Retrieve a single Order record by ID.
|
|
2290
|
-
* @param
|
|
2300
|
+
* @param props - Properties to update.
|
|
2291
2301
|
* @param client - Apollo Client instance.
|
|
2292
2302
|
* @returns The retrieved Order or null.
|
|
2293
2303
|
*/
|
|
@@ -2584,7 +2594,7 @@ exports.Order = {
|
|
|
2584
2594
|
var _a, _b;
|
|
2585
2595
|
const GET_ALL_ORDER = (0, client_1.gql) `
|
|
2586
2596
|
query getAllOrder {
|
|
2587
|
-
|
|
2597
|
+
orders {
|
|
2588
2598
|
id
|
|
2589
2599
|
userId
|
|
2590
2600
|
portfolioId
|
|
@@ -2850,7 +2860,7 @@ exports.Order = {
|
|
|
2850
2860
|
const response = await client.query({ query: GET_ALL_ORDER });
|
|
2851
2861
|
if (response.errors && response.errors.length > 0)
|
|
2852
2862
|
throw new Error(response.errors[0].message);
|
|
2853
|
-
return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.
|
|
2863
|
+
return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.orders) !== null && _b !== void 0 ? _b : null;
|
|
2854
2864
|
}
|
|
2855
2865
|
catch (error) {
|
|
2856
2866
|
console.error('Error in getAllOrder:', error);
|
|
@@ -2866,7 +2876,7 @@ exports.Order = {
|
|
|
2866
2876
|
async findMany(props, client) {
|
|
2867
2877
|
const FIND_MANY_ORDER = (0, client_1.gql) `
|
|
2868
2878
|
query findManyOrder($where: OrderWhereInput!) {
|
|
2869
|
-
|
|
2879
|
+
orders(where: $where) {
|
|
2870
2880
|
id
|
|
2871
2881
|
userId
|
|
2872
2882
|
portfolioId
|
|
@@ -3141,7 +3151,7 @@ exports.Order = {
|
|
|
3141
3151
|
if (response.errors && response.errors.length > 0)
|
|
3142
3152
|
throw new Error(response.errors[0].message);
|
|
3143
3153
|
if (response && response.data && response.data.Orders) {
|
|
3144
|
-
return response.data.
|
|
3154
|
+
return response.data.orders;
|
|
3145
3155
|
}
|
|
3146
3156
|
else {
|
|
3147
3157
|
return [];
|
package/PerformanceMetric.d.ts
CHANGED
|
@@ -22,7 +22,6 @@ export declare const PerformanceMetric: {
|
|
|
22
22
|
} | null>;
|
|
23
23
|
/**
|
|
24
24
|
* Update a single PerformanceMetric record.
|
|
25
|
-
* @param id - Unique identifier of the record to update.
|
|
26
25
|
* @param props - Properties to update.
|
|
27
26
|
* @param client - Apollo Client instance.
|
|
28
27
|
* @returns The updated PerformanceMetric or null.
|
|
@@ -30,14 +29,14 @@ export declare const PerformanceMetric: {
|
|
|
30
29
|
update(props: PerformanceMetricType, client: ApolloClient<NormalizedCacheObject>): Promise<PerformanceMetricType>;
|
|
31
30
|
/**
|
|
32
31
|
* Delete a single PerformanceMetric record.
|
|
33
|
-
* @param
|
|
32
|
+
* @param props - Properties to update.
|
|
34
33
|
* @param client - Apollo Client instance.
|
|
35
34
|
* @returns The deleted PerformanceMetric or null.
|
|
36
35
|
*/
|
|
37
36
|
delete(props: PerformanceMetricType, client: ApolloClient<NormalizedCacheObject>): Promise<PerformanceMetricType>;
|
|
38
37
|
/**
|
|
39
38
|
* Retrieve a single PerformanceMetric record by ID.
|
|
40
|
-
* @param
|
|
39
|
+
* @param props - Properties to update.
|
|
41
40
|
* @param client - Apollo Client instance.
|
|
42
41
|
* @returns The retrieved PerformanceMetric or null.
|
|
43
42
|
*/
|
package/PerformanceMetric.js
CHANGED
|
@@ -558,6 +558,9 @@ exports.PerformanceMetric = {
|
|
|
558
558
|
connectOrCreate: props.portfolio.environmentVariables.map((item) => ({
|
|
559
559
|
where: {
|
|
560
560
|
id: item.id !== undefined ? item.id : undefined,
|
|
561
|
+
key: item.key !== undefined ? {
|
|
562
|
+
equals: item.key
|
|
563
|
+
} : undefined,
|
|
561
564
|
},
|
|
562
565
|
create: {
|
|
563
566
|
key: item.key !== undefined ? item.key : undefined,
|
|
@@ -628,7 +631,6 @@ exports.PerformanceMetric = {
|
|
|
628
631
|
},
|
|
629
632
|
/**
|
|
630
633
|
* Update a single PerformanceMetric record.
|
|
631
|
-
* @param id - Unique identifier of the record to update.
|
|
632
634
|
* @param props - Properties to update.
|
|
633
635
|
* @param client - Apollo Client instance.
|
|
634
636
|
* @returns The updated PerformanceMetric or null.
|
|
@@ -1617,6 +1619,9 @@ exports.PerformanceMetric = {
|
|
|
1617
1619
|
upsert: props.portfolio.environmentVariables.map((item) => ({
|
|
1618
1620
|
where: {
|
|
1619
1621
|
id: item.id !== undefined ? item.id : undefined,
|
|
1622
|
+
key: item.key !== undefined ? {
|
|
1623
|
+
equals: item.key
|
|
1624
|
+
} : undefined,
|
|
1620
1625
|
},
|
|
1621
1626
|
update: {
|
|
1622
1627
|
key: item.key !== undefined ? {
|
|
@@ -1741,6 +1746,9 @@ exports.PerformanceMetric = {
|
|
|
1741
1746
|
connectOrCreate: props.portfolio.environmentVariables.map((item) => ({
|
|
1742
1747
|
where: {
|
|
1743
1748
|
id: item.id !== undefined ? item.id : undefined,
|
|
1749
|
+
key: item.key !== undefined ? {
|
|
1750
|
+
equals: item.key
|
|
1751
|
+
} : undefined,
|
|
1744
1752
|
},
|
|
1745
1753
|
create: {
|
|
1746
1754
|
key: item.key !== undefined ? item.key : undefined,
|
|
@@ -1773,7 +1781,7 @@ exports.PerformanceMetric = {
|
|
|
1773
1781
|
},
|
|
1774
1782
|
/**
|
|
1775
1783
|
* Delete a single PerformanceMetric record.
|
|
1776
|
-
* @param
|
|
1784
|
+
* @param props - Properties to update.
|
|
1777
1785
|
* @param client - Apollo Client instance.
|
|
1778
1786
|
* @returns The deleted PerformanceMetric or null.
|
|
1779
1787
|
*/
|
|
@@ -2065,7 +2073,7 @@ exports.PerformanceMetric = {
|
|
|
2065
2073
|
},
|
|
2066
2074
|
/**
|
|
2067
2075
|
* Retrieve a single PerformanceMetric record by ID.
|
|
2068
|
-
* @param
|
|
2076
|
+
* @param props - Properties to update.
|
|
2069
2077
|
* @param client - Apollo Client instance.
|
|
2070
2078
|
* @returns The retrieved PerformanceMetric or null.
|
|
2071
2079
|
*/
|
|
@@ -2362,7 +2370,7 @@ exports.PerformanceMetric = {
|
|
|
2362
2370
|
var _a, _b;
|
|
2363
2371
|
const GET_ALL_PERFORMANCEMETRIC = (0, client_1.gql) `
|
|
2364
2372
|
query getAllPerformanceMetric {
|
|
2365
|
-
|
|
2373
|
+
performanceMetrics {
|
|
2366
2374
|
id
|
|
2367
2375
|
userId
|
|
2368
2376
|
portfolioId
|
|
@@ -2628,7 +2636,7 @@ exports.PerformanceMetric = {
|
|
|
2628
2636
|
const response = await client.query({ query: GET_ALL_PERFORMANCEMETRIC });
|
|
2629
2637
|
if (response.errors && response.errors.length > 0)
|
|
2630
2638
|
throw new Error(response.errors[0].message);
|
|
2631
|
-
return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.
|
|
2639
|
+
return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.performanceMetrics) !== null && _b !== void 0 ? _b : null;
|
|
2632
2640
|
}
|
|
2633
2641
|
catch (error) {
|
|
2634
2642
|
console.error('Error in getAllPerformanceMetric:', error);
|
|
@@ -2644,7 +2652,7 @@ exports.PerformanceMetric = {
|
|
|
2644
2652
|
async findMany(props, client) {
|
|
2645
2653
|
const FIND_MANY_PERFORMANCEMETRIC = (0, client_1.gql) `
|
|
2646
2654
|
query findManyPerformanceMetric($where: PerformanceMetricWhereInput!) {
|
|
2647
|
-
|
|
2655
|
+
performanceMetrics(where: $where) {
|
|
2648
2656
|
id
|
|
2649
2657
|
userId
|
|
2650
2658
|
portfolioId
|
|
@@ -2919,7 +2927,7 @@ exports.PerformanceMetric = {
|
|
|
2919
2927
|
if (response.errors && response.errors.length > 0)
|
|
2920
2928
|
throw new Error(response.errors[0].message);
|
|
2921
2929
|
if (response && response.data && response.data.PerformanceMetrics) {
|
|
2922
|
-
return response.data.
|
|
2930
|
+
return response.data.performanceMetrics;
|
|
2923
2931
|
}
|
|
2924
2932
|
else {
|
|
2925
2933
|
return [];
|
package/RiskAllocation.d.ts
CHANGED
|
@@ -22,7 +22,6 @@ export declare const RiskAllocation: {
|
|
|
22
22
|
} | null>;
|
|
23
23
|
/**
|
|
24
24
|
* Update a single RiskAllocation record.
|
|
25
|
-
* @param id - Unique identifier of the record to update.
|
|
26
25
|
* @param props - Properties to update.
|
|
27
26
|
* @param client - Apollo Client instance.
|
|
28
27
|
* @returns The updated RiskAllocation or null.
|
|
@@ -30,14 +29,14 @@ export declare const RiskAllocation: {
|
|
|
30
29
|
update(props: RiskAllocationType, client: ApolloClient<NormalizedCacheObject>): Promise<RiskAllocationType>;
|
|
31
30
|
/**
|
|
32
31
|
* Delete a single RiskAllocation record.
|
|
33
|
-
* @param
|
|
32
|
+
* @param props - Properties to update.
|
|
34
33
|
* @param client - Apollo Client instance.
|
|
35
34
|
* @returns The deleted RiskAllocation or null.
|
|
36
35
|
*/
|
|
37
36
|
delete(props: RiskAllocationType, client: ApolloClient<NormalizedCacheObject>): Promise<RiskAllocationType>;
|
|
38
37
|
/**
|
|
39
38
|
* Retrieve a single RiskAllocation record by ID.
|
|
40
|
-
* @param
|
|
39
|
+
* @param props - Properties to update.
|
|
41
40
|
* @param client - Apollo Client instance.
|
|
42
41
|
* @returns The retrieved RiskAllocation or null.
|
|
43
42
|
*/
|
package/RiskAllocation.js
CHANGED
|
@@ -558,6 +558,9 @@ exports.RiskAllocation = {
|
|
|
558
558
|
connectOrCreate: props.portfolio.environmentVariables.map((item) => ({
|
|
559
559
|
where: {
|
|
560
560
|
id: item.id !== undefined ? item.id : undefined,
|
|
561
|
+
key: item.key !== undefined ? {
|
|
562
|
+
equals: item.key
|
|
563
|
+
} : undefined,
|
|
561
564
|
},
|
|
562
565
|
create: {
|
|
563
566
|
key: item.key !== undefined ? item.key : undefined,
|
|
@@ -628,7 +631,6 @@ exports.RiskAllocation = {
|
|
|
628
631
|
},
|
|
629
632
|
/**
|
|
630
633
|
* Update a single RiskAllocation record.
|
|
631
|
-
* @param id - Unique identifier of the record to update.
|
|
632
634
|
* @param props - Properties to update.
|
|
633
635
|
* @param client - Apollo Client instance.
|
|
634
636
|
* @returns The updated RiskAllocation or null.
|
|
@@ -1620,6 +1622,9 @@ exports.RiskAllocation = {
|
|
|
1620
1622
|
upsert: props.portfolio.environmentVariables.map((item) => ({
|
|
1621
1623
|
where: {
|
|
1622
1624
|
id: item.id !== undefined ? item.id : undefined,
|
|
1625
|
+
key: item.key !== undefined ? {
|
|
1626
|
+
equals: item.key
|
|
1627
|
+
} : undefined,
|
|
1623
1628
|
},
|
|
1624
1629
|
update: {
|
|
1625
1630
|
key: item.key !== undefined ? {
|
|
@@ -1744,6 +1749,9 @@ exports.RiskAllocation = {
|
|
|
1744
1749
|
connectOrCreate: props.portfolio.environmentVariables.map((item) => ({
|
|
1745
1750
|
where: {
|
|
1746
1751
|
id: item.id !== undefined ? item.id : undefined,
|
|
1752
|
+
key: item.key !== undefined ? {
|
|
1753
|
+
equals: item.key
|
|
1754
|
+
} : undefined,
|
|
1747
1755
|
},
|
|
1748
1756
|
create: {
|
|
1749
1757
|
key: item.key !== undefined ? item.key : undefined,
|
|
@@ -1776,7 +1784,7 @@ exports.RiskAllocation = {
|
|
|
1776
1784
|
},
|
|
1777
1785
|
/**
|
|
1778
1786
|
* Delete a single RiskAllocation record.
|
|
1779
|
-
* @param
|
|
1787
|
+
* @param props - Properties to update.
|
|
1780
1788
|
* @param client - Apollo Client instance.
|
|
1781
1789
|
* @returns The deleted RiskAllocation or null.
|
|
1782
1790
|
*/
|
|
@@ -2068,7 +2076,7 @@ exports.RiskAllocation = {
|
|
|
2068
2076
|
},
|
|
2069
2077
|
/**
|
|
2070
2078
|
* Retrieve a single RiskAllocation record by ID.
|
|
2071
|
-
* @param
|
|
2079
|
+
* @param props - Properties to update.
|
|
2072
2080
|
* @param client - Apollo Client instance.
|
|
2073
2081
|
* @returns The retrieved RiskAllocation or null.
|
|
2074
2082
|
*/
|
|
@@ -2365,7 +2373,7 @@ exports.RiskAllocation = {
|
|
|
2365
2373
|
var _a, _b;
|
|
2366
2374
|
const GET_ALL_RISKALLOCATION = (0, client_1.gql) `
|
|
2367
2375
|
query getAllRiskAllocation {
|
|
2368
|
-
|
|
2376
|
+
riskAllocations {
|
|
2369
2377
|
id
|
|
2370
2378
|
userId
|
|
2371
2379
|
portfolioId
|
|
@@ -2631,7 +2639,7 @@ exports.RiskAllocation = {
|
|
|
2631
2639
|
const response = await client.query({ query: GET_ALL_RISKALLOCATION });
|
|
2632
2640
|
if (response.errors && response.errors.length > 0)
|
|
2633
2641
|
throw new Error(response.errors[0].message);
|
|
2634
|
-
return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.
|
|
2642
|
+
return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.riskAllocations) !== null && _b !== void 0 ? _b : null;
|
|
2635
2643
|
}
|
|
2636
2644
|
catch (error) {
|
|
2637
2645
|
console.error('Error in getAllRiskAllocation:', error);
|
|
@@ -2647,7 +2655,7 @@ exports.RiskAllocation = {
|
|
|
2647
2655
|
async findMany(props, client) {
|
|
2648
2656
|
const FIND_MANY_RISKALLOCATION = (0, client_1.gql) `
|
|
2649
2657
|
query findManyRiskAllocation($where: RiskAllocationWhereInput!) {
|
|
2650
|
-
|
|
2658
|
+
riskAllocations(where: $where) {
|
|
2651
2659
|
id
|
|
2652
2660
|
userId
|
|
2653
2661
|
portfolioId
|
|
@@ -2922,7 +2930,7 @@ exports.RiskAllocation = {
|
|
|
2922
2930
|
if (response.errors && response.errors.length > 0)
|
|
2923
2931
|
throw new Error(response.errors[0].message);
|
|
2924
2932
|
if (response && response.data && response.data.RiskAllocations) {
|
|
2925
|
-
return response.data.
|
|
2933
|
+
return response.data.riskAllocations;
|
|
2926
2934
|
}
|
|
2927
2935
|
else {
|
|
2928
2936
|
return [];
|
package/Session.d.ts
CHANGED
|
@@ -22,7 +22,6 @@ export declare const Session: {
|
|
|
22
22
|
} | null>;
|
|
23
23
|
/**
|
|
24
24
|
* Update a single Session record.
|
|
25
|
-
* @param id - Unique identifier of the record to update.
|
|
26
25
|
* @param props - Properties to update.
|
|
27
26
|
* @param client - Apollo Client instance.
|
|
28
27
|
* @returns The updated Session or null.
|
|
@@ -30,14 +29,14 @@ export declare const Session: {
|
|
|
30
29
|
update(props: SessionType, client: ApolloClient<NormalizedCacheObject>): Promise<SessionType>;
|
|
31
30
|
/**
|
|
32
31
|
* Delete a single Session record.
|
|
33
|
-
* @param
|
|
32
|
+
* @param props - Properties to update.
|
|
34
33
|
* @param client - Apollo Client instance.
|
|
35
34
|
* @returns The deleted Session or null.
|
|
36
35
|
*/
|
|
37
36
|
delete(props: SessionType, client: ApolloClient<NormalizedCacheObject>): Promise<SessionType>;
|
|
38
37
|
/**
|
|
39
38
|
* Retrieve a single Session record by ID.
|
|
40
|
-
* @param
|
|
39
|
+
* @param props - Properties to update.
|
|
41
40
|
* @param client - Apollo Client instance.
|
|
42
41
|
* @returns The retrieved Session or null.
|
|
43
42
|
*/
|
package/Session.js
CHANGED
|
@@ -503,7 +503,6 @@ exports.Session = {
|
|
|
503
503
|
},
|
|
504
504
|
/**
|
|
505
505
|
* Update a single Session record.
|
|
506
|
-
* @param id - Unique identifier of the record to update.
|
|
507
506
|
* @param props - Properties to update.
|
|
508
507
|
* @param client - Apollo Client instance.
|
|
509
508
|
* @returns The updated Session or null.
|
|
@@ -1285,7 +1284,7 @@ exports.Session = {
|
|
|
1285
1284
|
},
|
|
1286
1285
|
/**
|
|
1287
1286
|
* Delete a single Session record.
|
|
1288
|
-
* @param
|
|
1287
|
+
* @param props - Properties to update.
|
|
1289
1288
|
* @param client - Apollo Client instance.
|
|
1290
1289
|
* @returns The deleted Session or null.
|
|
1291
1290
|
*/
|
|
@@ -1577,7 +1576,7 @@ exports.Session = {
|
|
|
1577
1576
|
},
|
|
1578
1577
|
/**
|
|
1579
1578
|
* Retrieve a single Session record by ID.
|
|
1580
|
-
* @param
|
|
1579
|
+
* @param props - Properties to update.
|
|
1581
1580
|
* @param client - Apollo Client instance.
|
|
1582
1581
|
* @returns The retrieved Session or null.
|
|
1583
1582
|
*/
|
|
@@ -1874,7 +1873,7 @@ exports.Session = {
|
|
|
1874
1873
|
var _a, _b;
|
|
1875
1874
|
const GET_ALL_SESSION = (0, client_1.gql) `
|
|
1876
1875
|
query getAllSession {
|
|
1877
|
-
|
|
1876
|
+
sessions {
|
|
1878
1877
|
id
|
|
1879
1878
|
sessionToken
|
|
1880
1879
|
userId
|
|
@@ -2140,7 +2139,7 @@ exports.Session = {
|
|
|
2140
2139
|
const response = await client.query({ query: GET_ALL_SESSION });
|
|
2141
2140
|
if (response.errors && response.errors.length > 0)
|
|
2142
2141
|
throw new Error(response.errors[0].message);
|
|
2143
|
-
return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.
|
|
2142
|
+
return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.sessions) !== null && _b !== void 0 ? _b : null;
|
|
2144
2143
|
}
|
|
2145
2144
|
catch (error) {
|
|
2146
2145
|
console.error('Error in getAllSession:', error);
|
|
@@ -2156,7 +2155,7 @@ exports.Session = {
|
|
|
2156
2155
|
async findMany(props, client) {
|
|
2157
2156
|
const FIND_MANY_SESSION = (0, client_1.gql) `
|
|
2158
2157
|
query findManySession($where: SessionWhereInput!) {
|
|
2159
|
-
|
|
2158
|
+
sessions(where: $where) {
|
|
2160
2159
|
id
|
|
2161
2160
|
sessionToken
|
|
2162
2161
|
userId
|
|
@@ -2431,7 +2430,7 @@ exports.Session = {
|
|
|
2431
2430
|
if (response.errors && response.errors.length > 0)
|
|
2432
2431
|
throw new Error(response.errors[0].message);
|
|
2433
2432
|
if (response && response.data && response.data.Sessions) {
|
|
2434
|
-
return response.data.
|
|
2433
|
+
return response.data.sessions;
|
|
2435
2434
|
}
|
|
2436
2435
|
else {
|
|
2437
2436
|
return [];
|
package/Trade.d.ts
CHANGED
|
@@ -22,7 +22,6 @@ export declare const Trade: {
|
|
|
22
22
|
} | null>;
|
|
23
23
|
/**
|
|
24
24
|
* Update a single Trade record.
|
|
25
|
-
* @param id - Unique identifier of the record to update.
|
|
26
25
|
* @param props - Properties to update.
|
|
27
26
|
* @param client - Apollo Client instance.
|
|
28
27
|
* @returns The updated Trade or null.
|
|
@@ -30,14 +29,14 @@ export declare const Trade: {
|
|
|
30
29
|
update(props: TradeType, client: ApolloClient<NormalizedCacheObject>): Promise<TradeType>;
|
|
31
30
|
/**
|
|
32
31
|
* Delete a single Trade record.
|
|
33
|
-
* @param
|
|
32
|
+
* @param props - Properties to update.
|
|
34
33
|
* @param client - Apollo Client instance.
|
|
35
34
|
* @returns The deleted Trade or null.
|
|
36
35
|
*/
|
|
37
36
|
delete(props: TradeType, client: ApolloClient<NormalizedCacheObject>): Promise<TradeType>;
|
|
38
37
|
/**
|
|
39
38
|
* Retrieve a single Trade record by ID.
|
|
40
|
-
* @param
|
|
39
|
+
* @param props - Properties to update.
|
|
41
40
|
* @param client - Apollo Client instance.
|
|
42
41
|
* @returns The retrieved Trade or null.
|
|
43
42
|
*/
|
package/Trade.js
CHANGED
|
@@ -554,6 +554,9 @@ exports.Trade = {
|
|
|
554
554
|
connectOrCreate: props.portfolio.environmentVariables.map((item) => ({
|
|
555
555
|
where: {
|
|
556
556
|
id: item.id !== undefined ? item.id : undefined,
|
|
557
|
+
key: item.key !== undefined ? {
|
|
558
|
+
equals: item.key
|
|
559
|
+
} : undefined,
|
|
557
560
|
},
|
|
558
561
|
create: {
|
|
559
562
|
key: item.key !== undefined ? item.key : undefined,
|
|
@@ -569,9 +572,8 @@ exports.Trade = {
|
|
|
569
572
|
connectOrCreate: {
|
|
570
573
|
where: {
|
|
571
574
|
id: props.asset.id !== undefined ? props.asset.id : undefined,
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
} : undefined,
|
|
575
|
+
symbol: props.asset.symbol !== undefined ? props.asset.symbol : undefined,
|
|
576
|
+
name: props.asset.name !== undefined ? props.asset.name : undefined,
|
|
575
577
|
},
|
|
576
578
|
create: {
|
|
577
579
|
symbol: props.asset.symbol !== undefined ? props.asset.symbol : undefined,
|
|
@@ -717,7 +719,6 @@ exports.Trade = {
|
|
|
717
719
|
},
|
|
718
720
|
/**
|
|
719
721
|
* Update a single Trade record.
|
|
720
|
-
* @param id - Unique identifier of the record to update.
|
|
721
722
|
* @param props - Properties to update.
|
|
722
723
|
* @param client - Apollo Client instance.
|
|
723
724
|
* @returns The updated Trade or null.
|
|
@@ -1676,6 +1677,9 @@ exports.Trade = {
|
|
|
1676
1677
|
upsert: props.portfolio.environmentVariables.map((item) => ({
|
|
1677
1678
|
where: {
|
|
1678
1679
|
id: item.id !== undefined ? item.id : undefined,
|
|
1680
|
+
key: item.key !== undefined ? {
|
|
1681
|
+
equals: item.key
|
|
1682
|
+
} : undefined,
|
|
1679
1683
|
},
|
|
1680
1684
|
update: {
|
|
1681
1685
|
key: item.key !== undefined ? {
|
|
@@ -1796,6 +1800,9 @@ exports.Trade = {
|
|
|
1796
1800
|
connectOrCreate: props.portfolio.environmentVariables.map((item) => ({
|
|
1797
1801
|
where: {
|
|
1798
1802
|
id: item.id !== undefined ? item.id : undefined,
|
|
1803
|
+
key: item.key !== undefined ? {
|
|
1804
|
+
equals: item.key
|
|
1805
|
+
} : undefined,
|
|
1799
1806
|
},
|
|
1800
1807
|
create: {
|
|
1801
1808
|
key: item.key !== undefined ? item.key : undefined,
|
|
@@ -1813,6 +1820,9 @@ exports.Trade = {
|
|
|
1813
1820
|
id: props.asset.id !== undefined ? {
|
|
1814
1821
|
equals: props.asset.id
|
|
1815
1822
|
} : undefined,
|
|
1823
|
+
symbol: props.asset.symbol !== undefined ? {
|
|
1824
|
+
equals: props.asset.symbol
|
|
1825
|
+
} : undefined,
|
|
1816
1826
|
name: props.asset.name !== undefined ? {
|
|
1817
1827
|
equals: props.asset.name
|
|
1818
1828
|
} : undefined,
|
|
@@ -2071,7 +2081,7 @@ exports.Trade = {
|
|
|
2071
2081
|
},
|
|
2072
2082
|
/**
|
|
2073
2083
|
* Delete a single Trade record.
|
|
2074
|
-
* @param
|
|
2084
|
+
* @param props - Properties to update.
|
|
2075
2085
|
* @param client - Apollo Client instance.
|
|
2076
2086
|
* @returns The deleted Trade or null.
|
|
2077
2087
|
*/
|
|
@@ -2363,7 +2373,7 @@ exports.Trade = {
|
|
|
2363
2373
|
},
|
|
2364
2374
|
/**
|
|
2365
2375
|
* Retrieve a single Trade record by ID.
|
|
2366
|
-
* @param
|
|
2376
|
+
* @param props - Properties to update.
|
|
2367
2377
|
* @param client - Apollo Client instance.
|
|
2368
2378
|
* @returns The retrieved Trade or null.
|
|
2369
2379
|
*/
|
|
@@ -2660,7 +2670,7 @@ exports.Trade = {
|
|
|
2660
2670
|
var _a, _b;
|
|
2661
2671
|
const GET_ALL_TRADE = (0, client_1.gql) `
|
|
2662
2672
|
query getAllTrade {
|
|
2663
|
-
|
|
2673
|
+
trades {
|
|
2664
2674
|
id
|
|
2665
2675
|
userId
|
|
2666
2676
|
portfolioId
|
|
@@ -2926,7 +2936,7 @@ exports.Trade = {
|
|
|
2926
2936
|
const response = await client.query({ query: GET_ALL_TRADE });
|
|
2927
2937
|
if (response.errors && response.errors.length > 0)
|
|
2928
2938
|
throw new Error(response.errors[0].message);
|
|
2929
|
-
return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.
|
|
2939
|
+
return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.trades) !== null && _b !== void 0 ? _b : null;
|
|
2930
2940
|
}
|
|
2931
2941
|
catch (error) {
|
|
2932
2942
|
console.error('Error in getAllTrade:', error);
|
|
@@ -2942,7 +2952,7 @@ exports.Trade = {
|
|
|
2942
2952
|
async findMany(props, client) {
|
|
2943
2953
|
const FIND_MANY_TRADE = (0, client_1.gql) `
|
|
2944
2954
|
query findManyTrade($where: TradeWhereInput!) {
|
|
2945
|
-
|
|
2955
|
+
trades(where: $where) {
|
|
2946
2956
|
id
|
|
2947
2957
|
userId
|
|
2948
2958
|
portfolioId
|
|
@@ -3217,7 +3227,7 @@ exports.Trade = {
|
|
|
3217
3227
|
if (response.errors && response.errors.length > 0)
|
|
3218
3228
|
throw new Error(response.errors[0].message);
|
|
3219
3229
|
if (response && response.data && response.data.Trades) {
|
|
3220
|
-
return response.data.
|
|
3230
|
+
return response.data.trades;
|
|
3221
3231
|
}
|
|
3222
3232
|
else {
|
|
3223
3233
|
return [];
|
package/TradeStep.d.ts
CHANGED
|
@@ -22,7 +22,6 @@ export declare const TradeStep: {
|
|
|
22
22
|
} | null>;
|
|
23
23
|
/**
|
|
24
24
|
* Update a single TradeStep record.
|
|
25
|
-
* @param id - Unique identifier of the record to update.
|
|
26
25
|
* @param props - Properties to update.
|
|
27
26
|
* @param client - Apollo Client instance.
|
|
28
27
|
* @returns The updated TradeStep or null.
|
|
@@ -30,14 +29,14 @@ export declare const TradeStep: {
|
|
|
30
29
|
update(props: TradeStepType, client: ApolloClient<NormalizedCacheObject>): Promise<TradeStepType>;
|
|
31
30
|
/**
|
|
32
31
|
* Delete a single TradeStep record.
|
|
33
|
-
* @param
|
|
32
|
+
* @param props - Properties to update.
|
|
34
33
|
* @param client - Apollo Client instance.
|
|
35
34
|
* @returns The deleted TradeStep or null.
|
|
36
35
|
*/
|
|
37
36
|
delete(props: TradeStepType, client: ApolloClient<NormalizedCacheObject>): Promise<TradeStepType>;
|
|
38
37
|
/**
|
|
39
38
|
* Retrieve a single TradeStep record by ID.
|
|
40
|
-
* @param
|
|
39
|
+
* @param props - Properties to update.
|
|
41
40
|
* @param client - Apollo Client instance.
|
|
42
41
|
* @returns The retrieved TradeStep or null.
|
|
43
42
|
*/
|