adaptic-backend 1.0.233 → 1.0.235

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 (139) hide show
  1. package/Account.cjs +36 -18
  2. package/Account.d.ts +19 -9
  3. package/Action.cjs +36 -18
  4. package/Action.d.ts +19 -9
  5. package/Alert.cjs +36 -18
  6. package/Alert.d.ts +19 -9
  7. package/AlpacaAccount.cjs +36 -18
  8. package/AlpacaAccount.d.ts +19 -9
  9. package/Asset.cjs +36 -18
  10. package/Asset.d.ts +19 -9
  11. package/Authenticator.cjs +36 -18
  12. package/Authenticator.d.ts +19 -9
  13. package/Contract.cjs +36 -18
  14. package/Contract.d.ts +19 -9
  15. package/Customer.cjs +36 -18
  16. package/Customer.d.ts +19 -9
  17. package/Deliverable.cjs +36 -18
  18. package/Deliverable.d.ts +19 -9
  19. package/EconomicEvent.cjs +36 -18
  20. package/EconomicEvent.d.ts +19 -9
  21. package/MarketSentiment.cjs +36 -18
  22. package/MarketSentiment.d.ts +19 -9
  23. package/NewsArticle.cjs +36 -18
  24. package/NewsArticle.d.ts +19 -9
  25. package/NewsArticleAssetSentiment.cjs +36 -18
  26. package/NewsArticleAssetSentiment.d.ts +19 -9
  27. package/Order.cjs +36 -18
  28. package/Order.d.ts +19 -9
  29. package/Position.cjs +36 -18
  30. package/Position.d.ts +19 -9
  31. package/ScheduledOptionOrder.cjs +36 -18
  32. package/ScheduledOptionOrder.d.ts +19 -9
  33. package/Session.cjs +36 -18
  34. package/Session.d.ts +19 -9
  35. package/StopLoss.cjs +36 -18
  36. package/StopLoss.d.ts +19 -9
  37. package/TakeProfit.cjs +36 -18
  38. package/TakeProfit.d.ts +19 -9
  39. package/Trade.cjs +36 -18
  40. package/Trade.d.ts +19 -9
  41. package/User.cjs +36 -18
  42. package/User.d.ts +19 -9
  43. package/VerificationToken.cjs +36 -18
  44. package/VerificationToken.d.ts +19 -9
  45. package/client.cjs +0 -1
  46. package/index.d.ts +198 -198
  47. package/package.json +1 -1
  48. package/server/Account.d.ts +19 -9
  49. package/server/Account.d.ts.map +1 -1
  50. package/server/Account.js.map +1 -1
  51. package/server/Account.mjs +28 -10
  52. package/server/Action.d.ts +19 -9
  53. package/server/Action.d.ts.map +1 -1
  54. package/server/Action.js.map +1 -1
  55. package/server/Action.mjs +28 -10
  56. package/server/Alert.d.ts +19 -9
  57. package/server/Alert.d.ts.map +1 -1
  58. package/server/Alert.js.map +1 -1
  59. package/server/Alert.mjs +28 -10
  60. package/server/AlpacaAccount.d.ts +19 -9
  61. package/server/AlpacaAccount.d.ts.map +1 -1
  62. package/server/AlpacaAccount.js.map +1 -1
  63. package/server/AlpacaAccount.mjs +28 -10
  64. package/server/Asset.d.ts +19 -9
  65. package/server/Asset.d.ts.map +1 -1
  66. package/server/Asset.js.map +1 -1
  67. package/server/Asset.mjs +28 -10
  68. package/server/Authenticator.d.ts +19 -9
  69. package/server/Authenticator.d.ts.map +1 -1
  70. package/server/Authenticator.js.map +1 -1
  71. package/server/Authenticator.mjs +28 -10
  72. package/server/Contract.d.ts +19 -9
  73. package/server/Contract.d.ts.map +1 -1
  74. package/server/Contract.js.map +1 -1
  75. package/server/Contract.mjs +28 -10
  76. package/server/Customer.d.ts +19 -9
  77. package/server/Customer.d.ts.map +1 -1
  78. package/server/Customer.js.map +1 -1
  79. package/server/Customer.mjs +28 -10
  80. package/server/Deliverable.d.ts +19 -9
  81. package/server/Deliverable.d.ts.map +1 -1
  82. package/server/Deliverable.js.map +1 -1
  83. package/server/Deliverable.mjs +28 -10
  84. package/server/EconomicEvent.d.ts +19 -9
  85. package/server/EconomicEvent.d.ts.map +1 -1
  86. package/server/EconomicEvent.js.map +1 -1
  87. package/server/EconomicEvent.mjs +28 -10
  88. package/server/MarketSentiment.d.ts +19 -9
  89. package/server/MarketSentiment.d.ts.map +1 -1
  90. package/server/MarketSentiment.js.map +1 -1
  91. package/server/MarketSentiment.mjs +28 -10
  92. package/server/NewsArticle.d.ts +19 -9
  93. package/server/NewsArticle.d.ts.map +1 -1
  94. package/server/NewsArticle.js.map +1 -1
  95. package/server/NewsArticle.mjs +28 -10
  96. package/server/NewsArticleAssetSentiment.d.ts +19 -9
  97. package/server/NewsArticleAssetSentiment.d.ts.map +1 -1
  98. package/server/NewsArticleAssetSentiment.js.map +1 -1
  99. package/server/NewsArticleAssetSentiment.mjs +28 -10
  100. package/server/Order.d.ts +19 -9
  101. package/server/Order.d.ts.map +1 -1
  102. package/server/Order.js.map +1 -1
  103. package/server/Order.mjs +28 -10
  104. package/server/Position.d.ts +19 -9
  105. package/server/Position.d.ts.map +1 -1
  106. package/server/Position.js.map +1 -1
  107. package/server/Position.mjs +28 -10
  108. package/server/ScheduledOptionOrder.d.ts +19 -9
  109. package/server/ScheduledOptionOrder.d.ts.map +1 -1
  110. package/server/ScheduledOptionOrder.js.map +1 -1
  111. package/server/ScheduledOptionOrder.mjs +28 -10
  112. package/server/Session.d.ts +19 -9
  113. package/server/Session.d.ts.map +1 -1
  114. package/server/Session.js.map +1 -1
  115. package/server/Session.mjs +28 -10
  116. package/server/StopLoss.d.ts +19 -9
  117. package/server/StopLoss.d.ts.map +1 -1
  118. package/server/StopLoss.js.map +1 -1
  119. package/server/StopLoss.mjs +28 -10
  120. package/server/TakeProfit.d.ts +19 -9
  121. package/server/TakeProfit.d.ts.map +1 -1
  122. package/server/TakeProfit.js.map +1 -1
  123. package/server/TakeProfit.mjs +28 -10
  124. package/server/Trade.d.ts +19 -9
  125. package/server/Trade.d.ts.map +1 -1
  126. package/server/Trade.js.map +1 -1
  127. package/server/Trade.mjs +28 -10
  128. package/server/User.d.ts +19 -9
  129. package/server/User.d.ts.map +1 -1
  130. package/server/User.js.map +1 -1
  131. package/server/User.mjs +28 -10
  132. package/server/VerificationToken.d.ts +19 -9
  133. package/server/VerificationToken.d.ts.map +1 -1
  134. package/server/VerificationToken.js.map +1 -1
  135. package/server/VerificationToken.mjs +28 -10
  136. package/server/client.d.ts.map +1 -1
  137. package/server/client.js.map +1 -1
  138. package/server/client.mjs +0 -1
  139. package/server/index.d.ts +198 -198
@@ -100,9 +100,11 @@ exports.NewsArticleAssetSentiment = {
100
100
  /**
101
101
  * Create a new NewsArticleAssetSentiment record.
102
102
  * @param props - Properties for the new record.
103
+ * @param client - Apollo Client instance.
103
104
  * @returns The created NewsArticleAssetSentiment or null.
104
105
  */
105
- async create(props) {
106
+ async create(props, globalClient) {
107
+ const client = globalClient || client_2.client;
106
108
  const CREATE_ONE_NEWSARTICLEASSETSENTIMENT = (0, client_1.gql) `
107
109
  mutation createOneNewsArticleAssetSentiment($data: NewsArticleAssetSentimentCreateInput!) {
108
110
  createOneNewsArticleAssetSentiment(data: $data) {
@@ -641,7 +643,7 @@ exports.NewsArticleAssetSentiment = {
641
643
  };
642
644
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
643
645
  try {
644
- const response = await client_2.client.mutate({ mutation: CREATE_ONE_NEWSARTICLEASSETSENTIMENT, variables: filteredVariables });
646
+ const response = await client.mutate({ mutation: CREATE_ONE_NEWSARTICLEASSETSENTIMENT, variables: filteredVariables });
645
647
  if (response.errors && response.errors.length > 0)
646
648
  throw new Error(response.errors[0].message);
647
649
  if (response && response.data && response.data.createOneNewsArticleAssetSentiment) {
@@ -659,9 +661,11 @@ exports.NewsArticleAssetSentiment = {
659
661
  /**
660
662
  * Create multiple NewsArticleAssetSentiment records.
661
663
  * @param props - Array of NewsArticleAssetSentiment objects for the new records.
664
+ * @param globalClient - Apollo Client instance.
662
665
  * @returns The count of created records or null.
663
666
  */
664
- async createMany(props) {
667
+ async createMany(props, globalClient) {
668
+ const client = globalClient || client_2.client;
665
669
  const CREATE_MANY_NEWSARTICLEASSETSENTIMENT = (0, client_1.gql) `
666
670
  mutation createManyNewsArticleAssetSentiment($data: [NewsArticleAssetSentimentCreateManyInput!]!) {
667
671
  createManyNewsArticleAssetSentiment(data: $data) {
@@ -680,7 +684,7 @@ exports.NewsArticleAssetSentiment = {
680
684
  };
681
685
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
682
686
  try {
683
- const response = await client_2.client.mutate({ mutation: CREATE_MANY_NEWSARTICLEASSETSENTIMENT, variables: filteredVariables });
687
+ const response = await client.mutate({ mutation: CREATE_MANY_NEWSARTICLEASSETSENTIMENT, variables: filteredVariables });
684
688
  if (response.errors && response.errors.length > 0)
685
689
  throw new Error(response.errors[0].message);
686
690
  if (response && response.data && response.data.createManyNewsArticleAssetSentiment) {
@@ -698,9 +702,11 @@ exports.NewsArticleAssetSentiment = {
698
702
  /**
699
703
  * Update a single NewsArticleAssetSentiment record.
700
704
  * @param props - Properties to update.
705
+ * @param globalClient - Apollo Client instance.
701
706
  * @returns The updated NewsArticleAssetSentiment or null.
702
707
  */
703
- async update(props) {
708
+ async update(props, globalClient) {
709
+ const client = globalClient || client_2.client;
704
710
  const UPDATE_ONE_NEWSARTICLEASSETSENTIMENT = (0, client_1.gql) `
705
711
  mutation updateOneNewsArticleAssetSentiment($data: NewsArticleAssetSentimentUpdateInput!, $where: NewsArticleAssetSentimentWhereUniqueInput!) {
706
712
  updateOneNewsArticleAssetSentiment(data: $data, where: $where) {
@@ -2792,7 +2798,7 @@ exports.NewsArticleAssetSentiment = {
2792
2798
  };
2793
2799
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
2794
2800
  try {
2795
- const response = await client_2.client.mutate({ mutation: UPDATE_ONE_NEWSARTICLEASSETSENTIMENT, variables: filteredVariables });
2801
+ const response = await client.mutate({ mutation: UPDATE_ONE_NEWSARTICLEASSETSENTIMENT, variables: filteredVariables });
2796
2802
  if (response.errors && response.errors.length > 0)
2797
2803
  throw new Error(response.errors[0].message);
2798
2804
  if (response && response.data && response.data.updateOneNewsArticleAssetSentiment) {
@@ -2810,9 +2816,11 @@ exports.NewsArticleAssetSentiment = {
2810
2816
  /**
2811
2817
  * Upsert a single NewsArticleAssetSentiment record.
2812
2818
  * @param props - Properties to update.
2819
+ * @param globalClient - Apollo Client instance.
2813
2820
  * @returns The updated NewsArticleAssetSentiment or null.
2814
2821
  */
2815
- async upsert(props) {
2822
+ async upsert(props, globalClient) {
2823
+ const client = globalClient || client_2.client;
2816
2824
  const UPSERT_ONE_NEWSARTICLEASSETSENTIMENT = (0, client_1.gql) `
2817
2825
  mutation upsertOneNewsArticleAssetSentiment($where: NewsArticleAssetSentimentWhereUniqueInput!, $create: NewsArticleAssetSentimentCreateInput!, $update: NewsArticleAssetSentimentUpdateInput!) {
2818
2826
  upsertOneNewsArticleAssetSentiment(where: $where, create: $create, update: $update) {
@@ -5428,7 +5436,7 @@ exports.NewsArticleAssetSentiment = {
5428
5436
  };
5429
5437
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
5430
5438
  try {
5431
- const response = await client_2.client.mutate({ mutation: UPSERT_ONE_NEWSARTICLEASSETSENTIMENT, variables: filteredVariables });
5439
+ const response = await client.mutate({ mutation: UPSERT_ONE_NEWSARTICLEASSETSENTIMENT, variables: filteredVariables });
5432
5440
  if (response.errors && response.errors.length > 0)
5433
5441
  throw new Error(response.errors[0].message);
5434
5442
  if (response && response.data && response.data.upsertOneNewsArticleAssetSentiment) {
@@ -5446,9 +5454,11 @@ exports.NewsArticleAssetSentiment = {
5446
5454
  /**
5447
5455
  * Update multiple NewsArticleAssetSentiment records.
5448
5456
  * @param props - Array of NewsArticleAssetSentiment objects for the updated records.
5457
+ * @param globalClient - Apollo Client instance.
5449
5458
  * @returns The count of created records or null.
5450
5459
  */
5451
- async updateMany(props) {
5460
+ async updateMany(props, globalClient) {
5461
+ const client = globalClient || client_2.client;
5452
5462
  const UPDATE_MANY_NEWSARTICLEASSETSENTIMENT = (0, client_1.gql) `
5453
5463
  mutation updateManyNewsArticleAssetSentiment($data: [NewsArticleAssetSentimentCreateManyInput!]!) {
5454
5464
  updateManyNewsArticleAssetSentiment(data: $data) {
@@ -7540,7 +7550,7 @@ exports.NewsArticleAssetSentiment = {
7540
7550
  }));
7541
7551
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
7542
7552
  try {
7543
- const response = await client_2.client.mutate({ mutation: UPDATE_MANY_NEWSARTICLEASSETSENTIMENT, variables: filteredVariables });
7553
+ const response = await client.mutate({ mutation: UPDATE_MANY_NEWSARTICLEASSETSENTIMENT, variables: filteredVariables });
7544
7554
  if (response.errors && response.errors.length > 0)
7545
7555
  throw new Error(response.errors[0].message);
7546
7556
  if (response && response.data && response.data.updateManyNewsArticleAssetSentiment) {
@@ -7558,9 +7568,11 @@ exports.NewsArticleAssetSentiment = {
7558
7568
  /**
7559
7569
  * Delete a single NewsArticleAssetSentiment record.
7560
7570
  * @param props - Properties to update.
7571
+ * @param globalClient - Apollo Client instance.
7561
7572
  * @returns The deleted NewsArticleAssetSentiment or null.
7562
7573
  */
7563
- async delete(props) {
7574
+ async delete(props, globalClient) {
7575
+ const client = globalClient || client_2.client;
7564
7576
  const DELETE_ONE_NEWSARTICLEASSETSENTIMENT = (0, client_1.gql) `
7565
7577
  mutation deleteOneNewsArticleAssetSentiment($where: NewsArticleAssetSentimentWhereUniqueInput!) {
7566
7578
  deleteOneNewsArticleAssetSentiment(where: $where) {
@@ -7574,7 +7586,7 @@ exports.NewsArticleAssetSentiment = {
7574
7586
  };
7575
7587
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
7576
7588
  try {
7577
- const response = await client_2.client.mutate({ mutation: DELETE_ONE_NEWSARTICLEASSETSENTIMENT, variables: filteredVariables });
7589
+ const response = await client.mutate({ mutation: DELETE_ONE_NEWSARTICLEASSETSENTIMENT, variables: filteredVariables });
7578
7590
  if (response.errors && response.errors.length > 0)
7579
7591
  throw new Error(response.errors[0].message);
7580
7592
  if (response && response.data && response.data.deleteOneNewsArticleAssetSentiment) {
@@ -7592,10 +7604,12 @@ exports.NewsArticleAssetSentiment = {
7592
7604
  /**
7593
7605
  * Retrieve a single NewsArticleAssetSentiment record by ID.
7594
7606
  * @param props - Properties to update.
7607
+ * @param globalClient - Apollo Client instance.
7595
7608
  * @returns The retrieved NewsArticleAssetSentiment or null.
7596
7609
  */
7597
- async get(props) {
7610
+ async get(props, globalClient) {
7598
7611
  var _a, _b;
7612
+ const client = globalClient || client_2.client;
7599
7613
  const GET_NEWSARTICLEASSETSENTIMENT = (0, client_1.gql) `
7600
7614
  query getNewsArticleAssetSentiment($where: NewsArticleAssetSentimentWhereUniqueInput!) {
7601
7615
  getNewsArticleAssetSentiment(where: $where) {
@@ -7613,7 +7627,7 @@ exports.NewsArticleAssetSentiment = {
7613
7627
  };
7614
7628
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
7615
7629
  try {
7616
- const response = await client_2.client.query({ query: GET_NEWSARTICLEASSETSENTIMENT, variables: filteredVariables });
7630
+ const response = await client.query({ query: GET_NEWSARTICLEASSETSENTIMENT, variables: filteredVariables });
7617
7631
  if (response.errors && response.errors.length > 0)
7618
7632
  throw new Error(response.errors[0].message);
7619
7633
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.getNewsArticleAssetSentiment) !== null && _b !== void 0 ? _b : null;
@@ -7630,10 +7644,12 @@ exports.NewsArticleAssetSentiment = {
7630
7644
  },
7631
7645
  /**
7632
7646
  * Retrieve all NewsArticleAssetSentiments records.
7647
+ * @param globalClient - Apollo Client instance.
7633
7648
  * @returns An array of NewsArticleAssetSentiment records or null.
7634
7649
  */
7635
- async getAll() {
7650
+ async getAll(globalClient) {
7636
7651
  var _a, _b;
7652
+ const client = globalClient || client_2.client;
7637
7653
  const GET_ALL_NEWSARTICLEASSETSENTIMENT = (0, client_1.gql) `
7638
7654
  query getAllNewsArticleAssetSentiment {
7639
7655
  newsArticleAssetSentiments {
@@ -7641,7 +7657,7 @@ exports.NewsArticleAssetSentiment = {
7641
7657
  }
7642
7658
  }`;
7643
7659
  try {
7644
- const response = await client_2.client.query({ query: GET_ALL_NEWSARTICLEASSETSENTIMENT });
7660
+ const response = await client.query({ query: GET_ALL_NEWSARTICLEASSETSENTIMENT });
7645
7661
  if (response.errors && response.errors.length > 0)
7646
7662
  throw new Error(response.errors[0].message);
7647
7663
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.newsArticleAssetSentiments) !== null && _b !== void 0 ? _b : null;
@@ -7659,9 +7675,11 @@ exports.NewsArticleAssetSentiment = {
7659
7675
  /**
7660
7676
  * Find multiple NewsArticleAssetSentiment records based on conditions.
7661
7677
  * @param props - Conditions to find records.
7678
+ * @param globalClient - Apollo Client instance.
7662
7679
  * @returns An array of found NewsArticleAssetSentiment records or null.
7663
7680
  */
7664
- async findMany(props) {
7681
+ async findMany(props, globalClient) {
7682
+ const client = globalClient || client_2.client;
7665
7683
  const FIND_MANY_NEWSARTICLEASSETSENTIMENT = (0, client_1.gql) `
7666
7684
  query findManyNewsArticleAssetSentiment($where: NewsArticleAssetSentimentWhereInput!) {
7667
7685
  newsArticleAssetSentiments(where: $where) {
@@ -7683,7 +7701,7 @@ exports.NewsArticleAssetSentiment = {
7683
7701
  };
7684
7702
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
7685
7703
  try {
7686
- const response = await client_2.client.query({ query: FIND_MANY_NEWSARTICLEASSETSENTIMENT, variables: filteredVariables });
7704
+ const response = await client.query({ query: FIND_MANY_NEWSARTICLEASSETSENTIMENT, variables: filteredVariables });
7687
7705
  if (response.errors && response.errors.length > 0)
7688
7706
  throw new Error(response.errors[0].message);
7689
7707
  if (response && response.data && response.data.NewsArticleAssetSentiments) {
@@ -1,61 +1,71 @@
1
1
  import { NewsArticleAssetSentiment as NewsArticleAssetSentimentType } from './generated/typegraphql-prisma/models/NewsArticleAssetSentiment';
2
+ import { ApolloClient } from '@apollo/client';
2
3
  export declare const NewsArticleAssetSentiment: {
3
4
  /**
4
5
  * Create a new NewsArticleAssetSentiment record.
5
6
  * @param props - Properties for the new record.
7
+ * @param client - Apollo Client instance.
6
8
  * @returns The created NewsArticleAssetSentiment or null.
7
9
  */
8
- create(props: NewsArticleAssetSentimentType): Promise<NewsArticleAssetSentimentType>;
10
+ create(props: NewsArticleAssetSentimentType, globalClient?: ApolloClient<any>): Promise<NewsArticleAssetSentimentType>;
9
11
  /**
10
12
  * Create multiple NewsArticleAssetSentiment records.
11
13
  * @param props - Array of NewsArticleAssetSentiment objects for the new records.
14
+ * @param globalClient - Apollo Client instance.
12
15
  * @returns The count of created records or null.
13
16
  */
14
- createMany(props: NewsArticleAssetSentimentType[]): Promise<{
17
+ createMany(props: NewsArticleAssetSentimentType[], globalClient?: ApolloClient<any>): Promise<{
15
18
  count: number;
16
19
  } | null>;
17
20
  /**
18
21
  * Update a single NewsArticleAssetSentiment record.
19
22
  * @param props - Properties to update.
23
+ * @param globalClient - Apollo Client instance.
20
24
  * @returns The updated NewsArticleAssetSentiment or null.
21
25
  */
22
- update(props: NewsArticleAssetSentimentType): Promise<NewsArticleAssetSentimentType>;
26
+ update(props: NewsArticleAssetSentimentType, globalClient?: ApolloClient<any>): Promise<NewsArticleAssetSentimentType>;
23
27
  /**
24
28
  * Upsert a single NewsArticleAssetSentiment record.
25
29
  * @param props - Properties to update.
30
+ * @param globalClient - Apollo Client instance.
26
31
  * @returns The updated NewsArticleAssetSentiment or null.
27
32
  */
28
- upsert(props: NewsArticleAssetSentimentType): Promise<NewsArticleAssetSentimentType>;
33
+ upsert(props: NewsArticleAssetSentimentType, globalClient?: ApolloClient<any>): Promise<NewsArticleAssetSentimentType>;
29
34
  /**
30
35
  * Update multiple NewsArticleAssetSentiment records.
31
36
  * @param props - Array of NewsArticleAssetSentiment objects for the updated records.
37
+ * @param globalClient - Apollo Client instance.
32
38
  * @returns The count of created records or null.
33
39
  */
34
- updateMany(props: NewsArticleAssetSentimentType[]): Promise<{
40
+ updateMany(props: NewsArticleAssetSentimentType[], globalClient?: ApolloClient<any>): Promise<{
35
41
  count: number;
36
42
  } | null>;
37
43
  /**
38
44
  * Delete a single NewsArticleAssetSentiment record.
39
45
  * @param props - Properties to update.
46
+ * @param globalClient - Apollo Client instance.
40
47
  * @returns The deleted NewsArticleAssetSentiment or null.
41
48
  */
42
- delete(props: NewsArticleAssetSentimentType): Promise<NewsArticleAssetSentimentType>;
49
+ delete(props: NewsArticleAssetSentimentType, globalClient?: ApolloClient<any>): Promise<NewsArticleAssetSentimentType>;
43
50
  /**
44
51
  * Retrieve a single NewsArticleAssetSentiment record by ID.
45
52
  * @param props - Properties to update.
53
+ * @param globalClient - Apollo Client instance.
46
54
  * @returns The retrieved NewsArticleAssetSentiment or null.
47
55
  */
48
- get(props: NewsArticleAssetSentimentType): Promise<NewsArticleAssetSentimentType | null>;
56
+ get(props: NewsArticleAssetSentimentType, globalClient?: ApolloClient<any>): Promise<NewsArticleAssetSentimentType | null>;
49
57
  /**
50
58
  * Retrieve all NewsArticleAssetSentiments records.
59
+ * @param globalClient - Apollo Client instance.
51
60
  * @returns An array of NewsArticleAssetSentiment records or null.
52
61
  */
53
- getAll(): Promise<NewsArticleAssetSentimentType[] | null>;
62
+ getAll(globalClient?: ApolloClient<any>): Promise<NewsArticleAssetSentimentType[] | null>;
54
63
  /**
55
64
  * Find multiple NewsArticleAssetSentiment records based on conditions.
56
65
  * @param props - Conditions to find records.
66
+ * @param globalClient - Apollo Client instance.
57
67
  * @returns An array of found NewsArticleAssetSentiment records or null.
58
68
  */
59
- findMany(props: NewsArticleAssetSentimentType): Promise<NewsArticleAssetSentimentType[] | null>;
69
+ findMany(props: NewsArticleAssetSentimentType, globalClient?: ApolloClient<any>): Promise<NewsArticleAssetSentimentType[] | null>;
60
70
  };
61
71
  //# sourceMappingURL=NewsArticleAssetSentiment.d.ts.map
package/Order.cjs CHANGED
@@ -132,9 +132,11 @@ exports.Order = {
132
132
  /**
133
133
  * Create a new Order record.
134
134
  * @param props - Properties for the new record.
135
+ * @param client - Apollo Client instance.
135
136
  * @returns The created Order or null.
136
137
  */
137
- async create(props) {
138
+ async create(props, globalClient) {
139
+ const client = globalClient || client_2.client;
138
140
  const CREATE_ONE_ORDER = (0, client_1.gql) `
139
141
  mutation createOneOrder($data: OrderCreateInput!) {
140
142
  createOneOrder(data: $data) {
@@ -1394,7 +1396,7 @@ exports.Order = {
1394
1396
  };
1395
1397
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
1396
1398
  try {
1397
- const response = await client_2.client.mutate({ mutation: CREATE_ONE_ORDER, variables: filteredVariables });
1399
+ const response = await client.mutate({ mutation: CREATE_ONE_ORDER, variables: filteredVariables });
1398
1400
  if (response.errors && response.errors.length > 0)
1399
1401
  throw new Error(response.errors[0].message);
1400
1402
  if (response && response.data && response.data.createOneOrder) {
@@ -1412,9 +1414,11 @@ exports.Order = {
1412
1414
  /**
1413
1415
  * Create multiple Order records.
1414
1416
  * @param props - Array of Order objects for the new records.
1417
+ * @param globalClient - Apollo Client instance.
1415
1418
  * @returns The count of created records or null.
1416
1419
  */
1417
- async createMany(props) {
1420
+ async createMany(props, globalClient) {
1421
+ const client = globalClient || client_2.client;
1418
1422
  const CREATE_MANY_ORDER = (0, client_1.gql) `
1419
1423
  mutation createManyOrder($data: [OrderCreateManyInput!]!) {
1420
1424
  createManyOrder(data: $data) {
@@ -1456,7 +1460,7 @@ exports.Order = {
1456
1460
  };
1457
1461
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
1458
1462
  try {
1459
- const response = await client_2.client.mutate({ mutation: CREATE_MANY_ORDER, variables: filteredVariables });
1463
+ const response = await client.mutate({ mutation: CREATE_MANY_ORDER, variables: filteredVariables });
1460
1464
  if (response.errors && response.errors.length > 0)
1461
1465
  throw new Error(response.errors[0].message);
1462
1466
  if (response && response.data && response.data.createManyOrder) {
@@ -1474,9 +1478,11 @@ exports.Order = {
1474
1478
  /**
1475
1479
  * Update a single Order record.
1476
1480
  * @param props - Properties to update.
1481
+ * @param globalClient - Apollo Client instance.
1477
1482
  * @returns The updated Order or null.
1478
1483
  */
1479
- async update(props) {
1484
+ async update(props, globalClient) {
1485
+ const client = globalClient || client_2.client;
1480
1486
  const UPDATE_ONE_ORDER = (0, client_1.gql) `
1481
1487
  mutation updateOneOrder($data: OrderUpdateInput!, $where: OrderWhereUniqueInput!) {
1482
1488
  updateOneOrder(data: $data, where: $where) {
@@ -6534,7 +6540,7 @@ exports.Order = {
6534
6540
  };
6535
6541
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
6536
6542
  try {
6537
- const response = await client_2.client.mutate({ mutation: UPDATE_ONE_ORDER, variables: filteredVariables });
6543
+ const response = await client.mutate({ mutation: UPDATE_ONE_ORDER, variables: filteredVariables });
6538
6544
  if (response.errors && response.errors.length > 0)
6539
6545
  throw new Error(response.errors[0].message);
6540
6546
  if (response && response.data && response.data.updateOneOrder) {
@@ -6552,9 +6558,11 @@ exports.Order = {
6552
6558
  /**
6553
6559
  * Upsert a single Order record.
6554
6560
  * @param props - Properties to update.
6561
+ * @param globalClient - Apollo Client instance.
6555
6562
  * @returns The updated Order or null.
6556
6563
  */
6557
- async upsert(props) {
6564
+ async upsert(props, globalClient) {
6565
+ const client = globalClient || client_2.client;
6558
6566
  const UPSERT_ONE_ORDER = (0, client_1.gql) `
6559
6567
  mutation upsertOneOrder($where: OrderWhereUniqueInput!, $create: OrderCreateInput!, $update: OrderUpdateInput!) {
6560
6568
  upsertOneOrder(where: $where, create: $create, update: $update) {
@@ -12851,7 +12859,7 @@ exports.Order = {
12851
12859
  };
12852
12860
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
12853
12861
  try {
12854
- const response = await client_2.client.mutate({ mutation: UPSERT_ONE_ORDER, variables: filteredVariables });
12862
+ const response = await client.mutate({ mutation: UPSERT_ONE_ORDER, variables: filteredVariables });
12855
12863
  if (response.errors && response.errors.length > 0)
12856
12864
  throw new Error(response.errors[0].message);
12857
12865
  if (response && response.data && response.data.upsertOneOrder) {
@@ -12869,9 +12877,11 @@ exports.Order = {
12869
12877
  /**
12870
12878
  * Update multiple Order records.
12871
12879
  * @param props - Array of Order objects for the updated records.
12880
+ * @param globalClient - Apollo Client instance.
12872
12881
  * @returns The count of created records or null.
12873
12882
  */
12874
- async updateMany(props) {
12883
+ async updateMany(props, globalClient) {
12884
+ const client = globalClient || client_2.client;
12875
12885
  const UPDATE_MANY_ORDER = (0, client_1.gql) `
12876
12886
  mutation updateManyOrder($data: [OrderCreateManyInput!]!) {
12877
12887
  updateManyOrder(data: $data) {
@@ -17929,7 +17939,7 @@ exports.Order = {
17929
17939
  }));
17930
17940
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
17931
17941
  try {
17932
- const response = await client_2.client.mutate({ mutation: UPDATE_MANY_ORDER, variables: filteredVariables });
17942
+ const response = await client.mutate({ mutation: UPDATE_MANY_ORDER, variables: filteredVariables });
17933
17943
  if (response.errors && response.errors.length > 0)
17934
17944
  throw new Error(response.errors[0].message);
17935
17945
  if (response && response.data && response.data.updateManyOrder) {
@@ -17947,9 +17957,11 @@ exports.Order = {
17947
17957
  /**
17948
17958
  * Delete a single Order record.
17949
17959
  * @param props - Properties to update.
17960
+ * @param globalClient - Apollo Client instance.
17950
17961
  * @returns The deleted Order or null.
17951
17962
  */
17952
- async delete(props) {
17963
+ async delete(props, globalClient) {
17964
+ const client = globalClient || client_2.client;
17953
17965
  const DELETE_ONE_ORDER = (0, client_1.gql) `
17954
17966
  mutation deleteOneOrder($where: OrderWhereUniqueInput!) {
17955
17967
  deleteOneOrder(where: $where) {
@@ -17963,7 +17975,7 @@ exports.Order = {
17963
17975
  };
17964
17976
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
17965
17977
  try {
17966
- const response = await client_2.client.mutate({ mutation: DELETE_ONE_ORDER, variables: filteredVariables });
17978
+ const response = await client.mutate({ mutation: DELETE_ONE_ORDER, variables: filteredVariables });
17967
17979
  if (response.errors && response.errors.length > 0)
17968
17980
  throw new Error(response.errors[0].message);
17969
17981
  if (response && response.data && response.data.deleteOneOrder) {
@@ -17981,10 +17993,12 @@ exports.Order = {
17981
17993
  /**
17982
17994
  * Retrieve a single Order record by ID.
17983
17995
  * @param props - Properties to update.
17996
+ * @param globalClient - Apollo Client instance.
17984
17997
  * @returns The retrieved Order or null.
17985
17998
  */
17986
- async get(props) {
17999
+ async get(props, globalClient) {
17987
18000
  var _a, _b;
18001
+ const client = globalClient || client_2.client;
17988
18002
  const GET_ORDER = (0, client_1.gql) `
17989
18003
  query getOrder($where: OrderWhereUniqueInput!) {
17990
18004
  getOrder(where: $where) {
@@ -18005,7 +18019,7 @@ exports.Order = {
18005
18019
  };
18006
18020
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
18007
18021
  try {
18008
- const response = await client_2.client.query({ query: GET_ORDER, variables: filteredVariables });
18022
+ const response = await client.query({ query: GET_ORDER, variables: filteredVariables });
18009
18023
  if (response.errors && response.errors.length > 0)
18010
18024
  throw new Error(response.errors[0].message);
18011
18025
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.getOrder) !== null && _b !== void 0 ? _b : null;
@@ -18022,10 +18036,12 @@ exports.Order = {
18022
18036
  },
18023
18037
  /**
18024
18038
  * Retrieve all Orders records.
18039
+ * @param globalClient - Apollo Client instance.
18025
18040
  * @returns An array of Order records or null.
18026
18041
  */
18027
- async getAll() {
18042
+ async getAll(globalClient) {
18028
18043
  var _a, _b;
18044
+ const client = globalClient || client_2.client;
18029
18045
  const GET_ALL_ORDER = (0, client_1.gql) `
18030
18046
  query getAllOrder {
18031
18047
  orders {
@@ -18033,7 +18049,7 @@ exports.Order = {
18033
18049
  }
18034
18050
  }`;
18035
18051
  try {
18036
- const response = await client_2.client.query({ query: GET_ALL_ORDER });
18052
+ const response = await client.query({ query: GET_ALL_ORDER });
18037
18053
  if (response.errors && response.errors.length > 0)
18038
18054
  throw new Error(response.errors[0].message);
18039
18055
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.orders) !== null && _b !== void 0 ? _b : null;
@@ -18051,9 +18067,11 @@ exports.Order = {
18051
18067
  /**
18052
18068
  * Find multiple Order records based on conditions.
18053
18069
  * @param props - Conditions to find records.
18070
+ * @param globalClient - Apollo Client instance.
18054
18071
  * @returns An array of found Order records or null.
18055
18072
  */
18056
- async findMany(props) {
18073
+ async findMany(props, globalClient) {
18074
+ const client = globalClient || client_2.client;
18057
18075
  const FIND_MANY_ORDER = (0, client_1.gql) `
18058
18076
  query findManyOrder($where: OrderWhereInput!) {
18059
18077
  orders(where: $where) {
@@ -18075,7 +18093,7 @@ exports.Order = {
18075
18093
  };
18076
18094
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
18077
18095
  try {
18078
- const response = await client_2.client.query({ query: FIND_MANY_ORDER, variables: filteredVariables });
18096
+ const response = await client.query({ query: FIND_MANY_ORDER, variables: filteredVariables });
18079
18097
  if (response.errors && response.errors.length > 0)
18080
18098
  throw new Error(response.errors[0].message);
18081
18099
  if (response && response.data && response.data.Orders) {
package/Order.d.ts CHANGED
@@ -1,61 +1,71 @@
1
1
  import { Order as OrderType } from './generated/typegraphql-prisma/models/Order';
2
+ import { ApolloClient } from '@apollo/client';
2
3
  export declare const Order: {
3
4
  /**
4
5
  * Create a new Order record.
5
6
  * @param props - Properties for the new record.
7
+ * @param client - Apollo Client instance.
6
8
  * @returns The created Order or null.
7
9
  */
8
- create(props: OrderType): Promise<OrderType>;
10
+ create(props: OrderType, globalClient?: ApolloClient<any>): Promise<OrderType>;
9
11
  /**
10
12
  * Create multiple Order records.
11
13
  * @param props - Array of Order objects for the new records.
14
+ * @param globalClient - Apollo Client instance.
12
15
  * @returns The count of created records or null.
13
16
  */
14
- createMany(props: OrderType[]): Promise<{
17
+ createMany(props: OrderType[], globalClient?: ApolloClient<any>): Promise<{
15
18
  count: number;
16
19
  } | null>;
17
20
  /**
18
21
  * Update a single Order record.
19
22
  * @param props - Properties to update.
23
+ * @param globalClient - Apollo Client instance.
20
24
  * @returns The updated Order or null.
21
25
  */
22
- update(props: OrderType): Promise<OrderType>;
26
+ update(props: OrderType, globalClient?: ApolloClient<any>): Promise<OrderType>;
23
27
  /**
24
28
  * Upsert a single Order record.
25
29
  * @param props - Properties to update.
30
+ * @param globalClient - Apollo Client instance.
26
31
  * @returns The updated Order or null.
27
32
  */
28
- upsert(props: OrderType): Promise<OrderType>;
33
+ upsert(props: OrderType, globalClient?: ApolloClient<any>): Promise<OrderType>;
29
34
  /**
30
35
  * Update multiple Order records.
31
36
  * @param props - Array of Order objects for the updated records.
37
+ * @param globalClient - Apollo Client instance.
32
38
  * @returns The count of created records or null.
33
39
  */
34
- updateMany(props: OrderType[]): Promise<{
40
+ updateMany(props: OrderType[], globalClient?: ApolloClient<any>): Promise<{
35
41
  count: number;
36
42
  } | null>;
37
43
  /**
38
44
  * Delete a single Order record.
39
45
  * @param props - Properties to update.
46
+ * @param globalClient - Apollo Client instance.
40
47
  * @returns The deleted Order or null.
41
48
  */
42
- delete(props: OrderType): Promise<OrderType>;
49
+ delete(props: OrderType, globalClient?: ApolloClient<any>): Promise<OrderType>;
43
50
  /**
44
51
  * Retrieve a single Order record by ID.
45
52
  * @param props - Properties to update.
53
+ * @param globalClient - Apollo Client instance.
46
54
  * @returns The retrieved Order or null.
47
55
  */
48
- get(props: OrderType): Promise<OrderType | null>;
56
+ get(props: OrderType, globalClient?: ApolloClient<any>): Promise<OrderType | null>;
49
57
  /**
50
58
  * Retrieve all Orders records.
59
+ * @param globalClient - Apollo Client instance.
51
60
  * @returns An array of Order records or null.
52
61
  */
53
- getAll(): Promise<OrderType[] | null>;
62
+ getAll(globalClient?: ApolloClient<any>): Promise<OrderType[] | null>;
54
63
  /**
55
64
  * Find multiple Order records based on conditions.
56
65
  * @param props - Conditions to find records.
66
+ * @param globalClient - Apollo Client instance.
57
67
  * @returns An array of found Order records or null.
58
68
  */
59
- findMany(props: OrderType): Promise<OrderType[] | null>;
69
+ findMany(props: OrderType, globalClient?: ApolloClient<any>): Promise<OrderType[] | null>;
60
70
  };
61
71
  //# sourceMappingURL=Order.d.ts.map