@ludo.ninja/api 1.0.12 → 1.0.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludo.ninja/api",
3
- "version": "1.0.12",
3
+ "version": "1.0.14",
4
4
  "main": "./build/index.js",
5
5
  "scripts": {
6
6
  "test": "jest",
@@ -0,0 +1,3 @@
1
+ mutation DeleteGallery($galleryId: ID!) {
2
+ deleteGallery(galleryId: $galleryId)
3
+ }
@@ -1,7 +1,7 @@
1
1
  query GetMyInviteCodes {
2
2
  getMyInviteCodes {
3
3
  inviteCode
4
- inviteId
4
+ inviteeId
5
5
  isUsed
6
6
  usedAt
7
7
  }
@@ -0,0 +1,8 @@
1
+ mutation GenerateNewInviteCodes($codesNum: Int!) {
2
+ generateNewInviteCodes(codesNum: $codesNum) {
3
+ inviteCode
4
+ inviteeId
5
+ isUsed
6
+ usedAt
7
+ }
8
+ }
@@ -2,6 +2,8 @@ directive @Min(value: Int! = 0, message: String = "%s") on ARGUMENT_DEFINITION |
2
2
 
3
3
  directive @NotBlank(message: String = "graphql.validation.NotBlank.message") on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
4
4
 
5
+ directive @Range(min: Int, max: Int, message: String) on ARGUMENT_DEFINITION
6
+
5
7
  type Address {
6
8
  creators: [Wallet]
7
9
  owners: [Wallet]
@@ -713,6 +715,7 @@ type Mutation {
713
715
  dislikeCollection(collectionId: String!): Boolean!
714
716
  editGallery(galleryId: ID!, name: String, description: String, customUrl: String): Boolean!
715
717
  followProfile(followingUserId: ID!): Boolean!
718
+ generateNewInviteCodes(codesNum: Int!): [UserInviteCode!]!
716
719
  hideAsset(assetId: String!, blurred: Boolean!, locationsToHide: [String]!): Boolean!
717
720
  hideAssets(input: [UpdateAssetModeration]!): Boolean!
718
721
  hideBannerAsset(id: String!): Boolean!
@@ -1090,7 +1093,7 @@ type UserInterest {
1090
1093
 
1091
1094
  type UserInviteCode {
1092
1095
  inviteCode: String!
1093
- inviteId: ID
1096
+ inviteeId: ID
1094
1097
  isUsed: Boolean!
1095
1098
  usedAt: Long
1096
1099
  }
@@ -18,6 +18,7 @@ export type Scalars = {
18
18
 
19
19
 
20
20
 
21
+
21
22
  export type IAddress = {
22
23
  creators?: Maybe<Array<Maybe<IWallet>>>;
23
24
  owners?: Maybe<Array<Maybe<IWallet>>>;
@@ -728,6 +729,7 @@ export type IMutation = {
728
729
  dislikeCollection: Scalars['Boolean'];
729
730
  editGallery: Scalars['Boolean'];
730
731
  followProfile: Scalars['Boolean'];
732
+ generateNewInviteCodes: Array<IUserInviteCode>;
731
733
  hideAsset: Scalars['Boolean'];
732
734
  hideAssets: Scalars['Boolean'];
733
735
  hideBannerAsset: Scalars['Boolean'];
@@ -986,6 +988,11 @@ export type IMutationFollowProfileArgs = {
986
988
  };
987
989
 
988
990
 
991
+ export type IMutationGenerateNewInviteCodesArgs = {
992
+ codesNum: Scalars['Int'];
993
+ };
994
+
995
+
989
996
  export type IMutationHideAssetArgs = {
990
997
  assetId: Scalars['String'];
991
998
  blurred: Scalars['Boolean'];
@@ -2103,7 +2110,7 @@ export type IUserInterest = {
2103
2110
 
2104
2111
  export type IUserInviteCode = {
2105
2112
  inviteCode: Scalars['String'];
2106
- inviteId?: Maybe<Scalars['ID']>;
2113
+ inviteeId?: Maybe<Scalars['ID']>;
2107
2114
  isUsed: Scalars['Boolean'];
2108
2115
  usedAt?: Maybe<Scalars['Long']>;
2109
2116
  };
@@ -2452,6 +2459,13 @@ export type ICreateGalleryV2MutationVariables = Exact<{
2452
2459
 
2453
2460
  export type ICreateGalleryV2Mutation = Pick<IMutation, 'createGalleryV2'>;
2454
2461
 
2462
+ export type IDeleteGalleryMutationVariables = Exact<{
2463
+ galleryId: Scalars['ID'];
2464
+ }>;
2465
+
2466
+
2467
+ export type IDeleteGalleryMutation = Pick<IMutation, 'deleteGallery'>;
2468
+
2455
2469
  export type IDeleteGalleryBannerMutationVariables = Exact<{
2456
2470
  galleryId: Scalars['ID'];
2457
2471
  }>;
@@ -2786,7 +2800,14 @@ export type IFetchUserWalletsQuery = { fetchUserWallets: Array<Maybe<Pick<IWalle
2786
2800
  export type IGetMyInviteCodesQueryVariables = Exact<{ [key: string]: never; }>;
2787
2801
 
2788
2802
 
2789
- export type IGetMyInviteCodesQuery = { getMyInviteCodes: Array<Pick<IUserInviteCode, 'inviteCode' | 'inviteId' | 'isUsed' | 'usedAt'>> };
2803
+ export type IGetMyInviteCodesQuery = { getMyInviteCodes: Array<Pick<IUserInviteCode, 'inviteCode' | 'inviteeId' | 'isUsed' | 'usedAt'>> };
2804
+
2805
+ export type IGenerateNewInviteCodesMutationVariables = Exact<{
2806
+ codesNum: Scalars['Int'];
2807
+ }>;
2808
+
2809
+
2810
+ export type IGenerateNewInviteCodesMutation = { generateNewInviteCodes: Array<Pick<IUserInviteCode, 'inviteCode' | 'inviteeId' | 'isUsed' | 'usedAt'>> };
2790
2811
 
2791
2812
  export type IFetchUserpicQueryVariables = Exact<{
2792
2813
  userId: Scalars['ID'];
@@ -4257,6 +4278,36 @@ export function useCreateGalleryV2Mutation(baseOptions?: Apollo.MutationHookOpti
4257
4278
  export type CreateGalleryV2MutationHookResult = ReturnType<typeof useCreateGalleryV2Mutation>;
4258
4279
  export type CreateGalleryV2MutationResult = Apollo.MutationResult<ICreateGalleryV2Mutation>;
4259
4280
  export type CreateGalleryV2MutationOptions = Apollo.BaseMutationOptions<ICreateGalleryV2Mutation, ICreateGalleryV2MutationVariables>;
4281
+ export const DeleteGalleryDocument = gql`
4282
+ mutation DeleteGallery($galleryId: ID!) {
4283
+ deleteGallery(galleryId: $galleryId)
4284
+ }
4285
+ `;
4286
+ export type IDeleteGalleryMutationFn = Apollo.MutationFunction<IDeleteGalleryMutation, IDeleteGalleryMutationVariables>;
4287
+
4288
+ /**
4289
+ * __useDeleteGalleryMutation__
4290
+ *
4291
+ * To run a mutation, you first call `useDeleteGalleryMutation` within a React component and pass it any options that fit your needs.
4292
+ * When your component renders, `useDeleteGalleryMutation` returns a tuple that includes:
4293
+ * - A mutate function that you can call at any time to execute the mutation
4294
+ * - An object with fields that represent the current status of the mutation's execution
4295
+ *
4296
+ * @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;
4297
+ *
4298
+ * @example
4299
+ * const [deleteGalleryMutation, { data, loading, error }] = useDeleteGalleryMutation({
4300
+ * variables: {
4301
+ * galleryId: // value for 'galleryId'
4302
+ * },
4303
+ * });
4304
+ */
4305
+ export function useDeleteGalleryMutation(baseOptions?: Apollo.MutationHookOptions<IDeleteGalleryMutation, IDeleteGalleryMutationVariables>) {
4306
+ return Apollo.useMutation<IDeleteGalleryMutation, IDeleteGalleryMutationVariables>(DeleteGalleryDocument, baseOptions);
4307
+ }
4308
+ export type DeleteGalleryMutationHookResult = ReturnType<typeof useDeleteGalleryMutation>;
4309
+ export type DeleteGalleryMutationResult = Apollo.MutationResult<IDeleteGalleryMutation>;
4310
+ export type DeleteGalleryMutationOptions = Apollo.BaseMutationOptions<IDeleteGalleryMutation, IDeleteGalleryMutationVariables>;
4260
4311
  export const DeleteGalleryBannerDocument = gql`
4261
4312
  mutation DeleteGalleryBanner($galleryId: ID!) {
4262
4313
  deleteGalleryBanner(galleryId: $galleryId)
@@ -5714,7 +5765,7 @@ export const GetMyInviteCodesDocument = gql`
5714
5765
  query GetMyInviteCodes {
5715
5766
  getMyInviteCodes {
5716
5767
  inviteCode
5717
- inviteId
5768
+ inviteeId
5718
5769
  isUsed
5719
5770
  usedAt
5720
5771
  }
@@ -5745,6 +5796,41 @@ export function useGetMyInviteCodesLazyQuery(baseOptions?: Apollo.LazyQueryHookO
5745
5796
  export type GetMyInviteCodesQueryHookResult = ReturnType<typeof useGetMyInviteCodesQuery>;
5746
5797
  export type GetMyInviteCodesLazyQueryHookResult = ReturnType<typeof useGetMyInviteCodesLazyQuery>;
5747
5798
  export type GetMyInviteCodesQueryResult = Apollo.QueryResult<IGetMyInviteCodesQuery, IGetMyInviteCodesQueryVariables>;
5799
+ export const GenerateNewInviteCodesDocument = gql`
5800
+ mutation GenerateNewInviteCodes($codesNum: Int!) {
5801
+ generateNewInviteCodes(codesNum: $codesNum) {
5802
+ inviteCode
5803
+ inviteeId
5804
+ isUsed
5805
+ usedAt
5806
+ }
5807
+ }
5808
+ `;
5809
+ export type IGenerateNewInviteCodesMutationFn = Apollo.MutationFunction<IGenerateNewInviteCodesMutation, IGenerateNewInviteCodesMutationVariables>;
5810
+
5811
+ /**
5812
+ * __useGenerateNewInviteCodesMutation__
5813
+ *
5814
+ * To run a mutation, you first call `useGenerateNewInviteCodesMutation` within a React component and pass it any options that fit your needs.
5815
+ * When your component renders, `useGenerateNewInviteCodesMutation` returns a tuple that includes:
5816
+ * - A mutate function that you can call at any time to execute the mutation
5817
+ * - An object with fields that represent the current status of the mutation's execution
5818
+ *
5819
+ * @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;
5820
+ *
5821
+ * @example
5822
+ * const [generateNewInviteCodesMutation, { data, loading, error }] = useGenerateNewInviteCodesMutation({
5823
+ * variables: {
5824
+ * codesNum: // value for 'codesNum'
5825
+ * },
5826
+ * });
5827
+ */
5828
+ export function useGenerateNewInviteCodesMutation(baseOptions?: Apollo.MutationHookOptions<IGenerateNewInviteCodesMutation, IGenerateNewInviteCodesMutationVariables>) {
5829
+ return Apollo.useMutation<IGenerateNewInviteCodesMutation, IGenerateNewInviteCodesMutationVariables>(GenerateNewInviteCodesDocument, baseOptions);
5830
+ }
5831
+ export type GenerateNewInviteCodesMutationHookResult = ReturnType<typeof useGenerateNewInviteCodesMutation>;
5832
+ export type GenerateNewInviteCodesMutationResult = Apollo.MutationResult<IGenerateNewInviteCodesMutation>;
5833
+ export type GenerateNewInviteCodesMutationOptions = Apollo.BaseMutationOptions<IGenerateNewInviteCodesMutation, IGenerateNewInviteCodesMutationVariables>;
5748
5834
  export const FetchUserpicDocument = gql`
5749
5835
  query FetchUserpic($userId: ID!) {
5750
5836
  fetchUserpic(userId: $userId)
@@ -1,5 +1,8 @@
1
+ directive @Range(min: Int, max: Int, message: String) on ARGUMENT_DEFINITION
2
+
1
3
  extend type Mutation {
2
4
  updateProfile(profile: InputProfile): Boolean!
3
5
  followProfile(followingUserId: ID!): Boolean!
4
6
  unfollowProfile(followingUserId: ID!): Boolean!
7
+ generateNewInviteCodes(codesNum: Int! @Range(min: 1, max: 10)): [UserInviteCode!]!
5
8
  }
@@ -1,6 +1,6 @@
1
1
  type UserInviteCode {
2
2
  inviteCode: String!
3
- inviteId: ID
3
+ inviteeId: ID
4
4
  isUsed: Boolean!
5
5
  usedAt: Long
6
6
  }