import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import Long from "long"; import type { CallContext, CallOptions } from "nice-grpc-common"; import { Duration } from "../../../google/protobuf/duration.js"; import { Details, ListDetails, ListQuery } from "../../object/v2beta/object.js"; import { Challenges, RequestChallenges } from "./challenge.js"; import { SearchQuery, Session, SessionFieldName, UserAgent } from "./session.js"; export declare const protobufPackage = "zitadel.session.v2beta"; export interface ListSessionsRequest { query: ListQuery | undefined; queries: SearchQuery[]; sortingColumn: SessionFieldName; } export interface ListSessionsResponse { details: ListDetails | undefined; sessions: Session[]; } export interface GetSessionRequest { sessionId: string; sessionToken?: string | undefined; } export interface GetSessionResponse { session: Session | undefined; } export interface CreateSessionRequest { checks: Checks | undefined; metadata: { [key: string]: Buffer; }; challenges: RequestChallenges | undefined; userAgent: UserAgent | undefined; lifetime?: Duration | undefined; } export interface CreateSessionRequest_MetadataEntry { key: string; value: Buffer; } export interface CreateSessionResponse { details: Details | undefined; sessionId: string; sessionToken: string; challenges: Challenges | undefined; } export interface SetSessionRequest { sessionId: string; sessionToken: string; checks: Checks | undefined; metadata: { [key: string]: Buffer; }; challenges: RequestChallenges | undefined; lifetime?: Duration | undefined; } export interface SetSessionRequest_MetadataEntry { key: string; value: Buffer; } export interface SetSessionResponse { details: Details | undefined; sessionToken: string; challenges: Challenges | undefined; } export interface DeleteSessionRequest { sessionId: string; sessionToken?: string | undefined; } export interface DeleteSessionResponse { details: Details | undefined; } export interface Checks { user?: CheckUser | undefined; password?: CheckPassword | undefined; webAuthN?: CheckWebAuthN | undefined; idpIntent?: CheckIDPIntent | undefined; totp?: CheckTOTP | undefined; otpSms?: CheckOTP | undefined; otpEmail?: CheckOTP | undefined; } export interface CheckUser { userId?: string | undefined; loginName?: string | undefined; } export interface CheckPassword { password: string; } export interface CheckWebAuthN { credentialAssertionData: { [key: string]: any; } | undefined; } export interface CheckIDPIntent { idpIntentId: string; idpIntentToken: string; } export interface CheckTOTP { code: string; } export interface CheckOTP { code: string; } export declare const ListSessionsRequest: MessageFns; export declare const ListSessionsResponse: MessageFns; export declare const GetSessionRequest: MessageFns; export declare const GetSessionResponse: MessageFns; export declare const CreateSessionRequest: MessageFns; export declare const CreateSessionRequest_MetadataEntry: MessageFns; export declare const CreateSessionResponse: MessageFns; export declare const SetSessionRequest: MessageFns; export declare const SetSessionRequest_MetadataEntry: MessageFns; export declare const SetSessionResponse: MessageFns; export declare const DeleteSessionRequest: MessageFns; export declare const DeleteSessionResponse: MessageFns; export declare const Checks: MessageFns; export declare const CheckUser: MessageFns; export declare const CheckPassword: MessageFns; export declare const CheckWebAuthN: MessageFns; export declare const CheckIDPIntent: MessageFns; export declare const CheckTOTP: MessageFns; export declare const CheckOTP: MessageFns; /** Deprecated: use session service v2 instead. This service will be removed in the next major version of ZITADEL. */ export type SessionServiceDefinition = typeof SessionServiceDefinition; export declare const SessionServiceDefinition: { readonly name: "SessionService"; readonly fullName: "zitadel.session.v2beta.SessionService"; readonly methods: { /** * Search sessions * * Deprecated: please move to the corresponding endpoint under session service v2. This endpoint will be removed with the next major version of ZITADEL. */ readonly listSessions: { readonly name: "ListSessions"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 400010: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; /** * GetSession a session * * Deprecated: please move to the corresponding endpoint under session service v2. This endpoint will be removed with the next major version of ZITADEL. */ readonly getSession: { readonly name: "GetSession"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 400010: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; /** * Create a new session * * Deprecated: please move to the corresponding endpoint under session service v2. This endpoint will be removed with the next major version of ZITADEL. */ readonly createSession: { readonly name: "CreateSession"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 400010: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; /** * Update a session * * Deprecated: please move to the corresponding endpoint under session service v2. This endpoint will be removed with the next major version of ZITADEL. */ readonly setSession: { readonly name: "SetSession"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 400010: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; /** * Terminate a session * * Deprecated: please move to the corresponding endpoint under session service v2. This endpoint will be removed with the next major version of ZITADEL. */ readonly deleteSession: { readonly name: "DeleteSession"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 400010: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; }; }; export interface SessionServiceImplementation { /** * Search sessions * * Deprecated: please move to the corresponding endpoint under session service v2. This endpoint will be removed with the next major version of ZITADEL. */ listSessions(request: ListSessionsRequest, context: CallContext & CallContextExt): Promise>; /** * GetSession a session * * Deprecated: please move to the corresponding endpoint under session service v2. This endpoint will be removed with the next major version of ZITADEL. */ getSession(request: GetSessionRequest, context: CallContext & CallContextExt): Promise>; /** * Create a new session * * Deprecated: please move to the corresponding endpoint under session service v2. This endpoint will be removed with the next major version of ZITADEL. */ createSession(request: CreateSessionRequest, context: CallContext & CallContextExt): Promise>; /** * Update a session * * Deprecated: please move to the corresponding endpoint under session service v2. This endpoint will be removed with the next major version of ZITADEL. */ setSession(request: SetSessionRequest, context: CallContext & CallContextExt): Promise>; /** * Terminate a session * * Deprecated: please move to the corresponding endpoint under session service v2. This endpoint will be removed with the next major version of ZITADEL. */ deleteSession(request: DeleteSessionRequest, context: CallContext & CallContextExt): Promise>; } export interface SessionServiceClient { /** * Search sessions * * Deprecated: please move to the corresponding endpoint under session service v2. This endpoint will be removed with the next major version of ZITADEL. */ listSessions(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** * GetSession a session * * Deprecated: please move to the corresponding endpoint under session service v2. This endpoint will be removed with the next major version of ZITADEL. */ getSession(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** * Create a new session * * Deprecated: please move to the corresponding endpoint under session service v2. This endpoint will be removed with the next major version of ZITADEL. */ createSession(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** * Update a session * * Deprecated: please move to the corresponding endpoint under session service v2. This endpoint will be removed with the next major version of ZITADEL. */ setSession(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** * Terminate a session * * Deprecated: please move to the corresponding endpoint under session service v2. This endpoint will be removed with the next major version of ZITADEL. */ deleteSession(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; } type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial; } : Partial; export interface MessageFns { encode(message: T, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): T; fromJSON(object: any): T; toJSON(message: T): unknown; create(base?: DeepPartial): T; fromPartial(object: DeepPartial): T; } export {};