adaptic-backend 1.0.291 → 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/AlpacaAccount.cjs CHANGED
@@ -411,8 +411,14 @@ exports.AlpacaAccount = {
411
411
  * @returns The created AlpacaAccount or null.
412
412
  */
413
413
  async create(props, globalClient) {
414
- const client = globalClient || client_1.client;
415
- const CREATE_ONE_ALPACAACCOUNT = (0, client_1.gql) `
414
+ const [modules, client] = await Promise.all([
415
+ (0, client_1.getApolloModules)(),
416
+ globalClient
417
+ ? Promise.resolve(globalClient)
418
+ : client_1.client
419
+ ]);
420
+ const { gql, ApolloError } = modules;
421
+ const CREATE_ONE_ALPACAACCOUNT = gql `
416
422
  mutation createOneAlpacaAccount($data: AlpacaAccountCreateInput!) {
417
423
  createOneAlpacaAccount(data: $data) {
418
424
  ${selectionSet}
@@ -1694,8 +1700,14 @@ exports.AlpacaAccount = {
1694
1700
  * @returns The count of created records or null.
1695
1701
  */
1696
1702
  async createMany(props, globalClient) {
1697
- const client = globalClient || client_1.client;
1698
- const CREATE_MANY_ALPACAACCOUNT = (0, client_1.gql) `
1703
+ const [modules, client] = await Promise.all([
1704
+ (0, client_1.getApolloModules)(),
1705
+ globalClient
1706
+ ? Promise.resolve(globalClient)
1707
+ : client_1.client
1708
+ ]);
1709
+ const { gql, ApolloError } = modules;
1710
+ const CREATE_MANY_ALPACAACCOUNT = gql `
1699
1711
  mutation createManyAlpacaAccount($data: [AlpacaAccountCreateManyInput!]!) {
1700
1712
  createManyAlpacaAccount(data: $data) {
1701
1713
  count
@@ -1744,8 +1756,14 @@ exports.AlpacaAccount = {
1744
1756
  * @returns The updated AlpacaAccount or null.
1745
1757
  */
1746
1758
  async update(props, globalClient) {
1747
- const client = globalClient || client_1.client;
1748
- const UPDATE_ONE_ALPACAACCOUNT = (0, client_1.gql) `
1759
+ const [modules, client] = await Promise.all([
1760
+ (0, client_1.getApolloModules)(),
1761
+ globalClient
1762
+ ? Promise.resolve(globalClient)
1763
+ : client_1.client
1764
+ ]);
1765
+ const { gql, ApolloError } = modules;
1766
+ const UPDATE_ONE_ALPACAACCOUNT = gql `
1749
1767
  mutation updateOneAlpacaAccount($data: AlpacaAccountUpdateInput!, $where: AlpacaAccountWhereUniqueInput!) {
1750
1768
  updateOneAlpacaAccount(data: $data, where: $where) {
1751
1769
  ${selectionSet}
@@ -6863,8 +6881,14 @@ exports.AlpacaAccount = {
6863
6881
  * @returns The updated AlpacaAccount or null.
6864
6882
  */
6865
6883
  async upsert(props, globalClient) {
6866
- const client = globalClient || client_1.client;
6867
- const UPSERT_ONE_ALPACAACCOUNT = (0, client_1.gql) `
6884
+ const [modules, client] = await Promise.all([
6885
+ (0, client_1.getApolloModules)(),
6886
+ globalClient
6887
+ ? Promise.resolve(globalClient)
6888
+ : client_1.client
6889
+ ]);
6890
+ const { gql, ApolloError } = modules;
6891
+ const UPSERT_ONE_ALPACAACCOUNT = gql `
6868
6892
  mutation upsertOneAlpacaAccount($where: AlpacaAccountWhereUniqueInput!, $create: AlpacaAccountCreateInput!, $update: AlpacaAccountUpdateInput!) {
6869
6893
  upsertOneAlpacaAccount(where: $where, create: $create, update: $update) {
6870
6894
  ${selectionSet}
@@ -13222,8 +13246,14 @@ exports.AlpacaAccount = {
13222
13246
  * @returns The count of created records or null.
13223
13247
  */
13224
13248
  async updateMany(props, globalClient) {
13225
- const client = globalClient || client_1.client;
13226
- const UPDATE_MANY_ALPACAACCOUNT = (0, client_1.gql) `
13249
+ const [modules, client] = await Promise.all([
13250
+ (0, client_1.getApolloModules)(),
13251
+ globalClient
13252
+ ? Promise.resolve(globalClient)
13253
+ : client_1.client
13254
+ ]);
13255
+ const { gql, ApolloError } = modules;
13256
+ const UPDATE_MANY_ALPACAACCOUNT = gql `
13227
13257
  mutation updateManyAlpacaAccount($data: [AlpacaAccountCreateManyInput!]!) {
13228
13258
  updateManyAlpacaAccount(data: $data) {
13229
13259
  count
@@ -18341,8 +18371,14 @@ exports.AlpacaAccount = {
18341
18371
  * @returns The deleted AlpacaAccount or null.
18342
18372
  */
18343
18373
  async delete(props, globalClient) {
18344
- const client = globalClient || client_1.client;
18345
- const DELETE_ONE_ALPACAACCOUNT = (0, client_1.gql) `
18374
+ const [modules, client] = await Promise.all([
18375
+ (0, client_1.getApolloModules)(),
18376
+ globalClient
18377
+ ? Promise.resolve(globalClient)
18378
+ : client_1.client
18379
+ ]);
18380
+ const { gql, ApolloError } = modules;
18381
+ const DELETE_ONE_ALPACAACCOUNT = gql `
18346
18382
  mutation deleteOneAlpacaAccount($where: AlpacaAccountWhereUniqueInput!) {
18347
18383
  deleteOneAlpacaAccount(where: $where) {
18348
18384
  ${selectionSet}
@@ -18378,8 +18414,14 @@ exports.AlpacaAccount = {
18378
18414
  */
18379
18415
  async get(props, globalClient) {
18380
18416
  var _a, _b;
18381
- const client = globalClient || client_1.client;
18382
- const GET_ALPACAACCOUNT = (0, client_1.gql) `
18417
+ const [modules, client] = await Promise.all([
18418
+ (0, client_1.getApolloModules)(),
18419
+ globalClient
18420
+ ? Promise.resolve(globalClient)
18421
+ : client_1.client
18422
+ ]);
18423
+ const { gql, ApolloError } = modules;
18424
+ const GET_ALPACAACCOUNT = gql `
18383
18425
  query getAlpacaAccount($where: AlpacaAccountWhereUniqueInput!) {
18384
18426
  getAlpacaAccount(where: $where) {
18385
18427
  ${selectionSet}
@@ -18401,7 +18443,7 @@ exports.AlpacaAccount = {
18401
18443
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.getAlpacaAccount) !== null && _b !== void 0 ? _b : null;
18402
18444
  }
18403
18445
  catch (error) {
18404
- if (error instanceof client_1.ApolloError && error.message === 'No AlpacaAccount found') {
18446
+ if (error instanceof ApolloError && error.message === 'No AlpacaAccount found') {
18405
18447
  return null;
18406
18448
  }
18407
18449
  else {
@@ -18417,8 +18459,14 @@ exports.AlpacaAccount = {
18417
18459
  */
18418
18460
  async getAll(globalClient) {
18419
18461
  var _a, _b;
18420
- const client = globalClient || client_1.client;
18421
- const GET_ALL_ALPACAACCOUNT = (0, client_1.gql) `
18462
+ const [modules, client] = await Promise.all([
18463
+ (0, client_1.getApolloModules)(),
18464
+ globalClient
18465
+ ? Promise.resolve(globalClient)
18466
+ : client_1.client
18467
+ ]);
18468
+ const { gql, ApolloError } = modules;
18469
+ const GET_ALL_ALPACAACCOUNT = gql `
18422
18470
  query getAllAlpacaAccount {
18423
18471
  alpacaAccounts {
18424
18472
  ${selectionSet}
@@ -18431,7 +18479,7 @@ exports.AlpacaAccount = {
18431
18479
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.alpacaAccounts) !== null && _b !== void 0 ? _b : null;
18432
18480
  }
18433
18481
  catch (error) {
18434
- if (error instanceof client_1.ApolloError && error.message === 'No AlpacaAccount found') {
18482
+ if (error instanceof ApolloError && error.message === 'No AlpacaAccount found') {
18435
18483
  return null;
18436
18484
  }
18437
18485
  else {
@@ -18447,8 +18495,14 @@ exports.AlpacaAccount = {
18447
18495
  * @returns An array of found AlpacaAccount records or null.
18448
18496
  */
18449
18497
  async findMany(props, globalClient) {
18450
- const client = globalClient || client_1.client;
18451
- const FIND_MANY_ALPACAACCOUNT = (0, client_1.gql) `
18498
+ const [modules, client] = await Promise.all([
18499
+ (0, client_1.getApolloModules)(),
18500
+ globalClient
18501
+ ? Promise.resolve(globalClient)
18502
+ : client_1.client
18503
+ ]);
18504
+ const { gql, ApolloError } = modules;
18505
+ const FIND_MANY_ALPACAACCOUNT = gql `
18452
18506
  query findManyAlpacaAccount($where: AlpacaAccountWhereInput!) {
18453
18507
  alpacaAccounts(where: $where) {
18454
18508
  ${selectionSet}
@@ -18477,7 +18531,7 @@ exports.AlpacaAccount = {
18477
18531
  }
18478
18532
  }
18479
18533
  catch (error) {
18480
- if (error instanceof client_1.ApolloError && error.message === 'No AlpacaAccount found') {
18534
+ if (error instanceof ApolloError && error.message === 'No AlpacaAccount found') {
18481
18535
  return null;
18482
18536
  }
18483
18537
  else {
package/Asset.cjs CHANGED
@@ -76,8 +76,14 @@ exports.Asset = {
76
76
  * @returns The created Asset or null.
77
77
  */
78
78
  async create(props, globalClient) {
79
- const client = globalClient || client_1.client;
80
- const CREATE_ONE_ASSET = (0, client_1.gql) `
79
+ const [modules, client] = await Promise.all([
80
+ (0, client_1.getApolloModules)(),
81
+ globalClient
82
+ ? Promise.resolve(globalClient)
83
+ : client_1.client
84
+ ]);
85
+ const { gql, ApolloError } = modules;
86
+ const CREATE_ONE_ASSET = gql `
81
87
  mutation createOneAsset($data: AssetCreateInput!) {
82
88
  createOneAsset(data: $data) {
83
89
  ${selectionSet}
@@ -1434,8 +1440,14 @@ exports.Asset = {
1434
1440
  * @returns The count of created records or null.
1435
1441
  */
1436
1442
  async createMany(props, globalClient) {
1437
- const client = globalClient || client_1.client;
1438
- const CREATE_MANY_ASSET = (0, client_1.gql) `
1443
+ const [modules, client] = await Promise.all([
1444
+ (0, client_1.getApolloModules)(),
1445
+ globalClient
1446
+ ? Promise.resolve(globalClient)
1447
+ : client_1.client
1448
+ ]);
1449
+ const { gql, ApolloError } = modules;
1450
+ const CREATE_MANY_ASSET = gql `
1439
1451
  mutation createManyAsset($data: [AssetCreateManyInput!]!) {
1440
1452
  createManyAsset(data: $data) {
1441
1453
  count
@@ -1524,8 +1536,14 @@ exports.Asset = {
1524
1536
  * @returns The updated Asset or null.
1525
1537
  */
1526
1538
  async update(props, globalClient) {
1527
- const client = globalClient || client_1.client;
1528
- const UPDATE_ONE_ASSET = (0, client_1.gql) `
1539
+ const [modules, client] = await Promise.all([
1540
+ (0, client_1.getApolloModules)(),
1541
+ globalClient
1542
+ ? Promise.resolve(globalClient)
1543
+ : client_1.client
1544
+ ]);
1545
+ const { gql, ApolloError } = modules;
1546
+ const UPDATE_ONE_ASSET = gql `
1529
1547
  mutation updateOneAsset($data: AssetUpdateInput!, $where: AssetWhereUniqueInput!) {
1530
1548
  updateOneAsset(data: $data, where: $where) {
1531
1549
  ${selectionSet}
@@ -6903,8 +6921,14 @@ exports.Asset = {
6903
6921
  * @returns The updated Asset or null.
6904
6922
  */
6905
6923
  async upsert(props, globalClient) {
6906
- const client = globalClient || client_1.client;
6907
- const UPSERT_ONE_ASSET = (0, client_1.gql) `
6924
+ const [modules, client] = await Promise.all([
6925
+ (0, client_1.getApolloModules)(),
6926
+ globalClient
6927
+ ? Promise.resolve(globalClient)
6928
+ : client_1.client
6929
+ ]);
6930
+ const { gql, ApolloError } = modules;
6931
+ const UPSERT_ONE_ASSET = gql `
6908
6932
  mutation upsertOneAsset($where: AssetWhereUniqueInput!, $create: AssetCreateInput!, $update: AssetUpdateInput!) {
6909
6933
  upsertOneAsset(where: $where, create: $create, update: $update) {
6910
6934
  ${selectionSet}
@@ -13597,8 +13621,14 @@ exports.Asset = {
13597
13621
  * @returns The count of created records or null.
13598
13622
  */
13599
13623
  async updateMany(props, globalClient) {
13600
- const client = globalClient || client_1.client;
13601
- const UPDATE_MANY_ASSET = (0, client_1.gql) `
13624
+ const [modules, client] = await Promise.all([
13625
+ (0, client_1.getApolloModules)(),
13626
+ globalClient
13627
+ ? Promise.resolve(globalClient)
13628
+ : client_1.client
13629
+ ]);
13630
+ const { gql, ApolloError } = modules;
13631
+ const UPDATE_MANY_ASSET = gql `
13602
13632
  mutation updateManyAsset($data: [AssetCreateManyInput!]!) {
13603
13633
  updateManyAsset(data: $data) {
13604
13634
  count
@@ -18976,8 +19006,14 @@ exports.Asset = {
18976
19006
  * @returns The deleted Asset or null.
18977
19007
  */
18978
19008
  async delete(props, globalClient) {
18979
- const client = globalClient || client_1.client;
18980
- const DELETE_ONE_ASSET = (0, client_1.gql) `
19009
+ const [modules, client] = await Promise.all([
19010
+ (0, client_1.getApolloModules)(),
19011
+ globalClient
19012
+ ? Promise.resolve(globalClient)
19013
+ : client_1.client
19014
+ ]);
19015
+ const { gql, ApolloError } = modules;
19016
+ const DELETE_ONE_ASSET = gql `
18981
19017
  mutation deleteOneAsset($where: AssetWhereUniqueInput!) {
18982
19018
  deleteOneAsset(where: $where) {
18983
19019
  ${selectionSet}
@@ -19013,8 +19049,14 @@ exports.Asset = {
19013
19049
  */
19014
19050
  async get(props, globalClient) {
19015
19051
  var _a, _b;
19016
- const client = globalClient || client_1.client;
19017
- const GET_ASSET = (0, client_1.gql) `
19052
+ const [modules, client] = await Promise.all([
19053
+ (0, client_1.getApolloModules)(),
19054
+ globalClient
19055
+ ? Promise.resolve(globalClient)
19056
+ : client_1.client
19057
+ ]);
19058
+ const { gql, ApolloError } = modules;
19059
+ const GET_ASSET = gql `
19018
19060
  query getAsset($where: AssetWhereUniqueInput!) {
19019
19061
  getAsset(where: $where) {
19020
19062
  ${selectionSet}
@@ -19035,7 +19077,7 @@ exports.Asset = {
19035
19077
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.getAsset) !== null && _b !== void 0 ? _b : null;
19036
19078
  }
19037
19079
  catch (error) {
19038
- if (error instanceof client_1.ApolloError && error.message === 'No Asset found') {
19080
+ if (error instanceof ApolloError && error.message === 'No Asset found') {
19039
19081
  return null;
19040
19082
  }
19041
19083
  else {
@@ -19051,8 +19093,14 @@ exports.Asset = {
19051
19093
  */
19052
19094
  async getAll(globalClient) {
19053
19095
  var _a, _b;
19054
- const client = globalClient || client_1.client;
19055
- const GET_ALL_ASSET = (0, client_1.gql) `
19096
+ const [modules, client] = await Promise.all([
19097
+ (0, client_1.getApolloModules)(),
19098
+ globalClient
19099
+ ? Promise.resolve(globalClient)
19100
+ : client_1.client
19101
+ ]);
19102
+ const { gql, ApolloError } = modules;
19103
+ const GET_ALL_ASSET = gql `
19056
19104
  query getAllAsset {
19057
19105
  assets {
19058
19106
  ${selectionSet}
@@ -19065,7 +19113,7 @@ exports.Asset = {
19065
19113
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.assets) !== null && _b !== void 0 ? _b : null;
19066
19114
  }
19067
19115
  catch (error) {
19068
- if (error instanceof client_1.ApolloError && error.message === 'No Asset found') {
19116
+ if (error instanceof ApolloError && error.message === 'No Asset found') {
19069
19117
  return null;
19070
19118
  }
19071
19119
  else {
@@ -19081,8 +19129,14 @@ exports.Asset = {
19081
19129
  * @returns An array of found Asset records or null.
19082
19130
  */
19083
19131
  async findMany(props, globalClient) {
19084
- const client = globalClient || client_1.client;
19085
- const FIND_MANY_ASSET = (0, client_1.gql) `
19132
+ const [modules, client] = await Promise.all([
19133
+ (0, client_1.getApolloModules)(),
19134
+ globalClient
19135
+ ? Promise.resolve(globalClient)
19136
+ : client_1.client
19137
+ ]);
19138
+ const { gql, ApolloError } = modules;
19139
+ const FIND_MANY_ASSET = gql `
19086
19140
  query findManyAsset($where: AssetWhereInput!) {
19087
19141
  assets(where: $where) {
19088
19142
  ${selectionSet}
@@ -19114,7 +19168,7 @@ exports.Asset = {
19114
19168
  }
19115
19169
  }
19116
19170
  catch (error) {
19117
- if (error instanceof client_1.ApolloError && error.message === 'No Asset found') {
19171
+ if (error instanceof ApolloError && error.message === 'No Asset found') {
19118
19172
  return null;
19119
19173
  }
19120
19174
  else {
package/Authenticator.cjs CHANGED
@@ -210,8 +210,14 @@ exports.Authenticator = {
210
210
  * @returns The created Authenticator or null.
211
211
  */
212
212
  async create(props, globalClient) {
213
- const client = globalClient || client_1.client;
214
- const CREATE_ONE_AUTHENTICATOR = (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_AUTHENTICATOR = gql `
215
221
  mutation createOneAuthenticator($data: AuthenticatorCreateInput!) {
216
222
  createOneAuthenticator(data: $data) {
217
223
  ${selectionSet}
@@ -530,8 +536,14 @@ exports.Authenticator = {
530
536
  * @returns The count of created records or null.
531
537
  */
532
538
  async createMany(props, globalClient) {
533
- const client = globalClient || client_1.client;
534
- const CREATE_MANY_AUTHENTICATOR = (0, client_1.gql) `
539
+ const [modules, client] = await Promise.all([
540
+ (0, client_1.getApolloModules)(),
541
+ globalClient
542
+ ? Promise.resolve(globalClient)
543
+ : client_1.client
544
+ ]);
545
+ const { gql, ApolloError } = modules;
546
+ const CREATE_MANY_AUTHENTICATOR = gql `
535
547
  mutation createManyAuthenticator($data: [AuthenticatorCreateManyInput!]!) {
536
548
  createManyAuthenticator(data: $data) {
537
549
  count
@@ -569,8 +581,14 @@ exports.Authenticator = {
569
581
  * @returns The updated Authenticator or null.
570
582
  */
571
583
  async update(props, globalClient) {
572
- const client = globalClient || client_1.client;
573
- const UPDATE_ONE_AUTHENTICATOR = (0, client_1.gql) `
584
+ const [modules, client] = await Promise.all([
585
+ (0, client_1.getApolloModules)(),
586
+ globalClient
587
+ ? Promise.resolve(globalClient)
588
+ : client_1.client
589
+ ]);
590
+ const { gql, ApolloError } = modules;
591
+ const UPDATE_ONE_AUTHENTICATOR = gql `
574
592
  mutation updateOneAuthenticator($data: AuthenticatorUpdateInput!, $where: AuthenticatorWhereUniqueInput!) {
575
593
  updateOneAuthenticator(data: $data, where: $where) {
576
594
  ${selectionSet}
@@ -1688,8 +1706,14 @@ exports.Authenticator = {
1688
1706
  * @returns The updated Authenticator or null.
1689
1707
  */
1690
1708
  async upsert(props, globalClient) {
1691
- const client = globalClient || client_1.client;
1692
- const UPSERT_ONE_AUTHENTICATOR = (0, client_1.gql) `
1709
+ const [modules, client] = await Promise.all([
1710
+ (0, client_1.getApolloModules)(),
1711
+ globalClient
1712
+ ? Promise.resolve(globalClient)
1713
+ : client_1.client
1714
+ ]);
1715
+ const { gql, ApolloError } = modules;
1716
+ const UPSERT_ONE_AUTHENTICATOR = gql `
1693
1717
  mutation upsertOneAuthenticator($where: AuthenticatorWhereUniqueInput!, $create: AuthenticatorCreateInput!, $update: AuthenticatorUpdateInput!) {
1694
1718
  upsertOneAuthenticator(where: $where, create: $create, update: $update) {
1695
1719
  ${selectionSet}
@@ -3084,8 +3108,14 @@ exports.Authenticator = {
3084
3108
  * @returns The count of created records or null.
3085
3109
  */
3086
3110
  async updateMany(props, globalClient) {
3087
- const client = globalClient || client_1.client;
3088
- const UPDATE_MANY_AUTHENTICATOR = (0, client_1.gql) `
3111
+ const [modules, client] = await Promise.all([
3112
+ (0, client_1.getApolloModules)(),
3113
+ globalClient
3114
+ ? Promise.resolve(globalClient)
3115
+ : client_1.client
3116
+ ]);
3117
+ const { gql, ApolloError } = modules;
3118
+ const UPDATE_MANY_AUTHENTICATOR = gql `
3089
3119
  mutation updateManyAuthenticator($data: [AuthenticatorCreateManyInput!]!) {
3090
3120
  updateManyAuthenticator(data: $data) {
3091
3121
  count
@@ -4203,8 +4233,14 @@ exports.Authenticator = {
4203
4233
  * @returns The deleted Authenticator or null.
4204
4234
  */
4205
4235
  async delete(props, globalClient) {
4206
- const client = globalClient || client_1.client;
4207
- const DELETE_ONE_AUTHENTICATOR = (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 DELETE_ONE_AUTHENTICATOR = gql `
4208
4244
  mutation deleteOneAuthenticator($where: AuthenticatorWhereUniqueInput!) {
4209
4245
  deleteOneAuthenticator(where: $where) {
4210
4246
  ${selectionSet}
@@ -4240,8 +4276,14 @@ exports.Authenticator = {
4240
4276
  */
4241
4277
  async get(props, globalClient) {
4242
4278
  var _a, _b;
4243
- const client = globalClient || client_1.client;
4244
- const GET_AUTHENTICATOR = (0, client_1.gql) `
4279
+ const [modules, client] = await Promise.all([
4280
+ (0, client_1.getApolloModules)(),
4281
+ globalClient
4282
+ ? Promise.resolve(globalClient)
4283
+ : client_1.client
4284
+ ]);
4285
+ const { gql, ApolloError } = modules;
4286
+ const GET_AUTHENTICATOR = gql `
4245
4287
  query getAuthenticator($where: AuthenticatorWhereUniqueInput!) {
4246
4288
  getAuthenticator(where: $where) {
4247
4289
  ${selectionSet}
@@ -4263,7 +4305,7 @@ exports.Authenticator = {
4263
4305
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.getAuthenticator) !== null && _b !== void 0 ? _b : null;
4264
4306
  }
4265
4307
  catch (error) {
4266
- if (error instanceof client_1.ApolloError && error.message === 'No Authenticator found') {
4308
+ if (error instanceof ApolloError && error.message === 'No Authenticator found') {
4267
4309
  return null;
4268
4310
  }
4269
4311
  else {
@@ -4279,8 +4321,14 @@ exports.Authenticator = {
4279
4321
  */
4280
4322
  async getAll(globalClient) {
4281
4323
  var _a, _b;
4282
- const client = globalClient || client_1.client;
4283
- const GET_ALL_AUTHENTICATOR = (0, client_1.gql) `
4324
+ const [modules, client] = await Promise.all([
4325
+ (0, client_1.getApolloModules)(),
4326
+ globalClient
4327
+ ? Promise.resolve(globalClient)
4328
+ : client_1.client
4329
+ ]);
4330
+ const { gql, ApolloError } = modules;
4331
+ const GET_ALL_AUTHENTICATOR = gql `
4284
4332
  query getAllAuthenticator {
4285
4333
  authenticators {
4286
4334
  ${selectionSet}
@@ -4293,7 +4341,7 @@ exports.Authenticator = {
4293
4341
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.authenticators) !== null && _b !== void 0 ? _b : null;
4294
4342
  }
4295
4343
  catch (error) {
4296
- if (error instanceof client_1.ApolloError && error.message === 'No Authenticator found') {
4344
+ if (error instanceof ApolloError && error.message === 'No Authenticator found') {
4297
4345
  return null;
4298
4346
  }
4299
4347
  else {
@@ -4309,8 +4357,14 @@ exports.Authenticator = {
4309
4357
  * @returns An array of found Authenticator records or null.
4310
4358
  */
4311
4359
  async findMany(props, globalClient) {
4312
- const client = globalClient || client_1.client;
4313
- const FIND_MANY_AUTHENTICATOR = (0, client_1.gql) `
4360
+ const [modules, client] = await Promise.all([
4361
+ (0, client_1.getApolloModules)(),
4362
+ globalClient
4363
+ ? Promise.resolve(globalClient)
4364
+ : client_1.client
4365
+ ]);
4366
+ const { gql, ApolloError } = modules;
4367
+ const FIND_MANY_AUTHENTICATOR = gql `
4314
4368
  query findManyAuthenticator($where: AuthenticatorWhereInput!) {
4315
4369
  authenticators(where: $where) {
4316
4370
  ${selectionSet}
@@ -4339,7 +4393,7 @@ exports.Authenticator = {
4339
4393
  }
4340
4394
  }
4341
4395
  catch (error) {
4342
- if (error instanceof client_1.ApolloError && error.message === 'No Authenticator found') {
4396
+ if (error instanceof ApolloError && error.message === 'No Authenticator found') {
4343
4397
  return null;
4344
4398
  }
4345
4399
  else {