Skip to content

Commit

Permalink
Add enum for reasons to report an account
Browse files Browse the repository at this point in the history
  • Loading branch information
juangm committed Dec 12, 2024
1 parent ac6bdeb commit 33fb8ab
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/client/src/actions/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ export function unmuteAccount(
* ```ts
* const result = await reportAccount(sessionClient, {
* account: evmAddress("0xe5439696f4057aF073c0FB2dc6e5e755392922e1"),
* reason: "REPETITIVE_SPAM",
* reason: AccountReportReason.RepetitiveSpam,
* });
* ```
*
Expand Down
9 changes: 9 additions & 0 deletions packages/graphql/src/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,12 @@ export enum PageSize {
Ten = 'TEN',
Fifty = 'FIFTY',
}

/**
* Enum for the different reasons to report an account.
*/
export enum AccountReportReason {
Impersonation = 'IMPERSONATION',
RepetitiveSpam = 'REPETITIVE_SPAM',
Other = 'OTHER',
}
3 changes: 2 additions & 1 deletion packages/graphql/src/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ import {
never,
} from '@lens-protocol/types';
import { type DocumentDecoration, type FragmentOf, initGraphQLTada } from 'gql.tada';
import type { PageSize } from './enums';
import type { AccountReportReason, PageSize } from './enums';
import type { introspection } from './graphql-env';

export const graphql = initGraphQLTada<{
disableMasking: true;
introspection: introspection;
scalars: {
AccessToken: AccessToken;
AccountReportReason: AccountReportReason;
BigDecimal: BigDecimal;
BigInt: BigIntString;
BlockchainData: BlockchainData;
Expand Down

0 comments on commit 33fb8ab

Please sign in to comment.