@ludo.ninja/api 2.8.57 → 2.8.59
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/build/config/index.js +43 -83
- package/build/graphql_tools/__generated__/adminHost/schema.d.ts +91 -0
- package/build/graphql_tools/__generated__/adminHost/schema.js +47 -2
- package/build/index.d.ts +19 -0
- package/package.json +1 -1
- package/src/config/index.ts +71 -125
- package/src/graphql_tools/__generated__/adminHost/schema.ts +112 -0
- package/tsconfig.tsbuildinfo +1 -1
package/src/config/index.ts
CHANGED
|
@@ -7,17 +7,17 @@ import {
|
|
|
7
7
|
split,
|
|
8
8
|
ApolloLink,
|
|
9
9
|
} from "@apollo/client";
|
|
10
|
-
import {onError} from "@apollo/client/link/error";
|
|
11
|
-
import {setContext} from "@apollo/client/link/context";
|
|
12
|
-
import {createUploadLink} from "apollo-upload-client";
|
|
10
|
+
import { onError } from "@apollo/client/link/error";
|
|
11
|
+
import { setContext } from "@apollo/client/link/context";
|
|
12
|
+
import { createUploadLink } from "apollo-upload-client";
|
|
13
13
|
import merge from "deepmerge";
|
|
14
14
|
import isEqual from "lodash.isequal";
|
|
15
|
-
import {destroyCookies, getCookies, refreshCookies} from "../cookies";
|
|
16
|
-
import {typePoliciesPortal} from "./typePolicies";
|
|
17
|
-
import {GraphQLWsLink} from "@apollo/client/link/subscriptions";
|
|
18
|
-
import {getMainDefinition} from "@apollo/client/utilities";
|
|
19
|
-
import {createClient} from "graphql-ws";
|
|
20
|
-
import {hosts, authSchema as schema} from "../index";
|
|
15
|
+
import { destroyCookies, getCookies, refreshCookies } from "../cookies";
|
|
16
|
+
import { typePoliciesPortal } from "./typePolicies";
|
|
17
|
+
import { GraphQLWsLink } from "@apollo/client/link/subscriptions";
|
|
18
|
+
import { getMainDefinition } from "@apollo/client/utilities";
|
|
19
|
+
import { createClient } from "graphql-ws";
|
|
20
|
+
import { hosts, authSchema as schema } from "../index";
|
|
21
21
|
|
|
22
22
|
let isRefreshing = false;
|
|
23
23
|
let pendingRequests: never[] = [];
|
|
@@ -30,63 +30,59 @@ const resolvePendingRequests = () => {
|
|
|
30
30
|
|
|
31
31
|
let apolloClient: ApolloClient<NormalizedCacheObject> | undefined;
|
|
32
32
|
|
|
33
|
-
const
|
|
34
|
-
const {
|
|
33
|
+
const handleTokenRefresh = (operation: any, forward: any) => {
|
|
34
|
+
const { refreshToken } = getCookies();
|
|
35
|
+
const client = apolloClient ?? createApolloClient();
|
|
36
|
+
|
|
37
|
+
if (!isRefreshing) {
|
|
38
|
+
isRefreshing = true;
|
|
39
|
+
return fromPromise(
|
|
40
|
+
client
|
|
41
|
+
.mutate({
|
|
42
|
+
context: { uri: hosts.authHost },
|
|
43
|
+
variables: { refreshToken },
|
|
44
|
+
mutation: schema.RefreshTokenDocument,
|
|
45
|
+
})
|
|
46
|
+
.then(({ data: { refreshToken: { tokenAuth, tokenRefresh } } }) => {
|
|
47
|
+
refreshCookies(tokenAuth, tokenRefresh, mainDomain);
|
|
48
|
+
resolvePendingRequests();
|
|
49
|
+
return true;
|
|
50
|
+
})
|
|
51
|
+
.catch(async () => {
|
|
52
|
+
await apolloClient?.mutate({
|
|
53
|
+
context: { uri: hosts.authHost },
|
|
54
|
+
mutation: schema.RevokeTokenDocument,
|
|
55
|
+
});
|
|
56
|
+
destroyCookies(mainDomain);
|
|
57
|
+
pendingRequests = [];
|
|
58
|
+
window.location.reload();
|
|
59
|
+
return false;
|
|
60
|
+
})
|
|
61
|
+
.finally(() => {
|
|
62
|
+
isRefreshing = false;
|
|
63
|
+
})
|
|
64
|
+
).filter((value) => Boolean(value));
|
|
65
|
+
} else {
|
|
66
|
+
return fromPromise(
|
|
67
|
+
new Promise((resolve) => {
|
|
68
|
+
// @ts-ignore
|
|
69
|
+
pendingRequests.push(() => resolve());
|
|
70
|
+
})
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const errorLink = onError(({ graphQLErrors, networkError, operation, forward }) => {
|
|
76
|
+
const { authToken } = getCookies();
|
|
35
77
|
|
|
36
78
|
if (graphQLErrors) {
|
|
37
|
-
graphQLErrors.forEach(({message, locations, path}) =>
|
|
38
|
-
console.warn(`[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`)
|
|
79
|
+
graphQLErrors.forEach(({ message, locations, path }) =>
|
|
80
|
+
console.warn(`[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`)
|
|
39
81
|
);
|
|
40
82
|
|
|
41
83
|
for (const err of graphQLErrors) {
|
|
42
84
|
if (err.message.includes("Auth token not found") && authToken) {
|
|
43
|
-
|
|
44
|
-
const client = apolloClient ?? createApolloClient();
|
|
45
|
-
if (!isRefreshing) {
|
|
46
|
-
isRefreshing = true;
|
|
47
|
-
forward$ = fromPromise(
|
|
48
|
-
client
|
|
49
|
-
.mutate({
|
|
50
|
-
context: {uri: hosts.authHost},
|
|
51
|
-
variables: {refreshToken},
|
|
52
|
-
mutation: schema.RefreshTokenDocument,
|
|
53
|
-
})
|
|
54
|
-
.then(
|
|
55
|
-
({
|
|
56
|
-
data: {
|
|
57
|
-
refreshToken: {tokenAuth, tokenRefresh},
|
|
58
|
-
},
|
|
59
|
-
}) => {
|
|
60
|
-
refreshCookies(tokenAuth, tokenRefresh, mainDomain);
|
|
61
|
-
resolvePendingRequests();
|
|
62
|
-
return true;
|
|
63
|
-
},
|
|
64
|
-
)
|
|
65
|
-
.catch(async () => {
|
|
66
|
-
await apolloClient?.mutate({
|
|
67
|
-
context: {uri: hosts.authHost},
|
|
68
|
-
mutation: schema.RevokeTokenDocument,
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
destroyCookies(mainDomain);
|
|
72
|
-
pendingRequests = [];
|
|
73
|
-
window.location.reload();
|
|
74
|
-
return false;
|
|
75
|
-
})
|
|
76
|
-
.finally(() => {
|
|
77
|
-
isRefreshing = false;
|
|
78
|
-
}),
|
|
79
|
-
).filter((value) => Boolean(value));
|
|
80
|
-
} else {
|
|
81
|
-
forward$ = fromPromise(
|
|
82
|
-
new Promise((resolve) => {
|
|
83
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
84
|
-
// @ts-ignore
|
|
85
|
-
pendingRequests.push(() => resolve());
|
|
86
|
-
}),
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
return forward$.flatMap(() => forward(operation));
|
|
85
|
+
return handleTokenRefresh(operation, forward).flatMap(() => forward(operation));
|
|
90
86
|
}
|
|
91
87
|
}
|
|
92
88
|
}
|
|
@@ -94,66 +90,24 @@ const errorLink = onError(({graphQLErrors, networkError, operation, forward}) =>
|
|
|
94
90
|
if (networkError) {
|
|
95
91
|
console.warn(`[Network error]: ${networkError}`);
|
|
96
92
|
|
|
93
|
+
if (networkError.message.includes("503")) {
|
|
94
|
+
console.error(`[503 Service Unavailable]: ${networkError.message}`);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
97
|
if (networkError.message.includes("401") && authToken) {
|
|
98
|
-
|
|
99
|
-
const client = apolloClient ?? createApolloClient();
|
|
100
|
-
if (!isRefreshing) {
|
|
101
|
-
isRefreshing = true;
|
|
102
|
-
forward$ = fromPromise(
|
|
103
|
-
client
|
|
104
|
-
.mutate({
|
|
105
|
-
context: {uri: hosts.authHost},
|
|
106
|
-
variables: {refreshToken},
|
|
107
|
-
mutation: schema.RefreshTokenDocument,
|
|
108
|
-
})
|
|
109
|
-
.then(
|
|
110
|
-
({
|
|
111
|
-
data: {
|
|
112
|
-
refreshToken: {tokenAuth, tokenRefresh},
|
|
113
|
-
},
|
|
114
|
-
}) => {
|
|
115
|
-
refreshCookies(tokenAuth, tokenRefresh, mainDomain);
|
|
116
|
-
resolvePendingRequests();
|
|
117
|
-
return true;
|
|
118
|
-
},
|
|
119
|
-
)
|
|
120
|
-
.catch(async () => {
|
|
121
|
-
await apolloClient?.mutate({
|
|
122
|
-
context: {uri: hosts.authHost},
|
|
123
|
-
mutation: schema.RevokeTokenDocument,
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
destroyCookies(mainDomain);
|
|
127
|
-
pendingRequests = [];
|
|
128
|
-
window.location.reload();
|
|
129
|
-
return false;
|
|
130
|
-
})
|
|
131
|
-
.finally(() => {
|
|
132
|
-
isRefreshing = false;
|
|
133
|
-
}),
|
|
134
|
-
).filter((value) => Boolean(value));
|
|
135
|
-
} else {
|
|
136
|
-
forward$ = fromPromise(
|
|
137
|
-
new Promise((resolve) => {
|
|
138
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
139
|
-
// @ts-ignore
|
|
140
|
-
pendingRequests.push(() => resolve());
|
|
141
|
-
}),
|
|
142
|
-
);
|
|
143
|
-
}
|
|
144
|
-
return forward$.flatMap(() => forward(operation));
|
|
98
|
+
return handleTokenRefresh(operation, forward).flatMap(() => forward(operation));
|
|
145
99
|
}
|
|
146
100
|
}
|
|
147
101
|
});
|
|
148
102
|
|
|
149
|
-
const authLink = setContext(async (operation, {headers}) => {
|
|
150
|
-
const {authToken} = getCookies();
|
|
103
|
+
const authLink = setContext(async (operation, { headers }) => {
|
|
104
|
+
const { authToken } = getCookies();
|
|
151
105
|
|
|
152
106
|
const header = authToken
|
|
153
107
|
? {
|
|
154
|
-
headers: {...headers, "x-client-authorization": `${authToken}`},
|
|
108
|
+
headers: { ...headers, "x-client-authorization": `${authToken}` },
|
|
155
109
|
}
|
|
156
|
-
: {headers: {...headers}};
|
|
110
|
+
: { headers: { ...headers } };
|
|
157
111
|
|
|
158
112
|
return {
|
|
159
113
|
headers: header.headers,
|
|
@@ -174,7 +128,7 @@ const wsLink =
|
|
|
174
128
|
connected: () => console.log("GraphQLWsLink connected"),
|
|
175
129
|
closed: () => console.log("GraphQLWsLink closed"),
|
|
176
130
|
},
|
|
177
|
-
})
|
|
131
|
+
})
|
|
178
132
|
)
|
|
179
133
|
: null;
|
|
180
134
|
|
|
@@ -183,12 +137,12 @@ const opsLink: ApolloLink = from([errorLink, authLink, httpLink as unknown as Ap
|
|
|
183
137
|
const terminatingLink =
|
|
184
138
|
typeof window !== "undefined" && wsLink !== null
|
|
185
139
|
? split(
|
|
186
|
-
({query}) => {
|
|
140
|
+
({ query }) => {
|
|
187
141
|
const definition = getMainDefinition(query);
|
|
188
142
|
return definition.kind === "OperationDefinition" && definition.operation === "subscription";
|
|
189
143
|
},
|
|
190
144
|
wsLink,
|
|
191
|
-
opsLink
|
|
145
|
+
opsLink
|
|
192
146
|
)
|
|
193
147
|
: httpLink;
|
|
194
148
|
|
|
@@ -198,8 +152,8 @@ function createApolloClient() {
|
|
|
198
152
|
link: terminatingLink as ApolloLink,
|
|
199
153
|
cache: new InMemoryCache({
|
|
200
154
|
typePolicies: typePoliciesPortal,
|
|
201
|
-
|
|
202
|
-
|
|
155
|
+
addTypename: true,
|
|
156
|
+
resultCaching: true,
|
|
203
157
|
}),
|
|
204
158
|
});
|
|
205
159
|
}
|
|
@@ -208,27 +162,19 @@ export function initializeApollo(initialState = null, domain?: string) {
|
|
|
208
162
|
const _apolloClient = apolloClient ?? createApolloClient();
|
|
209
163
|
mainDomain = domain || '';
|
|
210
164
|
|
|
211
|
-
// If your page has Next.js data fetching methods that use Apollo Client, the initial state
|
|
212
|
-
// gets hydrated here
|
|
213
165
|
if (initialState) {
|
|
214
|
-
// Get existing cache, loaded during client side data fetching
|
|
215
166
|
const existingCache = _apolloClient.extract();
|
|
216
|
-
|
|
217
|
-
// Merge the initialState from getStaticProps/getServerSideProps in the existing cache
|
|
218
167
|
const data = merge(existingCache, initialState, {
|
|
219
|
-
// combine arrays using object equality (like in sets)
|
|
220
168
|
arrayMerge: (destinationArray, sourceArray) => [
|
|
221
169
|
...sourceArray,
|
|
222
170
|
...destinationArray.filter((d) => sourceArray.every((s) => !isEqual(d, s))),
|
|
223
171
|
],
|
|
224
172
|
});
|
|
225
173
|
|
|
226
|
-
// Restore the cache with the merged data
|
|
227
174
|
_apolloClient.cache.restore(data);
|
|
228
175
|
}
|
|
229
|
-
|
|
176
|
+
|
|
230
177
|
if (typeof window === "undefined") return _apolloClient;
|
|
231
|
-
// Create the Apollo Client once in the client
|
|
232
178
|
if (!apolloClient) apolloClient = _apolloClient;
|
|
233
179
|
|
|
234
180
|
return _apolloClient;
|
|
@@ -554,6 +554,7 @@ export type IQuery = {
|
|
|
554
554
|
fetchFormOpportunityPage: IFormOpportunityPage;
|
|
555
555
|
fetchPartnershipInquiryPage: IPartnershipInquiryPage;
|
|
556
556
|
fetchUserFeedbackPage: IUserFeedbackPage;
|
|
557
|
+
fetchRegistrationInvitePage: IRegistrationInvitePage;
|
|
557
558
|
fetchAdminInvitesPage: IInvitesPage;
|
|
558
559
|
fetchAdminOpportunitiesPage: IOpportunitiesPage;
|
|
559
560
|
fetchAdminCategories: Array<IAdminCategory>;
|
|
@@ -609,6 +610,13 @@ export type IQueryFetchUserFeedbackPageArgs = {
|
|
|
609
610
|
};
|
|
610
611
|
|
|
611
612
|
|
|
613
|
+
export type IQueryFetchRegistrationInvitePageArgs = {
|
|
614
|
+
filter: IRegistrationInviteFilterInput;
|
|
615
|
+
sort: IRegistrationInviteSortInput;
|
|
616
|
+
page: IAdminPageInput;
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
|
|
612
620
|
export type IQueryFetchAdminInvitesPageArgs = {
|
|
613
621
|
filter: IInvitesFilterInput;
|
|
614
622
|
sort: IInvitesSortInput;
|
|
@@ -682,6 +690,29 @@ export type IReferredUsersInfo = {
|
|
|
682
690
|
referredUsersPerUrlNum: Scalars['Int'];
|
|
683
691
|
};
|
|
684
692
|
|
|
693
|
+
export type IRegistrationInvite = {
|
|
694
|
+
id: Scalars['String'];
|
|
695
|
+
userId?: Maybe<Scalars['String']>;
|
|
696
|
+
ludoIdOrAddress?: Maybe<Scalars['String']>;
|
|
697
|
+
reason?: Maybe<Scalars['String']>;
|
|
698
|
+
};
|
|
699
|
+
|
|
700
|
+
export type IRegistrationInviteFilterInput = {
|
|
701
|
+
idTerm?: Maybe<Scalars['String']>;
|
|
702
|
+
userIdTerm?: Maybe<Scalars['String']>;
|
|
703
|
+
ludoIdOrAddressTerm?: Maybe<Scalars['String']>;
|
|
704
|
+
reasonTerm?: Maybe<Scalars['String']>;
|
|
705
|
+
};
|
|
706
|
+
|
|
707
|
+
export type IRegistrationInvitePage = {
|
|
708
|
+
registrationInvites: Array<IRegistrationInvite>;
|
|
709
|
+
nextPage?: Maybe<IAdminPage>;
|
|
710
|
+
};
|
|
711
|
+
|
|
712
|
+
export type IRegistrationInviteSortInput = {
|
|
713
|
+
sortByUserId?: Maybe<ISort>;
|
|
714
|
+
};
|
|
715
|
+
|
|
685
716
|
export type ISort = {
|
|
686
717
|
enabled: Scalars['Boolean'];
|
|
687
718
|
direction?: Maybe<ISortDirection>;
|
|
@@ -916,6 +947,10 @@ export type IResolversTypes = {
|
|
|
916
947
|
ReferralsPage: ResolverTypeWrapper<IReferralsPage>;
|
|
917
948
|
ReferralsSortInput: IReferralsSortInput;
|
|
918
949
|
ReferredUsersInfo: ResolverTypeWrapper<IReferredUsersInfo>;
|
|
950
|
+
RegistrationInvite: ResolverTypeWrapper<IRegistrationInvite>;
|
|
951
|
+
RegistrationInviteFilterInput: IRegistrationInviteFilterInput;
|
|
952
|
+
RegistrationInvitePage: ResolverTypeWrapper<IRegistrationInvitePage>;
|
|
953
|
+
RegistrationInviteSortInput: IRegistrationInviteSortInput;
|
|
919
954
|
Sort: ISort;
|
|
920
955
|
SortDirection: ISortDirection;
|
|
921
956
|
Upload: ResolverTypeWrapper<Scalars['Upload']>;
|
|
@@ -991,6 +1026,10 @@ export type IResolversParentTypes = {
|
|
|
991
1026
|
ReferralsPage: IReferralsPage;
|
|
992
1027
|
ReferralsSortInput: IReferralsSortInput;
|
|
993
1028
|
ReferredUsersInfo: IReferredUsersInfo;
|
|
1029
|
+
RegistrationInvite: IRegistrationInvite;
|
|
1030
|
+
RegistrationInviteFilterInput: IRegistrationInviteFilterInput;
|
|
1031
|
+
RegistrationInvitePage: IRegistrationInvitePage;
|
|
1032
|
+
RegistrationInviteSortInput: IRegistrationInviteSortInput;
|
|
994
1033
|
Sort: ISort;
|
|
995
1034
|
Upload: Scalars['Upload'];
|
|
996
1035
|
UserFeedback: IUserFeedback;
|
|
@@ -1285,6 +1324,7 @@ export type IQueryResolvers<ContextType = any, ParentType extends IResolversPare
|
|
|
1285
1324
|
fetchFormOpportunityPage?: Resolver<IResolversTypes['FormOpportunityPage'], ParentType, ContextType, RequireFields<IQueryFetchFormOpportunityPageArgs, 'filter' | 'sort' | 'page'>>;
|
|
1286
1325
|
fetchPartnershipInquiryPage?: Resolver<IResolversTypes['PartnershipInquiryPage'], ParentType, ContextType, RequireFields<IQueryFetchPartnershipInquiryPageArgs, 'filter' | 'sort' | 'page'>>;
|
|
1287
1326
|
fetchUserFeedbackPage?: Resolver<IResolversTypes['UserFeedbackPage'], ParentType, ContextType, RequireFields<IQueryFetchUserFeedbackPageArgs, 'filter' | 'sort' | 'page'>>;
|
|
1327
|
+
fetchRegistrationInvitePage?: Resolver<IResolversTypes['RegistrationInvitePage'], ParentType, ContextType, RequireFields<IQueryFetchRegistrationInvitePageArgs, 'filter' | 'sort' | 'page'>>;
|
|
1288
1328
|
fetchAdminInvitesPage?: Resolver<IResolversTypes['InvitesPage'], ParentType, ContextType, RequireFields<IQueryFetchAdminInvitesPageArgs, 'filter' | 'sort' | 'page'>>;
|
|
1289
1329
|
fetchAdminOpportunitiesPage?: Resolver<IResolversTypes['OpportunitiesPage'], ParentType, ContextType, RequireFields<IQueryFetchAdminOpportunitiesPageArgs, 'filter' | 'sort' | 'page'>>;
|
|
1290
1330
|
fetchAdminCategories?: Resolver<Array<IResolversTypes['AdminCategory']>, ParentType, ContextType>;
|
|
@@ -1310,6 +1350,20 @@ export type IReferredUsersInfoResolvers<ContextType = any, ParentType extends IR
|
|
|
1310
1350
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
1311
1351
|
};
|
|
1312
1352
|
|
|
1353
|
+
export type IRegistrationInviteResolvers<ContextType = any, ParentType extends IResolversParentTypes['RegistrationInvite'] = IResolversParentTypes['RegistrationInvite']> = {
|
|
1354
|
+
id?: Resolver<IResolversTypes['String'], ParentType, ContextType>;
|
|
1355
|
+
userId?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
|
|
1356
|
+
ludoIdOrAddress?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
|
|
1357
|
+
reason?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
|
|
1358
|
+
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
1359
|
+
};
|
|
1360
|
+
|
|
1361
|
+
export type IRegistrationInvitePageResolvers<ContextType = any, ParentType extends IResolversParentTypes['RegistrationInvitePage'] = IResolversParentTypes['RegistrationInvitePage']> = {
|
|
1362
|
+
registrationInvites?: Resolver<Array<IResolversTypes['RegistrationInvite']>, ParentType, ContextType>;
|
|
1363
|
+
nextPage?: Resolver<Maybe<IResolversTypes['AdminPage']>, ParentType, ContextType>;
|
|
1364
|
+
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
1365
|
+
};
|
|
1366
|
+
|
|
1313
1367
|
export interface IUploadScalarConfig extends GraphQLScalarTypeConfig<IResolversTypes['Upload'], any> {
|
|
1314
1368
|
name: 'Upload';
|
|
1315
1369
|
}
|
|
@@ -1382,6 +1436,8 @@ export type IResolvers<ContextType = any> = {
|
|
|
1382
1436
|
Query?: IQueryResolvers<ContextType>;
|
|
1383
1437
|
ReferralsPage?: IReferralsPageResolvers<ContextType>;
|
|
1384
1438
|
ReferredUsersInfo?: IReferredUsersInfoResolvers<ContextType>;
|
|
1439
|
+
RegistrationInvite?: IRegistrationInviteResolvers<ContextType>;
|
|
1440
|
+
RegistrationInvitePage?: IRegistrationInvitePageResolvers<ContextType>;
|
|
1385
1441
|
Upload?: GraphQLScalarType;
|
|
1386
1442
|
UserFeedback?: IUserFeedbackResolvers<ContextType>;
|
|
1387
1443
|
UserFeedbackPage?: IUserFeedbackPageResolvers<ContextType>;
|
|
@@ -1512,6 +1568,15 @@ export type IFetchPartnershipInquiryPageQueryVariables = Exact<{
|
|
|
1512
1568
|
|
|
1513
1569
|
export type IFetchPartnershipInquiryPageQuery = { fetchPartnershipInquiryPage: { partnershipInquiries: Array<Pick<IAdminPartnershipInquiry, 'userId' | 'id' | 'email' | 'name' | 'projectName' | 'website' | 'aboutProject' | 'partnershipType' | 'ludoReferrerInfo'>>, nextPage?: Maybe<Pick<IAdminPage, 'elements' | 'lastNum' | 'num' | 'size' | 'token'>> } };
|
|
1514
1570
|
|
|
1571
|
+
export type IFetchRegistrationInvitePageQueryVariables = Exact<{
|
|
1572
|
+
filter: IRegistrationInviteFilterInput;
|
|
1573
|
+
sort: IRegistrationInviteSortInput;
|
|
1574
|
+
page: IAdminPageInput;
|
|
1575
|
+
}>;
|
|
1576
|
+
|
|
1577
|
+
|
|
1578
|
+
export type IFetchRegistrationInvitePageQuery = { fetchRegistrationInvitePage: { registrationInvites: Array<Pick<IRegistrationInvite, 'userId' | 'id' | 'ludoIdOrAddress' | 'reason'>>, nextPage?: Maybe<Pick<IAdminPage, 'elements' | 'lastNum' | 'num' | 'size' | 'token'>> } };
|
|
1579
|
+
|
|
1515
1580
|
export type IFetchUserFeedbackPageQueryVariables = Exact<{
|
|
1516
1581
|
filter: IUserFeedbackFilterInput;
|
|
1517
1582
|
sort: IUserFeedbackSortInput;
|
|
@@ -2149,6 +2214,53 @@ export function useFetchPartnershipInquiryPageLazyQuery(baseOptions?: Apollo.Laz
|
|
|
2149
2214
|
export type FetchPartnershipInquiryPageQueryHookResult = ReturnType<typeof useFetchPartnershipInquiryPageQuery>;
|
|
2150
2215
|
export type FetchPartnershipInquiryPageLazyQueryHookResult = ReturnType<typeof useFetchPartnershipInquiryPageLazyQuery>;
|
|
2151
2216
|
export type FetchPartnershipInquiryPageQueryResult = Apollo.QueryResult<IFetchPartnershipInquiryPageQuery, IFetchPartnershipInquiryPageQueryVariables>;
|
|
2217
|
+
export const FetchRegistrationInvitePageDocument = gql`
|
|
2218
|
+
query FetchRegistrationInvitePage($filter: RegistrationInviteFilterInput!, $sort: RegistrationInviteSortInput!, $page: AdminPageInput!) {
|
|
2219
|
+
fetchRegistrationInvitePage(filter: $filter, sort: $sort, page: $page) {
|
|
2220
|
+
registrationInvites {
|
|
2221
|
+
userId
|
|
2222
|
+
id
|
|
2223
|
+
ludoIdOrAddress
|
|
2224
|
+
reason
|
|
2225
|
+
}
|
|
2226
|
+
nextPage {
|
|
2227
|
+
elements
|
|
2228
|
+
lastNum
|
|
2229
|
+
num
|
|
2230
|
+
size
|
|
2231
|
+
token
|
|
2232
|
+
}
|
|
2233
|
+
}
|
|
2234
|
+
}
|
|
2235
|
+
`;
|
|
2236
|
+
|
|
2237
|
+
/**
|
|
2238
|
+
* __useFetchRegistrationInvitePageQuery__
|
|
2239
|
+
*
|
|
2240
|
+
* To run a query within a React component, call `useFetchRegistrationInvitePageQuery` and pass it any options that fit your needs.
|
|
2241
|
+
* When your component renders, `useFetchRegistrationInvitePageQuery` returns an object from Apollo Client that contains loading, error, and data properties
|
|
2242
|
+
* you can use to render your UI.
|
|
2243
|
+
*
|
|
2244
|
+
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
|
|
2245
|
+
*
|
|
2246
|
+
* @example
|
|
2247
|
+
* const { data, loading, error } = useFetchRegistrationInvitePageQuery({
|
|
2248
|
+
* variables: {
|
|
2249
|
+
* filter: // value for 'filter'
|
|
2250
|
+
* sort: // value for 'sort'
|
|
2251
|
+
* page: // value for 'page'
|
|
2252
|
+
* },
|
|
2253
|
+
* });
|
|
2254
|
+
*/
|
|
2255
|
+
export function useFetchRegistrationInvitePageQuery(baseOptions: Apollo.QueryHookOptions<IFetchRegistrationInvitePageQuery, IFetchRegistrationInvitePageQueryVariables>) {
|
|
2256
|
+
return Apollo.useQuery<IFetchRegistrationInvitePageQuery, IFetchRegistrationInvitePageQueryVariables>(FetchRegistrationInvitePageDocument, baseOptions);
|
|
2257
|
+
}
|
|
2258
|
+
export function useFetchRegistrationInvitePageLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<IFetchRegistrationInvitePageQuery, IFetchRegistrationInvitePageQueryVariables>) {
|
|
2259
|
+
return Apollo.useLazyQuery<IFetchRegistrationInvitePageQuery, IFetchRegistrationInvitePageQueryVariables>(FetchRegistrationInvitePageDocument, baseOptions);
|
|
2260
|
+
}
|
|
2261
|
+
export type FetchRegistrationInvitePageQueryHookResult = ReturnType<typeof useFetchRegistrationInvitePageQuery>;
|
|
2262
|
+
export type FetchRegistrationInvitePageLazyQueryHookResult = ReturnType<typeof useFetchRegistrationInvitePageLazyQuery>;
|
|
2263
|
+
export type FetchRegistrationInvitePageQueryResult = Apollo.QueryResult<IFetchRegistrationInvitePageQuery, IFetchRegistrationInvitePageQueryVariables>;
|
|
2152
2264
|
export const FetchUserFeedbackPageDocument = gql`
|
|
2153
2265
|
query FetchUserFeedbackPage($filter: UserFeedbackFilterInput!, $sort: UserFeedbackSortInput!, $page: AdminPageInput!) {
|
|
2154
2266
|
fetchUserFeedbackPage(filter: $filter, sort: $sort, page: $page) {
|