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/server/Session.mjs
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import pkg from '@apollo/client';
|
2
2
|
const { ApolloError, gql } = pkg;
|
3
|
-
import {
|
3
|
+
import { client } from './client.mjs';
|
4
4
|
import { removeUndefinedProps } from './utils.mjs';
|
5
5
|
/**
|
6
6
|
* CRUD operations for the Session model.
|
@@ -79,7 +79,6 @@ export const Session = {
|
|
79
79
|
* @returns The created Session or null.
|
80
80
|
*/
|
81
81
|
async create(props) {
|
82
|
-
const client = createApolloClient();
|
83
82
|
const CREATE_ONE_SESSION = gql `
|
84
83
|
mutation createOneSession($data: SessionCreateInput!) {
|
85
84
|
createOneSession(data: $data) {
|
@@ -262,11 +261,9 @@ export const Session = {
|
|
262
261
|
: { connectOrCreate: item.orders.map((item) => ({
|
263
262
|
where: {
|
264
263
|
id: item.id !== undefined ? item.id : undefined,
|
264
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
265
265
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
266
266
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
267
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
268
|
-
equals: item.clientOrderId
|
269
|
-
} : undefined,
|
270
267
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
271
268
|
equals: item.alpacaAccountId
|
272
269
|
} : undefined,
|
@@ -388,7 +385,6 @@ export const Session = {
|
|
388
385
|
* @returns The count of created records or null.
|
389
386
|
*/
|
390
387
|
async createMany(props) {
|
391
|
-
const client = createApolloClient();
|
392
388
|
const CREATE_MANY_SESSION = gql `
|
393
389
|
mutation createManySession($data: [SessionCreateManyInput!]!) {
|
394
390
|
createManySession(data: $data) {
|
@@ -425,7 +421,6 @@ export const Session = {
|
|
425
421
|
* @returns The updated Session or null.
|
426
422
|
*/
|
427
423
|
async update(props) {
|
428
|
-
const client = createApolloClient();
|
429
424
|
const UPDATE_ONE_SESSION = gql `
|
430
425
|
mutation updateOneSession($data: SessionUpdateInput!, $where: SessionWhereUniqueInput!) {
|
431
426
|
updateOneSession(data: $data, where: $where) {
|
@@ -761,11 +756,9 @@ export const Session = {
|
|
761
756
|
upsert: item.orders.map((item) => ({
|
762
757
|
where: {
|
763
758
|
id: item.id !== undefined ? item.id : undefined,
|
759
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
764
760
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
765
761
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
766
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
767
|
-
equals: item.clientOrderId
|
768
|
-
} : undefined,
|
769
762
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
770
763
|
equals: item.alpacaAccountId
|
771
764
|
} : undefined,
|
@@ -1038,11 +1031,9 @@ export const Session = {
|
|
1038
1031
|
: { connectOrCreate: item.orders.map((item) => ({
|
1039
1032
|
where: {
|
1040
1033
|
id: item.id !== undefined ? item.id : undefined,
|
1034
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
1041
1035
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
1042
1036
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
1043
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
1044
|
-
equals: item.clientOrderId
|
1045
|
-
} : undefined,
|
1046
1037
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
1047
1038
|
equals: item.alpacaAccountId
|
1048
1039
|
} : undefined,
|
@@ -1294,11 +1285,9 @@ export const Session = {
|
|
1294
1285
|
: { connectOrCreate: item.orders.map((item) => ({
|
1295
1286
|
where: {
|
1296
1287
|
id: item.id !== undefined ? item.id : undefined,
|
1288
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
1297
1289
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
1298
1290
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
1299
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
1300
|
-
equals: item.clientOrderId
|
1301
|
-
} : undefined,
|
1302
1291
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
1303
1292
|
equals: item.alpacaAccountId
|
1304
1293
|
} : undefined,
|
@@ -1420,7 +1409,6 @@ export const Session = {
|
|
1420
1409
|
* @returns The count of created records or null.
|
1421
1410
|
*/
|
1422
1411
|
async updateMany(props) {
|
1423
|
-
const client = createApolloClient();
|
1424
1412
|
const UPDATE_MANY_SESSION = gql `
|
1425
1413
|
mutation updateManySession($data: [SessionCreateManyInput!]!) {
|
1426
1414
|
updateManySession(data: $data) {
|
@@ -1756,11 +1744,9 @@ export const Session = {
|
|
1756
1744
|
upsert: item.orders.map((item) => ({
|
1757
1745
|
where: {
|
1758
1746
|
id: item.id !== undefined ? item.id : undefined,
|
1747
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
1759
1748
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
1760
1749
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
1761
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
1762
|
-
equals: item.clientOrderId
|
1763
|
-
} : undefined,
|
1764
1750
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
1765
1751
|
equals: item.alpacaAccountId
|
1766
1752
|
} : undefined,
|
@@ -2033,11 +2019,9 @@ export const Session = {
|
|
2033
2019
|
: { connectOrCreate: item.orders.map((item) => ({
|
2034
2020
|
where: {
|
2035
2021
|
id: item.id !== undefined ? item.id : undefined,
|
2022
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
2036
2023
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
2037
2024
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
2038
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
2039
|
-
equals: item.clientOrderId
|
2040
|
-
} : undefined,
|
2041
2025
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
2042
2026
|
equals: item.alpacaAccountId
|
2043
2027
|
} : undefined,
|
@@ -2289,11 +2273,9 @@ export const Session = {
|
|
2289
2273
|
: { connectOrCreate: item.orders.map((item) => ({
|
2290
2274
|
where: {
|
2291
2275
|
id: item.id !== undefined ? item.id : undefined,
|
2276
|
+
clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
|
2292
2277
|
actionId: item.actionId !== undefined ? item.actionId : undefined,
|
2293
2278
|
stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
|
2294
|
-
clientOrderId: item.clientOrderId !== undefined ? {
|
2295
|
-
equals: item.clientOrderId
|
2296
|
-
} : undefined,
|
2297
2279
|
alpacaAccountId: item.alpacaAccountId !== undefined ? {
|
2298
2280
|
equals: item.alpacaAccountId
|
2299
2281
|
} : undefined,
|
@@ -2415,7 +2397,6 @@ export const Session = {
|
|
2415
2397
|
* @returns The deleted Session or null.
|
2416
2398
|
*/
|
2417
2399
|
async delete(props) {
|
2418
|
-
const client = createApolloClient();
|
2419
2400
|
const DELETE_ONE_SESSION = gql `
|
2420
2401
|
mutation deleteOneSession($where: SessionWhereUniqueInput!) {
|
2421
2402
|
deleteOneSession(where: $where) {
|
@@ -2450,7 +2431,6 @@ export const Session = {
|
|
2450
2431
|
* @returns The retrieved Session or null.
|
2451
2432
|
*/
|
2452
2433
|
async get(props) {
|
2453
|
-
const client = createApolloClient();
|
2454
2434
|
const GET_SESSION = gql `
|
2455
2435
|
query getSession($where: SessionWhereUniqueInput!) {
|
2456
2436
|
getSession(where: $where) {
|
@@ -2491,7 +2471,6 @@ export const Session = {
|
|
2491
2471
|
* @returns An array of Session records or null.
|
2492
2472
|
*/
|
2493
2473
|
async getAll() {
|
2494
|
-
const client = createApolloClient();
|
2495
2474
|
const GET_ALL_SESSION = gql `
|
2496
2475
|
query getAllSession {
|
2497
2476
|
sessions {
|
@@ -2520,7 +2499,6 @@ export const Session = {
|
|
2520
2499
|
* @returns An array of found Session records or null.
|
2521
2500
|
*/
|
2522
2501
|
async findMany(props) {
|
2523
|
-
const client = createApolloClient();
|
2524
2502
|
const FIND_MANY_SESSION = gql `
|
2525
2503
|
query findManySession($where: SessionWhereInput!) {
|
2526
2504
|
sessions(where: $where) {
|
package/server/StopLoss.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"StopLoss.d.ts","sourceRoot":"","sources":["../../src/StopLoss.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,gDAAgD,CAAC;AAoBxF,eAAO,MAAM,QAAQ;IAEnB;;;;OAIG;kBAEiB,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;
|
1
|
+
{"version":3,"file":"StopLoss.d.ts","sourceRoot":"","sources":["../../src/StopLoss.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,gDAAgD,CAAC;AAoBxF,eAAO,MAAM,QAAQ;IAEnB;;;;OAIG;kBAEiB,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;IAqc1D;;;;OAIG;sBACqB,YAAY,EAAE,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAiC1E;;;;OAIG;kBACiB,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;IAulDxD;;;;OAIG;sBACqB,YAAY,EAAE,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IA0lD1E;;;;OAIG;kBACiB,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;IA+BxD;;;;OAIG;eACc,YAAY,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAiC5D;;;OAGG;cACa,OAAO,CAAC,YAAY,EAAE,GAAG,IAAI,CAAC;IAuB9C;;;;OAIG;oBACmB,YAAY,GAAG,OAAO,CAAC,YAAY,EAAE,GAAG,IAAI,CAAC;CAyCpE,CAAC"}
|