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.
- package/Account.cjs +36 -18
- package/Account.d.ts +19 -9
- package/Action.cjs +36 -18
- package/Action.d.ts +19 -9
- package/Alert.cjs +36 -18
- package/Alert.d.ts +19 -9
- package/AlpacaAccount.cjs +36 -18
- package/AlpacaAccount.d.ts +19 -9
- package/Asset.cjs +36 -18
- package/Asset.d.ts +19 -9
- package/Authenticator.cjs +36 -18
- package/Authenticator.d.ts +19 -9
- package/Contract.cjs +36 -18
- package/Contract.d.ts +19 -9
- package/Customer.cjs +36 -18
- package/Customer.d.ts +19 -9
- package/Deliverable.cjs +36 -18
- package/Deliverable.d.ts +19 -9
- package/EconomicEvent.cjs +36 -18
- package/EconomicEvent.d.ts +19 -9
- package/MarketSentiment.cjs +36 -18
- package/MarketSentiment.d.ts +19 -9
- package/NewsArticle.cjs +36 -18
- package/NewsArticle.d.ts +19 -9
- package/NewsArticleAssetSentiment.cjs +36 -18
- package/NewsArticleAssetSentiment.d.ts +19 -9
- package/Order.cjs +36 -18
- package/Order.d.ts +19 -9
- package/Position.cjs +36 -18
- package/Position.d.ts +19 -9
- package/ScheduledOptionOrder.cjs +36 -18
- package/ScheduledOptionOrder.d.ts +19 -9
- package/Session.cjs +36 -18
- package/Session.d.ts +19 -9
- package/StopLoss.cjs +36 -18
- package/StopLoss.d.ts +19 -9
- package/TakeProfit.cjs +36 -18
- package/TakeProfit.d.ts +19 -9
- package/Trade.cjs +36 -18
- package/Trade.d.ts +19 -9
- package/User.cjs +36 -18
- package/User.d.ts +19 -9
- package/VerificationToken.cjs +36 -18
- package/VerificationToken.d.ts +19 -9
- package/client.cjs +0 -1
- package/index.d.ts +198 -198
- package/package.json +1 -1
- package/server/Account.d.ts +19 -9
- package/server/Account.d.ts.map +1 -1
- package/server/Account.js.map +1 -1
- package/server/Account.mjs +28 -10
- package/server/Action.d.ts +19 -9
- package/server/Action.d.ts.map +1 -1
- package/server/Action.js.map +1 -1
- package/server/Action.mjs +28 -10
- package/server/Alert.d.ts +19 -9
- package/server/Alert.d.ts.map +1 -1
- package/server/Alert.js.map +1 -1
- package/server/Alert.mjs +28 -10
- package/server/AlpacaAccount.d.ts +19 -9
- package/server/AlpacaAccount.d.ts.map +1 -1
- package/server/AlpacaAccount.js.map +1 -1
- package/server/AlpacaAccount.mjs +28 -10
- package/server/Asset.d.ts +19 -9
- package/server/Asset.d.ts.map +1 -1
- package/server/Asset.js.map +1 -1
- package/server/Asset.mjs +28 -10
- package/server/Authenticator.d.ts +19 -9
- package/server/Authenticator.d.ts.map +1 -1
- package/server/Authenticator.js.map +1 -1
- package/server/Authenticator.mjs +28 -10
- package/server/Contract.d.ts +19 -9
- package/server/Contract.d.ts.map +1 -1
- package/server/Contract.js.map +1 -1
- package/server/Contract.mjs +28 -10
- package/server/Customer.d.ts +19 -9
- package/server/Customer.d.ts.map +1 -1
- package/server/Customer.js.map +1 -1
- package/server/Customer.mjs +28 -10
- package/server/Deliverable.d.ts +19 -9
- package/server/Deliverable.d.ts.map +1 -1
- package/server/Deliverable.js.map +1 -1
- package/server/Deliverable.mjs +28 -10
- package/server/EconomicEvent.d.ts +19 -9
- package/server/EconomicEvent.d.ts.map +1 -1
- package/server/EconomicEvent.js.map +1 -1
- package/server/EconomicEvent.mjs +28 -10
- package/server/MarketSentiment.d.ts +19 -9
- package/server/MarketSentiment.d.ts.map +1 -1
- package/server/MarketSentiment.js.map +1 -1
- package/server/MarketSentiment.mjs +28 -10
- package/server/NewsArticle.d.ts +19 -9
- package/server/NewsArticle.d.ts.map +1 -1
- package/server/NewsArticle.js.map +1 -1
- package/server/NewsArticle.mjs +28 -10
- package/server/NewsArticleAssetSentiment.d.ts +19 -9
- package/server/NewsArticleAssetSentiment.d.ts.map +1 -1
- package/server/NewsArticleAssetSentiment.js.map +1 -1
- package/server/NewsArticleAssetSentiment.mjs +28 -10
- package/server/Order.d.ts +19 -9
- package/server/Order.d.ts.map +1 -1
- package/server/Order.js.map +1 -1
- package/server/Order.mjs +28 -10
- package/server/Position.d.ts +19 -9
- package/server/Position.d.ts.map +1 -1
- package/server/Position.js.map +1 -1
- package/server/Position.mjs +28 -10
- package/server/ScheduledOptionOrder.d.ts +19 -9
- package/server/ScheduledOptionOrder.d.ts.map +1 -1
- package/server/ScheduledOptionOrder.js.map +1 -1
- package/server/ScheduledOptionOrder.mjs +28 -10
- package/server/Session.d.ts +19 -9
- package/server/Session.d.ts.map +1 -1
- package/server/Session.js.map +1 -1
- package/server/Session.mjs +28 -10
- package/server/StopLoss.d.ts +19 -9
- package/server/StopLoss.d.ts.map +1 -1
- package/server/StopLoss.js.map +1 -1
- package/server/StopLoss.mjs +28 -10
- package/server/TakeProfit.d.ts +19 -9
- package/server/TakeProfit.d.ts.map +1 -1
- package/server/TakeProfit.js.map +1 -1
- package/server/TakeProfit.mjs +28 -10
- package/server/Trade.d.ts +19 -9
- package/server/Trade.d.ts.map +1 -1
- package/server/Trade.js.map +1 -1
- package/server/Trade.mjs +28 -10
- package/server/User.d.ts +19 -9
- package/server/User.d.ts.map +1 -1
- package/server/User.js.map +1 -1
- package/server/User.mjs +28 -10
- package/server/VerificationToken.d.ts +19 -9
- package/server/VerificationToken.d.ts.map +1 -1
- package/server/VerificationToken.js.map +1 -1
- package/server/VerificationToken.mjs +28 -10
- package/server/client.d.ts.map +1 -1
- package/server/client.js.map +1 -1
- package/server/client.mjs +0 -1
- package/server/index.d.ts +198 -198
package/User.cjs
CHANGED
@@ -388,9 +388,11 @@ exports.User = {
|
|
388
388
|
/**
|
389
389
|
* Create a new User record.
|
390
390
|
* @param props - Properties for the new record.
|
391
|
+
* @param client - Apollo Client instance.
|
391
392
|
* @returns The created User or null.
|
392
393
|
*/
|
393
|
-
async create(props) {
|
394
|
+
async create(props, globalClient) {
|
395
|
+
const client = globalClient || client_2.client;
|
394
396
|
const CREATE_ONE_USER = (0, client_1.gql) `
|
395
397
|
mutation createOneUser($data: UserCreateInput!) {
|
396
398
|
createOneUser(data: $data) {
|
@@ -1000,7 +1002,7 @@ exports.User = {
|
|
1000
1002
|
};
|
1001
1003
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
1002
1004
|
try {
|
1003
|
-
const response = await
|
1005
|
+
const response = await client.mutate({ mutation: CREATE_ONE_USER, variables: filteredVariables });
|
1004
1006
|
if (response.errors && response.errors.length > 0)
|
1005
1007
|
throw new Error(response.errors[0].message);
|
1006
1008
|
if (response && response.data && response.data.createOneUser) {
|
@@ -1018,9 +1020,11 @@ exports.User = {
|
|
1018
1020
|
/**
|
1019
1021
|
* Create multiple User records.
|
1020
1022
|
* @param props - Array of User objects for the new records.
|
1023
|
+
* @param globalClient - Apollo Client instance.
|
1021
1024
|
* @returns The count of created records or null.
|
1022
1025
|
*/
|
1023
|
-
async createMany(props) {
|
1026
|
+
async createMany(props, globalClient) {
|
1027
|
+
const client = globalClient || client_2.client;
|
1024
1028
|
const CREATE_MANY_USER = (0, client_1.gql) `
|
1025
1029
|
mutation createManyUser($data: [UserCreateManyInput!]!) {
|
1026
1030
|
createManyUser(data: $data) {
|
@@ -1045,7 +1049,7 @@ exports.User = {
|
|
1045
1049
|
};
|
1046
1050
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
1047
1051
|
try {
|
1048
|
-
const response = await
|
1052
|
+
const response = await client.mutate({ mutation: CREATE_MANY_USER, variables: filteredVariables });
|
1049
1053
|
if (response.errors && response.errors.length > 0)
|
1050
1054
|
throw new Error(response.errors[0].message);
|
1051
1055
|
if (response && response.data && response.data.createManyUser) {
|
@@ -1063,9 +1067,11 @@ exports.User = {
|
|
1063
1067
|
/**
|
1064
1068
|
* Update a single User record.
|
1065
1069
|
* @param props - Properties to update.
|
1070
|
+
* @param globalClient - Apollo Client instance.
|
1066
1071
|
* @returns The updated User or null.
|
1067
1072
|
*/
|
1068
|
-
async update(props) {
|
1073
|
+
async update(props, globalClient) {
|
1074
|
+
const client = globalClient || client_2.client;
|
1069
1075
|
const UPDATE_ONE_USER = (0, client_1.gql) `
|
1070
1076
|
mutation updateOneUser($data: UserUpdateInput!, $where: UserWhereUniqueInput!) {
|
1071
1077
|
updateOneUser(data: $data, where: $where) {
|
@@ -3483,7 +3489,7 @@ exports.User = {
|
|
3483
3489
|
};
|
3484
3490
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
3485
3491
|
try {
|
3486
|
-
const response = await
|
3492
|
+
const response = await client.mutate({ mutation: UPDATE_ONE_USER, variables: filteredVariables });
|
3487
3493
|
if (response.errors && response.errors.length > 0)
|
3488
3494
|
throw new Error(response.errors[0].message);
|
3489
3495
|
if (response && response.data && response.data.updateOneUser) {
|
@@ -3501,9 +3507,11 @@ exports.User = {
|
|
3501
3507
|
/**
|
3502
3508
|
* Upsert a single User record.
|
3503
3509
|
* @param props - Properties to update.
|
3510
|
+
* @param globalClient - Apollo Client instance.
|
3504
3511
|
* @returns The updated User or null.
|
3505
3512
|
*/
|
3506
|
-
async upsert(props) {
|
3513
|
+
async upsert(props, globalClient) {
|
3514
|
+
const client = globalClient || client_2.client;
|
3507
3515
|
const UPSERT_ONE_USER = (0, client_1.gql) `
|
3508
3516
|
mutation upsertOneUser($where: UserWhereUniqueInput!, $create: UserCreateInput!, $update: UserUpdateInput!) {
|
3509
3517
|
upsertOneUser(where: $where, create: $create, update: $update) {
|
@@ -6510,7 +6518,7 @@ exports.User = {
|
|
6510
6518
|
};
|
6511
6519
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
6512
6520
|
try {
|
6513
|
-
const response = await
|
6521
|
+
const response = await client.mutate({ mutation: UPSERT_ONE_USER, variables: filteredVariables });
|
6514
6522
|
if (response.errors && response.errors.length > 0)
|
6515
6523
|
throw new Error(response.errors[0].message);
|
6516
6524
|
if (response && response.data && response.data.upsertOneUser) {
|
@@ -6528,9 +6536,11 @@ exports.User = {
|
|
6528
6536
|
/**
|
6529
6537
|
* Update multiple User records.
|
6530
6538
|
* @param props - Array of User objects for the updated records.
|
6539
|
+
* @param globalClient - Apollo Client instance.
|
6531
6540
|
* @returns The count of created records or null.
|
6532
6541
|
*/
|
6533
|
-
async updateMany(props) {
|
6542
|
+
async updateMany(props, globalClient) {
|
6543
|
+
const client = globalClient || client_2.client;
|
6534
6544
|
const UPDATE_MANY_USER = (0, client_1.gql) `
|
6535
6545
|
mutation updateManyUser($data: [UserCreateManyInput!]!) {
|
6536
6546
|
updateManyUser(data: $data) {
|
@@ -8948,7 +8958,7 @@ exports.User = {
|
|
8948
8958
|
}));
|
8949
8959
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
8950
8960
|
try {
|
8951
|
-
const response = await
|
8961
|
+
const response = await client.mutate({ mutation: UPDATE_MANY_USER, variables: filteredVariables });
|
8952
8962
|
if (response.errors && response.errors.length > 0)
|
8953
8963
|
throw new Error(response.errors[0].message);
|
8954
8964
|
if (response && response.data && response.data.updateManyUser) {
|
@@ -8966,9 +8976,11 @@ exports.User = {
|
|
8966
8976
|
/**
|
8967
8977
|
* Delete a single User record.
|
8968
8978
|
* @param props - Properties to update.
|
8979
|
+
* @param globalClient - Apollo Client instance.
|
8969
8980
|
* @returns The deleted User or null.
|
8970
8981
|
*/
|
8971
|
-
async delete(props) {
|
8982
|
+
async delete(props, globalClient) {
|
8983
|
+
const client = globalClient || client_2.client;
|
8972
8984
|
const DELETE_ONE_USER = (0, client_1.gql) `
|
8973
8985
|
mutation deleteOneUser($where: UserWhereUniqueInput!) {
|
8974
8986
|
deleteOneUser(where: $where) {
|
@@ -8982,7 +8994,7 @@ exports.User = {
|
|
8982
8994
|
};
|
8983
8995
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
8984
8996
|
try {
|
8985
|
-
const response = await
|
8997
|
+
const response = await client.mutate({ mutation: DELETE_ONE_USER, variables: filteredVariables });
|
8986
8998
|
if (response.errors && response.errors.length > 0)
|
8987
8999
|
throw new Error(response.errors[0].message);
|
8988
9000
|
if (response && response.data && response.data.deleteOneUser) {
|
@@ -9000,10 +9012,12 @@ exports.User = {
|
|
9000
9012
|
/**
|
9001
9013
|
* Retrieve a single User record by ID.
|
9002
9014
|
* @param props - Properties to update.
|
9015
|
+
* @param globalClient - Apollo Client instance.
|
9003
9016
|
* @returns The retrieved User or null.
|
9004
9017
|
*/
|
9005
|
-
async get(props) {
|
9018
|
+
async get(props, globalClient) {
|
9006
9019
|
var _a, _b;
|
9020
|
+
const client = globalClient || client_2.client;
|
9007
9021
|
const GET_USER = (0, client_1.gql) `
|
9008
9022
|
query getUser($where: UserWhereUniqueInput!) {
|
9009
9023
|
getUser(where: $where) {
|
@@ -9021,7 +9035,7 @@ exports.User = {
|
|
9021
9035
|
};
|
9022
9036
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
9023
9037
|
try {
|
9024
|
-
const response = await
|
9038
|
+
const response = await client.query({ query: GET_USER, variables: filteredVariables });
|
9025
9039
|
if (response.errors && response.errors.length > 0)
|
9026
9040
|
throw new Error(response.errors[0].message);
|
9027
9041
|
return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.getUser) !== null && _b !== void 0 ? _b : null;
|
@@ -9038,10 +9052,12 @@ exports.User = {
|
|
9038
9052
|
},
|
9039
9053
|
/**
|
9040
9054
|
* Retrieve all Users records.
|
9055
|
+
* @param globalClient - Apollo Client instance.
|
9041
9056
|
* @returns An array of User records or null.
|
9042
9057
|
*/
|
9043
|
-
async getAll() {
|
9058
|
+
async getAll(globalClient) {
|
9044
9059
|
var _a, _b;
|
9060
|
+
const client = globalClient || client_2.client;
|
9045
9061
|
const GET_ALL_USER = (0, client_1.gql) `
|
9046
9062
|
query getAllUser {
|
9047
9063
|
users {
|
@@ -9049,7 +9065,7 @@ exports.User = {
|
|
9049
9065
|
}
|
9050
9066
|
}`;
|
9051
9067
|
try {
|
9052
|
-
const response = await
|
9068
|
+
const response = await client.query({ query: GET_ALL_USER });
|
9053
9069
|
if (response.errors && response.errors.length > 0)
|
9054
9070
|
throw new Error(response.errors[0].message);
|
9055
9071
|
return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.users) !== null && _b !== void 0 ? _b : null;
|
@@ -9067,9 +9083,11 @@ exports.User = {
|
|
9067
9083
|
/**
|
9068
9084
|
* Find multiple User records based on conditions.
|
9069
9085
|
* @param props - Conditions to find records.
|
9086
|
+
* @param globalClient - Apollo Client instance.
|
9070
9087
|
* @returns An array of found User records or null.
|
9071
9088
|
*/
|
9072
|
-
async findMany(props) {
|
9089
|
+
async findMany(props, globalClient) {
|
9090
|
+
const client = globalClient || client_2.client;
|
9073
9091
|
const FIND_MANY_USER = (0, client_1.gql) `
|
9074
9092
|
query findManyUser($where: UserWhereInput!) {
|
9075
9093
|
users(where: $where) {
|
@@ -9091,7 +9109,7 @@ exports.User = {
|
|
9091
9109
|
};
|
9092
9110
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
9093
9111
|
try {
|
9094
|
-
const response = await
|
9112
|
+
const response = await client.query({ query: FIND_MANY_USER, variables: filteredVariables });
|
9095
9113
|
if (response.errors && response.errors.length > 0)
|
9096
9114
|
throw new Error(response.errors[0].message);
|
9097
9115
|
if (response && response.data && response.data.Users) {
|
package/User.d.ts
CHANGED
@@ -1,61 +1,71 @@
|
|
1
1
|
import { User as UserType } from './generated/typegraphql-prisma/models/User';
|
2
|
+
import { ApolloClient } from '@apollo/client';
|
2
3
|
export declare const User: {
|
3
4
|
/**
|
4
5
|
* Create a new User record.
|
5
6
|
* @param props - Properties for the new record.
|
7
|
+
* @param client - Apollo Client instance.
|
6
8
|
* @returns The created User or null.
|
7
9
|
*/
|
8
|
-
create(props: UserType): Promise<UserType>;
|
10
|
+
create(props: UserType, globalClient?: ApolloClient<any>): Promise<UserType>;
|
9
11
|
/**
|
10
12
|
* Create multiple User records.
|
11
13
|
* @param props - Array of User 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: UserType[]): Promise<{
|
17
|
+
createMany(props: UserType[], globalClient?: ApolloClient<any>): Promise<{
|
15
18
|
count: number;
|
16
19
|
} | null>;
|
17
20
|
/**
|
18
21
|
* Update a single User record.
|
19
22
|
* @param props - Properties to update.
|
23
|
+
* @param globalClient - Apollo Client instance.
|
20
24
|
* @returns The updated User or null.
|
21
25
|
*/
|
22
|
-
update(props: UserType): Promise<UserType>;
|
26
|
+
update(props: UserType, globalClient?: ApolloClient<any>): Promise<UserType>;
|
23
27
|
/**
|
24
28
|
* Upsert a single User record.
|
25
29
|
* @param props - Properties to update.
|
30
|
+
* @param globalClient - Apollo Client instance.
|
26
31
|
* @returns The updated User or null.
|
27
32
|
*/
|
28
|
-
upsert(props: UserType): Promise<UserType>;
|
33
|
+
upsert(props: UserType, globalClient?: ApolloClient<any>): Promise<UserType>;
|
29
34
|
/**
|
30
35
|
* Update multiple User records.
|
31
36
|
* @param props - Array of User 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: UserType[]): Promise<{
|
40
|
+
updateMany(props: UserType[], globalClient?: ApolloClient<any>): Promise<{
|
35
41
|
count: number;
|
36
42
|
} | null>;
|
37
43
|
/**
|
38
44
|
* Delete a single User record.
|
39
45
|
* @param props - Properties to update.
|
46
|
+
* @param globalClient - Apollo Client instance.
|
40
47
|
* @returns The deleted User or null.
|
41
48
|
*/
|
42
|
-
delete(props: UserType): Promise<UserType>;
|
49
|
+
delete(props: UserType, globalClient?: ApolloClient<any>): Promise<UserType>;
|
43
50
|
/**
|
44
51
|
* Retrieve a single User record by ID.
|
45
52
|
* @param props - Properties to update.
|
53
|
+
* @param globalClient - Apollo Client instance.
|
46
54
|
* @returns The retrieved User or null.
|
47
55
|
*/
|
48
|
-
get(props: UserType): Promise<UserType | null>;
|
56
|
+
get(props: UserType, globalClient?: ApolloClient<any>): Promise<UserType | null>;
|
49
57
|
/**
|
50
58
|
* Retrieve all Users records.
|
59
|
+
* @param globalClient - Apollo Client instance.
|
51
60
|
* @returns An array of User records or null.
|
52
61
|
*/
|
53
|
-
getAll(): Promise<UserType[] | null>;
|
62
|
+
getAll(globalClient?: ApolloClient<any>): Promise<UserType[] | null>;
|
54
63
|
/**
|
55
64
|
* Find multiple User 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 User records or null.
|
58
68
|
*/
|
59
|
-
findMany(props: UserType): Promise<UserType[] | null>;
|
69
|
+
findMany(props: UserType, globalClient?: ApolloClient<any>): Promise<UserType[] | null>;
|
60
70
|
};
|
61
71
|
//# sourceMappingURL=User.d.ts.map
|
package/VerificationToken.cjs
CHANGED
@@ -19,9 +19,11 @@ exports.VerificationToken = {
|
|
19
19
|
/**
|
20
20
|
* Create a new VerificationToken record.
|
21
21
|
* @param props - Properties for the new record.
|
22
|
+
* @param client - Apollo Client instance.
|
22
23
|
* @returns The created VerificationToken or null.
|
23
24
|
*/
|
24
|
-
async create(props) {
|
25
|
+
async create(props, globalClient) {
|
26
|
+
const client = globalClient || client_2.client;
|
25
27
|
const CREATE_ONE_VERIFICATIONTOKEN = (0, client_1.gql) `
|
26
28
|
mutation createOneVerificationToken($data: VerificationTokenCreateInput!) {
|
27
29
|
createOneVerificationToken(data: $data) {
|
@@ -38,7 +40,7 @@ exports.VerificationToken = {
|
|
38
40
|
};
|
39
41
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
40
42
|
try {
|
41
|
-
const response = await
|
43
|
+
const response = await client.mutate({ mutation: CREATE_ONE_VERIFICATIONTOKEN, variables: filteredVariables });
|
42
44
|
if (response.errors && response.errors.length > 0)
|
43
45
|
throw new Error(response.errors[0].message);
|
44
46
|
if (response && response.data && response.data.createOneVerificationToken) {
|
@@ -56,9 +58,11 @@ exports.VerificationToken = {
|
|
56
58
|
/**
|
57
59
|
* Create multiple VerificationToken records.
|
58
60
|
* @param props - Array of VerificationToken objects for the new records.
|
61
|
+
* @param globalClient - Apollo Client instance.
|
59
62
|
* @returns The count of created records or null.
|
60
63
|
*/
|
61
|
-
async createMany(props) {
|
64
|
+
async createMany(props, globalClient) {
|
65
|
+
const client = globalClient || client_2.client;
|
62
66
|
const CREATE_MANY_VERIFICATIONTOKEN = (0, client_1.gql) `
|
63
67
|
mutation createManyVerificationToken($data: [VerificationTokenCreateManyInput!]!) {
|
64
68
|
createManyVerificationToken(data: $data) {
|
@@ -74,7 +78,7 @@ exports.VerificationToken = {
|
|
74
78
|
};
|
75
79
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
76
80
|
try {
|
77
|
-
const response = await
|
81
|
+
const response = await client.mutate({ mutation: CREATE_MANY_VERIFICATIONTOKEN, variables: filteredVariables });
|
78
82
|
if (response.errors && response.errors.length > 0)
|
79
83
|
throw new Error(response.errors[0].message);
|
80
84
|
if (response && response.data && response.data.createManyVerificationToken) {
|
@@ -92,9 +96,11 @@ exports.VerificationToken = {
|
|
92
96
|
/**
|
93
97
|
* Update a single VerificationToken record.
|
94
98
|
* @param props - Properties to update.
|
99
|
+
* @param globalClient - Apollo Client instance.
|
95
100
|
* @returns The updated VerificationToken or null.
|
96
101
|
*/
|
97
|
-
async update(props) {
|
102
|
+
async update(props, globalClient) {
|
103
|
+
const client = globalClient || client_2.client;
|
98
104
|
const UPDATE_ONE_VERIFICATIONTOKEN = (0, client_1.gql) `
|
99
105
|
mutation updateOneVerificationToken($data: VerificationTokenUpdateInput!, $where: VerificationTokenWhereUniqueInput!) {
|
100
106
|
updateOneVerificationToken(data: $data, where: $where) {
|
@@ -122,7 +128,7 @@ exports.VerificationToken = {
|
|
122
128
|
};
|
123
129
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
124
130
|
try {
|
125
|
-
const response = await
|
131
|
+
const response = await client.mutate({ mutation: UPDATE_ONE_VERIFICATIONTOKEN, variables: filteredVariables });
|
126
132
|
if (response.errors && response.errors.length > 0)
|
127
133
|
throw new Error(response.errors[0].message);
|
128
134
|
if (response && response.data && response.data.updateOneVerificationToken) {
|
@@ -140,9 +146,11 @@ exports.VerificationToken = {
|
|
140
146
|
/**
|
141
147
|
* Upsert a single VerificationToken record.
|
142
148
|
* @param props - Properties to update.
|
149
|
+
* @param globalClient - Apollo Client instance.
|
143
150
|
* @returns The updated VerificationToken or null.
|
144
151
|
*/
|
145
|
-
async upsert(props) {
|
152
|
+
async upsert(props, globalClient) {
|
153
|
+
const client = globalClient || client_2.client;
|
146
154
|
const UPSERT_ONE_VERIFICATIONTOKEN = (0, client_1.gql) `
|
147
155
|
mutation upsertOneVerificationToken($where: VerificationTokenWhereUniqueInput!, $create: VerificationTokenCreateInput!, $update: VerificationTokenUpdateInput!) {
|
148
156
|
upsertOneVerificationToken(where: $where, create: $create, update: $update) {
|
@@ -172,7 +180,7 @@ exports.VerificationToken = {
|
|
172
180
|
};
|
173
181
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
174
182
|
try {
|
175
|
-
const response = await
|
183
|
+
const response = await client.mutate({ mutation: UPSERT_ONE_VERIFICATIONTOKEN, variables: filteredVariables });
|
176
184
|
if (response.errors && response.errors.length > 0)
|
177
185
|
throw new Error(response.errors[0].message);
|
178
186
|
if (response && response.data && response.data.upsertOneVerificationToken) {
|
@@ -190,9 +198,11 @@ exports.VerificationToken = {
|
|
190
198
|
/**
|
191
199
|
* Update multiple VerificationToken records.
|
192
200
|
* @param props - Array of VerificationToken objects for the updated records.
|
201
|
+
* @param globalClient - Apollo Client instance.
|
193
202
|
* @returns The count of created records or null.
|
194
203
|
*/
|
195
|
-
async updateMany(props) {
|
204
|
+
async updateMany(props, globalClient) {
|
205
|
+
const client = globalClient || client_2.client;
|
196
206
|
const UPDATE_MANY_VERIFICATIONTOKEN = (0, client_1.gql) `
|
197
207
|
mutation updateManyVerificationToken($data: [VerificationTokenCreateManyInput!]!) {
|
198
208
|
updateManyVerificationToken(data: $data) {
|
@@ -220,7 +230,7 @@ exports.VerificationToken = {
|
|
220
230
|
}));
|
221
231
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
222
232
|
try {
|
223
|
-
const response = await
|
233
|
+
const response = await client.mutate({ mutation: UPDATE_MANY_VERIFICATIONTOKEN, variables: filteredVariables });
|
224
234
|
if (response.errors && response.errors.length > 0)
|
225
235
|
throw new Error(response.errors[0].message);
|
226
236
|
if (response && response.data && response.data.updateManyVerificationToken) {
|
@@ -238,9 +248,11 @@ exports.VerificationToken = {
|
|
238
248
|
/**
|
239
249
|
* Delete a single VerificationToken record.
|
240
250
|
* @param props - Properties to update.
|
251
|
+
* @param globalClient - Apollo Client instance.
|
241
252
|
* @returns The deleted VerificationToken or null.
|
242
253
|
*/
|
243
|
-
async delete(props) {
|
254
|
+
async delete(props, globalClient) {
|
255
|
+
const client = globalClient || client_2.client;
|
244
256
|
const DELETE_ONE_VERIFICATIONTOKEN = (0, client_1.gql) `
|
245
257
|
mutation deleteOneVerificationToken($where: VerificationTokenWhereUniqueInput!) {
|
246
258
|
deleteOneVerificationToken(where: $where) {
|
@@ -254,7 +266,7 @@ exports.VerificationToken = {
|
|
254
266
|
};
|
255
267
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
256
268
|
try {
|
257
|
-
const response = await
|
269
|
+
const response = await client.mutate({ mutation: DELETE_ONE_VERIFICATIONTOKEN, variables: filteredVariables });
|
258
270
|
if (response.errors && response.errors.length > 0)
|
259
271
|
throw new Error(response.errors[0].message);
|
260
272
|
if (response && response.data && response.data.deleteOneVerificationToken) {
|
@@ -272,10 +284,12 @@ exports.VerificationToken = {
|
|
272
284
|
/**
|
273
285
|
* Retrieve a single VerificationToken record by ID.
|
274
286
|
* @param props - Properties to update.
|
287
|
+
* @param globalClient - Apollo Client instance.
|
275
288
|
* @returns The retrieved VerificationToken or null.
|
276
289
|
*/
|
277
|
-
async get(props) {
|
290
|
+
async get(props, globalClient) {
|
278
291
|
var _a, _b;
|
292
|
+
const client = globalClient || client_2.client;
|
279
293
|
const GET_VERIFICATIONTOKEN = (0, client_1.gql) `
|
280
294
|
query getVerificationToken($where: VerificationTokenWhereUniqueInput!) {
|
281
295
|
getVerificationToken(where: $where) {
|
@@ -289,7 +303,7 @@ exports.VerificationToken = {
|
|
289
303
|
};
|
290
304
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
291
305
|
try {
|
292
|
-
const response = await
|
306
|
+
const response = await client.query({ query: GET_VERIFICATIONTOKEN, variables: filteredVariables });
|
293
307
|
if (response.errors && response.errors.length > 0)
|
294
308
|
throw new Error(response.errors[0].message);
|
295
309
|
return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.getVerificationToken) !== null && _b !== void 0 ? _b : null;
|
@@ -306,10 +320,12 @@ exports.VerificationToken = {
|
|
306
320
|
},
|
307
321
|
/**
|
308
322
|
* Retrieve all VerificationTokens records.
|
323
|
+
* @param globalClient - Apollo Client instance.
|
309
324
|
* @returns An array of VerificationToken records or null.
|
310
325
|
*/
|
311
|
-
async getAll() {
|
326
|
+
async getAll(globalClient) {
|
312
327
|
var _a, _b;
|
328
|
+
const client = globalClient || client_2.client;
|
313
329
|
const GET_ALL_VERIFICATIONTOKEN = (0, client_1.gql) `
|
314
330
|
query getAllVerificationToken {
|
315
331
|
verificationTokens {
|
@@ -317,7 +333,7 @@ exports.VerificationToken = {
|
|
317
333
|
}
|
318
334
|
}`;
|
319
335
|
try {
|
320
|
-
const response = await
|
336
|
+
const response = await client.query({ query: GET_ALL_VERIFICATIONTOKEN });
|
321
337
|
if (response.errors && response.errors.length > 0)
|
322
338
|
throw new Error(response.errors[0].message);
|
323
339
|
return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.verificationTokens) !== null && _b !== void 0 ? _b : null;
|
@@ -335,9 +351,11 @@ exports.VerificationToken = {
|
|
335
351
|
/**
|
336
352
|
* Find multiple VerificationToken records based on conditions.
|
337
353
|
* @param props - Conditions to find records.
|
354
|
+
* @param globalClient - Apollo Client instance.
|
338
355
|
* @returns An array of found VerificationToken records or null.
|
339
356
|
*/
|
340
|
-
async findMany(props) {
|
357
|
+
async findMany(props, globalClient) {
|
358
|
+
const client = globalClient || client_2.client;
|
341
359
|
const FIND_MANY_VERIFICATIONTOKEN = (0, client_1.gql) `
|
342
360
|
query findManyVerificationToken($where: VerificationTokenWhereInput!) {
|
343
361
|
verificationTokens(where: $where) {
|
@@ -353,7 +371,7 @@ exports.VerificationToken = {
|
|
353
371
|
};
|
354
372
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
355
373
|
try {
|
356
|
-
const response = await
|
374
|
+
const response = await client.query({ query: FIND_MANY_VERIFICATIONTOKEN, variables: filteredVariables });
|
357
375
|
if (response.errors && response.errors.length > 0)
|
358
376
|
throw new Error(response.errors[0].message);
|
359
377
|
if (response && response.data && response.data.VerificationTokens) {
|
package/VerificationToken.d.ts
CHANGED
@@ -1,61 +1,71 @@
|
|
1
1
|
import { VerificationToken as VerificationTokenType } from './generated/typegraphql-prisma/models/VerificationToken';
|
2
|
+
import { ApolloClient } from '@apollo/client';
|
2
3
|
export declare const VerificationToken: {
|
3
4
|
/**
|
4
5
|
* Create a new VerificationToken record.
|
5
6
|
* @param props - Properties for the new record.
|
7
|
+
* @param client - Apollo Client instance.
|
6
8
|
* @returns The created VerificationToken or null.
|
7
9
|
*/
|
8
|
-
create(props: VerificationTokenType): Promise<VerificationTokenType>;
|
10
|
+
create(props: VerificationTokenType, globalClient?: ApolloClient<any>): Promise<VerificationTokenType>;
|
9
11
|
/**
|
10
12
|
* Create multiple VerificationToken records.
|
11
13
|
* @param props - Array of VerificationToken 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: VerificationTokenType[]): Promise<{
|
17
|
+
createMany(props: VerificationTokenType[], globalClient?: ApolloClient<any>): Promise<{
|
15
18
|
count: number;
|
16
19
|
} | null>;
|
17
20
|
/**
|
18
21
|
* Update a single VerificationToken record.
|
19
22
|
* @param props - Properties to update.
|
23
|
+
* @param globalClient - Apollo Client instance.
|
20
24
|
* @returns The updated VerificationToken or null.
|
21
25
|
*/
|
22
|
-
update(props: VerificationTokenType): Promise<VerificationTokenType>;
|
26
|
+
update(props: VerificationTokenType, globalClient?: ApolloClient<any>): Promise<VerificationTokenType>;
|
23
27
|
/**
|
24
28
|
* Upsert a single VerificationToken record.
|
25
29
|
* @param props - Properties to update.
|
30
|
+
* @param globalClient - Apollo Client instance.
|
26
31
|
* @returns The updated VerificationToken or null.
|
27
32
|
*/
|
28
|
-
upsert(props: VerificationTokenType): Promise<VerificationTokenType>;
|
33
|
+
upsert(props: VerificationTokenType, globalClient?: ApolloClient<any>): Promise<VerificationTokenType>;
|
29
34
|
/**
|
30
35
|
* Update multiple VerificationToken records.
|
31
36
|
* @param props - Array of VerificationToken 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: VerificationTokenType[]): Promise<{
|
40
|
+
updateMany(props: VerificationTokenType[], globalClient?: ApolloClient<any>): Promise<{
|
35
41
|
count: number;
|
36
42
|
} | null>;
|
37
43
|
/**
|
38
44
|
* Delete a single VerificationToken record.
|
39
45
|
* @param props - Properties to update.
|
46
|
+
* @param globalClient - Apollo Client instance.
|
40
47
|
* @returns The deleted VerificationToken or null.
|
41
48
|
*/
|
42
|
-
delete(props: VerificationTokenType): Promise<VerificationTokenType>;
|
49
|
+
delete(props: VerificationTokenType, globalClient?: ApolloClient<any>): Promise<VerificationTokenType>;
|
43
50
|
/**
|
44
51
|
* Retrieve a single VerificationToken record by ID.
|
45
52
|
* @param props - Properties to update.
|
53
|
+
* @param globalClient - Apollo Client instance.
|
46
54
|
* @returns The retrieved VerificationToken or null.
|
47
55
|
*/
|
48
|
-
get(props: VerificationTokenType): Promise<VerificationTokenType | null>;
|
56
|
+
get(props: VerificationTokenType, globalClient?: ApolloClient<any>): Promise<VerificationTokenType | null>;
|
49
57
|
/**
|
50
58
|
* Retrieve all VerificationTokens records.
|
59
|
+
* @param globalClient - Apollo Client instance.
|
51
60
|
* @returns An array of VerificationToken records or null.
|
52
61
|
*/
|
53
|
-
getAll(): Promise<VerificationTokenType[] | null>;
|
62
|
+
getAll(globalClient?: ApolloClient<any>): Promise<VerificationTokenType[] | null>;
|
54
63
|
/**
|
55
64
|
* Find multiple VerificationToken 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 VerificationToken records or null.
|
58
68
|
*/
|
59
|
-
findMany(props: VerificationTokenType): Promise<VerificationTokenType[] | null>;
|
69
|
+
findMany(props: VerificationTokenType, globalClient?: ApolloClient<any>): Promise<VerificationTokenType[] | null>;
|
60
70
|
};
|
61
71
|
//# sourceMappingURL=VerificationToken.d.ts.map
|