import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
import type { CallContext, CallOptions } from "nice-grpc-common";
import type { FileDescriptorProto as FileDescriptorProto1 } from "ts-proto-descriptors";
import { Empty } from "../../google/protobuf/empty";
import { Subject, Tokens } from "./auth";
import { Status } from "./status";
import { UserResponse } from "./user";
export declare const protobufPackage = "io.restorecommerce.oauth";
export interface ServicesResponse {
    services?: string[] | undefined;
}
export interface GenerateLinksResponse {
    links?: {
        [key: string]: string;
    } | undefined;
}
export interface GenerateLinksResponse_LinksEntry {
    key: string;
    value: string;
}
export interface ExchangeCodeRequest {
    service?: string | undefined;
    code?: string | undefined;
    state?: string | undefined;
}
export interface ExchangeCodeResponse {
    user?: UserResponse | undefined;
    email?: string | undefined;
    token?: Tokens | undefined;
}
export interface GetTokenRequest {
    subject?: Subject | undefined;
    service?: string | undefined;
}
export interface GetTokenResponse {
    status?: Status | undefined;
    token?: string | undefined;
}
export declare const ServicesResponse: MessageFns<ServicesResponse>;
export declare const GenerateLinksResponse: MessageFns<GenerateLinksResponse>;
export declare const GenerateLinksResponse_LinksEntry: MessageFns<GenerateLinksResponse_LinksEntry>;
export declare const ExchangeCodeRequest: MessageFns<ExchangeCodeRequest>;
export declare const ExchangeCodeResponse: MessageFns<ExchangeCodeResponse>;
export declare const GetTokenRequest: MessageFns<GetTokenRequest>;
export declare const GetTokenResponse: MessageFns<GetTokenResponse>;
export type OAuthServiceDefinition = typeof OAuthServiceDefinition;
export declare const OAuthServiceDefinition: {
    readonly name: "OAuthService";
    readonly fullName: "io.restorecommerce.oauth.OAuthService";
    readonly methods: {
        readonly generateLinks: {
            readonly name: "GenerateLinks";
            readonly requestType: typeof Empty;
            readonly requestStream: false;
            readonly responseType: typeof GenerateLinksResponse;
            readonly responseStream: false;
            readonly options: {
                readonly _unknownFields: {
                    readonly 248008: readonly [Buffer<ArrayBufferLike>];
                };
            };
        };
        readonly getToken: {
            readonly name: "GetToken";
            readonly requestType: typeof GetTokenRequest;
            readonly requestStream: false;
            readonly responseType: typeof GetTokenResponse;
            readonly responseStream: false;
            readonly options: {
                readonly _unknownFields: {
                    readonly 248008: readonly [Buffer<ArrayBufferLike>];
                };
            };
        };
        readonly availableServices: {
            readonly name: "AvailableServices";
            readonly requestType: typeof Empty;
            readonly requestStream: false;
            readonly responseType: typeof ServicesResponse;
            readonly responseStream: false;
            readonly options: {
                readonly _unknownFields: {
                    readonly 248008: readonly [Buffer<ArrayBufferLike>];
                };
            };
        };
        readonly exchangeCode: {
            readonly name: "ExchangeCode";
            readonly requestType: typeof ExchangeCodeRequest;
            readonly requestStream: false;
            readonly responseType: typeof ExchangeCodeResponse;
            readonly responseStream: false;
            readonly options: {};
        };
    };
};
export interface OAuthServiceImplementation<CallContextExt = {}> {
    generateLinks(request: Empty, context: CallContext & CallContextExt): Promise<DeepPartial<GenerateLinksResponse>>;
    getToken(request: GetTokenRequest, context: CallContext & CallContextExt): Promise<DeepPartial<GetTokenResponse>>;
    availableServices(request: Empty, context: CallContext & CallContextExt): Promise<DeepPartial<ServicesResponse>>;
    exchangeCode(request: ExchangeCodeRequest, context: CallContext & CallContextExt): Promise<DeepPartial<ExchangeCodeResponse>>;
}
export interface OAuthServiceClient<CallOptionsExt = {}> {
    generateLinks(request: DeepPartial<Empty>, options?: CallOptions & CallOptionsExt): Promise<GenerateLinksResponse>;
    getToken(request: DeepPartial<GetTokenRequest>, options?: CallOptions & CallOptionsExt): Promise<GetTokenResponse>;
    availableServices(request: DeepPartial<Empty>, options?: CallOptions & CallOptionsExt): Promise<ServicesResponse>;
    exchangeCode(request: DeepPartial<ExchangeCodeRequest>, options?: CallOptions & CallOptionsExt): Promise<ExchangeCodeResponse>;
}
type ProtoMetaMessageOptions = {
    options?: {
        [key: string]: any;
    };
    fields?: {
        [key: string]: {
            [key: string]: any;
        };
    };
    oneof?: {
        [key: string]: {
            [key: string]: any;
        };
    };
    nested?: {
        [key: string]: ProtoMetaMessageOptions;
    };
};
export interface ProtoMetadata {
    fileDescriptor: FileDescriptorProto1;
    references: {
        [key: string]: any;
    };
    dependencies?: ProtoMetadata[];
    options?: {
        options?: {
            [key: string]: any;
        };
        services?: {
            [key: string]: {
                options?: {
                    [key: string]: any;
                };
                methods?: {
                    [key: string]: {
                        [key: string]: any;
                    };
                };
            };
        };
        messages?: {
            [key: string]: ProtoMetaMessageOptions;
        };
        enums?: {
            [key: string]: {
                options?: {
                    [key: string]: any;
                };
                values?: {
                    [key: string]: {
                        [key: string]: any;
                    };
                };
            };
        };
    };
}
export declare const protoMetadata: ProtoMetadata;
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T : 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 interface MessageFns<T> {
    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>): T;
    fromPartial(object: DeepPartial<T>): T;
}
export {};
//# sourceMappingURL=oauth.d.ts.map