adaptic-backend 1.0.233 → 1.0.235

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/Account.cjs +36 -18
  2. package/Account.d.ts +19 -9
  3. package/Action.cjs +36 -18
  4. package/Action.d.ts +19 -9
  5. package/Alert.cjs +36 -18
  6. package/Alert.d.ts +19 -9
  7. package/AlpacaAccount.cjs +36 -18
  8. package/AlpacaAccount.d.ts +19 -9
  9. package/Asset.cjs +36 -18
  10. package/Asset.d.ts +19 -9
  11. package/Authenticator.cjs +36 -18
  12. package/Authenticator.d.ts +19 -9
  13. package/Contract.cjs +36 -18
  14. package/Contract.d.ts +19 -9
  15. package/Customer.cjs +36 -18
  16. package/Customer.d.ts +19 -9
  17. package/Deliverable.cjs +36 -18
  18. package/Deliverable.d.ts +19 -9
  19. package/EconomicEvent.cjs +36 -18
  20. package/EconomicEvent.d.ts +19 -9
  21. package/MarketSentiment.cjs +36 -18
  22. package/MarketSentiment.d.ts +19 -9
  23. package/NewsArticle.cjs +36 -18
  24. package/NewsArticle.d.ts +19 -9
  25. package/NewsArticleAssetSentiment.cjs +36 -18
  26. package/NewsArticleAssetSentiment.d.ts +19 -9
  27. package/Order.cjs +36 -18
  28. package/Order.d.ts +19 -9
  29. package/Position.cjs +36 -18
  30. package/Position.d.ts +19 -9
  31. package/ScheduledOptionOrder.cjs +36 -18
  32. package/ScheduledOptionOrder.d.ts +19 -9
  33. package/Session.cjs +36 -18
  34. package/Session.d.ts +19 -9
  35. package/StopLoss.cjs +36 -18
  36. package/StopLoss.d.ts +19 -9
  37. package/TakeProfit.cjs +36 -18
  38. package/TakeProfit.d.ts +19 -9
  39. package/Trade.cjs +36 -18
  40. package/Trade.d.ts +19 -9
  41. package/User.cjs +36 -18
  42. package/User.d.ts +19 -9
  43. package/VerificationToken.cjs +36 -18
  44. package/VerificationToken.d.ts +19 -9
  45. package/client.cjs +0 -1
  46. package/index.d.ts +198 -198
  47. package/package.json +1 -1
  48. package/server/Account.d.ts +19 -9
  49. package/server/Account.d.ts.map +1 -1
  50. package/server/Account.js.map +1 -1
  51. package/server/Account.mjs +28 -10
  52. package/server/Action.d.ts +19 -9
  53. package/server/Action.d.ts.map +1 -1
  54. package/server/Action.js.map +1 -1
  55. package/server/Action.mjs +28 -10
  56. package/server/Alert.d.ts +19 -9
  57. package/server/Alert.d.ts.map +1 -1
  58. package/server/Alert.js.map +1 -1
  59. package/server/Alert.mjs +28 -10
  60. package/server/AlpacaAccount.d.ts +19 -9
  61. package/server/AlpacaAccount.d.ts.map +1 -1
  62. package/server/AlpacaAccount.js.map +1 -1
  63. package/server/AlpacaAccount.mjs +28 -10
  64. package/server/Asset.d.ts +19 -9
  65. package/server/Asset.d.ts.map +1 -1
  66. package/server/Asset.js.map +1 -1
  67. package/server/Asset.mjs +28 -10
  68. package/server/Authenticator.d.ts +19 -9
  69. package/server/Authenticator.d.ts.map +1 -1
  70. package/server/Authenticator.js.map +1 -1
  71. package/server/Authenticator.mjs +28 -10
  72. package/server/Contract.d.ts +19 -9
  73. package/server/Contract.d.ts.map +1 -1
  74. package/server/Contract.js.map +1 -1
  75. package/server/Contract.mjs +28 -10
  76. package/server/Customer.d.ts +19 -9
  77. package/server/Customer.d.ts.map +1 -1
  78. package/server/Customer.js.map +1 -1
  79. package/server/Customer.mjs +28 -10
  80. package/server/Deliverable.d.ts +19 -9
  81. package/server/Deliverable.d.ts.map +1 -1
  82. package/server/Deliverable.js.map +1 -1
  83. package/server/Deliverable.mjs +28 -10
  84. package/server/EconomicEvent.d.ts +19 -9
  85. package/server/EconomicEvent.d.ts.map +1 -1
  86. package/server/EconomicEvent.js.map +1 -1
  87. package/server/EconomicEvent.mjs +28 -10
  88. package/server/MarketSentiment.d.ts +19 -9
  89. package/server/MarketSentiment.d.ts.map +1 -1
  90. package/server/MarketSentiment.js.map +1 -1
  91. package/server/MarketSentiment.mjs +28 -10
  92. package/server/NewsArticle.d.ts +19 -9
  93. package/server/NewsArticle.d.ts.map +1 -1
  94. package/server/NewsArticle.js.map +1 -1
  95. package/server/NewsArticle.mjs +28 -10
  96. package/server/NewsArticleAssetSentiment.d.ts +19 -9
  97. package/server/NewsArticleAssetSentiment.d.ts.map +1 -1
  98. package/server/NewsArticleAssetSentiment.js.map +1 -1
  99. package/server/NewsArticleAssetSentiment.mjs +28 -10
  100. package/server/Order.d.ts +19 -9
  101. package/server/Order.d.ts.map +1 -1
  102. package/server/Order.js.map +1 -1
  103. package/server/Order.mjs +28 -10
  104. package/server/Position.d.ts +19 -9
  105. package/server/Position.d.ts.map +1 -1
  106. package/server/Position.js.map +1 -1
  107. package/server/Position.mjs +28 -10
  108. package/server/ScheduledOptionOrder.d.ts +19 -9
  109. package/server/ScheduledOptionOrder.d.ts.map +1 -1
  110. package/server/ScheduledOptionOrder.js.map +1 -1
  111. package/server/ScheduledOptionOrder.mjs +28 -10
  112. package/server/Session.d.ts +19 -9
  113. package/server/Session.d.ts.map +1 -1
  114. package/server/Session.js.map +1 -1
  115. package/server/Session.mjs +28 -10
  116. package/server/StopLoss.d.ts +19 -9
  117. package/server/StopLoss.d.ts.map +1 -1
  118. package/server/StopLoss.js.map +1 -1
  119. package/server/StopLoss.mjs +28 -10
  120. package/server/TakeProfit.d.ts +19 -9
  121. package/server/TakeProfit.d.ts.map +1 -1
  122. package/server/TakeProfit.js.map +1 -1
  123. package/server/TakeProfit.mjs +28 -10
  124. package/server/Trade.d.ts +19 -9
  125. package/server/Trade.d.ts.map +1 -1
  126. package/server/Trade.js.map +1 -1
  127. package/server/Trade.mjs +28 -10
  128. package/server/User.d.ts +19 -9
  129. package/server/User.d.ts.map +1 -1
  130. package/server/User.js.map +1 -1
  131. package/server/User.mjs +28 -10
  132. package/server/VerificationToken.d.ts +19 -9
  133. package/server/VerificationToken.d.ts.map +1 -1
  134. package/server/VerificationToken.js.map +1 -1
  135. package/server/VerificationToken.mjs +28 -10
  136. package/server/client.d.ts.map +1 -1
  137. package/server/client.js.map +1 -1
  138. package/server/client.mjs +0 -1
  139. package/server/index.d.ts +198 -198
package/Asset.cjs CHANGED
@@ -73,9 +73,11 @@ exports.Asset = {
73
73
  /**
74
74
  * Create a new Asset record.
75
75
  * @param props - Properties for the new record.
76
+ * @param client - Apollo Client instance.
76
77
  * @returns The created Asset or null.
77
78
  */
78
- async create(props) {
79
+ async create(props, globalClient) {
80
+ const client = globalClient || client_2.client;
79
81
  const CREATE_ONE_ASSET = (0, client_1.gql) `
80
82
  mutation createOneAsset($data: AssetCreateInput!) {
81
83
  createOneAsset(data: $data) {
@@ -1299,7 +1301,7 @@ exports.Asset = {
1299
1301
  };
1300
1302
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
1301
1303
  try {
1302
- const response = await client_2.client.mutate({ mutation: CREATE_ONE_ASSET, variables: filteredVariables });
1304
+ const response = await client.mutate({ mutation: CREATE_ONE_ASSET, variables: filteredVariables });
1303
1305
  if (response.errors && response.errors.length > 0)
1304
1306
  throw new Error(response.errors[0].message);
1305
1307
  if (response && response.data && response.data.createOneAsset) {
@@ -1317,9 +1319,11 @@ exports.Asset = {
1317
1319
  /**
1318
1320
  * Create multiple Asset records.
1319
1321
  * @param props - Array of Asset objects for the new records.
1322
+ * @param globalClient - Apollo Client instance.
1320
1323
  * @returns The count of created records or null.
1321
1324
  */
1322
- async createMany(props) {
1325
+ async createMany(props, globalClient) {
1326
+ const client = globalClient || client_2.client;
1323
1327
  const CREATE_MANY_ASSET = (0, client_1.gql) `
1324
1328
  mutation createManyAsset($data: [AssetCreateManyInput!]!) {
1325
1329
  createManyAsset(data: $data) {
@@ -1387,7 +1391,7 @@ exports.Asset = {
1387
1391
  };
1388
1392
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
1389
1393
  try {
1390
- const response = await client_2.client.mutate({ mutation: CREATE_MANY_ASSET, variables: filteredVariables });
1394
+ const response = await client.mutate({ mutation: CREATE_MANY_ASSET, variables: filteredVariables });
1391
1395
  if (response.errors && response.errors.length > 0)
1392
1396
  throw new Error(response.errors[0].message);
1393
1397
  if (response && response.data && response.data.createManyAsset) {
@@ -1405,9 +1409,11 @@ exports.Asset = {
1405
1409
  /**
1406
1410
  * Update a single Asset record.
1407
1411
  * @param props - Properties to update.
1412
+ * @param globalClient - Apollo Client instance.
1408
1413
  * @returns The updated Asset or null.
1409
1414
  */
1410
- async update(props) {
1415
+ async update(props, globalClient) {
1416
+ const client = globalClient || client_2.client;
1411
1417
  const UPDATE_ONE_ASSET = (0, client_1.gql) `
1412
1418
  mutation updateOneAsset($data: AssetUpdateInput!, $where: AssetWhereUniqueInput!) {
1413
1419
  updateOneAsset(data: $data, where: $where) {
@@ -6241,7 +6247,7 @@ exports.Asset = {
6241
6247
  };
6242
6248
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
6243
6249
  try {
6244
- const response = await client_2.client.mutate({ mutation: UPDATE_ONE_ASSET, variables: filteredVariables });
6250
+ const response = await client.mutate({ mutation: UPDATE_ONE_ASSET, variables: filteredVariables });
6245
6251
  if (response.errors && response.errors.length > 0)
6246
6252
  throw new Error(response.errors[0].message);
6247
6253
  if (response && response.data && response.data.updateOneAsset) {
@@ -6259,9 +6265,11 @@ exports.Asset = {
6259
6265
  /**
6260
6266
  * Upsert a single Asset record.
6261
6267
  * @param props - Properties to update.
6268
+ * @param globalClient - Apollo Client instance.
6262
6269
  * @returns The updated Asset or null.
6263
6270
  */
6264
- async upsert(props) {
6271
+ async upsert(props, globalClient) {
6272
+ const client = globalClient || client_2.client;
6265
6273
  const UPSERT_ONE_ASSET = (0, client_1.gql) `
6266
6274
  mutation upsertOneAsset($where: AssetWhereUniqueInput!, $create: AssetCreateInput!, $update: AssetUpdateInput!) {
6267
6275
  upsertOneAsset(where: $where, create: $create, update: $update) {
@@ -12298,7 +12306,7 @@ exports.Asset = {
12298
12306
  };
12299
12307
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
12300
12308
  try {
12301
- const response = await client_2.client.mutate({ mutation: UPSERT_ONE_ASSET, variables: filteredVariables });
12309
+ const response = await client.mutate({ mutation: UPSERT_ONE_ASSET, variables: filteredVariables });
12302
12310
  if (response.errors && response.errors.length > 0)
12303
12311
  throw new Error(response.errors[0].message);
12304
12312
  if (response && response.data && response.data.upsertOneAsset) {
@@ -12316,9 +12324,11 @@ exports.Asset = {
12316
12324
  /**
12317
12325
  * Update multiple Asset records.
12318
12326
  * @param props - Array of Asset objects for the updated records.
12327
+ * @param globalClient - Apollo Client instance.
12319
12328
  * @returns The count of created records or null.
12320
12329
  */
12321
- async updateMany(props) {
12330
+ async updateMany(props, globalClient) {
12331
+ const client = globalClient || client_2.client;
12322
12332
  const UPDATE_MANY_ASSET = (0, client_1.gql) `
12323
12333
  mutation updateManyAsset($data: [AssetCreateManyInput!]!) {
12324
12334
  updateManyAsset(data: $data) {
@@ -17152,7 +17162,7 @@ exports.Asset = {
17152
17162
  }));
17153
17163
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
17154
17164
  try {
17155
- const response = await client_2.client.mutate({ mutation: UPDATE_MANY_ASSET, variables: filteredVariables });
17165
+ const response = await client.mutate({ mutation: UPDATE_MANY_ASSET, variables: filteredVariables });
17156
17166
  if (response.errors && response.errors.length > 0)
17157
17167
  throw new Error(response.errors[0].message);
17158
17168
  if (response && response.data && response.data.updateManyAsset) {
@@ -17170,9 +17180,11 @@ exports.Asset = {
17170
17180
  /**
17171
17181
  * Delete a single Asset record.
17172
17182
  * @param props - Properties to update.
17183
+ * @param globalClient - Apollo Client instance.
17173
17184
  * @returns The deleted Asset or null.
17174
17185
  */
17175
- async delete(props) {
17186
+ async delete(props, globalClient) {
17187
+ const client = globalClient || client_2.client;
17176
17188
  const DELETE_ONE_ASSET = (0, client_1.gql) `
17177
17189
  mutation deleteOneAsset($where: AssetWhereUniqueInput!) {
17178
17190
  deleteOneAsset(where: $where) {
@@ -17186,7 +17198,7 @@ exports.Asset = {
17186
17198
  };
17187
17199
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
17188
17200
  try {
17189
- const response = await client_2.client.mutate({ mutation: DELETE_ONE_ASSET, variables: filteredVariables });
17201
+ const response = await client.mutate({ mutation: DELETE_ONE_ASSET, variables: filteredVariables });
17190
17202
  if (response.errors && response.errors.length > 0)
17191
17203
  throw new Error(response.errors[0].message);
17192
17204
  if (response && response.data && response.data.deleteOneAsset) {
@@ -17204,10 +17216,12 @@ exports.Asset = {
17204
17216
  /**
17205
17217
  * Retrieve a single Asset record by ID.
17206
17218
  * @param props - Properties to update.
17219
+ * @param globalClient - Apollo Client instance.
17207
17220
  * @returns The retrieved Asset or null.
17208
17221
  */
17209
- async get(props) {
17222
+ async get(props, globalClient) {
17210
17223
  var _a, _b;
17224
+ const client = globalClient || client_2.client;
17211
17225
  const GET_ASSET = (0, client_1.gql) `
17212
17226
  query getAsset($where: AssetWhereUniqueInput!) {
17213
17227
  getAsset(where: $where) {
@@ -17223,7 +17237,7 @@ exports.Asset = {
17223
17237
  };
17224
17238
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
17225
17239
  try {
17226
- const response = await client_2.client.query({ query: GET_ASSET, variables: filteredVariables });
17240
+ const response = await client.query({ query: GET_ASSET, variables: filteredVariables });
17227
17241
  if (response.errors && response.errors.length > 0)
17228
17242
  throw new Error(response.errors[0].message);
17229
17243
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.getAsset) !== null && _b !== void 0 ? _b : null;
@@ -17240,10 +17254,12 @@ exports.Asset = {
17240
17254
  },
17241
17255
  /**
17242
17256
  * Retrieve all Assets records.
17257
+ * @param globalClient - Apollo Client instance.
17243
17258
  * @returns An array of Asset records or null.
17244
17259
  */
17245
- async getAll() {
17260
+ async getAll(globalClient) {
17246
17261
  var _a, _b;
17262
+ const client = globalClient || client_2.client;
17247
17263
  const GET_ALL_ASSET = (0, client_1.gql) `
17248
17264
  query getAllAsset {
17249
17265
  assets {
@@ -17251,7 +17267,7 @@ exports.Asset = {
17251
17267
  }
17252
17268
  }`;
17253
17269
  try {
17254
- const response = await client_2.client.query({ query: GET_ALL_ASSET });
17270
+ const response = await client.query({ query: GET_ALL_ASSET });
17255
17271
  if (response.errors && response.errors.length > 0)
17256
17272
  throw new Error(response.errors[0].message);
17257
17273
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.assets) !== null && _b !== void 0 ? _b : null;
@@ -17269,9 +17285,11 @@ exports.Asset = {
17269
17285
  /**
17270
17286
  * Find multiple Asset records based on conditions.
17271
17287
  * @param props - Conditions to find records.
17288
+ * @param globalClient - Apollo Client instance.
17272
17289
  * @returns An array of found Asset records or null.
17273
17290
  */
17274
- async findMany(props) {
17291
+ async findMany(props, globalClient) {
17292
+ const client = globalClient || client_2.client;
17275
17293
  const FIND_MANY_ASSET = (0, client_1.gql) `
17276
17294
  query findManyAsset($where: AssetWhereInput!) {
17277
17295
  assets(where: $where) {
@@ -17293,7 +17311,7 @@ exports.Asset = {
17293
17311
  };
17294
17312
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
17295
17313
  try {
17296
- const response = await client_2.client.query({ query: FIND_MANY_ASSET, variables: filteredVariables });
17314
+ const response = await client.query({ query: FIND_MANY_ASSET, variables: filteredVariables });
17297
17315
  if (response.errors && response.errors.length > 0)
17298
17316
  throw new Error(response.errors[0].message);
17299
17317
  if (response && response.data && response.data.Assets) {
package/Asset.d.ts CHANGED
@@ -1,61 +1,71 @@
1
1
  import { Asset as AssetType } from './generated/typegraphql-prisma/models/Asset';
2
+ import { ApolloClient } from '@apollo/client';
2
3
  export declare const Asset: {
3
4
  /**
4
5
  * Create a new Asset record.
5
6
  * @param props - Properties for the new record.
7
+ * @param client - Apollo Client instance.
6
8
  * @returns The created Asset or null.
7
9
  */
8
- create(props: AssetType): Promise<AssetType>;
10
+ create(props: AssetType, globalClient?: ApolloClient<any>): Promise<AssetType>;
9
11
  /**
10
12
  * Create multiple Asset records.
11
13
  * @param props - Array of Asset objects for the new records.
14
+ * @param globalClient - Apollo Client instance.
12
15
  * @returns The count of created records or null.
13
16
  */
14
- createMany(props: AssetType[]): Promise<{
17
+ createMany(props: AssetType[], globalClient?: ApolloClient<any>): Promise<{
15
18
  count: number;
16
19
  } | null>;
17
20
  /**
18
21
  * Update a single Asset record.
19
22
  * @param props - Properties to update.
23
+ * @param globalClient - Apollo Client instance.
20
24
  * @returns The updated Asset or null.
21
25
  */
22
- update(props: AssetType): Promise<AssetType>;
26
+ update(props: AssetType, globalClient?: ApolloClient<any>): Promise<AssetType>;
23
27
  /**
24
28
  * Upsert a single Asset record.
25
29
  * @param props - Properties to update.
30
+ * @param globalClient - Apollo Client instance.
26
31
  * @returns The updated Asset or null.
27
32
  */
28
- upsert(props: AssetType): Promise<AssetType>;
33
+ upsert(props: AssetType, globalClient?: ApolloClient<any>): Promise<AssetType>;
29
34
  /**
30
35
  * Update multiple Asset records.
31
36
  * @param props - Array of Asset objects for the updated records.
37
+ * @param globalClient - Apollo Client instance.
32
38
  * @returns The count of created records or null.
33
39
  */
34
- updateMany(props: AssetType[]): Promise<{
40
+ updateMany(props: AssetType[], globalClient?: ApolloClient<any>): Promise<{
35
41
  count: number;
36
42
  } | null>;
37
43
  /**
38
44
  * Delete a single Asset record.
39
45
  * @param props - Properties to update.
46
+ * @param globalClient - Apollo Client instance.
40
47
  * @returns The deleted Asset or null.
41
48
  */
42
- delete(props: AssetType): Promise<AssetType>;
49
+ delete(props: AssetType, globalClient?: ApolloClient<any>): Promise<AssetType>;
43
50
  /**
44
51
  * Retrieve a single Asset record by ID.
45
52
  * @param props - Properties to update.
53
+ * @param globalClient - Apollo Client instance.
46
54
  * @returns The retrieved Asset or null.
47
55
  */
48
- get(props: AssetType): Promise<AssetType | null>;
56
+ get(props: AssetType, globalClient?: ApolloClient<any>): Promise<AssetType | null>;
49
57
  /**
50
58
  * Retrieve all Assets records.
59
+ * @param globalClient - Apollo Client instance.
51
60
  * @returns An array of Asset records or null.
52
61
  */
53
- getAll(): Promise<AssetType[] | null>;
62
+ getAll(globalClient?: ApolloClient<any>): Promise<AssetType[] | null>;
54
63
  /**
55
64
  * Find multiple Asset records based on conditions.
56
65
  * @param props - Conditions to find records.
66
+ * @param globalClient - Apollo Client instance.
57
67
  * @returns An array of found Asset records or null.
58
68
  */
59
- findMany(props: AssetType): Promise<AssetType[] | null>;
69
+ findMany(props: AssetType, globalClient?: ApolloClient<any>): Promise<AssetType[] | null>;
60
70
  };
61
71
  //# sourceMappingURL=Asset.d.ts.map
package/Authenticator.cjs CHANGED
@@ -192,9 +192,11 @@ exports.Authenticator = {
192
192
  /**
193
193
  * Create a new Authenticator record.
194
194
  * @param props - Properties for the new record.
195
+ * @param client - Apollo Client instance.
195
196
  * @returns The created Authenticator or null.
196
197
  */
197
- async create(props) {
198
+ async create(props, globalClient) {
199
+ const client = globalClient || client_2.client;
198
200
  const CREATE_ONE_AUTHENTICATOR = (0, client_1.gql) `
199
201
  mutation createOneAuthenticator($data: AuthenticatorCreateInput!) {
200
202
  createOneAuthenticator(data: $data) {
@@ -472,7 +474,7 @@ exports.Authenticator = {
472
474
  };
473
475
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
474
476
  try {
475
- const response = await client_2.client.mutate({ mutation: CREATE_ONE_AUTHENTICATOR, variables: filteredVariables });
477
+ const response = await client.mutate({ mutation: CREATE_ONE_AUTHENTICATOR, variables: filteredVariables });
476
478
  if (response.errors && response.errors.length > 0)
477
479
  throw new Error(response.errors[0].message);
478
480
  if (response && response.data && response.data.createOneAuthenticator) {
@@ -490,9 +492,11 @@ exports.Authenticator = {
490
492
  /**
491
493
  * Create multiple Authenticator records.
492
494
  * @param props - Array of Authenticator objects for the new records.
495
+ * @param globalClient - Apollo Client instance.
493
496
  * @returns The count of created records or null.
494
497
  */
495
- async createMany(props) {
498
+ async createMany(props, globalClient) {
499
+ const client = globalClient || client_2.client;
496
500
  const CREATE_MANY_AUTHENTICATOR = (0, client_1.gql) `
497
501
  mutation createManyAuthenticator($data: [AuthenticatorCreateManyInput!]!) {
498
502
  createManyAuthenticator(data: $data) {
@@ -509,7 +513,7 @@ exports.Authenticator = {
509
513
  };
510
514
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
511
515
  try {
512
- const response = await client_2.client.mutate({ mutation: CREATE_MANY_AUTHENTICATOR, variables: filteredVariables });
516
+ const response = await client.mutate({ mutation: CREATE_MANY_AUTHENTICATOR, variables: filteredVariables });
513
517
  if (response.errors && response.errors.length > 0)
514
518
  throw new Error(response.errors[0].message);
515
519
  if (response && response.data && response.data.createManyAuthenticator) {
@@ -527,9 +531,11 @@ exports.Authenticator = {
527
531
  /**
528
532
  * Update a single Authenticator record.
529
533
  * @param props - Properties to update.
534
+ * @param globalClient - Apollo Client instance.
530
535
  * @returns The updated Authenticator or null.
531
536
  */
532
- async update(props) {
537
+ async update(props, globalClient) {
538
+ const client = globalClient || client_2.client;
533
539
  const UPDATE_ONE_AUTHENTICATOR = (0, client_1.gql) `
534
540
  mutation updateOneAuthenticator($data: AuthenticatorUpdateInput!, $where: AuthenticatorWhereUniqueInput!) {
535
541
  updateOneAuthenticator(data: $data, where: $where) {
@@ -1520,7 +1526,7 @@ exports.Authenticator = {
1520
1526
  };
1521
1527
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
1522
1528
  try {
1523
- const response = await client_2.client.mutate({ mutation: UPDATE_ONE_AUTHENTICATOR, variables: filteredVariables });
1529
+ const response = await client.mutate({ mutation: UPDATE_ONE_AUTHENTICATOR, variables: filteredVariables });
1524
1530
  if (response.errors && response.errors.length > 0)
1525
1531
  throw new Error(response.errors[0].message);
1526
1532
  if (response && response.data && response.data.updateOneAuthenticator) {
@@ -1538,9 +1544,11 @@ exports.Authenticator = {
1538
1544
  /**
1539
1545
  * Upsert a single Authenticator record.
1540
1546
  * @param props - Properties to update.
1547
+ * @param globalClient - Apollo Client instance.
1541
1548
  * @returns The updated Authenticator or null.
1542
1549
  */
1543
- async upsert(props) {
1550
+ async upsert(props, globalClient) {
1551
+ const client = globalClient || client_2.client;
1544
1552
  const UPSERT_ONE_AUTHENTICATOR = (0, client_1.gql) `
1545
1553
  mutation upsertOneAuthenticator($where: AuthenticatorWhereUniqueInput!, $create: AuthenticatorCreateInput!, $update: AuthenticatorUpdateInput!) {
1546
1554
  upsertOneAuthenticator(where: $where, create: $create, update: $update) {
@@ -2788,7 +2796,7 @@ exports.Authenticator = {
2788
2796
  };
2789
2797
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
2790
2798
  try {
2791
- const response = await client_2.client.mutate({ mutation: UPSERT_ONE_AUTHENTICATOR, variables: filteredVariables });
2799
+ const response = await client.mutate({ mutation: UPSERT_ONE_AUTHENTICATOR, variables: filteredVariables });
2792
2800
  if (response.errors && response.errors.length > 0)
2793
2801
  throw new Error(response.errors[0].message);
2794
2802
  if (response && response.data && response.data.upsertOneAuthenticator) {
@@ -2806,9 +2814,11 @@ exports.Authenticator = {
2806
2814
  /**
2807
2815
  * Update multiple Authenticator records.
2808
2816
  * @param props - Array of Authenticator objects for the updated records.
2817
+ * @param globalClient - Apollo Client instance.
2809
2818
  * @returns The count of created records or null.
2810
2819
  */
2811
- async updateMany(props) {
2820
+ async updateMany(props, globalClient) {
2821
+ const client = globalClient || client_2.client;
2812
2822
  const UPDATE_MANY_AUTHENTICATOR = (0, client_1.gql) `
2813
2823
  mutation updateManyAuthenticator($data: [AuthenticatorCreateManyInput!]!) {
2814
2824
  updateManyAuthenticator(data: $data) {
@@ -3799,7 +3809,7 @@ exports.Authenticator = {
3799
3809
  }));
3800
3810
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
3801
3811
  try {
3802
- const response = await client_2.client.mutate({ mutation: UPDATE_MANY_AUTHENTICATOR, variables: filteredVariables });
3812
+ const response = await client.mutate({ mutation: UPDATE_MANY_AUTHENTICATOR, variables: filteredVariables });
3803
3813
  if (response.errors && response.errors.length > 0)
3804
3814
  throw new Error(response.errors[0].message);
3805
3815
  if (response && response.data && response.data.updateManyAuthenticator) {
@@ -3817,9 +3827,11 @@ exports.Authenticator = {
3817
3827
  /**
3818
3828
  * Delete a single Authenticator record.
3819
3829
  * @param props - Properties to update.
3830
+ * @param globalClient - Apollo Client instance.
3820
3831
  * @returns The deleted Authenticator or null.
3821
3832
  */
3822
- async delete(props) {
3833
+ async delete(props, globalClient) {
3834
+ const client = globalClient || client_2.client;
3823
3835
  const DELETE_ONE_AUTHENTICATOR = (0, client_1.gql) `
3824
3836
  mutation deleteOneAuthenticator($where: AuthenticatorWhereUniqueInput!) {
3825
3837
  deleteOneAuthenticator(where: $where) {
@@ -3833,7 +3845,7 @@ exports.Authenticator = {
3833
3845
  };
3834
3846
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
3835
3847
  try {
3836
- const response = await client_2.client.mutate({ mutation: DELETE_ONE_AUTHENTICATOR, variables: filteredVariables });
3848
+ const response = await client.mutate({ mutation: DELETE_ONE_AUTHENTICATOR, variables: filteredVariables });
3837
3849
  if (response.errors && response.errors.length > 0)
3838
3850
  throw new Error(response.errors[0].message);
3839
3851
  if (response && response.data && response.data.deleteOneAuthenticator) {
@@ -3851,10 +3863,12 @@ exports.Authenticator = {
3851
3863
  /**
3852
3864
  * Retrieve a single Authenticator record by ID.
3853
3865
  * @param props - Properties to update.
3866
+ * @param globalClient - Apollo Client instance.
3854
3867
  * @returns The retrieved Authenticator or null.
3855
3868
  */
3856
- async get(props) {
3869
+ async get(props, globalClient) {
3857
3870
  var _a, _b;
3871
+ const client = globalClient || client_2.client;
3858
3872
  const GET_AUTHENTICATOR = (0, client_1.gql) `
3859
3873
  query getAuthenticator($where: AuthenticatorWhereUniqueInput!) {
3860
3874
  getAuthenticator(where: $where) {
@@ -3871,7 +3885,7 @@ exports.Authenticator = {
3871
3885
  };
3872
3886
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
3873
3887
  try {
3874
- const response = await client_2.client.query({ query: GET_AUTHENTICATOR, variables: filteredVariables });
3888
+ const response = await client.query({ query: GET_AUTHENTICATOR, variables: filteredVariables });
3875
3889
  if (response.errors && response.errors.length > 0)
3876
3890
  throw new Error(response.errors[0].message);
3877
3891
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.getAuthenticator) !== null && _b !== void 0 ? _b : null;
@@ -3888,10 +3902,12 @@ exports.Authenticator = {
3888
3902
  },
3889
3903
  /**
3890
3904
  * Retrieve all Authenticators records.
3905
+ * @param globalClient - Apollo Client instance.
3891
3906
  * @returns An array of Authenticator records or null.
3892
3907
  */
3893
- async getAll() {
3908
+ async getAll(globalClient) {
3894
3909
  var _a, _b;
3910
+ const client = globalClient || client_2.client;
3895
3911
  const GET_ALL_AUTHENTICATOR = (0, client_1.gql) `
3896
3912
  query getAllAuthenticator {
3897
3913
  authenticators {
@@ -3899,7 +3915,7 @@ exports.Authenticator = {
3899
3915
  }
3900
3916
  }`;
3901
3917
  try {
3902
- const response = await client_2.client.query({ query: GET_ALL_AUTHENTICATOR });
3918
+ const response = await client.query({ query: GET_ALL_AUTHENTICATOR });
3903
3919
  if (response.errors && response.errors.length > 0)
3904
3920
  throw new Error(response.errors[0].message);
3905
3921
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.authenticators) !== null && _b !== void 0 ? _b : null;
@@ -3917,9 +3933,11 @@ exports.Authenticator = {
3917
3933
  /**
3918
3934
  * Find multiple Authenticator records based on conditions.
3919
3935
  * @param props - Conditions to find records.
3936
+ * @param globalClient - Apollo Client instance.
3920
3937
  * @returns An array of found Authenticator records or null.
3921
3938
  */
3922
- async findMany(props) {
3939
+ async findMany(props, globalClient) {
3940
+ const client = globalClient || client_2.client;
3923
3941
  const FIND_MANY_AUTHENTICATOR = (0, client_1.gql) `
3924
3942
  query findManyAuthenticator($where: AuthenticatorWhereInput!) {
3925
3943
  authenticators(where: $where) {
@@ -3938,7 +3956,7 @@ exports.Authenticator = {
3938
3956
  };
3939
3957
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
3940
3958
  try {
3941
- const response = await client_2.client.query({ query: FIND_MANY_AUTHENTICATOR, variables: filteredVariables });
3959
+ const response = await client.query({ query: FIND_MANY_AUTHENTICATOR, variables: filteredVariables });
3942
3960
  if (response.errors && response.errors.length > 0)
3943
3961
  throw new Error(response.errors[0].message);
3944
3962
  if (response && response.data && response.data.Authenticators) {
@@ -1,61 +1,71 @@
1
1
  import { Authenticator as AuthenticatorType } from './generated/typegraphql-prisma/models/Authenticator';
2
+ import { ApolloClient } from '@apollo/client';
2
3
  export declare const Authenticator: {
3
4
  /**
4
5
  * Create a new Authenticator record.
5
6
  * @param props - Properties for the new record.
7
+ * @param client - Apollo Client instance.
6
8
  * @returns The created Authenticator or null.
7
9
  */
8
- create(props: AuthenticatorType): Promise<AuthenticatorType>;
10
+ create(props: AuthenticatorType, globalClient?: ApolloClient<any>): Promise<AuthenticatorType>;
9
11
  /**
10
12
  * Create multiple Authenticator records.
11
13
  * @param props - Array of Authenticator objects for the new records.
14
+ * @param globalClient - Apollo Client instance.
12
15
  * @returns The count of created records or null.
13
16
  */
14
- createMany(props: AuthenticatorType[]): Promise<{
17
+ createMany(props: AuthenticatorType[], globalClient?: ApolloClient<any>): Promise<{
15
18
  count: number;
16
19
  } | null>;
17
20
  /**
18
21
  * Update a single Authenticator record.
19
22
  * @param props - Properties to update.
23
+ * @param globalClient - Apollo Client instance.
20
24
  * @returns The updated Authenticator or null.
21
25
  */
22
- update(props: AuthenticatorType): Promise<AuthenticatorType>;
26
+ update(props: AuthenticatorType, globalClient?: ApolloClient<any>): Promise<AuthenticatorType>;
23
27
  /**
24
28
  * Upsert a single Authenticator record.
25
29
  * @param props - Properties to update.
30
+ * @param globalClient - Apollo Client instance.
26
31
  * @returns The updated Authenticator or null.
27
32
  */
28
- upsert(props: AuthenticatorType): Promise<AuthenticatorType>;
33
+ upsert(props: AuthenticatorType, globalClient?: ApolloClient<any>): Promise<AuthenticatorType>;
29
34
  /**
30
35
  * Update multiple Authenticator records.
31
36
  * @param props - Array of Authenticator objects for the updated records.
37
+ * @param globalClient - Apollo Client instance.
32
38
  * @returns The count of created records or null.
33
39
  */
34
- updateMany(props: AuthenticatorType[]): Promise<{
40
+ updateMany(props: AuthenticatorType[], globalClient?: ApolloClient<any>): Promise<{
35
41
  count: number;
36
42
  } | null>;
37
43
  /**
38
44
  * Delete a single Authenticator record.
39
45
  * @param props - Properties to update.
46
+ * @param globalClient - Apollo Client instance.
40
47
  * @returns The deleted Authenticator or null.
41
48
  */
42
- delete(props: AuthenticatorType): Promise<AuthenticatorType>;
49
+ delete(props: AuthenticatorType, globalClient?: ApolloClient<any>): Promise<AuthenticatorType>;
43
50
  /**
44
51
  * Retrieve a single Authenticator record by ID.
45
52
  * @param props - Properties to update.
53
+ * @param globalClient - Apollo Client instance.
46
54
  * @returns The retrieved Authenticator or null.
47
55
  */
48
- get(props: AuthenticatorType): Promise<AuthenticatorType | null>;
56
+ get(props: AuthenticatorType, globalClient?: ApolloClient<any>): Promise<AuthenticatorType | null>;
49
57
  /**
50
58
  * Retrieve all Authenticators records.
59
+ * @param globalClient - Apollo Client instance.
51
60
  * @returns An array of Authenticator records or null.
52
61
  */
53
- getAll(): Promise<AuthenticatorType[] | null>;
62
+ getAll(globalClient?: ApolloClient<any>): Promise<AuthenticatorType[] | null>;
54
63
  /**
55
64
  * Find multiple Authenticator records based on conditions.
56
65
  * @param props - Conditions to find records.
66
+ * @param globalClient - Apollo Client instance.
57
67
  * @returns An array of found Authenticator records or null.
58
68
  */
59
- findMany(props: AuthenticatorType): Promise<AuthenticatorType[] | null>;
69
+ findMany(props: AuthenticatorType, globalClient?: ApolloClient<any>): Promise<AuthenticatorType[] | null>;
60
70
  };
61
71
  //# sourceMappingURL=Authenticator.d.ts.map