// Generated from the LeavePulse contract. Do not edit. import { Resource } from "../runtime/resource"; import type { components } from "../types"; import type * as models from "../models"; import type { ClientContext } from "../client"; import type { Snowflake } from "../runtime/snowflake"; type Data = components["schemas"]["SessionInfo"]; export class Session extends Resource { constructor( data: Data, private readonly ctx: ClientContext, ) { super(data); } /** Whether the current user may revoke (RFC ยง4). */ get canRevoke(): boolean { return this.hasCapability("revoke", "session.revoke"); } /** session.revoke */ async revoke(): Promise { return this.ctx.transport.request({ method: "POST", path: `/v1/me/sessions/${this.id}/actions/revoke`, }); } }