@searchmoe/search-api
Version:
SearchMoe API client with generated gRPC bindings for TypeScript.
334 lines (333 loc) • 19.5 kB
text/typescript
// @generated by protobuf-ts 2.10.0 with parameter optimize_code_size
// @generated from protobuf file "auth_svc.proto" (package "auth_svc", syntax proto3)
// tslint:disable
//
// Code generated with goa v3.20.1, DO NOT EDIT.
//
// AuthSvc protocol buffer definition
//
// Command:
// $ goa gen github.com/searchmoe/search-service/api/design -o ../
//
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
import { AuthSvc } from "./auth_svc";
import type { HealthCheckResponse } from "./auth_svc";
import type { HealthCheckRequest } from "./auth_svc";
import type { OauthGoogleCallbackResponse } from "./auth_svc";
import type { OauthGoogleCallbackRequest } from "./auth_svc";
import type { OauthGoogleSignInResponse } from "./auth_svc";
import type { OauthGoogleSignInRequest } from "./auth_svc";
import type { OauthGoogleAttachResponse } from "./auth_svc";
import type { OauthGoogleAttachRequest } from "./auth_svc";
import type { ProfileSetContactPhoneResponse } from "./auth_svc";
import type { ProfileSetContactPhoneRequest } from "./auth_svc";
import type { ProfileSetNameResponse } from "./auth_svc";
import type { ProfileSetNameRequest } from "./auth_svc";
import type { ProfileInfoResponse } from "./auth_svc";
import type { ProfileInfoRequest } from "./auth_svc";
import type { SessionCheckResponse } from "./auth_svc";
import type { SessionCheckRequest } from "./auth_svc";
import type { EmailSignInAttachFinalizeResponse } from "./auth_svc";
import type { EmailSignInAttachFinalizeRequest } from "./auth_svc";
import type { EmailSignInAttachResponse } from "./auth_svc";
import type { EmailSignInAttachRequest } from "./auth_svc";
import type { WalletSignInAttachFinalizeResponse } from "./auth_svc";
import type { WalletSignInAttachFinalizeRequest } from "./auth_svc";
import type { OauthDetachResponse } from "./auth_svc";
import type { OauthDetachRequest } from "./auth_svc";
import type { WalletSignInAttachResponse } from "./auth_svc";
import type { WalletSignInAttachRequest } from "./auth_svc";
import type { EmailSignInFinalizeResponse } from "./auth_svc";
import type { EmailSignInFinalizeRequest } from "./auth_svc";
import type { EmailSignInStartResponse } from "./auth_svc";
import type { EmailSignInStartRequest } from "./auth_svc";
import type { WalletSignInFinalizeResponse } from "./auth_svc";
import type { WalletSignInFinalizeRequest } from "./auth_svc";
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
import type { WalletSignInStartResponse } from "./auth_svc";
import type { WalletSignInStartRequest } from "./auth_svc";
import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
/**
* Service is responsible for issuing scoped JWT tokens and user auth on the
* platform.
*
* @generated from protobuf service auth_svc.AuthSvc
*/
export interface IAuthSvcClient {
/**
* Initializes flow of the wallet-based sign-in
*
* @generated from protobuf rpc: WalletSignInStart(auth_svc.WalletSignInStartRequest) returns (auth_svc.WalletSignInStartResponse);
*/
walletSignInStart(input: WalletSignInStartRequest, options?: RpcOptions): UnaryCall<WalletSignInStartRequest, WalletSignInStartResponse>;
/**
* Checks the signature of a signin challenge and issues a valid JWT
*
* @generated from protobuf rpc: WalletSignInFinalize(auth_svc.WalletSignInFinalizeRequest) returns (auth_svc.WalletSignInFinalizeResponse);
*/
walletSignInFinalize(input: WalletSignInFinalizeRequest, options?: RpcOptions): UnaryCall<WalletSignInFinalizeRequest, WalletSignInFinalizeResponse>;
/**
* Initializes flow of the email-based sign-in
*
* @generated from protobuf rpc: EmailSignInStart(auth_svc.EmailSignInStartRequest) returns (auth_svc.EmailSignInStartResponse);
*/
emailSignInStart(input: EmailSignInStartRequest, options?: RpcOptions): UnaryCall<EmailSignInStartRequest, EmailSignInStartResponse>;
/**
* Verifies the bundle and an x-stamp of the email signin challenge and issues
* a valid JWT
*
* @generated from protobuf rpc: EmailSignInFinalize(auth_svc.EmailSignInFinalizeRequest) returns (auth_svc.EmailSignInFinalizeResponse);
*/
emailSignInFinalize(input: EmailSignInFinalizeRequest, options?: RpcOptions): UnaryCall<EmailSignInFinalizeRequest, EmailSignInFinalizeResponse>;
/**
* Initializes flow of attaching a new sign-in wallet to an existing user
*
* @generated from protobuf rpc: WalletSignInAttach(auth_svc.WalletSignInAttachRequest) returns (auth_svc.WalletSignInAttachResponse);
*/
walletSignInAttach(input: WalletSignInAttachRequest, options?: RpcOptions): UnaryCall<WalletSignInAttachRequest, WalletSignInAttachResponse>;
/**
* Remove oauth link for the given provider.
*
* @generated from protobuf rpc: OauthDetach(auth_svc.OauthDetachRequest) returns (auth_svc.OauthDetachResponse);
*/
oauthDetach(input: OauthDetachRequest, options?: RpcOptions): UnaryCall<OauthDetachRequest, OauthDetachResponse>;
/**
* Checks the signature of a sign-in attach challenge and adds wallet as a
* valid sign-in method
*
* @generated from protobuf rpc: WalletSignInAttachFinalize(auth_svc.WalletSignInAttachFinalizeRequest) returns (auth_svc.WalletSignInAttachFinalizeResponse);
*/
walletSignInAttachFinalize(input: WalletSignInAttachFinalizeRequest, options?: RpcOptions): UnaryCall<WalletSignInAttachFinalizeRequest, WalletSignInAttachFinalizeResponse>;
/**
* Initializes a flow of attaching an email to existing user
*
* @generated from protobuf rpc: EmailSignInAttach(auth_svc.EmailSignInAttachRequest) returns (auth_svc.EmailSignInAttachResponse);
*/
emailSignInAttach(input: EmailSignInAttachRequest, options?: RpcOptions): UnaryCall<EmailSignInAttachRequest, EmailSignInAttachResponse>;
/**
* Verifies the bundle and an x-stamp of the email attach challenge and issues
* a valid JWT
*
* @generated from protobuf rpc: EmailSignInAttachFinalize(auth_svc.EmailSignInAttachFinalizeRequest) returns (auth_svc.EmailSignInAttachFinalizeResponse);
*/
emailSignInAttachFinalize(input: EmailSignInAttachFinalizeRequest, options?: RpcOptions): UnaryCall<EmailSignInAttachFinalizeRequest, EmailSignInAttachFinalizeResponse>;
/**
* Checks the provided JWT for validity.
*
* @generated from protobuf rpc: SessionCheck(auth_svc.SessionCheckRequest) returns (auth_svc.SessionCheckResponse);
*/
sessionCheck(input: SessionCheckRequest, options?: RpcOptions): UnaryCall<SessionCheckRequest, SessionCheckResponse>;
/**
* Get info about my profile.
*
* @generated from protobuf rpc: ProfileInfo(auth_svc.ProfileInfoRequest) returns (auth_svc.ProfileInfoResponse);
*/
profileInfo(input: ProfileInfoRequest, options?: RpcOptions): UnaryCall<ProfileInfoRequest, ProfileInfoResponse>;
/**
* Set user profile full name.
*
* @generated from protobuf rpc: ProfileSetName(auth_svc.ProfileSetNameRequest) returns (auth_svc.ProfileSetNameResponse);
*/
profileSetName(input: ProfileSetNameRequest, options?: RpcOptions): UnaryCall<ProfileSetNameRequest, ProfileSetNameResponse>;
/**
* Set user profile contact phone number.
*
* @generated from protobuf rpc: ProfileSetContactPhone(auth_svc.ProfileSetContactPhoneRequest) returns (auth_svc.ProfileSetContactPhoneResponse);
*/
profileSetContactPhone(input: ProfileSetContactPhoneRequest, options?: RpcOptions): UnaryCall<ProfileSetContactPhoneRequest, ProfileSetContactPhoneResponse>;
/**
* Get the redirect URL for Google auth: attaching to an existing account.
*
* @generated from protobuf rpc: OauthGoogleAttach(auth_svc.OauthGoogleAttachRequest) returns (auth_svc.OauthGoogleAttachResponse);
*/
oauthGoogleAttach(input: OauthGoogleAttachRequest, options?: RpcOptions): UnaryCall<OauthGoogleAttachRequest, OauthGoogleAttachResponse>;
/**
* Get the redirect URL for Google auth
*
* @generated from protobuf rpc: OauthGoogleSignIn(auth_svc.OauthGoogleSignInRequest) returns (auth_svc.OauthGoogleSignInResponse);
*/
oauthGoogleSignIn(input: OauthGoogleSignInRequest, options?: RpcOptions): UnaryCall<OauthGoogleSignInRequest, OauthGoogleSignInResponse>;
/**
* Callback handler for Google OAuth
*
* @generated from protobuf rpc: OauthGoogleCallback(auth_svc.OauthGoogleCallbackRequest) returns (auth_svc.OauthGoogleCallbackResponse);
*/
oauthGoogleCallback(input: OauthGoogleCallbackRequest, options?: RpcOptions): UnaryCall<OauthGoogleCallbackRequest, OauthGoogleCallbackResponse>;
/**
* Health checking and uptime stats endpoint.
*
* @generated from protobuf rpc: HealthCheck(auth_svc.HealthCheckRequest) returns (auth_svc.HealthCheckResponse);
*/
healthCheck(input: HealthCheckRequest, options?: RpcOptions): UnaryCall<HealthCheckRequest, HealthCheckResponse>;
}
/**
* Service is responsible for issuing scoped JWT tokens and user auth on the
* platform.
*
* @generated from protobuf service auth_svc.AuthSvc
*/
export class AuthSvcClient implements IAuthSvcClient, ServiceInfo {
typeName = AuthSvc.typeName;
methods = AuthSvc.methods;
options = AuthSvc.options;
constructor(private readonly _transport: RpcTransport) {
}
/**
* Initializes flow of the wallet-based sign-in
*
* @generated from protobuf rpc: WalletSignInStart(auth_svc.WalletSignInStartRequest) returns (auth_svc.WalletSignInStartResponse);
*/
walletSignInStart(input: WalletSignInStartRequest, options?: RpcOptions): UnaryCall<WalletSignInStartRequest, WalletSignInStartResponse> {
const method = this.methods[0], opt = this._transport.mergeOptions(options);
return stackIntercept<WalletSignInStartRequest, WalletSignInStartResponse>("unary", this._transport, method, opt, input);
}
/**
* Checks the signature of a signin challenge and issues a valid JWT
*
* @generated from protobuf rpc: WalletSignInFinalize(auth_svc.WalletSignInFinalizeRequest) returns (auth_svc.WalletSignInFinalizeResponse);
*/
walletSignInFinalize(input: WalletSignInFinalizeRequest, options?: RpcOptions): UnaryCall<WalletSignInFinalizeRequest, WalletSignInFinalizeResponse> {
const method = this.methods[1], opt = this._transport.mergeOptions(options);
return stackIntercept<WalletSignInFinalizeRequest, WalletSignInFinalizeResponse>("unary", this._transport, method, opt, input);
}
/**
* Initializes flow of the email-based sign-in
*
* @generated from protobuf rpc: EmailSignInStart(auth_svc.EmailSignInStartRequest) returns (auth_svc.EmailSignInStartResponse);
*/
emailSignInStart(input: EmailSignInStartRequest, options?: RpcOptions): UnaryCall<EmailSignInStartRequest, EmailSignInStartResponse> {
const method = this.methods[2], opt = this._transport.mergeOptions(options);
return stackIntercept<EmailSignInStartRequest, EmailSignInStartResponse>("unary", this._transport, method, opt, input);
}
/**
* Verifies the bundle and an x-stamp of the email signin challenge and issues
* a valid JWT
*
* @generated from protobuf rpc: EmailSignInFinalize(auth_svc.EmailSignInFinalizeRequest) returns (auth_svc.EmailSignInFinalizeResponse);
*/
emailSignInFinalize(input: EmailSignInFinalizeRequest, options?: RpcOptions): UnaryCall<EmailSignInFinalizeRequest, EmailSignInFinalizeResponse> {
const method = this.methods[3], opt = this._transport.mergeOptions(options);
return stackIntercept<EmailSignInFinalizeRequest, EmailSignInFinalizeResponse>("unary", this._transport, method, opt, input);
}
/**
* Initializes flow of attaching a new sign-in wallet to an existing user
*
* @generated from protobuf rpc: WalletSignInAttach(auth_svc.WalletSignInAttachRequest) returns (auth_svc.WalletSignInAttachResponse);
*/
walletSignInAttach(input: WalletSignInAttachRequest, options?: RpcOptions): UnaryCall<WalletSignInAttachRequest, WalletSignInAttachResponse> {
const method = this.methods[4], opt = this._transport.mergeOptions(options);
return stackIntercept<WalletSignInAttachRequest, WalletSignInAttachResponse>("unary", this._transport, method, opt, input);
}
/**
* Remove oauth link for the given provider.
*
* @generated from protobuf rpc: OauthDetach(auth_svc.OauthDetachRequest) returns (auth_svc.OauthDetachResponse);
*/
oauthDetach(input: OauthDetachRequest, options?: RpcOptions): UnaryCall<OauthDetachRequest, OauthDetachResponse> {
const method = this.methods[5], opt = this._transport.mergeOptions(options);
return stackIntercept<OauthDetachRequest, OauthDetachResponse>("unary", this._transport, method, opt, input);
}
/**
* Checks the signature of a sign-in attach challenge and adds wallet as a
* valid sign-in method
*
* @generated from protobuf rpc: WalletSignInAttachFinalize(auth_svc.WalletSignInAttachFinalizeRequest) returns (auth_svc.WalletSignInAttachFinalizeResponse);
*/
walletSignInAttachFinalize(input: WalletSignInAttachFinalizeRequest, options?: RpcOptions): UnaryCall<WalletSignInAttachFinalizeRequest, WalletSignInAttachFinalizeResponse> {
const method = this.methods[6], opt = this._transport.mergeOptions(options);
return stackIntercept<WalletSignInAttachFinalizeRequest, WalletSignInAttachFinalizeResponse>("unary", this._transport, method, opt, input);
}
/**
* Initializes a flow of attaching an email to existing user
*
* @generated from protobuf rpc: EmailSignInAttach(auth_svc.EmailSignInAttachRequest) returns (auth_svc.EmailSignInAttachResponse);
*/
emailSignInAttach(input: EmailSignInAttachRequest, options?: RpcOptions): UnaryCall<EmailSignInAttachRequest, EmailSignInAttachResponse> {
const method = this.methods[7], opt = this._transport.mergeOptions(options);
return stackIntercept<EmailSignInAttachRequest, EmailSignInAttachResponse>("unary", this._transport, method, opt, input);
}
/**
* Verifies the bundle and an x-stamp of the email attach challenge and issues
* a valid JWT
*
* @generated from protobuf rpc: EmailSignInAttachFinalize(auth_svc.EmailSignInAttachFinalizeRequest) returns (auth_svc.EmailSignInAttachFinalizeResponse);
*/
emailSignInAttachFinalize(input: EmailSignInAttachFinalizeRequest, options?: RpcOptions): UnaryCall<EmailSignInAttachFinalizeRequest, EmailSignInAttachFinalizeResponse> {
const method = this.methods[8], opt = this._transport.mergeOptions(options);
return stackIntercept<EmailSignInAttachFinalizeRequest, EmailSignInAttachFinalizeResponse>("unary", this._transport, method, opt, input);
}
/**
* Checks the provided JWT for validity.
*
* @generated from protobuf rpc: SessionCheck(auth_svc.SessionCheckRequest) returns (auth_svc.SessionCheckResponse);
*/
sessionCheck(input: SessionCheckRequest, options?: RpcOptions): UnaryCall<SessionCheckRequest, SessionCheckResponse> {
const method = this.methods[9], opt = this._transport.mergeOptions(options);
return stackIntercept<SessionCheckRequest, SessionCheckResponse>("unary", this._transport, method, opt, input);
}
/**
* Get info about my profile.
*
* @generated from protobuf rpc: ProfileInfo(auth_svc.ProfileInfoRequest) returns (auth_svc.ProfileInfoResponse);
*/
profileInfo(input: ProfileInfoRequest, options?: RpcOptions): UnaryCall<ProfileInfoRequest, ProfileInfoResponse> {
const method = this.methods[10], opt = this._transport.mergeOptions(options);
return stackIntercept<ProfileInfoRequest, ProfileInfoResponse>("unary", this._transport, method, opt, input);
}
/**
* Set user profile full name.
*
* @generated from protobuf rpc: ProfileSetName(auth_svc.ProfileSetNameRequest) returns (auth_svc.ProfileSetNameResponse);
*/
profileSetName(input: ProfileSetNameRequest, options?: RpcOptions): UnaryCall<ProfileSetNameRequest, ProfileSetNameResponse> {
const method = this.methods[11], opt = this._transport.mergeOptions(options);
return stackIntercept<ProfileSetNameRequest, ProfileSetNameResponse>("unary", this._transport, method, opt, input);
}
/**
* Set user profile contact phone number.
*
* @generated from protobuf rpc: ProfileSetContactPhone(auth_svc.ProfileSetContactPhoneRequest) returns (auth_svc.ProfileSetContactPhoneResponse);
*/
profileSetContactPhone(input: ProfileSetContactPhoneRequest, options?: RpcOptions): UnaryCall<ProfileSetContactPhoneRequest, ProfileSetContactPhoneResponse> {
const method = this.methods[12], opt = this._transport.mergeOptions(options);
return stackIntercept<ProfileSetContactPhoneRequest, ProfileSetContactPhoneResponse>("unary", this._transport, method, opt, input);
}
/**
* Get the redirect URL for Google auth: attaching to an existing account.
*
* @generated from protobuf rpc: OauthGoogleAttach(auth_svc.OauthGoogleAttachRequest) returns (auth_svc.OauthGoogleAttachResponse);
*/
oauthGoogleAttach(input: OauthGoogleAttachRequest, options?: RpcOptions): UnaryCall<OauthGoogleAttachRequest, OauthGoogleAttachResponse> {
const method = this.methods[13], opt = this._transport.mergeOptions(options);
return stackIntercept<OauthGoogleAttachRequest, OauthGoogleAttachResponse>("unary", this._transport, method, opt, input);
}
/**
* Get the redirect URL for Google auth
*
* @generated from protobuf rpc: OauthGoogleSignIn(auth_svc.OauthGoogleSignInRequest) returns (auth_svc.OauthGoogleSignInResponse);
*/
oauthGoogleSignIn(input: OauthGoogleSignInRequest, options?: RpcOptions): UnaryCall<OauthGoogleSignInRequest, OauthGoogleSignInResponse> {
const method = this.methods[14], opt = this._transport.mergeOptions(options);
return stackIntercept<OauthGoogleSignInRequest, OauthGoogleSignInResponse>("unary", this._transport, method, opt, input);
}
/**
* Callback handler for Google OAuth
*
* @generated from protobuf rpc: OauthGoogleCallback(auth_svc.OauthGoogleCallbackRequest) returns (auth_svc.OauthGoogleCallbackResponse);
*/
oauthGoogleCallback(input: OauthGoogleCallbackRequest, options?: RpcOptions): UnaryCall<OauthGoogleCallbackRequest, OauthGoogleCallbackResponse> {
const method = this.methods[15], opt = this._transport.mergeOptions(options);
return stackIntercept<OauthGoogleCallbackRequest, OauthGoogleCallbackResponse>("unary", this._transport, method, opt, input);
}
/**
* Health checking and uptime stats endpoint.
*
* @generated from protobuf rpc: HealthCheck(auth_svc.HealthCheckRequest) returns (auth_svc.HealthCheckResponse);
*/
healthCheck(input: HealthCheckRequest, options?: RpcOptions): UnaryCall<HealthCheckRequest, HealthCheckResponse> {
const method = this.methods[16], opt = this._transport.mergeOptions(options);
return stackIntercept<HealthCheckRequest, HealthCheckResponse>("unary", this._transport, method, opt, input);
}
}