diff --git a/packages/api-bindings/codegen-api.yml b/packages/api-bindings/codegen-api.yml index 49ed58a368..571690eafa 100644 --- a/packages/api-bindings/codegen-api.yml +++ b/packages/api-bindings/codegen-api.yml @@ -80,7 +80,7 @@ generates: "import type { EvmAddress, Url } from '@lens-protocol/shared-kernel';", "import type { ContentEncryptionKey } from '../ContentEncryptionKey';", "import type { Cursor } from '../Cursor';", - "import type { ImageSizeTransform } from '../ImageSizeTransform';", + "import type { ImageSizeTransform } from '../ImageTransform';", ] - 'typescript-operations': skipTypename: true diff --git a/packages/api-bindings/package.json b/packages/api-bindings/package.json index 4b0b3e4b72..669409d15b 100644 --- a/packages/api-bindings/package.json +++ b/packages/api-bindings/package.json @@ -39,7 +39,6 @@ }, "license": "MIT", "dependencies": { - "@apollo/client": "^3.7.1", "@lens-protocol/domain": "workspace:*", "@lens-protocol/shared-kernel": "workspace:*", "graphql": "^16.6.0", @@ -47,6 +46,7 @@ "tslib": "^2.5.0" }, "devDependencies": { + "@apollo/client": "^3.8.5", "@babel/core": "^7.20.12", "@babel/preset-env": "^7.20.2", "@babel/preset-typescript": "^7.18.6", @@ -74,6 +74,7 @@ "typescript": "^4.9.5" }, "peerDependencies": { + "@apollo/client": "^3.8.5", "@faker-js/faker": "^7.6.0", "react": "^18.2.0" }, diff --git a/packages/api-bindings/src/apollo/IGraphQLClient.ts b/packages/api-bindings/src/apollo/IGraphQLClient.ts index 4f5d766ccd..1843f7d44e 100644 --- a/packages/api-bindings/src/apollo/IGraphQLClient.ts +++ b/packages/api-bindings/src/apollo/IGraphQLClient.ts @@ -40,15 +40,19 @@ export function assertGraphQLClientMutationResult( } export interface IGraphQLClient { - query( + query( options: QueryOptions, ): Promise>; - mutate( + mutate< + TData = unknown, + TVariables extends OperationVariables = OperationVariables, + TContext extends DefaultContext = DefaultContext, + >( options: MutationOptions>, ): Promise>; - poll( + poll( options: QueryOptions, ): Observable; } diff --git a/packages/api-bindings/src/apollo/SafeApolloClient.ts b/packages/api-bindings/src/apollo/SafeApolloClient.ts index 723a0f83ad..453642f684 100644 --- a/packages/api-bindings/src/apollo/SafeApolloClient.ts +++ b/packages/api-bindings/src/apollo/SafeApolloClient.ts @@ -89,7 +89,7 @@ export class SafeApolloClient( + async query( options: QueryOptions, ): Promise> { try { @@ -103,7 +103,11 @@ export class SafeApolloClient( + async mutate< + TData = unknown, + TVariables extends OperationVariables = OperationVariables, + TContext extends DefaultContext = DefaultContext, + >( options: MutationOptions>, ): Promise> { try { @@ -117,7 +121,7 @@ export class SafeApolloClient( + poll( options: QueryOptions, ): Observable { const observable = super.watchQuery(options); diff --git a/packages/api-bindings/src/apollo/cache/createLensCache.ts b/packages/api-bindings/src/apollo/cache/createLensCache.ts index c903e921df..6b0ec058ad 100644 --- a/packages/api-bindings/src/apollo/cache/createLensCache.ts +++ b/packages/api-bindings/src/apollo/cache/createLensCache.ts @@ -1,11 +1,16 @@ import { ApolloCache, InMemoryCache, NormalizedCacheObject } from '@apollo/client'; import generatedIntrospection from '../../lens/graphql/generated'; +import { QueryParams } from './createQueryParamsLocalFields'; import { createTypePolicies } from './createTypePolicies'; -export function createLensCache(): ApolloCache { +export type { QueryParams }; + +export { defaultQueryParams } from './createQueryParamsLocalFields'; + +export function createLensCache(options?: QueryParams): ApolloCache { return new InMemoryCache({ possibleTypes: generatedIntrospection.possibleTypes, - typePolicies: createTypePolicies(), + typePolicies: createTypePolicies(options), }); } diff --git a/packages/api-bindings/src/apollo/cache/createQueryParamsLocalFields.ts b/packages/api-bindings/src/apollo/cache/createQueryParamsLocalFields.ts new file mode 100644 index 0000000000..911b23e2d5 --- /dev/null +++ b/packages/api-bindings/src/apollo/cache/createQueryParamsLocalFields.ts @@ -0,0 +1,103 @@ +import { FieldReadFunction } from '@apollo/client'; + +import { ImageSizeTransform, ImageTransform, SupportedFiatType } from '../../lens'; + +/** + * The common query parameters used across any query. + */ +export type QueryParams = { + image: { + /** + * The size of the small publication image + */ + small: ImageTransform; + /** + * The size of the medium publication image + */ + medium: ImageTransform; + }; + profile: { + /** + * The size of optimized profile image + */ + thumbnail: ImageTransform; + /** + * The size of the cover image + */ + cover: ImageTransform; + }; + /** + * The fiat currency to use for the fx rate + */ + fxRateFor: SupportedFiatType; +}; + +function buildImageTransform( + width: ImageSizeTransform, + height: ImageSizeTransform = 'auto', +): ImageTransform { + return { + width, + height, + keepAspectRatio: true, + }; +} + +/** + * The default query parameters. + */ +export const defaultQueryParams: QueryParams = { + image: { + small: buildImageTransform('400px'), + medium: buildImageTransform('700px'), + }, + profile: { + thumbnail: buildImageTransform('256px'), + cover: buildImageTransform('1100px'), + }, + fxRateFor: SupportedFiatType.Usd, +}; + +/** + * @internal + */ +export type LocalOnlyFieldPolicies = { + fxRateFor: FieldReadFunction; + + profileCoverSize: FieldReadFunction; + + profilePictureSize: FieldReadFunction; + + imageSmallSize: FieldReadFunction; + + imageMediumSize: FieldReadFunction; +}; + +/** + * @internal + */ +export function createQueryParamsLocalFields( + params: QueryParams = defaultQueryParams, +): LocalOnlyFieldPolicies { + return { + fxRateFor() { + return params.fxRateFor; + }, + + profileCoverSize() { + return params.profile.cover; + }, + + profilePictureSize() { + return params.profile.thumbnail; + }, + + imageSmallSize() { + return params.image.small; + }, + + imageMediumSize() { + return params.image.medium; + }, + }; +} diff --git a/packages/api-bindings/src/apollo/cache/createTypePolicies.ts b/packages/api-bindings/src/apollo/cache/createTypePolicies.ts index f87df16473..87fdd27110 100644 --- a/packages/api-bindings/src/apollo/cache/createTypePolicies.ts +++ b/packages/api-bindings/src/apollo/cache/createTypePolicies.ts @@ -8,6 +8,7 @@ import { createMutualFollowersFieldPolicy } from './createMutualFollowersFieldPo import { createProfilesFieldPolicy } from './createProfilesFieldPolicy'; import { createPublicationTypePolicy } from './createPublicationTypePolicy'; import { createPublicationsFieldPolicy } from './createPublicationsFieldPolicy'; +import { createQueryParamsLocalFields, QueryParams } from './createQueryParamsLocalFields'; import { createSearchProfilesFieldPolicy } from './createSearchProfilesFieldPolicy'; import { createSearchPublicationsFieldPolicy } from './createSearchPublicationsFieldPolicy'; import { notNormalizedType } from './utils/notNormalizedType'; @@ -16,7 +17,9 @@ type InheritedTypePolicies = { Publication: TypePolicy; }; -export function createTypePolicies(): StrictTypedTypePolicies & InheritedTypePolicies { +export function createTypePolicies( + params?: QueryParams, +): StrictTypedTypePolicies & InheritedTypePolicies { return { Publication: createPublicationTypePolicy(), Post: notNormalizedType(), @@ -37,6 +40,8 @@ export function createTypePolicies(): StrictTypedTypePolicies & InheritedTypePol searchPublications: createSearchPublicationsFieldPolicy(), searchProfiles: createSearchProfilesFieldPolicy(), feed: createFeedFieldPolicy(), + + ...createQueryParamsLocalFields(params), }, }, }; diff --git a/packages/api-bindings/src/apollo/index.ts b/packages/api-bindings/src/apollo/index.ts index ea60939cce..0538df5e1c 100644 --- a/packages/api-bindings/src/apollo/index.ts +++ b/packages/api-bindings/src/apollo/index.ts @@ -5,7 +5,7 @@ import { LENS_API_MINIMAL_SUPPORTED_VERSION } from '../constants'; import type { IAccessTokenStorage } from './IAccessTokenStorage'; import { SafeApolloClient } from './SafeApolloClient'; import { createSnapshotCache } from './cache'; -import { createLensCache } from './cache/createLensCache'; +import { createLensCache, QueryParams } from './cache/createLensCache'; import { ContentInsightMatcher } from './cache/utils/ContentInsight'; import { createAuthLink, createLensLink, createSnapshotLink } from './links'; @@ -18,6 +18,7 @@ export type ApolloClientConfig = { logger: ILogger; pollingInterval: number; contentMatchers: ContentInsightMatcher[]; + queryParams: QueryParams; }; export function createLensApolloClient({ @@ -25,6 +26,7 @@ export function createLensApolloClient({ backendURL, logger, pollingInterval, + queryParams, }: ApolloClientConfig) { const uri = `${backendURL}/graphql`; @@ -38,7 +40,7 @@ export function createLensApolloClient({ return new SafeApolloClient({ connectToDevTools: true, - cache: createLensCache(), + cache: createLensCache(queryParams), link: from([authLink, httpLink]), pollingInterval, version: LENS_API_MINIMAL_SUPPORTED_VERSION, @@ -74,6 +76,8 @@ export function createSnapshotApolloClient({ backendURL }: SnapshotApolloClientC } export type { IAccessTokenStorage }; +export { defaultQueryParams } from './cache/createLensCache'; +export type { QueryParams }; export type { IGraphQLClient } from './IGraphQLClient'; export * from './errors'; export * from './cache/transactions'; diff --git a/packages/api-bindings/src/apollo/links.ts b/packages/api-bindings/src/apollo/links.ts index 6367dbdc62..9bc4a878a4 100644 --- a/packages/api-bindings/src/apollo/links.ts +++ b/packages/api-bindings/src/apollo/links.ts @@ -24,18 +24,21 @@ export function createAuthLink(accessTokenStorage: IAccessTokenStorage) { return; }); - const authHeaderLink = setContext(() => { + const authHeaderLink = setContext((_, prevContext) => { const token = accessTokenStorage.getAccessToken(); if (token) { return { + ...prevContext, + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment headers: { authorization: `Bearer ${token}`, + ...('headers' in prevContext && prevContext.headers), }, }; } - return; + return prevContext; }); return from([errorLink, authHeaderLink]); diff --git a/packages/api-bindings/src/lens/ImageSizeTransform.ts b/packages/api-bindings/src/lens/ImageTransform.ts similarity index 96% rename from packages/api-bindings/src/lens/ImageSizeTransform.ts rename to packages/api-bindings/src/lens/ImageTransform.ts index 28426c53d9..3c8c48e7f1 100644 --- a/packages/api-bindings/src/lens/ImageSizeTransform.ts +++ b/packages/api-bindings/src/lens/ImageTransform.ts @@ -9,7 +9,7 @@ export type Pixel = export type ImageSizeTransform = Pixel | Percentage | 'auto'; -export type MediaTransformParams = { +export type ImageTransform = { /** * Set the transformed image's width. You can use specific size in * pixels eg. 100px, a percentage eg. 50% or set as 'auto' to be set automatically. diff --git a/packages/api-bindings/src/lens/__helpers__/fragments.ts b/packages/api-bindings/src/lens/__helpers__/fragments.ts index 536f10b752..5fd51e5c25 100644 --- a/packages/api-bindings/src/lens/__helpers__/fragments.ts +++ b/packages/api-bindings/src/lens/__helpers__/fragments.ts @@ -152,19 +152,20 @@ export function mockPublicationTextOnlyMetadata(overrides: Partial = {}) { +export function mockPublicationOperationsFragment( + overrides: Partial = {}, +): PublicationOperations { return { isNotInterested: false, hasBookmarked: false, hasReported: false, - canAct: TriStateValue.Unknown, + canCollect: TriStateValue.Unknown, canComment: TriStateValue.Unknown, canMirror: TriStateValue.Unknown, hasMirrored: false, hasUpvoted: false, hasDownvoted: false, - hasActed: { value: false, isFinalisedOnchain: false }, - actedOn: [], + hasCollected: { value: false, isFinalisedOnchain: false }, canDecrypt: { result: false, reasons: null, @@ -196,9 +197,9 @@ export function mockPublicationStatsFragment( mirrors: faker.datatype.number(), quotes: faker.datatype.number(), bookmarks: faker.datatype.number(), - countOpenActions: faker.datatype.number(), - upvoteReactions: faker.datatype.number(), - downvoteReactions: faker.datatype.number(), + collects: faker.datatype.number(), + upvotes: faker.datatype.number(), + downvotes: faker.datatype.number(), ...overrides, }; @@ -214,11 +215,11 @@ export function mockProfileStatsFragment(overrides: Partial = {}): mirrors: faker.datatype.number(), quotes: faker.datatype.number(), publications: faker.datatype.number(), - countOpenActions: faker.datatype.number(), - upvoteReactions: faker.datatype.number(), - downvoteReactions: faker.datatype.number(), - upvoteReacted: faker.datatype.number(), - downvoteReacted: faker.datatype.number(), + collects: faker.datatype.number(), + upvotes: faker.datatype.number(), + downvotes: faker.datatype.number(), + upvoted: faker.datatype.number(), + downvoted: faker.datatype.number(), ...overrides, }; diff --git a/packages/api-bindings/src/lens/__helpers__/queries/discovery.ts b/packages/api-bindings/src/lens/__helpers__/queries/discovery.ts index 74ec90f0e6..3691c77d5f 100644 --- a/packages/api-bindings/src/lens/__helpers__/queries/discovery.ts +++ b/packages/api-bindings/src/lens/__helpers__/queries/discovery.ts @@ -1,35 +1,10 @@ -import { MockedResponse } from '@apollo/client/testing'; +import { FeedVariables, FeedItem, FeedDocument } from '../../graphql/generated'; +import { mockAnyPaginatedResponse } from './mockAnyPaginatedResponse'; -import { FeedVariables, FeedItem, FeedData, FeedDocument } from '../../graphql/generated'; -import { mockPaginatedResultInfo } from '../fragments'; - -export function mockFeedResponse(args: { - variables: FeedVariables; - items: FeedItem[]; -}): MockedResponse { - return { - request: { - query: FeedDocument, - variables: { - publicationImageTransform: {}, - publicationOperationsActedArgs: {}, - publicationStatsInput: {}, - publicationStatsCountOpenActionArgs: {}, - profileCoverTransform: {}, - profilePictureTransform: {}, - profileStatsArg: {}, - profileStatsCountOpenActionArgs: {}, - rateRequest: { for: 'USD' }, - ...args.variables, - }, - }, - result: { - data: { - result: { - items: args.items, - pageInfo: mockPaginatedResultInfo(), - }, - }, - }, - }; +export function mockFeedResponse(args: { variables: FeedVariables; items: FeedItem[] }) { + return mockAnyPaginatedResponse({ + variables: args.variables, + items: args.items, + query: FeedDocument, + }); } diff --git a/packages/api-bindings/src/lens/__helpers__/queries/mockAnyPaginatedResponse.ts b/packages/api-bindings/src/lens/__helpers__/queries/mockAnyPaginatedResponse.ts new file mode 100644 index 0000000000..86d49f8650 --- /dev/null +++ b/packages/api-bindings/src/lens/__helpers__/queries/mockAnyPaginatedResponse.ts @@ -0,0 +1,45 @@ +import { OperationVariables } from '@apollo/client'; +import { DocumentNode } from 'graphql'; + +import { PaginatedResultInfo, SupportedFiatType } from '../../graphql/generated'; +import { mockPaginatedResultInfo } from '../fragments'; + +/** + * Mock any paginated responses. + */ +export function mockAnyPaginatedResponse({ + variables, + items, + info = mockPaginatedResultInfo(), + query, +}: { + variables: V; + items: I[]; + info?: PaginatedResultInfo; + query: DocumentNode; +}) { + return { + request: { + query, + variables: { + ...variables, + // The values below should match the superset of the variables default values used in + // any query that needs such variables. The fact one query might use a subset of these + // variables is irrelevant. + fxRateFor: SupportedFiatType.Usd, + imageMediumSize: {}, + imageSmallSize: {}, + profileCoverSize: {}, + profilePictureSize: {}, + }, + }, + result: { + data: { + result: { + items, + pageInfo: info, + }, + }, + }, + }; +} diff --git a/packages/api-bindings/src/lens/__helpers__/queries/profile.ts b/packages/api-bindings/src/lens/__helpers__/queries/profile.ts index 013ec439a4..03acceb4b2 100644 --- a/packages/api-bindings/src/lens/__helpers__/queries/profile.ts +++ b/packages/api-bindings/src/lens/__helpers__/queries/profile.ts @@ -1,5 +1,3 @@ -import { MockedResponse } from '@apollo/client/testing'; - import { FollowersDocument, FollowersVariables, @@ -9,51 +7,13 @@ import { MutualFollowersVariables, PaginatedResultInfo, Profile, - ProfilesData, ProfilesDocument, ProfilesVariables, - SearchProfilesData, SearchProfilesDocument, SearchProfilesVariables, } from '../../graphql/generated'; import { mockPaginatedResultInfo } from '../fragments'; - -/** - * All paginated profile responses have the same shape - */ -function mockAnyPaginatedProfilesResponse({ - variables, - items, - info = mockPaginatedResultInfo(), - query, -}: { - variables: V; - items: Profile[]; - info?: PaginatedResultInfo; - query: Q; -}) { - return { - request: { - query, - variables: { - profileCoverTransform: {}, - profilePictureTransform: {}, - profileStatsArg: {}, - profileStatsCountOpenActionArgs: {}, - rateRequest: { for: 'USD' }, - ...variables, - }, - }, - result: { - data: { - result: { - items, - pageInfo: info, - }, - }, - }, - }; -} +import { mockAnyPaginatedResponse } from './mockAnyPaginatedResponse'; export function mockProfilesResponse({ variables, @@ -63,8 +23,8 @@ export function mockProfilesResponse({ variables: ProfilesVariables; items: Profile[]; info?: PaginatedResultInfo; -}): MockedResponse { - return mockAnyPaginatedProfilesResponse({ +}) { + return mockAnyPaginatedResponse({ variables, items, info, @@ -80,8 +40,8 @@ export function mockMutualFollowersResponse({ variables: MutualFollowersVariables; items: Profile[]; info?: PaginatedResultInfo; -}): MockedResponse { - return mockAnyPaginatedProfilesResponse({ +}) { + return mockAnyPaginatedResponse({ variables, items, info, @@ -97,8 +57,8 @@ export function mockFollowersResponse({ variables: FollowersVariables; items: Profile[]; info?: PaginatedResultInfo; -}): MockedResponse { - return mockAnyPaginatedProfilesResponse({ +}) { + return mockAnyPaginatedResponse({ variables, items, info, @@ -114,8 +74,8 @@ export function mockFollowingResponse({ variables: FollowingVariables; items: Profile[]; info?: PaginatedResultInfo; -}): MockedResponse { - return mockAnyPaginatedProfilesResponse({ +}) { + return mockAnyPaginatedResponse({ variables, items, info, @@ -131,8 +91,8 @@ export function mockSearchProfilesResponse({ variables: SearchProfilesVariables; items: Profile[]; info?: PaginatedResultInfo; -}): MockedResponse { - return mockAnyPaginatedProfilesResponse({ +}) { + return mockAnyPaginatedResponse({ variables, items, info, diff --git a/packages/api-bindings/src/lens/__helpers__/queries/publication.ts b/packages/api-bindings/src/lens/__helpers__/queries/publication.ts index 30a878d473..30b7f04ea5 100644 --- a/packages/api-bindings/src/lens/__helpers__/queries/publication.ts +++ b/packages/api-bindings/src/lens/__helpers__/queries/publication.ts @@ -1,19 +1,15 @@ -import { MockedResponse } from '@apollo/client/testing'; - import { PaginatedResultInfo, - PublicationData, PublicationDocument, PublicationVariables, - PublicationsData, PublicationsDocument, PublicationsVariables, - SearchPublicationsData, SearchPublicationsDocument, SearchPublicationsVariables, } from '../../graphql/generated'; import { AnyPublication, PrimaryPublication } from '../../utils'; import { mockPaginatedResultInfo } from '../fragments'; +import { mockAnyPaginatedResponse } from './mockAnyPaginatedResponse'; export function mockPublicationResponse({ variables, @@ -21,7 +17,7 @@ export function mockPublicationResponse({ }: { variables: PublicationVariables; publication: AnyPublication | null; -}): MockedResponse { +}) { return { request: { query: PublicationDocument, @@ -35,47 +31,6 @@ export function mockPublicationResponse({ }; } -/** - * All paginated publication responses have the same shape - */ -function mockAnyPaginatedPublicationResponse({ - variables, - items, - info = mockPaginatedResultInfo(), - query, -}: { - variables: V; - items: I[]; - info?: PaginatedResultInfo; - query: Q; -}) { - return { - request: { - query, - variables: { - publicationImageTransform: {}, - publicationOperationsActedArgs: {}, - publicationStatsInput: {}, - publicationStatsCountOpenActionArgs: {}, - profileCoverTransform: {}, - profilePictureTransform: {}, - profileStatsArg: {}, - profileStatsCountOpenActionArgs: {}, - rateRequest: { for: 'USD' }, - ...variables, - }, - }, - result: { - data: { - result: { - items, - pageInfo: info, - }, - }, - }, - }; -} - export function mockPublicationsResponse({ variables, items, @@ -84,8 +39,8 @@ export function mockPublicationsResponse({ variables: PublicationsVariables; items: Array; info?: PaginatedResultInfo; -}): MockedResponse { - return mockAnyPaginatedPublicationResponse({ +}) { + return mockAnyPaginatedResponse({ variables, items, info, @@ -101,8 +56,8 @@ export function mockSearchPublicationsResponse({ variables: SearchPublicationsVariables; items: Array; info?: PaginatedResultInfo; -}): MockedResponse { - return mockAnyPaginatedPublicationResponse({ +}) { + return mockAnyPaginatedResponse({ variables, items, info, diff --git a/packages/api-bindings/src/lens/graphql/client.graphql b/packages/api-bindings/src/lens/graphql/client.graphql index 712d8324b5..914b5dfccf 100644 --- a/packages/api-bindings/src/lens/graphql/client.graphql +++ b/packages/api-bindings/src/lens/graphql/client.graphql @@ -1,3 +1,17 @@ extend type PaginatedResultInfo { moreAfter: Boolean! } + +type ImageTransformParam { + height: ImageSizeTransform + width: ImageSizeTransform + keepAspectRatio: Boolean +} + +extend type Query { + fxRateFor: SupportedFiatType + profileCoverSize: ImageTransformParam + profilePictureSize: ImageTransformParam + imageSmallSize: ImageTransformParam + imageMediumSize: ImageTransformParam +} diff --git a/packages/api-bindings/src/lens/graphql/explore.graphql b/packages/api-bindings/src/lens/graphql/explore.graphql index 8b3fb81333..c138818a86 100644 --- a/packages/api-bindings/src/lens/graphql/explore.graphql +++ b/packages/api-bindings/src/lens/graphql/explore.graphql @@ -1,15 +1,13 @@ query ExplorePublications( $request: ExplorePublicationRequest! - $publicationImageTransform: ImageTransform = {} - $publicationOperationsActedArgs: PublicationOperationsActedArgs = {} - $publicationStatsInput: PublicationStatsInput! = {} - $publicationStatsCountOpenActionArgs: PublicationStatsCountOpenActionArgs! = {} - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $imageSmallSize: ImageTransform = {} + $imageMediumSize: ImageTransform = {} + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: explorePublications(request: $request) { items { ... on Post { @@ -28,12 +26,12 @@ query ExplorePublications( query ExploreProfiles( $request: ExploreProfilesRequest! - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: exploreProfiles(request: $request) { items { ...Profile diff --git a/packages/api-bindings/src/lens/graphql/feed.graphql b/packages/api-bindings/src/lens/graphql/feed.graphql index 59e502d7e5..2d432dd920 100644 --- a/packages/api-bindings/src/lens/graphql/feed.graphql +++ b/packages/api-bindings/src/lens/graphql/feed.graphql @@ -32,16 +32,14 @@ fragment FeedItem on FeedItem { query Feed( $request: FeedRequest! - $publicationImageTransform: ImageTransform = {} - $publicationOperationsActedArgs: PublicationOperationsActedArgs = {} - $publicationStatsInput: PublicationStatsInput! = {} - $publicationStatsCountOpenActionArgs: PublicationStatsCountOpenActionArgs! = {} - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $imageSmallSize: ImageTransform = {} + $imageMediumSize: ImageTransform = {} + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: feed(request: $request) { items { ...FeedItem @@ -54,16 +52,14 @@ query Feed( query FeedHighlights( $request: FeedHighlightsRequest! - $publicationImageTransform: ImageTransform = {} - $publicationOperationsActedArgs: PublicationOperationsActedArgs = {} - $publicationStatsInput: PublicationStatsInput! = {} - $publicationStatsCountOpenActionArgs: PublicationStatsCountOpenActionArgs! = {} - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $imageSmallSize: ImageTransform = {} + $imageMediumSize: ImageTransform = {} + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: feedHighlights(request: $request) { items { ... on Post { @@ -82,12 +78,13 @@ query FeedHighlights( # Not yet ready for production use #query ForYou( # $request: PublicationForYouRequest! -# $publicationImageTransform: ImageTransform = {} -# $profileCoverTransform: ImageTransform = {} -# $profilePictureTransform: ImageTransform = {} -# $publicationOperationsActedArgs: PublicationOperationsActedArgs = {} -# $rateRequest: RateRequest = { for: USD } +# $imageSmallSize: ImageTransform = {} +# $imageMediumSize: ImageTransform = {} +# $profileCoverSize: ImageTransform = {} +# $profilePictureSize: ImageTransform = {} +# $fxRateFor: SupportedFiatType = USD #) { +# ...InjectCommonQueryParams # result: forYou(request: $request) { # items { # ... on Post { diff --git a/packages/api-bindings/src/lens/graphql/fragments.graphql b/packages/api-bindings/src/lens/graphql/fragments.graphql index c0cc33d6f7..0fd192e19d 100644 --- a/packages/api-bindings/src/lens/graphql/fragments.graphql +++ b/packages/api-bindings/src/lens/graphql/fragments.graphql @@ -31,7 +31,7 @@ fragment Amount on Amount { ...Erc20 } value - rate(request: $rateRequest) { + rate(request: { for: $fxRateFor }) { ...FiatAmount } } @@ -110,7 +110,10 @@ fragment ImageSet on ImageSet { optimized { ...Image } - transformed(request: $publicationImageTransform) { + small: transformed(request: $imageSmallSize) { + ...Image + } + medium: transformed(request: $imageMediumSize) { ...Image } } @@ -177,7 +180,7 @@ fragment ProfileCoverSet on ImageSet { optimized { ...Image } - transformed(request: $profileCoverTransform) { + transformed(request: $profileCoverSize) { ...Image } } @@ -190,7 +193,7 @@ fragment ProfilePictureSet on ImageSet { optimized { ...Image } - transformed(request: $profilePictureTransform) { + thumbnail: transformed(request: $profilePictureSize) { ...Image } } @@ -216,11 +219,11 @@ fragment ProfileStats on ProfileStats { mirrors quotes publications - upvoteReactions: reactions(request: { type: UPVOTE }) - downvoteReactions: reactions(request: { type: DOWNVOTE }) - upvoteReacted: reacted(request: { type: UPVOTE }) - downvoteReacted: reacted(request: { type: DOWNVOTE }) - countOpenActions(request: $profileStatsCountOpenActionArgs) + upvotes: reactions(request: { type: UPVOTE }) + downvotes: reactions(request: { type: DOWNVOTE }) + upvoted: reacted(request: { type: UPVOTE }) + downvoted: reacted(request: { type: DOWNVOTE }) + collects: countOpenActions(request: { anyOf: [{ category: COLLECT }] }) } fragment Profile on Profile { @@ -323,7 +326,7 @@ fragment Profile on Profile { invitedBy { id } - stats(request: $profileStatsArg) { + stats(request: { forApps: $activityOn }) { ...ProfileStats } } @@ -561,13 +564,13 @@ fragment PublicationOperations on PublicationOperations { isNotInterested hasBookmarked hasReported - canAct(request: $publicationOperationsActedArgs) - hasActed(request: $publicationOperationsActedArgs) { + canCollect: canAct(request: { filter: { category: COLLECT } }) + hasCollected: hasActed(request: { filter: { category: COLLECT } }) { ...OptimisticStatusResult } - actedOn(request: $publicationOperationsActedArgs) { - ...OpenActionResult - } + # TBD: actedOn(request: { filter: { category: COLLECT } }) { + # ...OpenActionResult + # } hasUpvoted: hasReacted(request: { type: UPVOTE }) hasDownvoted: hasReacted(request: { type: DOWNVOTE }) canComment @@ -1559,9 +1562,9 @@ fragment PublicationStats on PublicationStats { mirrors quotes bookmarks - upvoteReactions: reactions(request: { type: UPVOTE }) - downvoteReactions: reactions(request: { type: DOWNVOTE }) - countOpenActions(request: $publicationStatsCountOpenActionArgs) + upvotes: reactions(request: { type: UPVOTE }) + downvotes: reactions(request: { type: DOWNVOTE }) + collects: countOpenActions(request: { anyOf: [{ category: COLLECT }] }) } fragment Post on Post { @@ -1681,7 +1684,7 @@ fragment Post on Post { ...UnknownReferenceModuleSettings } } - stats(request: $publicationStatsInput) { + stats(request: { metadata: { publishedOn: $activityOn } }) { ...PublicationStats } } @@ -1824,7 +1827,7 @@ fragment Comment on Comment { firstComment { ...CommentBase } - stats(request: $publicationStatsInput) { + stats(request: { metadata: { publishedOn: $activityOn } }) { ...PublicationStats } } @@ -1989,7 +1992,7 @@ fragment Quote on Quote { ...QuoteBase } } - stats(request: $publicationStatsInput) { + stats(request: { metadata: { publishedOn: $activityOn } }) { ...PublicationStats } } @@ -2051,3 +2054,20 @@ fragment CreateMomokaPublicationResult on CreateMomokaPublicationResult { proof momokaId } + +# utils +fragment InjectCommonQueryParams on Query { + fxRateFor @client @export(as: "fxRateFor") + profileCoverSize @client @export(as: "profileCoverSize") { + ...ImageTransformParam + } + profilePictureSize @client @export(as: "profilePictureSize") { + ...ImageTransformParam + } + imageSmallSize @client @export(as: "imageSmallSize") { + ...ImageTransformParam + } + imageMediumSize @client @export(as: "imageMediumSize") { + ...ImageTransformParam + } +} diff --git a/packages/api-bindings/src/lens/graphql/generated.ts b/packages/api-bindings/src/lens/graphql/generated.ts index 3296201c13..b4da40baca 100644 --- a/packages/api-bindings/src/lens/graphql/generated.ts +++ b/packages/api-bindings/src/lens/graphql/generated.ts @@ -13,7 +13,7 @@ import gql from 'graphql-tag'; import type { ContentEncryptionKey } from '../ContentEncryptionKey'; import type { Cursor } from '../Cursor'; -import type { ImageSizeTransform } from '../ImageSizeTransform'; +import type { ImageSizeTransform } from '../ImageTransform'; export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; @@ -234,6 +234,11 @@ export enum ComparisonOperatorConditionType { NotEqual = 'NOT_EQUAL', } +export type CreateProfileRequest = { + followModule?: InputMaybe; + to: Scalars['EvmAddress']; +}; + export enum CreateProfileWithHandleErrorReasonType { Failed = 'FAILED', HandleTaken = 'HANDLE_TAKEN', @@ -356,15 +361,15 @@ export enum FeedEventItemType { Reaction = 'REACTION', } -export type FeedHighlightWhere = { - for?: InputMaybe; - metadata?: InputMaybe; -}; - export type FeedHighlightsRequest = { cursor?: InputMaybe; limit?: InputMaybe; - where?: InputMaybe; + where?: InputMaybe; +}; + +export type FeedHighlightsWhere = { + for?: InputMaybe; + metadata?: InputMaybe; }; export type FeedRequest = { @@ -488,6 +493,89 @@ export type ImageTransform = { width?: InputMaybe; }; +export type InternalAddCuratedTagRequest = { + hhh: Scalars['String']; + secret: Scalars['String']; + ttt: Scalars['String']; +}; + +export type InternalAddInvitesRequest = { + n: Scalars['Int']; + p: Scalars['ProfileId']; + secret: Scalars['String']; +}; + +export type InternalAllowDomainRequest = { + domain: Scalars['URI']; + secret: Scalars['String']; +}; + +export type InternalAllowedDomainsRequest = { + secret: Scalars['String']; +}; + +export type InternalClaimRequest = { + address: Scalars['EvmAddress']; + freeTextHandle: Scalars['Boolean']; + handle: Scalars['CreateHandle']; + overrideAlreadyClaimed: Scalars['Boolean']; + overrideTradeMark: Scalars['Boolean']; + secret: Scalars['String']; +}; + +export type InternalClaimStatusRequest = { + address: Scalars['EvmAddress']; + secret: Scalars['String']; +}; + +export type InternalCuratedHandlesRequest = { + secret: Scalars['String']; +}; + +export type InternalCuratedTagsRequest = { + hhh: Scalars['String']; + secret: Scalars['String']; +}; + +export type InternalCuratedUpdateRequest = { + handle: Scalars['Handle']; + remove: Scalars['Boolean']; + secret: Scalars['String']; +}; + +export type InternalInvitesRequest = { + p: Scalars['ProfileId']; + secret: Scalars['String']; +}; + +export type InternalNftIndexRequest = { + n: Array; + secret: Scalars['String']; +}; + +export type InternalNftVerifyRequest = { + n: Array; + secret: Scalars['String']; +}; + +export type InternalProfileStatusRequest = { + hhh: Scalars['String']; + secret: Scalars['String']; +}; + +export type InternalRemoveCuratedTagRequest = { + hhh: Scalars['String']; + secret: Scalars['String']; + ttt: Scalars['String']; +}; + +export type InternalUpdateProfileStatusRequest = { + dd: Scalars['Boolean']; + hhh: Scalars['String']; + secret: Scalars['String']; + ss: Scalars['Boolean']; +}; + export type InviteRequest = { invites: Array; secret: Scalars['String']; @@ -648,6 +736,11 @@ export type NetworkAddressInput = { chainId: Scalars['ChainId']; }; +export type Nfi = { + c: Scalars['EvmAddress']; + i: Scalars['ChainId']; +}; + export enum NftCollectionOwnersOrder { FollowersFirst = 'FollowersFirst', None = 'None', @@ -1615,33 +1708,29 @@ export type AuthRefreshData = { result: { accessToken: string; refreshToken: str export type ExplorePublicationsVariables = Exact<{ request: ExplorePublicationRequest; - publicationImageTransform?: InputMaybe; - publicationOperationsActedArgs?: InputMaybe; - publicationStatsInput?: PublicationStatsInput; - publicationStatsCountOpenActionArgs?: PublicationStatsCountOpenActionArgs; - profileCoverTransform?: InputMaybe; - profilePictureTransform?: InputMaybe; - profileStatsArg?: InputMaybe; - profileStatsCountOpenActionArgs?: InputMaybe; - rateRequest?: InputMaybe; + imageSmallSize?: InputMaybe; + imageMediumSize?: InputMaybe; + profileCoverSize?: InputMaybe; + profilePictureSize?: InputMaybe; + activityOn?: InputMaybe | Scalars['AppId']>; + fxRateFor?: InputMaybe; }>; export type ExplorePublicationsData = { result: { items: Array; pageInfo: { prev: Cursor | null; next: Cursor | null } }; -}; +} & InjectCommonQueryParams; export type ExploreProfilesVariables = Exact<{ request: ExploreProfilesRequest; - profileCoverTransform?: InputMaybe; - profilePictureTransform?: InputMaybe; - profileStatsArg?: InputMaybe; - profileStatsCountOpenActionArgs?: InputMaybe; - rateRequest?: InputMaybe; + profileCoverSize?: InputMaybe; + profilePictureSize?: InputMaybe; + activityOn?: InputMaybe | Scalars['AppId']>; + fxRateFor?: InputMaybe; }>; export type ExploreProfilesData = { result: { items: Array; pageInfo: PaginatedResultInfo }; -}; +} & InjectCommonQueryParams; export type ReactionEvent = { reaction: PublicationReactionType; createdAt: string; by: Profile }; @@ -1655,35 +1744,31 @@ export type FeedItem = { export type FeedVariables = Exact<{ request: FeedRequest; - publicationImageTransform?: InputMaybe; - publicationOperationsActedArgs?: InputMaybe; - publicationStatsInput?: PublicationStatsInput; - publicationStatsCountOpenActionArgs?: PublicationStatsCountOpenActionArgs; - profileCoverTransform?: InputMaybe; - profilePictureTransform?: InputMaybe; - profileStatsArg?: InputMaybe; - profileStatsCountOpenActionArgs?: InputMaybe; - rateRequest?: InputMaybe; + imageSmallSize?: InputMaybe; + imageMediumSize?: InputMaybe; + profileCoverSize?: InputMaybe; + profilePictureSize?: InputMaybe; + activityOn?: InputMaybe | Scalars['AppId']>; + fxRateFor?: InputMaybe; }>; -export type FeedData = { result: { items: Array; pageInfo: PaginatedResultInfo } }; +export type FeedData = { + result: { items: Array; pageInfo: PaginatedResultInfo }; +} & InjectCommonQueryParams; export type FeedHighlightsVariables = Exact<{ request: FeedHighlightsRequest; - publicationImageTransform?: InputMaybe; - publicationOperationsActedArgs?: InputMaybe; - publicationStatsInput?: PublicationStatsInput; - publicationStatsCountOpenActionArgs?: PublicationStatsCountOpenActionArgs; - profileCoverTransform?: InputMaybe; - profilePictureTransform?: InputMaybe; - profileStatsArg?: InputMaybe; - profileStatsCountOpenActionArgs?: InputMaybe; - rateRequest?: InputMaybe; + imageSmallSize?: InputMaybe; + imageMediumSize?: InputMaybe; + profileCoverSize?: InputMaybe; + profilePictureSize?: InputMaybe; + activityOn?: InputMaybe | Scalars['AppId']>; + fxRateFor?: InputMaybe; }>; export type FeedHighlightsData = { result: { items: Array; pageInfo: PaginatedResultInfo }; -}; +} & InjectCommonQueryParams; export type OptimisticStatusResult = { value: boolean; isFinalisedOnchain: boolean }; @@ -1747,7 +1832,12 @@ export type Image = { height: number | null; }; -export type ImageSet = { raw: Image; optimized: Image | null; transformed: Image | null }; +export type ImageSet = { + raw: Image; + optimized: Image | null; + small: Image | null; + medium: Image | null; +}; export type EncryptableImage = { uri: string; @@ -1776,7 +1866,7 @@ export type ProfilePictureSet = { __typename: 'ImageSet'; raw: Image; optimized: Image | null; - transformed: Image | null; + thumbnail: Image | null; }; export type NftImage = { @@ -1796,11 +1886,11 @@ export type ProfileStats = { mirrors: number; quotes: number; publications: number; - countOpenActions: number; - upvoteReactions: number; - downvoteReactions: number; - upvoteReacted: number; - downvoteReacted: number; + upvotes: number; + downvotes: number; + upvoted: number; + downvoted: number; + collects: number; }; export type Profile = { @@ -2013,16 +2103,13 @@ export type PublicationOperations = { isNotInterested: boolean; hasBookmarked: boolean; hasReported: boolean; - canAct: TriStateValue; canComment: TriStateValue; canMirror: TriStateValue; hasMirrored: boolean; + canCollect: TriStateValue; hasUpvoted: boolean; hasDownvoted: boolean; - hasActed: OptimisticStatusResult; - actedOn: Array< - OpenActionResult_KnownCollectOpenActionResult_ | OpenActionResult_UnknownOpenActionResult_ - >; + hasCollected: OptimisticStatusResult; canDecrypt: CanDecryptResponse; }; @@ -2070,6 +2157,7 @@ export type AndCondition = { | FollowCondition | NftOwnershipCondition | ProfileOwnershipCondition + | {} >; }; @@ -2082,6 +2170,7 @@ export type OrCondition = { | FollowCondition | NftOwnershipCondition | ProfileOwnershipCondition + | {} >; }; @@ -2096,6 +2185,7 @@ export type RootCondition = { | NftOwnershipCondition | OrCondition | ProfileOwnershipCondition + | {} >; }; @@ -2545,9 +2635,9 @@ export type PublicationStats = { mirrors: number; quotes: number; bookmarks: number; - countOpenActions: number; - upvoteReactions: number; - downvoteReactions: number; + upvotes: number; + downvotes: number; + collects: number; }; export type Post = { @@ -2760,6 +2850,14 @@ export type CreateMomokaPublicationResult = { momokaId: string; }; +export type InjectCommonQueryParams = { + fxRateFor: SupportedFiatType | null; + profileCoverSize: ImageTransformParam | null; + profilePictureSize: ImageTransformParam | null; + imageSmallSize: ImageTransformParam | null; + imageMediumSize: ImageTransformParam | null; +}; + export type ReactionNotification = { __typename: 'ReactionNotification'; id: string; @@ -2814,15 +2912,12 @@ export type MentionNotification = { export type NotificationsVariables = Exact<{ request: NotificationRequest; - publicationImageTransform?: InputMaybe; - publicationOperationsActedArgs?: InputMaybe; - publicationStatsInput?: PublicationStatsInput; - publicationStatsCountOpenActionArgs?: PublicationStatsCountOpenActionArgs; - profileCoverTransform?: InputMaybe; - profilePictureTransform?: InputMaybe; - profileStatsArg?: InputMaybe; - profileStatsCountOpenActionArgs?: InputMaybe; - rateRequest?: InputMaybe; + imageSmallSize?: InputMaybe; + imageMediumSize?: InputMaybe; + profileCoverSize?: InputMaybe; + profilePictureSize?: InputMaybe; + activityOn?: InputMaybe | Scalars['AppId']>; + fxRateFor?: InputMaybe; }>; export type NotificationsData = { @@ -2838,7 +2933,7 @@ export type NotificationsData = { >; pageInfo: PaginatedResultInfo; }; -}; +} & InjectCommonQueryParams; export type ProfileManager = { address: EvmAddress }; @@ -2972,29 +3067,35 @@ export type CreateHandleUnlinkFromProfileBroadcastItemResult = { }; }; +export type ImageTransformParam = { + height: ImageSizeTransform | null; + width: ImageSizeTransform | null; + keepAspectRatio: boolean | null; +}; + export type ProfileVariables = Exact<{ request: ProfileRequest; - profileCoverTransform?: InputMaybe; - profilePictureTransform?: InputMaybe; - profileStatsArg?: InputMaybe; - profileStatsCountOpenActionArgs?: InputMaybe; - rateRequest?: InputMaybe; + profileCoverSize?: InputMaybe; + profilePictureSize?: InputMaybe; + activityOn?: InputMaybe | Scalars['AppId']>; + fxRateFor?: InputMaybe; }>; -export type ProfileData = { result: Profile | null }; +export type ProfileData = { result: Profile | null } & InjectCommonQueryParams; export type ProfilesVariables = Exact<{ where: ProfilesRequestWhere; limit?: InputMaybe; cursor?: InputMaybe; - profileCoverTransform?: InputMaybe; - profilePictureTransform?: InputMaybe; - profileStatsArg?: InputMaybe; - profileStatsCountOpenActionArgs?: InputMaybe; - rateRequest?: InputMaybe; + profileCoverSize?: InputMaybe; + profilePictureSize?: InputMaybe; + activityOn?: InputMaybe | Scalars['AppId']>; + fxRateFor?: InputMaybe; }>; -export type ProfilesData = { result: { items: Array; pageInfo: PaginatedResultInfo } }; +export type ProfilesData = { + result: { items: Array; pageInfo: PaginatedResultInfo }; +} & InjectCommonQueryParams; export type ProfileManagersVariables = Exact<{ request: ProfileManagersRequest; @@ -3006,71 +3107,70 @@ export type ProfileManagersData = { export type ProfileRecommendationsVariables = Exact<{ request: ProfileRecommendationsRequest; - profileCoverTransform?: InputMaybe; - profilePictureTransform?: InputMaybe; - profileStatsArg?: InputMaybe; - profileStatsCountOpenActionArgs?: InputMaybe; - rateRequest?: InputMaybe; + profileCoverSize?: InputMaybe; + profilePictureSize?: InputMaybe; + activityOn?: InputMaybe | Scalars['AppId']>; + fxRateFor?: InputMaybe; }>; export type ProfileRecommendationsData = { result: { items: Array; pageInfo: PaginatedResultInfo }; -}; +} & InjectCommonQueryParams; export type FollowingVariables = Exact<{ for: Scalars['ProfileId']; limit?: InputMaybe; cursor?: InputMaybe; - profileCoverTransform?: InputMaybe; - profilePictureTransform?: InputMaybe; - profileStatsArg?: InputMaybe; - profileStatsCountOpenActionArgs?: InputMaybe; - rateRequest?: InputMaybe; + profileCoverSize?: InputMaybe; + profilePictureSize?: InputMaybe; + activityOn?: InputMaybe | Scalars['AppId']>; + fxRateFor?: InputMaybe; }>; -export type FollowingData = { result: { items: Array; pageInfo: PaginatedResultInfo } }; +export type FollowingData = { + result: { items: Array; pageInfo: PaginatedResultInfo }; +} & InjectCommonQueryParams; export type FollowersVariables = Exact<{ of: Scalars['ProfileId']; limit?: InputMaybe; cursor?: InputMaybe; - profileCoverTransform?: InputMaybe; - profilePictureTransform?: InputMaybe; - profileStatsArg?: InputMaybe; - profileStatsCountOpenActionArgs?: InputMaybe; - rateRequest?: InputMaybe; + profileCoverSize?: InputMaybe; + profilePictureSize?: InputMaybe; + activityOn?: InputMaybe | Scalars['AppId']>; + fxRateFor?: InputMaybe; }>; -export type FollowersData = { result: { items: Array; pageInfo: PaginatedResultInfo } }; +export type FollowersData = { + result: { items: Array; pageInfo: PaginatedResultInfo }; +} & InjectCommonQueryParams; export type MutualFollowersVariables = Exact<{ observer: Scalars['ProfileId']; viewing: Scalars['ProfileId']; limit?: InputMaybe; cursor?: InputMaybe; - profileCoverTransform?: InputMaybe; - profilePictureTransform?: InputMaybe; - profileStatsArg?: InputMaybe; - profileStatsCountOpenActionArgs?: InputMaybe; - rateRequest?: InputMaybe; + profileCoverSize?: InputMaybe; + profilePictureSize?: InputMaybe; + activityOn?: InputMaybe | Scalars['AppId']>; + fxRateFor?: InputMaybe; }>; export type MutualFollowersData = { result: { items: Array; pageInfo: PaginatedResultInfo }; -}; +} & InjectCommonQueryParams; export type WhoActedOnPublicationVariables = Exact<{ request: WhoActedOnPublicationRequest; - profileCoverTransform?: InputMaybe; - profilePictureTransform?: InputMaybe; - profileStatsArg?: InputMaybe; - profileStatsCountOpenActionArgs?: InputMaybe; - rateRequest?: InputMaybe; + profileCoverSize?: InputMaybe; + profilePictureSize?: InputMaybe; + activityOn?: InputMaybe | Scalars['AppId']>; + fxRateFor?: InputMaybe; }>; export type WhoActedOnPublicationData = { result: { items: Array; pageInfo: PaginatedResultInfo }; -}; +} & InjectCommonQueryParams; export type ClaimProfileVariables = Exact<{ request: ClaimProfileRequest; @@ -3231,38 +3331,34 @@ export type PublicationValidateMetadataResult = { valid: boolean; reason: string export type PublicationVariables = Exact<{ request: PublicationRequest; - publicationImageTransform?: InputMaybe; - publicationOperationsActedArgs?: InputMaybe; - publicationStatsInput?: PublicationStatsInput; - publicationStatsCountOpenActionArgs?: PublicationStatsCountOpenActionArgs; - profileCoverTransform?: InputMaybe; - profilePictureTransform?: InputMaybe; - profileStatsArg?: InputMaybe; - profileStatsCountOpenActionArgs?: InputMaybe; - rateRequest?: InputMaybe; + imageSmallSize?: InputMaybe; + imageMediumSize?: InputMaybe; + profileCoverSize?: InputMaybe; + profilePictureSize?: InputMaybe; + activityOn?: InputMaybe | Scalars['AppId']>; + fxRateFor?: InputMaybe; }>; -export type PublicationData = { result: Comment | Mirror | Post | Quote | null }; +export type PublicationData = { + result: Comment | Mirror | Post | Quote | null; +} & InjectCommonQueryParams; export type PublicationsVariables = Exact<{ where: PublicationsWhere; orderBy?: InputMaybe; limit?: InputMaybe; cursor?: InputMaybe; - publicationImageTransform?: InputMaybe; - publicationOperationsActedArgs?: InputMaybe; - publicationStatsInput?: PublicationStatsInput; - publicationStatsCountOpenActionArgs?: PublicationStatsCountOpenActionArgs; - profileCoverTransform?: InputMaybe; - profilePictureTransform?: InputMaybe; - profileStatsArg?: InputMaybe; - profileStatsCountOpenActionArgs?: InputMaybe; - rateRequest?: InputMaybe; + imageSmallSize?: InputMaybe; + imageMediumSize?: InputMaybe; + profileCoverSize?: InputMaybe; + profilePictureSize?: InputMaybe; + activityOn?: InputMaybe | Scalars['AppId']>; + fxRateFor?: InputMaybe; }>; export type PublicationsData = { result: { items: Array; pageInfo: PaginatedResultInfo }; -}; +} & InjectCommonQueryParams; export type PublicationsTagsVariables = Exact<{ request: PublicationsTagsRequest; @@ -3608,78 +3704,72 @@ export type PublicationRevenue = { export type RevenueFromPublicationsVariables = Exact<{ request: RevenueFromPublicationsRequest; - publicationImageTransform?: InputMaybe; - publicationOperationsActedArgs?: InputMaybe; - publicationStatsInput?: PublicationStatsInput; - publicationStatsCountOpenActionArgs?: PublicationStatsCountOpenActionArgs; - profileCoverTransform?: InputMaybe; - profilePictureTransform?: InputMaybe; - profileStatsArg?: InputMaybe; - profileStatsCountOpenActionArgs?: InputMaybe; - rateRequest?: InputMaybe; + imageSmallSize?: InputMaybe; + imageMediumSize?: InputMaybe; + profileCoverSize?: InputMaybe; + profilePictureSize?: InputMaybe; + activityOn?: InputMaybe | Scalars['AppId']>; + fxRateFor?: InputMaybe; }>; export type RevenueFromPublicationsData = { result: { items: Array; pageInfo: PaginatedResultInfo }; -}; +} & InjectCommonQueryParams; export type RevenueFromPublicationVariables = Exact<{ request: RevenueFromPublicationRequest; - publicationImageTransform?: InputMaybe; - publicationOperationsActedArgs?: InputMaybe; - publicationStatsInput?: PublicationStatsInput; - publicationStatsCountOpenActionArgs?: PublicationStatsCountOpenActionArgs; - profileCoverTransform?: InputMaybe; - profilePictureTransform?: InputMaybe; - profileStatsArg?: InputMaybe; - profileStatsCountOpenActionArgs?: InputMaybe; - rateRequest?: InputMaybe; + imageSmallSize?: InputMaybe; + imageMediumSize?: InputMaybe; + profileCoverSize?: InputMaybe; + profilePictureSize?: InputMaybe; + activityOn?: InputMaybe | Scalars['AppId']>; + fxRateFor?: InputMaybe; }>; -export type RevenueFromPublicationData = { result: PublicationRevenue | null }; +export type RevenueFromPublicationData = { + result: PublicationRevenue | null; +} & InjectCommonQueryParams; export type FollowRevenuesVariables = Exact<{ request: FollowRevenueRequest; - rateRequest?: InputMaybe; + fxRateFor?: InputMaybe; }>; -export type FollowRevenuesData = { result: { revenues: Array } }; +export type FollowRevenuesData = { + result: { revenues: Array }; +} & InjectCommonQueryParams; export type SearchPublicationsVariables = Exact<{ query: Scalars['String']; where?: InputMaybe; limit?: InputMaybe; cursor?: InputMaybe; - publicationImageTransform?: InputMaybe; - publicationOperationsActedArgs?: InputMaybe; - publicationStatsInput?: PublicationStatsInput; - publicationStatsCountOpenActionArgs?: PublicationStatsCountOpenActionArgs; - profileCoverTransform?: InputMaybe; - profilePictureTransform?: InputMaybe; - profileStatsArg?: InputMaybe; - profileStatsCountOpenActionArgs?: InputMaybe; - rateRequest?: InputMaybe; + imageSmallSize?: InputMaybe; + imageMediumSize?: InputMaybe; + profileCoverSize?: InputMaybe; + profilePictureSize?: InputMaybe; + activityOn?: InputMaybe | Scalars['AppId']>; + fxRateFor?: InputMaybe; }>; export type SearchPublicationsData = { result: { items: Array; pageInfo: PaginatedResultInfo }; -}; +} & InjectCommonQueryParams; export type SearchProfilesVariables = Exact<{ query: Scalars['String']; where?: InputMaybe; limit?: InputMaybe; cursor?: InputMaybe; - profileCoverTransform?: InputMaybe; - profilePictureTransform?: InputMaybe; - profileStatsArg?: InputMaybe; - profileStatsCountOpenActionArgs?: InputMaybe; - rateRequest?: InputMaybe; + profileCoverSize?: InputMaybe; + profilePictureSize?: InputMaybe; + activityOn?: InputMaybe | Scalars['AppId']>; + fxRateFor?: InputMaybe; }>; export type SearchProfilesData = { result: { items: Array; pageInfo: PaginatedResultInfo }; -}; +} & InjectCommonQueryParams; export type LensTransactionResult = { status: LensTransactionStatusType; @@ -3730,11 +3820,10 @@ export type OwnedHandlesData = { export type ProfilesManagedVariables = Exact<{ request: ProfilesManagedRequest; - profileCoverTransform?: InputMaybe; - profilePictureTransform?: InputMaybe; - profileStatsArg?: InputMaybe; - profileStatsCountOpenActionArgs?: InputMaybe; - rateRequest?: InputMaybe; + profileCoverSize?: InputMaybe; + profilePictureSize?: InputMaybe; + activityOn?: InputMaybe | Scalars['AppId']>; + fxRateFor?: InputMaybe; }>; export type ProfilesManagedData = { @@ -3811,7 +3900,7 @@ export const FragmentAmount = /*#__PURE__*/ gql` ...Erc20 } value - rate(request: $rateRequest) { + rate(request: { for: $fxRateFor }) { ...FiatAmount } } @@ -3865,7 +3954,7 @@ export const FragmentProfilePictureSet = /*#__PURE__*/ gql` optimized { ...Image } - transformed(request: $profilePictureTransform) { + thumbnail: transformed(request: $profilePictureSize) { ...Image } } @@ -3894,7 +3983,7 @@ export const FragmentProfileCoverSet = /*#__PURE__*/ gql` optimized { ...Image } - transformed(request: $profileCoverTransform) { + transformed(request: $profileCoverSize) { ...Image } } @@ -3945,11 +4034,11 @@ export const FragmentProfileStats = /*#__PURE__*/ gql` mirrors quotes publications - upvoteReactions: reactions(request: { type: UPVOTE }) - downvoteReactions: reactions(request: { type: DOWNVOTE }) - upvoteReacted: reacted(request: { type: UPVOTE }) - downvoteReacted: reacted(request: { type: DOWNVOTE }) - countOpenActions(request: $profileStatsCountOpenActionArgs) + upvotes: reactions(request: { type: UPVOTE }) + downvotes: reactions(request: { type: DOWNVOTE }) + upvoted: reacted(request: { type: UPVOTE }) + downvoted: reacted(request: { type: DOWNVOTE }) + collects: countOpenActions(request: { anyOf: [{ category: COLLECT }] }) } `; export const FragmentProfile = /*#__PURE__*/ gql` @@ -4053,7 +4142,7 @@ export const FragmentProfile = /*#__PURE__*/ gql` invitedBy { id } - stats(request: $profileStatsArg) { + stats(request: { forApps: $activityOn }) { ...ProfileStats } } @@ -4072,30 +4161,6 @@ export const FragmentProfile = /*#__PURE__*/ gql` ${FragmentMetadataStringAttribute} ${FragmentProfileStats} `; -export const FragmentKnownCollectOpenActionResult = /*#__PURE__*/ gql` - fragment KnownCollectOpenActionResult on KnownCollectOpenActionResult { - type - } -`; -export const FragmentUnknownOpenActionResult = /*#__PURE__*/ gql` - fragment UnknownOpenActionResult on UnknownOpenActionResult { - address - category - initReturnData - } -`; -export const FragmentOpenActionResult = /*#__PURE__*/ gql` - fragment OpenActionResult on OpenActionResult { - ... on KnownCollectOpenActionResult { - ...KnownCollectOpenActionResult - } - ... on UnknownOpenActionResult { - ...UnknownOpenActionResult - } - } - ${FragmentKnownCollectOpenActionResult} - ${FragmentUnknownOpenActionResult} -`; export const FragmentCanDecryptResponse = /*#__PURE__*/ gql` fragment CanDecryptResponse on CanDecryptResponse { result @@ -4108,13 +4173,10 @@ export const FragmentPublicationOperations = /*#__PURE__*/ gql` isNotInterested hasBookmarked hasReported - canAct(request: $publicationOperationsActedArgs) - hasActed(request: $publicationOperationsActedArgs) { + canCollect: canAct(request: { filter: { category: COLLECT } }) + hasCollected: hasActed(request: { filter: { category: COLLECT } }) { ...OptimisticStatusResult } - actedOn(request: $publicationOperationsActedArgs) { - ...OpenActionResult - } hasUpvoted: hasReacted(request: { type: UPVOTE }) hasDownvoted: hasReacted(request: { type: DOWNVOTE }) canComment @@ -4125,7 +4187,6 @@ export const FragmentPublicationOperations = /*#__PURE__*/ gql` } } ${FragmentOptimisticStatusResult} - ${FragmentOpenActionResult} ${FragmentCanDecryptResponse} `; export const FragmentPublicationMarketplaceMetadataAttribute = /*#__PURE__*/ gql` @@ -4143,7 +4204,10 @@ export const FragmentImageSet = /*#__PURE__*/ gql` optimized { ...Image } - transformed(request: $publicationImageTransform) { + small: transformed(request: $imageSmallSize) { + ...Image + } + medium: transformed(request: $imageMediumSize) { ...Image } } @@ -5639,9 +5703,9 @@ export const FragmentPublicationStats = /*#__PURE__*/ gql` mirrors quotes bookmarks - upvoteReactions: reactions(request: { type: UPVOTE }) - downvoteReactions: reactions(request: { type: DOWNVOTE }) - countOpenActions(request: $publicationStatsCountOpenActionArgs) + upvotes: reactions(request: { type: UPVOTE }) + downvotes: reactions(request: { type: DOWNVOTE }) + collects: countOpenActions(request: { anyOf: [{ category: COLLECT }] }) } `; export const FragmentPost = /*#__PURE__*/ gql` @@ -5762,7 +5826,7 @@ export const FragmentPost = /*#__PURE__*/ gql` ...UnknownReferenceModuleSettings } } - stats(request: $publicationStatsInput) { + stats(request: { metadata: { publishedOn: $activityOn } }) { ...PublicationStats } } @@ -6133,7 +6197,7 @@ export const FragmentComment = /*#__PURE__*/ gql` firstComment { ...CommentBase } - stats(request: $publicationStatsInput) { + stats(request: { metadata: { publishedOn: $activityOn } }) { ...PublicationStats } } @@ -6156,7 +6220,7 @@ export const FragmentQuote = /*#__PURE__*/ gql` ...QuoteBase } } - stats(request: $publicationStatsInput) { + stats(request: { metadata: { publishedOn: $activityOn } }) { ...PublicationStats } } @@ -6275,6 +6339,31 @@ export const FragmentCreateMomokaPublicationResult = /*#__PURE__*/ gql` momokaId } `; +export const FragmentImageTransformParam = /*#__PURE__*/ gql` + fragment ImageTransformParam on ImageTransformParam { + height + width + keepAspectRatio + } +`; +export const FragmentInjectCommonQueryParams = /*#__PURE__*/ gql` + fragment InjectCommonQueryParams on Query { + fxRateFor @client @export(as: "fxRateFor") + profileCoverSize @client @export(as: "profileCoverSize") { + ...ImageTransformParam + } + profilePictureSize @client @export(as: "profilePictureSize") { + ...ImageTransformParam + } + imageSmallSize @client @export(as: "imageSmallSize") { + ...ImageTransformParam + } + imageMediumSize @client @export(as: "imageMediumSize") { + ...ImageTransformParam + } + } + ${FragmentImageTransformParam} +`; export const FragmentReactionNotification = /*#__PURE__*/ gql` fragment ReactionNotification on ReactionNotification { __typename @@ -6353,6 +6442,30 @@ export const FragmentQuoteNotification = /*#__PURE__*/ gql` } ${FragmentQuote} `; +export const FragmentKnownCollectOpenActionResult = /*#__PURE__*/ gql` + fragment KnownCollectOpenActionResult on KnownCollectOpenActionResult { + type + } +`; +export const FragmentUnknownOpenActionResult = /*#__PURE__*/ gql` + fragment UnknownOpenActionResult on UnknownOpenActionResult { + address + category + initReturnData + } +`; +export const FragmentOpenActionResult = /*#__PURE__*/ gql` + fragment OpenActionResult on OpenActionResult { + ... on KnownCollectOpenActionResult { + ...KnownCollectOpenActionResult + } + ... on UnknownOpenActionResult { + ...UnknownOpenActionResult + } + } + ${FragmentKnownCollectOpenActionResult} + ${FragmentUnknownOpenActionResult} +`; export const FragmentOpenActionProfileActed = /*#__PURE__*/ gql` fragment OpenActionProfileActed on OpenActionProfileActed { by { @@ -7198,16 +7311,14 @@ export type AuthRefreshMutationOptions = Apollo.BaseMutationOptions< export const ExplorePublicationsDocument = /*#__PURE__*/ gql` query ExplorePublications( $request: ExplorePublicationRequest! - $publicationImageTransform: ImageTransform = {} - $publicationOperationsActedArgs: PublicationOperationsActedArgs = {} - $publicationStatsInput: PublicationStatsInput! = {} - $publicationStatsCountOpenActionArgs: PublicationStatsCountOpenActionArgs! = {} - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $imageSmallSize: ImageTransform = {} + $imageMediumSize: ImageTransform = {} + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: explorePublications(request: $request) { items { ... on Post { @@ -7223,6 +7334,7 @@ export const ExplorePublicationsDocument = /*#__PURE__*/ gql` } } } + ${FragmentInjectCommonQueryParams} ${FragmentPost} ${FragmentQuote} `; @@ -7240,15 +7352,12 @@ export const ExplorePublicationsDocument = /*#__PURE__*/ gql` * const { data, loading, error } = useExplorePublications({ * variables: { * request: // value for 'request' - * publicationImageTransform: // value for 'publicationImageTransform' - * publicationOperationsActedArgs: // value for 'publicationOperationsActedArgs' - * publicationStatsInput: // value for 'publicationStatsInput' - * publicationStatsCountOpenActionArgs: // value for 'publicationStatsCountOpenActionArgs' - * profileCoverTransform: // value for 'profileCoverTransform' - * profilePictureTransform: // value for 'profilePictureTransform' - * profileStatsArg: // value for 'profileStatsArg' - * profileStatsCountOpenActionArgs: // value for 'profileStatsCountOpenActionArgs' - * rateRequest: // value for 'rateRequest' + * imageSmallSize: // value for 'imageSmallSize' + * imageMediumSize: // value for 'imageMediumSize' + * profileCoverSize: // value for 'profileCoverSize' + * profilePictureSize: // value for 'profilePictureSize' + * activityOn: // value for 'activityOn' + * fxRateFor: // value for 'fxRateFor' * }, * }); */ @@ -7281,12 +7390,12 @@ export type ExplorePublicationsQueryResult = Apollo.QueryResult< export const ExploreProfilesDocument = /*#__PURE__*/ gql` query ExploreProfiles( $request: ExploreProfilesRequest! - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: exploreProfiles(request: $request) { items { ...Profile @@ -7296,6 +7405,7 @@ export const ExploreProfilesDocument = /*#__PURE__*/ gql` } } } + ${FragmentInjectCommonQueryParams} ${FragmentProfile} ${FragmentPaginatedResultInfo} `; @@ -7313,11 +7423,10 @@ export const ExploreProfilesDocument = /*#__PURE__*/ gql` * const { data, loading, error } = useExploreProfiles({ * variables: { * request: // value for 'request' - * profileCoverTransform: // value for 'profileCoverTransform' - * profilePictureTransform: // value for 'profilePictureTransform' - * profileStatsArg: // value for 'profileStatsArg' - * profileStatsCountOpenActionArgs: // value for 'profileStatsCountOpenActionArgs' - * rateRequest: // value for 'rateRequest' + * profileCoverSize: // value for 'profileCoverSize' + * profilePictureSize: // value for 'profilePictureSize' + * activityOn: // value for 'activityOn' + * fxRateFor: // value for 'fxRateFor' * }, * }); */ @@ -7348,16 +7457,14 @@ export type ExploreProfilesQueryResult = Apollo.QueryResult< export const FeedDocument = /*#__PURE__*/ gql` query Feed( $request: FeedRequest! - $publicationImageTransform: ImageTransform = {} - $publicationOperationsActedArgs: PublicationOperationsActedArgs = {} - $publicationStatsInput: PublicationStatsInput! = {} - $publicationStatsCountOpenActionArgs: PublicationStatsCountOpenActionArgs! = {} - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $imageSmallSize: ImageTransform = {} + $imageMediumSize: ImageTransform = {} + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: feed(request: $request) { items { ...FeedItem @@ -7367,6 +7474,7 @@ export const FeedDocument = /*#__PURE__*/ gql` } } } + ${FragmentInjectCommonQueryParams} ${FragmentFeedItem} ${FragmentPaginatedResultInfo} `; @@ -7384,15 +7492,12 @@ export const FeedDocument = /*#__PURE__*/ gql` * const { data, loading, error } = useFeed({ * variables: { * request: // value for 'request' - * publicationImageTransform: // value for 'publicationImageTransform' - * publicationOperationsActedArgs: // value for 'publicationOperationsActedArgs' - * publicationStatsInput: // value for 'publicationStatsInput' - * publicationStatsCountOpenActionArgs: // value for 'publicationStatsCountOpenActionArgs' - * profileCoverTransform: // value for 'profileCoverTransform' - * profilePictureTransform: // value for 'profilePictureTransform' - * profileStatsArg: // value for 'profileStatsArg' - * profileStatsCountOpenActionArgs: // value for 'profileStatsCountOpenActionArgs' - * rateRequest: // value for 'rateRequest' + * imageSmallSize: // value for 'imageSmallSize' + * imageMediumSize: // value for 'imageMediumSize' + * profileCoverSize: // value for 'profileCoverSize' + * profilePictureSize: // value for 'profilePictureSize' + * activityOn: // value for 'activityOn' + * fxRateFor: // value for 'fxRateFor' * }, * }); */ @@ -7412,16 +7517,14 @@ export type FeedQueryResult = Apollo.QueryResult; export const FeedHighlightsDocument = /*#__PURE__*/ gql` query FeedHighlights( $request: FeedHighlightsRequest! - $publicationImageTransform: ImageTransform = {} - $publicationOperationsActedArgs: PublicationOperationsActedArgs = {} - $publicationStatsInput: PublicationStatsInput! = {} - $publicationStatsCountOpenActionArgs: PublicationStatsCountOpenActionArgs! = {} - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $imageSmallSize: ImageTransform = {} + $imageMediumSize: ImageTransform = {} + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: feedHighlights(request: $request) { items { ... on Post { @@ -7436,6 +7539,7 @@ export const FeedHighlightsDocument = /*#__PURE__*/ gql` } } } + ${FragmentInjectCommonQueryParams} ${FragmentPost} ${FragmentQuote} ${FragmentPaginatedResultInfo} @@ -7454,15 +7558,12 @@ export const FeedHighlightsDocument = /*#__PURE__*/ gql` * const { data, loading, error } = useFeedHighlights({ * variables: { * request: // value for 'request' - * publicationImageTransform: // value for 'publicationImageTransform' - * publicationOperationsActedArgs: // value for 'publicationOperationsActedArgs' - * publicationStatsInput: // value for 'publicationStatsInput' - * publicationStatsCountOpenActionArgs: // value for 'publicationStatsCountOpenActionArgs' - * profileCoverTransform: // value for 'profileCoverTransform' - * profilePictureTransform: // value for 'profilePictureTransform' - * profileStatsArg: // value for 'profileStatsArg' - * profileStatsCountOpenActionArgs: // value for 'profileStatsCountOpenActionArgs' - * rateRequest: // value for 'rateRequest' + * imageSmallSize: // value for 'imageSmallSize' + * imageMediumSize: // value for 'imageMediumSize' + * profileCoverSize: // value for 'profileCoverSize' + * profilePictureSize: // value for 'profilePictureSize' + * activityOn: // value for 'activityOn' + * fxRateFor: // value for 'fxRateFor' * }, * }); */ @@ -7493,16 +7594,14 @@ export type FeedHighlightsQueryResult = Apollo.QueryResult< export const NotificationsDocument = /*#__PURE__*/ gql` query Notifications( $request: NotificationRequest! - $publicationImageTransform: ImageTransform = {} - $publicationOperationsActedArgs: PublicationOperationsActedArgs = {} - $publicationStatsInput: PublicationStatsInput! = {} - $publicationStatsCountOpenActionArgs: PublicationStatsCountOpenActionArgs! = {} - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $imageSmallSize: ImageTransform = {} + $imageMediumSize: ImageTransform = {} + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: notifications(request: $request) { items { ... on ReactionNotification { @@ -7532,6 +7631,7 @@ export const NotificationsDocument = /*#__PURE__*/ gql` } } } + ${FragmentInjectCommonQueryParams} ${FragmentReactionNotification} ${FragmentCommentNotification} ${FragmentMirrorNotification} @@ -7555,15 +7655,12 @@ export const NotificationsDocument = /*#__PURE__*/ gql` * const { data, loading, error } = useNotifications({ * variables: { * request: // value for 'request' - * publicationImageTransform: // value for 'publicationImageTransform' - * publicationOperationsActedArgs: // value for 'publicationOperationsActedArgs' - * publicationStatsInput: // value for 'publicationStatsInput' - * publicationStatsCountOpenActionArgs: // value for 'publicationStatsCountOpenActionArgs' - * profileCoverTransform: // value for 'profileCoverTransform' - * profilePictureTransform: // value for 'profilePictureTransform' - * profileStatsArg: // value for 'profileStatsArg' - * profileStatsCountOpenActionArgs: // value for 'profileStatsCountOpenActionArgs' - * rateRequest: // value for 'rateRequest' + * imageSmallSize: // value for 'imageSmallSize' + * imageMediumSize: // value for 'imageMediumSize' + * profileCoverSize: // value for 'profileCoverSize' + * profilePictureSize: // value for 'profilePictureSize' + * activityOn: // value for 'activityOn' + * fxRateFor: // value for 'fxRateFor' * }, * }); */ @@ -7591,16 +7688,17 @@ export type NotificationsQueryResult = Apollo.QueryResult< export const ProfileDocument = /*#__PURE__*/ gql` query Profile( $request: ProfileRequest! - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: profile(request: $request) { ...Profile } } + ${FragmentInjectCommonQueryParams} ${FragmentProfile} `; @@ -7617,11 +7715,10 @@ export const ProfileDocument = /*#__PURE__*/ gql` * const { data, loading, error } = useProfile({ * variables: { * request: // value for 'request' - * profileCoverTransform: // value for 'profileCoverTransform' - * profilePictureTransform: // value for 'profilePictureTransform' - * profileStatsArg: // value for 'profileStatsArg' - * profileStatsCountOpenActionArgs: // value for 'profileStatsCountOpenActionArgs' - * rateRequest: // value for 'rateRequest' + * profileCoverSize: // value for 'profileCoverSize' + * profilePictureSize: // value for 'profilePictureSize' + * activityOn: // value for 'activityOn' + * fxRateFor: // value for 'fxRateFor' * }, * }); */ @@ -7643,12 +7740,12 @@ export const ProfilesDocument = /*#__PURE__*/ gql` $where: ProfilesRequestWhere! $limit: LimitType $cursor: Cursor - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: profiles(request: { where: $where, limit: $limit, cursor: $cursor }) { items { ...Profile @@ -7658,6 +7755,7 @@ export const ProfilesDocument = /*#__PURE__*/ gql` } } } + ${FragmentInjectCommonQueryParams} ${FragmentProfile} ${FragmentPaginatedResultInfo} `; @@ -7677,11 +7775,10 @@ export const ProfilesDocument = /*#__PURE__*/ gql` * where: // value for 'where' * limit: // value for 'limit' * cursor: // value for 'cursor' - * profileCoverTransform: // value for 'profileCoverTransform' - * profilePictureTransform: // value for 'profilePictureTransform' - * profileStatsArg: // value for 'profileStatsArg' - * profileStatsCountOpenActionArgs: // value for 'profileStatsCountOpenActionArgs' - * rateRequest: // value for 'rateRequest' + * profileCoverSize: // value for 'profileCoverSize' + * profilePictureSize: // value for 'profilePictureSize' + * activityOn: // value for 'activityOn' + * fxRateFor: // value for 'fxRateFor' * }, * }); */ @@ -7756,12 +7853,12 @@ export type ProfileManagersQueryResult = Apollo.QueryResult< export const ProfileRecommendationsDocument = /*#__PURE__*/ gql` query ProfileRecommendations( $request: ProfileRecommendationsRequest! - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: profileRecommendations(request: $request) { items { ...Profile @@ -7771,6 +7868,7 @@ export const ProfileRecommendationsDocument = /*#__PURE__*/ gql` } } } + ${FragmentInjectCommonQueryParams} ${FragmentProfile} ${FragmentPaginatedResultInfo} `; @@ -7788,11 +7886,10 @@ export const ProfileRecommendationsDocument = /*#__PURE__*/ gql` * const { data, loading, error } = useProfileRecommendations({ * variables: { * request: // value for 'request' - * profileCoverTransform: // value for 'profileCoverTransform' - * profilePictureTransform: // value for 'profilePictureTransform' - * profileStatsArg: // value for 'profileStatsArg' - * profileStatsCountOpenActionArgs: // value for 'profileStatsCountOpenActionArgs' - * rateRequest: // value for 'rateRequest' + * profileCoverSize: // value for 'profileCoverSize' + * profilePictureSize: // value for 'profilePictureSize' + * activityOn: // value for 'activityOn' + * fxRateFor: // value for 'fxRateFor' * }, * }); */ @@ -7830,12 +7927,12 @@ export const FollowingDocument = /*#__PURE__*/ gql` $for: ProfileId! $limit: LimitType $cursor: Cursor - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: following(request: { for: $for, limit: $limit, cursor: $cursor }) { items { ...Profile @@ -7845,6 +7942,7 @@ export const FollowingDocument = /*#__PURE__*/ gql` } } } + ${FragmentInjectCommonQueryParams} ${FragmentProfile} ${FragmentPaginatedResultInfo} `; @@ -7864,11 +7962,10 @@ export const FollowingDocument = /*#__PURE__*/ gql` * for: // value for 'for' * limit: // value for 'limit' * cursor: // value for 'cursor' - * profileCoverTransform: // value for 'profileCoverTransform' - * profilePictureTransform: // value for 'profilePictureTransform' - * profileStatsArg: // value for 'profileStatsArg' - * profileStatsCountOpenActionArgs: // value for 'profileStatsCountOpenActionArgs' - * rateRequest: // value for 'rateRequest' + * profileCoverSize: // value for 'profileCoverSize' + * profilePictureSize: // value for 'profilePictureSize' + * activityOn: // value for 'activityOn' + * fxRateFor: // value for 'fxRateFor' * }, * }); */ @@ -7892,12 +7989,12 @@ export const FollowersDocument = /*#__PURE__*/ gql` $of: ProfileId! $limit: LimitType $cursor: Cursor - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: followers(request: { of: $of, limit: $limit, cursor: $cursor }) { items { ...Profile @@ -7907,6 +8004,7 @@ export const FollowersDocument = /*#__PURE__*/ gql` } } } + ${FragmentInjectCommonQueryParams} ${FragmentProfile} ${FragmentPaginatedResultInfo} `; @@ -7926,11 +8024,10 @@ export const FollowersDocument = /*#__PURE__*/ gql` * of: // value for 'of' * limit: // value for 'limit' * cursor: // value for 'cursor' - * profileCoverTransform: // value for 'profileCoverTransform' - * profilePictureTransform: // value for 'profilePictureTransform' - * profileStatsArg: // value for 'profileStatsArg' - * profileStatsCountOpenActionArgs: // value for 'profileStatsCountOpenActionArgs' - * rateRequest: // value for 'rateRequest' + * profileCoverSize: // value for 'profileCoverSize' + * profilePictureSize: // value for 'profilePictureSize' + * activityOn: // value for 'activityOn' + * fxRateFor: // value for 'fxRateFor' * }, * }); */ @@ -7955,12 +8052,12 @@ export const MutualFollowersDocument = /*#__PURE__*/ gql` $viewing: ProfileId! $limit: LimitType $cursor: Cursor - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: mutualFollowers( request: { observer: $observer, viewing: $viewing, limit: $limit, cursor: $cursor } ) { @@ -7972,6 +8069,7 @@ export const MutualFollowersDocument = /*#__PURE__*/ gql` } } } + ${FragmentInjectCommonQueryParams} ${FragmentProfile} ${FragmentPaginatedResultInfo} `; @@ -7992,11 +8090,10 @@ export const MutualFollowersDocument = /*#__PURE__*/ gql` * viewing: // value for 'viewing' * limit: // value for 'limit' * cursor: // value for 'cursor' - * profileCoverTransform: // value for 'profileCoverTransform' - * profilePictureTransform: // value for 'profilePictureTransform' - * profileStatsArg: // value for 'profileStatsArg' - * profileStatsCountOpenActionArgs: // value for 'profileStatsCountOpenActionArgs' - * rateRequest: // value for 'rateRequest' + * profileCoverSize: // value for 'profileCoverSize' + * profilePictureSize: // value for 'profilePictureSize' + * activityOn: // value for 'activityOn' + * fxRateFor: // value for 'fxRateFor' * }, * }); */ @@ -8027,12 +8124,12 @@ export type MutualFollowersQueryResult = Apollo.QueryResult< export const WhoActedOnPublicationDocument = /*#__PURE__*/ gql` query WhoActedOnPublication( $request: WhoActedOnPublicationRequest! - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: whoActedOnPublication(request: $request) { items { ...Profile @@ -8042,6 +8139,7 @@ export const WhoActedOnPublicationDocument = /*#__PURE__*/ gql` } } } + ${FragmentInjectCommonQueryParams} ${FragmentProfile} ${FragmentPaginatedResultInfo} `; @@ -8059,11 +8157,10 @@ export const WhoActedOnPublicationDocument = /*#__PURE__*/ gql` * const { data, loading, error } = useWhoActedOnPublication({ * variables: { * request: // value for 'request' - * profileCoverTransform: // value for 'profileCoverTransform' - * profilePictureTransform: // value for 'profilePictureTransform' - * profileStatsArg: // value for 'profileStatsArg' - * profileStatsCountOpenActionArgs: // value for 'profileStatsCountOpenActionArgs' - * rateRequest: // value for 'rateRequest' + * profileCoverSize: // value for 'profileCoverSize' + * profilePictureSize: // value for 'profilePictureSize' + * activityOn: // value for 'activityOn' + * fxRateFor: // value for 'fxRateFor' * }, * }); */ @@ -9178,16 +9275,14 @@ export type CreateHandleUnlinkFromProfileTypedDataMutationOptions = Apollo.BaseM export const PublicationDocument = /*#__PURE__*/ gql` query Publication( $request: PublicationRequest! - $publicationImageTransform: ImageTransform = {} - $publicationOperationsActedArgs: PublicationOperationsActedArgs = {} - $publicationStatsInput: PublicationStatsInput! = {} - $publicationStatsCountOpenActionArgs: PublicationStatsCountOpenActionArgs! = {} - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $imageSmallSize: ImageTransform = {} + $imageMediumSize: ImageTransform = {} + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: publication(request: $request) { ... on Post { ...Post @@ -9203,6 +9298,7 @@ export const PublicationDocument = /*#__PURE__*/ gql` } } } + ${FragmentInjectCommonQueryParams} ${FragmentPost} ${FragmentMirror} ${FragmentComment} @@ -9222,15 +9318,12 @@ export const PublicationDocument = /*#__PURE__*/ gql` * const { data, loading, error } = usePublication({ * variables: { * request: // value for 'request' - * publicationImageTransform: // value for 'publicationImageTransform' - * publicationOperationsActedArgs: // value for 'publicationOperationsActedArgs' - * publicationStatsInput: // value for 'publicationStatsInput' - * publicationStatsCountOpenActionArgs: // value for 'publicationStatsCountOpenActionArgs' - * profileCoverTransform: // value for 'profileCoverTransform' - * profilePictureTransform: // value for 'profilePictureTransform' - * profileStatsArg: // value for 'profileStatsArg' - * profileStatsCountOpenActionArgs: // value for 'profileStatsCountOpenActionArgs' - * rateRequest: // value for 'rateRequest' + * imageSmallSize: // value for 'imageSmallSize' + * imageMediumSize: // value for 'imageMediumSize' + * profileCoverSize: // value for 'profileCoverSize' + * profilePictureSize: // value for 'profilePictureSize' + * activityOn: // value for 'activityOn' + * fxRateFor: // value for 'fxRateFor' * }, * }); */ @@ -9255,16 +9348,14 @@ export const PublicationsDocument = /*#__PURE__*/ gql` $orderBy: PublicationsOrderByType $limit: LimitType $cursor: Cursor - $publicationImageTransform: ImageTransform = {} - $publicationOperationsActedArgs: PublicationOperationsActedArgs = {} - $publicationStatsInput: PublicationStatsInput! = {} - $publicationStatsCountOpenActionArgs: PublicationStatsCountOpenActionArgs! = {} - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $imageSmallSize: ImageTransform = {} + $imageMediumSize: ImageTransform = {} + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: publications( request: { where: $where, orderBy: $orderBy, limit: $limit, cursor: $cursor } ) { @@ -9287,6 +9378,7 @@ export const PublicationsDocument = /*#__PURE__*/ gql` } } } + ${FragmentInjectCommonQueryParams} ${FragmentPost} ${FragmentMirror} ${FragmentComment} @@ -9310,15 +9402,12 @@ export const PublicationsDocument = /*#__PURE__*/ gql` * orderBy: // value for 'orderBy' * limit: // value for 'limit' * cursor: // value for 'cursor' - * publicationImageTransform: // value for 'publicationImageTransform' - * publicationOperationsActedArgs: // value for 'publicationOperationsActedArgs' - * publicationStatsInput: // value for 'publicationStatsInput' - * publicationStatsCountOpenActionArgs: // value for 'publicationStatsCountOpenActionArgs' - * profileCoverTransform: // value for 'profileCoverTransform' - * profilePictureTransform: // value for 'profilePictureTransform' - * profileStatsArg: // value for 'profileStatsArg' - * profileStatsCountOpenActionArgs: // value for 'profileStatsCountOpenActionArgs' - * rateRequest: // value for 'rateRequest' + * imageSmallSize: // value for 'imageSmallSize' + * imageMediumSize: // value for 'imageMediumSize' + * profileCoverSize: // value for 'profileCoverSize' + * profilePictureSize: // value for 'profilePictureSize' + * activityOn: // value for 'activityOn' + * fxRateFor: // value for 'fxRateFor' * }, * }); */ @@ -10503,16 +10592,14 @@ export type RefreshPublicationMetadataMutationOptions = Apollo.BaseMutationOptio export const RevenueFromPublicationsDocument = /*#__PURE__*/ gql` query RevenueFromPublications( $request: RevenueFromPublicationsRequest! - $publicationImageTransform: ImageTransform = {} - $publicationOperationsActedArgs: PublicationOperationsActedArgs = {} - $publicationStatsInput: PublicationStatsInput! = {} - $publicationStatsCountOpenActionArgs: PublicationStatsCountOpenActionArgs! = {} - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $imageSmallSize: ImageTransform = {} + $imageMediumSize: ImageTransform = {} + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: revenueFromPublications(request: $request) { items { ...PublicationRevenue @@ -10522,6 +10609,7 @@ export const RevenueFromPublicationsDocument = /*#__PURE__*/ gql` } } } + ${FragmentInjectCommonQueryParams} ${FragmentPublicationRevenue} ${FragmentPaginatedResultInfo} `; @@ -10539,15 +10627,12 @@ export const RevenueFromPublicationsDocument = /*#__PURE__*/ gql` * const { data, loading, error } = useRevenueFromPublications({ * variables: { * request: // value for 'request' - * publicationImageTransform: // value for 'publicationImageTransform' - * publicationOperationsActedArgs: // value for 'publicationOperationsActedArgs' - * publicationStatsInput: // value for 'publicationStatsInput' - * publicationStatsCountOpenActionArgs: // value for 'publicationStatsCountOpenActionArgs' - * profileCoverTransform: // value for 'profileCoverTransform' - * profilePictureTransform: // value for 'profilePictureTransform' - * profileStatsArg: // value for 'profileStatsArg' - * profileStatsCountOpenActionArgs: // value for 'profileStatsCountOpenActionArgs' - * rateRequest: // value for 'rateRequest' + * imageSmallSize: // value for 'imageSmallSize' + * imageMediumSize: // value for 'imageMediumSize' + * profileCoverSize: // value for 'profileCoverSize' + * profilePictureSize: // value for 'profilePictureSize' + * activityOn: // value for 'activityOn' + * fxRateFor: // value for 'fxRateFor' * }, * }); */ @@ -10586,20 +10671,19 @@ export type RevenueFromPublicationsQueryResult = Apollo.QueryResult< export const RevenueFromPublicationDocument = /*#__PURE__*/ gql` query RevenueFromPublication( $request: RevenueFromPublicationRequest! - $publicationImageTransform: ImageTransform = {} - $publicationOperationsActedArgs: PublicationOperationsActedArgs = {} - $publicationStatsInput: PublicationStatsInput! = {} - $publicationStatsCountOpenActionArgs: PublicationStatsCountOpenActionArgs! = {} - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $imageSmallSize: ImageTransform = {} + $imageMediumSize: ImageTransform = {} + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: revenueFromPublication(request: $request) { ...PublicationRevenue } } + ${FragmentInjectCommonQueryParams} ${FragmentPublicationRevenue} `; @@ -10616,15 +10700,12 @@ export const RevenueFromPublicationDocument = /*#__PURE__*/ gql` * const { data, loading, error } = useRevenueFromPublication({ * variables: { * request: // value for 'request' - * publicationImageTransform: // value for 'publicationImageTransform' - * publicationOperationsActedArgs: // value for 'publicationOperationsActedArgs' - * publicationStatsInput: // value for 'publicationStatsInput' - * publicationStatsCountOpenActionArgs: // value for 'publicationStatsCountOpenActionArgs' - * profileCoverTransform: // value for 'profileCoverTransform' - * profilePictureTransform: // value for 'profilePictureTransform' - * profileStatsArg: // value for 'profileStatsArg' - * profileStatsCountOpenActionArgs: // value for 'profileStatsCountOpenActionArgs' - * rateRequest: // value for 'rateRequest' + * imageSmallSize: // value for 'imageSmallSize' + * imageMediumSize: // value for 'imageMediumSize' + * profileCoverSize: // value for 'profileCoverSize' + * profilePictureSize: // value for 'profilePictureSize' + * activityOn: // value for 'activityOn' + * fxRateFor: // value for 'fxRateFor' * }, * }); */ @@ -10658,13 +10739,15 @@ export type RevenueFromPublicationQueryResult = Apollo.QueryResult< RevenueFromPublicationVariables >; export const FollowRevenuesDocument = /*#__PURE__*/ gql` - query FollowRevenues($request: FollowRevenueRequest!, $rateRequest: RateRequest = { for: USD }) { + query FollowRevenues($request: FollowRevenueRequest!, $fxRateFor: SupportedFiatType = USD) { + ...InjectCommonQueryParams result: followRevenues(request: $request) { revenues { ...RevenueAggregate } } } + ${FragmentInjectCommonQueryParams} ${FragmentRevenueAggregate} `; @@ -10681,7 +10764,7 @@ export const FollowRevenuesDocument = /*#__PURE__*/ gql` * const { data, loading, error } = useFollowRevenues({ * variables: { * request: // value for 'request' - * rateRequest: // value for 'rateRequest' + * fxRateFor: // value for 'fxRateFor' * }, * }); */ @@ -10715,16 +10798,14 @@ export const SearchPublicationsDocument = /*#__PURE__*/ gql` $where: PublicationSearchWhere $limit: LimitType $cursor: Cursor - $publicationImageTransform: ImageTransform = {} - $publicationOperationsActedArgs: PublicationOperationsActedArgs = {} - $publicationStatsInput: PublicationStatsInput! = {} - $publicationStatsCountOpenActionArgs: PublicationStatsCountOpenActionArgs! = {} - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $imageSmallSize: ImageTransform = {} + $imageMediumSize: ImageTransform = {} + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: searchPublications( request: { query: $query, where: $where, cursor: $cursor, limit: $limit } ) { @@ -10744,6 +10825,7 @@ export const SearchPublicationsDocument = /*#__PURE__*/ gql` } } } + ${FragmentInjectCommonQueryParams} ${FragmentPost} ${FragmentComment} ${FragmentQuote} @@ -10766,15 +10848,12 @@ export const SearchPublicationsDocument = /*#__PURE__*/ gql` * where: // value for 'where' * limit: // value for 'limit' * cursor: // value for 'cursor' - * publicationImageTransform: // value for 'publicationImageTransform' - * publicationOperationsActedArgs: // value for 'publicationOperationsActedArgs' - * publicationStatsInput: // value for 'publicationStatsInput' - * publicationStatsCountOpenActionArgs: // value for 'publicationStatsCountOpenActionArgs' - * profileCoverTransform: // value for 'profileCoverTransform' - * profilePictureTransform: // value for 'profilePictureTransform' - * profileStatsArg: // value for 'profileStatsArg' - * profileStatsCountOpenActionArgs: // value for 'profileStatsCountOpenActionArgs' - * rateRequest: // value for 'rateRequest' + * imageSmallSize: // value for 'imageSmallSize' + * imageMediumSize: // value for 'imageMediumSize' + * profileCoverSize: // value for 'profileCoverSize' + * profilePictureSize: // value for 'profilePictureSize' + * activityOn: // value for 'activityOn' + * fxRateFor: // value for 'fxRateFor' * }, * }); */ @@ -10810,12 +10889,12 @@ export const SearchProfilesDocument = /*#__PURE__*/ gql` $where: ProfileSearchWhere $limit: LimitType $cursor: Cursor - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: searchProfiles( request: { query: $query, where: $where, limit: $limit, cursor: $cursor } ) { @@ -10827,6 +10906,7 @@ export const SearchProfilesDocument = /*#__PURE__*/ gql` } } } + ${FragmentInjectCommonQueryParams} ${FragmentProfile} ${FragmentPaginatedResultInfo} `; @@ -10847,11 +10927,10 @@ export const SearchProfilesDocument = /*#__PURE__*/ gql` * where: // value for 'where' * limit: // value for 'limit' * cursor: // value for 'cursor' - * profileCoverTransform: // value for 'profileCoverTransform' - * profilePictureTransform: // value for 'profilePictureTransform' - * profileStatsArg: // value for 'profileStatsArg' - * profileStatsCountOpenActionArgs: // value for 'profileStatsCountOpenActionArgs' - * rateRequest: // value for 'rateRequest' + * profileCoverSize: // value for 'profileCoverSize' + * profilePictureSize: // value for 'profilePictureSize' + * activityOn: // value for 'activityOn' + * fxRateFor: // value for 'fxRateFor' * }, * }); */ @@ -11166,11 +11245,10 @@ export type OwnedHandlesQueryResult = Apollo.QueryResult | FieldReadFunction; publication?: FieldPolicy | FieldReadFunction; }; +export type AdvancedContractConditionKeySpecifier = ( + | 'abi' + | 'comparison' + | 'contract' + | 'functionName' + | 'params' + | 'value' + | AdvancedContractConditionKeySpecifier +)[]; +export type AdvancedContractConditionFieldPolicy = { + abi?: FieldPolicy | FieldReadFunction; + comparison?: FieldPolicy | FieldReadFunction; + contract?: FieldPolicy | FieldReadFunction; + functionName?: FieldPolicy | FieldReadFunction; + params?: FieldPolicy | FieldReadFunction; + value?: FieldPolicy | FieldReadFunction; +}; export type AmountKeySpecifier = ('asset' | 'rate' | 'value' | AmountKeySpecifier)[]; export type AmountFieldPolicy = { asset?: FieldPolicy | FieldReadFunction; @@ -12750,6 +12844,17 @@ export type ImageSetFieldPolicy = { raw?: FieldPolicy | FieldReadFunction; transformed?: FieldPolicy | FieldReadFunction; }; +export type ImageTransformParamKeySpecifier = ( + | 'height' + | 'keepAspectRatio' + | 'width' + | ImageTransformParamKeySpecifier +)[]; +export type ImageTransformParamFieldPolicy = { + height?: FieldPolicy | FieldReadFunction; + keepAspectRatio?: FieldPolicy | FieldReadFunction; + width?: FieldPolicy | FieldReadFunction; +}; export type InvitedResultKeySpecifier = ( | 'by' | 'profileMinted' @@ -13369,6 +13474,7 @@ export type MutationKeySpecifier = ( | 'createOnchainPostTypedData' | 'createOnchainQuoteTypedData' | 'createOnchainSetProfileMetadataTypedData' + | 'createProfile' | 'createProfileWithHandle' | 'createSetFollowModuleTypedData' | 'createUnblockProfilesTypedData' @@ -13380,6 +13486,15 @@ export type MutationKeySpecifier = ( | 'handleUnlinkFromProfile' | 'hidePublication' | 'idKitPhoneVerifyWebhook' + | 'internalAddCuratedTag' + | 'internalAddInvites' + | 'internalAllowDomain' + | 'internalClaim' + | 'internalCuratedUpdate' + | 'internalNftIndex' + | 'internalNftVerify' + | 'internalRemoveCuratedTag' + | 'internalUpdateProfileStatus' | 'inviteProfile' | 'legacyCollect' | 'mirrorOnMomoka' @@ -13435,6 +13550,7 @@ export type MutationFieldPolicy = { createOnchainPostTypedData?: FieldPolicy | FieldReadFunction; createOnchainQuoteTypedData?: FieldPolicy | FieldReadFunction; createOnchainSetProfileMetadataTypedData?: FieldPolicy | FieldReadFunction; + createProfile?: FieldPolicy | FieldReadFunction; createProfileWithHandle?: FieldPolicy | FieldReadFunction; createSetFollowModuleTypedData?: FieldPolicy | FieldReadFunction; createUnblockProfilesTypedData?: FieldPolicy | FieldReadFunction; @@ -13446,6 +13562,15 @@ export type MutationFieldPolicy = { handleUnlinkFromProfile?: FieldPolicy | FieldReadFunction; hidePublication?: FieldPolicy | FieldReadFunction; idKitPhoneVerifyWebhook?: FieldPolicy | FieldReadFunction; + internalAddCuratedTag?: FieldPolicy | FieldReadFunction; + internalAddInvites?: FieldPolicy | FieldReadFunction; + internalAllowDomain?: FieldPolicy | FieldReadFunction; + internalClaim?: FieldPolicy | FieldReadFunction; + internalCuratedUpdate?: FieldPolicy | FieldReadFunction; + internalNftIndex?: FieldPolicy | FieldReadFunction; + internalNftVerify?: FieldPolicy | FieldReadFunction; + internalRemoveCuratedTag?: FieldPolicy | FieldReadFunction; + internalUpdateProfileStatus?: FieldPolicy | FieldReadFunction; inviteProfile?: FieldPolicy | FieldReadFunction; legacyCollect?: FieldPolicy | FieldReadFunction; mirrorOnMomoka?: FieldPolicy | FieldReadFunction; @@ -13922,6 +14047,11 @@ export type PostFieldPolicy = { stats?: FieldPolicy | FieldReadFunction; txHash?: FieldPolicy | FieldReadFunction; }; +export type PrfResultKeySpecifier = ('dd' | 'ss' | PrfResultKeySpecifier)[]; +export type PrfResultFieldPolicy = { + dd?: FieldPolicy | FieldReadFunction; + ss?: FieldPolicy | FieldReadFunction; +}; export type ProfileKeySpecifier = ( | 'createdAt' | 'followModule' @@ -14271,7 +14401,16 @@ export type QueryKeySpecifier = ( | 'followRevenues' | 'followers' | 'following' + | 'fxRateFor' | 'generateModuleCurrencyApprovalData' + | 'imageMediumSize' + | 'imageSmallSize' + | 'internalAllowedDomains' + | 'internalClaimStatus' + | 'internalCuratedHandles' + | 'internalCuratedTags' + | 'internalInvites' + | 'internalProfileStatus' | 'invitedProfiles' | 'lastLoggedInProfile' | 'lensTransactionStatus' @@ -14296,8 +14435,10 @@ export type QueryKeySpecifier = ( | 'profile' | 'profileActionHistory' | 'profileAlreadyInvited' + | 'profileCoverSize' | 'profileInterestsOptions' | 'profileManagers' + | 'profilePictureSize' | 'profileRecommendations' | 'profiles' | 'profilesManaged' @@ -14337,7 +14478,16 @@ export type QueryFieldPolicy = { followRevenues?: FieldPolicy | FieldReadFunction; followers?: FieldPolicy | FieldReadFunction; following?: FieldPolicy | FieldReadFunction; + fxRateFor?: FieldPolicy | FieldReadFunction; generateModuleCurrencyApprovalData?: FieldPolicy | FieldReadFunction; + imageMediumSize?: FieldPolicy | FieldReadFunction; + imageSmallSize?: FieldPolicy | FieldReadFunction; + internalAllowedDomains?: FieldPolicy | FieldReadFunction; + internalClaimStatus?: FieldPolicy | FieldReadFunction; + internalCuratedHandles?: FieldPolicy | FieldReadFunction; + internalCuratedTags?: FieldPolicy | FieldReadFunction; + internalInvites?: FieldPolicy | FieldReadFunction; + internalProfileStatus?: FieldPolicy | FieldReadFunction; invitedProfiles?: FieldPolicy | FieldReadFunction; lastLoggedInProfile?: FieldPolicy | FieldReadFunction; lensTransactionStatus?: FieldPolicy | FieldReadFunction; @@ -14362,8 +14512,10 @@ export type QueryFieldPolicy = { profile?: FieldPolicy | FieldReadFunction; profileActionHistory?: FieldPolicy | FieldReadFunction; profileAlreadyInvited?: FieldPolicy | FieldReadFunction; + profileCoverSize?: FieldPolicy | FieldReadFunction; profileInterestsOptions?: FieldPolicy | FieldReadFunction; profileManagers?: FieldPolicy | FieldReadFunction; + profilePictureSize?: FieldPolicy | FieldReadFunction; profileRecommendations?: FieldPolicy | FieldReadFunction; profiles?: FieldPolicy | FieldReadFunction; profilesManaged?: FieldPolicy | FieldReadFunction; @@ -14857,6 +15009,13 @@ export type StrictTypedTypePolicies = { | (() => undefined | ActedNotificationKeySpecifier); fields?: ActedNotificationFieldPolicy; }; + AdvancedContractCondition?: Omit & { + keyFields?: + | false + | AdvancedContractConditionKeySpecifier + | (() => undefined | AdvancedContractConditionKeySpecifier); + fields?: AdvancedContractConditionFieldPolicy; + }; Amount?: Omit & { keyFields?: false | AmountKeySpecifier | (() => undefined | AmountKeySpecifier); fields?: AmountFieldPolicy; @@ -15658,6 +15817,13 @@ export type StrictTypedTypePolicies = { keyFields?: false | ImageSetKeySpecifier | (() => undefined | ImageSetKeySpecifier); fields?: ImageSetFieldPolicy; }; + ImageTransformParam?: Omit & { + keyFields?: + | false + | ImageTransformParamKeySpecifier + | (() => undefined | ImageTransformParamKeySpecifier); + fields?: ImageTransformParamFieldPolicy; + }; InvitedResult?: Omit & { keyFields?: false | InvitedResultKeySpecifier | (() => undefined | InvitedResultKeySpecifier); fields?: InvitedResultFieldPolicy; @@ -16164,6 +16330,10 @@ export type StrictTypedTypePolicies = { keyFields?: false | PostKeySpecifier | (() => undefined | PostKeySpecifier); fields?: PostFieldPolicy; }; + PrfResult?: Omit & { + keyFields?: false | PrfResultKeySpecifier | (() => undefined | PrfResultKeySpecifier); + fields?: PrfResultFieldPolicy; + }; Profile?: Omit & { keyFields?: false | ProfileKeySpecifier | (() => undefined | ProfileKeySpecifier); fields?: ProfileFieldPolicy; @@ -16629,6 +16799,7 @@ const result: PossibleTypesResultData = { RelayMomokaResult: ['CreateMomokaPublicationResult', 'LensProfileManagerRelayError'], RelayResult: ['RelayError', 'RelaySuccess'], SecondTierCondition: [ + 'AdvancedContractCondition', 'AndCondition', 'CollectCondition', 'EoaOwnershipCondition', @@ -16640,6 +16811,7 @@ const result: PossibleTypesResultData = { ], SupportedModule: ['KnownSupportedModule', 'UnknownSupportedModule'], ThirdTierCondition: [ + 'AdvancedContractCondition', 'CollectCondition', 'EoaOwnershipCondition', 'Erc20OwnershipCondition', diff --git a/packages/api-bindings/src/lens/graphql/notifications.graphql b/packages/api-bindings/src/lens/graphql/notifications.graphql index 634e63f58c..83e855449a 100644 --- a/packages/api-bindings/src/lens/graphql/notifications.graphql +++ b/packages/api-bindings/src/lens/graphql/notifications.graphql @@ -121,16 +121,14 @@ fragment MentionNotification on MentionNotification { # queries query Notifications( $request: NotificationRequest! - $publicationImageTransform: ImageTransform = {} - $publicationOperationsActedArgs: PublicationOperationsActedArgs = {} - $publicationStatsInput: PublicationStatsInput! = {} - $publicationStatsCountOpenActionArgs: PublicationStatsCountOpenActionArgs! = {} - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $imageSmallSize: ImageTransform = {} + $imageMediumSize: ImageTransform = {} + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: notifications(request: $request) { items { ... on ReactionNotification { diff --git a/packages/api-bindings/src/lens/graphql/profile.graphql b/packages/api-bindings/src/lens/graphql/profile.graphql index cea61fde1e..3dd480da4c 100644 --- a/packages/api-bindings/src/lens/graphql/profile.graphql +++ b/packages/api-bindings/src/lens/graphql/profile.graphql @@ -210,15 +210,21 @@ fragment CreateHandleUnlinkFromProfileBroadcastItemResult on CreateHandleUnlinkF } } +fragment ImageTransformParam on ImageTransformParam { + height + width + keepAspectRatio +} + # queries query Profile( $request: ProfileRequest! - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: profile(request: $request) { ...Profile } @@ -228,12 +234,12 @@ query Profiles( $where: ProfilesRequestWhere! $limit: LimitType $cursor: Cursor - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: profiles(request: { where: $where, limit: $limit, cursor: $cursor }) { items { ...Profile @@ -257,12 +263,12 @@ query ProfileManagers($request: ProfileManagersRequest!) { query ProfileRecommendations( $request: ProfileRecommendationsRequest! - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: profileRecommendations(request: $request) { items { ...Profile @@ -277,12 +283,12 @@ query Following( $for: ProfileId! $limit: LimitType $cursor: Cursor - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: following(request: { for: $for, limit: $limit, cursor: $cursor }) { items { ...Profile @@ -297,12 +303,12 @@ query Followers( $of: ProfileId! $limit: LimitType $cursor: Cursor - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: followers(request: { of: $of, limit: $limit, cursor: $cursor }) { items { ...Profile @@ -318,12 +324,12 @@ query MutualFollowers( $viewing: ProfileId! $limit: LimitType $cursor: Cursor - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: mutualFollowers( request: { observer: $observer, viewing: $viewing, limit: $limit, cursor: $cursor } ) { @@ -338,12 +344,12 @@ query MutualFollowers( query WhoActedOnPublication( $request: WhoActedOnPublicationRequest! - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: whoActedOnPublication(request: $request) { items { ...Profile diff --git a/packages/api-bindings/src/lens/graphql/publication.graphql b/packages/api-bindings/src/lens/graphql/publication.graphql index c1b65997bb..d83003a1ab 100644 --- a/packages/api-bindings/src/lens/graphql/publication.graphql +++ b/packages/api-bindings/src/lens/graphql/publication.graphql @@ -12,16 +12,14 @@ fragment PublicationValidateMetadataResult on PublicationValidateMetadataResult # queries query Publication( $request: PublicationRequest! - $publicationImageTransform: ImageTransform = {} - $publicationOperationsActedArgs: PublicationOperationsActedArgs = {} - $publicationStatsInput: PublicationStatsInput! = {} - $publicationStatsCountOpenActionArgs: PublicationStatsCountOpenActionArgs! = {} - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $imageSmallSize: ImageTransform = {} + $imageMediumSize: ImageTransform = {} + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: publication(request: $request) { ... on Post { ...Post @@ -43,16 +41,14 @@ query Publications( $orderBy: PublicationsOrderByType $limit: LimitType $cursor: Cursor - $publicationImageTransform: ImageTransform = {} - $publicationOperationsActedArgs: PublicationOperationsActedArgs = {} - $publicationStatsInput: PublicationStatsInput! = {} - $publicationStatsCountOpenActionArgs: PublicationStatsCountOpenActionArgs! = {} - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $imageSmallSize: ImageTransform = {} + $imageMediumSize: ImageTransform = {} + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: publications( request: { where: $where, orderBy: $orderBy, limit: $limit, cursor: $cursor } ) { diff --git a/packages/api-bindings/src/lens/graphql/revenue.graphql b/packages/api-bindings/src/lens/graphql/revenue.graphql index 1408970fcc..25a4cc680d 100644 --- a/packages/api-bindings/src/lens/graphql/revenue.graphql +++ b/packages/api-bindings/src/lens/graphql/revenue.graphql @@ -26,16 +26,14 @@ fragment PublicationRevenue on PublicationRevenue { query RevenueFromPublications( $request: RevenueFromPublicationsRequest! - $publicationImageTransform: ImageTransform = {} - $publicationOperationsActedArgs: PublicationOperationsActedArgs = {} - $publicationStatsInput: PublicationStatsInput! = {} - $publicationStatsCountOpenActionArgs: PublicationStatsCountOpenActionArgs! = {} - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $imageSmallSize: ImageTransform = {} + $imageMediumSize: ImageTransform = {} + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: revenueFromPublications(request: $request) { items { ...PublicationRevenue @@ -48,22 +46,21 @@ query RevenueFromPublications( query RevenueFromPublication( $request: RevenueFromPublicationRequest! - $publicationImageTransform: ImageTransform = {} - $publicationOperationsActedArgs: PublicationOperationsActedArgs = {} - $publicationStatsInput: PublicationStatsInput! = {} - $publicationStatsCountOpenActionArgs: PublicationStatsCountOpenActionArgs! = {} - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $imageSmallSize: ImageTransform = {} + $imageMediumSize: ImageTransform = {} + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: revenueFromPublication(request: $request) { ...PublicationRevenue } } -query FollowRevenues($request: FollowRevenueRequest!, $rateRequest: RateRequest = { for: USD }) { +query FollowRevenues($request: FollowRevenueRequest!, $fxRateFor: SupportedFiatType = USD) { + ...InjectCommonQueryParams result: followRevenues(request: $request) { revenues { ...RevenueAggregate diff --git a/packages/api-bindings/src/lens/graphql/search.graphql b/packages/api-bindings/src/lens/graphql/search.graphql index a452a72971..d177fb04b4 100644 --- a/packages/api-bindings/src/lens/graphql/search.graphql +++ b/packages/api-bindings/src/lens/graphql/search.graphql @@ -3,16 +3,14 @@ query SearchPublications( $where: PublicationSearchWhere $limit: LimitType $cursor: Cursor - $publicationImageTransform: ImageTransform = {} - $publicationOperationsActedArgs: PublicationOperationsActedArgs = {} - $publicationStatsInput: PublicationStatsInput! = {} - $publicationStatsCountOpenActionArgs: PublicationStatsCountOpenActionArgs! = {} - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $imageSmallSize: ImageTransform = {} + $imageMediumSize: ImageTransform = {} + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: searchPublications( request: { query: $query, where: $where, cursor: $cursor, limit: $limit } ) { @@ -38,12 +36,12 @@ query SearchProfiles( $where: ProfileSearchWhere $limit: LimitType $cursor: Cursor - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { + ...InjectCommonQueryParams result: searchProfiles( request: { query: $query, where: $where, limit: $limit, cursor: $cursor } ) { diff --git a/packages/api-bindings/src/lens/graphql/wallet.graphql b/packages/api-bindings/src/lens/graphql/wallet.graphql index 3e35aa4c12..77b9625a81 100644 --- a/packages/api-bindings/src/lens/graphql/wallet.graphql +++ b/packages/api-bindings/src/lens/graphql/wallet.graphql @@ -15,11 +15,10 @@ query OwnedHandles($request: OwnedHandlesRequest!) { query ProfilesManaged( $request: ProfilesManagedRequest! - $profileCoverTransform: ImageTransform = {} - $profilePictureTransform: ImageTransform = {} - $profileStatsArg: ProfileStatsArg = {} - $profileStatsCountOpenActionArgs: ProfileStatsCountOpenActionArgs = {} - $rateRequest: RateRequest = { for: USD } + $profileCoverSize: ImageTransform = {} + $profilePictureSize: ImageTransform = {} + $activityOn: [AppId!] + $fxRateFor: SupportedFiatType = USD ) { result: profilesManaged(request: $request) { items { diff --git a/packages/api-bindings/src/lens/index.ts b/packages/api-bindings/src/lens/index.ts index de82bacb1b..a5b7a820da 100644 --- a/packages/api-bindings/src/lens/index.ts +++ b/packages/api-bindings/src/lens/index.ts @@ -8,10 +8,10 @@ export * from './graphql/generated'; export type { Digit, ImageSizeTransform, - MediaTransformParams, // overwrite the generated one + ImageTransform, // shadows the less type-safe generated ImageTransform Percentage, Pixel, -} from './ImageSizeTransform'; +} from './ImageTransform'; export * from './utils'; export type CursorBasedPaginatedResult = { diff --git a/packages/api-bindings/src/snapshot/__helpers__/queries.ts b/packages/api-bindings/src/snapshot/__helpers__/queries.ts index 76838b0721..2af1e20b4e 100644 --- a/packages/api-bindings/src/snapshot/__helpers__/queries.ts +++ b/packages/api-bindings/src/snapshot/__helpers__/queries.ts @@ -1,16 +1,6 @@ -import { MockedResponse } from '@apollo/client/testing'; +import { GetSnapshotProposalDocument, SnapshotProposal } from '../generated'; -import { - GetSnapshotProposalData, - GetSnapshotProposalDocument, - SnapshotProposal, -} from '../generated'; - -export function mockGetSnapshotProposalDataResponse({ - proposal, -}: { - proposal: SnapshotProposal; -}): MockedResponse { +export function mockGetSnapshotProposalDataResponse({ proposal }: { proposal: SnapshotProposal }) { return { request: { query: GetSnapshotProposalDocument, diff --git a/packages/react/package.json b/packages/react/package.json index c1812afaf6..84bf8e3683 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -35,7 +35,7 @@ }, "license": "MIT", "dependencies": { - "@apollo/client": "^3.7.1", + "@apollo/client": "^3.8.5", "@ethersproject/abstract-signer": "^5.7.0", "@ethersproject/address": "^5.7.0", "@ethersproject/bignumber": "^5.7.0", diff --git a/packages/react/src/__helpers__/setupHookTestScenario.ts b/packages/react/src/__helpers__/setupHookTestScenario.ts index 29de630574..64c08167af 100644 --- a/packages/react/src/__helpers__/setupHookTestScenario.ts +++ b/packages/react/src/__helpers__/setupHookTestScenario.ts @@ -2,7 +2,6 @@ import { MockedResponse } from '@apollo/client/testing'; import { mockLensApolloClient } from '@lens-protocol/api-bindings/mocks'; import { RenderHookResult } from '@testing-library/react'; -import { defaultMediaTransformsConfig } from '../mediaTransforms'; import { renderHookWithMocks } from './testing-library'; export function setupHookTestScenario(mocks: MockedResponse[]) { @@ -14,7 +13,6 @@ export function setupHookTestScenario(mocks: MockedResponse[]) { ): RenderHookResult { return renderHookWithMocks(callback, { mocks: { - mediaTransforms: defaultMediaTransformsConfig, apolloClient: client, }, }); diff --git a/packages/react/src/config.ts b/packages/react/src/config.ts index a64a235c59..00567897cb 100644 --- a/packages/react/src/config.ts +++ b/packages/react/src/config.ts @@ -1,9 +1,10 @@ -import { AppId } from '@lens-protocol/domain/entities'; +import { QueryParams } from '@lens-protocol/api-bindings/src/apollo/cache'; import { ILogger } from '@lens-protocol/shared-kernel'; import { IObservableStorageProvider, IStorageProvider } from '@lens-protocol/storage'; import { EnvironmentConfig } from './environments'; -import { MediaTransformsConfig } from './mediaTransforms'; + +export type { QueryParams }; /** * `` configuration @@ -31,20 +32,9 @@ export type LensConfig = { */ storage: IStorageProvider | IObservableStorageProvider; /** - * The `appId` identifies post and comment created from the SDK - * - * @defaultValue not set - * - * @see {@link appId} helper - */ - appId?: AppId; - - /** - * Media returned from the publication and profile queries can be transformed - * to sizes needed by the SDK consuming application. - * To overwrite default transformation values, provide a `mediaTransforms` object. + * The common query params allows you customize some aspect of the returned data. * - * @see {@link MediaTransformsConfig} for more information + * @defaultValue {@link defaultQueryParams} */ - mediaTransforms?: MediaTransformsConfig; + params?: QueryParams; }; diff --git a/packages/react/src/discovery/__tests__/useFeed.spec.ts b/packages/react/src/discovery/__tests__/useFeed.spec.ts index ac6e4f8b8f..45b14ad42d 100644 --- a/packages/react/src/discovery/__tests__/useFeed.spec.ts +++ b/packages/react/src/discovery/__tests__/useFeed.spec.ts @@ -8,10 +8,6 @@ import { mockProfileId } from '@lens-protocol/domain/mocks'; import { waitFor } from '@testing-library/react'; import { renderHookWithMocks } from '../../__helpers__/testing-library'; -import { - defaultMediaTransformsConfig, - mediaTransformConfigToQueryVariables, -} from '../../mediaTransforms'; import { useFeed } from '../useFeed'; function setupTestScenario({ items, where }: { where: FeedWhere; items: FeedItem[] }) { @@ -22,14 +18,12 @@ function setupTestScenario({ items, where }: { where: FeedWhere; items: FeedItem }), { mocks: { - mediaTransforms: defaultMediaTransformsConfig, apolloClient: mockLensApolloClient([ mockFeedResponse({ variables: { request: { where, }, - ...mediaTransformConfigToQueryVariables(defaultMediaTransformsConfig), }, items, }), diff --git a/packages/react/src/discovery/__tests__/useSearchProfiles.spec.ts b/packages/react/src/discovery/__tests__/useSearchProfiles.spec.ts index 7b45438ba3..1369fe7664 100644 --- a/packages/react/src/discovery/__tests__/useSearchProfiles.spec.ts +++ b/packages/react/src/discovery/__tests__/useSearchProfiles.spec.ts @@ -1,4 +1,4 @@ -import { Profile } from '@lens-protocol/api-bindings'; +import { LimitType, Profile } from '@lens-protocol/api-bindings'; import { mockLensApolloClient, mockProfileFragment, @@ -7,29 +7,16 @@ import { import { waitFor } from '@testing-library/react'; import { renderHookWithMocks } from '../../__helpers__/testing-library'; -import { - defaultMediaTransformsConfig, - mediaTransformConfigToQueryVariables, -} from '../../mediaTransforms'; -import { DEFAULT_PAGINATED_QUERY_LIMIT } from '../../utils'; import { UseSearchProfilesArgs, useSearchProfiles } from '../useSearchProfiles'; -function setupTestScenario({ - result, - query, - where, - limit, -}: UseSearchProfilesArgs & { result: Profile[] }) { - return renderHookWithMocks(() => useSearchProfiles({ query, where, limit }), { +function setupTestScenario({ result, ...args }: UseSearchProfilesArgs & { result: Profile[] }) { + return renderHookWithMocks(() => useSearchProfiles(args), { mocks: { - mediaTransforms: defaultMediaTransformsConfig, apolloClient: mockLensApolloClient([ mockSearchProfilesResponse({ variables: { - query, - where, - limit: limit ?? DEFAULT_PAGINATED_QUERY_LIMIT, - ...mediaTransformConfigToQueryVariables(defaultMediaTransformsConfig), + ...args, + limit: LimitType.Ten, }, items: result, }), diff --git a/packages/react/src/discovery/__tests__/useSearchPublications.spec.ts b/packages/react/src/discovery/__tests__/useSearchPublications.spec.ts index d3da8e56cd..01d46e7689 100644 --- a/packages/react/src/discovery/__tests__/useSearchPublications.spec.ts +++ b/packages/react/src/discovery/__tests__/useSearchPublications.spec.ts @@ -13,10 +13,6 @@ import { import { waitFor } from '@testing-library/react'; import { renderHookWithMocks } from '../../__helpers__/testing-library'; -import { - defaultMediaTransformsConfig, - mediaTransformConfigToQueryVariables, -} from '../../mediaTransforms'; import { UseSearchPublicationsArgs, useSearchPublications } from '../useSearchPublications'; function setupTestScenario({ @@ -27,13 +23,11 @@ function setupTestScenario({ }) { return renderHookWithMocks(() => useSearchPublications(args), { mocks: { - mediaTransforms: defaultMediaTransformsConfig, apolloClient: mockLensApolloClient([ mockSearchPublicationsResponse({ variables: { ...args, limit: LimitType.Ten, - ...mediaTransformConfigToQueryVariables(defaultMediaTransformsConfig), }, items: result, }), diff --git a/packages/react/src/discovery/useFeed.ts b/packages/react/src/discovery/useFeed.ts index ab547d07a2..b9d6ced8cd 100644 --- a/packages/react/src/discovery/useFeed.ts +++ b/packages/react/src/discovery/useFeed.ts @@ -1,6 +1,6 @@ import { FeedItem, FeedRequest, useFeed as useBaseFeedQuery } from '@lens-protocol/api-bindings'; -import { useLensApolloClient, useMediaTransformFromConfig } from '../helpers/arguments'; +import { useLensApolloClient } from '../helpers/arguments'; import { OmitCursor, PaginatedReadResult, usePaginatedReadResult } from '../helpers/reads'; export type UseFeedArgs = OmitCursor; @@ -45,9 +45,9 @@ export function useFeed({ where }: UseFeedArgs): PaginatedReadResult return usePaginatedReadResult( useBaseFeedQuery( useLensApolloClient({ - variables: useMediaTransformFromConfig({ + variables: { request: { where }, - }), + }, }), ), ); diff --git a/packages/react/src/discovery/useSearchProfiles.ts b/packages/react/src/discovery/useSearchProfiles.ts index c97ef5f576..dbf1a9bec6 100644 --- a/packages/react/src/discovery/useSearchProfiles.ts +++ b/packages/react/src/discovery/useSearchProfiles.ts @@ -4,7 +4,7 @@ import { useSearchProfiles as useBaseSearchProfiles, } from '@lens-protocol/api-bindings'; -import { useLensApolloClient, useMediaTransformFromConfig } from '../helpers/arguments'; +import { useLensApolloClient } from '../helpers/arguments'; import { PaginatedArgs, PaginatedReadResult, usePaginatedReadResult } from '../helpers/reads'; import { DEFAULT_PAGINATED_QUERY_LIMIT } from '../utils'; @@ -46,11 +46,11 @@ export function useSearchProfiles({ return usePaginatedReadResult( useBaseSearchProfiles( useLensApolloClient({ - variables: useMediaTransformFromConfig({ + variables: { query, where, limit, - }), + }, }), ), ); diff --git a/packages/react/src/discovery/useSearchPublications.ts b/packages/react/src/discovery/useSearchPublications.ts index 83c575fb93..4a98dd41e2 100644 --- a/packages/react/src/discovery/useSearchPublications.ts +++ b/packages/react/src/discovery/useSearchPublications.ts @@ -4,7 +4,7 @@ import { useSearchPublications as useBaseSearchPublications, } from '@lens-protocol/api-bindings'; -import { useLensApolloClient, useMediaTransformFromConfig } from '../helpers/arguments'; +import { useLensApolloClient } from '../helpers/arguments'; import { PaginatedArgs, PaginatedReadResult, usePaginatedReadResult } from '../helpers/reads'; import { DEFAULT_PAGINATED_QUERY_LIMIT } from '../utils'; @@ -81,11 +81,11 @@ export function useSearchPublications({ return usePaginatedReadResult( useBaseSearchPublications( useLensApolloClient({ - variables: useMediaTransformFromConfig({ + variables: { query, where, limit, - }), + }, }), ), ); diff --git a/packages/react/src/helpers/arguments.ts b/packages/react/src/helpers/arguments.ts index a32b643bad..8b82183878 100644 --- a/packages/react/src/helpers/arguments.ts +++ b/packages/react/src/helpers/arguments.ts @@ -1,7 +1,5 @@ -import { OperationVariables } from '@apollo/client'; -import { MediaTransformParams, SafeApolloClient } from '@lens-protocol/api-bindings'; +import { SafeApolloClient } from '@lens-protocol/api-bindings'; -import { mediaTransformConfigToQueryVariables } from '../mediaTransforms'; import { useSharedDependencies } from '../shared'; export type UseApolloClientResult = TOptions & { @@ -18,21 +16,3 @@ export function useLensApolloClient( client, }; } - -export type UseMediaTransformFromConfigResult = - TVariables & { - publicationImageTransform: MediaTransformParams; - profileCoverTransform: MediaTransformParams; - profilePictureTransform: MediaTransformParams; - }; - -export function useMediaTransformFromConfig( - variables: TVariables, -): UseMediaTransformFromConfigResult { - const { mediaTransforms } = useSharedDependencies(); - - return { - ...variables, - ...mediaTransformConfigToQueryVariables(mediaTransforms), - }; -} diff --git a/packages/react/src/helpers/reads.ts b/packages/react/src/helpers/reads.ts index c83e1f3811..4c70eacbfd 100644 --- a/packages/react/src/helpers/reads.ts +++ b/packages/react/src/helpers/reads.ts @@ -102,7 +102,7 @@ type InferResult> = T extends QueryData ? export function useReadResult< T extends QueryData, R = InferResult, - V = { [key: string]: never }, + V extends OperationVariables = { [key: string]: never }, >({ error, data }: ApolloQueryResult): ReadResult { return buildReadResult(data?.result, error); } diff --git a/packages/react/src/index.ts b/packages/react/src/index.ts index 5e44ee0cf2..ad159ebc41 100644 --- a/packages/react/src/index.ts +++ b/packages/react/src/index.ts @@ -21,14 +21,6 @@ export type { ChainType, EvmAddress, Url } from '@lens-protocol/shared-kernel'; */ export * from './chains'; export * from './environments'; -export type { - Digit, - ImageSizeTransform, - MediaTransformsConfig, - MediaTransformParams, - Percentage, - Pixel, -} from './mediaTransforms'; export type { LensConfig } from './config'; /** diff --git a/packages/react/src/mediaTransforms.ts b/packages/react/src/mediaTransforms.ts deleted file mode 100644 index 7718385175..0000000000 --- a/packages/react/src/mediaTransforms.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { - Digit, - ImageSizeTransform, - MediaTransformParams, - Percentage, - Pixel, -} from '@lens-protocol/api-bindings'; - -export type { Digit, ImageSizeTransform, MediaTransformParams, Percentage, Pixel }; - -/** - * The media transforms configuration. - */ -export type MediaTransformsConfig = { - publication: { - medium: MediaTransformParams; - }; - profile: { - thumbnail: MediaTransformParams; - cover: MediaTransformParams; - }; -}; - -function buildMediaTransform( - width: ImageSizeTransform, - height: ImageSizeTransform = 'auto', -): MediaTransformParams { - return { - width, - height, - keepAspectRatio: true, - }; -} - -export const defaultMediaTransformsConfig: MediaTransformsConfig = { - publication: { - medium: buildMediaTransform('700px'), - }, - profile: { - thumbnail: buildMediaTransform('256px'), - cover: buildMediaTransform('1100px'), - }, -}; - -export function mediaTransformConfigToQueryVariables(config: MediaTransformsConfig) { - return { - publicationImageTransform: config.publication.medium, - profileCoverTransform: config.profile.cover, - profilePictureTransform: config.profile.thumbnail, - }; -} diff --git a/packages/react/src/profile/__tests__/useMutualFollowers.spec.ts b/packages/react/src/profile/__tests__/useMutualFollowers.spec.ts index 304ec54354..9892d125cc 100644 --- a/packages/react/src/profile/__tests__/useMutualFollowers.spec.ts +++ b/packages/react/src/profile/__tests__/useMutualFollowers.spec.ts @@ -8,10 +8,6 @@ import { mockProfileId } from '@lens-protocol/domain/mocks'; import { waitFor } from '@testing-library/react'; import { setupHookTestScenario } from '../../__helpers__/setupHookTestScenario'; -import { - defaultMediaTransformsConfig, - mediaTransformConfigToQueryVariables, -} from '../../mediaTransforms'; import { UseMutualFollowersArgs, useMutualFollowers } from '../useMutualFollowers'; describe(`Given the ${useMutualFollowers.name} hook`, () => { @@ -32,7 +28,6 @@ describe(`Given the ${useMutualFollowers.name} hook`, () => { observer: observerProfileId, viewing: viewingProfileId, limit: LimitType.Ten, - ...mediaTransformConfigToQueryVariables(defaultMediaTransformsConfig), }, items: profiles, }), diff --git a/packages/react/src/profile/__tests__/useProfileFollowers.spec.ts b/packages/react/src/profile/__tests__/useProfileFollowers.spec.ts index 2b4123096f..d3098fa5db 100644 --- a/packages/react/src/profile/__tests__/useProfileFollowers.spec.ts +++ b/packages/react/src/profile/__tests__/useProfileFollowers.spec.ts @@ -8,10 +8,6 @@ import { mockProfileId } from '@lens-protocol/domain/mocks'; import { waitFor } from '@testing-library/react'; import { setupHookTestScenario } from '../../__helpers__/setupHookTestScenario'; -import { - defaultMediaTransformsConfig, - mediaTransformConfigToQueryVariables, -} from '../../mediaTransforms'; import { UseProfileFollowersArgs, useProfileFollowers } from '../useProfileFollowers'; describe(`Given the ${useProfileFollowers.name} hook`, () => { @@ -30,7 +26,6 @@ describe(`Given the ${useProfileFollowers.name} hook`, () => { variables: { of: profileId, limit: LimitType.Ten, - ...mediaTransformConfigToQueryVariables(defaultMediaTransformsConfig), }, items: profiles, }), diff --git a/packages/react/src/profile/__tests__/useProfileFollowing.spec.ts b/packages/react/src/profile/__tests__/useProfileFollowing.spec.ts index e3aa28da60..a6169ecb2f 100644 --- a/packages/react/src/profile/__tests__/useProfileFollowing.spec.ts +++ b/packages/react/src/profile/__tests__/useProfileFollowing.spec.ts @@ -8,10 +8,6 @@ import { mockProfileId } from '@lens-protocol/domain/mocks'; import { waitFor } from '@testing-library/react'; import { setupHookTestScenario } from '../../__helpers__/setupHookTestScenario'; -import { - defaultMediaTransformsConfig, - mediaTransformConfigToQueryVariables, -} from '../../mediaTransforms'; import { UseProfileFollowingArgs, useProfileFollowing } from '../useProfileFollowing'; describe(`Given the ${useProfileFollowing.name} hook`, () => { @@ -30,7 +26,6 @@ describe(`Given the ${useProfileFollowing.name} hook`, () => { variables: { for: profileId, limit: LimitType.Ten, - ...mediaTransformConfigToQueryVariables(defaultMediaTransformsConfig), }, items: profiles, }), diff --git a/packages/react/src/profile/__tests__/useProfiles.spec.ts b/packages/react/src/profile/__tests__/useProfiles.spec.ts index 17677352c9..fef00c2f9f 100644 --- a/packages/react/src/profile/__tests__/useProfiles.spec.ts +++ b/packages/react/src/profile/__tests__/useProfiles.spec.ts @@ -10,10 +10,6 @@ import { mockEvmAddress } from '@lens-protocol/shared-kernel/mocks'; import { waitFor } from '@testing-library/react'; import { setupHookTestScenario } from '../../__helpers__/setupHookTestScenario'; -import { - defaultMediaTransformsConfig, - mediaTransformConfigToQueryVariables, -} from '../../mediaTransforms'; import { UseProfilesArgs, useProfiles } from '../useProfiles'; describe(`Given the ${useProfiles.name} hook`, () => { @@ -34,7 +30,6 @@ describe(`Given the ${useProfiles.name} hook`, () => { ownedBy: [evmAddress], }, limit: LimitType.Ten, - ...mediaTransformConfigToQueryVariables(defaultMediaTransformsConfig), }, items: profiles, }), @@ -49,49 +44,47 @@ describe(`Given the ${useProfiles.name} hook`, () => { await waitFor(() => expect(result.current.loading).toBeFalsy()); expect(result.current.data).toMatchObject(expectations); }); + }); - describe(`when re-rendered`, () => { - const initialPageInfo = mockPaginatedResultInfo({ prev: mockCursor() }); + describe(`when re-rendered`, () => { + const initialPageInfo = mockPaginatedResultInfo({ prev: mockCursor() }); - const { renderHook } = setupHookTestScenario([ - mockProfilesResponse({ - variables: { - where: { - ownedBy: [evmAddress], - }, - limit: LimitType.Ten, - ...mediaTransformConfigToQueryVariables(defaultMediaTransformsConfig), + const { renderHook } = setupHookTestScenario([ + mockProfilesResponse({ + variables: { + where: { + ownedBy: [evmAddress], }, - items: profiles, - info: initialPageInfo, - }), + limit: LimitType.Ten, + }, + items: profiles, + info: initialPageInfo, + }), - mockProfilesResponse({ - variables: { - where: { - ownedBy: [evmAddress], - }, - limit: LimitType.Ten, - cursor: initialPageInfo.prev, - ...mediaTransformConfigToQueryVariables(defaultMediaTransformsConfig), + mockProfilesResponse({ + variables: { + where: { + ownedBy: [evmAddress], }, - items: [mockProfileFragment()], - }), - ]); + limit: LimitType.Ten, + cursor: initialPageInfo.prev, + }, + items: [mockProfileFragment()], + }), + ]); - it(`should return cached data and then update the 'beforeCount' if new results are available`, async () => { - const first = renderHook(() => useProfiles({ where: { ownedBy: [evmAddress] } })); - await waitFor(() => expect(first.result.current.loading).toBeFalsy()); + it(`should return cached data and then update the 'beforeCount' if new results are available`, async () => { + const first = renderHook(() => useProfiles({ where: { ownedBy: [evmAddress] } })); + await waitFor(() => expect(first.result.current.loading).toBeFalsy()); - const second = renderHook(() => useProfiles({ where: { ownedBy: [evmAddress] } })); + const second = renderHook(() => useProfiles({ where: { ownedBy: [evmAddress] } })); - expect(second.result.current).toMatchObject({ - data: expectations, - loading: false, - }); - - await waitFor(() => expect(second.result.current.beforeCount).toEqual(1)); + expect(second.result.current).toMatchObject({ + data: expectations, + loading: false, }); + + await waitFor(() => expect(second.result.current.beforeCount).toEqual(1)); }); }); }); diff --git a/packages/react/src/profile/useMutualFollowers.ts b/packages/react/src/profile/useMutualFollowers.ts index 5cfcccf784..4261e5af6b 100644 --- a/packages/react/src/profile/useMutualFollowers.ts +++ b/packages/react/src/profile/useMutualFollowers.ts @@ -5,7 +5,7 @@ import { useMutualFollowers as useMutualFollowersHook, } from '@lens-protocol/api-bindings'; -import { useLensApolloClient, useMediaTransformFromConfig } from '../helpers/arguments'; +import { useLensApolloClient } from '../helpers/arguments'; import { PaginatedArgs, PaginatedReadResult, usePaginatedReadResult } from '../helpers/reads'; /** @@ -35,11 +35,11 @@ export function useMutualFollowers({ return usePaginatedReadResult( useMutualFollowersHook( useLensApolloClient({ - variables: useMediaTransformFromConfig({ + variables: { observer, viewing, limit, - }), + }, }), ), ); diff --git a/packages/react/src/profile/useProfile.ts b/packages/react/src/profile/useProfile.ts index f17425ef32..b096c71602 100644 --- a/packages/react/src/profile/useProfile.ts +++ b/packages/react/src/profile/useProfile.ts @@ -7,7 +7,7 @@ import { import { invariant, OneOf } from '@lens-protocol/shared-kernel'; import { NotFoundError } from '../NotFoundError'; -import { useLensApolloClient, useMediaTransformFromConfig } from '../helpers/arguments'; +import { useLensApolloClient } from '../helpers/arguments'; import { ReadResult, useReadResult } from '../helpers/reads'; /** @@ -35,12 +35,12 @@ export function useProfile({ const { data, error, loading } = useReadResult( useProfileHook( useLensApolloClient({ - variables: useMediaTransformFromConfig({ + variables: { request: { ...(forHandle && { forHandle }), ...(forProfileId && { forProfileId }), }, - }), + }, fetchPolicy: 'cache-and-network', nextFetchPolicy: 'cache-first', }), diff --git a/packages/react/src/profile/useProfileFollowers.ts b/packages/react/src/profile/useProfileFollowers.ts index 47d165e371..3f46332865 100644 --- a/packages/react/src/profile/useProfileFollowers.ts +++ b/packages/react/src/profile/useProfileFollowers.ts @@ -5,7 +5,7 @@ import { useFollowers as useFollowersHook, } from '@lens-protocol/api-bindings'; -import { useLensApolloClient, useMediaTransformFromConfig } from '../helpers/arguments'; +import { useLensApolloClient } from '../helpers/arguments'; import { PaginatedArgs, PaginatedReadResult, usePaginatedReadResult } from '../helpers/reads'; /** @@ -33,10 +33,10 @@ export function useProfileFollowers({ return usePaginatedReadResult( useFollowersHook( useLensApolloClient({ - variables: useMediaTransformFromConfig({ + variables: { of, limit, - }), + }, }), ), ); diff --git a/packages/react/src/profile/useProfileFollowing.ts b/packages/react/src/profile/useProfileFollowing.ts index adcd074024..b52e01ab53 100644 --- a/packages/react/src/profile/useProfileFollowing.ts +++ b/packages/react/src/profile/useProfileFollowing.ts @@ -5,7 +5,7 @@ import { useFollowing as useFollowingHook, } from '@lens-protocol/api-bindings'; -import { useLensApolloClient, useMediaTransformFromConfig } from '../helpers/arguments'; +import { useLensApolloClient } from '../helpers/arguments'; import { PaginatedArgs, PaginatedReadResult, usePaginatedReadResult } from '../helpers/reads'; /** @@ -33,10 +33,10 @@ export function useProfileFollowing({ return usePaginatedReadResult( useFollowingHook( useLensApolloClient({ - variables: useMediaTransformFromConfig({ + variables: { for: forId, limit, - }), + }, }), ), ); diff --git a/packages/react/src/profile/useProfiles.ts b/packages/react/src/profile/useProfiles.ts index 44da5d0775..da645220fe 100644 --- a/packages/react/src/profile/useProfiles.ts +++ b/packages/react/src/profile/useProfiles.ts @@ -4,7 +4,7 @@ import { useProfiles as useProfilesHook, } from '@lens-protocol/api-bindings'; -import { useLensApolloClient, useMediaTransformFromConfig } from '../helpers/arguments'; +import { useLensApolloClient } from '../helpers/arguments'; import { PaginatedArgs, PaginatedReadResult, usePaginatedReadResult } from '../helpers/reads'; import { DEFAULT_PAGINATED_QUERY_LIMIT } from '../utils'; @@ -86,10 +86,10 @@ export function useProfiles({ return usePaginatedReadResult( useProfilesHook( useLensApolloClient({ - variables: useMediaTransformFromConfig({ + variables: { where, limit, - }), + }, }), ), ); diff --git a/packages/react/src/publication/__tests__/usePublications.spec.ts b/packages/react/src/publication/__tests__/usePublications.spec.ts index 15afe9f811..c7776f40de 100644 --- a/packages/react/src/publication/__tests__/usePublications.spec.ts +++ b/packages/react/src/publication/__tests__/usePublications.spec.ts @@ -10,10 +10,6 @@ import { mockProfileId } from '@lens-protocol/domain/mocks'; import { waitFor } from '@testing-library/react'; import { setupHookTestScenario } from '../../__helpers__/setupHookTestScenario'; -import { - defaultMediaTransformsConfig, - mediaTransformConfigToQueryVariables, -} from '../../mediaTransforms'; import { UsePublicationsArgs, usePublications } from '../usePublications'; describe(`Given the ${usePublications.name} hook`, () => { @@ -35,7 +31,6 @@ describe(`Given the ${usePublications.name} hook`, () => { }, orderBy: PublicationsOrderByType.Latest, limit: LimitType.Ten, - ...mediaTransformConfigToQueryVariables(defaultMediaTransformsConfig), }, items: publications, }), @@ -61,7 +56,6 @@ describe(`Given the ${usePublications.name} hook`, () => { }, orderBy: PublicationsOrderByType.Latest, limit: LimitType.Fifty, - ...mediaTransformConfigToQueryVariables(defaultMediaTransformsConfig), }, items: publications, }), @@ -90,7 +84,6 @@ describe(`Given the ${usePublications.name} hook`, () => { }, orderBy: PublicationsOrderByType.Latest, limit: LimitType.Ten, - ...mediaTransformConfigToQueryVariables(defaultMediaTransformsConfig), }, items: publications, info: initialPageInfo, @@ -104,7 +97,6 @@ describe(`Given the ${usePublications.name} hook`, () => { orderBy: PublicationsOrderByType.Latest, limit: LimitType.Ten, cursor: initialPageInfo.prev, - ...mediaTransformConfigToQueryVariables(defaultMediaTransformsConfig), }, items: [mockPostFragment()], }), diff --git a/packages/react/src/publication/usePublication.ts b/packages/react/src/publication/usePublication.ts index bf977c6936..162e1b0974 100644 --- a/packages/react/src/publication/usePublication.ts +++ b/packages/react/src/publication/usePublication.ts @@ -7,7 +7,7 @@ import { import { OneOf, invariant } from '@lens-protocol/shared-kernel'; import { NotFoundError } from '../NotFoundError'; -import { useLensApolloClient, useMediaTransformFromConfig } from '../helpers/arguments'; +import { useLensApolloClient } from '../helpers/arguments'; import { ReadResult, useReadResult } from '../helpers/reads'; /** @@ -33,12 +33,12 @@ export function usePublication({ const { data, error, loading } = useReadResult( usePublicationHook( useLensApolloClient({ - variables: useMediaTransformFromConfig({ + variables: { request: { ...(forId && { forId }), ...(forTxHash && { forTxHash }), }, - }), + }, fetchPolicy: 'cache-and-network', nextFetchPolicy: 'cache-first', }), diff --git a/packages/react/src/publication/usePublications.ts b/packages/react/src/publication/usePublications.ts index 2d701aa6be..65216b8023 100644 --- a/packages/react/src/publication/usePublications.ts +++ b/packages/react/src/publication/usePublications.ts @@ -5,7 +5,7 @@ import { usePublications as usePublicationsBase, } from '@lens-protocol/api-bindings'; -import { useLensApolloClient, useMediaTransformFromConfig } from '../helpers/arguments'; +import { useLensApolloClient } from '../helpers/arguments'; import { PaginatedArgs, PaginatedReadResult, usePaginatedReadResult } from '../helpers/reads'; import { DEFAULT_PAGINATED_QUERY_LIMIT } from '../utils'; @@ -93,11 +93,11 @@ export function usePublications({ return usePaginatedReadResult( usePublicationsBase( useLensApolloClient({ - variables: useMediaTransformFromConfig({ + variables: { where, limit, orderBy, - }), + }, }), ), ); diff --git a/packages/react/src/shared.tsx b/packages/react/src/shared.tsx index c20033ae36..f5d3283295 100644 --- a/packages/react/src/shared.tsx +++ b/packages/react/src/shared.tsx @@ -1,4 +1,8 @@ -import { createLensApolloClient, SafeApolloClient } from '@lens-protocol/api-bindings'; +import { + createLensApolloClient, + SafeApolloClient, + defaultQueryParams, +} from '@lens-protocol/api-bindings'; import { AppId } from '@lens-protocol/domain/entities'; import { ILogger, invariant } from '@lens-protocol/shared-kernel'; import React, { ReactNode, useContext } from 'react'; @@ -6,19 +10,16 @@ import React, { ReactNode, useContext } from 'react'; import { ConsoleLogger } from './ConsoleLogger'; import { LensConfig } from './config'; import { EnvironmentConfig } from './environments'; -import { defaultMediaTransformsConfig, MediaTransformsConfig } from './mediaTransforms'; export type SharedDependencies = { apolloClient: SafeApolloClient; appId?: AppId; environment: EnvironmentConfig; logger: ILogger; - mediaTransforms: MediaTransformsConfig; }; export function createSharedDependencies(config: LensConfig): SharedDependencies { const logger = config.logger ?? new ConsoleLogger(); - const mediaTransforms = config.mediaTransforms ?? defaultMediaTransformsConfig; const accessTokenStorage = { getAccessToken() { @@ -31,6 +32,7 @@ export function createSharedDependencies(config: LensConfig): SharedDependencies // apollo client const apolloClient = createLensApolloClient({ + queryParams: config.params ?? defaultQueryParams, backendURL: config.environment.backend, accessTokenStorage, pollingInterval: config.environment.timings.pollingInterval, @@ -40,10 +42,8 @@ export function createSharedDependencies(config: LensConfig): SharedDependencies return { apolloClient, - appId: config.appId, environment: config.environment, logger, - mediaTransforms, }; } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e5995ecb2b..7e1b54b647 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -311,9 +311,6 @@ importers: packages/api-bindings: dependencies: - '@apollo/client': - specifier: ^3.7.1 - version: 3.7.1(graphql@16.6.0)(react-dom@18.2.0)(react@18.2.0) '@lens-protocol/domain': specifier: workspace:* version: link:../domain @@ -330,6 +327,9 @@ importers: specifier: ^2.5.0 version: 2.5.0 devDependencies: + '@apollo/client': + specifier: ^3.8.5 + version: 3.8.5(graphql@16.6.0)(react-dom@18.2.0)(react@18.2.0) '@babel/core': specifier: ^7.20.12 version: 7.20.12 @@ -916,8 +916,8 @@ importers: packages/react: dependencies: '@apollo/client': - specifier: ^3.7.1 - version: 3.7.1(graphql@16.7.1)(react-dom@18.2.0)(react@18.2.0) + specifier: ^3.8.5 + version: 3.8.5(graphql@16.7.1)(react-dom@18.2.0)(react@18.2.0) '@ethersproject/abstract-signer': specifier: ^5.7.0 version: 5.7.0 @@ -1509,7 +1509,7 @@ packages: '@jridgewell/gen-mapping': 0.3.3 '@jridgewell/trace-mapping': 0.3.19 - /@apollo/client@3.7.1(graphql@16.6.0)(react-dom@18.2.0)(react@18.2.0): + /@apollo/client@3.7.1(graphql@16.7.1)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-xu5M/l7p9gT9Fx7nF3AQivp0XukjB7TM7tOd5wifIpI8RskYveL4I+rpTijzWrnqCPZabkbzJKH7WEAKdctt9w==} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 @@ -1527,12 +1527,12 @@ packages: subscriptions-transport-ws: optional: true dependencies: - '@graphql-typed-document-node/core': 3.2.0(graphql@16.6.0) + '@graphql-typed-document-node/core': 3.2.0(graphql@16.7.1) '@wry/context': 0.7.0 '@wry/equality': 0.5.3 '@wry/trie': 0.3.2 - graphql: 16.6.0 - graphql-tag: 2.12.6(graphql@16.6.0) + graphql: 16.7.1 + graphql-tag: 2.12.6(graphql@16.7.1) hoist-non-react-statics: 3.3.2 optimism: 0.16.2 prop-types: 15.8.1 @@ -1545,8 +1545,44 @@ packages: zen-observable-ts: 1.2.5 dev: false - /@apollo/client@3.7.1(graphql@16.7.1)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-xu5M/l7p9gT9Fx7nF3AQivp0XukjB7TM7tOd5wifIpI8RskYveL4I+rpTijzWrnqCPZabkbzJKH7WEAKdctt9w==} + /@apollo/client@3.8.5(graphql@16.6.0)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-/ueWC3f1pFeH+tWbM1phz6pzUGGijyml6oQ+LKUcQzpXF6tVFPrb6oUIUQCbZpr6Xmv/dtNiFDohc39ra7Solg==} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 + graphql-ws: ^5.5.5 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + subscriptions-transport-ws: ^0.9.0 || ^0.11.0 + peerDependenciesMeta: + graphql-ws: + optional: true + react: + optional: true + react-dom: + optional: true + subscriptions-transport-ws: + optional: true + dependencies: + '@graphql-typed-document-node/core': 3.2.0(graphql@16.6.0) + '@wry/context': 0.7.3 + '@wry/equality': 0.5.6 + '@wry/trie': 0.4.3 + graphql: 16.6.0 + graphql-tag: 2.12.6(graphql@16.6.0) + hoist-non-react-statics: 3.3.2 + optimism: 0.17.5 + prop-types: 15.8.1 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + response-iterator: 0.2.6 + symbol-observable: 4.0.0 + ts-invariant: 0.10.3 + tslib: 2.6.2 + zen-observable-ts: 1.2.5 + dev: true + + /@apollo/client@3.8.5(graphql@16.7.1)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-/ueWC3f1pFeH+tWbM1phz6pzUGGijyml6oQ+LKUcQzpXF6tVFPrb6oUIUQCbZpr6Xmv/dtNiFDohc39ra7Solg==} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 graphql-ws: ^5.5.5 @@ -1564,20 +1600,20 @@ packages: optional: true dependencies: '@graphql-typed-document-node/core': 3.2.0(graphql@16.7.1) - '@wry/context': 0.7.0 - '@wry/equality': 0.5.3 - '@wry/trie': 0.3.2 + '@wry/context': 0.7.3 + '@wry/equality': 0.5.6 + '@wry/trie': 0.4.3 graphql: 16.7.1 graphql-tag: 2.12.6(graphql@16.7.1) hoist-non-react-statics: 3.3.2 - optimism: 0.16.2 + optimism: 0.17.5 prop-types: 15.8.1 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) response-iterator: 0.2.6 symbol-observable: 4.0.0 ts-invariant: 0.10.3 - tslib: 2.6.1 + tslib: 2.6.2 zen-observable-ts: 1.2.5 /@ardatan/relay-compiler@12.0.0(graphql@16.6.0): @@ -6093,7 +6129,7 @@ packages: '@graphql-tools/utils': 9.2.1(graphql@16.6.0) dataloader: 2.2.2 graphql: 16.6.0 - tslib: 2.6.1 + tslib: 2.6.2 value-or-promise: 1.0.12 dev: true @@ -6105,7 +6141,7 @@ packages: '@graphql-tools/utils': 9.2.1(graphql@16.7.1) dataloader: 2.2.2 graphql: 16.7.1 - tslib: 2.6.1 + tslib: 2.6.2 value-or-promise: 1.0.12 dev: true @@ -6118,7 +6154,7 @@ packages: '@graphql-tools/utils': 10.0.5(graphql@16.7.1) dataloader: 2.2.2 graphql: 16.7.1 - tslib: 2.6.1 + tslib: 2.6.2 value-or-promise: 1.0.12 dev: true @@ -6397,7 +6433,7 @@ packages: '@graphql-typed-document-node/core': 3.1.1(graphql@16.6.0) '@repeaterjs/repeater': 3.0.4 graphql: 16.6.0 - tslib: 2.6.1 + tslib: 2.6.2 value-or-promise: 1.0.12 dev: true @@ -6410,7 +6446,7 @@ packages: '@graphql-typed-document-node/core': 3.1.1(graphql@16.7.1) '@repeaterjs/repeater': 3.0.4 graphql: 16.7.1 - tslib: 2.6.1 + tslib: 2.6.2 value-or-promise: 1.0.12 dev: true @@ -6424,7 +6460,7 @@ packages: '@graphql-typed-document-node/core': 3.2.0(graphql@16.7.1) '@repeaterjs/repeater': 3.0.4 graphql: 16.7.1 - tslib: 2.6.1 + tslib: 2.6.2 value-or-promise: 1.0.12 dev: true @@ -7213,6 +7249,7 @@ packages: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: graphql: 16.6.0 + dev: true /@graphql-typed-document-node/core@3.2.0(graphql@16.7.1): resolution: {integrity: sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==} @@ -7763,7 +7800,7 @@ packages: '@faker-js/faker': optional: true dependencies: - '@apollo/client': 3.7.1(graphql@16.7.1)(react-dom@18.2.0)(react@18.2.0) + '@apollo/client': 3.8.5(graphql@16.7.1)(react-dom@18.2.0)(react@18.2.0) '@lens-protocol/domain': 0.10.1(ethers@5.7.2)(jest-mock-extended@3.0.1)(jest-when@3.5.2) '@lens-protocol/shared-kernel': 0.10.0(ethers@5.7.2) graphql: 16.7.1 @@ -7789,7 +7826,7 @@ packages: '@faker-js/faker': optional: true dependencies: - '@apollo/client': 3.7.1(graphql@16.7.1)(react-dom@18.2.0)(react@18.2.0) + '@apollo/client': 3.8.5(graphql@16.7.1)(react-dom@18.2.0)(react@18.2.0) '@lens-protocol/domain': 0.10.1(jest-mock-extended@3.0.1)(jest-when@3.5.2) '@lens-protocol/shared-kernel': 0.10.0(ethers@5.7.2) graphql: 16.7.1 @@ -8133,7 +8170,7 @@ packages: ethers: ^5.7.2 || 5.7.2 react: ^18.2.0 dependencies: - '@apollo/client': 3.7.1(graphql@16.7.1)(react-dom@18.2.0)(react@18.2.0) + '@apollo/client': 3.8.5(graphql@16.7.1)(react-dom@18.2.0)(react@18.2.0) '@ethersproject/abstract-signer': 5.7.0 '@ethersproject/providers': 5.7.2 '@lens-protocol/api-bindings': 0.10.1(ethers@5.7.2)(react-dom@18.2.0)(react@18.2.0) @@ -8180,7 +8217,7 @@ packages: ethers: ^5.7.2 || 5.7.2 react: ^18.2.0 dependencies: - '@apollo/client': 3.7.1(graphql@16.7.1)(react-dom@18.2.0)(react@18.2.0) + '@apollo/client': 3.8.5(graphql@16.7.1)(react-dom@18.2.0)(react@18.2.0) '@ethersproject/abstract-signer': 5.7.0 '@ethersproject/providers': 5.7.2 '@lens-protocol/api-bindings': 0.10.1(jest-mock-extended@3.0.1)(jest-when@3.5.2)(react-dom@18.2.0)(react@18.2.0) @@ -8227,7 +8264,7 @@ packages: ethers: ^5.7.2 || 5.7.2 react: ^18.2.0 dependencies: - '@apollo/client': 3.7.1(graphql@16.7.1)(react-dom@18.2.0)(react@18.2.0) + '@apollo/client': 3.8.5(graphql@16.7.1)(react-dom@18.2.0)(react@18.2.0) '@ethersproject/abstract-signer': 5.7.0 '@ethersproject/providers': 5.7.2 '@lens-protocol/api-bindings': 0.10.1(jest-mock-extended@3.0.1)(jest-when@3.5.2)(react-dom@18.2.0)(react@18.2.0) @@ -8633,7 +8670,7 @@ packages: '@motionone/easing': 10.15.1 '@motionone/types': 10.15.1 '@motionone/utils': 10.15.1 - tslib: 2.6.1 + tslib: 2.6.2 /@motionone/dom@10.16.2: resolution: {integrity: sha512-bnuHdNbge1FutZXv+k7xub9oPWcF0hsu8y1HTH/qg6av58YI0VufZ3ngfC7p2xhMJMnoh0LXFma2EGTgPeCkeg==} @@ -8643,26 +8680,26 @@ packages: '@motionone/types': 10.15.1 '@motionone/utils': 10.15.1 hey-listen: 1.0.8 - tslib: 2.6.1 + tslib: 2.6.2 /@motionone/easing@10.15.1: resolution: {integrity: sha512-6hIHBSV+ZVehf9dcKZLT7p5PEKHGhDwky2k8RKkmOvUoYP3S+dXsKupyZpqx5apjd9f+php4vXk4LuS+ADsrWw==} dependencies: '@motionone/utils': 10.15.1 - tslib: 2.6.1 + tslib: 2.6.2 /@motionone/generators@10.15.1: resolution: {integrity: sha512-67HLsvHJbw6cIbLA/o+gsm7h+6D4Sn7AUrB/GPxvujse1cGZ38F5H7DzoH7PhX+sjvtDnt2IhFYF2Zp1QTMKWQ==} dependencies: '@motionone/types': 10.15.1 '@motionone/utils': 10.15.1 - tslib: 2.6.1 + tslib: 2.6.2 /@motionone/svelte@10.16.2: resolution: {integrity: sha512-38xsroKrfK+aHYhuQlE6eFcGy0EwrB43Q7RGjF73j/kRUTcLNu/LAaKiLLsN5lyqVzCgTBVt4TMT/ShWbTbc5Q==} dependencies: '@motionone/dom': 10.16.2 - tslib: 2.6.1 + tslib: 2.6.2 /@motionone/types@10.15.1: resolution: {integrity: sha512-iIUd/EgUsRZGrvW0jqdst8st7zKTzS9EsKkP+6c6n4MPZoQHwiHuVtTQLD6Kp0bsBLhNzKIBlHXponn/SDT4hA==} @@ -8672,13 +8709,13 @@ packages: dependencies: '@motionone/types': 10.15.1 hey-listen: 1.0.8 - tslib: 2.6.1 + tslib: 2.6.2 /@motionone/vue@10.16.2: resolution: {integrity: sha512-7/dEK/nWQXOkJ70bqb2KyNfSWbNvWqKKq1C8juj+0Mg/AorgD8O5wE3naddK0G+aXuNMqRuc4jlsYHHWHtIzVw==} dependencies: '@motionone/dom': 10.16.2 - tslib: 2.6.1 + tslib: 2.6.2 /@mxssfd/typedoc-theme@1.1.3(typedoc@0.25.1): resolution: {integrity: sha512-/yP5rqhvibMpzXpmw0YLLRCpoj3uVWWlwyJseZXzGxTfiA6/fd1uubUqNoQAi2U19atMDonq8mQc+hlVctrX4g==} @@ -8733,7 +8770,7 @@ packages: borsh: 0.7.0 http-errors: 1.8.1 optionalDependencies: - node-fetch: 2.6.12 + node-fetch: 2.7.0 transitivePeerDependencies: - encoding @@ -8966,14 +9003,14 @@ packages: dependencies: asn1js: 3.0.5 pvtsutils: 1.3.3 - tslib: 2.6.1 + tslib: 2.6.2 dev: true /@peculiar/json-schema@1.1.12: resolution: {integrity: sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==} engines: {node: '>=8.0.0'} dependencies: - tslib: 2.6.1 + tslib: 2.6.2 dev: true /@peculiar/webcrypto@1.4.3: @@ -8999,7 +9036,7 @@ packages: open: 8.4.1 picocolors: 1.0.0 tiny-glob: 0.2.9 - tslib: 2.6.1 + tslib: 2.6.2 /@preconstruct/cli@2.3.0: resolution: {integrity: sha512-us4qOb1ocxGyvCj9vIg4Nc9Ylz2EKetFuxWyuFmuW+jg9NSdr3j9tUKQcNbPAW53jtslYdEKrRepDUoGK5oGFA==} @@ -10750,7 +10787,7 @@ packages: busboy: 1.6.0 fast-querystring: 1.1.2 fast-url-parser: 1.1.3 - tslib: 2.6.1 + tslib: 2.6.2 dev: true /@wry/context@0.7.0: @@ -10758,18 +10795,39 @@ packages: engines: {node: '>=8'} dependencies: tslib: 2.6.1 + dev: false + + /@wry/context@0.7.3: + resolution: {integrity: sha512-Nl8WTesHp89RF803Se9X3IiHjdmLBrIvPMaJkl+rKVJAYyPsz1TEUbu89943HpvujtSJgDUx9W4vZw3K1Mr3sA==} + engines: {node: '>=8'} + dependencies: + tslib: 2.6.2 /@wry/equality@0.5.3: resolution: {integrity: sha512-avR+UXdSrsF2v8vIqIgmeTY0UR91UT+IyablCyKe/uk22uOJ8fusKZnH9JH9e1/EtLeNJBtagNmL3eJdnOV53g==} engines: {node: '>=8'} dependencies: tslib: 2.6.1 + dev: false + + /@wry/equality@0.5.6: + resolution: {integrity: sha512-D46sfMTngaYlrH+OspKf8mIJETntFnf6Hsjb0V41jAXJ7Bx2kB8Rv8RCUujuVWYttFtHkUNp7g+FwxNQAr6mXA==} + engines: {node: '>=8'} + dependencies: + tslib: 2.6.2 /@wry/trie@0.3.2: resolution: {integrity: sha512-yRTyhWSls2OY/pYLfwff867r8ekooZ4UI+/gxot5Wj8EFwSf2rG+n+Mo/6LoLQm1TKA4GRj2+LCpbfS937dClQ==} engines: {node: '>=8'} dependencies: tslib: 2.6.1 + dev: false + + /@wry/trie@0.4.3: + resolution: {integrity: sha512-I6bHwH0fSf6RqQcnnXLJKhkSXG45MFral3GxPaY4uAl0LYDZM+YDVDAiU9bYwjTuysy1S0IeecWtmq1SZA3M1w==} + engines: {node: '>=8'} + dependencies: + tslib: 2.6.2 /@xmtp/proto@3.25.0: resolution: {integrity: sha512-neVPGr40QRAWmIcG3R3d3g6ziSdY8bmKeSFRb6zWANXB3wluHoEGmud5/jZw4u/AY3E6FuNCwVODGku86iIeHw==} @@ -11287,7 +11345,7 @@ packages: dependencies: pvtsutils: 1.3.2 pvutils: 1.1.3 - tslib: 2.6.1 + tslib: 2.6.2 dev: true /assert-plus@1.0.0: @@ -11345,12 +11403,12 @@ packages: /async-mutex@0.2.6: resolution: {integrity: sha512-Hs4R+4SPgamu6rSGW8C7cV9gaWUKEHykfzCCvIRuaVv636Ju10ZdeUbvb4TBEW0INuq2DHZqXbK4Nd3yG4RaRw==} dependencies: - tslib: 2.6.1 + tslib: 2.6.2 /async-mutex@0.4.0: resolution: {integrity: sha512-eJFZ1YhRR8UN8eBLoNzcDPcy/jqjsg6I1AP+KvWQX80BqOSW1oJPJXDylPUEeMr2ZQvHgnQ//Lp6f3RQ1zI7HA==} dependencies: - tslib: 2.6.1 + tslib: 2.6.2 /async-retry@1.3.3: resolution: {integrity: sha512-wfr/jstw9xNi/0teMHrRW7dsz3Lt5ARhYNZ2ewpadnhaIp5mbALhOAP+EAdsC7t4Z6wqsDVv9+W6gm1Dk9mEyw==} @@ -12123,7 +12181,7 @@ packages: resolution: {integrity: sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==} dependencies: pascal-case: 3.1.2 - tslib: 2.6.1 + tslib: 2.6.2 dev: true /camelcase-keys@6.2.2: @@ -12172,7 +12230,7 @@ packages: resolution: {integrity: sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A==} dependencies: no-case: 3.0.4 - tslib: 2.6.1 + tslib: 2.6.2 upper-case-first: 2.0.2 dev: true @@ -12312,7 +12370,7 @@ packages: normalize-path: 3.0.0 readdirp: 3.6.0 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 /ci-info@2.0.0: resolution: {integrity: sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==} @@ -12532,7 +12590,7 @@ packages: resolution: {integrity: sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==} dependencies: no-case: 3.0.4 - tslib: 2.6.1 + tslib: 2.6.2 upper-case: 2.0.2 dev: true @@ -13062,7 +13120,7 @@ packages: resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==} dependencies: no-case: 3.0.4 - tslib: 2.6.1 + tslib: 2.6.2 dev: true /dotenv@16.0.3: @@ -14481,8 +14539,8 @@ packages: dev: true optional: true - /fsevents@2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + /fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true @@ -15041,7 +15099,7 @@ packages: resolution: {integrity: sha512-H/vuk5TEEVZwrR0lp2zed9OCo1uAILMlx0JEMgC26rzyJJ3N1v6XkwHHXJQdR2doSjcGPM6OKPYoJgf0plJ11Q==} dependencies: capital-case: 1.0.4 - tslib: 2.6.1 + tslib: 2.6.2 dev: true /hey-listen@1.0.8: @@ -16269,7 +16327,7 @@ packages: micromatch: 4.0.5 walker: 1.0.8 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 /jest-haste-map@29.6.2: resolution: {integrity: sha512-+51XleTDAAysvU8rT6AnS1ZJ+WHVNqhj1k6nTvN2PYP+HjU3kqlaKQ1Lnw3NYW3bm2r8vq82X0Z1nDDHZMzHVA==} @@ -16287,7 +16345,7 @@ packages: micromatch: 4.0.5 walker: 1.0.8 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 /jest-leak-detector@29.4.3: resolution: {integrity: sha512-9yw4VC1v2NspMMeV3daQ1yXPNxMgCzwq9BocCwYrRgXe4uaEJPAN0ZK37nFBhcy3cUwEVstFecFLaTHpF7NiGA==} @@ -17984,7 +18042,7 @@ packages: resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} dependencies: lower-case: 2.0.2 - tslib: 2.6.1 + tslib: 2.6.2 dev: true /node-addon-api@2.0.2: @@ -18023,6 +18081,19 @@ packages: dependencies: whatwg-url: 5.0.0 + /node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} + requiresBuild: true + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + dependencies: + whatwg-url: 5.0.0 + optional: true + /node-gyp-build@4.3.0: resolution: {integrity: sha512-iWjXZvmboq0ja1pUGULQBexmxq8CV4xBhX7VDOTbL7ZR4FOowwY/VOtRxBN/yKxmdGoIp4j5ysNT4u3S2pDQ3Q==} hasBin: true @@ -18302,6 +18373,14 @@ packages: dependencies: '@wry/context': 0.7.0 '@wry/trie': 0.3.2 + dev: false + + /optimism@0.17.5: + resolution: {integrity: sha512-TEcp8ZwK1RczmvMnvktxHSF2tKgMWjJ71xEFGX5ApLh67VsMSTy1ZUlipJw8W+KaqgOmQ+4pqwkeivY89j+4Vw==} + dependencies: + '@wry/context': 0.7.3 + '@wry/trie': 0.4.3 + tslib: 2.6.2 /optionator@0.8.3: resolution: {integrity: sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==} @@ -18458,7 +18537,7 @@ packages: resolution: {integrity: sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==} dependencies: dot-case: 3.0.4 - tslib: 2.6.1 + tslib: 2.6.2 dev: true /parent-module@1.0.1: @@ -18522,7 +18601,7 @@ packages: resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==} dependencies: no-case: 3.0.4 - tslib: 2.6.1 + tslib: 2.6.2 dev: true /pascalcase@0.1.1: @@ -18544,7 +18623,7 @@ packages: resolution: {integrity: sha512-qO4qCFjXqVTrcbPt/hQfhTQ+VhFsqNKOPtytgNKkKxSoEp3XPUQ8ObFuePylOIok5gjn69ry8XiULxCwot3Wfg==} dependencies: dot-case: 3.0.4 - tslib: 2.6.1 + tslib: 2.6.2 dev: true /path-dirname@1.0.2: @@ -18902,13 +18981,13 @@ packages: /pvtsutils@1.3.2: resolution: {integrity: sha512-+Ipe2iNUyrZz+8K/2IOo+kKikdtfhRKzNpQbruF2URmqPtoqAs8g3xS7TJvFF2GcPXjh7DkqMnpVveRFq4PgEQ==} dependencies: - tslib: 2.6.1 + tslib: 2.6.2 dev: true /pvtsutils@1.3.3: resolution: {integrity: sha512-6sAOMlXyrJ+8tRN5IAaYfuYZRp1C2uJ0SyDynEFxL+VY8kCRib9Lpj/+KPaNFpaQWr/iRik5nrzz6iaNlxgEGA==} dependencies: - tslib: 2.6.1 + tslib: 2.6.2 dev: true /pvutils@1.1.3: @@ -19530,7 +19609,7 @@ packages: engines: {node: '>=10.0.0'} hasBin: true optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /rollup@3.26.2: @@ -19538,7 +19617,7 @@ packages: engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /rpc-websockets@7.5.1: @@ -19686,7 +19765,7 @@ packages: resolution: {integrity: sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg==} dependencies: no-case: 3.0.4 - tslib: 2.6.1 + tslib: 2.6.2 upper-case-first: 2.0.2 dev: true @@ -19828,7 +19907,7 @@ packages: resolution: {integrity: sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==} dependencies: dot-case: 3.0.4 - tslib: 2.6.1 + tslib: 2.6.2 dev: true /snapdragon-node@2.1.1: @@ -20318,7 +20397,7 @@ packages: engines: {node: ^14.18.0 || >=16.0.0} dependencies: '@pkgr/utils': 2.3.1 - tslib: 2.6.1 + tslib: 2.6.2 /table-layout@1.0.2: resolution: {integrity: sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A==} @@ -20720,6 +20799,9 @@ packages: /tslib@2.6.1: resolution: {integrity: sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==} + /tslib@2.6.2: + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + /tsutils@3.21.0(typescript@4.9.5): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} @@ -21375,7 +21457,7 @@ packages: postcss: 8.4.25 rollup: 3.26.2 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /vlq@2.0.4: @@ -21496,7 +21578,7 @@ packages: '@peculiar/json-schema': 1.1.12 asn1js: 3.0.5 pvtsutils: 1.3.3 - tslib: 2.6.1 + tslib: 2.6.2 dev: true /webidl-conversions@3.0.1: