@ludo.ninja/api 2.8.72 → 2.8.73

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.
@@ -0,0 +1,315 @@
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.useOnPlayerStateUpdatedSubscription = exports.OnPlayerStateUpdatedDocument = exports.useFetchPlayerStateLazyQuery = exports.useFetchPlayerStateQuery = exports.FetchPlayerStateDocument = exports.useFetchFrensDataLazyQuery = exports.useFetchFrensDataQuery = exports.FetchFrensDataDocument = exports.useStartFarmingMutation = exports.StartFarmingDocument = exports.useMarkNotificationAsShownMutation = exports.MarkNotificationAsShownDocument = exports.useMarkNotificationAsReadMutation = exports.MarkNotificationAsReadDocument = exports.useMarkNotificationAsNewMutation = exports.MarkNotificationAsNewDocument = exports.useConfirmStreakNotificationHasBeenReadMutation = exports.ConfirmStreakNotificationHasBeenReadDocument = exports.useClaimFarmingRewardMutation = exports.ClaimFarmingRewardDocument = void 0;
27
+ const client_1 = require("@apollo/client");
28
+ const Apollo = __importStar(require("@apollo/client"));
29
+ exports.ClaimFarmingRewardDocument = (0, client_1.gql) `
30
+ mutation ClaimFarmingReward {
31
+ claimFarmingReward
32
+ }
33
+ `;
34
+ /**
35
+ * __useClaimFarmingRewardMutation__
36
+ *
37
+ * To run a mutation, you first call `useClaimFarmingRewardMutation` within a React component and pass it any options that fit your needs.
38
+ * When your component renders, `useClaimFarmingRewardMutation` returns a tuple that includes:
39
+ * - A mutate function that you can call at any time to execute the mutation
40
+ * - An object with fields that represent the current status of the mutation's execution
41
+ *
42
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
43
+ *
44
+ * @example
45
+ * const [claimFarmingRewardMutation, { data, loading, error }] = useClaimFarmingRewardMutation({
46
+ * variables: {
47
+ * },
48
+ * });
49
+ */
50
+ function useClaimFarmingRewardMutation(baseOptions) {
51
+ return Apollo.useMutation(exports.ClaimFarmingRewardDocument, baseOptions);
52
+ }
53
+ exports.useClaimFarmingRewardMutation = useClaimFarmingRewardMutation;
54
+ exports.ConfirmStreakNotificationHasBeenReadDocument = (0, client_1.gql) `
55
+ mutation ConfirmStreakNotificationHasBeenRead($streakId: ID!) {
56
+ confirmStreakNotificationHasBeenRead(streakId: $streakId)
57
+ }
58
+ `;
59
+ /**
60
+ * __useConfirmStreakNotificationHasBeenReadMutation__
61
+ *
62
+ * To run a mutation, you first call `useConfirmStreakNotificationHasBeenReadMutation` within a React component and pass it any options that fit your needs.
63
+ * When your component renders, `useConfirmStreakNotificationHasBeenReadMutation` returns a tuple that includes:
64
+ * - A mutate function that you can call at any time to execute the mutation
65
+ * - An object with fields that represent the current status of the mutation's execution
66
+ *
67
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
68
+ *
69
+ * @example
70
+ * const [confirmStreakNotificationHasBeenReadMutation, { data, loading, error }] = useConfirmStreakNotificationHasBeenReadMutation({
71
+ * variables: {
72
+ * streakId: // value for 'streakId'
73
+ * },
74
+ * });
75
+ */
76
+ function useConfirmStreakNotificationHasBeenReadMutation(baseOptions) {
77
+ return Apollo.useMutation(exports.ConfirmStreakNotificationHasBeenReadDocument, baseOptions);
78
+ }
79
+ exports.useConfirmStreakNotificationHasBeenReadMutation = useConfirmStreakNotificationHasBeenReadMutation;
80
+ exports.MarkNotificationAsNewDocument = (0, client_1.gql) `
81
+ mutation MarkNotificationAsNew($notificationId: ID!) {
82
+ markNotificationAsNew(notificationId: $notificationId)
83
+ }
84
+ `;
85
+ /**
86
+ * __useMarkNotificationAsNewMutation__
87
+ *
88
+ * To run a mutation, you first call `useMarkNotificationAsNewMutation` within a React component and pass it any options that fit your needs.
89
+ * When your component renders, `useMarkNotificationAsNewMutation` returns a tuple that includes:
90
+ * - A mutate function that you can call at any time to execute the mutation
91
+ * - An object with fields that represent the current status of the mutation's execution
92
+ *
93
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
94
+ *
95
+ * @example
96
+ * const [markNotificationAsNewMutation, { data, loading, error }] = useMarkNotificationAsNewMutation({
97
+ * variables: {
98
+ * notificationId: // value for 'notificationId'
99
+ * },
100
+ * });
101
+ */
102
+ function useMarkNotificationAsNewMutation(baseOptions) {
103
+ return Apollo.useMutation(exports.MarkNotificationAsNewDocument, baseOptions);
104
+ }
105
+ exports.useMarkNotificationAsNewMutation = useMarkNotificationAsNewMutation;
106
+ exports.MarkNotificationAsReadDocument = (0, client_1.gql) `
107
+ mutation MarkNotificationAsRead($notificationId: ID!) {
108
+ markNotificationAsRead(notificationId: $notificationId)
109
+ }
110
+ `;
111
+ /**
112
+ * __useMarkNotificationAsReadMutation__
113
+ *
114
+ * To run a mutation, you first call `useMarkNotificationAsReadMutation` within a React component and pass it any options that fit your needs.
115
+ * When your component renders, `useMarkNotificationAsReadMutation` returns a tuple that includes:
116
+ * - A mutate function that you can call at any time to execute the mutation
117
+ * - An object with fields that represent the current status of the mutation's execution
118
+ *
119
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
120
+ *
121
+ * @example
122
+ * const [markNotificationAsReadMutation, { data, loading, error }] = useMarkNotificationAsReadMutation({
123
+ * variables: {
124
+ * notificationId: // value for 'notificationId'
125
+ * },
126
+ * });
127
+ */
128
+ function useMarkNotificationAsReadMutation(baseOptions) {
129
+ return Apollo.useMutation(exports.MarkNotificationAsReadDocument, baseOptions);
130
+ }
131
+ exports.useMarkNotificationAsReadMutation = useMarkNotificationAsReadMutation;
132
+ exports.MarkNotificationAsShownDocument = (0, client_1.gql) `
133
+ mutation MarkNotificationAsShown($notificationId: ID!) {
134
+ markNotificationAsShown(notificationId: $notificationId)
135
+ }
136
+ `;
137
+ /**
138
+ * __useMarkNotificationAsShownMutation__
139
+ *
140
+ * To run a mutation, you first call `useMarkNotificationAsShownMutation` within a React component and pass it any options that fit your needs.
141
+ * When your component renders, `useMarkNotificationAsShownMutation` returns a tuple that includes:
142
+ * - A mutate function that you can call at any time to execute the mutation
143
+ * - An object with fields that represent the current status of the mutation's execution
144
+ *
145
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
146
+ *
147
+ * @example
148
+ * const [markNotificationAsShownMutation, { data, loading, error }] = useMarkNotificationAsShownMutation({
149
+ * variables: {
150
+ * notificationId: // value for 'notificationId'
151
+ * },
152
+ * });
153
+ */
154
+ function useMarkNotificationAsShownMutation(baseOptions) {
155
+ return Apollo.useMutation(exports.MarkNotificationAsShownDocument, baseOptions);
156
+ }
157
+ exports.useMarkNotificationAsShownMutation = useMarkNotificationAsShownMutation;
158
+ exports.StartFarmingDocument = (0, client_1.gql) `
159
+ mutation StartFarming {
160
+ startFarming
161
+ }
162
+ `;
163
+ /**
164
+ * __useStartFarmingMutation__
165
+ *
166
+ * To run a mutation, you first call `useStartFarmingMutation` within a React component and pass it any options that fit your needs.
167
+ * When your component renders, `useStartFarmingMutation` returns a tuple that includes:
168
+ * - A mutate function that you can call at any time to execute the mutation
169
+ * - An object with fields that represent the current status of the mutation's execution
170
+ *
171
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
172
+ *
173
+ * @example
174
+ * const [startFarmingMutation, { data, loading, error }] = useStartFarmingMutation({
175
+ * variables: {
176
+ * },
177
+ * });
178
+ */
179
+ function useStartFarmingMutation(baseOptions) {
180
+ return Apollo.useMutation(exports.StartFarmingDocument, baseOptions);
181
+ }
182
+ exports.useStartFarmingMutation = useStartFarmingMutation;
183
+ exports.FetchFrensDataDocument = (0, client_1.gql) `
184
+ query FetchFrensData {
185
+ fetchFrensData {
186
+ activeInviteCodes {
187
+ code
188
+ usedTimes
189
+ maxUsagesLimit
190
+ }
191
+ joinedFriends {
192
+ userId
193
+ ludoUsername
194
+ isAPlayer
195
+ coins
196
+ }
197
+ }
198
+ }
199
+ `;
200
+ /**
201
+ * __useFetchFrensDataQuery__
202
+ *
203
+ * To run a query within a React component, call `useFetchFrensDataQuery` and pass it any options that fit your needs.
204
+ * When your component renders, `useFetchFrensDataQuery` returns an object from Apollo Client that contains loading, error, and data properties
205
+ * you can use to render your UI.
206
+ *
207
+ * @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;
208
+ *
209
+ * @example
210
+ * const { data, loading, error } = useFetchFrensDataQuery({
211
+ * variables: {
212
+ * },
213
+ * });
214
+ */
215
+ function useFetchFrensDataQuery(baseOptions) {
216
+ return Apollo.useQuery(exports.FetchFrensDataDocument, baseOptions);
217
+ }
218
+ exports.useFetchFrensDataQuery = useFetchFrensDataQuery;
219
+ function useFetchFrensDataLazyQuery(baseOptions) {
220
+ return Apollo.useLazyQuery(exports.FetchFrensDataDocument, baseOptions);
221
+ }
222
+ exports.useFetchFrensDataLazyQuery = useFetchFrensDataLazyQuery;
223
+ exports.FetchPlayerStateDocument = (0, client_1.gql) `
224
+ query FetchPlayerState {
225
+ fetchPlayerState {
226
+ userId
227
+ coins
228
+ farmingTask {
229
+ taskId
230
+ status
231
+ startedAt
232
+ }
233
+ playingStreaks {
234
+ streakId
235
+ status
236
+ type
237
+ startedAt
238
+ }
239
+ notifications {
240
+ notificationId
241
+ status
242
+ text
243
+ createdAt
244
+ }
245
+ }
246
+ }
247
+ `;
248
+ /**
249
+ * __useFetchPlayerStateQuery__
250
+ *
251
+ * To run a query within a React component, call `useFetchPlayerStateQuery` and pass it any options that fit your needs.
252
+ * When your component renders, `useFetchPlayerStateQuery` returns an object from Apollo Client that contains loading, error, and data properties
253
+ * you can use to render your UI.
254
+ *
255
+ * @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;
256
+ *
257
+ * @example
258
+ * const { data, loading, error } = useFetchPlayerStateQuery({
259
+ * variables: {
260
+ * },
261
+ * });
262
+ */
263
+ function useFetchPlayerStateQuery(baseOptions) {
264
+ return Apollo.useQuery(exports.FetchPlayerStateDocument, baseOptions);
265
+ }
266
+ exports.useFetchPlayerStateQuery = useFetchPlayerStateQuery;
267
+ function useFetchPlayerStateLazyQuery(baseOptions) {
268
+ return Apollo.useLazyQuery(exports.FetchPlayerStateDocument, baseOptions);
269
+ }
270
+ exports.useFetchPlayerStateLazyQuery = useFetchPlayerStateLazyQuery;
271
+ exports.OnPlayerStateUpdatedDocument = (0, client_1.gql) `
272
+ subscription OnPlayerStateUpdated($authToken: String!) {
273
+ onPlayerStateUpdated(authToken: $authToken) {
274
+ userId
275
+ coins
276
+ farmingTask {
277
+ taskId
278
+ status
279
+ startedAt
280
+ }
281
+ playingStreaks {
282
+ streakId
283
+ status
284
+ type
285
+ startedAt
286
+ }
287
+ notifications {
288
+ notificationId
289
+ status
290
+ text
291
+ createdAt
292
+ }
293
+ }
294
+ }
295
+ `;
296
+ /**
297
+ * __useOnPlayerStateUpdatedSubscription__
298
+ *
299
+ * To run a query within a React component, call `useOnPlayerStateUpdatedSubscription` and pass it any options that fit your needs.
300
+ * When your component renders, `useOnPlayerStateUpdatedSubscription` returns an object from Apollo Client that contains loading, error, and data properties
301
+ * you can use to render your UI.
302
+ *
303
+ * @param baseOptions options that will be passed into the subscription, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
304
+ *
305
+ * @example
306
+ * const { data, loading, error } = useOnPlayerStateUpdatedSubscription({
307
+ * variables: {
308
+ * authToken: // value for 'authToken'
309
+ * },
310
+ * });
311
+ */
312
+ function useOnPlayerStateUpdatedSubscription(baseOptions) {
313
+ return Apollo.useSubscription(exports.OnPlayerStateUpdatedDocument, baseOptions);
314
+ }
315
+ exports.useOnPlayerStateUpdatedSubscription = useOnPlayerStateUpdatedSubscription;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludo.ninja/api",
3
- "version": "2.8.72",
3
+ "version": "2.8.73",
4
4
  "main": "./build/index.js",
5
5
  "scripts": {
6
6
  "test": "jest",
@@ -405,6 +405,7 @@ export type IMutation = {
405
405
  triggerOpportunityNotification: Scalars['Boolean'];
406
406
  updateTier: Scalars['Boolean'];
407
407
  createTier: Scalars['Boolean'];
408
+ updateTierArchivedStatus: Scalars['Boolean'];
408
409
  updateProfileStatus: Scalars['Boolean'];
409
410
  removeSuggestedOpportunity: Scalars['Boolean'];
410
411
  addSuggestedOpportunity: Scalars['Boolean'];
@@ -501,6 +502,12 @@ export type IMutationCreateTierArgs = {
501
502
  };
502
503
 
503
504
 
505
+ export type IMutationUpdateTierArchivedStatusArgs = {
506
+ id: Scalars['ID'];
507
+ isArchived: Scalars['Boolean'];
508
+ };
509
+
510
+
504
511
  export type IMutationUpdateProfileStatusArgs = {
505
512
  userId: Scalars['ID'];
506
513
  isActive: Scalars['Boolean'];
@@ -782,6 +789,7 @@ export type ITier = {
782
789
  name: Scalars['String'];
783
790
  description?: Maybe<Scalars['String']>;
784
791
  fee?: Maybe<Scalars['Float']>;
792
+ archived?: Maybe<Scalars['Boolean']>;
785
793
  };
786
794
 
787
795
  export type ITierInput = {
@@ -1409,6 +1417,7 @@ export type IMutationResolvers<ContextType = any, ParentType extends IResolversP
1409
1417
  triggerOpportunityNotification?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IMutationTriggerOpportunityNotificationArgs, 'opportunityId'>>;
1410
1418
  updateTier?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IMutationUpdateTierArgs, 'id' | 'input'>>;
1411
1419
  createTier?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IMutationCreateTierArgs, 'input'>>;
1420
+ updateTierArchivedStatus?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IMutationUpdateTierArchivedStatusArgs, 'id' | 'isArchived'>>;
1412
1421
  updateProfileStatus?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IMutationUpdateProfileStatusArgs, 'userId' | 'isActive'>>;
1413
1422
  removeSuggestedOpportunity?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IMutationRemoveSuggestedOpportunityArgs, 'userId' | 'opportunityId'>>;
1414
1423
  addSuggestedOpportunity?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IMutationAddSuggestedOpportunityArgs, 'userId' | 'opportunityId'>>;
@@ -1483,6 +1492,7 @@ export type ITierResolvers<ContextType = any, ParentType extends IResolversParen
1483
1492
  name?: Resolver<IResolversTypes['String'], ParentType, ContextType>;
1484
1493
  description?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
1485
1494
  fee?: Resolver<Maybe<IResolversTypes['Float']>, ParentType, ContextType>;
1495
+ archived?: Resolver<Maybe<IResolversTypes['Boolean']>, ParentType, ContextType>;
1486
1496
  __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
1487
1497
  };
1488
1498