diff --git a/.changeset/shy-pugs-taste.md b/.changeset/shy-pugs-taste.md new file mode 100644 index 0000000000..7a4897a8fb --- /dev/null +++ b/.changeset/shy-pugs-taste.md @@ -0,0 +1,5 @@ +--- +"@lens-protocol/client": patch +--- + +Removed `forApps` from config as it was used only when quering for profile stats diff --git a/packages/client/src/LensClient.ts b/packages/client/src/LensClient.ts index 979ed74d2e..18fc7d1c5b 100644 --- a/packages/client/src/LensClient.ts +++ b/packages/client/src/LensClient.ts @@ -43,12 +43,6 @@ export type LensClientConfig = { * @see {@link MediaTransformsConfig} for more information */ mediaTransforms?: MediaTransformsConfig; - - /** - * The app ids to use to read data from the Lens Protocol. - * If not provided, all apps will be used. - */ - forApps?: string[]; }; /** @@ -79,7 +73,6 @@ export class LensClient { environment: config.environment, storage: config.storage || new InMemoryStorageProvider(), mediaTransforms: config.mediaTransforms || {}, - forApps: config.forApps || [], }; this._authentication = new Authentication(this.context); } diff --git a/packages/client/src/context.ts b/packages/client/src/context.ts index 3b065253db..676bd2ce74 100644 --- a/packages/client/src/context.ts +++ b/packages/client/src/context.ts @@ -34,6 +34,4 @@ export type LensContext = { storage: IStorageProvider; mediaTransforms: MediaTransformsConfig; - - forApps: string[]; }; diff --git a/packages/client/src/helpers/buildImageTransformsFromConfig.ts b/packages/client/src/helpers/buildImageTransformsFromConfig.ts deleted file mode 100644 index 771c8e1e36..0000000000 --- a/packages/client/src/helpers/buildImageTransformsFromConfig.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { MediaTransformsConfig } from '../context'; - -export function buildImageTransformsFromConfig(config: MediaTransformsConfig = {}) { - return { - publicationImageTransform: config.publication, - profileCoverTransform: config.profileCover, - profilePictureTransform: config.profilePicture, - }; -} diff --git a/packages/client/src/helpers/buildRequestFromConfig.ts b/packages/client/src/helpers/buildRequestFromConfig.ts index 64cc20dbcc..40056c6d81 100644 --- a/packages/client/src/helpers/buildRequestFromConfig.ts +++ b/packages/client/src/helpers/buildRequestFromConfig.ts @@ -1,11 +1,10 @@ import { LensContext } from '../context'; -import { ImageTransform, ProfileStatsArg } from '../graphql/types.generated'; +import { ImageTransform } from '../graphql'; type RequestFromConfig = { publicationImageTransform?: ImageTransform; profileCoverTransform?: ImageTransform; profilePictureTransform?: ImageTransform; - profileStatsArg?: ProfileStatsArg; }; export function buildRequestFromConfig(config: LensContext): RequestFromConfig { @@ -13,8 +12,5 @@ export function buildRequestFromConfig(config: LensContext): RequestFromConfig { publicationImageTransform: config.mediaTransforms?.publication, profileCoverTransform: config.mediaTransforms?.profileCover, profilePictureTransform: config.mediaTransforms?.profilePicture, - profileStatsArg: { - forApps: config.forApps, - }, }; } diff --git a/packages/client/src/helpers/requireAuthHeaders.spec.ts b/packages/client/src/helpers/requireAuthHeaders.spec.ts index 7be0eb9a7f..b8aa7400a0 100644 --- a/packages/client/src/helpers/requireAuthHeaders.spec.ts +++ b/packages/client/src/helpers/requireAuthHeaders.spec.ts @@ -9,7 +9,6 @@ import { requireAuthHeaders } from './requireAuthHeaders'; const context: LensContext = { environment: buildTestEnvironment(), storage: new InMemoryStorageProvider(), - forApps: [], mediaTransforms: {}, }; diff --git a/packages/client/src/helpers/sdkAuthHeaderWrapper.spec.ts b/packages/client/src/helpers/sdkAuthHeaderWrapper.spec.ts index 78c0a97af5..be65fc3091 100644 --- a/packages/client/src/helpers/sdkAuthHeaderWrapper.spec.ts +++ b/packages/client/src/helpers/sdkAuthHeaderWrapper.spec.ts @@ -9,7 +9,6 @@ const context: LensContext = { environment: buildTestEnvironment(), mediaTransforms: {}, storage: new InMemoryStorageProvider(), - forApps: [], }; describe(`Given the "${sdkAuthHeaderWrapper.name}" helper`, () => { diff --git a/packages/client/src/submodules/profile/types.ts b/packages/client/src/submodules/profile/types.ts index 747dad86c8..4a0d0f76cb 100644 --- a/packages/client/src/submodules/profile/types.ts +++ b/packages/client/src/submodules/profile/types.ts @@ -1,5 +1,6 @@ -import { ProfileStatsCountOpenActionArgs } from '../../graphql/types.generated'; +import { ProfileStatsArg, ProfileStatsCountOpenActionArgs } from '../../graphql/types.generated'; export type FetchProfileOptions = { + profileStatsArg?: ProfileStatsArg; profileStatsCountOpenActionArgs?: ProfileStatsCountOpenActionArgs; };