@primerouting/zitadel-node
Version: 
Library for API access to ZITADEL. Provides compiled gRPC service clients and helpers for applications and service accounts. Support http2 self-hosted instances
171 lines (170 loc) • 7.11 kB
TypeScript
import Long from "long";
import _m0 from "protobufjs/minimal";
import { Details, TextQueryMethod } from "../../../object/v2/object";
export declare const protobufPackage = "zitadel.user.schema.v3alpha";
export declare enum FieldName {
    FIELD_NAME_UNSPECIFIED = 0,
    FIELD_NAME_TYPE = 1,
    FIELD_NAME_STATE = 2,
    FIELD_NAME_REVISION = 3,
    FIELD_NAME_CHANGE_DATE = 4,
    UNRECOGNIZED = -1
}
export declare function fieldNameFromJSON(object: any): FieldName;
export declare function fieldNameToJSON(object: FieldName): string;
export declare enum State {
    STATE_UNSPECIFIED = 0,
    STATE_ACTIVE = 1,
    STATE_INACTIVE = 2,
    UNRECOGNIZED = -1
}
export declare function stateFromJSON(object: any): State;
export declare function stateToJSON(object: State): string;
export declare enum AuthenticatorType {
    AUTHENTICATOR_TYPE_UNSPECIFIED = 0,
    AUTHENTICATOR_TYPE_USERNAME = 1,
    AUTHENTICATOR_TYPE_PASSWORD = 2,
    AUTHENTICATOR_TYPE_WEBAUTHN = 3,
    AUTHENTICATOR_TYPE_TOTP = 4,
    AUTHENTICATOR_TYPE_OTP_EMAIL = 5,
    AUTHENTICATOR_TYPE_OTP_SMS = 6,
    AUTHENTICATOR_TYPE_AUTHENTICATION_KEY = 7,
    AUTHENTICATOR_TYPE_IDENTITY_PROVIDER = 8,
    UNRECOGNIZED = -1
}
export declare function authenticatorTypeFromJSON(object: any): AuthenticatorType;
export declare function authenticatorTypeToJSON(object: AuthenticatorType): string;
export interface UserSchema {
    /** ID is the read-only unique identifier of the schema. */
    id: string;
    /** Details provide some base information (such as the last change date) of the schema. */
    details: Details | undefined;
    /** Type is a human readable text describing the schema. */
    type: string;
    /** Current state of the schema. */
    state: State;
    /** Revision is a read only version of the schema, each update of the `schema`-field increases the revision. */
    revision: number;
    /** JSON schema representation defining the user. */
    schema: {
        [key: string]: any;
    } | undefined;
    /**
     * Defines the possible types of authenticators.
     * This allows creating different user types like human/machine without usage of actions to validate possible authenticators.
     * Removal of an authenticator does not remove the authenticator on a user.
     */
    possibleAuthenticators: AuthenticatorType[];
}
export interface SearchQuery {
    /** Union the results of each sub query ('OR'). */
    orQuery?: OrQuery | undefined;
    /**
     * Limit the result to match all sub queries ('AND').
     * Note that if you specify multiple queries, they will be implicitly used as andQueries.
     * Use the andQuery in combination with orQuery and notQuery.
     */
    andQuery?: AndQuery | undefined;
    /** Exclude / Negate the result of the sub query ('NOT'). */
    notQuery?: NotQuery | undefined;
    /** Limit the result to a specific schema type. */
    typeQuery?: TypeQuery | undefined;
    /** Limit the result to a specific state of the schema. */
    stateQuery?: StateQuery | undefined;
    /** Limit the result to a specific schema ID. */
    idQuery?: IDQuery | undefined;
}
export interface OrQuery {
    queries: SearchQuery[];
}
export interface AndQuery {
    queries: SearchQuery[];
}
export interface NotQuery {
    query: SearchQuery | undefined;
}
export interface IDQuery {
    /** Defines the ID of the user schema to query for. */
    id: string;
    /** Defines which text comparison method used for the id query. */
    method: TextQueryMethod;
}
export interface TypeQuery {
    /** Defines which type to query for. */
    type: string;
    /** Defines which text comparison method used for the type query. */
    method: TextQueryMethod;
}
export interface StateQuery {
    /** Defines the state to query for. */
    state: State;
}
export declare const UserSchema: {
    encode(message: UserSchema, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): UserSchema;
    fromJSON(object: any): UserSchema;
    toJSON(message: UserSchema): unknown;
    create(base?: DeepPartial<UserSchema>): UserSchema;
    fromPartial(object: DeepPartial<UserSchema>): UserSchema;
};
export declare const SearchQuery: {
    encode(message: SearchQuery, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): SearchQuery;
    fromJSON(object: any): SearchQuery;
    toJSON(message: SearchQuery): unknown;
    create(base?: DeepPartial<SearchQuery>): SearchQuery;
    fromPartial(object: DeepPartial<SearchQuery>): SearchQuery;
};
export declare const OrQuery: {
    encode(message: OrQuery, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): OrQuery;
    fromJSON(object: any): OrQuery;
    toJSON(message: OrQuery): unknown;
    create(base?: DeepPartial<OrQuery>): OrQuery;
    fromPartial(object: DeepPartial<OrQuery>): OrQuery;
};
export declare const AndQuery: {
    encode(message: AndQuery, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): AndQuery;
    fromJSON(object: any): AndQuery;
    toJSON(message: AndQuery): unknown;
    create(base?: DeepPartial<AndQuery>): AndQuery;
    fromPartial(object: DeepPartial<AndQuery>): AndQuery;
};
export declare const NotQuery: {
    encode(message: NotQuery, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): NotQuery;
    fromJSON(object: any): NotQuery;
    toJSON(message: NotQuery): unknown;
    create(base?: DeepPartial<NotQuery>): NotQuery;
    fromPartial(object: DeepPartial<NotQuery>): NotQuery;
};
export declare const IDQuery: {
    encode(message: IDQuery, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): IDQuery;
    fromJSON(object: any): IDQuery;
    toJSON(message: IDQuery): unknown;
    create(base?: DeepPartial<IDQuery>): IDQuery;
    fromPartial(object: DeepPartial<IDQuery>): IDQuery;
};
export declare const TypeQuery: {
    encode(message: TypeQuery, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): TypeQuery;
    fromJSON(object: any): TypeQuery;
    toJSON(message: TypeQuery): unknown;
    create(base?: DeepPartial<TypeQuery>): TypeQuery;
    fromPartial(object: DeepPartial<TypeQuery>): TypeQuery;
};
export declare const StateQuery: {
    encode(message: StateQuery, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): StateQuery;
    fromJSON(object: any): StateQuery;
    toJSON(message: StateQuery): unknown;
    create(base?: DeepPartial<StateQuery>): StateQuery;
    fromPartial(object: DeepPartial<StateQuery>): StateQuery;
};
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
    [K in keyof T]?: DeepPartial<T[K]>;
} : Partial<T>;
export {};