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.
Files changed (99) hide show
  1. package/Account.cjs +15 -37
  2. package/Action.cjs +23 -61
  3. package/Alert.cjs +13 -31
  4. package/AlpacaAccount.cjs +30 -82
  5. package/Asset.cjs +30 -82
  6. package/Authenticator.cjs +15 -37
  7. package/Customer.cjs +15 -37
  8. package/EconomicEvent.cjs +8 -16
  9. package/MarketSentiment.cjs +8 -16
  10. package/NewsArticle.cjs +15 -37
  11. package/NewsArticleAssetSentiment.cjs +13 -31
  12. package/Order.cjs +11 -25
  13. package/Position.cjs +18 -46
  14. package/ScheduledOptionOrder.cjs +8 -16
  15. package/Session.cjs +15 -37
  16. package/StopLoss.cjs +9 -19
  17. package/TakeProfit.cjs +9 -19
  18. package/Trade.cjs +21 -55
  19. package/User.cjs +13 -31
  20. package/VerificationToken.cjs +8 -16
  21. package/client.cjs +3 -0
  22. package/client.d.ts +1 -0
  23. package/generated/typegraphql-prisma/enhance.cjs +1 -1
  24. package/generated/typegraphql-prisma/enhance.js.map +1 -1
  25. package/generated/typegraphql-prisma/resolvers/inputs/OrderWhereUniqueInput.cjs +6 -7
  26. package/generated/typegraphql-prisma/resolvers/inputs/OrderWhereUniqueInput.d.ts +1 -2
  27. package/generated/typegraphql-prisma/resolvers/inputs/OrderWhereUniqueInput.d.ts.map +1 -1
  28. package/generated/typegraphql-prisma/resolvers/inputs/OrderWhereUniqueInput.js.map +1 -1
  29. package/package.json +1 -1
  30. package/server/Account.d.ts.map +1 -1
  31. package/server/Account.js.map +1 -1
  32. package/server/Account.mjs +8 -30
  33. package/server/Action.d.ts.map +1 -1
  34. package/server/Action.js.map +1 -1
  35. package/server/Action.mjs +16 -54
  36. package/server/Alert.d.ts.map +1 -1
  37. package/server/Alert.js.map +1 -1
  38. package/server/Alert.mjs +6 -24
  39. package/server/AlpacaAccount.d.ts.map +1 -1
  40. package/server/AlpacaAccount.js.map +1 -1
  41. package/server/AlpacaAccount.mjs +23 -75
  42. package/server/Asset.d.ts.map +1 -1
  43. package/server/Asset.js.map +1 -1
  44. package/server/Asset.mjs +23 -75
  45. package/server/Authenticator.d.ts.map +1 -1
  46. package/server/Authenticator.js.map +1 -1
  47. package/server/Authenticator.mjs +8 -30
  48. package/server/Customer.d.ts.map +1 -1
  49. package/server/Customer.js.map +1 -1
  50. package/server/Customer.mjs +8 -30
  51. package/server/EconomicEvent.d.ts.map +1 -1
  52. package/server/EconomicEvent.js.map +1 -1
  53. package/server/EconomicEvent.mjs +1 -9
  54. package/server/MarketSentiment.d.ts.map +1 -1
  55. package/server/MarketSentiment.js.map +1 -1
  56. package/server/MarketSentiment.mjs +1 -9
  57. package/server/NewsArticle.d.ts.map +1 -1
  58. package/server/NewsArticle.js.map +1 -1
  59. package/server/NewsArticle.mjs +8 -30
  60. package/server/NewsArticleAssetSentiment.d.ts.map +1 -1
  61. package/server/NewsArticleAssetSentiment.js.map +1 -1
  62. package/server/NewsArticleAssetSentiment.mjs +6 -24
  63. package/server/Order.d.ts.map +1 -1
  64. package/server/Order.js.map +1 -1
  65. package/server/Order.mjs +4 -18
  66. package/server/Position.d.ts.map +1 -1
  67. package/server/Position.js.map +1 -1
  68. package/server/Position.mjs +11 -39
  69. package/server/ScheduledOptionOrder.d.ts.map +1 -1
  70. package/server/ScheduledOptionOrder.js.map +1 -1
  71. package/server/ScheduledOptionOrder.mjs +1 -9
  72. package/server/Session.d.ts.map +1 -1
  73. package/server/Session.js.map +1 -1
  74. package/server/Session.mjs +8 -30
  75. package/server/StopLoss.d.ts.map +1 -1
  76. package/server/StopLoss.js.map +1 -1
  77. package/server/StopLoss.mjs +2 -12
  78. package/server/TakeProfit.d.ts.map +1 -1
  79. package/server/TakeProfit.js.map +1 -1
  80. package/server/TakeProfit.mjs +2 -12
  81. package/server/Trade.d.ts.map +1 -1
  82. package/server/Trade.js.map +1 -1
  83. package/server/Trade.mjs +14 -48
  84. package/server/User.d.ts.map +1 -1
  85. package/server/User.js.map +1 -1
  86. package/server/User.mjs +6 -24
  87. package/server/VerificationToken.d.ts.map +1 -1
  88. package/server/VerificationToken.js.map +1 -1
  89. package/server/VerificationToken.mjs +1 -9
  90. package/server/client.d.ts +1 -0
  91. package/server/client.d.ts.map +1 -1
  92. package/server/client.js.map +1 -1
  93. package/server/client.mjs +2 -0
  94. package/server/generated/typegraphql-prisma/enhance.js.map +1 -1
  95. package/server/generated/typegraphql-prisma/enhance.mjs +1 -1
  96. package/server/generated/typegraphql-prisma/resolvers/inputs/OrderWhereUniqueInput.d.ts +1 -2
  97. package/server/generated/typegraphql-prisma/resolvers/inputs/OrderWhereUniqueInput.d.ts.map +1 -1
  98. package/server/generated/typegraphql-prisma/resolvers/inputs/OrderWhereUniqueInput.js.map +1 -1
  99. package/server/generated/typegraphql-prisma/resolvers/inputs/OrderWhereUniqueInput.mjs +7 -8
@@ -1,6 +1,6 @@
1
1
  import pkg from '@apollo/client';
2
2
  const { ApolloError, gql } = pkg;
3
- import { createApolloClient } from './client.mjs';
3
+ import { client } from './client.mjs';
4
4
  import { removeUndefinedProps } from './utils.mjs';
5
5
  /**
6
6
  * CRUD operations for the Account model.
@@ -193,7 +193,6 @@ export const Account = {
193
193
  * @returns The created Account or null.
194
194
  */
195
195
  async create(props) {
196
- const client = createApolloClient();
197
196
  const CREATE_ONE_ACCOUNT = gql `
198
197
  mutation createOneAccount($data: AccountCreateInput!) {
199
198
  createOneAccount(data: $data) {
@@ -373,11 +372,9 @@ export const Account = {
373
372
  : { connectOrCreate: item.orders.map((item) => ({
374
373
  where: {
375
374
  id: item.id !== undefined ? item.id : undefined,
375
+ clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
376
376
  actionId: item.actionId !== undefined ? item.actionId : undefined,
377
377
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
378
- clientOrderId: item.clientOrderId !== undefined ? {
379
- equals: item.clientOrderId
380
- } : undefined,
381
378
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
382
379
  equals: item.alpacaAccountId
383
380
  } : undefined,
@@ -499,7 +496,6 @@ export const Account = {
499
496
  * @returns The count of created records or null.
500
497
  */
501
498
  async createMany(props) {
502
- const client = createApolloClient();
503
499
  const CREATE_MANY_ACCOUNT = gql `
504
500
  mutation createManyAccount($data: [AccountCreateManyInput!]!) {
505
501
  createManyAccount(data: $data) {
@@ -544,7 +540,6 @@ export const Account = {
544
540
  * @returns The updated Account or null.
545
541
  */
546
542
  async update(props) {
547
- const client = createApolloClient();
548
543
  const UPDATE_ONE_ACCOUNT = gql `
549
544
  mutation updateOneAccount($data: AccountUpdateInput!, $where: AccountWhereUniqueInput!) {
550
545
  updateOneAccount(data: $data, where: $where) {
@@ -878,11 +873,9 @@ export const Account = {
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 @@ export const Account = {
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,
@@ -1400,11 +1391,9 @@ export const Account = {
1400
1391
  : { connectOrCreate: item.orders.map((item) => ({
1401
1392
  where: {
1402
1393
  id: item.id !== undefined ? item.id : undefined,
1394
+ clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
1403
1395
  actionId: item.actionId !== undefined ? item.actionId : undefined,
1404
1396
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
1405
- clientOrderId: item.clientOrderId !== undefined ? {
1406
- equals: item.clientOrderId
1407
- } : undefined,
1408
1397
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
1409
1398
  equals: item.alpacaAccountId
1410
1399
  } : undefined,
@@ -1526,7 +1515,6 @@ export const Account = {
1526
1515
  * @returns The count of created records or null.
1527
1516
  */
1528
1517
  async updateMany(props) {
1529
- const client = createApolloClient();
1530
1518
  const UPDATE_MANY_ACCOUNT = gql `
1531
1519
  mutation updateManyAccount($data: [AccountCreateManyInput!]!) {
1532
1520
  updateManyAccount(data: $data) {
@@ -1860,11 +1848,9 @@ export const Account = {
1860
1848
  upsert: item.orders.map((item) => ({
1861
1849
  where: {
1862
1850
  id: item.id !== undefined ? item.id : undefined,
1851
+ clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
1863
1852
  actionId: item.actionId !== undefined ? item.actionId : undefined,
1864
1853
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
1865
- clientOrderId: item.clientOrderId !== undefined ? {
1866
- equals: item.clientOrderId
1867
- } : undefined,
1868
1854
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
1869
1855
  equals: item.alpacaAccountId
1870
1856
  } : undefined,
@@ -2137,11 +2123,9 @@ export const Account = {
2137
2123
  : { connectOrCreate: item.orders.map((item) => ({
2138
2124
  where: {
2139
2125
  id: item.id !== undefined ? item.id : undefined,
2126
+ clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
2140
2127
  actionId: item.actionId !== undefined ? item.actionId : undefined,
2141
2128
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
2142
- clientOrderId: item.clientOrderId !== undefined ? {
2143
- equals: item.clientOrderId
2144
- } : undefined,
2145
2129
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
2146
2130
  equals: item.alpacaAccountId
2147
2131
  } : undefined,
@@ -2382,11 +2366,9 @@ export const Account = {
2382
2366
  : { connectOrCreate: item.orders.map((item) => ({
2383
2367
  where: {
2384
2368
  id: item.id !== undefined ? item.id : undefined,
2369
+ clientOrderId: item.clientOrderId !== undefined ? item.clientOrderId : undefined,
2385
2370
  actionId: item.actionId !== undefined ? item.actionId : undefined,
2386
2371
  stopLossId: item.stopLossId !== undefined ? item.stopLossId : undefined,
2387
- clientOrderId: item.clientOrderId !== undefined ? {
2388
- equals: item.clientOrderId
2389
- } : undefined,
2390
2372
  alpacaAccountId: item.alpacaAccountId !== undefined ? {
2391
2373
  equals: item.alpacaAccountId
2392
2374
  } : undefined,
@@ -2508,7 +2490,6 @@ export const Account = {
2508
2490
  * @returns The deleted Account or null.
2509
2491
  */
2510
2492
  async delete(props) {
2511
- const client = createApolloClient();
2512
2493
  const DELETE_ONE_ACCOUNT = gql `
2513
2494
  mutation deleteOneAccount($where: AccountWhereUniqueInput!) {
2514
2495
  deleteOneAccount(where: $where) {
@@ -2543,7 +2524,6 @@ export const Account = {
2543
2524
  * @returns The retrieved Account or null.
2544
2525
  */
2545
2526
  async get(props) {
2546
- const client = createApolloClient();
2547
2527
  const GET_ACCOUNT = gql `
2548
2528
  query getAccount($where: AccountWhereUniqueInput!) {
2549
2529
  getAccount(where: $where) {
@@ -2593,7 +2573,6 @@ export const Account = {
2593
2573
  * @returns An array of Account records or null.
2594
2574
  */
2595
2575
  async getAll() {
2596
- const client = createApolloClient();
2597
2576
  const GET_ALL_ACCOUNT = gql `
2598
2577
  query getAllAccount {
2599
2578
  accounts {
@@ -2622,7 +2601,6 @@ export const Account = {
2622
2601
  * @returns An array of found Account records or null.
2623
2602
  */
2624
2603
  async findMany(props) {
2625
- const client = createApolloClient();
2626
2604
  const FIND_MANY_ACCOUNT = gql `
2627
2605
  query findManyAccount($where: AccountWhereInput!) {
2628
2606
  accounts(where: $where) {
@@ -1 +1 @@
1
- {"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../src/Action.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,8CAA8C,CAAC;AA4KlF,eAAO,MAAM,MAAM;IAEjB;;;;OAIG;kBAEiB,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IA0xBtD;;;;OAIG;sBACqB,UAAU,EAAE,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAsCxE;;;;OAIG;kBACiB,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAq5FpD;;;;OAIG;sBACqB,UAAU,EAAE,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAw5FxE;;;;OAIG;kBACiB,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAiCpD;;;;OAIG;eACc,UAAU,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAuCxD;;;OAGG;cACa,OAAO,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC;IAyB5C;;;;OAIG;oBACmB,UAAU,GAAG,OAAO,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC;CA6ChE,CAAC"}
1
+ {"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../src/Action.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,8CAA8C,CAAC;AA4KlF,eAAO,MAAM,MAAM;IAEjB;;;;OAIG;kBAEiB,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAkxBtD;;;;OAIG;sBACqB,UAAU,EAAE,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAoCxE;;;;OAIG;kBACiB,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAu4FpD;;;;OAIG;sBACqB,UAAU,EAAE,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IA04FxE;;;;OAIG;kBACiB,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IA+BpD;;;;OAIG;eACc,UAAU,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAqCxD;;;OAGG;cACa,OAAO,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC;IAuB5C;;;;OAIG;oBACmB,UAAU,GAAG,OAAO,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC;CA2ChE,CAAC"}