@ludo.ninja/api 2.8.80 → 2.8.82

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.
@@ -25,17 +25,29 @@ export type Scalars = {
25
25
  /** A 64-bit signed integer */
26
26
  Long: any;
27
27
  };
28
+ export declare enum IEventType {
29
+ CommonOpportunity = "COMMON_OPPORTUNITY",
30
+ UserInvitee = "USER_INVITEE",
31
+ UserOpportunity = "USER_OPPORTUNITY",
32
+ UserXpIncrement = "USER_XP_INCREMENT",
33
+ UserXps = "USER_XPS"
34
+ }
28
35
  export type IMutation = {
29
36
  setDummy: Scalars['String'];
30
37
  };
31
38
  export type INotification = {
32
- notificationType?: Maybe<Scalars['String']>;
33
- createdAt?: Maybe<Scalars['Long']>;
34
- name?: Maybe<Scalars['String']>;
39
+ notificationType: INotificationType;
40
+ eventType: IEventType;
41
+ createdAt: Scalars['Long'];
42
+ name: Scalars['String'];
35
43
  description?: Maybe<Scalars['String']>;
36
44
  media?: Maybe<Scalars['String']>;
37
45
  link?: Maybe<Scalars['String']>;
38
46
  };
47
+ export declare enum INotificationType {
48
+ RedDot = "RED_DOT",
49
+ Push = "PUSH"
50
+ }
39
51
  export type IQuery = {
40
52
  getDummy: Scalars['String'];
41
53
  };
@@ -45,6 +57,7 @@ export type ISubscription = {
45
57
  };
46
58
  export type ISubscriptionOnNotificationArgs = {
47
59
  authToken: Scalars['String'];
60
+ notificationTypes: Array<INotificationType>;
48
61
  };
49
62
  export type ResolverTypeWrapper<T> = Promise<T> | T;
50
63
  export type ResolverWithResolve<TResult, TParent, TContext, TArgs> = {
@@ -74,10 +87,12 @@ export type NextResolverFn<T> = () => Promise<T>;
74
87
  export type DirectiveResolverFn<TResult = {}, TParent = {}, TContext = {}, TArgs = {}> = (next: NextResolverFn<TResult>, parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => TResult | Promise<TResult>;
75
88
  /** Mapping between all available schema types and the resolvers types */
76
89
  export type IResolversTypes = {
90
+ EventType: IEventType;
77
91
  Long: ResolverTypeWrapper<Scalars['Long']>;
78
92
  Mutation: ResolverTypeWrapper<{}>;
79
93
  String: ResolverTypeWrapper<Scalars['String']>;
80
94
  Notification: ResolverTypeWrapper<INotification>;
95
+ NotificationType: INotificationType;
81
96
  Query: ResolverTypeWrapper<{}>;
82
97
  Subscription: ResolverTypeWrapper<{}>;
83
98
  Boolean: ResolverTypeWrapper<Scalars['Boolean']>;
@@ -101,9 +116,10 @@ export type IMutationResolvers<ContextType = any, ParentType extends IResolversP
101
116
  setDummy?: Resolver<IResolversTypes['String'], ParentType, ContextType>;
102
117
  };
103
118
  export type INotificationResolvers<ContextType = any, ParentType extends IResolversParentTypes['Notification'] = IResolversParentTypes['Notification']> = {
104
- notificationType?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
105
- createdAt?: Resolver<Maybe<IResolversTypes['Long']>, ParentType, ContextType>;
106
- name?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
119
+ notificationType?: Resolver<IResolversTypes['NotificationType'], ParentType, ContextType>;
120
+ eventType?: Resolver<IResolversTypes['EventType'], ParentType, ContextType>;
121
+ createdAt?: Resolver<IResolversTypes['Long'], ParentType, ContextType>;
122
+ name?: Resolver<IResolversTypes['String'], ParentType, ContextType>;
107
123
  description?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
108
124
  media?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
109
125
  link?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
@@ -114,7 +130,7 @@ export type IQueryResolvers<ContextType = any, ParentType extends IResolversPare
114
130
  };
115
131
  export type ISubscriptionResolvers<ContextType = any, ParentType extends IResolversParentTypes['Subscription'] = IResolversParentTypes['Subscription']> = {
116
132
  onDummy?: SubscriptionResolver<IResolversTypes['String'], "onDummy", ParentType, ContextType>;
117
- onNotification?: SubscriptionResolver<IResolversTypes['Notification'], "onNotification", ParentType, ContextType, RequireFields<ISubscriptionOnNotificationArgs, 'authToken'>>;
133
+ onNotification?: SubscriptionResolver<IResolversTypes['Notification'], "onNotification", ParentType, ContextType, RequireFields<ISubscriptionOnNotificationArgs, 'authToken' | 'notificationTypes'>>;
118
134
  };
119
135
  export type IResolvers<ContextType = any> = {
120
136
  Long?: GraphQLScalarType;
@@ -128,9 +144,10 @@ export type IDirectiveResolvers<ContextType = any> = {
128
144
  };
129
145
  export type IOnNotificationSubscriptionVariables = Exact<{
130
146
  authToken: Scalars['String'];
147
+ notificationTypes: Array<INotificationType>;
131
148
  }>;
132
149
  export type IOnNotificationSubscription = {
133
- onNotification: Pick<INotification, 'notificationType' | 'createdAt' | 'name' | 'description' | 'media' | 'link'>;
150
+ onNotification: Pick<INotification, 'notificationType' | 'eventType' | 'createdAt' | 'name' | 'description' | 'media' | 'link'>;
134
151
  };
135
152
  export declare const OnNotificationDocument: Apollo.DocumentNode;
136
153
  /**
@@ -146,6 +163,7 @@ export declare const OnNotificationDocument: Apollo.DocumentNode;
146
163
  * const { data, loading, error } = useOnNotificationSubscription({
147
164
  * variables: {
148
165
  * authToken: // value for 'authToken'
166
+ * notificationTypes: // value for 'notificationTypes'
149
167
  * },
150
168
  * });
151
169
  */
@@ -156,6 +174,7 @@ export declare function useOnNotificationSubscription(baseOptions: Apollo.Subscr
156
174
  error?: Apollo.ApolloError | undefined;
157
175
  variables?: Exact<{
158
176
  authToken: string;
177
+ notificationTypes: INotificationType[];
159
178
  }> | undefined;
160
179
  };
161
180
  export type OnNotificationSubscriptionHookResult = ReturnType<typeof useOnNotificationSubscription>;
@@ -23,13 +23,27 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.useOnNotificationSubscription = exports.OnNotificationDocument = void 0;
26
+ exports.useOnNotificationSubscription = exports.OnNotificationDocument = exports.INotificationType = exports.IEventType = void 0;
27
27
  const client_1 = require("@apollo/client");
28
28
  const Apollo = __importStar(require("@apollo/client"));
29
+ var IEventType;
30
+ (function (IEventType) {
31
+ IEventType["CommonOpportunity"] = "COMMON_OPPORTUNITY";
32
+ IEventType["UserInvitee"] = "USER_INVITEE";
33
+ IEventType["UserOpportunity"] = "USER_OPPORTUNITY";
34
+ IEventType["UserXpIncrement"] = "USER_XP_INCREMENT";
35
+ IEventType["UserXps"] = "USER_XPS";
36
+ })(IEventType || (exports.IEventType = IEventType = {}));
37
+ var INotificationType;
38
+ (function (INotificationType) {
39
+ INotificationType["RedDot"] = "RED_DOT";
40
+ INotificationType["Push"] = "PUSH";
41
+ })(INotificationType || (exports.INotificationType = INotificationType = {}));
29
42
  exports.OnNotificationDocument = (0, client_1.gql) `
30
- subscription OnNotification($authToken: String!) {
31
- onNotification(authToken: $authToken) {
43
+ subscription OnNotification($authToken: String!, $notificationTypes: [NotificationType!]!) {
44
+ onNotification(authToken: $authToken, notificationTypes: $notificationTypes) {
32
45
  notificationType
46
+ eventType
33
47
  createdAt
34
48
  name
35
49
  description
@@ -51,6 +65,7 @@ exports.OnNotificationDocument = (0, client_1.gql) `
51
65
  * const { data, loading, error } = useOnNotificationSubscription({
52
66
  * variables: {
53
67
  * authToken: // value for 'authToken'
68
+ * notificationTypes: // value for 'notificationTypes'
54
69
  * },
55
70
  * });
56
71
  */
package/build/index.d.ts CHANGED
@@ -19,6 +19,7 @@ import * as notificationsSchema from "./graphql_tools/__generated__/notification
19
19
  declare const schema: {
20
20
  useOnNotificationSubscription(baseOptions: import("@apollo/client").SubscriptionHookOptions<notificationsSchema.IOnNotificationSubscription, notificationsSchema.Exact<{
21
21
  authToken: string;
22
+ notificationTypes: notificationsSchema.INotificationType[];
22
23
  }>>): {
23
24
  restart(): void;
24
25
  loading: boolean;
@@ -26,8 +27,11 @@ declare const schema: {
26
27
  error?: import("@apollo/client").ApolloError | undefined;
27
28
  variables?: notificationsSchema.Exact<{
28
29
  authToken: string;
30
+ notificationTypes: notificationsSchema.INotificationType[];
29
31
  }> | undefined;
30
32
  };
33
+ IEventType: typeof notificationsSchema.IEventType;
34
+ INotificationType: typeof notificationsSchema.INotificationType;
31
35
  OnNotificationDocument: import("graphql").DocumentNode;
32
36
  useClaimFarmingRewardMutation(baseOptions?: import("@apollo/client").MutationHookOptions<tapsSchema.IClaimFarmingRewardMutation, tapsSchema.Exact<{
33
37
  [key: string]: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludo.ninja/api",
3
- "version": "2.8.80",
3
+ "version": "2.8.82",
4
4
  "main": "./build/index.js",
5
5
  "scripts": {
6
6
  "test": "jest",
@@ -19,20 +19,34 @@ export type Scalars = {
19
19
  };
20
20
 
21
21
 
22
+ export enum IEventType {
23
+ CommonOpportunity = 'COMMON_OPPORTUNITY',
24
+ UserInvitee = 'USER_INVITEE',
25
+ UserOpportunity = 'USER_OPPORTUNITY',
26
+ UserXpIncrement = 'USER_XP_INCREMENT',
27
+ UserXps = 'USER_XPS'
28
+ }
29
+
22
30
 
23
31
  export type IMutation = {
24
32
  setDummy: Scalars['String'];
25
33
  };
26
34
 
27
35
  export type INotification = {
28
- notificationType?: Maybe<Scalars['String']>;
29
- createdAt?: Maybe<Scalars['Long']>;
30
- name?: Maybe<Scalars['String']>;
36
+ notificationType: INotificationType;
37
+ eventType: IEventType;
38
+ createdAt: Scalars['Long'];
39
+ name: Scalars['String'];
31
40
  description?: Maybe<Scalars['String']>;
32
41
  media?: Maybe<Scalars['String']>;
33
42
  link?: Maybe<Scalars['String']>;
34
43
  };
35
44
 
45
+ export enum INotificationType {
46
+ RedDot = 'RED_DOT',
47
+ Push = 'PUSH'
48
+ }
49
+
36
50
  export type IQuery = {
37
51
  getDummy: Scalars['String'];
38
52
  };
@@ -45,6 +59,7 @@ export type ISubscription = {
45
59
 
46
60
  export type ISubscriptionOnNotificationArgs = {
47
61
  authToken: Scalars['String'];
62
+ notificationTypes: Array<INotificationType>;
48
63
  };
49
64
 
50
65
 
@@ -116,10 +131,12 @@ export type DirectiveResolverFn<TResult = {}, TParent = {}, TContext = {}, TArgs
116
131
 
117
132
  /** Mapping between all available schema types and the resolvers types */
118
133
  export type IResolversTypes = {
134
+ EventType: IEventType;
119
135
  Long: ResolverTypeWrapper<Scalars['Long']>;
120
136
  Mutation: ResolverTypeWrapper<{}>;
121
137
  String: ResolverTypeWrapper<Scalars['String']>;
122
138
  Notification: ResolverTypeWrapper<INotification>;
139
+ NotificationType: INotificationType;
123
140
  Query: ResolverTypeWrapper<{}>;
124
141
  Subscription: ResolverTypeWrapper<{}>;
125
142
  Boolean: ResolverTypeWrapper<Scalars['Boolean']>;
@@ -149,9 +166,10 @@ export type IMutationResolvers<ContextType = any, ParentType extends IResolversP
149
166
  };
150
167
 
151
168
  export type INotificationResolvers<ContextType = any, ParentType extends IResolversParentTypes['Notification'] = IResolversParentTypes['Notification']> = {
152
- notificationType?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
153
- createdAt?: Resolver<Maybe<IResolversTypes['Long']>, ParentType, ContextType>;
154
- name?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
169
+ notificationType?: Resolver<IResolversTypes['NotificationType'], ParentType, ContextType>;
170
+ eventType?: Resolver<IResolversTypes['EventType'], ParentType, ContextType>;
171
+ createdAt?: Resolver<IResolversTypes['Long'], ParentType, ContextType>;
172
+ name?: Resolver<IResolversTypes['String'], ParentType, ContextType>;
155
173
  description?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
156
174
  media?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
157
175
  link?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
@@ -164,7 +182,7 @@ export type IQueryResolvers<ContextType = any, ParentType extends IResolversPare
164
182
 
165
183
  export type ISubscriptionResolvers<ContextType = any, ParentType extends IResolversParentTypes['Subscription'] = IResolversParentTypes['Subscription']> = {
166
184
  onDummy?: SubscriptionResolver<IResolversTypes['String'], "onDummy", ParentType, ContextType>;
167
- onNotification?: SubscriptionResolver<IResolversTypes['Notification'], "onNotification", ParentType, ContextType, RequireFields<ISubscriptionOnNotificationArgs, 'authToken'>>;
185
+ onNotification?: SubscriptionResolver<IResolversTypes['Notification'], "onNotification", ParentType, ContextType, RequireFields<ISubscriptionOnNotificationArgs, 'authToken' | 'notificationTypes'>>;
168
186
  };
169
187
 
170
188
  export type IResolvers<ContextType = any> = {
@@ -181,16 +199,18 @@ export type IDirectiveResolvers<ContextType = any> = {
181
199
 
182
200
  export type IOnNotificationSubscriptionVariables = Exact<{
183
201
  authToken: Scalars['String'];
202
+ notificationTypes: Array<INotificationType>;
184
203
  }>;
185
204
 
186
205
 
187
- export type IOnNotificationSubscription = { onNotification: Pick<INotification, 'notificationType' | 'createdAt' | 'name' | 'description' | 'media' | 'link'> };
206
+ export type IOnNotificationSubscription = { onNotification: Pick<INotification, 'notificationType' | 'eventType' | 'createdAt' | 'name' | 'description' | 'media' | 'link'> };
188
207
 
189
208
 
190
209
  export const OnNotificationDocument = gql`
191
- subscription OnNotification($authToken: String!) {
192
- onNotification(authToken: $authToken) {
210
+ subscription OnNotification($authToken: String!, $notificationTypes: [NotificationType!]!) {
211
+ onNotification(authToken: $authToken, notificationTypes: $notificationTypes) {
193
212
  notificationType
213
+ eventType
194
214
  createdAt
195
215
  name
196
216
  description
@@ -213,6 +233,7 @@ export const OnNotificationDocument = gql`
213
233
  * const { data, loading, error } = useOnNotificationSubscription({
214
234
  * variables: {
215
235
  * authToken: // value for 'authToken'
236
+ * notificationTypes: // value for 'notificationTypes'
216
237
  * },
217
238
  * });
218
239
  */