import type * as ci from "@distilled.cloud/aws/cognito-identity"; import type * as Effect from "effect/Effect"; import * as Binding from "../../Binding.ts"; import type { IdentityPool } from "./IdentityPool.ts"; export interface ListIdentitiesRequest extends Omit { } export interface LookupDeveloperIdentityRequest extends Omit { } export interface MergeDeveloperIdentitiesRequest extends Omit { } export interface UnlinkDeveloperIdentityRequest extends Omit { } export interface GetOpenIdTokenForDeveloperIdentityRequest extends Omit { } /** * The typed client returned by binding {@link IdentityPoolAdmin} to an * `IdentityPool`. Pool-scoped calls automatically inject the identity pool * ID and are authorized by IAM (`cognito-identity:*` on the pool's ARN). */ export interface IdentityPoolAdminClient { /** Fetch an identity's linked logins and metadata. */ describeIdentity: (request: ci.DescribeIdentityInput) => Effect.Effect; /** Page through the identities registered in the pool. */ listIdentities: (request: ListIdentitiesRequest) => Effect.Effect; /** Permanently delete identities from the pool. */ deleteIdentities: (request: ci.DeleteIdentitiesInput) => Effect.Effect; /** Look up an identity by developer user identifier (or vice versa). */ lookupDeveloperIdentity: (request: LookupDeveloperIdentityRequest) => Effect.Effect; /** Merge two developer-authenticated identities into one. */ mergeDeveloperIdentities: (request: MergeDeveloperIdentitiesRequest) => Effect.Effect; /** Unlink a developer user identifier from an identity. */ unlinkDeveloperIdentity: (request: UnlinkDeveloperIdentityRequest) => Effect.Effect; /** Mint an OpenID Connect token for a developer-authenticated identity * (server-side developer provider flow). */ getOpenIdTokenForDeveloperIdentity: (request: GetOpenIdTokenForDeveloperIdentityRequest) => Effect.Effect; } /** * Runtime binding for administrative Cognito identity pool operations — * identity management and the developer-authenticated identities flow. * * Bind this to an `IdentityPool` inside a function runtime to get a typed * client for listing/deleting identities and for developer-provider token * minting. The binding grants the corresponding `cognito-identity:*` IAM * actions scoped to the pool's ARN and injects the pool ID into pool-scoped * calls. * ### Managing Identities * **Example:** List and Describe Identities * ```typescript * const identities = yield* Cognito.IdentityPoolAdmin(identityPool); * * const page = yield* identities.listIdentities({ MaxResults: 20 }); * const first = page.Identities?.[0]; * if (first?.IdentityId) { * const detail = yield* identities.describeIdentity({ * IdentityId: first.IdentityId, * }); * } * ``` * * ### Developer-Authenticated Identities * **Example:** Mint a Token for a Backend-Authenticated User * ```typescript * const token = yield* identities.getOpenIdTokenForDeveloperIdentity({ * Logins: { "my.developer.provider": userId }, * }); * ``` * * @binding */ export interface IdentityPoolAdmin extends Binding.Service(pool: P) => Effect.Effect> { } export declare const IdentityPoolAdmin: IdentityPoolAdmin; //# sourceMappingURL=IdentityPoolAdmin.d.ts.map