adaptic-backend 1.0.292 → 1.0.293

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 (107) 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/package.json +1 -1
package/Account.cjs CHANGED
@@ -210,8 +210,14 @@ exports.Account = {
210
210
  * @returns The created Account or null.
211
211
  */
212
212
  async create(props, globalClient) {
213
- const client = globalClient || client_1.client;
214
- const CREATE_ONE_ACCOUNT = (0, client_1.gql) `
213
+ const [modules, client] = await Promise.all([
214
+ (0, client_1.getApolloModules)(),
215
+ globalClient
216
+ ? Promise.resolve(globalClient)
217
+ : client_1.client
218
+ ]);
219
+ const { gql, ApolloError } = modules;
220
+ const CREATE_ONE_ACCOUNT = gql `
215
221
  mutation createOneAccount($data: AccountCreateInput!) {
216
222
  createOneAccount(data: $data) {
217
223
  ${selectionSet}
@@ -527,8 +533,14 @@ exports.Account = {
527
533
  * @returns The count of created records or null.
528
534
  */
529
535
  async createMany(props, globalClient) {
530
- const client = globalClient || client_1.client;
531
- const CREATE_MANY_ACCOUNT = (0, client_1.gql) `
536
+ const [modules, client] = await Promise.all([
537
+ (0, client_1.getApolloModules)(),
538
+ globalClient
539
+ ? Promise.resolve(globalClient)
540
+ : client_1.client
541
+ ]);
542
+ const { gql, ApolloError } = modules;
543
+ const CREATE_MANY_ACCOUNT = gql `
532
544
  mutation createManyAccount($data: [AccountCreateManyInput!]!) {
533
545
  createManyAccount(data: $data) {
534
546
  count
@@ -573,8 +585,14 @@ exports.Account = {
573
585
  * @returns The updated Account or null.
574
586
  */
575
587
  async update(props, globalClient) {
576
- const client = globalClient || client_1.client;
577
- const UPDATE_ONE_ACCOUNT = (0, client_1.gql) `
588
+ const [modules, client] = await Promise.all([
589
+ (0, client_1.getApolloModules)(),
590
+ globalClient
591
+ ? Promise.resolve(globalClient)
592
+ : client_1.client
593
+ ]);
594
+ const { gql, ApolloError } = modules;
595
+ const UPDATE_ONE_ACCOUNT = gql `
578
596
  mutation updateOneAccount($data: AccountUpdateInput!, $where: AccountWhereUniqueInput!) {
579
597
  updateOneAccount(data: $data, where: $where) {
580
598
  ${selectionSet}
@@ -1675,8 +1693,14 @@ exports.Account = {
1675
1693
  * @returns The updated Account or null.
1676
1694
  */
1677
1695
  async upsert(props, globalClient) {
1678
- const client = globalClient || client_1.client;
1679
- const UPSERT_ONE_ACCOUNT = (0, client_1.gql) `
1696
+ const [modules, client] = await Promise.all([
1697
+ (0, client_1.getApolloModules)(),
1698
+ globalClient
1699
+ ? Promise.resolve(globalClient)
1700
+ : client_1.client
1701
+ ]);
1702
+ const { gql, ApolloError } = modules;
1703
+ const UPSERT_ONE_ACCOUNT = gql `
1680
1704
  mutation upsertOneAccount($where: AccountWhereUniqueInput!, $create: AccountCreateInput!, $update: AccountUpdateInput!) {
1681
1705
  upsertOneAccount(where: $where, create: $create, update: $update) {
1682
1706
  ${selectionSet}
@@ -3051,8 +3075,14 @@ exports.Account = {
3051
3075
  * @returns The count of created records or null.
3052
3076
  */
3053
3077
  async updateMany(props, globalClient) {
3054
- const client = globalClient || client_1.client;
3055
- const UPDATE_MANY_ACCOUNT = (0, client_1.gql) `
3078
+ const [modules, client] = await Promise.all([
3079
+ (0, client_1.getApolloModules)(),
3080
+ globalClient
3081
+ ? Promise.resolve(globalClient)
3082
+ : client_1.client
3083
+ ]);
3084
+ const { gql, ApolloError } = modules;
3085
+ const UPDATE_MANY_ACCOUNT = gql `
3056
3086
  mutation updateManyAccount($data: [AccountCreateManyInput!]!) {
3057
3087
  updateManyAccount(data: $data) {
3058
3088
  count
@@ -4153,8 +4183,14 @@ exports.Account = {
4153
4183
  * @returns The deleted Account or null.
4154
4184
  */
4155
4185
  async delete(props, globalClient) {
4156
- const client = globalClient || client_1.client;
4157
- const DELETE_ONE_ACCOUNT = (0, client_1.gql) `
4186
+ const [modules, client] = await Promise.all([
4187
+ (0, client_1.getApolloModules)(),
4188
+ globalClient
4189
+ ? Promise.resolve(globalClient)
4190
+ : client_1.client
4191
+ ]);
4192
+ const { gql, ApolloError } = modules;
4193
+ const DELETE_ONE_ACCOUNT = gql `
4158
4194
  mutation deleteOneAccount($where: AccountWhereUniqueInput!) {
4159
4195
  deleteOneAccount(where: $where) {
4160
4196
  ${selectionSet}
@@ -4190,8 +4226,14 @@ exports.Account = {
4190
4226
  */
4191
4227
  async get(props, globalClient) {
4192
4228
  var _a, _b;
4193
- const client = globalClient || client_1.client;
4194
- const GET_ACCOUNT = (0, client_1.gql) `
4229
+ const [modules, client] = await Promise.all([
4230
+ (0, client_1.getApolloModules)(),
4231
+ globalClient
4232
+ ? Promise.resolve(globalClient)
4233
+ : client_1.client
4234
+ ]);
4235
+ const { gql, ApolloError } = modules;
4236
+ const GET_ACCOUNT = gql `
4195
4237
  query getAccount($where: AccountWhereUniqueInput!) {
4196
4238
  getAccount(where: $where) {
4197
4239
  ${selectionSet}
@@ -4216,7 +4258,7 @@ exports.Account = {
4216
4258
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.getAccount) !== null && _b !== void 0 ? _b : null;
4217
4259
  }
4218
4260
  catch (error) {
4219
- if (error instanceof client_1.ApolloError && error.message === 'No Account found') {
4261
+ if (error instanceof ApolloError && error.message === 'No Account found') {
4220
4262
  return null;
4221
4263
  }
4222
4264
  else {
@@ -4232,8 +4274,14 @@ exports.Account = {
4232
4274
  */
4233
4275
  async getAll(globalClient) {
4234
4276
  var _a, _b;
4235
- const client = globalClient || client_1.client;
4236
- const GET_ALL_ACCOUNT = (0, client_1.gql) `
4277
+ const [modules, client] = await Promise.all([
4278
+ (0, client_1.getApolloModules)(),
4279
+ globalClient
4280
+ ? Promise.resolve(globalClient)
4281
+ : client_1.client
4282
+ ]);
4283
+ const { gql, ApolloError } = modules;
4284
+ const GET_ALL_ACCOUNT = gql `
4237
4285
  query getAllAccount {
4238
4286
  accounts {
4239
4287
  ${selectionSet}
@@ -4246,7 +4294,7 @@ exports.Account = {
4246
4294
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.accounts) !== null && _b !== void 0 ? _b : null;
4247
4295
  }
4248
4296
  catch (error) {
4249
- if (error instanceof client_1.ApolloError && error.message === 'No Account found') {
4297
+ if (error instanceof ApolloError && error.message === 'No Account found') {
4250
4298
  return null;
4251
4299
  }
4252
4300
  else {
@@ -4262,8 +4310,14 @@ exports.Account = {
4262
4310
  * @returns An array of found Account records or null.
4263
4311
  */
4264
4312
  async findMany(props, globalClient) {
4265
- const client = globalClient || client_1.client;
4266
- const FIND_MANY_ACCOUNT = (0, client_1.gql) `
4313
+ const [modules, client] = await Promise.all([
4314
+ (0, client_1.getApolloModules)(),
4315
+ globalClient
4316
+ ? Promise.resolve(globalClient)
4317
+ : client_1.client
4318
+ ]);
4319
+ const { gql, ApolloError } = modules;
4320
+ const FIND_MANY_ACCOUNT = gql `
4267
4321
  query findManyAccount($where: AccountWhereInput!) {
4268
4322
  accounts(where: $where) {
4269
4323
  ${selectionSet}
@@ -4295,7 +4349,7 @@ exports.Account = {
4295
4349
  }
4296
4350
  }
4297
4351
  catch (error) {
4298
- if (error instanceof client_1.ApolloError && error.message === 'No Account found') {
4352
+ if (error instanceof ApolloError && error.message === 'No Account found') {
4299
4353
  return null;
4300
4354
  }
4301
4355
  else {
package/Action.cjs CHANGED
@@ -151,8 +151,14 @@ exports.Action = {
151
151
  * @returns The created Action or null.
152
152
  */
153
153
  async create(props, globalClient) {
154
- const client = globalClient || client_1.client;
155
- const CREATE_ONE_ACTION = (0, client_1.gql) `
154
+ const [modules, client] = await Promise.all([
155
+ (0, client_1.getApolloModules)(),
156
+ globalClient
157
+ ? Promise.resolve(globalClient)
158
+ : client_1.client
159
+ ]);
160
+ const { gql, ApolloError } = modules;
161
+ const CREATE_ONE_ACTION = gql `
156
162
  mutation createOneAction($data: ActionCreateInput!) {
157
163
  createOneAction(data: $data) {
158
164
  ${selectionSet}
@@ -1199,8 +1205,14 @@ exports.Action = {
1199
1205
  * @returns The count of created records or null.
1200
1206
  */
1201
1207
  async createMany(props, globalClient) {
1202
- const client = globalClient || client_1.client;
1203
- const CREATE_MANY_ACTION = (0, client_1.gql) `
1208
+ const [modules, client] = await Promise.all([
1209
+ (0, client_1.getApolloModules)(),
1210
+ globalClient
1211
+ ? Promise.resolve(globalClient)
1212
+ : client_1.client
1213
+ ]);
1214
+ const { gql, ApolloError } = modules;
1215
+ const CREATE_MANY_ACTION = gql `
1204
1216
  mutation createManyAction($data: [ActionCreateManyInput!]!) {
1205
1217
  createManyAction(data: $data) {
1206
1218
  count
@@ -1247,8 +1259,14 @@ exports.Action = {
1247
1259
  * @returns The updated Action or null.
1248
1260
  */
1249
1261
  async update(props, globalClient) {
1250
- const client = globalClient || client_1.client;
1251
- const UPDATE_ONE_ACTION = (0, client_1.gql) `
1262
+ const [modules, client] = await Promise.all([
1263
+ (0, client_1.getApolloModules)(),
1264
+ globalClient
1265
+ ? Promise.resolve(globalClient)
1266
+ : client_1.client
1267
+ ]);
1268
+ const { gql, ApolloError } = modules;
1269
+ const UPDATE_ONE_ACTION = gql `
1252
1270
  mutation updateOneAction($data: ActionUpdateInput!, $where: ActionWhereUniqueInput!) {
1253
1271
  updateOneAction(data: $data, where: $where) {
1254
1272
  ${selectionSet}
@@ -5625,8 +5643,14 @@ exports.Action = {
5625
5643
  * @returns The updated Action or null.
5626
5644
  */
5627
5645
  async upsert(props, globalClient) {
5628
- const client = globalClient || client_1.client;
5629
- const UPSERT_ONE_ACTION = (0, client_1.gql) `
5646
+ const [modules, client] = await Promise.all([
5647
+ (0, client_1.getApolloModules)(),
5648
+ globalClient
5649
+ ? Promise.resolve(globalClient)
5650
+ : client_1.client
5651
+ ]);
5652
+ const { gql, ApolloError } = modules;
5653
+ const UPSERT_ONE_ACTION = gql `
5630
5654
  mutation upsertOneAction($where: ActionWhereUniqueInput!, $create: ActionCreateInput!, $update: ActionUpdateInput!) {
5631
5655
  upsertOneAction(where: $where, create: $create, update: $update) {
5632
5656
  ${selectionSet}
@@ -11008,8 +11032,14 @@ exports.Action = {
11008
11032
  * @returns The count of created records or null.
11009
11033
  */
11010
11034
  async updateMany(props, globalClient) {
11011
- const client = globalClient || client_1.client;
11012
- const UPDATE_MANY_ACTION = (0, client_1.gql) `
11035
+ const [modules, client] = await Promise.all([
11036
+ (0, client_1.getApolloModules)(),
11037
+ globalClient
11038
+ ? Promise.resolve(globalClient)
11039
+ : client_1.client
11040
+ ]);
11041
+ const { gql, ApolloError } = modules;
11042
+ const UPDATE_MANY_ACTION = gql `
11013
11043
  mutation updateManyAction($data: [ActionCreateManyInput!]!) {
11014
11044
  updateManyAction(data: $data) {
11015
11045
  count
@@ -15386,8 +15416,14 @@ exports.Action = {
15386
15416
  * @returns The deleted Action or null.
15387
15417
  */
15388
15418
  async delete(props, globalClient) {
15389
- const client = globalClient || client_1.client;
15390
- const DELETE_ONE_ACTION = (0, client_1.gql) `
15419
+ const [modules, client] = await Promise.all([
15420
+ (0, client_1.getApolloModules)(),
15421
+ globalClient
15422
+ ? Promise.resolve(globalClient)
15423
+ : client_1.client
15424
+ ]);
15425
+ const { gql, ApolloError } = modules;
15426
+ const DELETE_ONE_ACTION = gql `
15391
15427
  mutation deleteOneAction($where: ActionWhereUniqueInput!) {
15392
15428
  deleteOneAction(where: $where) {
15393
15429
  ${selectionSet}
@@ -15423,8 +15459,14 @@ exports.Action = {
15423
15459
  */
15424
15460
  async get(props, globalClient) {
15425
15461
  var _a, _b;
15426
- const client = globalClient || client_1.client;
15427
- const GET_ACTION = (0, client_1.gql) `
15462
+ const [modules, client] = await Promise.all([
15463
+ (0, client_1.getApolloModules)(),
15464
+ globalClient
15465
+ ? Promise.resolve(globalClient)
15466
+ : client_1.client
15467
+ ]);
15468
+ const { gql, ApolloError } = modules;
15469
+ const GET_ACTION = gql `
15428
15470
  query getAction($where: ActionWhereUniqueInput!) {
15429
15471
  getAction(where: $where) {
15430
15472
  ${selectionSet}
@@ -15446,7 +15488,7 @@ exports.Action = {
15446
15488
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.getAction) !== null && _b !== void 0 ? _b : null;
15447
15489
  }
15448
15490
  catch (error) {
15449
- if (error instanceof client_1.ApolloError && error.message === 'No Action found') {
15491
+ if (error instanceof ApolloError && error.message === 'No Action found') {
15450
15492
  return null;
15451
15493
  }
15452
15494
  else {
@@ -15462,8 +15504,14 @@ exports.Action = {
15462
15504
  */
15463
15505
  async getAll(globalClient) {
15464
15506
  var _a, _b;
15465
- const client = globalClient || client_1.client;
15466
- const GET_ALL_ACTION = (0, client_1.gql) `
15507
+ const [modules, client] = await Promise.all([
15508
+ (0, client_1.getApolloModules)(),
15509
+ globalClient
15510
+ ? Promise.resolve(globalClient)
15511
+ : client_1.client
15512
+ ]);
15513
+ const { gql, ApolloError } = modules;
15514
+ const GET_ALL_ACTION = gql `
15467
15515
  query getAllAction {
15468
15516
  actions {
15469
15517
  ${selectionSet}
@@ -15476,7 +15524,7 @@ exports.Action = {
15476
15524
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.actions) !== null && _b !== void 0 ? _b : null;
15477
15525
  }
15478
15526
  catch (error) {
15479
- if (error instanceof client_1.ApolloError && error.message === 'No Action found') {
15527
+ if (error instanceof ApolloError && error.message === 'No Action found') {
15480
15528
  return null;
15481
15529
  }
15482
15530
  else {
@@ -15492,8 +15540,14 @@ exports.Action = {
15492
15540
  * @returns An array of found Action records or null.
15493
15541
  */
15494
15542
  async findMany(props, globalClient) {
15495
- const client = globalClient || client_1.client;
15496
- const FIND_MANY_ACTION = (0, client_1.gql) `
15543
+ const [modules, client] = await Promise.all([
15544
+ (0, client_1.getApolloModules)(),
15545
+ globalClient
15546
+ ? Promise.resolve(globalClient)
15547
+ : client_1.client
15548
+ ]);
15549
+ const { gql, ApolloError } = modules;
15550
+ const FIND_MANY_ACTION = gql `
15497
15551
  query findManyAction($where: ActionWhereInput!) {
15498
15552
  actions(where: $where) {
15499
15553
  ${selectionSet}
@@ -15522,7 +15576,7 @@ exports.Action = {
15522
15576
  }
15523
15577
  }
15524
15578
  catch (error) {
15525
- if (error instanceof client_1.ApolloError && error.message === 'No Action found') {
15579
+ if (error instanceof ApolloError && error.message === 'No Action found') {
15526
15580
  return null;
15527
15581
  }
15528
15582
  else {
package/Alert.cjs CHANGED
@@ -25,8 +25,14 @@ exports.Alert = {
25
25
  * @returns The created Alert or null.
26
26
  */
27
27
  async create(props, globalClient) {
28
- const client = globalClient || client_1.client;
29
- const CREATE_ONE_ALERT = (0, client_1.gql) `
28
+ const [modules, client] = await Promise.all([
29
+ (0, client_1.getApolloModules)(),
30
+ globalClient
31
+ ? Promise.resolve(globalClient)
32
+ : client_1.client
33
+ ]);
34
+ const { gql, ApolloError } = modules;
35
+ const CREATE_ONE_ALERT = gql `
30
36
  mutation createOneAlert($data: AlertCreateInput!) {
31
37
  createOneAlert(data: $data) {
32
38
  ${selectionSet}
@@ -692,8 +698,14 @@ exports.Alert = {
692
698
  * @returns The count of created records or null.
693
699
  */
694
700
  async createMany(props, globalClient) {
695
- const client = globalClient || client_1.client;
696
- const CREATE_MANY_ALERT = (0, client_1.gql) `
701
+ const [modules, client] = await Promise.all([
702
+ (0, client_1.getApolloModules)(),
703
+ globalClient
704
+ ? Promise.resolve(globalClient)
705
+ : client_1.client
706
+ ]);
707
+ const { gql, ApolloError } = modules;
708
+ const CREATE_MANY_ALERT = gql `
697
709
  mutation createManyAlert($data: [AlertCreateManyInput!]!) {
698
710
  createManyAlert(data: $data) {
699
711
  count
@@ -731,8 +743,14 @@ exports.Alert = {
731
743
  * @returns The updated Alert or null.
732
744
  */
733
745
  async update(props, globalClient) {
734
- const client = globalClient || client_1.client;
735
- const UPDATE_ONE_ALERT = (0, client_1.gql) `
746
+ const [modules, client] = await Promise.all([
747
+ (0, client_1.getApolloModules)(),
748
+ globalClient
749
+ ? Promise.resolve(globalClient)
750
+ : client_1.client
751
+ ]);
752
+ const { gql, ApolloError } = modules;
753
+ const UPDATE_ONE_ALERT = gql `
736
754
  mutation updateOneAlert($data: AlertUpdateInput!, $where: AlertWhereUniqueInput!) {
737
755
  updateOneAlert(data: $data, where: $where) {
738
756
  ${selectionSet}
@@ -3547,8 +3565,14 @@ exports.Alert = {
3547
3565
  * @returns The updated Alert or null.
3548
3566
  */
3549
3567
  async upsert(props, globalClient) {
3550
- const client = globalClient || client_1.client;
3551
- const UPSERT_ONE_ALERT = (0, client_1.gql) `
3568
+ const [modules, client] = await Promise.all([
3569
+ (0, client_1.getApolloModules)(),
3570
+ globalClient
3571
+ ? Promise.resolve(globalClient)
3572
+ : client_1.client
3573
+ ]);
3574
+ const { gql, ApolloError } = modules;
3575
+ const UPSERT_ONE_ALERT = gql `
3552
3576
  mutation upsertOneAlert($where: AlertWhereUniqueInput!, $create: AlertCreateInput!, $update: AlertUpdateInput!) {
3553
3577
  upsertOneAlert(where: $where, create: $create, update: $update) {
3554
3578
  ${selectionSet}
@@ -6987,8 +7011,14 @@ exports.Alert = {
6987
7011
  * @returns The count of created records or null.
6988
7012
  */
6989
7013
  async updateMany(props, globalClient) {
6990
- const client = globalClient || client_1.client;
6991
- const UPDATE_MANY_ALERT = (0, client_1.gql) `
7014
+ const [modules, client] = await Promise.all([
7015
+ (0, client_1.getApolloModules)(),
7016
+ globalClient
7017
+ ? Promise.resolve(globalClient)
7018
+ : client_1.client
7019
+ ]);
7020
+ const { gql, ApolloError } = modules;
7021
+ const UPDATE_MANY_ALERT = gql `
6992
7022
  mutation updateManyAlert($data: [AlertCreateManyInput!]!) {
6993
7023
  updateManyAlert(data: $data) {
6994
7024
  count
@@ -9803,8 +9833,14 @@ exports.Alert = {
9803
9833
  * @returns The deleted Alert or null.
9804
9834
  */
9805
9835
  async delete(props, globalClient) {
9806
- const client = globalClient || client_1.client;
9807
- const DELETE_ONE_ALERT = (0, client_1.gql) `
9836
+ const [modules, client] = await Promise.all([
9837
+ (0, client_1.getApolloModules)(),
9838
+ globalClient
9839
+ ? Promise.resolve(globalClient)
9840
+ : client_1.client
9841
+ ]);
9842
+ const { gql, ApolloError } = modules;
9843
+ const DELETE_ONE_ALERT = gql `
9808
9844
  mutation deleteOneAlert($where: AlertWhereUniqueInput!) {
9809
9845
  deleteOneAlert(where: $where) {
9810
9846
  ${selectionSet}
@@ -9840,8 +9876,14 @@ exports.Alert = {
9840
9876
  */
9841
9877
  async get(props, globalClient) {
9842
9878
  var _a, _b;
9843
- const client = globalClient || client_1.client;
9844
- const GET_ALERT = (0, client_1.gql) `
9879
+ const [modules, client] = await Promise.all([
9880
+ (0, client_1.getApolloModules)(),
9881
+ globalClient
9882
+ ? Promise.resolve(globalClient)
9883
+ : client_1.client
9884
+ ]);
9885
+ const { gql, ApolloError } = modules;
9886
+ const GET_ALERT = gql `
9845
9887
  query getAlert($where: AlertWhereUniqueInput!) {
9846
9888
  getAlert(where: $where) {
9847
9889
  ${selectionSet}
@@ -9863,7 +9905,7 @@ exports.Alert = {
9863
9905
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.getAlert) !== null && _b !== void 0 ? _b : null;
9864
9906
  }
9865
9907
  catch (error) {
9866
- if (error instanceof client_1.ApolloError && error.message === 'No Alert found') {
9908
+ if (error instanceof ApolloError && error.message === 'No Alert found') {
9867
9909
  return null;
9868
9910
  }
9869
9911
  else {
@@ -9879,8 +9921,14 @@ exports.Alert = {
9879
9921
  */
9880
9922
  async getAll(globalClient) {
9881
9923
  var _a, _b;
9882
- const client = globalClient || client_1.client;
9883
- const GET_ALL_ALERT = (0, client_1.gql) `
9924
+ const [modules, client] = await Promise.all([
9925
+ (0, client_1.getApolloModules)(),
9926
+ globalClient
9927
+ ? Promise.resolve(globalClient)
9928
+ : client_1.client
9929
+ ]);
9930
+ const { gql, ApolloError } = modules;
9931
+ const GET_ALL_ALERT = gql `
9884
9932
  query getAllAlert {
9885
9933
  alerts {
9886
9934
  ${selectionSet}
@@ -9893,7 +9941,7 @@ exports.Alert = {
9893
9941
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.alerts) !== null && _b !== void 0 ? _b : null;
9894
9942
  }
9895
9943
  catch (error) {
9896
- if (error instanceof client_1.ApolloError && error.message === 'No Alert found') {
9944
+ if (error instanceof ApolloError && error.message === 'No Alert found') {
9897
9945
  return null;
9898
9946
  }
9899
9947
  else {
@@ -9909,8 +9957,14 @@ exports.Alert = {
9909
9957
  * @returns An array of found Alert records or null.
9910
9958
  */
9911
9959
  async findMany(props, globalClient) {
9912
- const client = globalClient || client_1.client;
9913
- const FIND_MANY_ALERT = (0, client_1.gql) `
9960
+ const [modules, client] = await Promise.all([
9961
+ (0, client_1.getApolloModules)(),
9962
+ globalClient
9963
+ ? Promise.resolve(globalClient)
9964
+ : client_1.client
9965
+ ]);
9966
+ const { gql, ApolloError } = modules;
9967
+ const FIND_MANY_ALERT = gql `
9914
9968
  query findManyAlert($where: AlertWhereInput!) {
9915
9969
  alerts(where: $where) {
9916
9970
  ${selectionSet}
@@ -9939,7 +9993,7 @@ exports.Alert = {
9939
9993
  }
9940
9994
  }
9941
9995
  catch (error) {
9942
- if (error instanceof client_1.ApolloError && error.message === 'No Alert found') {
9996
+ if (error instanceof ApolloError && error.message === 'No Alert found') {
9943
9997
  return null;
9944
9998
  }
9945
9999
  else {