Skip to content

Commit

Permalink
client: mark poaps and nfts as experimental, exclude constructors and…
Browse files Browse the repository at this point in the history
… internal methods from docs (#821)
  • Loading branch information
krzysu authored Feb 5, 2024
1 parent 14d5b12 commit 8c61d97
Show file tree
Hide file tree
Showing 23 changed files with 94 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/curvy-birds-juggle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@lens-protocol/client": patch
---

**chore:** marked Nfts and Poaps as experimental as they are not stable and might be removed in the future
13 changes: 12 additions & 1 deletion packages/client/src/authentication/Authentication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ export class Authentication implements IAuthentication {
private readonly api: AuthenticationApi;
private readonly credentials: CredentialsStorage;

/**
* @internal
*/
constructor(context: LensContext) {
this.api = new AuthenticationApi(context);
this.credentials = new CredentialsStorage(context.storage, context.environment.name);
Expand Down Expand Up @@ -158,7 +161,9 @@ export class Authentication implements IAuthentication {
});
}

// privileged methods
/**
* @internal
*/
async requireAuthentication<
TResult extends Result<TValue, TError>,
TValue,
Expand All @@ -181,6 +186,9 @@ export class Authentication implements IAuthentication {
return handler(profileId);
}

/**
* @internal
*/
async requireAtLeastWalletAuthentication<
TResult extends Result<TValue, TError>,
TValue,
Expand All @@ -197,6 +205,9 @@ export class Authentication implements IAuthentication {
return handler(result.value.getProfileId());
}

/**
* @internal
*/
async getRequestHeader(): PromiseResult<
Record<string, string>,
CredentialsExpiredError | NotAuthenticatedError
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ export type {
} from '@lens-protocol/shared-kernel';
export type { IStorageProvider, InMemoryStorageProvider } from '@lens-protocol/storage';
export type { TypedData, TypedDataResponse } from './types';
export type { LensContext, MediaTransformsConfig } from './context';
export type { MediaTransformsConfig } from './context';
export type { PaginatedResult, PaginatedQueryData } from './helpers/buildPaginatedQueryResult';
3 changes: 3 additions & 0 deletions packages/client/src/submodules/explore/Explore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ import { getSdk, Sdk } from './graphql/explore.generated';
export class Explore {
private readonly sdk: Sdk;

/**
* @internal
*/
constructor(
private readonly context: LensContext,
authentication: Authentication,
Expand Down
3 changes: 3 additions & 0 deletions packages/client/src/submodules/feed/Feed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ import {
export class Feed {
private readonly sdk: Sdk;

/**
* @internal
*/
constructor(
private readonly context: LensContext,
private readonly authentication: Authentication,
Expand Down
3 changes: 3 additions & 0 deletions packages/client/src/submodules/handle/Handle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ import { Sdk, getSdk } from './graphql/handle.generated';
export class Handle {
private readonly sdk: Sdk;

/**
* @internal
*/
constructor(context: LensContext, authentication: Authentication) {
const client = new FetchGraphQLClient(context);

Expand Down
3 changes: 3 additions & 0 deletions packages/client/src/submodules/invites/Invites.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ import { InvitedResultFragment, Sdk, getSdk } from './graphql/invites.generated'
export class Invites {
private readonly sdk: Sdk;

/**
* @internal
*/
constructor(
private readonly context: LensContext,
private readonly authentication: Authentication,
Expand Down
3 changes: 3 additions & 0 deletions packages/client/src/submodules/modules/Modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ import {
export class Modules {
private readonly sdk: Sdk;

/**
* @internal
*/
constructor(
context: LensContext,
private readonly authentication: Authentication,
Expand Down
3 changes: 3 additions & 0 deletions packages/client/src/submodules/momoka/Momoka.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ export type MomokaTransaction =
export class Momoka {
private readonly sdk: Sdk;

/**
* @internal
*/
constructor(
private readonly context: LensContext,
authentication: Authentication,
Expand Down
15 changes: 15 additions & 0 deletions packages/client/src/submodules/nfts/Nfts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,15 @@ import {
/**
* Query owned NFTs. Challenge ownership. Create and manage NFT galleries.
*
* @experimental This module is not stable and may be removed in a future release
* @group LensClient Modules
*/
export class Nfts {
private readonly sdk: Sdk;

/**
* @internal
*/
constructor(
context: LensContext,
private readonly authentication: Authentication,
Expand All @@ -59,6 +63,7 @@ export class Nfts {
*
* @param request - Request object for the query
* @returns NFTs wrapped in {@link PaginatedResult}
* @experimental This function is not stable and may be removed in a future release
*
* @example
* When authenticated
Expand Down Expand Up @@ -121,6 +126,7 @@ export class Nfts {
*
* @param request - Request object for the query
* @returns NFT collections wrapped in {@link PaginatedResult}
* @experimental This function is not stable and may be removed in a future release
*
* @example
* ```ts
Expand All @@ -144,6 +150,7 @@ export class Nfts {
*
* @param request - Request object for the query
* @returns NFT collections wrapped in {@link PaginatedResult}
* @experimental This function is not stable and may be removed in a future release
*
* @example
* ```ts
Expand All @@ -170,6 +177,7 @@ export class Nfts {
*
* @param request - Request object for the query
* @returns NFT collections with total owners wrapped in {@link PaginatedResult}
* @experimental This function is not stable and may be removed in a future release
*
* @example
* ```ts
Expand All @@ -193,6 +201,7 @@ export class Nfts {
*
* @param request - Request object for the query
* @returns Profiles wrapped in {@link PaginatedResult}
* @experimental This function is not stable and may be removed in a future release
*
* @example
* ```ts
Expand Down Expand Up @@ -260,6 +269,7 @@ export class Nfts {
*
* @param request - Request object for the query
* @returns Array of NFT galleries wrapped in {@link PaginatedResult}
* @experimental This function is not stable and may be removed in a future release
*
* @example
* ```ts
Expand Down Expand Up @@ -288,6 +298,7 @@ export class Nfts {
*
* @param request - Request object for the mutation
* @returns {@link PromiseResult} with the id of the new gallery
* @experimental This function is not stable and may be removed in a future release
*
* @example
* ```ts
Expand Down Expand Up @@ -322,6 +333,7 @@ export class Nfts {
*
* @param request - Request object for the mutation
* @returns {@link PromiseResult} with void
* @experimental This function is not stable and may be removed in a future release
*
* @example
* ```ts
Expand Down Expand Up @@ -349,6 +361,7 @@ export class Nfts {
*
* @param request - Request object for the mutation
* @returns {@link PromiseResult} with void
* @experimental This function is not stable and may be removed in a future release
*
* @example
* ```ts
Expand Down Expand Up @@ -393,6 +406,7 @@ export class Nfts {
*
* @param request - Request object for the mutation
* @returns {@link PromiseResult} with void
* @experimental This function is not stable and may be removed in a future release
*
* @example
* ```ts
Expand Down Expand Up @@ -426,6 +440,7 @@ export class Nfts {
*
* @param request - Request object for the mutation
* @returns {@link PromiseResult} with void
* @experimental This function is not stable and may be removed in a future release
*
* @example
* ```ts
Expand Down
3 changes: 3 additions & 0 deletions packages/client/src/submodules/notifications/Notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ export type NotificationFragment =
export class Notifications {
private readonly sdk: Sdk;

/**
* @internal
*/
constructor(
private readonly context: LensContext,
private readonly authentication: Authentication,
Expand Down
8 changes: 8 additions & 0 deletions packages/client/src/submodules/poaps/Poaps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@ import { PoapEventFragment, PoapTokenFragment, Sdk, getSdk } from './graphql/poa
/**
* POAP is a protocol for the preservation of memories as digital records.
*
* @experimental This module is not stable and may be removed in a future release
* @group LensClient Modules
*/
export class Poaps {
private readonly sdk: Sdk;

/**
* @internal
*/
constructor(
private readonly context: LensContext,
authentication: Authentication,
Expand All @@ -38,6 +42,7 @@ export class Poaps {
*
* @param request - The request object.
* @returns POAP tokens wrapped in {@link PaginatedResult}
* @experimental This function is not stable and may be removed in a future release
*
* @example
* ```ts
Expand All @@ -61,6 +66,7 @@ export class Poaps {
*
* @param request - The request object.
* @returns Profiles wrapped in {@link PaginatedResult}
* @experimental This function is not stable and may be removed in a future release
*
* @example
* ```ts
Expand All @@ -85,6 +91,7 @@ export class Poaps {
*
* @param request - The request object.
* @returns POAP events wrapped in {@link PaginatedResult}
* @experimental This function is not stable and may be removed in a future release
*
* @example
* ```ts
Expand All @@ -111,6 +118,7 @@ export class Poaps {
*
* @param request - The request object.
* @returns POAP event.
* @experimental This function is not stable and may be removed in a future release
*
* @example
* ```ts
Expand Down
3 changes: 3 additions & 0 deletions packages/client/src/submodules/profile/Profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ import { FetchProfileOptions } from './types';
export class Profile {
private readonly sdk: Sdk;

/**
* @internal
*/
constructor(
private readonly context: LensContext,
private readonly authentication: Authentication,
Expand Down
3 changes: 3 additions & 0 deletions packages/client/src/submodules/publication/Publication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ import { FetchPublicationOptions, RequestOverwrites } from './types';
export class Publication {
private readonly sdk: Sdk;

/**
* @internal
*/
constructor(
private readonly context: LensContext,
private readonly authentication: Authentication,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ import {
export class Actions {
private readonly sdk: Sdk;

/**
* @internal
*/
constructor(
context: LensContext,
private readonly authentication: Authentication,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ import { getSdk, Sdk } from './graphql/bookmarks.generated';
export class Bookmarks {
private readonly sdk: Sdk;

/**
* @internal
*/
constructor(
private readonly context: LensContext,
private readonly authentication: Authentication,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ import { Sdk, getSdk } from './graphql/notInterested.generated';
export class NotInterested {
private readonly sdk: Sdk;

/**
* @internal
*/
constructor(
context: LensContext,
private readonly authentication: Authentication,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ import { getSdk, ProfileWhoReactedResultFragment, Sdk } from './graphql/reaction
export class Reactions {
private readonly sdk: Sdk;

/**
* @internal
*/
constructor(
private readonly context: LensContext,
private readonly authentication: Authentication,
Expand Down
3 changes: 3 additions & 0 deletions packages/client/src/submodules/revenue/Revenue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ import {
export class Revenue {
private readonly sdk: Sdk;

/**
* @internal
*/
constructor(
private readonly context: LensContext,
authentication: Authentication,
Expand Down
3 changes: 3 additions & 0 deletions packages/client/src/submodules/search/Search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ import { getSdk, Sdk } from './graphql/search.generated';
export class Search {
private readonly sdk: Sdk;

/**
* @internal
*/
constructor(
private readonly context: LensContext,
authentication: Authentication,
Expand Down
3 changes: 3 additions & 0 deletions packages/client/src/submodules/transaction/Transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ export class TransactionPollingError extends Error {
export class Transaction {
private readonly sdk: Sdk;

/**
* @internal
*/
constructor(
context: LensContext,
private readonly authentication: Authentication,
Expand Down
3 changes: 3 additions & 0 deletions packages/client/src/submodules/wallet/Wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ import {
export class Wallet {
private readonly sdk: Sdk;

/**
* @internal
*/
constructor(
private readonly context: LensContext,
private readonly authentication: Authentication,
Expand Down
3 changes: 2 additions & 1 deletion packages/client/typedoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"tsconfig": "./tsconfig.json",
"extends": ["../../typedoc.base.json"],
"entryPoints": ["src/index.ts", "src/gated/index.ts"],
"intentionallyNotExported": ["Environment", "LensContext", "Typename", "PickByTypename"]
"intentionallyNotExported": ["Environment", "Typename", "PickByTypename"],
"groupOrder": ["LensClient", "LensClient Modules", "Variables", "Functions"]
}

0 comments on commit 8c61d97

Please sign in to comment.