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/Position.cjs
CHANGED
@@ -93,9 +93,11 @@ exports.Position = {
|
|
93
93
|
/**
|
94
94
|
* Create a new Position record.
|
95
95
|
* @param props - Properties for the new record.
|
96
|
+
* @param client - Apollo Client instance.
|
96
97
|
* @returns The created Position or null.
|
97
98
|
*/
|
98
|
-
async create(props) {
|
99
|
+
async create(props, globalClient) {
|
100
|
+
const client = globalClient || client_2.client;
|
99
101
|
const CREATE_ONE_POSITION = (0, client_1.gql) `
|
100
102
|
mutation createOnePosition($data: PositionCreateInput!) {
|
101
103
|
createOnePosition(data: $data) {
|
@@ -1121,7 +1123,7 @@ exports.Position = {
|
|
1121
1123
|
};
|
1122
1124
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
1123
1125
|
try {
|
1124
|
-
const response = await
|
1126
|
+
const response = await client.mutate({ mutation: CREATE_ONE_POSITION, variables: filteredVariables });
|
1125
1127
|
if (response.errors && response.errors.length > 0)
|
1126
1128
|
throw new Error(response.errors[0].message);
|
1127
1129
|
if (response && response.data && response.data.createOnePosition) {
|
@@ -1139,9 +1141,11 @@ exports.Position = {
|
|
1139
1141
|
/**
|
1140
1142
|
* Create multiple Position records.
|
1141
1143
|
* @param props - Array of Position objects for the new records.
|
1144
|
+
* @param globalClient - Apollo Client instance.
|
1142
1145
|
* @returns The count of created records or null.
|
1143
1146
|
*/
|
1144
|
-
async createMany(props) {
|
1147
|
+
async createMany(props, globalClient) {
|
1148
|
+
const client = globalClient || client_2.client;
|
1145
1149
|
const CREATE_MANY_POSITION = (0, client_1.gql) `
|
1146
1150
|
mutation createManyPosition($data: [PositionCreateManyInput!]!) {
|
1147
1151
|
createManyPosition(data: $data) {
|
@@ -1170,7 +1174,7 @@ exports.Position = {
|
|
1170
1174
|
};
|
1171
1175
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
1172
1176
|
try {
|
1173
|
-
const response = await
|
1177
|
+
const response = await client.mutate({ mutation: CREATE_MANY_POSITION, variables: filteredVariables });
|
1174
1178
|
if (response.errors && response.errors.length > 0)
|
1175
1179
|
throw new Error(response.errors[0].message);
|
1176
1180
|
if (response && response.data && response.data.createManyPosition) {
|
@@ -1188,9 +1192,11 @@ exports.Position = {
|
|
1188
1192
|
/**
|
1189
1193
|
* Update a single Position record.
|
1190
1194
|
* @param props - Properties to update.
|
1195
|
+
* @param globalClient - Apollo Client instance.
|
1191
1196
|
* @returns The updated Position or null.
|
1192
1197
|
*/
|
1193
|
-
async update(props) {
|
1198
|
+
async update(props, globalClient) {
|
1199
|
+
const client = globalClient || client_2.client;
|
1194
1200
|
const UPDATE_ONE_POSITION = (0, client_1.gql) `
|
1195
1201
|
mutation updateOnePosition($data: PositionUpdateInput!, $where: PositionWhereUniqueInput!) {
|
1196
1202
|
updateOnePosition(data: $data, where: $where) {
|
@@ -5383,7 +5389,7 @@ exports.Position = {
|
|
5383
5389
|
};
|
5384
5390
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
5385
5391
|
try {
|
5386
|
-
const response = await
|
5392
|
+
const response = await client.mutate({ mutation: UPDATE_ONE_POSITION, variables: filteredVariables });
|
5387
5393
|
if (response.errors && response.errors.length > 0)
|
5388
5394
|
throw new Error(response.errors[0].message);
|
5389
5395
|
if (response && response.data && response.data.updateOnePosition) {
|
@@ -5401,9 +5407,11 @@ exports.Position = {
|
|
5401
5407
|
/**
|
5402
5408
|
* Upsert a single Position record.
|
5403
5409
|
* @param props - Properties to update.
|
5410
|
+
* @param globalClient - Apollo Client instance.
|
5404
5411
|
* @returns The updated Position or null.
|
5405
5412
|
*/
|
5406
|
-
async upsert(props) {
|
5413
|
+
async upsert(props, globalClient) {
|
5414
|
+
const client = globalClient || client_2.client;
|
5407
5415
|
const UPSERT_ONE_POSITION = (0, client_1.gql) `
|
5408
5416
|
mutation upsertOnePosition($where: PositionWhereUniqueInput!, $create: PositionCreateInput!, $update: PositionUpdateInput!) {
|
5409
5417
|
upsertOnePosition(where: $where, create: $create, update: $update) {
|
@@ -10601,7 +10609,7 @@ exports.Position = {
|
|
10601
10609
|
};
|
10602
10610
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
10603
10611
|
try {
|
10604
|
-
const response = await
|
10612
|
+
const response = await client.mutate({ mutation: UPSERT_ONE_POSITION, variables: filteredVariables });
|
10605
10613
|
if (response.errors && response.errors.length > 0)
|
10606
10614
|
throw new Error(response.errors[0].message);
|
10607
10615
|
if (response && response.data && response.data.upsertOnePosition) {
|
@@ -10619,9 +10627,11 @@ exports.Position = {
|
|
10619
10627
|
/**
|
10620
10628
|
* Update multiple Position records.
|
10621
10629
|
* @param props - Array of Position objects for the updated records.
|
10630
|
+
* @param globalClient - Apollo Client instance.
|
10622
10631
|
* @returns The count of created records or null.
|
10623
10632
|
*/
|
10624
|
-
async updateMany(props) {
|
10633
|
+
async updateMany(props, globalClient) {
|
10634
|
+
const client = globalClient || client_2.client;
|
10625
10635
|
const UPDATE_MANY_POSITION = (0, client_1.gql) `
|
10626
10636
|
mutation updateManyPosition($data: [PositionCreateManyInput!]!) {
|
10627
10637
|
updateManyPosition(data: $data) {
|
@@ -14814,7 +14824,7 @@ exports.Position = {
|
|
14814
14824
|
}));
|
14815
14825
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
14816
14826
|
try {
|
14817
|
-
const response = await
|
14827
|
+
const response = await client.mutate({ mutation: UPDATE_MANY_POSITION, variables: filteredVariables });
|
14818
14828
|
if (response.errors && response.errors.length > 0)
|
14819
14829
|
throw new Error(response.errors[0].message);
|
14820
14830
|
if (response && response.data && response.data.updateManyPosition) {
|
@@ -14832,9 +14842,11 @@ exports.Position = {
|
|
14832
14842
|
/**
|
14833
14843
|
* Delete a single Position record.
|
14834
14844
|
* @param props - Properties to update.
|
14845
|
+
* @param globalClient - Apollo Client instance.
|
14835
14846
|
* @returns The deleted Position or null.
|
14836
14847
|
*/
|
14837
|
-
async delete(props) {
|
14848
|
+
async delete(props, globalClient) {
|
14849
|
+
const client = globalClient || client_2.client;
|
14838
14850
|
const DELETE_ONE_POSITION = (0, client_1.gql) `
|
14839
14851
|
mutation deleteOnePosition($where: PositionWhereUniqueInput!) {
|
14840
14852
|
deleteOnePosition(where: $where) {
|
@@ -14848,7 +14860,7 @@ exports.Position = {
|
|
14848
14860
|
};
|
14849
14861
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
14850
14862
|
try {
|
14851
|
-
const response = await
|
14863
|
+
const response = await client.mutate({ mutation: DELETE_ONE_POSITION, variables: filteredVariables });
|
14852
14864
|
if (response.errors && response.errors.length > 0)
|
14853
14865
|
throw new Error(response.errors[0].message);
|
14854
14866
|
if (response && response.data && response.data.deleteOnePosition) {
|
@@ -14866,10 +14878,12 @@ exports.Position = {
|
|
14866
14878
|
/**
|
14867
14879
|
* Retrieve a single Position record by ID.
|
14868
14880
|
* @param props - Properties to update.
|
14881
|
+
* @param globalClient - Apollo Client instance.
|
14869
14882
|
* @returns The retrieved Position or null.
|
14870
14883
|
*/
|
14871
|
-
async get(props) {
|
14884
|
+
async get(props, globalClient) {
|
14872
14885
|
var _a, _b;
|
14886
|
+
const client = globalClient || client_2.client;
|
14873
14887
|
const GET_POSITION = (0, client_1.gql) `
|
14874
14888
|
query getPosition($where: PositionWhereUniqueInput!) {
|
14875
14889
|
getPosition(where: $where) {
|
@@ -14886,7 +14900,7 @@ exports.Position = {
|
|
14886
14900
|
};
|
14887
14901
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
14888
14902
|
try {
|
14889
|
-
const response = await
|
14903
|
+
const response = await client.query({ query: GET_POSITION, variables: filteredVariables });
|
14890
14904
|
if (response.errors && response.errors.length > 0)
|
14891
14905
|
throw new Error(response.errors[0].message);
|
14892
14906
|
return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.getPosition) !== null && _b !== void 0 ? _b : null;
|
@@ -14903,10 +14917,12 @@ exports.Position = {
|
|
14903
14917
|
},
|
14904
14918
|
/**
|
14905
14919
|
* Retrieve all Positions records.
|
14920
|
+
* @param globalClient - Apollo Client instance.
|
14906
14921
|
* @returns An array of Position records or null.
|
14907
14922
|
*/
|
14908
|
-
async getAll() {
|
14923
|
+
async getAll(globalClient) {
|
14909
14924
|
var _a, _b;
|
14925
|
+
const client = globalClient || client_2.client;
|
14910
14926
|
const GET_ALL_POSITION = (0, client_1.gql) `
|
14911
14927
|
query getAllPosition {
|
14912
14928
|
positions {
|
@@ -14914,7 +14930,7 @@ exports.Position = {
|
|
14914
14930
|
}
|
14915
14931
|
}`;
|
14916
14932
|
try {
|
14917
|
-
const response = await
|
14933
|
+
const response = await client.query({ query: GET_ALL_POSITION });
|
14918
14934
|
if (response.errors && response.errors.length > 0)
|
14919
14935
|
throw new Error(response.errors[0].message);
|
14920
14936
|
return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.positions) !== null && _b !== void 0 ? _b : null;
|
@@ -14932,9 +14948,11 @@ exports.Position = {
|
|
14932
14948
|
/**
|
14933
14949
|
* Find multiple Position records based on conditions.
|
14934
14950
|
* @param props - Conditions to find records.
|
14951
|
+
* @param globalClient - Apollo Client instance.
|
14935
14952
|
* @returns An array of found Position records or null.
|
14936
14953
|
*/
|
14937
|
-
async findMany(props) {
|
14954
|
+
async findMany(props, globalClient) {
|
14955
|
+
const client = globalClient || client_2.client;
|
14938
14956
|
const FIND_MANY_POSITION = (0, client_1.gql) `
|
14939
14957
|
query findManyPosition($where: PositionWhereInput!) {
|
14940
14958
|
positions(where: $where) {
|
@@ -14953,7 +14971,7 @@ exports.Position = {
|
|
14953
14971
|
};
|
14954
14972
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
14955
14973
|
try {
|
14956
|
-
const response = await
|
14974
|
+
const response = await client.query({ query: FIND_MANY_POSITION, variables: filteredVariables });
|
14957
14975
|
if (response.errors && response.errors.length > 0)
|
14958
14976
|
throw new Error(response.errors[0].message);
|
14959
14977
|
if (response && response.data && response.data.Positions) {
|
package/Position.d.ts
CHANGED
@@ -1,61 +1,71 @@
|
|
1
1
|
import { Position as PositionType } from './generated/typegraphql-prisma/models/Position';
|
2
|
+
import { ApolloClient } from '@apollo/client';
|
2
3
|
export declare const Position: {
|
3
4
|
/**
|
4
5
|
* Create a new Position record.
|
5
6
|
* @param props - Properties for the new record.
|
7
|
+
* @param client - Apollo Client instance.
|
6
8
|
* @returns The created Position or null.
|
7
9
|
*/
|
8
|
-
create(props: PositionType): Promise<PositionType>;
|
10
|
+
create(props: PositionType, globalClient?: ApolloClient<any>): Promise<PositionType>;
|
9
11
|
/**
|
10
12
|
* Create multiple Position records.
|
11
13
|
* @param props - Array of Position 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: PositionType[]): Promise<{
|
17
|
+
createMany(props: PositionType[], globalClient?: ApolloClient<any>): Promise<{
|
15
18
|
count: number;
|
16
19
|
} | null>;
|
17
20
|
/**
|
18
21
|
* Update a single Position record.
|
19
22
|
* @param props - Properties to update.
|
23
|
+
* @param globalClient - Apollo Client instance.
|
20
24
|
* @returns The updated Position or null.
|
21
25
|
*/
|
22
|
-
update(props: PositionType): Promise<PositionType>;
|
26
|
+
update(props: PositionType, globalClient?: ApolloClient<any>): Promise<PositionType>;
|
23
27
|
/**
|
24
28
|
* Upsert a single Position record.
|
25
29
|
* @param props - Properties to update.
|
30
|
+
* @param globalClient - Apollo Client instance.
|
26
31
|
* @returns The updated Position or null.
|
27
32
|
*/
|
28
|
-
upsert(props: PositionType): Promise<PositionType>;
|
33
|
+
upsert(props: PositionType, globalClient?: ApolloClient<any>): Promise<PositionType>;
|
29
34
|
/**
|
30
35
|
* Update multiple Position records.
|
31
36
|
* @param props - Array of Position 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: PositionType[]): Promise<{
|
40
|
+
updateMany(props: PositionType[], globalClient?: ApolloClient<any>): Promise<{
|
35
41
|
count: number;
|
36
42
|
} | null>;
|
37
43
|
/**
|
38
44
|
* Delete a single Position record.
|
39
45
|
* @param props - Properties to update.
|
46
|
+
* @param globalClient - Apollo Client instance.
|
40
47
|
* @returns The deleted Position or null.
|
41
48
|
*/
|
42
|
-
delete(props: PositionType): Promise<PositionType>;
|
49
|
+
delete(props: PositionType, globalClient?: ApolloClient<any>): Promise<PositionType>;
|
43
50
|
/**
|
44
51
|
* Retrieve a single Position record by ID.
|
45
52
|
* @param props - Properties to update.
|
53
|
+
* @param globalClient - Apollo Client instance.
|
46
54
|
* @returns The retrieved Position or null.
|
47
55
|
*/
|
48
|
-
get(props: PositionType): Promise<PositionType | null>;
|
56
|
+
get(props: PositionType, globalClient?: ApolloClient<any>): Promise<PositionType | null>;
|
49
57
|
/**
|
50
58
|
* Retrieve all Positions records.
|
59
|
+
* @param globalClient - Apollo Client instance.
|
51
60
|
* @returns An array of Position records or null.
|
52
61
|
*/
|
53
|
-
getAll(): Promise<PositionType[] | null>;
|
62
|
+
getAll(globalClient?: ApolloClient<any>): Promise<PositionType[] | null>;
|
54
63
|
/**
|
55
64
|
* Find multiple Position 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 Position records or null.
|
58
68
|
*/
|
59
|
-
findMany(props: PositionType): Promise<PositionType[] | null>;
|
69
|
+
findMany(props: PositionType, globalClient?: ApolloClient<any>): Promise<PositionType[] | null>;
|
60
70
|
};
|
61
71
|
//# sourceMappingURL=Position.d.ts.map
|
package/ScheduledOptionOrder.cjs
CHANGED
@@ -18,9 +18,11 @@ exports.ScheduledOptionOrder = {
|
|
18
18
|
/**
|
19
19
|
* Create a new ScheduledOptionOrder record.
|
20
20
|
* @param props - Properties for the new record.
|
21
|
+
* @param client - Apollo Client instance.
|
21
22
|
* @returns The created ScheduledOptionOrder or null.
|
22
23
|
*/
|
23
|
-
async create(props) {
|
24
|
+
async create(props, globalClient) {
|
25
|
+
const client = globalClient || client_2.client;
|
24
26
|
const CREATE_ONE_SCHEDULEDOPTIONORDER = (0, client_1.gql) `
|
25
27
|
mutation createOneScheduledOptionOrder($data: ScheduledOptionOrderCreateInput!) {
|
26
28
|
createOneScheduledOptionOrder(data: $data) {
|
@@ -36,7 +38,7 @@ exports.ScheduledOptionOrder = {
|
|
36
38
|
};
|
37
39
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
38
40
|
try {
|
39
|
-
const response = await
|
41
|
+
const response = await client.mutate({ mutation: CREATE_ONE_SCHEDULEDOPTIONORDER, variables: filteredVariables });
|
40
42
|
if (response.errors && response.errors.length > 0)
|
41
43
|
throw new Error(response.errors[0].message);
|
42
44
|
if (response && response.data && response.data.createOneScheduledOptionOrder) {
|
@@ -54,9 +56,11 @@ exports.ScheduledOptionOrder = {
|
|
54
56
|
/**
|
55
57
|
* Create multiple ScheduledOptionOrder records.
|
56
58
|
* @param props - Array of ScheduledOptionOrder objects for the new records.
|
59
|
+
* @param globalClient - Apollo Client instance.
|
57
60
|
* @returns The count of created records or null.
|
58
61
|
*/
|
59
|
-
async createMany(props) {
|
62
|
+
async createMany(props, globalClient) {
|
63
|
+
const client = globalClient || client_2.client;
|
60
64
|
const CREATE_MANY_SCHEDULEDOPTIONORDER = (0, client_1.gql) `
|
61
65
|
mutation createManyScheduledOptionOrder($data: [ScheduledOptionOrderCreateManyInput!]!) {
|
62
66
|
createManyScheduledOptionOrder(data: $data) {
|
@@ -71,7 +75,7 @@ exports.ScheduledOptionOrder = {
|
|
71
75
|
};
|
72
76
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
73
77
|
try {
|
74
|
-
const response = await
|
78
|
+
const response = await client.mutate({ mutation: CREATE_MANY_SCHEDULEDOPTIONORDER, variables: filteredVariables });
|
75
79
|
if (response.errors && response.errors.length > 0)
|
76
80
|
throw new Error(response.errors[0].message);
|
77
81
|
if (response && response.data && response.data.createManyScheduledOptionOrder) {
|
@@ -89,9 +93,11 @@ exports.ScheduledOptionOrder = {
|
|
89
93
|
/**
|
90
94
|
* Update a single ScheduledOptionOrder record.
|
91
95
|
* @param props - Properties to update.
|
96
|
+
* @param globalClient - Apollo Client instance.
|
92
97
|
* @returns The updated ScheduledOptionOrder or null.
|
93
98
|
*/
|
94
|
-
async update(props) {
|
99
|
+
async update(props, globalClient) {
|
100
|
+
const client = globalClient || client_2.client;
|
95
101
|
const UPDATE_ONE_SCHEDULEDOPTIONORDER = (0, client_1.gql) `
|
96
102
|
mutation updateOneScheduledOptionOrder($data: ScheduledOptionOrderUpdateInput!, $where: ScheduledOptionOrderWhereUniqueInput!) {
|
97
103
|
updateOneScheduledOptionOrder(data: $data, where: $where) {
|
@@ -116,7 +122,7 @@ exports.ScheduledOptionOrder = {
|
|
116
122
|
};
|
117
123
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
118
124
|
try {
|
119
|
-
const response = await
|
125
|
+
const response = await client.mutate({ mutation: UPDATE_ONE_SCHEDULEDOPTIONORDER, variables: filteredVariables });
|
120
126
|
if (response.errors && response.errors.length > 0)
|
121
127
|
throw new Error(response.errors[0].message);
|
122
128
|
if (response && response.data && response.data.updateOneScheduledOptionOrder) {
|
@@ -134,9 +140,11 @@ exports.ScheduledOptionOrder = {
|
|
134
140
|
/**
|
135
141
|
* Upsert a single ScheduledOptionOrder record.
|
136
142
|
* @param props - Properties to update.
|
143
|
+
* @param globalClient - Apollo Client instance.
|
137
144
|
* @returns The updated ScheduledOptionOrder or null.
|
138
145
|
*/
|
139
|
-
async upsert(props) {
|
146
|
+
async upsert(props, globalClient) {
|
147
|
+
const client = globalClient || client_2.client;
|
140
148
|
const UPSERT_ONE_SCHEDULEDOPTIONORDER = (0, client_1.gql) `
|
141
149
|
mutation upsertOneScheduledOptionOrder($where: ScheduledOptionOrderWhereUniqueInput!, $create: ScheduledOptionOrderCreateInput!, $update: ScheduledOptionOrderUpdateInput!) {
|
142
150
|
upsertOneScheduledOptionOrder(where: $where, create: $create, update: $update) {
|
@@ -162,7 +170,7 @@ exports.ScheduledOptionOrder = {
|
|
162
170
|
};
|
163
171
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
164
172
|
try {
|
165
|
-
const response = await
|
173
|
+
const response = await client.mutate({ mutation: UPSERT_ONE_SCHEDULEDOPTIONORDER, variables: filteredVariables });
|
166
174
|
if (response.errors && response.errors.length > 0)
|
167
175
|
throw new Error(response.errors[0].message);
|
168
176
|
if (response && response.data && response.data.upsertOneScheduledOptionOrder) {
|
@@ -180,9 +188,11 @@ exports.ScheduledOptionOrder = {
|
|
180
188
|
/**
|
181
189
|
* Update multiple ScheduledOptionOrder records.
|
182
190
|
* @param props - Array of ScheduledOptionOrder objects for the updated records.
|
191
|
+
* @param globalClient - Apollo Client instance.
|
183
192
|
* @returns The count of created records or null.
|
184
193
|
*/
|
185
|
-
async updateMany(props) {
|
194
|
+
async updateMany(props, globalClient) {
|
195
|
+
const client = globalClient || client_2.client;
|
186
196
|
const UPDATE_MANY_SCHEDULEDOPTIONORDER = (0, client_1.gql) `
|
187
197
|
mutation updateManyScheduledOptionOrder($data: [ScheduledOptionOrderCreateManyInput!]!) {
|
188
198
|
updateManyScheduledOptionOrder(data: $data) {
|
@@ -207,7 +217,7 @@ exports.ScheduledOptionOrder = {
|
|
207
217
|
}));
|
208
218
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
209
219
|
try {
|
210
|
-
const response = await
|
220
|
+
const response = await client.mutate({ mutation: UPDATE_MANY_SCHEDULEDOPTIONORDER, variables: filteredVariables });
|
211
221
|
if (response.errors && response.errors.length > 0)
|
212
222
|
throw new Error(response.errors[0].message);
|
213
223
|
if (response && response.data && response.data.updateManyScheduledOptionOrder) {
|
@@ -225,9 +235,11 @@ exports.ScheduledOptionOrder = {
|
|
225
235
|
/**
|
226
236
|
* Delete a single ScheduledOptionOrder record.
|
227
237
|
* @param props - Properties to update.
|
238
|
+
* @param globalClient - Apollo Client instance.
|
228
239
|
* @returns The deleted ScheduledOptionOrder or null.
|
229
240
|
*/
|
230
|
-
async delete(props) {
|
241
|
+
async delete(props, globalClient) {
|
242
|
+
const client = globalClient || client_2.client;
|
231
243
|
const DELETE_ONE_SCHEDULEDOPTIONORDER = (0, client_1.gql) `
|
232
244
|
mutation deleteOneScheduledOptionOrder($where: ScheduledOptionOrderWhereUniqueInput!) {
|
233
245
|
deleteOneScheduledOptionOrder(where: $where) {
|
@@ -241,7 +253,7 @@ exports.ScheduledOptionOrder = {
|
|
241
253
|
};
|
242
254
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
243
255
|
try {
|
244
|
-
const response = await
|
256
|
+
const response = await client.mutate({ mutation: DELETE_ONE_SCHEDULEDOPTIONORDER, variables: filteredVariables });
|
245
257
|
if (response.errors && response.errors.length > 0)
|
246
258
|
throw new Error(response.errors[0].message);
|
247
259
|
if (response && response.data && response.data.deleteOneScheduledOptionOrder) {
|
@@ -259,10 +271,12 @@ exports.ScheduledOptionOrder = {
|
|
259
271
|
/**
|
260
272
|
* Retrieve a single ScheduledOptionOrder record by ID.
|
261
273
|
* @param props - Properties to update.
|
274
|
+
* @param globalClient - Apollo Client instance.
|
262
275
|
* @returns The retrieved ScheduledOptionOrder or null.
|
263
276
|
*/
|
264
|
-
async get(props) {
|
277
|
+
async get(props, globalClient) {
|
265
278
|
var _a, _b;
|
279
|
+
const client = globalClient || client_2.client;
|
266
280
|
const GET_SCHEDULEDOPTIONORDER = (0, client_1.gql) `
|
267
281
|
query getScheduledOptionOrder($where: ScheduledOptionOrderWhereUniqueInput!) {
|
268
282
|
getScheduledOptionOrder(where: $where) {
|
@@ -276,7 +290,7 @@ exports.ScheduledOptionOrder = {
|
|
276
290
|
};
|
277
291
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
278
292
|
try {
|
279
|
-
const response = await
|
293
|
+
const response = await client.query({ query: GET_SCHEDULEDOPTIONORDER, variables: filteredVariables });
|
280
294
|
if (response.errors && response.errors.length > 0)
|
281
295
|
throw new Error(response.errors[0].message);
|
282
296
|
return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.getScheduledOptionOrder) !== null && _b !== void 0 ? _b : null;
|
@@ -293,10 +307,12 @@ exports.ScheduledOptionOrder = {
|
|
293
307
|
},
|
294
308
|
/**
|
295
309
|
* Retrieve all ScheduledOptionOrders records.
|
310
|
+
* @param globalClient - Apollo Client instance.
|
296
311
|
* @returns An array of ScheduledOptionOrder records or null.
|
297
312
|
*/
|
298
|
-
async getAll() {
|
313
|
+
async getAll(globalClient) {
|
299
314
|
var _a, _b;
|
315
|
+
const client = globalClient || client_2.client;
|
300
316
|
const GET_ALL_SCHEDULEDOPTIONORDER = (0, client_1.gql) `
|
301
317
|
query getAllScheduledOptionOrder {
|
302
318
|
scheduledOptionOrders {
|
@@ -304,7 +320,7 @@ exports.ScheduledOptionOrder = {
|
|
304
320
|
}
|
305
321
|
}`;
|
306
322
|
try {
|
307
|
-
const response = await
|
323
|
+
const response = await client.query({ query: GET_ALL_SCHEDULEDOPTIONORDER });
|
308
324
|
if (response.errors && response.errors.length > 0)
|
309
325
|
throw new Error(response.errors[0].message);
|
310
326
|
return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.scheduledOptionOrders) !== null && _b !== void 0 ? _b : null;
|
@@ -322,9 +338,11 @@ exports.ScheduledOptionOrder = {
|
|
322
338
|
/**
|
323
339
|
* Find multiple ScheduledOptionOrder records based on conditions.
|
324
340
|
* @param props - Conditions to find records.
|
341
|
+
* @param globalClient - Apollo Client instance.
|
325
342
|
* @returns An array of found ScheduledOptionOrder records or null.
|
326
343
|
*/
|
327
|
-
async findMany(props) {
|
344
|
+
async findMany(props, globalClient) {
|
345
|
+
const client = globalClient || client_2.client;
|
328
346
|
const FIND_MANY_SCHEDULEDOPTIONORDER = (0, client_1.gql) `
|
329
347
|
query findManyScheduledOptionOrder($where: ScheduledOptionOrderWhereInput!) {
|
330
348
|
scheduledOptionOrders(where: $where) {
|
@@ -340,7 +358,7 @@ exports.ScheduledOptionOrder = {
|
|
340
358
|
};
|
341
359
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
342
360
|
try {
|
343
|
-
const response = await
|
361
|
+
const response = await client.query({ query: FIND_MANY_SCHEDULEDOPTIONORDER, variables: filteredVariables });
|
344
362
|
if (response.errors && response.errors.length > 0)
|
345
363
|
throw new Error(response.errors[0].message);
|
346
364
|
if (response && response.data && response.data.ScheduledOptionOrders) {
|
@@ -1,61 +1,71 @@
|
|
1
1
|
import { ScheduledOptionOrder as ScheduledOptionOrderType } from './generated/typegraphql-prisma/models/ScheduledOptionOrder';
|
2
|
+
import { ApolloClient } from '@apollo/client';
|
2
3
|
export declare const ScheduledOptionOrder: {
|
3
4
|
/**
|
4
5
|
* Create a new ScheduledOptionOrder record.
|
5
6
|
* @param props - Properties for the new record.
|
7
|
+
* @param client - Apollo Client instance.
|
6
8
|
* @returns The created ScheduledOptionOrder or null.
|
7
9
|
*/
|
8
|
-
create(props: ScheduledOptionOrderType): Promise<ScheduledOptionOrderType>;
|
10
|
+
create(props: ScheduledOptionOrderType, globalClient?: ApolloClient<any>): Promise<ScheduledOptionOrderType>;
|
9
11
|
/**
|
10
12
|
* Create multiple ScheduledOptionOrder records.
|
11
13
|
* @param props - Array of ScheduledOptionOrder 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: ScheduledOptionOrderType[]): Promise<{
|
17
|
+
createMany(props: ScheduledOptionOrderType[], globalClient?: ApolloClient<any>): Promise<{
|
15
18
|
count: number;
|
16
19
|
} | null>;
|
17
20
|
/**
|
18
21
|
* Update a single ScheduledOptionOrder record.
|
19
22
|
* @param props - Properties to update.
|
23
|
+
* @param globalClient - Apollo Client instance.
|
20
24
|
* @returns The updated ScheduledOptionOrder or null.
|
21
25
|
*/
|
22
|
-
update(props: ScheduledOptionOrderType): Promise<ScheduledOptionOrderType>;
|
26
|
+
update(props: ScheduledOptionOrderType, globalClient?: ApolloClient<any>): Promise<ScheduledOptionOrderType>;
|
23
27
|
/**
|
24
28
|
* Upsert a single ScheduledOptionOrder record.
|
25
29
|
* @param props - Properties to update.
|
30
|
+
* @param globalClient - Apollo Client instance.
|
26
31
|
* @returns The updated ScheduledOptionOrder or null.
|
27
32
|
*/
|
28
|
-
upsert(props: ScheduledOptionOrderType): Promise<ScheduledOptionOrderType>;
|
33
|
+
upsert(props: ScheduledOptionOrderType, globalClient?: ApolloClient<any>): Promise<ScheduledOptionOrderType>;
|
29
34
|
/**
|
30
35
|
* Update multiple ScheduledOptionOrder records.
|
31
36
|
* @param props - Array of ScheduledOptionOrder 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: ScheduledOptionOrderType[]): Promise<{
|
40
|
+
updateMany(props: ScheduledOptionOrderType[], globalClient?: ApolloClient<any>): Promise<{
|
35
41
|
count: number;
|
36
42
|
} | null>;
|
37
43
|
/**
|
38
44
|
* Delete a single ScheduledOptionOrder record.
|
39
45
|
* @param props - Properties to update.
|
46
|
+
* @param globalClient - Apollo Client instance.
|
40
47
|
* @returns The deleted ScheduledOptionOrder or null.
|
41
48
|
*/
|
42
|
-
delete(props: ScheduledOptionOrderType): Promise<ScheduledOptionOrderType>;
|
49
|
+
delete(props: ScheduledOptionOrderType, globalClient?: ApolloClient<any>): Promise<ScheduledOptionOrderType>;
|
43
50
|
/**
|
44
51
|
* Retrieve a single ScheduledOptionOrder record by ID.
|
45
52
|
* @param props - Properties to update.
|
53
|
+
* @param globalClient - Apollo Client instance.
|
46
54
|
* @returns The retrieved ScheduledOptionOrder or null.
|
47
55
|
*/
|
48
|
-
get(props: ScheduledOptionOrderType): Promise<ScheduledOptionOrderType | null>;
|
56
|
+
get(props: ScheduledOptionOrderType, globalClient?: ApolloClient<any>): Promise<ScheduledOptionOrderType | null>;
|
49
57
|
/**
|
50
58
|
* Retrieve all ScheduledOptionOrders records.
|
59
|
+
* @param globalClient - Apollo Client instance.
|
51
60
|
* @returns An array of ScheduledOptionOrder records or null.
|
52
61
|
*/
|
53
|
-
getAll(): Promise<ScheduledOptionOrderType[] | null>;
|
62
|
+
getAll(globalClient?: ApolloClient<any>): Promise<ScheduledOptionOrderType[] | null>;
|
54
63
|
/**
|
55
64
|
* Find multiple ScheduledOptionOrder 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 ScheduledOptionOrder records or null.
|
58
68
|
*/
|
59
|
-
findMany(props: ScheduledOptionOrderType): Promise<ScheduledOptionOrderType[] | null>;
|
69
|
+
findMany(props: ScheduledOptionOrderType, globalClient?: ApolloClient<any>): Promise<ScheduledOptionOrderType[] | null>;
|
60
70
|
};
|
61
71
|
//# sourceMappingURL=ScheduledOptionOrder.d.ts.map
|