adaptic-backend 1.0.34 → 1.0.35

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 (230) hide show
  1. package/AIRecommendation.d.ts +7 -8
  2. package/AIRecommendation.js +15 -7
  3. package/Account.d.ts +7 -8
  4. package/Account.js +15 -7
  5. package/Alert.d.ts +7 -8
  6. package/Alert.js +15 -7
  7. package/AlpacaAccount.d.ts +7 -8
  8. package/AlpacaAccount.js +15 -7
  9. package/Asset.d.ts +7 -8
  10. package/Asset.js +15 -7
  11. package/Authenticator.d.ts +7 -8
  12. package/Authenticator.js +15 -7
  13. package/Customer.d.ts +7 -8
  14. package/Customer.js +15 -7
  15. package/EconomicEvent.d.ts +7 -8
  16. package/EconomicEvent.js +15 -7
  17. package/EnvironmentVariable.d.ts +7 -8
  18. package/EnvironmentVariable.js +15 -7
  19. package/Holding.d.ts +7 -8
  20. package/Holding.js +15 -7
  21. package/NewsArticle.d.ts +7 -8
  22. package/NewsArticle.js +15 -7
  23. package/NewsArticleAssetSentiment.d.ts +7 -8
  24. package/NewsArticleAssetSentiment.js +15 -7
  25. package/Order.d.ts +7 -8
  26. package/Order.js +15 -7
  27. package/PerformanceMetric.d.ts +7 -8
  28. package/PerformanceMetric.js +15 -7
  29. package/README.md +5 -8
  30. package/RiskAllocation.d.ts +7 -8
  31. package/RiskAllocation.js +15 -7
  32. package/Session.d.ts +7 -8
  33. package/Session.js +15 -7
  34. package/Trade.d.ts +7 -8
  35. package/Trade.js +15 -7
  36. package/TradeStep.d.ts +7 -8
  37. package/TradeStep.js +15 -7
  38. package/TradingAccount.d.ts +7 -8
  39. package/TradingAccount.js +15 -7
  40. package/User.d.ts +7 -8
  41. package/User.js +15 -7
  42. package/VerificationToken.d.ts +7 -8
  43. package/VerificationToken.js +15 -7
  44. package/client.d.ts +6 -0
  45. package/client.js +80 -0
  46. package/generated/typegraphql-prisma/enhance.d.ts.map +1 -1
  47. package/generated/typegraphql-prisma/enhance.js +5 -1
  48. package/generated/typegraphql-prisma/enhance.js.map +1 -1
  49. package/generated/typegraphql-prisma/resolvers/inputs/AlpacaAccountScalarWhereWithAggregatesInput.d.ts +1 -1
  50. package/generated/typegraphql-prisma/resolvers/inputs/AlpacaAccountScalarWhereWithAggregatesInput.d.ts.map +1 -1
  51. package/generated/typegraphql-prisma/resolvers/inputs/AlpacaAccountScalarWhereWithAggregatesInput.js +1 -1
  52. package/generated/typegraphql-prisma/resolvers/inputs/AlpacaAccountScalarWhereWithAggregatesInput.js.map +1 -1
  53. package/generated/typegraphql-prisma/resolvers/inputs/AlpacaAccountWhereInput.d.ts +1 -1
  54. package/generated/typegraphql-prisma/resolvers/inputs/AlpacaAccountWhereInput.d.ts.map +1 -1
  55. package/generated/typegraphql-prisma/resolvers/inputs/AlpacaAccountWhereInput.js +1 -1
  56. package/generated/typegraphql-prisma/resolvers/inputs/AlpacaAccountWhereInput.js.map +1 -1
  57. package/generated/typegraphql-prisma/resolvers/inputs/NestedUuidNullableFilter.d.ts +11 -0
  58. package/generated/typegraphql-prisma/resolvers/inputs/NestedUuidNullableFilter.d.ts.map +1 -0
  59. package/generated/typegraphql-prisma/resolvers/inputs/NestedUuidNullableFilter.js +91 -0
  60. package/generated/typegraphql-prisma/resolvers/inputs/NestedUuidNullableFilter.js.map +1 -0
  61. package/generated/typegraphql-prisma/resolvers/inputs/NestedUuidNullableWithAggregatesFilter.d.ts +16 -0
  62. package/generated/typegraphql-prisma/resolvers/inputs/NestedUuidNullableWithAggregatesFilter.d.ts.map +1 -0
  63. package/generated/typegraphql-prisma/resolvers/inputs/NestedUuidNullableWithAggregatesFilter.js +111 -0
  64. package/generated/typegraphql-prisma/resolvers/inputs/NestedUuidNullableWithAggregatesFilter.js.map +1 -0
  65. package/generated/typegraphql-prisma/resolvers/inputs/UserScalarWhereInput.d.ts +2 -1
  66. package/generated/typegraphql-prisma/resolvers/inputs/UserScalarWhereInput.d.ts.map +1 -1
  67. package/generated/typegraphql-prisma/resolvers/inputs/UserScalarWhereInput.js +2 -1
  68. package/generated/typegraphql-prisma/resolvers/inputs/UserScalarWhereInput.js.map +1 -1
  69. package/generated/typegraphql-prisma/resolvers/inputs/UserScalarWhereWithAggregatesInput.d.ts +2 -1
  70. package/generated/typegraphql-prisma/resolvers/inputs/UserScalarWhereWithAggregatesInput.d.ts.map +1 -1
  71. package/generated/typegraphql-prisma/resolvers/inputs/UserScalarWhereWithAggregatesInput.js +2 -1
  72. package/generated/typegraphql-prisma/resolvers/inputs/UserScalarWhereWithAggregatesInput.js.map +1 -1
  73. package/generated/typegraphql-prisma/resolvers/inputs/UserWhereInput.d.ts +2 -1
  74. package/generated/typegraphql-prisma/resolvers/inputs/UserWhereInput.d.ts.map +1 -1
  75. package/generated/typegraphql-prisma/resolvers/inputs/UserWhereInput.js +2 -1
  76. package/generated/typegraphql-prisma/resolvers/inputs/UserWhereInput.js.map +1 -1
  77. package/generated/typegraphql-prisma/resolvers/inputs/UserWhereUniqueInput.d.ts +1 -1
  78. package/generated/typegraphql-prisma/resolvers/inputs/UserWhereUniqueInput.d.ts.map +1 -1
  79. package/generated/typegraphql-prisma/resolvers/inputs/UserWhereUniqueInput.js +6 -6
  80. package/generated/typegraphql-prisma/resolvers/inputs/UserWhereUniqueInput.js.map +1 -1
  81. package/generated/typegraphql-prisma/resolvers/inputs/UuidNullableFilter.d.ts +13 -0
  82. package/generated/typegraphql-prisma/resolvers/inputs/UuidNullableFilter.d.ts.map +1 -0
  83. package/generated/typegraphql-prisma/resolvers/inputs/UuidNullableFilter.js +99 -0
  84. package/generated/typegraphql-prisma/resolvers/inputs/UuidNullableFilter.js.map +1 -0
  85. package/generated/typegraphql-prisma/resolvers/inputs/UuidNullableWithAggregatesFilter.d.ts +18 -0
  86. package/generated/typegraphql-prisma/resolvers/inputs/UuidNullableWithAggregatesFilter.d.ts.map +1 -0
  87. package/generated/typegraphql-prisma/resolvers/inputs/UuidNullableWithAggregatesFilter.js +119 -0
  88. package/generated/typegraphql-prisma/resolvers/inputs/UuidNullableWithAggregatesFilter.js.map +1 -0
  89. package/generated/typegraphql-prisma/resolvers/inputs/index.d.ts +4 -0
  90. package/generated/typegraphql-prisma/resolvers/inputs/index.d.ts.map +1 -1
  91. package/generated/typegraphql-prisma/resolvers/inputs/index.js +19 -11
  92. package/generated/typegraphql-prisma/resolvers/inputs/index.js.map +1 -1
  93. package/index.d.ts +147 -147
  94. package/package.json +2 -4
  95. package/server/AIRecommendation.d.ts +7 -8
  96. package/server/AIRecommendation.d.ts.map +1 -1
  97. package/server/AIRecommendation.js.map +1 -1
  98. package/server/AIRecommendation.mjs +15 -7
  99. package/server/Account.d.ts +7 -8
  100. package/server/Account.d.ts.map +1 -1
  101. package/server/Account.js.map +1 -1
  102. package/server/Account.mjs +15 -7
  103. package/server/Alert.d.ts +7 -8
  104. package/server/Alert.d.ts.map +1 -1
  105. package/server/Alert.js.map +1 -1
  106. package/server/Alert.mjs +15 -7
  107. package/server/AlpacaAccount.d.ts +7 -8
  108. package/server/AlpacaAccount.d.ts.map +1 -1
  109. package/server/AlpacaAccount.js.map +1 -1
  110. package/server/AlpacaAccount.mjs +15 -7
  111. package/server/Asset.d.ts +7 -8
  112. package/server/Asset.d.ts.map +1 -1
  113. package/server/Asset.js.map +1 -1
  114. package/server/Asset.mjs +15 -7
  115. package/server/Authenticator.d.ts +7 -8
  116. package/server/Authenticator.d.ts.map +1 -1
  117. package/server/Authenticator.js.map +1 -1
  118. package/server/Authenticator.mjs +15 -7
  119. package/server/Customer.d.ts +7 -8
  120. package/server/Customer.d.ts.map +1 -1
  121. package/server/Customer.js.map +1 -1
  122. package/server/Customer.mjs +15 -7
  123. package/server/EconomicEvent.d.ts +7 -8
  124. package/server/EconomicEvent.d.ts.map +1 -1
  125. package/server/EconomicEvent.js.map +1 -1
  126. package/server/EconomicEvent.mjs +15 -7
  127. package/server/EnvironmentVariable.d.ts +7 -8
  128. package/server/EnvironmentVariable.d.ts.map +1 -1
  129. package/server/EnvironmentVariable.js.map +1 -1
  130. package/server/EnvironmentVariable.mjs +15 -7
  131. package/server/Holding.d.ts +7 -8
  132. package/server/Holding.d.ts.map +1 -1
  133. package/server/Holding.js.map +1 -1
  134. package/server/Holding.mjs +15 -7
  135. package/server/NewsArticle.d.ts +7 -8
  136. package/server/NewsArticle.d.ts.map +1 -1
  137. package/server/NewsArticle.js.map +1 -1
  138. package/server/NewsArticle.mjs +15 -7
  139. package/server/NewsArticleAssetSentiment.d.ts +7 -8
  140. package/server/NewsArticleAssetSentiment.d.ts.map +1 -1
  141. package/server/NewsArticleAssetSentiment.js.map +1 -1
  142. package/server/NewsArticleAssetSentiment.mjs +15 -7
  143. package/server/Order.d.ts +7 -8
  144. package/server/Order.d.ts.map +1 -1
  145. package/server/Order.js.map +1 -1
  146. package/server/Order.mjs +15 -7
  147. package/server/PerformanceMetric.d.ts +7 -8
  148. package/server/PerformanceMetric.d.ts.map +1 -1
  149. package/server/PerformanceMetric.js.map +1 -1
  150. package/server/PerformanceMetric.mjs +15 -7
  151. package/server/RiskAllocation.d.ts +7 -8
  152. package/server/RiskAllocation.d.ts.map +1 -1
  153. package/server/RiskAllocation.js.map +1 -1
  154. package/server/RiskAllocation.mjs +15 -7
  155. package/server/Session.d.ts +7 -8
  156. package/server/Session.d.ts.map +1 -1
  157. package/server/Session.js.map +1 -1
  158. package/server/Session.mjs +15 -7
  159. package/server/Trade.d.ts +7 -8
  160. package/server/Trade.d.ts.map +1 -1
  161. package/server/Trade.js.map +1 -1
  162. package/server/Trade.mjs +15 -7
  163. package/server/TradeStep.d.ts +7 -8
  164. package/server/TradeStep.d.ts.map +1 -1
  165. package/server/TradeStep.js.map +1 -1
  166. package/server/TradeStep.mjs +15 -7
  167. package/server/TradingAccount.d.ts +7 -8
  168. package/server/TradingAccount.d.ts.map +1 -1
  169. package/server/TradingAccount.js.map +1 -1
  170. package/server/TradingAccount.mjs +15 -7
  171. package/server/User.d.ts +7 -8
  172. package/server/User.d.ts.map +1 -1
  173. package/server/User.js.map +1 -1
  174. package/server/User.mjs +15 -7
  175. package/server/VerificationToken.d.ts +7 -8
  176. package/server/VerificationToken.d.ts.map +1 -1
  177. package/server/VerificationToken.js.map +1 -1
  178. package/server/VerificationToken.mjs +15 -7
  179. package/server/client.d.ts +6 -0
  180. package/server/client.d.ts.map +1 -0
  181. package/server/client.js.map +1 -0
  182. package/server/client.mjs +74 -0
  183. package/server/generated/typegraphql-prisma/enhance.d.ts.map +1 -1
  184. package/server/generated/typegraphql-prisma/enhance.js.map +1 -1
  185. package/server/generated/typegraphql-prisma/enhance.mjs +5 -1
  186. package/server/generated/typegraphql-prisma/resolvers/inputs/AlpacaAccountScalarWhereWithAggregatesInput.d.ts +1 -1
  187. package/server/generated/typegraphql-prisma/resolvers/inputs/AlpacaAccountScalarWhereWithAggregatesInput.d.ts.map +1 -1
  188. package/server/generated/typegraphql-prisma/resolvers/inputs/AlpacaAccountScalarWhereWithAggregatesInput.js.map +1 -1
  189. package/server/generated/typegraphql-prisma/resolvers/inputs/AlpacaAccountScalarWhereWithAggregatesInput.mjs +1 -1
  190. package/server/generated/typegraphql-prisma/resolvers/inputs/AlpacaAccountWhereInput.d.ts +1 -1
  191. package/server/generated/typegraphql-prisma/resolvers/inputs/AlpacaAccountWhereInput.d.ts.map +1 -1
  192. package/server/generated/typegraphql-prisma/resolvers/inputs/AlpacaAccountWhereInput.js.map +1 -1
  193. package/server/generated/typegraphql-prisma/resolvers/inputs/AlpacaAccountWhereInput.mjs +1 -1
  194. package/server/generated/typegraphql-prisma/resolvers/inputs/NestedUuidNullableFilter.d.ts +11 -0
  195. package/server/generated/typegraphql-prisma/resolvers/inputs/NestedUuidNullableFilter.d.ts.map +1 -0
  196. package/server/generated/typegraphql-prisma/resolvers/inputs/NestedUuidNullableFilter.js.map +1 -0
  197. package/server/generated/typegraphql-prisma/resolvers/inputs/NestedUuidNullableFilter.mjs +73 -0
  198. package/server/generated/typegraphql-prisma/resolvers/inputs/NestedUuidNullableWithAggregatesFilter.d.ts +16 -0
  199. package/server/generated/typegraphql-prisma/resolvers/inputs/NestedUuidNullableWithAggregatesFilter.d.ts.map +1 -0
  200. package/server/generated/typegraphql-prisma/resolvers/inputs/NestedUuidNullableWithAggregatesFilter.js.map +1 -0
  201. package/server/generated/typegraphql-prisma/resolvers/inputs/NestedUuidNullableWithAggregatesFilter.mjs +96 -0
  202. package/server/generated/typegraphql-prisma/resolvers/inputs/UserScalarWhereInput.d.ts +2 -1
  203. package/server/generated/typegraphql-prisma/resolvers/inputs/UserScalarWhereInput.d.ts.map +1 -1
  204. package/server/generated/typegraphql-prisma/resolvers/inputs/UserScalarWhereInput.js.map +1 -1
  205. package/server/generated/typegraphql-prisma/resolvers/inputs/UserScalarWhereInput.mjs +2 -1
  206. package/server/generated/typegraphql-prisma/resolvers/inputs/UserScalarWhereWithAggregatesInput.d.ts +2 -1
  207. package/server/generated/typegraphql-prisma/resolvers/inputs/UserScalarWhereWithAggregatesInput.d.ts.map +1 -1
  208. package/server/generated/typegraphql-prisma/resolvers/inputs/UserScalarWhereWithAggregatesInput.js.map +1 -1
  209. package/server/generated/typegraphql-prisma/resolvers/inputs/UserScalarWhereWithAggregatesInput.mjs +2 -1
  210. package/server/generated/typegraphql-prisma/resolvers/inputs/UserWhereInput.d.ts +2 -1
  211. package/server/generated/typegraphql-prisma/resolvers/inputs/UserWhereInput.d.ts.map +1 -1
  212. package/server/generated/typegraphql-prisma/resolvers/inputs/UserWhereInput.js.map +1 -1
  213. package/server/generated/typegraphql-prisma/resolvers/inputs/UserWhereInput.mjs +2 -1
  214. package/server/generated/typegraphql-prisma/resolvers/inputs/UserWhereUniqueInput.d.ts +1 -1
  215. package/server/generated/typegraphql-prisma/resolvers/inputs/UserWhereUniqueInput.d.ts.map +1 -1
  216. package/server/generated/typegraphql-prisma/resolvers/inputs/UserWhereUniqueInput.js.map +1 -1
  217. package/server/generated/typegraphql-prisma/resolvers/inputs/UserWhereUniqueInput.mjs +7 -7
  218. package/server/generated/typegraphql-prisma/resolvers/inputs/UuidNullableFilter.d.ts +13 -0
  219. package/server/generated/typegraphql-prisma/resolvers/inputs/UuidNullableFilter.d.ts.map +1 -0
  220. package/server/generated/typegraphql-prisma/resolvers/inputs/UuidNullableFilter.js.map +1 -0
  221. package/server/generated/typegraphql-prisma/resolvers/inputs/UuidNullableFilter.mjs +82 -0
  222. package/server/generated/typegraphql-prisma/resolvers/inputs/UuidNullableWithAggregatesFilter.d.ts +18 -0
  223. package/server/generated/typegraphql-prisma/resolvers/inputs/UuidNullableWithAggregatesFilter.d.ts.map +1 -0
  224. package/server/generated/typegraphql-prisma/resolvers/inputs/UuidNullableWithAggregatesFilter.js.map +1 -0
  225. package/server/generated/typegraphql-prisma/resolvers/inputs/UuidNullableWithAggregatesFilter.mjs +105 -0
  226. package/server/generated/typegraphql-prisma/resolvers/inputs/index.d.ts +4 -0
  227. package/server/generated/typegraphql-prisma/resolvers/inputs/index.d.ts.map +1 -1
  228. package/server/generated/typegraphql-prisma/resolvers/inputs/index.js.map +1 -1
  229. package/server/generated/typegraphql-prisma/resolvers/inputs/index.mjs +4 -0
  230. package/server/index.d.ts +147 -147
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PerformanceMetric = void 0;
4
4
  const client_1 = require("@apollo/client");
5
+ const client_2 = require("./client");
5
6
  const utils_1 = require("./utils");
6
7
  /**
7
8
  * CRUD operations for the PerformanceMetric model.
@@ -13,7 +14,8 @@ exports.PerformanceMetric = {
13
14
  * @param client - Apollo Client instance.
14
15
  * @returns The created PerformanceMetric or null.
15
16
  */
16
- async create(props, client) {
17
+ async create(props) {
18
+ const client = await (0, client_2.initializeApolloServerSide)();
17
19
  const CREATE_ONE_PERFORMANCEMETRIC = (0, client_1.gql) `
18
20
  mutation createOnePerformanceMetric($data: PerformanceMetricCreateInput!) {
19
21
  createOnePerformanceMetric(data: $data) {
@@ -672,7 +674,8 @@ exports.PerformanceMetric = {
672
674
  * @param client - Apollo Client instance.
673
675
  * @returns The count of created records or null.
674
676
  */
675
- async createMany(props, client) {
677
+ async createMany(props) {
678
+ const client = await (0, client_2.initializeApolloServerSide)();
676
679
  const CREATE_MANY_PERFORMANCEMETRIC = (0, client_1.gql) `
677
680
  mutation createManyPerformanceMetric($data: [PerformanceMetricCreateManyInput!]!) {
678
681
  createManyPerformanceMetric(data: $data) {
@@ -710,7 +713,8 @@ exports.PerformanceMetric = {
710
713
  * @param client - Apollo Client instance.
711
714
  * @returns The updated PerformanceMetric or null.
712
715
  */
713
- async update(props, client) {
716
+ async update(props) {
717
+ const client = await (0, client_2.initializeApolloServerSide)();
714
718
  const UPDATE_ONE_PERFORMANCEMETRIC = (0, client_1.gql) `
715
719
  mutation updateOnePerformanceMetric($data: PerformanceMetricUpdateInput!, $where: PerformanceMetricWhereUniqueInput!) {
716
720
  updateOnePerformanceMetric(data: $data, where: $where) {
@@ -1967,7 +1971,8 @@ exports.PerformanceMetric = {
1967
1971
  * @param client - Apollo Client instance.
1968
1972
  * @returns The deleted PerformanceMetric or null.
1969
1973
  */
1970
- async delete(props, client) {
1974
+ async delete(props) {
1975
+ const client = await (0, client_2.initializeApolloServerSide)();
1971
1976
  const DELETE_ONE_PERFORMANCEMETRIC = (0, client_1.gql) `
1972
1977
  mutation deleteOnePerformanceMetric($where: PerformanceMetricWhereUniqueInput!) {
1973
1978
  deleteOnePerformanceMetric(where: $where) {
@@ -2321,8 +2326,9 @@ exports.PerformanceMetric = {
2321
2326
  * @param client - Apollo Client instance.
2322
2327
  * @returns The retrieved PerformanceMetric or null.
2323
2328
  */
2324
- async get(props, client) {
2329
+ async get(props) {
2325
2330
  var _a, _b;
2331
+ const client = await (0, client_2.initializeApolloServerSide)();
2326
2332
  const GET_PERFORMANCEMETRIC = (0, client_1.gql) `
2327
2333
  query getPerformanceMetric($where: PerformanceMetricWhereUniqueInput!) {
2328
2334
  getPerformanceMetric(where: $where) {
@@ -2675,8 +2681,9 @@ exports.PerformanceMetric = {
2675
2681
  * @param client - Apollo Client instance.
2676
2682
  * @returns An array of PerformanceMetric records or null.
2677
2683
  */
2678
- async getAll(client) {
2684
+ async getAll() {
2679
2685
  var _a, _b;
2686
+ const client = await (0, client_2.initializeApolloServerSide)();
2680
2687
  const GET_ALL_PERFORMANCEMETRIC = (0, client_1.gql) `
2681
2688
  query getAllPerformanceMetric {
2682
2689
  performanceMetrics {
@@ -3024,7 +3031,8 @@ exports.PerformanceMetric = {
3024
3031
  * @param client - Apollo Client instance.
3025
3032
  * @returns An array of found PerformanceMetric records or null.
3026
3033
  */
3027
- async findMany(props, client) {
3034
+ async findMany(props) {
3035
+ const client = await (0, client_2.initializeApolloServerSide)();
3028
3036
  const FIND_MANY_PERFORMANCEMETRIC = (0, client_1.gql) `
3029
3037
  query findManyPerformanceMetric($where: PerformanceMetricWhereInput!) {
3030
3038
  performanceMetrics(where: $where) {
package/README.md CHANGED
@@ -24,25 +24,22 @@ This package offers a robust backend solution tailored for the Adaptic AI platfo
24
24
 
25
25
  ## Prerequisites
26
26
 
27
- To use the `adaptic-backend` package, the only requirement id to provide a valid GraphQL endpoint URI. This can be a local development server or a production endpoint, depending on your project's needs.
28
-
29
-
30
- ### Dependencies
31
-
32
- Ensure that the following dependencies are installed in your project:
33
- - `@apollo/client`: `^3.11.8`
34
- - `cross-fetch`: `^3.1.0`
27
+ To use the `adaptic-backend` package, the only requirement is to ensure you have several environment variables configured (see below). This can be a local development server or a production endpoints for the graphql server, and the corresponding HTTPS and WebSocket URLs.
35
28
 
36
29
  ### Environment Variables
37
30
 
38
31
  Add the folowing to your `.env` file or add them as environment variables in your deployment environment:
39
32
 
40
33
  - `GRAPHQL_ENDPOINT`: The URI of your GraphQL server (e.g., `http://localhost:4000/graphql` for local development, or a production endpoint for deployment e.g. `https://api.example.com/graphql`).
34
+ - `BACKEND_HTTPS_URL`: The HTTPS URL of your GraphQL server. E.g. `https://api.example.com/graphql`.
35
+ - `BACKEND_WS_URL`: The WebSocket URL of your GraphQL server. E.g. `wss://api.example.com/subscriptions`.
41
36
 
42
37
  Example `.env` file:
43
38
 
44
39
  ```plaintext
45
40
  GRAPHQL_ENDPOINT=http://localhost:4000/graphql
41
+ BACKEND_HTTPS_URL=https://api.example.com/graphql
42
+ BACKEND_WS_URL=wss://api.example.com/subscriptions
46
43
  ```
47
44
 
48
45
  ## Installation
@@ -1,5 +1,4 @@
1
1
  import { RiskAllocation as RiskAllocationType } from './generated/typegraphql-prisma/models/RiskAllocation';
2
- import { ApolloClient, NormalizedCacheObject } from '@apollo/client';
3
2
  /**
4
3
  * CRUD operations for the RiskAllocation model.
5
4
  */
@@ -10,14 +9,14 @@ export declare const RiskAllocation: {
10
9
  * @param client - Apollo Client instance.
11
10
  * @returns The created RiskAllocation or null.
12
11
  */
13
- create(props: RiskAllocationType, client: ApolloClient<NormalizedCacheObject>): Promise<RiskAllocationType>;
12
+ create(props: RiskAllocationType): Promise<RiskAllocationType>;
14
13
  /**
15
14
  * Create multiple RiskAllocation records.
16
15
  * @param props - Array of properties for the new records.
17
16
  * @param client - Apollo Client instance.
18
17
  * @returns The count of created records or null.
19
18
  */
20
- createMany(props: RiskAllocationType[], client: ApolloClient<NormalizedCacheObject>): Promise<{
19
+ createMany(props: RiskAllocationType[]): Promise<{
21
20
  count: number;
22
21
  } | null>;
23
22
  /**
@@ -26,33 +25,33 @@ export declare const RiskAllocation: {
26
25
  * @param client - Apollo Client instance.
27
26
  * @returns The updated RiskAllocation or null.
28
27
  */
29
- update(props: RiskAllocationType, client: ApolloClient<NormalizedCacheObject>): Promise<RiskAllocationType>;
28
+ update(props: RiskAllocationType): Promise<RiskAllocationType>;
30
29
  /**
31
30
  * Delete a single RiskAllocation record.
32
31
  * @param props - Properties to update.
33
32
  * @param client - Apollo Client instance.
34
33
  * @returns The deleted RiskAllocation or null.
35
34
  */
36
- delete(props: RiskAllocationType, client: ApolloClient<NormalizedCacheObject>): Promise<RiskAllocationType>;
35
+ delete(props: RiskAllocationType): Promise<RiskAllocationType>;
37
36
  /**
38
37
  * Retrieve a single RiskAllocation record by ID.
39
38
  * @param props - Properties to update.
40
39
  * @param client - Apollo Client instance.
41
40
  * @returns The retrieved RiskAllocation or null.
42
41
  */
43
- get(props: RiskAllocationType, client: ApolloClient<NormalizedCacheObject>): Promise<RiskAllocationType | null>;
42
+ get(props: RiskAllocationType): Promise<RiskAllocationType | null>;
44
43
  /**
45
44
  * Retrieve all RiskAllocations records.
46
45
  * @param client - Apollo Client instance.
47
46
  * @returns An array of RiskAllocation records or null.
48
47
  */
49
- getAll(client: ApolloClient<NormalizedCacheObject>): Promise<RiskAllocationType[] | null>;
48
+ getAll(): Promise<RiskAllocationType[] | null>;
50
49
  /**
51
50
  * Find multiple RiskAllocation records based on conditions.
52
51
  * @param where - Conditions to find records.
53
52
  * @param client - Apollo Client instance.
54
53
  * @returns An array of found RiskAllocation records or null.
55
54
  */
56
- findMany(props: RiskAllocationType, client: ApolloClient<NormalizedCacheObject>): Promise<RiskAllocationType[] | null>;
55
+ findMany(props: RiskAllocationType): Promise<RiskAllocationType[] | null>;
57
56
  };
58
57
  //# sourceMappingURL=RiskAllocation.d.ts.map
package/RiskAllocation.js CHANGED
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RiskAllocation = void 0;
4
4
  const client_1 = require("@apollo/client");
5
+ const client_2 = require("./client");
5
6
  const utils_1 = require("./utils");
6
7
  /**
7
8
  * CRUD operations for the RiskAllocation model.
@@ -13,7 +14,8 @@ exports.RiskAllocation = {
13
14
  * @param client - Apollo Client instance.
14
15
  * @returns The created RiskAllocation or null.
15
16
  */
16
- async create(props, client) {
17
+ async create(props) {
18
+ const client = await (0, client_2.initializeApolloServerSide)();
17
19
  const CREATE_ONE_RISKALLOCATION = (0, client_1.gql) `
18
20
  mutation createOneRiskAllocation($data: RiskAllocationCreateInput!) {
19
21
  createOneRiskAllocation(data: $data) {
@@ -672,7 +674,8 @@ exports.RiskAllocation = {
672
674
  * @param client - Apollo Client instance.
673
675
  * @returns The count of created records or null.
674
676
  */
675
- async createMany(props, client) {
677
+ async createMany(props) {
678
+ const client = await (0, client_2.initializeApolloServerSide)();
676
679
  const CREATE_MANY_RISKALLOCATION = (0, client_1.gql) `
677
680
  mutation createManyRiskAllocation($data: [RiskAllocationCreateManyInput!]!) {
678
681
  createManyRiskAllocation(data: $data) {
@@ -710,7 +713,8 @@ exports.RiskAllocation = {
710
713
  * @param client - Apollo Client instance.
711
714
  * @returns The updated RiskAllocation or null.
712
715
  */
713
- async update(props, client) {
716
+ async update(props) {
717
+ const client = await (0, client_2.initializeApolloServerSide)();
714
718
  const UPDATE_ONE_RISKALLOCATION = (0, client_1.gql) `
715
719
  mutation updateOneRiskAllocation($data: RiskAllocationUpdateInput!, $where: RiskAllocationWhereUniqueInput!) {
716
720
  updateOneRiskAllocation(data: $data, where: $where) {
@@ -1970,7 +1974,8 @@ exports.RiskAllocation = {
1970
1974
  * @param client - Apollo Client instance.
1971
1975
  * @returns The deleted RiskAllocation or null.
1972
1976
  */
1973
- async delete(props, client) {
1977
+ async delete(props) {
1978
+ const client = await (0, client_2.initializeApolloServerSide)();
1974
1979
  const DELETE_ONE_RISKALLOCATION = (0, client_1.gql) `
1975
1980
  mutation deleteOneRiskAllocation($where: RiskAllocationWhereUniqueInput!) {
1976
1981
  deleteOneRiskAllocation(where: $where) {
@@ -2324,8 +2329,9 @@ exports.RiskAllocation = {
2324
2329
  * @param client - Apollo Client instance.
2325
2330
  * @returns The retrieved RiskAllocation or null.
2326
2331
  */
2327
- async get(props, client) {
2332
+ async get(props) {
2328
2333
  var _a, _b;
2334
+ const client = await (0, client_2.initializeApolloServerSide)();
2329
2335
  const GET_RISKALLOCATION = (0, client_1.gql) `
2330
2336
  query getRiskAllocation($where: RiskAllocationWhereUniqueInput!) {
2331
2337
  getRiskAllocation(where: $where) {
@@ -2678,8 +2684,9 @@ exports.RiskAllocation = {
2678
2684
  * @param client - Apollo Client instance.
2679
2685
  * @returns An array of RiskAllocation records or null.
2680
2686
  */
2681
- async getAll(client) {
2687
+ async getAll() {
2682
2688
  var _a, _b;
2689
+ const client = await (0, client_2.initializeApolloServerSide)();
2683
2690
  const GET_ALL_RISKALLOCATION = (0, client_1.gql) `
2684
2691
  query getAllRiskAllocation {
2685
2692
  riskAllocations {
@@ -3027,7 +3034,8 @@ exports.RiskAllocation = {
3027
3034
  * @param client - Apollo Client instance.
3028
3035
  * @returns An array of found RiskAllocation records or null.
3029
3036
  */
3030
- async findMany(props, client) {
3037
+ async findMany(props) {
3038
+ const client = await (0, client_2.initializeApolloServerSide)();
3031
3039
  const FIND_MANY_RISKALLOCATION = (0, client_1.gql) `
3032
3040
  query findManyRiskAllocation($where: RiskAllocationWhereInput!) {
3033
3041
  riskAllocations(where: $where) {
package/Session.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Session as SessionType } from './generated/typegraphql-prisma/models/Session';
2
- import { ApolloClient, NormalizedCacheObject } from '@apollo/client';
3
2
  /**
4
3
  * CRUD operations for the Session model.
5
4
  */
@@ -10,14 +9,14 @@ export declare const Session: {
10
9
  * @param client - Apollo Client instance.
11
10
  * @returns The created Session or null.
12
11
  */
13
- create(props: SessionType, client: ApolloClient<NormalizedCacheObject>): Promise<SessionType>;
12
+ create(props: SessionType): Promise<SessionType>;
14
13
  /**
15
14
  * Create multiple Session records.
16
15
  * @param props - Array of properties for the new records.
17
16
  * @param client - Apollo Client instance.
18
17
  * @returns The count of created records or null.
19
18
  */
20
- createMany(props: SessionType[], client: ApolloClient<NormalizedCacheObject>): Promise<{
19
+ createMany(props: SessionType[]): Promise<{
21
20
  count: number;
22
21
  } | null>;
23
22
  /**
@@ -26,33 +25,33 @@ export declare const Session: {
26
25
  * @param client - Apollo Client instance.
27
26
  * @returns The updated Session or null.
28
27
  */
29
- update(props: SessionType, client: ApolloClient<NormalizedCacheObject>): Promise<SessionType>;
28
+ update(props: SessionType): Promise<SessionType>;
30
29
  /**
31
30
  * Delete a single Session record.
32
31
  * @param props - Properties to update.
33
32
  * @param client - Apollo Client instance.
34
33
  * @returns The deleted Session or null.
35
34
  */
36
- delete(props: SessionType, client: ApolloClient<NormalizedCacheObject>): Promise<SessionType>;
35
+ delete(props: SessionType): Promise<SessionType>;
37
36
  /**
38
37
  * Retrieve a single Session record by ID.
39
38
  * @param props - Properties to update.
40
39
  * @param client - Apollo Client instance.
41
40
  * @returns The retrieved Session or null.
42
41
  */
43
- get(props: SessionType, client: ApolloClient<NormalizedCacheObject>): Promise<SessionType | null>;
42
+ get(props: SessionType): Promise<SessionType | null>;
44
43
  /**
45
44
  * Retrieve all Sessions records.
46
45
  * @param client - Apollo Client instance.
47
46
  * @returns An array of Session records or null.
48
47
  */
49
- getAll(client: ApolloClient<NormalizedCacheObject>): Promise<SessionType[] | null>;
48
+ getAll(): Promise<SessionType[] | null>;
50
49
  /**
51
50
  * Find multiple Session records based on conditions.
52
51
  * @param where - Conditions to find records.
53
52
  * @param client - Apollo Client instance.
54
53
  * @returns An array of found Session records or null.
55
54
  */
56
- findMany(props: SessionType, client: ApolloClient<NormalizedCacheObject>): Promise<SessionType[] | null>;
55
+ findMany(props: SessionType): Promise<SessionType[] | null>;
57
56
  };
58
57
  //# sourceMappingURL=Session.d.ts.map
package/Session.js CHANGED
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Session = void 0;
4
4
  const client_1 = require("@apollo/client");
5
+ const client_2 = require("./client");
5
6
  const utils_1 = require("./utils");
6
7
  /**
7
8
  * CRUD operations for the Session model.
@@ -13,7 +14,8 @@ exports.Session = {
13
14
  * @param client - Apollo Client instance.
14
15
  * @returns The created Session or null.
15
16
  */
16
- async create(props, client) {
17
+ async create(props) {
18
+ const client = await (0, client_2.initializeApolloServerSide)();
17
19
  const CREATE_ONE_SESSION = (0, client_1.gql) `
18
20
  mutation createOneSession($data: SessionCreateInput!) {
19
21
  createOneSession(data: $data) {
@@ -544,7 +546,8 @@ exports.Session = {
544
546
  * @param client - Apollo Client instance.
545
547
  * @returns The count of created records or null.
546
548
  */
547
- async createMany(props, client) {
549
+ async createMany(props) {
550
+ const client = await (0, client_2.initializeApolloServerSide)();
548
551
  const CREATE_MANY_SESSION = (0, client_1.gql) `
549
552
  mutation createManySession($data: [SessionCreateManyInput!]!) {
550
553
  createManySession(data: $data) {
@@ -581,7 +584,8 @@ exports.Session = {
581
584
  * @param client - Apollo Client instance.
582
585
  * @returns The updated Session or null.
583
586
  */
584
- async update(props, client) {
587
+ async update(props) {
588
+ const client = await (0, client_2.initializeApolloServerSide)();
585
589
  const UPDATE_ONE_SESSION = (0, client_1.gql) `
586
590
  mutation updateOneSession($data: SessionUpdateInput!, $where: SessionWhereUniqueInput!) {
587
591
  updateOneSession(data: $data, where: $where) {
@@ -1464,7 +1468,8 @@ exports.Session = {
1464
1468
  * @param client - Apollo Client instance.
1465
1469
  * @returns The deleted Session or null.
1466
1470
  */
1467
- async delete(props, client) {
1471
+ async delete(props) {
1472
+ const client = await (0, client_2.initializeApolloServerSide)();
1468
1473
  const DELETE_ONE_SESSION = (0, client_1.gql) `
1469
1474
  mutation deleteOneSession($where: SessionWhereUniqueInput!) {
1470
1475
  deleteOneSession(where: $where) {
@@ -1818,8 +1823,9 @@ exports.Session = {
1818
1823
  * @param client - Apollo Client instance.
1819
1824
  * @returns The retrieved Session or null.
1820
1825
  */
1821
- async get(props, client) {
1826
+ async get(props) {
1822
1827
  var _a, _b;
1828
+ const client = await (0, client_2.initializeApolloServerSide)();
1823
1829
  const GET_SESSION = (0, client_1.gql) `
1824
1830
  query getSession($where: SessionWhereUniqueInput!) {
1825
1831
  getSession(where: $where) {
@@ -2172,8 +2178,9 @@ exports.Session = {
2172
2178
  * @param client - Apollo Client instance.
2173
2179
  * @returns An array of Session records or null.
2174
2180
  */
2175
- async getAll(client) {
2181
+ async getAll() {
2176
2182
  var _a, _b;
2183
+ const client = await (0, client_2.initializeApolloServerSide)();
2177
2184
  const GET_ALL_SESSION = (0, client_1.gql) `
2178
2185
  query getAllSession {
2179
2186
  sessions {
@@ -2521,7 +2528,8 @@ exports.Session = {
2521
2528
  * @param client - Apollo Client instance.
2522
2529
  * @returns An array of found Session records or null.
2523
2530
  */
2524
- async findMany(props, client) {
2531
+ async findMany(props) {
2532
+ const client = await (0, client_2.initializeApolloServerSide)();
2525
2533
  const FIND_MANY_SESSION = (0, client_1.gql) `
2526
2534
  query findManySession($where: SessionWhereInput!) {
2527
2535
  sessions(where: $where) {
package/Trade.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Trade as TradeType } from './generated/typegraphql-prisma/models/Trade';
2
- import { ApolloClient, NormalizedCacheObject } from '@apollo/client';
3
2
  /**
4
3
  * CRUD operations for the Trade model.
5
4
  */
@@ -10,14 +9,14 @@ export declare const Trade: {
10
9
  * @param client - Apollo Client instance.
11
10
  * @returns The created Trade or null.
12
11
  */
13
- create(props: TradeType, client: ApolloClient<NormalizedCacheObject>): Promise<TradeType>;
12
+ create(props: TradeType): Promise<TradeType>;
14
13
  /**
15
14
  * Create multiple Trade records.
16
15
  * @param props - Array of properties for the new records.
17
16
  * @param client - Apollo Client instance.
18
17
  * @returns The count of created records or null.
19
18
  */
20
- createMany(props: TradeType[], client: ApolloClient<NormalizedCacheObject>): Promise<{
19
+ createMany(props: TradeType[]): Promise<{
21
20
  count: number;
22
21
  } | null>;
23
22
  /**
@@ -26,33 +25,33 @@ export declare const Trade: {
26
25
  * @param client - Apollo Client instance.
27
26
  * @returns The updated Trade or null.
28
27
  */
29
- update(props: TradeType, client: ApolloClient<NormalizedCacheObject>): Promise<TradeType>;
28
+ update(props: TradeType): Promise<TradeType>;
30
29
  /**
31
30
  * Delete a single Trade record.
32
31
  * @param props - Properties to update.
33
32
  * @param client - Apollo Client instance.
34
33
  * @returns The deleted Trade or null.
35
34
  */
36
- delete(props: TradeType, client: ApolloClient<NormalizedCacheObject>): Promise<TradeType>;
35
+ delete(props: TradeType): Promise<TradeType>;
37
36
  /**
38
37
  * Retrieve a single Trade record by ID.
39
38
  * @param props - Properties to update.
40
39
  * @param client - Apollo Client instance.
41
40
  * @returns The retrieved Trade or null.
42
41
  */
43
- get(props: TradeType, client: ApolloClient<NormalizedCacheObject>): Promise<TradeType | null>;
42
+ get(props: TradeType): Promise<TradeType | null>;
44
43
  /**
45
44
  * Retrieve all Trades records.
46
45
  * @param client - Apollo Client instance.
47
46
  * @returns An array of Trade records or null.
48
47
  */
49
- getAll(client: ApolloClient<NormalizedCacheObject>): Promise<TradeType[] | null>;
48
+ getAll(): Promise<TradeType[] | null>;
50
49
  /**
51
50
  * Find multiple Trade records based on conditions.
52
51
  * @param where - Conditions to find records.
53
52
  * @param client - Apollo Client instance.
54
53
  * @returns An array of found Trade records or null.
55
54
  */
56
- findMany(props: TradeType, client: ApolloClient<NormalizedCacheObject>): Promise<TradeType[] | null>;
55
+ findMany(props: TradeType): Promise<TradeType[] | null>;
57
56
  };
58
57
  //# sourceMappingURL=Trade.d.ts.map
package/Trade.js CHANGED
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Trade = void 0;
4
4
  const client_1 = require("@apollo/client");
5
+ const client_2 = require("./client");
5
6
  const utils_1 = require("./utils");
6
7
  /**
7
8
  * CRUD operations for the Trade model.
@@ -13,7 +14,8 @@ exports.Trade = {
13
14
  * @param client - Apollo Client instance.
14
15
  * @returns The created Trade or null.
15
16
  */
16
- async create(props, client) {
17
+ async create(props) {
18
+ const client = await (0, client_2.initializeApolloServerSide)();
17
19
  const CREATE_ONE_TRADE = (0, client_1.gql) `
18
20
  mutation createOneTrade($data: TradeCreateInput!) {
19
21
  createOneTrade(data: $data) {
@@ -806,7 +808,8 @@ exports.Trade = {
806
808
  * @param client - Apollo Client instance.
807
809
  * @returns The count of created records or null.
808
810
  */
809
- async createMany(props, client) {
811
+ async createMany(props) {
812
+ const client = await (0, client_2.initializeApolloServerSide)();
810
813
  const CREATE_MANY_TRADE = (0, client_1.gql) `
811
814
  mutation createManyTrade($data: [TradeCreateManyInput!]!) {
812
815
  createManyTrade(data: $data) {
@@ -849,7 +852,8 @@ exports.Trade = {
849
852
  * @param client - Apollo Client instance.
850
853
  * @returns The updated Trade or null.
851
854
  */
852
- async update(props, client) {
855
+ async update(props) {
856
+ const client = await (0, client_2.initializeApolloServerSide)();
853
857
  const UPDATE_ONE_TRADE = (0, client_1.gql) `
854
858
  mutation updateOneTrade($data: TradeUpdateInput!, $where: TradeWhereUniqueInput!) {
855
859
  updateOneTrade(data: $data, where: $where) {
@@ -2521,7 +2525,8 @@ exports.Trade = {
2521
2525
  * @param client - Apollo Client instance.
2522
2526
  * @returns The deleted Trade or null.
2523
2527
  */
2524
- async delete(props, client) {
2528
+ async delete(props) {
2529
+ const client = await (0, client_2.initializeApolloServerSide)();
2525
2530
  const DELETE_ONE_TRADE = (0, client_1.gql) `
2526
2531
  mutation deleteOneTrade($where: TradeWhereUniqueInput!) {
2527
2532
  deleteOneTrade(where: $where) {
@@ -2875,8 +2880,9 @@ exports.Trade = {
2875
2880
  * @param client - Apollo Client instance.
2876
2881
  * @returns The retrieved Trade or null.
2877
2882
  */
2878
- async get(props, client) {
2883
+ async get(props) {
2879
2884
  var _a, _b;
2885
+ const client = await (0, client_2.initializeApolloServerSide)();
2880
2886
  const GET_TRADE = (0, client_1.gql) `
2881
2887
  query getTrade($where: TradeWhereUniqueInput!) {
2882
2888
  getTrade(where: $where) {
@@ -3229,8 +3235,9 @@ exports.Trade = {
3229
3235
  * @param client - Apollo Client instance.
3230
3236
  * @returns An array of Trade records or null.
3231
3237
  */
3232
- async getAll(client) {
3238
+ async getAll() {
3233
3239
  var _a, _b;
3240
+ const client = await (0, client_2.initializeApolloServerSide)();
3234
3241
  const GET_ALL_TRADE = (0, client_1.gql) `
3235
3242
  query getAllTrade {
3236
3243
  trades {
@@ -3578,7 +3585,8 @@ exports.Trade = {
3578
3585
  * @param client - Apollo Client instance.
3579
3586
  * @returns An array of found Trade records or null.
3580
3587
  */
3581
- async findMany(props, client) {
3588
+ async findMany(props) {
3589
+ const client = await (0, client_2.initializeApolloServerSide)();
3582
3590
  const FIND_MANY_TRADE = (0, client_1.gql) `
3583
3591
  query findManyTrade($where: TradeWhereInput!) {
3584
3592
  trades(where: $where) {
package/TradeStep.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { TradeStep as TradeStepType } from './generated/typegraphql-prisma/models/TradeStep';
2
- import { ApolloClient, NormalizedCacheObject } from '@apollo/client';
3
2
  /**
4
3
  * CRUD operations for the TradeStep model.
5
4
  */
@@ -10,14 +9,14 @@ export declare const TradeStep: {
10
9
  * @param client - Apollo Client instance.
11
10
  * @returns The created TradeStep or null.
12
11
  */
13
- create(props: TradeStepType, client: ApolloClient<NormalizedCacheObject>): Promise<TradeStepType>;
12
+ create(props: TradeStepType): Promise<TradeStepType>;
14
13
  /**
15
14
  * Create multiple TradeStep records.
16
15
  * @param props - Array of properties for the new records.
17
16
  * @param client - Apollo Client instance.
18
17
  * @returns The count of created records or null.
19
18
  */
20
- createMany(props: TradeStepType[], client: ApolloClient<NormalizedCacheObject>): Promise<{
19
+ createMany(props: TradeStepType[]): Promise<{
21
20
  count: number;
22
21
  } | null>;
23
22
  /**
@@ -26,33 +25,33 @@ export declare const TradeStep: {
26
25
  * @param client - Apollo Client instance.
27
26
  * @returns The updated TradeStep or null.
28
27
  */
29
- update(props: TradeStepType, client: ApolloClient<NormalizedCacheObject>): Promise<TradeStepType>;
28
+ update(props: TradeStepType): Promise<TradeStepType>;
30
29
  /**
31
30
  * Delete a single TradeStep record.
32
31
  * @param props - Properties to update.
33
32
  * @param client - Apollo Client instance.
34
33
  * @returns The deleted TradeStep or null.
35
34
  */
36
- delete(props: TradeStepType, client: ApolloClient<NormalizedCacheObject>): Promise<TradeStepType>;
35
+ delete(props: TradeStepType): Promise<TradeStepType>;
37
36
  /**
38
37
  * Retrieve a single TradeStep record by ID.
39
38
  * @param props - Properties to update.
40
39
  * @param client - Apollo Client instance.
41
40
  * @returns The retrieved TradeStep or null.
42
41
  */
43
- get(props: TradeStepType, client: ApolloClient<NormalizedCacheObject>): Promise<TradeStepType | null>;
42
+ get(props: TradeStepType): Promise<TradeStepType | null>;
44
43
  /**
45
44
  * Retrieve all TradeSteps records.
46
45
  * @param client - Apollo Client instance.
47
46
  * @returns An array of TradeStep records or null.
48
47
  */
49
- getAll(client: ApolloClient<NormalizedCacheObject>): Promise<TradeStepType[] | null>;
48
+ getAll(): Promise<TradeStepType[] | null>;
50
49
  /**
51
50
  * Find multiple TradeStep records based on conditions.
52
51
  * @param where - Conditions to find records.
53
52
  * @param client - Apollo Client instance.
54
53
  * @returns An array of found TradeStep records or null.
55
54
  */
56
- findMany(props: TradeStepType, client: ApolloClient<NormalizedCacheObject>): Promise<TradeStepType[] | null>;
55
+ findMany(props: TradeStepType): Promise<TradeStepType[] | null>;
57
56
  };
58
57
  //# sourceMappingURL=TradeStep.d.ts.map
package/TradeStep.js CHANGED
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TradeStep = void 0;
4
4
  const client_1 = require("@apollo/client");
5
+ const client_2 = require("./client");
5
6
  const utils_1 = require("./utils");
6
7
  /**
7
8
  * CRUD operations for the TradeStep model.
@@ -13,7 +14,8 @@ exports.TradeStep = {
13
14
  * @param client - Apollo Client instance.
14
15
  * @returns The created TradeStep or null.
15
16
  */
16
- async create(props, client) {
17
+ async create(props) {
18
+ const client = await (0, client_2.initializeApolloServerSide)();
17
19
  const CREATE_ONE_TRADESTEP = (0, client_1.gql) `
18
20
  mutation createOneTradeStep($data: TradeStepCreateInput!) {
19
21
  createOneTradeStep(data: $data) {
@@ -524,7 +526,8 @@ exports.TradeStep = {
524
526
  * @param client - Apollo Client instance.
525
527
  * @returns The count of created records or null.
526
528
  */
527
- async createMany(props, client) {
529
+ async createMany(props) {
530
+ const client = await (0, client_2.initializeApolloServerSide)();
528
531
  const CREATE_MANY_TRADESTEP = (0, client_1.gql) `
529
532
  mutation createManyTradeStep($data: [TradeStepCreateManyInput!]!) {
530
533
  createManyTradeStep(data: $data) {
@@ -574,7 +577,8 @@ exports.TradeStep = {
574
577
  * @param client - Apollo Client instance.
575
578
  * @returns The updated TradeStep or null.
576
579
  */
577
- async update(props, client) {
580
+ async update(props) {
581
+ const client = await (0, client_2.initializeApolloServerSide)();
578
582
  const UPDATE_ONE_TRADESTEP = (0, client_1.gql) `
579
583
  mutation updateOneTradeStep($data: TradeStepUpdateInput!, $where: TradeStepWhereUniqueInput!) {
580
584
  updateOneTradeStep(data: $data, where: $where) {
@@ -1430,7 +1434,8 @@ exports.TradeStep = {
1430
1434
  * @param client - Apollo Client instance.
1431
1435
  * @returns The deleted TradeStep or null.
1432
1436
  */
1433
- async delete(props, client) {
1437
+ async delete(props) {
1438
+ const client = await (0, client_2.initializeApolloServerSide)();
1434
1439
  const DELETE_ONE_TRADESTEP = (0, client_1.gql) `
1435
1440
  mutation deleteOneTradeStep($where: TradeStepWhereUniqueInput!) {
1436
1441
  deleteOneTradeStep(where: $where) {
@@ -1808,8 +1813,9 @@ exports.TradeStep = {
1808
1813
  * @param client - Apollo Client instance.
1809
1814
  * @returns The retrieved TradeStep or null.
1810
1815
  */
1811
- async get(props, client) {
1816
+ async get(props) {
1812
1817
  var _a, _b;
1818
+ const client = await (0, client_2.initializeApolloServerSide)();
1813
1819
  const GET_TRADESTEP = (0, client_1.gql) `
1814
1820
  query getTradeStep($where: TradeStepWhereUniqueInput!) {
1815
1821
  getTradeStep(where: $where) {
@@ -2186,8 +2192,9 @@ exports.TradeStep = {
2186
2192
  * @param client - Apollo Client instance.
2187
2193
  * @returns An array of TradeStep records or null.
2188
2194
  */
2189
- async getAll(client) {
2195
+ async getAll() {
2190
2196
  var _a, _b;
2197
+ const client = await (0, client_2.initializeApolloServerSide)();
2191
2198
  const GET_ALL_TRADESTEP = (0, client_1.gql) `
2192
2199
  query getAllTradeStep {
2193
2200
  tradeSteps {
@@ -2559,7 +2566,8 @@ exports.TradeStep = {
2559
2566
  * @param client - Apollo Client instance.
2560
2567
  * @returns An array of found TradeStep records or null.
2561
2568
  */
2562
- async findMany(props, client) {
2569
+ async findMany(props) {
2570
+ const client = await (0, client_2.initializeApolloServerSide)();
2563
2571
  const FIND_MANY_TRADESTEP = (0, client_1.gql) `
2564
2572
  query findManyTradeStep($where: TradeStepWhereInput!) {
2565
2573
  tradeSteps(where: $where) {