@ludo.ninja/api 2.8.98 → 2.9.0

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.
@@ -148,6 +148,7 @@ export type IAdminOpportunityInput = {
148
148
  blockchain?: Maybe<Scalars['String']>;
149
149
  collection?: Maybe<Scalars['String']>;
150
150
  media?: Maybe<Scalars['String']>;
151
+ openOpportunityXps?: Maybe<Scalars['Int']>;
151
152
  };
152
153
  export type IAdminPage = {
153
154
  num?: Maybe<Scalars['Int']>;
@@ -0,0 +1,178 @@
1
+ import { GraphQLResolveInfo, GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql';
2
+ import * as Apollo from '@apollo/client';
3
+ export type Maybe<T> = T | null;
4
+ export type Exact<T extends {
5
+ [key: string]: unknown;
6
+ }> = {
7
+ [K in keyof T]: T[K];
8
+ };
9
+ export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
10
+ [SubKey in K]?: Maybe<T[SubKey]>;
11
+ };
12
+ export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
13
+ [SubKey in K]: Maybe<T[SubKey]>;
14
+ };
15
+ export type RequireFields<T, K extends keyof T> = Omit<T, K> & {
16
+ [P in K]-?: NonNullable<T[P]>;
17
+ };
18
+ /** All built-in and custom scalars, mapped to their actual values */
19
+ export type Scalars = {
20
+ ID: string;
21
+ String: string;
22
+ Boolean: boolean;
23
+ Int: number;
24
+ Float: number;
25
+ /** A 64-bit signed integer */
26
+ Long: any;
27
+ Upload: any;
28
+ };
29
+ export type IMintingInfo = {
30
+ rank: Scalars['Float'];
31
+ tier: ITier;
32
+ nftPrice: Scalars['Float'];
33
+ };
34
+ export type IMintingInput = {
35
+ wallet: Scalars['String'];
36
+ refcode?: Maybe<Scalars['String']>;
37
+ };
38
+ export type IMutation = {
39
+ setDummy: Scalars['String'];
40
+ };
41
+ export type IQuery = {
42
+ getDummy: Scalars['String'];
43
+ fetchMintingInfo: IMintingInfo;
44
+ };
45
+ export type IQueryFetchMintingInfoArgs = {
46
+ input: IMintingInput;
47
+ };
48
+ export type ITier = {
49
+ id: Scalars['String'];
50
+ name: Scalars['String'];
51
+ description?: Maybe<Scalars['String']>;
52
+ fee?: Maybe<Scalars['Float']>;
53
+ };
54
+ export type ResolverTypeWrapper<T> = Promise<T> | T;
55
+ export type ResolverWithResolve<TResult, TParent, TContext, TArgs> = {
56
+ resolve: ResolverFn<TResult, TParent, TContext, TArgs>;
57
+ };
58
+ export type Resolver<TResult, TParent = {}, TContext = {}, TArgs = {}> = ResolverFn<TResult, TParent, TContext, TArgs> | ResolverWithResolve<TResult, TParent, TContext, TArgs>;
59
+ export type ResolverFn<TResult, TParent, TContext, TArgs> = (parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => Promise<TResult> | TResult;
60
+ export type SubscriptionSubscribeFn<TResult, TParent, TContext, TArgs> = (parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => AsyncIterable<TResult> | Promise<AsyncIterable<TResult>>;
61
+ export type SubscriptionResolveFn<TResult, TParent, TContext, TArgs> = (parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => TResult | Promise<TResult>;
62
+ export interface SubscriptionSubscriberObject<TResult, TKey extends string, TParent, TContext, TArgs> {
63
+ subscribe: SubscriptionSubscribeFn<{
64
+ [key in TKey]: TResult;
65
+ }, TParent, TContext, TArgs>;
66
+ resolve?: SubscriptionResolveFn<TResult, {
67
+ [key in TKey]: TResult;
68
+ }, TContext, TArgs>;
69
+ }
70
+ export interface SubscriptionResolverObject<TResult, TParent, TContext, TArgs> {
71
+ subscribe: SubscriptionSubscribeFn<any, TParent, TContext, TArgs>;
72
+ resolve: SubscriptionResolveFn<TResult, any, TContext, TArgs>;
73
+ }
74
+ export type SubscriptionObject<TResult, TKey extends string, TParent, TContext, TArgs> = SubscriptionSubscriberObject<TResult, TKey, TParent, TContext, TArgs> | SubscriptionResolverObject<TResult, TParent, TContext, TArgs>;
75
+ export type SubscriptionResolver<TResult, TKey extends string, TParent = {}, TContext = {}, TArgs = {}> = ((...args: any[]) => SubscriptionObject<TResult, TKey, TParent, TContext, TArgs>) | SubscriptionObject<TResult, TKey, TParent, TContext, TArgs>;
76
+ export type TypeResolveFn<TTypes, TParent = {}, TContext = {}> = (parent: TParent, context: TContext, info: GraphQLResolveInfo) => Maybe<TTypes> | Promise<Maybe<TTypes>>;
77
+ export type IsTypeOfResolverFn<T = {}, TContext = {}> = (obj: T, context: TContext, info: GraphQLResolveInfo) => boolean | Promise<boolean>;
78
+ export type NextResolverFn<T> = () => Promise<T>;
79
+ export type DirectiveResolverFn<TResult = {}, TParent = {}, TContext = {}, TArgs = {}> = (next: NextResolverFn<TResult>, parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => TResult | Promise<TResult>;
80
+ /** Mapping between all available schema types and the resolvers types */
81
+ export type IResolversTypes = {
82
+ Long: ResolverTypeWrapper<Scalars['Long']>;
83
+ MintingInfo: ResolverTypeWrapper<IMintingInfo>;
84
+ Float: ResolverTypeWrapper<Scalars['Float']>;
85
+ MintingInput: IMintingInput;
86
+ String: ResolverTypeWrapper<Scalars['String']>;
87
+ Mutation: ResolverTypeWrapper<{}>;
88
+ Query: ResolverTypeWrapper<{}>;
89
+ Tier: ResolverTypeWrapper<ITier>;
90
+ Upload: ResolverTypeWrapper<Scalars['Upload']>;
91
+ Boolean: ResolverTypeWrapper<Scalars['Boolean']>;
92
+ };
93
+ /** Mapping between all available schema types and the resolvers parents */
94
+ export type IResolversParentTypes = {
95
+ Long: Scalars['Long'];
96
+ MintingInfo: IMintingInfo;
97
+ Float: Scalars['Float'];
98
+ MintingInput: IMintingInput;
99
+ String: Scalars['String'];
100
+ Mutation: {};
101
+ Query: {};
102
+ Tier: ITier;
103
+ Upload: Scalars['Upload'];
104
+ Boolean: Scalars['Boolean'];
105
+ };
106
+ export type IOneOfDirectiveArgs = {};
107
+ export type IOneOfDirectiveResolver<Result, Parent, ContextType = any, Args = IOneOfDirectiveArgs> = DirectiveResolverFn<Result, Parent, ContextType, Args>;
108
+ export interface ILongScalarConfig extends GraphQLScalarTypeConfig<IResolversTypes['Long'], any> {
109
+ name: 'Long';
110
+ }
111
+ export type IMintingInfoResolvers<ContextType = any, ParentType extends IResolversParentTypes['MintingInfo'] = IResolversParentTypes['MintingInfo']> = {
112
+ rank?: Resolver<IResolversTypes['Float'], ParentType, ContextType>;
113
+ tier?: Resolver<IResolversTypes['Tier'], ParentType, ContextType>;
114
+ nftPrice?: Resolver<IResolversTypes['Float'], ParentType, ContextType>;
115
+ __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
116
+ };
117
+ export type IMutationResolvers<ContextType = any, ParentType extends IResolversParentTypes['Mutation'] = IResolversParentTypes['Mutation']> = {
118
+ setDummy?: Resolver<IResolversTypes['String'], ParentType, ContextType>;
119
+ };
120
+ export type IQueryResolvers<ContextType = any, ParentType extends IResolversParentTypes['Query'] = IResolversParentTypes['Query']> = {
121
+ getDummy?: Resolver<IResolversTypes['String'], ParentType, ContextType>;
122
+ fetchMintingInfo?: Resolver<IResolversTypes['MintingInfo'], ParentType, ContextType, RequireFields<IQueryFetchMintingInfoArgs, 'input'>>;
123
+ };
124
+ export type ITierResolvers<ContextType = any, ParentType extends IResolversParentTypes['Tier'] = IResolversParentTypes['Tier']> = {
125
+ id?: Resolver<IResolversTypes['String'], ParentType, ContextType>;
126
+ name?: Resolver<IResolversTypes['String'], ParentType, ContextType>;
127
+ description?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
128
+ fee?: Resolver<Maybe<IResolversTypes['Float']>, ParentType, ContextType>;
129
+ __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
130
+ };
131
+ export interface IUploadScalarConfig extends GraphQLScalarTypeConfig<IResolversTypes['Upload'], any> {
132
+ name: 'Upload';
133
+ }
134
+ export type IResolvers<ContextType = any> = {
135
+ Long?: GraphQLScalarType;
136
+ MintingInfo?: IMintingInfoResolvers<ContextType>;
137
+ Mutation?: IMutationResolvers<ContextType>;
138
+ Query?: IQueryResolvers<ContextType>;
139
+ Tier?: ITierResolvers<ContextType>;
140
+ Upload?: GraphQLScalarType;
141
+ };
142
+ export type IDirectiveResolvers<ContextType = any> = {
143
+ oneOf?: IOneOfDirectiveResolver<any, any, ContextType>;
144
+ };
145
+ export type IFetchMintingInfoQueryVariables = Exact<{
146
+ input: IMintingInput;
147
+ }>;
148
+ export type IFetchMintingInfoQuery = {
149
+ fetchMintingInfo: (Pick<IMintingInfo, 'rank' | 'nftPrice'> & {
150
+ tier: Pick<ITier, 'id' | 'name' | 'description' | 'fee'>;
151
+ });
152
+ };
153
+ export declare const FetchMintingInfoDocument: Apollo.DocumentNode;
154
+ /**
155
+ * __useFetchMintingInfoQuery__
156
+ *
157
+ * To run a query within a React component, call `useFetchMintingInfoQuery` and pass it any options that fit your needs.
158
+ * When your component renders, `useFetchMintingInfoQuery` returns an object from Apollo Client that contains loading, error, and data properties
159
+ * you can use to render your UI.
160
+ *
161
+ * @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;
162
+ *
163
+ * @example
164
+ * const { data, loading, error } = useFetchMintingInfoQuery({
165
+ * variables: {
166
+ * input: // value for 'input'
167
+ * },
168
+ * });
169
+ */
170
+ export declare function useFetchMintingInfoQuery(baseOptions: Apollo.QueryHookOptions<IFetchMintingInfoQuery, IFetchMintingInfoQueryVariables>): Apollo.QueryResult<IFetchMintingInfoQuery, Exact<{
171
+ input: IMintingInput;
172
+ }>>;
173
+ export declare function useFetchMintingInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<IFetchMintingInfoQuery, IFetchMintingInfoQueryVariables>): Apollo.LazyQueryResultTuple<IFetchMintingInfoQuery, Exact<{
174
+ input: IMintingInput;
175
+ }>>;
176
+ export type FetchMintingInfoQueryHookResult = ReturnType<typeof useFetchMintingInfoQuery>;
177
+ export type FetchMintingInfoLazyQueryHookResult = ReturnType<typeof useFetchMintingInfoLazyQuery>;
178
+ export type FetchMintingInfoQueryResult = Apollo.QueryResult<IFetchMintingInfoQuery, IFetchMintingInfoQueryVariables>;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.useFetchMintingInfoLazyQuery = exports.useFetchMintingInfoQuery = exports.FetchMintingInfoDocument = void 0;
27
+ const client_1 = require("@apollo/client");
28
+ const Apollo = __importStar(require("@apollo/client"));
29
+ exports.FetchMintingInfoDocument = (0, client_1.gql) `
30
+ query FetchMintingInfo($input: MintingInput!) {
31
+ fetchMintingInfo(input: $input) {
32
+ rank
33
+ tier {
34
+ id
35
+ name
36
+ description
37
+ fee
38
+ }
39
+ nftPrice
40
+ }
41
+ }
42
+ `;
43
+ /**
44
+ * __useFetchMintingInfoQuery__
45
+ *
46
+ * To run a query within a React component, call `useFetchMintingInfoQuery` and pass it any options that fit your needs.
47
+ * When your component renders, `useFetchMintingInfoQuery` returns an object from Apollo Client that contains loading, error, and data properties
48
+ * you can use to render your UI.
49
+ *
50
+ * @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;
51
+ *
52
+ * @example
53
+ * const { data, loading, error } = useFetchMintingInfoQuery({
54
+ * variables: {
55
+ * input: // value for 'input'
56
+ * },
57
+ * });
58
+ */
59
+ function useFetchMintingInfoQuery(baseOptions) {
60
+ return Apollo.useQuery(exports.FetchMintingInfoDocument, baseOptions);
61
+ }
62
+ exports.useFetchMintingInfoQuery = useFetchMintingInfoQuery;
63
+ function useFetchMintingInfoLazyQuery(baseOptions) {
64
+ return Apollo.useLazyQuery(exports.FetchMintingInfoDocument, baseOptions);
65
+ }
66
+ exports.useFetchMintingInfoLazyQuery = useFetchMintingInfoLazyQuery;
@@ -28,3 +28,4 @@ export declare const serverExperiencesHost = "http://server-experiences.istio.sv
28
28
  export declare const formsHost = "https://forms.ludo.ninja:8090/graphql";
29
29
  export declare const tapHost = "https://tap.ludo.ninja:8090/graphql";
30
30
  export declare const tapHostSubscriptions = "wss://tap.ludo.ninja:8090/subscriptions";
31
+ export declare const mintInfoHost = "https://mint-info.ludo.ninja:8090/graphql";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.tapHostSubscriptions = exports.tapHost = exports.formsHost = exports.serverExperiencesHost = exports.experiencesHost = exports.extensionHost = exports.opportunitiesHost = exports.notificationsHost = exports.notificationsSubscriptionHost = exports.experiencesSubscriptionHost = exports.eventsHost = exports.serverPreferencesHost = exports.searchHostSSR = exports.preferencesHostSSR = exports.preferencesHost = exports.serverSearchHost = exports.serverShowCaseHost = exports.searchHost = exports.serverImagesHost = exports.mediasHost = exports.serverGalleriesHost = exports.galleriesHost = exports.serverIdentityHost = exports.serverCollectionsHost = exports.serverAssetsHost = exports.adminHost = exports.collectionsHost = exports.assetsHost = exports.identityHost = exports.authHost = void 0;
3
+ exports.mintInfoHost = exports.tapHostSubscriptions = exports.tapHost = exports.formsHost = exports.serverExperiencesHost = exports.experiencesHost = exports.extensionHost = exports.opportunitiesHost = exports.notificationsHost = exports.notificationsSubscriptionHost = exports.experiencesSubscriptionHost = exports.eventsHost = exports.serverPreferencesHost = exports.searchHostSSR = exports.preferencesHostSSR = exports.preferencesHost = exports.serverSearchHost = exports.serverShowCaseHost = exports.searchHost = exports.serverImagesHost = exports.mediasHost = exports.serverGalleriesHost = exports.galleriesHost = exports.serverIdentityHost = exports.serverCollectionsHost = exports.serverAssetsHost = exports.adminHost = exports.collectionsHost = exports.assetsHost = exports.identityHost = exports.authHost = void 0;
4
4
  exports.authHost = "https://auth.ludo.ninja:8080/graphql";
5
5
  exports.identityHost = "https://identities.ludo.ninja:8090/graphql";
6
6
  exports.assetsHost = "https://assets.ludo.ninja:8090/graphql";
@@ -31,3 +31,4 @@ exports.serverExperiencesHost = "http://server-experiences.istio.svc.k8s.local:8
31
31
  exports.formsHost = "https://forms.ludo.ninja:8090/graphql";
32
32
  exports.tapHost = "https://tap.ludo.ninja:8090/graphql";
33
33
  exports.tapHostSubscriptions = "wss://tap.ludo.ninja:8090/subscriptions";
34
+ exports.mintInfoHost = 'https://mint-info.ludo.ninja:8090/graphql';
package/build/index.d.ts CHANGED
@@ -10,6 +10,7 @@ import * as extensionSchema from "./graphql_tools/__generated__/extensionHost/sc
10
10
  import * as galleriesSchema from "./graphql_tools/__generated__/galleriesHost/schema";
11
11
  import * as identitySchema from "./graphql_tools/__generated__/identityHost/schema";
12
12
  import * as mediasSchema from "./graphql_tools/__generated__/mediasHost/schema";
13
+ import * as mintInfoSchema from "./graphql_tools/__generated__/mintInfoHost/schema";
13
14
  import * as opportunitiesSchema from "./graphql_tools/__generated__/opportunitiesHost/schema";
14
15
  import * as preferencesSchema from "./graphql_tools/__generated__/preferencesHost/schema";
15
16
  import * as searchSchema from "./graphql_tools/__generated__/searchHost/schema";
@@ -17,6 +18,17 @@ import * as formsSchema from "./graphql_tools/__generated__/formsHost/schema";
17
18
  import * as tapsSchema from "./graphql_tools/__generated__/tapHost/schema";
18
19
  import * as notificationsSchema from "./graphql_tools/__generated__/notificationsHost/schema";
19
20
  declare const schema: {
21
+ useFetchMintingInfoQuery(baseOptions: import("@apollo/client").QueryHookOptions<mintInfoSchema.IFetchMintingInfoQuery, mintInfoSchema.Exact<{
22
+ input: mintInfoSchema.IMintingInput;
23
+ }>>): import("@apollo/client").QueryResult<mintInfoSchema.IFetchMintingInfoQuery, mintInfoSchema.Exact<{
24
+ input: mintInfoSchema.IMintingInput;
25
+ }>>;
26
+ useFetchMintingInfoLazyQuery(baseOptions?: import("@apollo/client").LazyQueryHookOptions<mintInfoSchema.IFetchMintingInfoQuery, mintInfoSchema.Exact<{
27
+ input: mintInfoSchema.IMintingInput;
28
+ }>> | undefined): import("@apollo/client").LazyQueryResultTuple<mintInfoSchema.IFetchMintingInfoQuery, mintInfoSchema.Exact<{
29
+ input: mintInfoSchema.IMintingInput;
30
+ }>>;
31
+ FetchMintingInfoDocument: import("graphql").DocumentNode;
20
32
  useReadNotificationMutation(baseOptions?: import("@apollo/client").MutationHookOptions<notificationsSchema.IReadNotificationMutation, notificationsSchema.Exact<{
21
33
  notificationId: string;
22
34
  }>, import("@apollo/client").DefaultContext, import("@apollo/client").ApolloCache<any>> | undefined): import("@apollo/client").MutationTuple<notificationsSchema.IReadNotificationMutation, notificationsSchema.Exact<{
@@ -1778,4 +1790,4 @@ declare const schema: {
1778
1790
  FetchAdminXpPageDocument: import("graphql").DocumentNode;
1779
1791
  FetchBlockchainsDocument: import("graphql").DocumentNode;
1780
1792
  };
1781
- export { hosts, schema, graphqlConfig, authCookies, adminSchema, assetSchema, authSchema, collectionsSchema, experiencesSchema, extensionSchema, galleriesSchema, identitySchema, mediasSchema, opportunitiesSchema, preferencesSchema, searchSchema, formsSchema, tapsSchema, notificationsSchema, };
1793
+ export { hosts, schema, graphqlConfig, authCookies, adminSchema, assetSchema, authSchema, collectionsSchema, experiencesSchema, extensionSchema, galleriesSchema, identitySchema, mediasSchema, opportunitiesSchema, preferencesSchema, searchSchema, formsSchema, tapsSchema, notificationsSchema, mintInfoSchema };
package/build/index.js CHANGED
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.notificationsSchema = exports.tapsSchema = exports.formsSchema = exports.searchSchema = exports.preferencesSchema = exports.opportunitiesSchema = exports.mediasSchema = exports.identitySchema = exports.galleriesSchema = exports.extensionSchema = exports.experiencesSchema = exports.collectionsSchema = exports.authSchema = exports.assetSchema = exports.adminSchema = exports.authCookies = exports.graphqlConfig = exports.schema = exports.hosts = void 0;
26
+ exports.mintInfoSchema = exports.notificationsSchema = exports.tapsSchema = exports.formsSchema = exports.searchSchema = exports.preferencesSchema = exports.opportunitiesSchema = exports.mediasSchema = exports.identitySchema = exports.galleriesSchema = exports.extensionSchema = exports.experiencesSchema = exports.collectionsSchema = exports.authSchema = exports.assetSchema = exports.adminSchema = exports.authCookies = exports.graphqlConfig = exports.schema = exports.hosts = void 0;
27
27
  const hosts = __importStar(require("./hosts"));
28
28
  exports.hosts = hosts;
29
29
  const graphqlConfig = __importStar(require("./config"));
@@ -48,6 +48,8 @@ const identitySchema = __importStar(require("./graphql_tools/__generated__/ident
48
48
  exports.identitySchema = identitySchema;
49
49
  const mediasSchema = __importStar(require("./graphql_tools/__generated__/mediasHost/schema"));
50
50
  exports.mediasSchema = mediasSchema;
51
+ const mintInfoSchema = __importStar(require("./graphql_tools/__generated__/mintInfoHost/schema"));
52
+ exports.mintInfoSchema = mintInfoSchema;
51
53
  const opportunitiesSchema = __importStar(require("./graphql_tools/__generated__/opportunitiesHost/schema"));
52
54
  exports.opportunitiesSchema = opportunitiesSchema;
53
55
  const preferencesSchema = __importStar(require("./graphql_tools/__generated__/preferencesHost/schema"));
@@ -76,5 +78,6 @@ const schema = {
76
78
  ...formsSchema,
77
79
  ...tapsSchema,
78
80
  ...notificationsSchema,
81
+ ...mintInfoSchema
79
82
  };
80
83
  exports.schema = schema;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludo.ninja/api",
3
- "version": "2.8.98",
3
+ "version": "2.9.0",
4
4
  "main": "./build/index.js",
5
5
  "scripts": {
6
6
  "test": "jest",
@@ -153,6 +153,7 @@ export type IAdminOpportunityInput = {
153
153
  blockchain?: Maybe<Scalars['String']>;
154
154
  collection?: Maybe<Scalars['String']>;
155
155
  media?: Maybe<Scalars['String']>;
156
+ openOpportunityXps?: Maybe<Scalars['Int']>;
156
157
  };
157
158
 
158
159
  export type IAdminPage = {
@@ -0,0 +1,251 @@
1
+ /* eslint-disable */
2
+ import { GraphQLResolveInfo, GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql';
3
+ import { gql } from '@apollo/client';
4
+ import * as Apollo from '@apollo/client';
5
+ export type Maybe<T> = T | null;
6
+ export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
7
+ export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
8
+ export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
9
+ export type RequireFields<T, K extends keyof T> = Omit<T, K> & { [P in K]-?: NonNullable<T[P]> };
10
+ /** All built-in and custom scalars, mapped to their actual values */
11
+ export type Scalars = {
12
+ ID: string;
13
+ String: string;
14
+ Boolean: boolean;
15
+ Int: number;
16
+ Float: number;
17
+ /** A 64-bit signed integer */
18
+ Long: any;
19
+ Upload: any;
20
+ };
21
+
22
+
23
+
24
+ export type IMintingInfo = {
25
+ rank: Scalars['Float'];
26
+ tier: ITier;
27
+ nftPrice: Scalars['Float'];
28
+ };
29
+
30
+ export type IMintingInput = {
31
+ wallet: Scalars['String'];
32
+ refcode?: Maybe<Scalars['String']>;
33
+ };
34
+
35
+ export type IMutation = {
36
+ setDummy: Scalars['String'];
37
+ };
38
+
39
+ export type IQuery = {
40
+ getDummy: Scalars['String'];
41
+ fetchMintingInfo: IMintingInfo;
42
+ };
43
+
44
+
45
+ export type IQueryFetchMintingInfoArgs = {
46
+ input: IMintingInput;
47
+ };
48
+
49
+ export type ITier = {
50
+ id: Scalars['String'];
51
+ name: Scalars['String'];
52
+ description?: Maybe<Scalars['String']>;
53
+ fee?: Maybe<Scalars['Float']>;
54
+ };
55
+
56
+
57
+
58
+
59
+ export type ResolverTypeWrapper<T> = Promise<T> | T;
60
+
61
+
62
+ export type ResolverWithResolve<TResult, TParent, TContext, TArgs> = {
63
+ resolve: ResolverFn<TResult, TParent, TContext, TArgs>;
64
+ };
65
+ export type Resolver<TResult, TParent = {}, TContext = {}, TArgs = {}> = ResolverFn<TResult, TParent, TContext, TArgs> | ResolverWithResolve<TResult, TParent, TContext, TArgs>;
66
+
67
+ export type ResolverFn<TResult, TParent, TContext, TArgs> = (
68
+ parent: TParent,
69
+ args: TArgs,
70
+ context: TContext,
71
+ info: GraphQLResolveInfo
72
+ ) => Promise<TResult> | TResult;
73
+
74
+ export type SubscriptionSubscribeFn<TResult, TParent, TContext, TArgs> = (
75
+ parent: TParent,
76
+ args: TArgs,
77
+ context: TContext,
78
+ info: GraphQLResolveInfo
79
+ ) => AsyncIterable<TResult> | Promise<AsyncIterable<TResult>>;
80
+
81
+ export type SubscriptionResolveFn<TResult, TParent, TContext, TArgs> = (
82
+ parent: TParent,
83
+ args: TArgs,
84
+ context: TContext,
85
+ info: GraphQLResolveInfo
86
+ ) => TResult | Promise<TResult>;
87
+
88
+ export interface SubscriptionSubscriberObject<TResult, TKey extends string, TParent, TContext, TArgs> {
89
+ subscribe: SubscriptionSubscribeFn<{ [key in TKey]: TResult }, TParent, TContext, TArgs>;
90
+ resolve?: SubscriptionResolveFn<TResult, { [key in TKey]: TResult }, TContext, TArgs>;
91
+ }
92
+
93
+ export interface SubscriptionResolverObject<TResult, TParent, TContext, TArgs> {
94
+ subscribe: SubscriptionSubscribeFn<any, TParent, TContext, TArgs>;
95
+ resolve: SubscriptionResolveFn<TResult, any, TContext, TArgs>;
96
+ }
97
+
98
+ export type SubscriptionObject<TResult, TKey extends string, TParent, TContext, TArgs> =
99
+ | SubscriptionSubscriberObject<TResult, TKey, TParent, TContext, TArgs>
100
+ | SubscriptionResolverObject<TResult, TParent, TContext, TArgs>;
101
+
102
+ export type SubscriptionResolver<TResult, TKey extends string, TParent = {}, TContext = {}, TArgs = {}> =
103
+ | ((...args: any[]) => SubscriptionObject<TResult, TKey, TParent, TContext, TArgs>)
104
+ | SubscriptionObject<TResult, TKey, TParent, TContext, TArgs>;
105
+
106
+ export type TypeResolveFn<TTypes, TParent = {}, TContext = {}> = (
107
+ parent: TParent,
108
+ context: TContext,
109
+ info: GraphQLResolveInfo
110
+ ) => Maybe<TTypes> | Promise<Maybe<TTypes>>;
111
+
112
+ export type IsTypeOfResolverFn<T = {}, TContext = {}> = (obj: T, context: TContext, info: GraphQLResolveInfo) => boolean | Promise<boolean>;
113
+
114
+ export type NextResolverFn<T> = () => Promise<T>;
115
+
116
+ export type DirectiveResolverFn<TResult = {}, TParent = {}, TContext = {}, TArgs = {}> = (
117
+ next: NextResolverFn<TResult>,
118
+ parent: TParent,
119
+ args: TArgs,
120
+ context: TContext,
121
+ info: GraphQLResolveInfo
122
+ ) => TResult | Promise<TResult>;
123
+
124
+ /** Mapping between all available schema types and the resolvers types */
125
+ export type IResolversTypes = {
126
+ Long: ResolverTypeWrapper<Scalars['Long']>;
127
+ MintingInfo: ResolverTypeWrapper<IMintingInfo>;
128
+ Float: ResolverTypeWrapper<Scalars['Float']>;
129
+ MintingInput: IMintingInput;
130
+ String: ResolverTypeWrapper<Scalars['String']>;
131
+ Mutation: ResolverTypeWrapper<{}>;
132
+ Query: ResolverTypeWrapper<{}>;
133
+ Tier: ResolverTypeWrapper<ITier>;
134
+ Upload: ResolverTypeWrapper<Scalars['Upload']>;
135
+ Boolean: ResolverTypeWrapper<Scalars['Boolean']>;
136
+ };
137
+
138
+ /** Mapping between all available schema types and the resolvers parents */
139
+ export type IResolversParentTypes = {
140
+ Long: Scalars['Long'];
141
+ MintingInfo: IMintingInfo;
142
+ Float: Scalars['Float'];
143
+ MintingInput: IMintingInput;
144
+ String: Scalars['String'];
145
+ Mutation: {};
146
+ Query: {};
147
+ Tier: ITier;
148
+ Upload: Scalars['Upload'];
149
+ Boolean: Scalars['Boolean'];
150
+ };
151
+
152
+ export type IOneOfDirectiveArgs = { };
153
+
154
+ export type IOneOfDirectiveResolver<Result, Parent, ContextType = any, Args = IOneOfDirectiveArgs> = DirectiveResolverFn<Result, Parent, ContextType, Args>;
155
+
156
+ export interface ILongScalarConfig extends GraphQLScalarTypeConfig<IResolversTypes['Long'], any> {
157
+ name: 'Long';
158
+ }
159
+
160
+ export type IMintingInfoResolvers<ContextType = any, ParentType extends IResolversParentTypes['MintingInfo'] = IResolversParentTypes['MintingInfo']> = {
161
+ rank?: Resolver<IResolversTypes['Float'], ParentType, ContextType>;
162
+ tier?: Resolver<IResolversTypes['Tier'], ParentType, ContextType>;
163
+ nftPrice?: Resolver<IResolversTypes['Float'], ParentType, ContextType>;
164
+ __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
165
+ };
166
+
167
+ export type IMutationResolvers<ContextType = any, ParentType extends IResolversParentTypes['Mutation'] = IResolversParentTypes['Mutation']> = {
168
+ setDummy?: Resolver<IResolversTypes['String'], ParentType, ContextType>;
169
+ };
170
+
171
+ export type IQueryResolvers<ContextType = any, ParentType extends IResolversParentTypes['Query'] = IResolversParentTypes['Query']> = {
172
+ getDummy?: Resolver<IResolversTypes['String'], ParentType, ContextType>;
173
+ fetchMintingInfo?: Resolver<IResolversTypes['MintingInfo'], ParentType, ContextType, RequireFields<IQueryFetchMintingInfoArgs, 'input'>>;
174
+ };
175
+
176
+ export type ITierResolvers<ContextType = any, ParentType extends IResolversParentTypes['Tier'] = IResolversParentTypes['Tier']> = {
177
+ id?: Resolver<IResolversTypes['String'], ParentType, ContextType>;
178
+ name?: Resolver<IResolversTypes['String'], ParentType, ContextType>;
179
+ description?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
180
+ fee?: Resolver<Maybe<IResolversTypes['Float']>, ParentType, ContextType>;
181
+ __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
182
+ };
183
+
184
+ export interface IUploadScalarConfig extends GraphQLScalarTypeConfig<IResolversTypes['Upload'], any> {
185
+ name: 'Upload';
186
+ }
187
+
188
+ export type IResolvers<ContextType = any> = {
189
+ Long?: GraphQLScalarType;
190
+ MintingInfo?: IMintingInfoResolvers<ContextType>;
191
+ Mutation?: IMutationResolvers<ContextType>;
192
+ Query?: IQueryResolvers<ContextType>;
193
+ Tier?: ITierResolvers<ContextType>;
194
+ Upload?: GraphQLScalarType;
195
+ };
196
+
197
+ export type IDirectiveResolvers<ContextType = any> = {
198
+ oneOf?: IOneOfDirectiveResolver<any, any, ContextType>;
199
+ };
200
+
201
+ export type IFetchMintingInfoQueryVariables = Exact<{
202
+ input: IMintingInput;
203
+ }>;
204
+
205
+
206
+ export type IFetchMintingInfoQuery = { fetchMintingInfo: (
207
+ Pick<IMintingInfo, 'rank' | 'nftPrice'>
208
+ & { tier: Pick<ITier, 'id' | 'name' | 'description' | 'fee'> }
209
+ ) };
210
+
211
+
212
+ export const FetchMintingInfoDocument = gql`
213
+ query FetchMintingInfo($input: MintingInput!) {
214
+ fetchMintingInfo(input: $input) {
215
+ rank
216
+ tier {
217
+ id
218
+ name
219
+ description
220
+ fee
221
+ }
222
+ nftPrice
223
+ }
224
+ }
225
+ `;
226
+
227
+ /**
228
+ * __useFetchMintingInfoQuery__
229
+ *
230
+ * To run a query within a React component, call `useFetchMintingInfoQuery` and pass it any options that fit your needs.
231
+ * When your component renders, `useFetchMintingInfoQuery` returns an object from Apollo Client that contains loading, error, and data properties
232
+ * you can use to render your UI.
233
+ *
234
+ * @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;
235
+ *
236
+ * @example
237
+ * const { data, loading, error } = useFetchMintingInfoQuery({
238
+ * variables: {
239
+ * input: // value for 'input'
240
+ * },
241
+ * });
242
+ */
243
+ export function useFetchMintingInfoQuery(baseOptions: Apollo.QueryHookOptions<IFetchMintingInfoQuery, IFetchMintingInfoQueryVariables>) {
244
+ return Apollo.useQuery<IFetchMintingInfoQuery, IFetchMintingInfoQueryVariables>(FetchMintingInfoDocument, baseOptions);
245
+ }
246
+ export function useFetchMintingInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<IFetchMintingInfoQuery, IFetchMintingInfoQueryVariables>) {
247
+ return Apollo.useLazyQuery<IFetchMintingInfoQuery, IFetchMintingInfoQueryVariables>(FetchMintingInfoDocument, baseOptions);
248
+ }
249
+ export type FetchMintingInfoQueryHookResult = ReturnType<typeof useFetchMintingInfoQuery>;
250
+ export type FetchMintingInfoLazyQueryHookResult = ReturnType<typeof useFetchMintingInfoLazyQuery>;
251
+ export type FetchMintingInfoQueryResult = Apollo.QueryResult<IFetchMintingInfoQuery, IFetchMintingInfoQueryVariables>;
@@ -57,3 +57,5 @@ export const tapHost = "https://tap.ludo.ninja:8090/graphql";
57
57
 
58
58
  export const tapHostSubscriptions = "wss://tap.ludo.ninja:8090/subscriptions";
59
59
 
60
+ export const mintInfoHost = 'https://mint-info.ludo.ninja:8090/graphql';
61
+
package/src/index.ts CHANGED
@@ -10,6 +10,7 @@ import * as extensionSchema from "./graphql_tools/__generated__/extensionHost/sc
10
10
  import * as galleriesSchema from "./graphql_tools/__generated__/galleriesHost/schema";
11
11
  import * as identitySchema from "./graphql_tools/__generated__/identityHost/schema";
12
12
  import * as mediasSchema from "./graphql_tools/__generated__/mediasHost/schema";
13
+ import * as mintInfoSchema from "./graphql_tools/__generated__/mintInfoHost/schema";
13
14
  import * as opportunitiesSchema from "./graphql_tools/__generated__/opportunitiesHost/schema";
14
15
  import * as preferencesSchema from "./graphql_tools/__generated__/preferencesHost/schema";
15
16
  import * as searchSchema from "./graphql_tools/__generated__/searchHost/schema";
@@ -33,6 +34,7 @@ const schema = {
33
34
  ...formsSchema,
34
35
  ...tapsSchema,
35
36
  ...notificationsSchema,
37
+ ...mintInfoSchema
36
38
  };
37
39
 
38
40
  export {
@@ -55,4 +57,5 @@ export {
55
57
  formsSchema,
56
58
  tapsSchema,
57
59
  notificationsSchema,
60
+ mintInfoSchema
58
61
  };