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/Alert.cjs CHANGED
@@ -22,9 +22,11 @@ exports.Alert = {
22
22
  /**
23
23
  * Create a new Alert record.
24
24
  * @param props - Properties for the new record.
25
+ * @param client - Apollo Client instance.
25
26
  * @returns The created Alert or null.
26
27
  */
27
- async create(props) {
28
+ async create(props, globalClient) {
29
+ const client = globalClient || client_2.client;
28
30
  const CREATE_ONE_ALERT = (0, client_1.gql) `
29
31
  mutation createOneAlert($data: AlertCreateInput!) {
30
32
  createOneAlert(data: $data) {
@@ -635,7 +637,7 @@ exports.Alert = {
635
637
  };
636
638
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
637
639
  try {
638
- const response = await client_2.client.mutate({ mutation: CREATE_ONE_ALERT, variables: filteredVariables });
640
+ const response = await client.mutate({ mutation: CREATE_ONE_ALERT, variables: filteredVariables });
639
641
  if (response.errors && response.errors.length > 0)
640
642
  throw new Error(response.errors[0].message);
641
643
  if (response && response.data && response.data.createOneAlert) {
@@ -653,9 +655,11 @@ exports.Alert = {
653
655
  /**
654
656
  * Create multiple Alert records.
655
657
  * @param props - Array of Alert objects for the new records.
658
+ * @param globalClient - Apollo Client instance.
656
659
  * @returns The count of created records or null.
657
660
  */
658
- async createMany(props) {
661
+ async createMany(props, globalClient) {
662
+ const client = globalClient || client_2.client;
659
663
  const CREATE_MANY_ALERT = (0, client_1.gql) `
660
664
  mutation createManyAlert($data: [AlertCreateManyInput!]!) {
661
665
  createManyAlert(data: $data) {
@@ -672,7 +676,7 @@ exports.Alert = {
672
676
  };
673
677
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
674
678
  try {
675
- const response = await client_2.client.mutate({ mutation: CREATE_MANY_ALERT, variables: filteredVariables });
679
+ const response = await client.mutate({ mutation: CREATE_MANY_ALERT, variables: filteredVariables });
676
680
  if (response.errors && response.errors.length > 0)
677
681
  throw new Error(response.errors[0].message);
678
682
  if (response && response.data && response.data.createManyAlert) {
@@ -690,9 +694,11 @@ exports.Alert = {
690
694
  /**
691
695
  * Update a single Alert record.
692
696
  * @param props - Properties to update.
697
+ * @param globalClient - Apollo Client instance.
693
698
  * @returns The updated Alert or null.
694
699
  */
695
- async update(props) {
700
+ async update(props, globalClient) {
701
+ const client = globalClient || client_2.client;
696
702
  const UPDATE_ONE_ALERT = (0, client_1.gql) `
697
703
  mutation updateOneAlert($data: AlertUpdateInput!, $where: AlertWhereUniqueInput!) {
698
704
  updateOneAlert(data: $data, where: $where) {
@@ -3340,7 +3346,7 @@ exports.Alert = {
3340
3346
  };
3341
3347
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
3342
3348
  try {
3343
- const response = await client_2.client.mutate({ mutation: UPDATE_ONE_ALERT, variables: filteredVariables });
3349
+ const response = await client.mutate({ mutation: UPDATE_ONE_ALERT, variables: filteredVariables });
3344
3350
  if (response.errors && response.errors.length > 0)
3345
3351
  throw new Error(response.errors[0].message);
3346
3352
  if (response && response.data && response.data.updateOneAlert) {
@@ -3358,9 +3364,11 @@ exports.Alert = {
3358
3364
  /**
3359
3365
  * Upsert a single Alert record.
3360
3366
  * @param props - Properties to update.
3367
+ * @param globalClient - Apollo Client instance.
3361
3368
  * @returns The updated Alert or null.
3362
3369
  */
3363
- async upsert(props) {
3370
+ async upsert(props, globalClient) {
3371
+ const client = globalClient || client_2.client;
3364
3372
  const UPSERT_ONE_ALERT = (0, client_1.gql) `
3365
3373
  mutation upsertOneAlert($where: AlertWhereUniqueInput!, $create: AlertCreateInput!, $update: AlertUpdateInput!) {
3366
3374
  upsertOneAlert(where: $where, create: $create, update: $update) {
@@ -6598,7 +6606,7 @@ exports.Alert = {
6598
6606
  };
6599
6607
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
6600
6608
  try {
6601
- const response = await client_2.client.mutate({ mutation: UPSERT_ONE_ALERT, variables: filteredVariables });
6609
+ const response = await client.mutate({ mutation: UPSERT_ONE_ALERT, variables: filteredVariables });
6602
6610
  if (response.errors && response.errors.length > 0)
6603
6611
  throw new Error(response.errors[0].message);
6604
6612
  if (response && response.data && response.data.upsertOneAlert) {
@@ -6616,9 +6624,11 @@ exports.Alert = {
6616
6624
  /**
6617
6625
  * Update multiple Alert records.
6618
6626
  * @param props - Array of Alert objects for the updated records.
6627
+ * @param globalClient - Apollo Client instance.
6619
6628
  * @returns The count of created records or null.
6620
6629
  */
6621
- async updateMany(props) {
6630
+ async updateMany(props, globalClient) {
6631
+ const client = globalClient || client_2.client;
6622
6632
  const UPDATE_MANY_ALERT = (0, client_1.gql) `
6623
6633
  mutation updateManyAlert($data: [AlertCreateManyInput!]!) {
6624
6634
  updateManyAlert(data: $data) {
@@ -9266,7 +9276,7 @@ exports.Alert = {
9266
9276
  }));
9267
9277
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
9268
9278
  try {
9269
- const response = await client_2.client.mutate({ mutation: UPDATE_MANY_ALERT, variables: filteredVariables });
9279
+ const response = await client.mutate({ mutation: UPDATE_MANY_ALERT, variables: filteredVariables });
9270
9280
  if (response.errors && response.errors.length > 0)
9271
9281
  throw new Error(response.errors[0].message);
9272
9282
  if (response && response.data && response.data.updateManyAlert) {
@@ -9284,9 +9294,11 @@ exports.Alert = {
9284
9294
  /**
9285
9295
  * Delete a single Alert record.
9286
9296
  * @param props - Properties to update.
9297
+ * @param globalClient - Apollo Client instance.
9287
9298
  * @returns The deleted Alert or null.
9288
9299
  */
9289
- async delete(props) {
9300
+ async delete(props, globalClient) {
9301
+ const client = globalClient || client_2.client;
9290
9302
  const DELETE_ONE_ALERT = (0, client_1.gql) `
9291
9303
  mutation deleteOneAlert($where: AlertWhereUniqueInput!) {
9292
9304
  deleteOneAlert(where: $where) {
@@ -9300,7 +9312,7 @@ exports.Alert = {
9300
9312
  };
9301
9313
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
9302
9314
  try {
9303
- const response = await client_2.client.mutate({ mutation: DELETE_ONE_ALERT, variables: filteredVariables });
9315
+ const response = await client.mutate({ mutation: DELETE_ONE_ALERT, variables: filteredVariables });
9304
9316
  if (response.errors && response.errors.length > 0)
9305
9317
  throw new Error(response.errors[0].message);
9306
9318
  if (response && response.data && response.data.deleteOneAlert) {
@@ -9318,10 +9330,12 @@ exports.Alert = {
9318
9330
  /**
9319
9331
  * Retrieve a single Alert record by ID.
9320
9332
  * @param props - Properties to update.
9333
+ * @param globalClient - Apollo Client instance.
9321
9334
  * @returns The retrieved Alert or null.
9322
9335
  */
9323
- async get(props) {
9336
+ async get(props, globalClient) {
9324
9337
  var _a, _b;
9338
+ const client = globalClient || client_2.client;
9325
9339
  const GET_ALERT = (0, client_1.gql) `
9326
9340
  query getAlert($where: AlertWhereUniqueInput!) {
9327
9341
  getAlert(where: $where) {
@@ -9338,7 +9352,7 @@ exports.Alert = {
9338
9352
  };
9339
9353
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
9340
9354
  try {
9341
- const response = await client_2.client.query({ query: GET_ALERT, variables: filteredVariables });
9355
+ const response = await client.query({ query: GET_ALERT, variables: filteredVariables });
9342
9356
  if (response.errors && response.errors.length > 0)
9343
9357
  throw new Error(response.errors[0].message);
9344
9358
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.getAlert) !== null && _b !== void 0 ? _b : null;
@@ -9355,10 +9369,12 @@ exports.Alert = {
9355
9369
  },
9356
9370
  /**
9357
9371
  * Retrieve all Alerts records.
9372
+ * @param globalClient - Apollo Client instance.
9358
9373
  * @returns An array of Alert records or null.
9359
9374
  */
9360
- async getAll() {
9375
+ async getAll(globalClient) {
9361
9376
  var _a, _b;
9377
+ const client = globalClient || client_2.client;
9362
9378
  const GET_ALL_ALERT = (0, client_1.gql) `
9363
9379
  query getAllAlert {
9364
9380
  alerts {
@@ -9366,7 +9382,7 @@ exports.Alert = {
9366
9382
  }
9367
9383
  }`;
9368
9384
  try {
9369
- const response = await client_2.client.query({ query: GET_ALL_ALERT });
9385
+ const response = await client.query({ query: GET_ALL_ALERT });
9370
9386
  if (response.errors && response.errors.length > 0)
9371
9387
  throw new Error(response.errors[0].message);
9372
9388
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.alerts) !== null && _b !== void 0 ? _b : null;
@@ -9384,9 +9400,11 @@ exports.Alert = {
9384
9400
  /**
9385
9401
  * Find multiple Alert records based on conditions.
9386
9402
  * @param props - Conditions to find records.
9403
+ * @param globalClient - Apollo Client instance.
9387
9404
  * @returns An array of found Alert records or null.
9388
9405
  */
9389
- async findMany(props) {
9406
+ async findMany(props, globalClient) {
9407
+ const client = globalClient || client_2.client;
9390
9408
  const FIND_MANY_ALERT = (0, client_1.gql) `
9391
9409
  query findManyAlert($where: AlertWhereInput!) {
9392
9410
  alerts(where: $where) {
@@ -9405,7 +9423,7 @@ exports.Alert = {
9405
9423
  };
9406
9424
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
9407
9425
  try {
9408
- const response = await client_2.client.query({ query: FIND_MANY_ALERT, variables: filteredVariables });
9426
+ const response = await client.query({ query: FIND_MANY_ALERT, variables: filteredVariables });
9409
9427
  if (response.errors && response.errors.length > 0)
9410
9428
  throw new Error(response.errors[0].message);
9411
9429
  if (response && response.data && response.data.Alerts) {
package/Alert.d.ts CHANGED
@@ -1,61 +1,71 @@
1
1
  import { Alert as AlertType } from './generated/typegraphql-prisma/models/Alert';
2
+ import { ApolloClient } from '@apollo/client';
2
3
  export declare const Alert: {
3
4
  /**
4
5
  * Create a new Alert record.
5
6
  * @param props - Properties for the new record.
7
+ * @param client - Apollo Client instance.
6
8
  * @returns The created Alert or null.
7
9
  */
8
- create(props: AlertType): Promise<AlertType>;
10
+ create(props: AlertType, globalClient?: ApolloClient<any>): Promise<AlertType>;
9
11
  /**
10
12
  * Create multiple Alert records.
11
13
  * @param props - Array of Alert 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: AlertType[]): Promise<{
17
+ createMany(props: AlertType[], globalClient?: ApolloClient<any>): Promise<{
15
18
  count: number;
16
19
  } | null>;
17
20
  /**
18
21
  * Update a single Alert record.
19
22
  * @param props - Properties to update.
23
+ * @param globalClient - Apollo Client instance.
20
24
  * @returns The updated Alert or null.
21
25
  */
22
- update(props: AlertType): Promise<AlertType>;
26
+ update(props: AlertType, globalClient?: ApolloClient<any>): Promise<AlertType>;
23
27
  /**
24
28
  * Upsert a single Alert record.
25
29
  * @param props - Properties to update.
30
+ * @param globalClient - Apollo Client instance.
26
31
  * @returns The updated Alert or null.
27
32
  */
28
- upsert(props: AlertType): Promise<AlertType>;
33
+ upsert(props: AlertType, globalClient?: ApolloClient<any>): Promise<AlertType>;
29
34
  /**
30
35
  * Update multiple Alert records.
31
36
  * @param props - Array of Alert 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: AlertType[]): Promise<{
40
+ updateMany(props: AlertType[], globalClient?: ApolloClient<any>): Promise<{
35
41
  count: number;
36
42
  } | null>;
37
43
  /**
38
44
  * Delete a single Alert record.
39
45
  * @param props - Properties to update.
46
+ * @param globalClient - Apollo Client instance.
40
47
  * @returns The deleted Alert or null.
41
48
  */
42
- delete(props: AlertType): Promise<AlertType>;
49
+ delete(props: AlertType, globalClient?: ApolloClient<any>): Promise<AlertType>;
43
50
  /**
44
51
  * Retrieve a single Alert record by ID.
45
52
  * @param props - Properties to update.
53
+ * @param globalClient - Apollo Client instance.
46
54
  * @returns The retrieved Alert or null.
47
55
  */
48
- get(props: AlertType): Promise<AlertType | null>;
56
+ get(props: AlertType, globalClient?: ApolloClient<any>): Promise<AlertType | null>;
49
57
  /**
50
58
  * Retrieve all Alerts records.
59
+ * @param globalClient - Apollo Client instance.
51
60
  * @returns An array of Alert records or null.
52
61
  */
53
- getAll(): Promise<AlertType[] | null>;
62
+ getAll(globalClient?: ApolloClient<any>): Promise<AlertType[] | null>;
54
63
  /**
55
64
  * Find multiple Alert 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 Alert records or null.
58
68
  */
59
- findMany(props: AlertType): Promise<AlertType[] | null>;
69
+ findMany(props: AlertType, globalClient?: ApolloClient<any>): Promise<AlertType[] | null>;
60
70
  };
61
71
  //# sourceMappingURL=Alert.d.ts.map
package/AlpacaAccount.cjs CHANGED
@@ -428,9 +428,11 @@ exports.AlpacaAccount = {
428
428
  /**
429
429
  * Create a new AlpacaAccount record.
430
430
  * @param props - Properties for the new record.
431
+ * @param client - Apollo Client instance.
431
432
  * @returns The created AlpacaAccount or null.
432
433
  */
433
- async create(props) {
434
+ async create(props, globalClient) {
435
+ const client = globalClient || client_2.client;
434
436
  const CREATE_ONE_ALPACAACCOUNT = (0, client_1.gql) `
435
437
  mutation createOneAlpacaAccount($data: AlpacaAccountCreateInput!) {
436
438
  createOneAlpacaAccount(data: $data) {
@@ -1616,7 +1618,7 @@ exports.AlpacaAccount = {
1616
1618
  };
1617
1619
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
1618
1620
  try {
1619
- const response = await client_2.client.mutate({ mutation: CREATE_ONE_ALPACAACCOUNT, variables: filteredVariables });
1621
+ const response = await client.mutate({ mutation: CREATE_ONE_ALPACAACCOUNT, variables: filteredVariables });
1620
1622
  if (response.errors && response.errors.length > 0)
1621
1623
  throw new Error(response.errors[0].message);
1622
1624
  if (response && response.data && response.data.createOneAlpacaAccount) {
@@ -1634,9 +1636,11 @@ exports.AlpacaAccount = {
1634
1636
  /**
1635
1637
  * Create multiple AlpacaAccount records.
1636
1638
  * @param props - Array of AlpacaAccount objects for the new records.
1639
+ * @param globalClient - Apollo Client instance.
1637
1640
  * @returns The count of created records or null.
1638
1641
  */
1639
- async createMany(props) {
1642
+ async createMany(props, globalClient) {
1643
+ const client = globalClient || client_2.client;
1640
1644
  const CREATE_MANY_ALPACAACCOUNT = (0, client_1.gql) `
1641
1645
  mutation createManyAlpacaAccount($data: [AlpacaAccountCreateManyInput!]!) {
1642
1646
  createManyAlpacaAccount(data: $data) {
@@ -1659,7 +1663,7 @@ exports.AlpacaAccount = {
1659
1663
  };
1660
1664
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
1661
1665
  try {
1662
- const response = await client_2.client.mutate({ mutation: CREATE_MANY_ALPACAACCOUNT, variables: filteredVariables });
1666
+ const response = await client.mutate({ mutation: CREATE_MANY_ALPACAACCOUNT, variables: filteredVariables });
1663
1667
  if (response.errors && response.errors.length > 0)
1664
1668
  throw new Error(response.errors[0].message);
1665
1669
  if (response && response.data && response.data.createManyAlpacaAccount) {
@@ -1677,9 +1681,11 @@ exports.AlpacaAccount = {
1677
1681
  /**
1678
1682
  * Update a single AlpacaAccount record.
1679
1683
  * @param props - Properties to update.
1684
+ * @param globalClient - Apollo Client instance.
1680
1685
  * @returns The updated AlpacaAccount or null.
1681
1686
  */
1682
- async update(props) {
1687
+ async update(props, globalClient) {
1688
+ const client = globalClient || client_2.client;
1683
1689
  const UPDATE_ONE_ALPACAACCOUNT = (0, client_1.gql) `
1684
1690
  mutation updateOneAlpacaAccount($data: AlpacaAccountUpdateInput!, $where: AlpacaAccountWhereUniqueInput!) {
1685
1691
  updateOneAlpacaAccount(data: $data, where: $where) {
@@ -6436,7 +6442,7 @@ exports.AlpacaAccount = {
6436
6442
  };
6437
6443
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
6438
6444
  try {
6439
- const response = await client_2.client.mutate({ mutation: UPDATE_ONE_ALPACAACCOUNT, variables: filteredVariables });
6445
+ const response = await client.mutate({ mutation: UPDATE_ONE_ALPACAACCOUNT, variables: filteredVariables });
6440
6446
  if (response.errors && response.errors.length > 0)
6441
6447
  throw new Error(response.errors[0].message);
6442
6448
  if (response && response.data && response.data.updateOneAlpacaAccount) {
@@ -6454,9 +6460,11 @@ exports.AlpacaAccount = {
6454
6460
  /**
6455
6461
  * Upsert a single AlpacaAccount record.
6456
6462
  * @param props - Properties to update.
6463
+ * @param globalClient - Apollo Client instance.
6457
6464
  * @returns The updated AlpacaAccount or null.
6458
6465
  */
6459
- async upsert(props) {
6466
+ async upsert(props, globalClient) {
6467
+ const client = globalClient || client_2.client;
6460
6468
  const UPSERT_ONE_ALPACAACCOUNT = (0, client_1.gql) `
6461
6469
  mutation upsertOneAlpacaAccount($where: AlpacaAccountWhereUniqueInput!, $create: AlpacaAccountCreateInput!, $update: AlpacaAccountUpdateInput!) {
6462
6470
  upsertOneAlpacaAccount(where: $where, create: $create, update: $update) {
@@ -12378,7 +12386,7 @@ exports.AlpacaAccount = {
12378
12386
  };
12379
12387
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
12380
12388
  try {
12381
- const response = await client_2.client.mutate({ mutation: UPSERT_ONE_ALPACAACCOUNT, variables: filteredVariables });
12389
+ const response = await client.mutate({ mutation: UPSERT_ONE_ALPACAACCOUNT, variables: filteredVariables });
12382
12390
  if (response.errors && response.errors.length > 0)
12383
12391
  throw new Error(response.errors[0].message);
12384
12392
  if (response && response.data && response.data.upsertOneAlpacaAccount) {
@@ -12396,9 +12404,11 @@ exports.AlpacaAccount = {
12396
12404
  /**
12397
12405
  * Update multiple AlpacaAccount records.
12398
12406
  * @param props - Array of AlpacaAccount objects for the updated records.
12407
+ * @param globalClient - Apollo Client instance.
12399
12408
  * @returns The count of created records or null.
12400
12409
  */
12401
- async updateMany(props) {
12410
+ async updateMany(props, globalClient) {
12411
+ const client = globalClient || client_2.client;
12402
12412
  const UPDATE_MANY_ALPACAACCOUNT = (0, client_1.gql) `
12403
12413
  mutation updateManyAlpacaAccount($data: [AlpacaAccountCreateManyInput!]!) {
12404
12414
  updateManyAlpacaAccount(data: $data) {
@@ -17155,7 +17165,7 @@ exports.AlpacaAccount = {
17155
17165
  }));
17156
17166
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
17157
17167
  try {
17158
- const response = await client_2.client.mutate({ mutation: UPDATE_MANY_ALPACAACCOUNT, variables: filteredVariables });
17168
+ const response = await client.mutate({ mutation: UPDATE_MANY_ALPACAACCOUNT, variables: filteredVariables });
17159
17169
  if (response.errors && response.errors.length > 0)
17160
17170
  throw new Error(response.errors[0].message);
17161
17171
  if (response && response.data && response.data.updateManyAlpacaAccount) {
@@ -17173,9 +17183,11 @@ exports.AlpacaAccount = {
17173
17183
  /**
17174
17184
  * Delete a single AlpacaAccount record.
17175
17185
  * @param props - Properties to update.
17186
+ * @param globalClient - Apollo Client instance.
17176
17187
  * @returns The deleted AlpacaAccount or null.
17177
17188
  */
17178
- async delete(props) {
17189
+ async delete(props, globalClient) {
17190
+ const client = globalClient || client_2.client;
17179
17191
  const DELETE_ONE_ALPACAACCOUNT = (0, client_1.gql) `
17180
17192
  mutation deleteOneAlpacaAccount($where: AlpacaAccountWhereUniqueInput!) {
17181
17193
  deleteOneAlpacaAccount(where: $where) {
@@ -17189,7 +17201,7 @@ exports.AlpacaAccount = {
17189
17201
  };
17190
17202
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
17191
17203
  try {
17192
- const response = await client_2.client.mutate({ mutation: DELETE_ONE_ALPACAACCOUNT, variables: filteredVariables });
17204
+ const response = await client.mutate({ mutation: DELETE_ONE_ALPACAACCOUNT, variables: filteredVariables });
17193
17205
  if (response.errors && response.errors.length > 0)
17194
17206
  throw new Error(response.errors[0].message);
17195
17207
  if (response && response.data && response.data.deleteOneAlpacaAccount) {
@@ -17207,10 +17219,12 @@ exports.AlpacaAccount = {
17207
17219
  /**
17208
17220
  * Retrieve a single AlpacaAccount record by ID.
17209
17221
  * @param props - Properties to update.
17222
+ * @param globalClient - Apollo Client instance.
17210
17223
  * @returns The retrieved AlpacaAccount or null.
17211
17224
  */
17212
- async get(props) {
17225
+ async get(props, globalClient) {
17213
17226
  var _a, _b;
17227
+ const client = globalClient || client_2.client;
17214
17228
  const GET_ALPACAACCOUNT = (0, client_1.gql) `
17215
17229
  query getAlpacaAccount($where: AlpacaAccountWhereUniqueInput!) {
17216
17230
  getAlpacaAccount(where: $where) {
@@ -17227,7 +17241,7 @@ exports.AlpacaAccount = {
17227
17241
  };
17228
17242
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
17229
17243
  try {
17230
- const response = await client_2.client.query({ query: GET_ALPACAACCOUNT, variables: filteredVariables });
17244
+ const response = await client.query({ query: GET_ALPACAACCOUNT, variables: filteredVariables });
17231
17245
  if (response.errors && response.errors.length > 0)
17232
17246
  throw new Error(response.errors[0].message);
17233
17247
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.getAlpacaAccount) !== null && _b !== void 0 ? _b : null;
@@ -17244,10 +17258,12 @@ exports.AlpacaAccount = {
17244
17258
  },
17245
17259
  /**
17246
17260
  * Retrieve all AlpacaAccounts records.
17261
+ * @param globalClient - Apollo Client instance.
17247
17262
  * @returns An array of AlpacaAccount records or null.
17248
17263
  */
17249
- async getAll() {
17264
+ async getAll(globalClient) {
17250
17265
  var _a, _b;
17266
+ const client = globalClient || client_2.client;
17251
17267
  const GET_ALL_ALPACAACCOUNT = (0, client_1.gql) `
17252
17268
  query getAllAlpacaAccount {
17253
17269
  alpacaAccounts {
@@ -17255,7 +17271,7 @@ exports.AlpacaAccount = {
17255
17271
  }
17256
17272
  }`;
17257
17273
  try {
17258
- const response = await client_2.client.query({ query: GET_ALL_ALPACAACCOUNT });
17274
+ const response = await client.query({ query: GET_ALL_ALPACAACCOUNT });
17259
17275
  if (response.errors && response.errors.length > 0)
17260
17276
  throw new Error(response.errors[0].message);
17261
17277
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.alpacaAccounts) !== null && _b !== void 0 ? _b : null;
@@ -17273,9 +17289,11 @@ exports.AlpacaAccount = {
17273
17289
  /**
17274
17290
  * Find multiple AlpacaAccount records based on conditions.
17275
17291
  * @param props - Conditions to find records.
17292
+ * @param globalClient - Apollo Client instance.
17276
17293
  * @returns An array of found AlpacaAccount records or null.
17277
17294
  */
17278
- async findMany(props) {
17295
+ async findMany(props, globalClient) {
17296
+ const client = globalClient || client_2.client;
17279
17297
  const FIND_MANY_ALPACAACCOUNT = (0, client_1.gql) `
17280
17298
  query findManyAlpacaAccount($where: AlpacaAccountWhereInput!) {
17281
17299
  alpacaAccounts(where: $where) {
@@ -17294,7 +17312,7 @@ exports.AlpacaAccount = {
17294
17312
  };
17295
17313
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
17296
17314
  try {
17297
- const response = await client_2.client.query({ query: FIND_MANY_ALPACAACCOUNT, variables: filteredVariables });
17315
+ const response = await client.query({ query: FIND_MANY_ALPACAACCOUNT, variables: filteredVariables });
17298
17316
  if (response.errors && response.errors.length > 0)
17299
17317
  throw new Error(response.errors[0].message);
17300
17318
  if (response && response.data && response.data.AlpacaAccounts) {
@@ -1,61 +1,71 @@
1
1
  import { AlpacaAccount as AlpacaAccountType } from './generated/typegraphql-prisma/models/AlpacaAccount';
2
+ import { ApolloClient } from '@apollo/client';
2
3
  export declare const AlpacaAccount: {
3
4
  /**
4
5
  * Create a new AlpacaAccount record.
5
6
  * @param props - Properties for the new record.
7
+ * @param client - Apollo Client instance.
6
8
  * @returns The created AlpacaAccount or null.
7
9
  */
8
- create(props: AlpacaAccountType): Promise<AlpacaAccountType>;
10
+ create(props: AlpacaAccountType, globalClient?: ApolloClient<any>): Promise<AlpacaAccountType>;
9
11
  /**
10
12
  * Create multiple AlpacaAccount records.
11
13
  * @param props - Array of AlpacaAccount 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: AlpacaAccountType[]): Promise<{
17
+ createMany(props: AlpacaAccountType[], globalClient?: ApolloClient<any>): Promise<{
15
18
  count: number;
16
19
  } | null>;
17
20
  /**
18
21
  * Update a single AlpacaAccount record.
19
22
  * @param props - Properties to update.
23
+ * @param globalClient - Apollo Client instance.
20
24
  * @returns The updated AlpacaAccount or null.
21
25
  */
22
- update(props: AlpacaAccountType): Promise<AlpacaAccountType>;
26
+ update(props: AlpacaAccountType, globalClient?: ApolloClient<any>): Promise<AlpacaAccountType>;
23
27
  /**
24
28
  * Upsert a single AlpacaAccount record.
25
29
  * @param props - Properties to update.
30
+ * @param globalClient - Apollo Client instance.
26
31
  * @returns The updated AlpacaAccount or null.
27
32
  */
28
- upsert(props: AlpacaAccountType): Promise<AlpacaAccountType>;
33
+ upsert(props: AlpacaAccountType, globalClient?: ApolloClient<any>): Promise<AlpacaAccountType>;
29
34
  /**
30
35
  * Update multiple AlpacaAccount records.
31
36
  * @param props - Array of AlpacaAccount 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: AlpacaAccountType[]): Promise<{
40
+ updateMany(props: AlpacaAccountType[], globalClient?: ApolloClient<any>): Promise<{
35
41
  count: number;
36
42
  } | null>;
37
43
  /**
38
44
  * Delete a single AlpacaAccount record.
39
45
  * @param props - Properties to update.
46
+ * @param globalClient - Apollo Client instance.
40
47
  * @returns The deleted AlpacaAccount or null.
41
48
  */
42
- delete(props: AlpacaAccountType): Promise<AlpacaAccountType>;
49
+ delete(props: AlpacaAccountType, globalClient?: ApolloClient<any>): Promise<AlpacaAccountType>;
43
50
  /**
44
51
  * Retrieve a single AlpacaAccount record by ID.
45
52
  * @param props - Properties to update.
53
+ * @param globalClient - Apollo Client instance.
46
54
  * @returns The retrieved AlpacaAccount or null.
47
55
  */
48
- get(props: AlpacaAccountType): Promise<AlpacaAccountType | null>;
56
+ get(props: AlpacaAccountType, globalClient?: ApolloClient<any>): Promise<AlpacaAccountType | null>;
49
57
  /**
50
58
  * Retrieve all AlpacaAccounts records.
59
+ * @param globalClient - Apollo Client instance.
51
60
  * @returns An array of AlpacaAccount records or null.
52
61
  */
53
- getAll(): Promise<AlpacaAccountType[] | null>;
62
+ getAll(globalClient?: ApolloClient<any>): Promise<AlpacaAccountType[] | null>;
54
63
  /**
55
64
  * Find multiple AlpacaAccount 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 AlpacaAccount records or null.
58
68
  */
59
- findMany(props: AlpacaAccountType): Promise<AlpacaAccountType[] | null>;
69
+ findMany(props: AlpacaAccountType, globalClient?: ApolloClient<any>): Promise<AlpacaAccountType[] | null>;
60
70
  };
61
71
  //# sourceMappingURL=AlpacaAccount.d.ts.map