adaptic-backend 1.0.292 → 1.0.294

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 (116) hide show
  1. package/Account.cjs +75 -21
  2. package/Action.cjs +75 -21
  3. package/Alert.cjs +75 -21
  4. package/AlpacaAccount.cjs +75 -21
  5. package/Asset.cjs +75 -21
  6. package/Authenticator.cjs +75 -21
  7. package/Contract.cjs +75 -21
  8. package/Customer.cjs +75 -21
  9. package/Deliverable.cjs +75 -21
  10. package/EconomicEvent.cjs +75 -21
  11. package/MarketSentiment.cjs +75 -21
  12. package/NewsArticle.cjs +75 -21
  13. package/NewsArticleAssetSentiment.cjs +75 -21
  14. package/Order.cjs +75 -21
  15. package/Position.cjs +75 -21
  16. package/ScheduledOptionOrder.cjs +75 -21
  17. package/Session.cjs +75 -21
  18. package/StopLoss.cjs +75 -21
  19. package/TakeProfit.cjs +75 -21
  20. package/Trade.cjs +75 -21
  21. package/User.cjs +75 -21
  22. package/VerificationToken.cjs +75 -21
  23. package/apollo-client.client.cjs +17 -0
  24. package/apollo-client.client.d.ts +7 -0
  25. package/apollo-client.server.cjs +21 -0
  26. package/apollo-client.server.d.ts +7 -0
  27. package/client.cjs +80 -59
  28. package/client.d.ts +26 -17
  29. package/esm/Account.d.ts.map +1 -1
  30. package/esm/Account.js.map +1 -1
  31. package/esm/Account.mjs +64 -10
  32. package/esm/Action.d.ts.map +1 -1
  33. package/esm/Action.js.map +1 -1
  34. package/esm/Action.mjs +64 -10
  35. package/esm/Alert.d.ts.map +1 -1
  36. package/esm/Alert.js.map +1 -1
  37. package/esm/Alert.mjs +64 -10
  38. package/esm/AlpacaAccount.d.ts.map +1 -1
  39. package/esm/AlpacaAccount.js.map +1 -1
  40. package/esm/AlpacaAccount.mjs +64 -10
  41. package/esm/Asset.d.ts.map +1 -1
  42. package/esm/Asset.js.map +1 -1
  43. package/esm/Asset.mjs +64 -10
  44. package/esm/Authenticator.d.ts.map +1 -1
  45. package/esm/Authenticator.js.map +1 -1
  46. package/esm/Authenticator.mjs +64 -10
  47. package/esm/Contract.d.ts.map +1 -1
  48. package/esm/Contract.js.map +1 -1
  49. package/esm/Contract.mjs +64 -10
  50. package/esm/Customer.d.ts.map +1 -1
  51. package/esm/Customer.js.map +1 -1
  52. package/esm/Customer.mjs +64 -10
  53. package/esm/Deliverable.d.ts.map +1 -1
  54. package/esm/Deliverable.js.map +1 -1
  55. package/esm/Deliverable.mjs +64 -10
  56. package/esm/EconomicEvent.d.ts.map +1 -1
  57. package/esm/EconomicEvent.js.map +1 -1
  58. package/esm/EconomicEvent.mjs +64 -10
  59. package/esm/MarketSentiment.d.ts.map +1 -1
  60. package/esm/MarketSentiment.js.map +1 -1
  61. package/esm/MarketSentiment.mjs +64 -10
  62. package/esm/NewsArticle.d.ts.map +1 -1
  63. package/esm/NewsArticle.js.map +1 -1
  64. package/esm/NewsArticle.mjs +64 -10
  65. package/esm/NewsArticleAssetSentiment.d.ts.map +1 -1
  66. package/esm/NewsArticleAssetSentiment.js.map +1 -1
  67. package/esm/NewsArticleAssetSentiment.mjs +64 -10
  68. package/esm/Order.d.ts.map +1 -1
  69. package/esm/Order.js.map +1 -1
  70. package/esm/Order.mjs +64 -10
  71. package/esm/Position.d.ts.map +1 -1
  72. package/esm/Position.js.map +1 -1
  73. package/esm/Position.mjs +64 -10
  74. package/esm/ScheduledOptionOrder.d.ts.map +1 -1
  75. package/esm/ScheduledOptionOrder.js.map +1 -1
  76. package/esm/ScheduledOptionOrder.mjs +64 -10
  77. package/esm/Session.d.ts.map +1 -1
  78. package/esm/Session.js.map +1 -1
  79. package/esm/Session.mjs +64 -10
  80. package/esm/StopLoss.d.ts.map +1 -1
  81. package/esm/StopLoss.js.map +1 -1
  82. package/esm/StopLoss.mjs +64 -10
  83. package/esm/TakeProfit.d.ts.map +1 -1
  84. package/esm/TakeProfit.js.map +1 -1
  85. package/esm/TakeProfit.mjs +64 -10
  86. package/esm/Trade.d.ts.map +1 -1
  87. package/esm/Trade.js.map +1 -1
  88. package/esm/Trade.mjs +64 -10
  89. package/esm/User.d.ts.map +1 -1
  90. package/esm/User.js.map +1 -1
  91. package/esm/User.mjs +64 -10
  92. package/esm/VerificationToken.d.ts.map +1 -1
  93. package/esm/VerificationToken.js.map +1 -1
  94. package/esm/VerificationToken.mjs +64 -10
  95. package/esm/apollo-client.client.d.ts +7 -0
  96. package/esm/apollo-client.client.d.ts.map +1 -0
  97. package/esm/apollo-client.client.js.map +1 -0
  98. package/esm/apollo-client.client.mjs +8 -0
  99. package/esm/apollo-client.server.d.ts +7 -0
  100. package/esm/apollo-client.server.d.ts.map +1 -0
  101. package/esm/apollo-client.server.js.map +1 -0
  102. package/esm/apollo-client.server.mjs +12 -0
  103. package/esm/client.d.ts +26 -17
  104. package/esm/client.d.ts.map +1 -1
  105. package/esm/client.js.map +1 -1
  106. package/esm/client.mjs +45 -60
  107. package/generated/typegraphql-prisma/enhance.cjs +7 -7
  108. package/generated/typegraphql-prisma/index.cjs +10 -10
  109. package/generated/typegraphql-prisma/resolvers/crud/args.index.cjs +22 -22
  110. package/generated/typegraphql-prisma/resolvers/crud/index.cjs +3 -3
  111. package/generated/typegraphql-prisma/resolvers/outputs/index.cjs +1 -1
  112. package/generated/typegraphql-prisma/resolvers/relations/args.index.cjs +11 -11
  113. package/generated/typegraphql-prisma/resolvers/relations/index.cjs +2 -2
  114. package/index.cjs +1 -1
  115. package/package.json +1 -1
  116. package/server.cjs +1 -1
@@ -21,8 +21,14 @@ exports.ScheduledOptionOrder = {
21
21
  * @returns The created ScheduledOptionOrder or null.
22
22
  */
23
23
  async create(props, globalClient) {
24
- const client = globalClient || client_1.client;
25
- const CREATE_ONE_SCHEDULEDOPTIONORDER = (0, client_1.gql) `
24
+ const [modules, client] = await Promise.all([
25
+ (0, client_1.getApolloModules)(),
26
+ globalClient
27
+ ? Promise.resolve(globalClient)
28
+ : client_1.client
29
+ ]);
30
+ const { gql, ApolloError } = modules;
31
+ const CREATE_ONE_SCHEDULEDOPTIONORDER = gql `
26
32
  mutation createOneScheduledOptionOrder($data: ScheduledOptionOrderCreateInput!) {
27
33
  createOneScheduledOptionOrder(data: $data) {
28
34
  ${selectionSet}
@@ -59,8 +65,14 @@ exports.ScheduledOptionOrder = {
59
65
  * @returns The count of created records or null.
60
66
  */
61
67
  async createMany(props, globalClient) {
62
- const client = globalClient || client_1.client;
63
- const CREATE_MANY_SCHEDULEDOPTIONORDER = (0, client_1.gql) `
68
+ const [modules, client] = await Promise.all([
69
+ (0, client_1.getApolloModules)(),
70
+ globalClient
71
+ ? Promise.resolve(globalClient)
72
+ : client_1.client
73
+ ]);
74
+ const { gql, ApolloError } = modules;
75
+ const CREATE_MANY_SCHEDULEDOPTIONORDER = gql `
64
76
  mutation createManyScheduledOptionOrder($data: [ScheduledOptionOrderCreateManyInput!]!) {
65
77
  createManyScheduledOptionOrder(data: $data) {
66
78
  count
@@ -96,8 +108,14 @@ exports.ScheduledOptionOrder = {
96
108
  * @returns The updated ScheduledOptionOrder or null.
97
109
  */
98
110
  async update(props, globalClient) {
99
- const client = globalClient || client_1.client;
100
- const UPDATE_ONE_SCHEDULEDOPTIONORDER = (0, client_1.gql) `
111
+ const [modules, client] = await Promise.all([
112
+ (0, client_1.getApolloModules)(),
113
+ globalClient
114
+ ? Promise.resolve(globalClient)
115
+ : client_1.client
116
+ ]);
117
+ const { gql, ApolloError } = modules;
118
+ const UPDATE_ONE_SCHEDULEDOPTIONORDER = gql `
101
119
  mutation updateOneScheduledOptionOrder($data: ScheduledOptionOrderUpdateInput!, $where: ScheduledOptionOrderWhereUniqueInput!) {
102
120
  updateOneScheduledOptionOrder(data: $data, where: $where) {
103
121
  ${selectionSet}
@@ -143,8 +161,14 @@ exports.ScheduledOptionOrder = {
143
161
  * @returns The updated ScheduledOptionOrder or null.
144
162
  */
145
163
  async upsert(props, globalClient) {
146
- const client = globalClient || client_1.client;
147
- const UPSERT_ONE_SCHEDULEDOPTIONORDER = (0, client_1.gql) `
164
+ const [modules, client] = await Promise.all([
165
+ (0, client_1.getApolloModules)(),
166
+ globalClient
167
+ ? Promise.resolve(globalClient)
168
+ : client_1.client
169
+ ]);
170
+ const { gql, ApolloError } = modules;
171
+ const UPSERT_ONE_SCHEDULEDOPTIONORDER = gql `
148
172
  mutation upsertOneScheduledOptionOrder($where: ScheduledOptionOrderWhereUniqueInput!, $create: ScheduledOptionOrderCreateInput!, $update: ScheduledOptionOrderUpdateInput!) {
149
173
  upsertOneScheduledOptionOrder(where: $where, create: $create, update: $update) {
150
174
  ${selectionSet}
@@ -191,8 +215,14 @@ exports.ScheduledOptionOrder = {
191
215
  * @returns The count of created records or null.
192
216
  */
193
217
  async updateMany(props, globalClient) {
194
- const client = globalClient || client_1.client;
195
- const UPDATE_MANY_SCHEDULEDOPTIONORDER = (0, client_1.gql) `
218
+ const [modules, client] = await Promise.all([
219
+ (0, client_1.getApolloModules)(),
220
+ globalClient
221
+ ? Promise.resolve(globalClient)
222
+ : client_1.client
223
+ ]);
224
+ const { gql, ApolloError } = modules;
225
+ const UPDATE_MANY_SCHEDULEDOPTIONORDER = gql `
196
226
  mutation updateManyScheduledOptionOrder($data: [ScheduledOptionOrderCreateManyInput!]!) {
197
227
  updateManyScheduledOptionOrder(data: $data) {
198
228
  count
@@ -238,8 +268,14 @@ exports.ScheduledOptionOrder = {
238
268
  * @returns The deleted ScheduledOptionOrder or null.
239
269
  */
240
270
  async delete(props, globalClient) {
241
- const client = globalClient || client_1.client;
242
- const DELETE_ONE_SCHEDULEDOPTIONORDER = (0, client_1.gql) `
271
+ const [modules, client] = await Promise.all([
272
+ (0, client_1.getApolloModules)(),
273
+ globalClient
274
+ ? Promise.resolve(globalClient)
275
+ : client_1.client
276
+ ]);
277
+ const { gql, ApolloError } = modules;
278
+ const DELETE_ONE_SCHEDULEDOPTIONORDER = gql `
243
279
  mutation deleteOneScheduledOptionOrder($where: ScheduledOptionOrderWhereUniqueInput!) {
244
280
  deleteOneScheduledOptionOrder(where: $where) {
245
281
  ${selectionSet}
@@ -275,8 +311,14 @@ exports.ScheduledOptionOrder = {
275
311
  */
276
312
  async get(props, globalClient) {
277
313
  var _a, _b;
278
- const client = globalClient || client_1.client;
279
- const GET_SCHEDULEDOPTIONORDER = (0, client_1.gql) `
314
+ const [modules, client] = await Promise.all([
315
+ (0, client_1.getApolloModules)(),
316
+ globalClient
317
+ ? Promise.resolve(globalClient)
318
+ : client_1.client
319
+ ]);
320
+ const { gql, ApolloError } = modules;
321
+ const GET_SCHEDULEDOPTIONORDER = gql `
280
322
  query getScheduledOptionOrder($where: ScheduledOptionOrderWhereUniqueInput!) {
281
323
  getScheduledOptionOrder(where: $where) {
282
324
  ${selectionSet}
@@ -295,7 +337,7 @@ exports.ScheduledOptionOrder = {
295
337
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.getScheduledOptionOrder) !== null && _b !== void 0 ? _b : null;
296
338
  }
297
339
  catch (error) {
298
- if (error instanceof client_1.ApolloError && error.message === 'No ScheduledOptionOrder found') {
340
+ if (error instanceof ApolloError && error.message === 'No ScheduledOptionOrder found') {
299
341
  return null;
300
342
  }
301
343
  else {
@@ -311,8 +353,14 @@ exports.ScheduledOptionOrder = {
311
353
  */
312
354
  async getAll(globalClient) {
313
355
  var _a, _b;
314
- const client = globalClient || client_1.client;
315
- const GET_ALL_SCHEDULEDOPTIONORDER = (0, client_1.gql) `
356
+ const [modules, client] = await Promise.all([
357
+ (0, client_1.getApolloModules)(),
358
+ globalClient
359
+ ? Promise.resolve(globalClient)
360
+ : client_1.client
361
+ ]);
362
+ const { gql, ApolloError } = modules;
363
+ const GET_ALL_SCHEDULEDOPTIONORDER = gql `
316
364
  query getAllScheduledOptionOrder {
317
365
  scheduledOptionOrders {
318
366
  ${selectionSet}
@@ -325,7 +373,7 @@ exports.ScheduledOptionOrder = {
325
373
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.scheduledOptionOrders) !== null && _b !== void 0 ? _b : null;
326
374
  }
327
375
  catch (error) {
328
- if (error instanceof client_1.ApolloError && error.message === 'No ScheduledOptionOrder found') {
376
+ if (error instanceof ApolloError && error.message === 'No ScheduledOptionOrder found') {
329
377
  return null;
330
378
  }
331
379
  else {
@@ -341,8 +389,14 @@ exports.ScheduledOptionOrder = {
341
389
  * @returns An array of found ScheduledOptionOrder records or null.
342
390
  */
343
391
  async findMany(props, globalClient) {
344
- const client = globalClient || client_1.client;
345
- const FIND_MANY_SCHEDULEDOPTIONORDER = (0, client_1.gql) `
392
+ const [modules, client] = await Promise.all([
393
+ (0, client_1.getApolloModules)(),
394
+ globalClient
395
+ ? Promise.resolve(globalClient)
396
+ : client_1.client
397
+ ]);
398
+ const { gql, ApolloError } = modules;
399
+ const FIND_MANY_SCHEDULEDOPTIONORDER = gql `
346
400
  query findManyScheduledOptionOrder($where: ScheduledOptionOrderWhereInput!) {
347
401
  scheduledOptionOrders(where: $where) {
348
402
  ${selectionSet}
@@ -368,7 +422,7 @@ exports.ScheduledOptionOrder = {
368
422
  }
369
423
  }
370
424
  catch (error) {
371
- if (error instanceof client_1.ApolloError && error.message === 'No ScheduledOptionOrder found') {
425
+ if (error instanceof ApolloError && error.message === 'No ScheduledOptionOrder found') {
372
426
  return null;
373
427
  }
374
428
  else {
package/Session.cjs CHANGED
@@ -81,8 +81,14 @@ exports.Session = {
81
81
  * @returns The created Session or null.
82
82
  */
83
83
  async create(props, globalClient) {
84
- const client = globalClient || client_1.client;
85
- const CREATE_ONE_SESSION = (0, client_1.gql) `
84
+ const [modules, client] = await Promise.all([
85
+ (0, client_1.getApolloModules)(),
86
+ globalClient
87
+ ? Promise.resolve(globalClient)
88
+ : client_1.client
89
+ ]);
90
+ const { gql, ApolloError } = modules;
91
+ const CREATE_ONE_SESSION = gql `
86
92
  mutation createOneSession($data: SessionCreateInput!) {
87
93
  createOneSession(data: $data) {
88
94
  ${selectionSet}
@@ -401,8 +407,14 @@ exports.Session = {
401
407
  * @returns The count of created records or null.
402
408
  */
403
409
  async createMany(props, globalClient) {
404
- const client = globalClient || client_1.client;
405
- const CREATE_MANY_SESSION = (0, client_1.gql) `
410
+ const [modules, client] = await Promise.all([
411
+ (0, client_1.getApolloModules)(),
412
+ globalClient
413
+ ? Promise.resolve(globalClient)
414
+ : client_1.client
415
+ ]);
416
+ const { gql, ApolloError } = modules;
417
+ const CREATE_MANY_SESSION = gql `
406
418
  mutation createManySession($data: [SessionCreateManyInput!]!) {
407
419
  createManySession(data: $data) {
408
420
  count
@@ -439,8 +451,14 @@ exports.Session = {
439
451
  * @returns The updated Session or null.
440
452
  */
441
453
  async update(props, globalClient) {
442
- const client = globalClient || client_1.client;
443
- const UPDATE_ONE_SESSION = (0, client_1.gql) `
454
+ const [modules, client] = await Promise.all([
455
+ (0, client_1.getApolloModules)(),
456
+ globalClient
457
+ ? Promise.resolve(globalClient)
458
+ : client_1.client
459
+ ]);
460
+ const { gql, ApolloError } = modules;
461
+ const UPDATE_ONE_SESSION = gql `
444
462
  mutation updateOneSession($data: SessionUpdateInput!, $where: SessionWhereUniqueInput!) {
445
463
  updateOneSession(data: $data, where: $where) {
446
464
  ${selectionSet}
@@ -1560,8 +1578,14 @@ exports.Session = {
1560
1578
  * @returns The updated Session or null.
1561
1579
  */
1562
1580
  async upsert(props, globalClient) {
1563
- const client = globalClient || client_1.client;
1564
- const UPSERT_ONE_SESSION = (0, client_1.gql) `
1581
+ const [modules, client] = await Promise.all([
1582
+ (0, client_1.getApolloModules)(),
1583
+ globalClient
1584
+ ? Promise.resolve(globalClient)
1585
+ : client_1.client
1586
+ ]);
1587
+ const { gql, ApolloError } = modules;
1588
+ const UPSERT_ONE_SESSION = gql `
1565
1589
  mutation upsertOneSession($where: SessionWhereUniqueInput!, $create: SessionCreateInput!, $update: SessionUpdateInput!) {
1566
1590
  upsertOneSession(where: $where, create: $create, update: $update) {
1567
1591
  ${selectionSet}
@@ -2958,8 +2982,14 @@ exports.Session = {
2958
2982
  * @returns The count of created records or null.
2959
2983
  */
2960
2984
  async updateMany(props, globalClient) {
2961
- const client = globalClient || client_1.client;
2962
- const UPDATE_MANY_SESSION = (0, client_1.gql) `
2985
+ const [modules, client] = await Promise.all([
2986
+ (0, client_1.getApolloModules)(),
2987
+ globalClient
2988
+ ? Promise.resolve(globalClient)
2989
+ : client_1.client
2990
+ ]);
2991
+ const { gql, ApolloError } = modules;
2992
+ const UPDATE_MANY_SESSION = gql `
2963
2993
  mutation updateManySession($data: [SessionCreateManyInput!]!) {
2964
2994
  updateManySession(data: $data) {
2965
2995
  count
@@ -4079,8 +4109,14 @@ exports.Session = {
4079
4109
  * @returns The deleted Session or null.
4080
4110
  */
4081
4111
  async delete(props, globalClient) {
4082
- const client = globalClient || client_1.client;
4083
- const DELETE_ONE_SESSION = (0, client_1.gql) `
4112
+ const [modules, client] = await Promise.all([
4113
+ (0, client_1.getApolloModules)(),
4114
+ globalClient
4115
+ ? Promise.resolve(globalClient)
4116
+ : client_1.client
4117
+ ]);
4118
+ const { gql, ApolloError } = modules;
4119
+ const DELETE_ONE_SESSION = gql `
4084
4120
  mutation deleteOneSession($where: SessionWhereUniqueInput!) {
4085
4121
  deleteOneSession(where: $where) {
4086
4122
  ${selectionSet}
@@ -4116,8 +4152,14 @@ exports.Session = {
4116
4152
  */
4117
4153
  async get(props, globalClient) {
4118
4154
  var _a, _b;
4119
- const client = globalClient || client_1.client;
4120
- const GET_SESSION = (0, client_1.gql) `
4155
+ const [modules, client] = await Promise.all([
4156
+ (0, client_1.getApolloModules)(),
4157
+ globalClient
4158
+ ? Promise.resolve(globalClient)
4159
+ : client_1.client
4160
+ ]);
4161
+ const { gql, ApolloError } = modules;
4162
+ const GET_SESSION = gql `
4121
4163
  query getSession($where: SessionWhereUniqueInput!) {
4122
4164
  getSession(where: $where) {
4123
4165
  ${selectionSet}
@@ -4139,7 +4181,7 @@ exports.Session = {
4139
4181
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.getSession) !== null && _b !== void 0 ? _b : null;
4140
4182
  }
4141
4183
  catch (error) {
4142
- if (error instanceof client_1.ApolloError && error.message === 'No Session found') {
4184
+ if (error instanceof ApolloError && error.message === 'No Session found') {
4143
4185
  return null;
4144
4186
  }
4145
4187
  else {
@@ -4155,8 +4197,14 @@ exports.Session = {
4155
4197
  */
4156
4198
  async getAll(globalClient) {
4157
4199
  var _a, _b;
4158
- const client = globalClient || client_1.client;
4159
- const GET_ALL_SESSION = (0, client_1.gql) `
4200
+ const [modules, client] = await Promise.all([
4201
+ (0, client_1.getApolloModules)(),
4202
+ globalClient
4203
+ ? Promise.resolve(globalClient)
4204
+ : client_1.client
4205
+ ]);
4206
+ const { gql, ApolloError } = modules;
4207
+ const GET_ALL_SESSION = gql `
4160
4208
  query getAllSession {
4161
4209
  sessions {
4162
4210
  ${selectionSet}
@@ -4169,7 +4217,7 @@ exports.Session = {
4169
4217
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.sessions) !== null && _b !== void 0 ? _b : null;
4170
4218
  }
4171
4219
  catch (error) {
4172
- if (error instanceof client_1.ApolloError && error.message === 'No Session found') {
4220
+ if (error instanceof ApolloError && error.message === 'No Session found') {
4173
4221
  return null;
4174
4222
  }
4175
4223
  else {
@@ -4185,8 +4233,14 @@ exports.Session = {
4185
4233
  * @returns An array of found Session records or null.
4186
4234
  */
4187
4235
  async findMany(props, globalClient) {
4188
- const client = globalClient || client_1.client;
4189
- const FIND_MANY_SESSION = (0, client_1.gql) `
4236
+ const [modules, client] = await Promise.all([
4237
+ (0, client_1.getApolloModules)(),
4238
+ globalClient
4239
+ ? Promise.resolve(globalClient)
4240
+ : client_1.client
4241
+ ]);
4242
+ const { gql, ApolloError } = modules;
4243
+ const FIND_MANY_SESSION = gql `
4190
4244
  query findManySession($where: SessionWhereInput!) {
4191
4245
  sessions(where: $where) {
4192
4246
  ${selectionSet}
@@ -4215,7 +4269,7 @@ exports.Session = {
4215
4269
  }
4216
4270
  }
4217
4271
  catch (error) {
4218
- if (error instanceof client_1.ApolloError && error.message === 'No Session found') {
4272
+ if (error instanceof ApolloError && error.message === 'No Session found') {
4219
4273
  return null;
4220
4274
  }
4221
4275
  else {
package/StopLoss.cjs CHANGED
@@ -24,8 +24,14 @@ exports.StopLoss = {
24
24
  * @returns The created StopLoss or null.
25
25
  */
26
26
  async create(props, globalClient) {
27
- const client = globalClient || client_1.client;
28
- const CREATE_ONE_STOPLOSS = (0, client_1.gql) `
27
+ const [modules, client] = await Promise.all([
28
+ (0, client_1.getApolloModules)(),
29
+ globalClient
30
+ ? Promise.resolve(globalClient)
31
+ : client_1.client
32
+ ]);
33
+ const { gql, ApolloError } = modules;
34
+ const CREATE_ONE_STOPLOSS = gql `
29
35
  mutation createOneStopLoss($data: StopLossCreateInput!) {
30
36
  createOneStopLoss(data: $data) {
31
37
  ${selectionSet}
@@ -675,8 +681,14 @@ exports.StopLoss = {
675
681
  * @returns The count of created records or null.
676
682
  */
677
683
  async createMany(props, globalClient) {
678
- const client = globalClient || client_1.client;
679
- const CREATE_MANY_STOPLOSS = (0, client_1.gql) `
684
+ const [modules, client] = await Promise.all([
685
+ (0, client_1.getApolloModules)(),
686
+ globalClient
687
+ ? Promise.resolve(globalClient)
688
+ : client_1.client
689
+ ]);
690
+ const { gql, ApolloError } = modules;
691
+ const CREATE_MANY_STOPLOSS = gql `
680
692
  mutation createManyStopLoss($data: [StopLossCreateManyInput!]!) {
681
693
  createManyStopLoss(data: $data) {
682
694
  count
@@ -713,8 +725,14 @@ exports.StopLoss = {
713
725
  * @returns The updated StopLoss or null.
714
726
  */
715
727
  async update(props, globalClient) {
716
- const client = globalClient || client_1.client;
717
- const UPDATE_ONE_STOPLOSS = (0, client_1.gql) `
728
+ const [modules, client] = await Promise.all([
729
+ (0, client_1.getApolloModules)(),
730
+ globalClient
731
+ ? Promise.resolve(globalClient)
732
+ : client_1.client
733
+ ]);
734
+ const { gql, ApolloError } = modules;
735
+ const UPDATE_ONE_STOPLOSS = gql `
718
736
  mutation updateOneStopLoss($data: StopLossUpdateInput!, $where: StopLossWhereUniqueInput!) {
719
737
  updateOneStopLoss(data: $data, where: $where) {
720
738
  ${selectionSet}
@@ -3360,8 +3378,14 @@ exports.StopLoss = {
3360
3378
  * @returns The updated StopLoss or null.
3361
3379
  */
3362
3380
  async upsert(props, globalClient) {
3363
- const client = globalClient || client_1.client;
3364
- const UPSERT_ONE_STOPLOSS = (0, client_1.gql) `
3381
+ const [modules, client] = await Promise.all([
3382
+ (0, client_1.getApolloModules)(),
3383
+ globalClient
3384
+ ? Promise.resolve(globalClient)
3385
+ : client_1.client
3386
+ ]);
3387
+ const { gql, ApolloError } = modules;
3388
+ const UPSERT_ONE_STOPLOSS = gql `
3365
3389
  mutation upsertOneStopLoss($where: StopLossWhereUniqueInput!, $create: StopLossCreateInput!, $update: StopLossUpdateInput!) {
3366
3390
  upsertOneStopLoss(where: $where, create: $create, update: $update) {
3367
3391
  ${selectionSet}
@@ -6615,8 +6639,14 @@ exports.StopLoss = {
6615
6639
  * @returns The count of created records or null.
6616
6640
  */
6617
6641
  async updateMany(props, globalClient) {
6618
- const client = globalClient || client_1.client;
6619
- const UPDATE_MANY_STOPLOSS = (0, client_1.gql) `
6642
+ const [modules, client] = await Promise.all([
6643
+ (0, client_1.getApolloModules)(),
6644
+ globalClient
6645
+ ? Promise.resolve(globalClient)
6646
+ : client_1.client
6647
+ ]);
6648
+ const { gql, ApolloError } = modules;
6649
+ const UPDATE_MANY_STOPLOSS = gql `
6620
6650
  mutation updateManyStopLoss($data: [StopLossCreateManyInput!]!) {
6621
6651
  updateManyStopLoss(data: $data) {
6622
6652
  count
@@ -9262,8 +9292,14 @@ exports.StopLoss = {
9262
9292
  * @returns The deleted StopLoss or null.
9263
9293
  */
9264
9294
  async delete(props, globalClient) {
9265
- const client = globalClient || client_1.client;
9266
- const DELETE_ONE_STOPLOSS = (0, client_1.gql) `
9295
+ const [modules, client] = await Promise.all([
9296
+ (0, client_1.getApolloModules)(),
9297
+ globalClient
9298
+ ? Promise.resolve(globalClient)
9299
+ : client_1.client
9300
+ ]);
9301
+ const { gql, ApolloError } = modules;
9302
+ const DELETE_ONE_STOPLOSS = gql `
9267
9303
  mutation deleteOneStopLoss($where: StopLossWhereUniqueInput!) {
9268
9304
  deleteOneStopLoss(where: $where) {
9269
9305
  ${selectionSet}
@@ -9299,8 +9335,14 @@ exports.StopLoss = {
9299
9335
  */
9300
9336
  async get(props, globalClient) {
9301
9337
  var _a, _b;
9302
- const client = globalClient || client_1.client;
9303
- const GET_STOPLOSS = (0, client_1.gql) `
9338
+ const [modules, client] = await Promise.all([
9339
+ (0, client_1.getApolloModules)(),
9340
+ globalClient
9341
+ ? Promise.resolve(globalClient)
9342
+ : client_1.client
9343
+ ]);
9344
+ const { gql, ApolloError } = modules;
9345
+ const GET_STOPLOSS = gql `
9304
9346
  query getStopLoss($where: StopLossWhereUniqueInput!) {
9305
9347
  getStopLoss(where: $where) {
9306
9348
  ${selectionSet}
@@ -9320,7 +9362,7 @@ exports.StopLoss = {
9320
9362
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.getStopLoss) !== null && _b !== void 0 ? _b : null;
9321
9363
  }
9322
9364
  catch (error) {
9323
- if (error instanceof client_1.ApolloError && error.message === 'No StopLoss found') {
9365
+ if (error instanceof ApolloError && error.message === 'No StopLoss found') {
9324
9366
  return null;
9325
9367
  }
9326
9368
  else {
@@ -9336,8 +9378,14 @@ exports.StopLoss = {
9336
9378
  */
9337
9379
  async getAll(globalClient) {
9338
9380
  var _a, _b;
9339
- const client = globalClient || client_1.client;
9340
- const GET_ALL_STOPLOSS = (0, client_1.gql) `
9381
+ const [modules, client] = await Promise.all([
9382
+ (0, client_1.getApolloModules)(),
9383
+ globalClient
9384
+ ? Promise.resolve(globalClient)
9385
+ : client_1.client
9386
+ ]);
9387
+ const { gql, ApolloError } = modules;
9388
+ const GET_ALL_STOPLOSS = gql `
9341
9389
  query getAllStopLoss {
9342
9390
  stopLosses {
9343
9391
  ${selectionSet}
@@ -9350,7 +9398,7 @@ exports.StopLoss = {
9350
9398
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.stopLosses) !== null && _b !== void 0 ? _b : null;
9351
9399
  }
9352
9400
  catch (error) {
9353
- if (error instanceof client_1.ApolloError && error.message === 'No StopLoss found') {
9401
+ if (error instanceof ApolloError && error.message === 'No StopLoss found') {
9354
9402
  return null;
9355
9403
  }
9356
9404
  else {
@@ -9366,8 +9414,14 @@ exports.StopLoss = {
9366
9414
  * @returns An array of found StopLoss records or null.
9367
9415
  */
9368
9416
  async findMany(props, globalClient) {
9369
- const client = globalClient || client_1.client;
9370
- const FIND_MANY_STOPLOSS = (0, client_1.gql) `
9417
+ const [modules, client] = await Promise.all([
9418
+ (0, client_1.getApolloModules)(),
9419
+ globalClient
9420
+ ? Promise.resolve(globalClient)
9421
+ : client_1.client
9422
+ ]);
9423
+ const { gql, ApolloError } = modules;
9424
+ const FIND_MANY_STOPLOSS = gql `
9371
9425
  query findManyStopLoss($where: StopLossWhereInput!) {
9372
9426
  stopLosses(where: $where) {
9373
9427
  ${selectionSet}
@@ -9396,7 +9450,7 @@ exports.StopLoss = {
9396
9450
  }
9397
9451
  }
9398
9452
  catch (error) {
9399
- if (error instanceof client_1.ApolloError && error.message === 'No StopLoss found') {
9453
+ if (error instanceof ApolloError && error.message === 'No StopLoss found') {
9400
9454
  return null;
9401
9455
  }
9402
9456
  else {