import { ServiceType } from "@protobuf-ts/runtime-rpc";
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
import type { IBinaryWriter } from "@protobuf-ts/runtime";
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
import type { IBinaryReader } from "@protobuf-ts/runtime";
import type { PartialMessage } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";
import { ReasonCode } from "./common.js";
import { ConsentRef } from "./common.js";
import { ResourceSelectors } from "./common.js";
import { Timestamp } from "../../google/protobuf/timestamp.js";
import { ExternalPrincipalType } from "./common.js";
/**
 * @generated from protobuf message nimi.runtime.v1.AuthorizeExternalPrincipalRequest
 */
export interface AuthorizeExternalPrincipalRequest {
    /**
     * @generated from protobuf field: string domain = 1
     */
    domain: string;
    /**
     * @generated from protobuf field: string app_id = 2
     */
    appId: string;
    /**
     * @generated from protobuf field: string external_principal_id = 3
     */
    externalPrincipalId: string;
    /**
     * @generated from protobuf field: nimi.runtime.v1.ExternalPrincipalType external_principal_type = 4
     */
    externalPrincipalType: ExternalPrincipalType;
    /**
     * @generated from protobuf field: string subject_user_id = 5
     */
    subjectUserId: string;
    /**
     * @generated from protobuf field: string consent_id = 6
     */
    consentId: string;
    /**
     * @generated from protobuf field: string consent_version = 7
     */
    consentVersion: string;
    /**
     * @generated from protobuf field: google.protobuf.Timestamp decision_at = 8
     */
    decisionAt?: Timestamp;
    /**
     * @generated from protobuf field: string policy_version = 9
     */
    policyVersion: string;
    /**
     * @generated from protobuf field: nimi.runtime.v1.PolicyMode policy_mode = 10
     */
    policyMode: PolicyMode;
    /**
     * @generated from protobuf field: nimi.runtime.v1.AuthorizationPreset preset = 11
     */
    preset: AuthorizationPreset;
    /**
     * @generated from protobuf field: repeated string scopes = 12
     */
    scopes: string[];
    /**
     * @generated from protobuf field: nimi.runtime.v1.ResourceSelectors resource_selectors = 13
     */
    resourceSelectors?: ResourceSelectors;
    /**
     * @generated from protobuf field: bool can_delegate = 14
     */
    canDelegate: boolean;
    /**
     * @generated from protobuf field: int32 max_delegation_depth = 15
     */
    maxDelegationDepth: number;
    /**
     * @generated from protobuf field: int32 ttl_seconds = 16
     */
    ttlSeconds: number;
    /**
     * @generated from protobuf field: string scope_catalog_version = 17
     */
    scopeCatalogVersion: string;
    /**
     * @generated from protobuf field: bool policy_override = 18
     */
    policyOverride: boolean;
}
/**
 * @generated from protobuf message nimi.runtime.v1.AuthorizeExternalPrincipalResponse
 */
export interface AuthorizeExternalPrincipalResponse {
    /**
     * @generated from protobuf field: string token_id = 1
     */
    tokenId: string;
    /**
     * @generated from protobuf field: string app_id = 2
     */
    appId: string;
    /**
     * @generated from protobuf field: string subject_user_id = 3
     */
    subjectUserId: string;
    /**
     * @generated from protobuf field: string external_principal_id = 4
     */
    externalPrincipalId: string;
    /**
     * @generated from protobuf field: repeated string effective_scopes = 5
     */
    effectiveScopes: string[];
    /**
     * @generated from protobuf field: nimi.runtime.v1.ResourceSelectors resource_selectors = 6
     */
    resourceSelectors?: ResourceSelectors;
    /**
     * @generated from protobuf field: nimi.runtime.v1.ConsentRef consent_ref = 7
     */
    consentRef?: ConsentRef;
    /**
     * @generated from protobuf field: string policy_version = 8
     */
    policyVersion: string;
    /**
     * @generated from protobuf field: string issued_scope_catalog_version = 9
     */
    issuedScopeCatalogVersion: string;
    /**
     * @generated from protobuf field: bool can_delegate = 10
     */
    canDelegate: boolean;
    /**
     * @generated from protobuf field: google.protobuf.Timestamp expires_at = 11
     */
    expiresAt?: Timestamp;
    /**
     * @generated from protobuf field: string secret = 12
     */
    secret: string;
}
/**
 * @generated from protobuf message nimi.runtime.v1.ValidateAppAccessTokenRequest
 */
export interface ValidateAppAccessTokenRequest {
    /**
     * @generated from protobuf field: string app_id = 1
     */
    appId: string;
    /**
     * @generated from protobuf field: string token_id = 2
     */
    tokenId: string;
    /**
     * @generated from protobuf field: string subject_user_id = 3
     */
    subjectUserId: string;
    /**
     * @generated from protobuf field: string operation = 4
     */
    operation: string;
    /**
     * @generated from protobuf field: repeated string requested_scopes = 5
     */
    requestedScopes: string[];
    /**
     * @generated from protobuf field: nimi.runtime.v1.ResourceSelectors resource_selectors = 6
     */
    resourceSelectors?: ResourceSelectors;
}
/**
 * @generated from protobuf message nimi.runtime.v1.ValidateAppAccessTokenResponse
 */
export interface ValidateAppAccessTokenResponse {
    /**
     * @generated from protobuf field: bool valid = 1
     */
    valid: boolean;
    /**
     * @generated from protobuf field: nimi.runtime.v1.ReasonCode reason_code = 2
     */
    reasonCode: ReasonCode;
    /**
     * @generated from protobuf field: repeated string effective_scopes = 3
     */
    effectiveScopes: string[];
    /**
     * @generated from protobuf field: string policy_version = 4
     */
    policyVersion: string;
    /**
     * @generated from protobuf field: string issued_scope_catalog_version = 5
     */
    issuedScopeCatalogVersion: string;
    /**
     * @generated from protobuf field: string action_hint = 6
     */
    actionHint: string;
}
/**
 * @generated from protobuf message nimi.runtime.v1.RevokeAppAccessTokenRequest
 */
export interface RevokeAppAccessTokenRequest {
    /**
     * @generated from protobuf field: string app_id = 1
     */
    appId: string;
    /**
     * @generated from protobuf field: string token_id = 2
     */
    tokenId: string;
}
/**
 * @generated from protobuf message nimi.runtime.v1.IssueDelegatedAccessTokenRequest
 */
export interface IssueDelegatedAccessTokenRequest {
    /**
     * @generated from protobuf field: string app_id = 1
     */
    appId: string;
    /**
     * @generated from protobuf field: string parent_token_id = 2
     */
    parentTokenId: string;
    /**
     * @generated from protobuf field: repeated string scopes = 3
     */
    scopes: string[];
    /**
     * @generated from protobuf field: nimi.runtime.v1.ResourceSelectors resource_selectors = 4
     */
    resourceSelectors?: ResourceSelectors;
    /**
     * @generated from protobuf field: int32 ttl_seconds = 5
     */
    ttlSeconds: number;
}
/**
 * @generated from protobuf message nimi.runtime.v1.IssueDelegatedAccessTokenResponse
 */
export interface IssueDelegatedAccessTokenResponse {
    /**
     * @generated from protobuf field: string token_id = 1
     */
    tokenId: string;
    /**
     * @generated from protobuf field: string parent_token_id = 2
     */
    parentTokenId: string;
    /**
     * @generated from protobuf field: repeated string effective_scopes = 3
     */
    effectiveScopes: string[];
    /**
     * @generated from protobuf field: google.protobuf.Timestamp expires_at = 4
     */
    expiresAt?: Timestamp;
    /**
     * @generated from protobuf field: string secret = 5
     */
    secret: string;
}
/**
 * @generated from protobuf message nimi.runtime.v1.ListTokenChainRequest
 */
export interface ListTokenChainRequest {
    /**
     * @generated from protobuf field: string app_id = 1
     */
    appId: string;
    /**
     * @generated from protobuf field: string root_token_id = 2
     */
    rootTokenId: string;
    /**
     * @generated from protobuf field: bool include_revoked = 3
     */
    includeRevoked: boolean;
    /**
     * @generated from protobuf field: int32 page_size = 4
     */
    pageSize: number;
    /**
     * @generated from protobuf field: string page_token = 5
     */
    pageToken: string;
}
/**
 * @generated from protobuf message nimi.runtime.v1.TokenChainEntry
 */
export interface TokenChainEntry {
    /**
     * @generated from protobuf field: string token_id = 1
     */
    tokenId: string;
    /**
     * @generated from protobuf field: string parent_token_id = 2
     */
    parentTokenId: string;
    /**
     * @generated from protobuf field: string principal_id = 3
     */
    principalId: string;
    /**
     * @generated from protobuf field: string principal_type = 4
     */
    principalType: string;
    /**
     * @generated from protobuf field: repeated string effective_scopes = 5
     */
    effectiveScopes: string[];
    /**
     * @generated from protobuf field: google.protobuf.Timestamp issued_at = 6
     */
    issuedAt?: Timestamp;
    /**
     * @generated from protobuf field: google.protobuf.Timestamp expires_at = 7
     */
    expiresAt?: Timestamp;
    /**
     * @generated from protobuf field: bool revoked = 8
     */
    revoked: boolean;
    /**
     * @generated from protobuf field: int32 delegation_depth = 9
     */
    delegationDepth: number;
    /**
     * @generated from protobuf field: string policy_version = 10
     */
    policyVersion: string;
    /**
     * @generated from protobuf field: string issued_scope_catalog_version = 11
     */
    issuedScopeCatalogVersion: string;
}
/**
 * @generated from protobuf message nimi.runtime.v1.ListTokenChainResponse
 */
export interface ListTokenChainResponse {
    /**
     * @generated from protobuf field: repeated nimi.runtime.v1.TokenChainEntry entries = 1
     */
    entries: TokenChainEntry[];
    /**
     * @generated from protobuf field: string next_page_token = 2
     */
    nextPageToken: string;
    /**
     * @generated from protobuf field: bool has_more = 3
     */
    hasMore: boolean;
}
/**
 * @generated from protobuf enum nimi.runtime.v1.PolicyMode
 */
export declare enum PolicyMode {
    /**
     * @generated from protobuf enum value: POLICY_MODE_UNSPECIFIED = 0;
     */
    UNSPECIFIED = 0,
    /**
     * @generated from protobuf enum value: POLICY_MODE_PRESET = 1;
     */
    PRESET = 1,
    /**
     * @generated from protobuf enum value: POLICY_MODE_CUSTOM = 2;
     */
    CUSTOM = 2
}
/**
 * @generated from protobuf enum nimi.runtime.v1.AuthorizationPreset
 */
export declare enum AuthorizationPreset {
    /**
     * @generated from protobuf enum value: AUTHORIZATION_PRESET_UNSPECIFIED = 0;
     */
    UNSPECIFIED = 0,
    /**
     * @generated from protobuf enum value: AUTHORIZATION_PRESET_READ_ONLY = 1;
     */
    READ_ONLY = 1,
    /**
     * @generated from protobuf enum value: AUTHORIZATION_PRESET_FULL = 2;
     */
    FULL = 2,
    /**
     * @generated from protobuf enum value: AUTHORIZATION_PRESET_DELEGATE = 3;
     */
    DELEGATE = 3
}
declare class AuthorizeExternalPrincipalRequest$Type extends MessageType<AuthorizeExternalPrincipalRequest> {
    constructor();
    create(value?: PartialMessage<AuthorizeExternalPrincipalRequest>): AuthorizeExternalPrincipalRequest;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AuthorizeExternalPrincipalRequest): AuthorizeExternalPrincipalRequest;
    internalBinaryWrite(message: AuthorizeExternalPrincipalRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message nimi.runtime.v1.AuthorizeExternalPrincipalRequest
 */
export declare const AuthorizeExternalPrincipalRequest: AuthorizeExternalPrincipalRequest$Type;
declare class AuthorizeExternalPrincipalResponse$Type extends MessageType<AuthorizeExternalPrincipalResponse> {
    constructor();
    create(value?: PartialMessage<AuthorizeExternalPrincipalResponse>): AuthorizeExternalPrincipalResponse;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AuthorizeExternalPrincipalResponse): AuthorizeExternalPrincipalResponse;
    internalBinaryWrite(message: AuthorizeExternalPrincipalResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message nimi.runtime.v1.AuthorizeExternalPrincipalResponse
 */
export declare const AuthorizeExternalPrincipalResponse: AuthorizeExternalPrincipalResponse$Type;
declare class ValidateAppAccessTokenRequest$Type extends MessageType<ValidateAppAccessTokenRequest> {
    constructor();
    create(value?: PartialMessage<ValidateAppAccessTokenRequest>): ValidateAppAccessTokenRequest;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ValidateAppAccessTokenRequest): ValidateAppAccessTokenRequest;
    internalBinaryWrite(message: ValidateAppAccessTokenRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message nimi.runtime.v1.ValidateAppAccessTokenRequest
 */
export declare const ValidateAppAccessTokenRequest: ValidateAppAccessTokenRequest$Type;
declare class ValidateAppAccessTokenResponse$Type extends MessageType<ValidateAppAccessTokenResponse> {
    constructor();
    create(value?: PartialMessage<ValidateAppAccessTokenResponse>): ValidateAppAccessTokenResponse;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ValidateAppAccessTokenResponse): ValidateAppAccessTokenResponse;
    internalBinaryWrite(message: ValidateAppAccessTokenResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message nimi.runtime.v1.ValidateAppAccessTokenResponse
 */
export declare const ValidateAppAccessTokenResponse: ValidateAppAccessTokenResponse$Type;
declare class RevokeAppAccessTokenRequest$Type extends MessageType<RevokeAppAccessTokenRequest> {
    constructor();
    create(value?: PartialMessage<RevokeAppAccessTokenRequest>): RevokeAppAccessTokenRequest;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RevokeAppAccessTokenRequest): RevokeAppAccessTokenRequest;
    internalBinaryWrite(message: RevokeAppAccessTokenRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message nimi.runtime.v1.RevokeAppAccessTokenRequest
 */
export declare const RevokeAppAccessTokenRequest: RevokeAppAccessTokenRequest$Type;
declare class IssueDelegatedAccessTokenRequest$Type extends MessageType<IssueDelegatedAccessTokenRequest> {
    constructor();
    create(value?: PartialMessage<IssueDelegatedAccessTokenRequest>): IssueDelegatedAccessTokenRequest;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: IssueDelegatedAccessTokenRequest): IssueDelegatedAccessTokenRequest;
    internalBinaryWrite(message: IssueDelegatedAccessTokenRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message nimi.runtime.v1.IssueDelegatedAccessTokenRequest
 */
export declare const IssueDelegatedAccessTokenRequest: IssueDelegatedAccessTokenRequest$Type;
declare class IssueDelegatedAccessTokenResponse$Type extends MessageType<IssueDelegatedAccessTokenResponse> {
    constructor();
    create(value?: PartialMessage<IssueDelegatedAccessTokenResponse>): IssueDelegatedAccessTokenResponse;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: IssueDelegatedAccessTokenResponse): IssueDelegatedAccessTokenResponse;
    internalBinaryWrite(message: IssueDelegatedAccessTokenResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message nimi.runtime.v1.IssueDelegatedAccessTokenResponse
 */
export declare const IssueDelegatedAccessTokenResponse: IssueDelegatedAccessTokenResponse$Type;
declare class ListTokenChainRequest$Type extends MessageType<ListTokenChainRequest> {
    constructor();
    create(value?: PartialMessage<ListTokenChainRequest>): ListTokenChainRequest;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListTokenChainRequest): ListTokenChainRequest;
    internalBinaryWrite(message: ListTokenChainRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message nimi.runtime.v1.ListTokenChainRequest
 */
export declare const ListTokenChainRequest: ListTokenChainRequest$Type;
declare class TokenChainEntry$Type extends MessageType<TokenChainEntry> {
    constructor();
    create(value?: PartialMessage<TokenChainEntry>): TokenChainEntry;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TokenChainEntry): TokenChainEntry;
    internalBinaryWrite(message: TokenChainEntry, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message nimi.runtime.v1.TokenChainEntry
 */
export declare const TokenChainEntry: TokenChainEntry$Type;
declare class ListTokenChainResponse$Type extends MessageType<ListTokenChainResponse> {
    constructor();
    create(value?: PartialMessage<ListTokenChainResponse>): ListTokenChainResponse;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListTokenChainResponse): ListTokenChainResponse;
    internalBinaryWrite(message: ListTokenChainResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message nimi.runtime.v1.ListTokenChainResponse
 */
export declare const ListTokenChainResponse: ListTokenChainResponse$Type;
/**
 * @generated ServiceType for protobuf service nimi.runtime.v1.RuntimeGrantService
 */
export declare const RuntimeGrantService: ServiceType;
export {};
//# sourceMappingURL=grant.d.ts.map