Skip to content

Commit

Permalink
fix: adds ProfileOperations.hasBlockedMe field
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarenaldi committed Jun 27, 2024
1 parent 5591090 commit 31d154c
Show file tree
Hide file tree
Showing 18 changed files with 1,698 additions and 434 deletions.
9 changes: 9 additions & 0 deletions .changeset/wet-bottles-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@lens-protocol/api-bindings": patch
"@lens-protocol/client": patch
"@lens-protocol/react": patch
"@lens-protocol/react-native": patch
"@lens-protocol/react-web": patch
---

fix: adds `ProfileOperations.hasBlockedMe` field.
11 changes: 7 additions & 4 deletions packages/api-bindings/src/lens/graphql/fragments.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,14 @@ fragment ProfileStats on ProfileStats {

fragment ProfileOperations on ProfileOperations {
__typename
canBlock
canUnblock
canFollow
canUnfollow
id
hasBlockedMe {
...OptimisticStatusResult
}
isBlockedByMe {
...OptimisticStatusResult
}
Expand All @@ -239,10 +246,6 @@ fragment ProfileOperations on ProfileOperations {
isFollowingMe {
...OptimisticStatusResult
}
canBlock
canUnblock
canFollow
canUnfollow
}

fragment ProfileOnchainIdentity on ProfileOnchainIdentity {
Expand Down
1,011 changes: 786 additions & 225 deletions packages/api-bindings/src/lens/graphql/generated.ts

Large diffs are not rendered by default.

150 changes: 121 additions & 29 deletions packages/client/src/graphql/fragments.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,12 @@ export type ProfileFragment = {
ownedBy: NetworkAddressFragment;
operations: {
__typename: 'ProfileOperations';
id: string;
canBlock: boolean;
canUnblock: boolean;
canFollow: Types.TriStateValue;
canUnfollow: boolean;
id: string;
hasBlockedMe: OptimisticStatusResultFragment;
isBlockedByMe: OptimisticStatusResultFragment;
isFollowedByMe: OptimisticStatusResultFragment;
isFollowingMe: OptimisticStatusResultFragment;
Expand Down Expand Up @@ -2548,6 +2549,23 @@ export const ProfileFragmentDoc = {
kind: 'SelectionSet',
selections: [
{ kind: 'Field', name: { kind: 'Name', value: '__typename' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canBlock' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canUnblock' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canFollow' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canUnfollow' } },
{
kind: 'Field',
name: { kind: 'Name', value: 'hasBlockedMe' },
selectionSet: {
kind: 'SelectionSet',
selections: [
{
kind: 'FragmentSpread',
name: { kind: 'Name', value: 'OptimisticStatusResult' },
},
],
},
},
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
{
kind: 'Field',
Expand Down Expand Up @@ -2588,10 +2606,6 @@ export const ProfileFragmentDoc = {
],
},
},
{ kind: 'Field', name: { kind: 'Name', value: 'canBlock' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canUnblock' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canFollow' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canUnfollow' } },
],
},
},
Expand Down Expand Up @@ -29479,6 +29493,23 @@ export const PostFragmentDoc = {
kind: 'SelectionSet',
selections: [
{ kind: 'Field', name: { kind: 'Name', value: '__typename' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canBlock' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canUnblock' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canFollow' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canUnfollow' } },
{
kind: 'Field',
name: { kind: 'Name', value: 'hasBlockedMe' },
selectionSet: {
kind: 'SelectionSet',
selections: [
{
kind: 'FragmentSpread',
name: { kind: 'Name', value: 'OptimisticStatusResult' },
},
],
},
},
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
{
kind: 'Field',
Expand Down Expand Up @@ -29519,10 +29550,6 @@ export const PostFragmentDoc = {
],
},
},
{ kind: 'Field', name: { kind: 'Name', value: 'canBlock' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canUnblock' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canFollow' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canUnfollow' } },
],
},
},
Expand Down Expand Up @@ -34941,6 +34968,23 @@ export const CommentBaseFragmentDoc = {
kind: 'SelectionSet',
selections: [
{ kind: 'Field', name: { kind: 'Name', value: '__typename' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canBlock' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canUnblock' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canFollow' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canUnfollow' } },
{
kind: 'Field',
name: { kind: 'Name', value: 'hasBlockedMe' },
selectionSet: {
kind: 'SelectionSet',
selections: [
{
kind: 'FragmentSpread',
name: { kind: 'Name', value: 'OptimisticStatusResult' },
},
],
},
},
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
{
kind: 'Field',
Expand Down Expand Up @@ -34981,10 +35025,6 @@ export const CommentBaseFragmentDoc = {
],
},
},
{ kind: 'Field', name: { kind: 'Name', value: 'canBlock' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canUnblock' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canFollow' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canUnfollow' } },
],
},
},
Expand Down Expand Up @@ -40269,6 +40309,23 @@ export const QuoteBaseFragmentDoc = {
kind: 'SelectionSet',
selections: [
{ kind: 'Field', name: { kind: 'Name', value: '__typename' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canBlock' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canUnblock' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canFollow' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canUnfollow' } },
{
kind: 'Field',
name: { kind: 'Name', value: 'hasBlockedMe' },
selectionSet: {
kind: 'SelectionSet',
selections: [
{
kind: 'FragmentSpread',
name: { kind: 'Name', value: 'OptimisticStatusResult' },
},
],
},
},
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
{
kind: 'Field',
Expand Down Expand Up @@ -40309,10 +40366,6 @@ export const QuoteBaseFragmentDoc = {
],
},
},
{ kind: 'Field', name: { kind: 'Name', value: 'canBlock' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canUnblock' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canFollow' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canUnfollow' } },
],
},
},
Expand Down Expand Up @@ -45107,6 +45160,23 @@ export const CommentFragmentDoc = {
kind: 'SelectionSet',
selections: [
{ kind: 'Field', name: { kind: 'Name', value: '__typename' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canBlock' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canUnblock' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canFollow' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canUnfollow' } },
{
kind: 'Field',
name: { kind: 'Name', value: 'hasBlockedMe' },
selectionSet: {
kind: 'SelectionSet',
selections: [
{
kind: 'FragmentSpread',
name: { kind: 'Name', value: 'OptimisticStatusResult' },
},
],
},
},
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
{
kind: 'Field',
Expand Down Expand Up @@ -45147,10 +45217,6 @@ export const CommentFragmentDoc = {
],
},
},
{ kind: 'Field', name: { kind: 'Name', value: 'canBlock' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canUnblock' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canFollow' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canUnfollow' } },
],
},
},
Expand Down Expand Up @@ -51841,6 +51907,23 @@ export const QuoteFragmentDoc = {
kind: 'SelectionSet',
selections: [
{ kind: 'Field', name: { kind: 'Name', value: '__typename' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canBlock' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canUnblock' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canFollow' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canUnfollow' } },
{
kind: 'Field',
name: { kind: 'Name', value: 'hasBlockedMe' },
selectionSet: {
kind: 'SelectionSet',
selections: [
{
kind: 'FragmentSpread',
name: { kind: 'Name', value: 'OptimisticStatusResult' },
},
],
},
},
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
{
kind: 'Field',
Expand Down Expand Up @@ -51881,10 +51964,6 @@ export const QuoteFragmentDoc = {
],
},
},
{ kind: 'Field', name: { kind: 'Name', value: 'canBlock' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canUnblock' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canFollow' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canUnfollow' } },
],
},
},
Expand Down Expand Up @@ -58575,6 +58654,23 @@ export const MirrorFragmentDoc = {
kind: 'SelectionSet',
selections: [
{ kind: 'Field', name: { kind: 'Name', value: '__typename' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canBlock' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canUnblock' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canFollow' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canUnfollow' } },
{
kind: 'Field',
name: { kind: 'Name', value: 'hasBlockedMe' },
selectionSet: {
kind: 'SelectionSet',
selections: [
{
kind: 'FragmentSpread',
name: { kind: 'Name', value: 'OptimisticStatusResult' },
},
],
},
},
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
{
kind: 'Field',
Expand Down Expand Up @@ -58615,10 +58711,6 @@ export const MirrorFragmentDoc = {
],
},
},
{ kind: 'Field', name: { kind: 'Name', value: 'canBlock' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canUnblock' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canFollow' } },
{ kind: 'Field', name: { kind: 'Name', value: 'canUnfollow' } },
],
},
},
Expand Down
11 changes: 7 additions & 4 deletions packages/client/src/graphql/fragments.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,13 @@ fragment Profile on Profile {
createdAt
operations {
__typename
canBlock
canUnblock
canFollow
canUnfollow
hasBlockedMe {
...OptimisticStatusResult
}
id
isBlockedByMe {
...OptimisticStatusResult
Expand All @@ -293,10 +300,6 @@ fragment Profile on Profile {
isFollowingMe {
...OptimisticStatusResult
}
canBlock
canUnblock
canFollow
canUnfollow
}
interests
guardian {
Expand Down
37 changes: 37 additions & 0 deletions packages/client/src/graphql/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,13 @@ export type FollowingRequest = {
orderBy?: InputMaybe<ProfilesOrderBy>;
};

export enum ForYouSource {
Curated = 'curated',
ExtendedNetwork = 'extended_network',
Following = 'following',
Popular = 'popular',
}

export type FrameEip712Request = {
actionResponse: Scalars['String']['input'];
buttonIndex: Scalars['Int']['input'];
Expand Down Expand Up @@ -664,6 +671,13 @@ export type InternalCuratedUpdateRequest = {
secret: Scalars['String']['input'];
};

export type InternalForYouFeedRequest = {
d: Scalars['DateTime']['input'];
n: Scalars['Int']['input'];
p?: InputMaybe<Scalars['ProfileId']['input']>;
secret: Scalars['String']['input'];
};

export type InternalInvitesRequest = {
p: Scalars['ProfileId']['input'];
secret: Scalars['String']['input'];
Expand Down Expand Up @@ -798,6 +812,13 @@ export enum MetadataAttributeType {
String = 'STRING',
}

export type ModDisputeReportRequest = {
reason: Scalars['String']['input'];
reportedProfileId?: InputMaybe<Scalars['ProfileId']['input']>;
reportedPublicationId?: InputMaybe<Scalars['PublicationId']['input']>;
reporter: Scalars['ProfileId']['input'];
};

export type ModExplorePublicationRequest = {
cursor?: InputMaybe<Scalars['Cursor']['input']>;
limit?: InputMaybe<LimitType>;
Expand All @@ -818,6 +839,13 @@ export type ModExplorePublicationsWhere = {
since?: InputMaybe<Scalars['UnixTimestamp']['input']>;
};

export type ModReportsRequest = {
cursor?: InputMaybe<Scalars['Cursor']['input']>;
forProfile?: InputMaybe<Scalars['ProfileId']['input']>;
forPublication?: InputMaybe<Scalars['PublicationId']['input']>;
limit?: InputMaybe<LimitType>;
};

export type ModuleCurrencyApproval = {
followModule?: InputMaybe<FollowModuleType>;
openActionModule?: InputMaybe<OpenActionModuleType>;
Expand Down Expand Up @@ -1458,6 +1486,14 @@ export enum PublicationContentWarningType {
Spoiler = 'SPOILER',
}

export type PublicationForYouRequest = {
cursor?: InputMaybe<Scalars['Cursor']['input']>;
for?: InputMaybe<Scalars['ProfileId']['input']>;
limit?: InputMaybe<LimitType>;
/** The `For You` feed results are served randomized by default. Toggling this off will end up in a more `static` feed. */
randomized?: InputMaybe<Scalars['Boolean']['input']>;
};

export type PublicationMetadataContentWarningFilter = {
oneOf: Array<PublicationContentWarningType>;
};
Expand Down Expand Up @@ -1565,6 +1601,7 @@ export enum PublicationReportingIllegalSubreason {
AnimalAbuse = 'ANIMAL_ABUSE',
DirectThreat = 'DIRECT_THREAT',
HumanAbuse = 'HUMAN_ABUSE',
IntEllEctualProperty = 'INTEllECTUAL_PROPERTY',
ThreatIndividual = 'THREAT_INDIVIDUAL',
Violence = 'VIOLENCE',
}
Expand Down
Loading

0 comments on commit 31d154c

Please sign in to comment.