@streamelements/vapor
Version:
ConnectRPC v2 client for vapor - auto-generated from Protocol Buffers
1,570 lines • 155 kB
TypeScript
import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1";
import type { Timestamp } from "@bufbuild/protobuf/wkt";
import type { Message } from "@bufbuild/protobuf";
/**
* Describes the file api/vapor/v1/vapor.proto.
*/
export declare const file_api_vapor_v1_vapor: GenFile;
/**
* Feature represents a feature flag configuration for a specific entity.
* Features control access to functionality and can be toggled per user/channel.
*
* @generated from message api.vapor.v1.Feature
*/
export type Feature = Message<"api.vapor.v1.Feature"> & {
/**
* Unique identifier for this feature record (MongoDB ObjectID).
*
* @generated from field: string id = 1;
*/
id: string;
/**
* ID of the user or channel this feature applies to.
* Must be a valid MongoDB ObjectID.
*
* @generated from field: string entity_id = 2;
*/
entityId: string;
/**
* Type of entity this feature applies to.
* Valid values: "user", "channel"
*
* @generated from field: string entity_type = 3;
*/
entityType: string;
/**
* Feature name using kebab-case convention.
* Examples: "dark-mode", "api-v2", "premium-analytics"
*
* @generated from field: string name = 4;
*/
name: string;
/**
* Whether this feature is currently enabled for the entity.
* True = feature active, False = feature disabled
*
* @generated from field: bool enabled = 5;
*/
enabled: boolean;
/**
* Timestamp when this feature was first configured.
*
* @generated from field: google.protobuf.Timestamp created_at = 6;
*/
createdAt?: Timestamp;
/**
* Timestamp of the last modification to this feature setting.
*
* @generated from field: google.protobuf.Timestamp updated_at = 7;
*/
updatedAt?: Timestamp;
};
/**
* Describes the message api.vapor.v1.Feature.
* Use `create(FeatureSchema)` to create a new message.
*/
export declare const FeatureSchema: GenMessage<Feature>;
/**
* Channel represents a streaming channel from a platform provider.
* Channels are the primary broadcasting entities with associated metadata.
*
* @generated from message api.vapor.v1.Channel
*/
export type Channel = Message<"api.vapor.v1.Channel"> & {
/**
* Unique identifier for the channel (MongoDB ObjectID).
*
* @generated from field: string id = 1;
*/
id: string;
/**
* Streaming platform provider.
* Valid values: "twitch", "youtube", "facebook", "trovo", "kick", "tiktok", "instagram"
*
* @generated from field: string provider = 2;
*/
provider: string;
/**
* Unique identifier from the streaming platform.
* This is the platform's internal ID for the channel.
*
* @generated from field: string provider_id = 3;
*/
providerId: string;
/**
* ID of the OAuth connection linking this channel to a user.
* References the connection collection.
*
* @generated from field: string connection_id = 4;
*/
connectionId: string;
/**
* Username/handle on the streaming platform.
* Usually lowercase, URL-safe identifier.
*
* @generated from field: string username = 5;
*/
username: string;
/**
* Human-readable display name for the channel.
* May contain spaces, special characters, emoji.
*
* @generated from field: string display_name = 6;
*/
displayName: string;
/**
* Custom alias for the channel (platform-specific).
* Used for vanity URLs or custom identifiers.
*
* @generated from field: string alias = 7;
*/
alias: string;
/**
* Channel type classification.
* Platform-specific values like "user", "group", "page".
*
* @generated from field: string type = 8;
*/
type: string;
/**
* Broadcaster tier/status on the platform.
* Examples: "partner", "affiliate", "regular" (Twitch)
* "verified", "standard" (YouTube)
*
* @generated from field: string broadcaster_type = 9;
*/
broadcasterType: string;
/**
* Primary broadcast language (ISO 639-1 code).
* Examples: "en", "es", "de", "ja"
*
* @generated from field: string language = 10;
*/
language: string;
/**
* URL to the channel's profile picture/avatar.
* Should be HTTPS URL to an image resource.
*
* @generated from field: string avatar = 11;
*/
avatar: string;
/**
* Timestamp when this channel was first created in the system.
*
* @generated from field: google.protobuf.Timestamp created_at = 15;
*/
createdAt?: Timestamp;
/**
* Timestamp of the last update to this channel's data.
*
* @generated from field: google.protobuf.Timestamp updated_at = 16;
*/
updatedAt?: Timestamp;
};
/**
* Describes the message api.vapor.v1.Channel.
* Use `create(ChannelSchema)` to create a new message.
*/
export declare const ChannelSchema: GenMessage<Channel>;
/**
* User represents a platform user account.
* Users can be streamers, staff, or advertisers with different access levels.
*
* @generated from message api.vapor.v1.User
*/
export type User = Message<"api.vapor.v1.User"> & {
/**
* Unique identifier for the user (MongoDB ObjectID).
*
* @generated from field: string id = 1;
*/
id: string;
/**
* Username chosen by or assigned to the user.
* Should be unique across the platform.
*
* @generated from field: string username = 2;
*/
username: string;
/**
* Email address of the user.
* Must be verified through OAuth provider.
*
* @generated from field: string email = 3;
*/
email: string;
/**
* System-wide role determining platform access.
* Valid values: "user", "staff", "advertiser", "moderator", "admin"
*
* @generated from field: string role = 4;
*/
role: string;
/**
* ID of the user's primary channel (if they're a streamer).
* This is their default channel for operations.
*
* @generated from field: string primary_channel_id = 5;
*/
primaryChannelId: string;
/**
* Whether the user account is currently suspended.
* Suspended users cannot perform any actions.
*
* @generated from field: bool suspended = 6;
*/
suspended: boolean;
/**
* URL to the user's profile picture/avatar.
* Usually sourced from OAuth provider.
*
* @generated from field: string avatar = 7;
*/
avatar: string;
/**
* Timestamp when this user account was created.
*
* @generated from field: google.protobuf.Timestamp created_at = 8;
*/
createdAt?: Timestamp;
/**
* Timestamp of the last update to this user's profile.
*
* @generated from field: google.protobuf.Timestamp updated_at = 9;
*/
updatedAt?: Timestamp;
};
/**
* Describes the message api.vapor.v1.User.
* Use `create(UserSchema)` to create a new message.
*/
export declare const UserSchema: GenMessage<User>;
/**
* Authorization represents a user's permission to access a channel.
* This implements role-based access control (RBAC) for channel operations.
*
* @generated from message api.vapor.v1.Authorization
*/
export type Authorization = Message<"api.vapor.v1.Authorization"> & {
/**
* Unique identifier for this authorization (MongoDB ObjectID).
*
* @generated from field: string id = 1;
*/
id: string;
/**
* Role granted to the user for this channel.
* Valid values: "owner", "administrator", "editor", "viewer"
* Roles have hierarchical permissions (owner > admin > editor > viewer).
*
* @generated from field: string role = 2;
*/
role: string;
/**
* ID of the channel this authorization applies to.
* References the channel collection.
*
* @generated from field: string channel_id = 3;
*/
channelId: string;
/**
* Timestamp when this authorization was granted.
*
* @generated from field: google.protobuf.Timestamp created_at = 4;
*/
createdAt?: Timestamp;
/**
* Timestamp of the last modification to this authorization.
*
* @generated from field: google.protobuf.Timestamp updated_at = 5;
*/
updatedAt?: Timestamp;
};
/**
* Describes the message api.vapor.v1.Authorization.
* Use `create(AuthorizationSchema)` to create a new message.
*/
export declare const AuthorizationSchema: GenMessage<Authorization>;
/**
* Session represents an authenticated user session.
* Sessions use JWT tokens with configurable expiration (default: 300 days).
*
* @generated from message api.vapor.v1.Session
*/
export type Session = Message<"api.vapor.v1.Session"> & {
/**
* Unique identifier for this session (MongoDB ObjectID).
*
* @generated from field: string id = 1;
*/
id: string;
/**
* ID of the user who owns this session.
* References the user collection.
*
* @generated from field: string user_id = 2;
*/
userId: string;
/**
* Timestamp when this session was created (login time).
*
* @generated from field: google.protobuf.Timestamp created_at = 3;
*/
createdAt?: Timestamp;
/**
* Timestamp when this session will expire.
* After expiration, the user must re-authenticate.
*
* @generated from field: google.protobuf.Timestamp expires_at = 4;
*/
expiresAt?: Timestamp;
};
/**
* Describes the message api.vapor.v1.Session.
* Use `create(SessionSchema)` to create a new message.
*/
export declare const SessionSchema: GenMessage<Session>;
/**
* Invitation represents a pending channel access invitation.
* Invitations allow channel owners/admins to grant access to other users.
*
* @generated from message api.vapor.v1.Invitation
*/
export type Invitation = Message<"api.vapor.v1.Invitation"> & {
/**
* Unique identifier for this invitation (MongoDB ObjectID).
*
* @generated from field: string id = 1;
*/
id: string;
/**
* Role that will be granted when invitation is accepted.
* Valid values: "administrator", "editor", "viewer"
* Note: "owner" role cannot be granted via invitation.
*
* @generated from field: string role = 2;
*/
role: string;
/**
* ID of the channel this invitation is for.
* References the channel collection.
*
* @generated from field: string channel_id = 3;
*/
channelId: string;
/**
* Timestamp when this invitation was created.
*
* @generated from field: google.protobuf.Timestamp created_at = 4;
*/
createdAt?: Timestamp;
/**
* Timestamp of the last modification to this invitation.
*
* @generated from field: google.protobuf.Timestamp updated_at = 5;
*/
updatedAt?: Timestamp;
/**
* Timestamp when this invitation expires.
* Expired invitations cannot be accepted.
*
* @generated from field: google.protobuf.Timestamp expires_at = 6;
*/
expiresAt?: Timestamp;
};
/**
* Describes the message api.vapor.v1.Invitation.
* Use `create(InvitationSchema)` to create a new message.
*/
export declare const InvitationSchema: GenMessage<Invitation>;
/**
* APIKey represents a service-to-service authentication key.
* API keys provide programmatic access to channel resources without user sessions.
*
* @generated from message api.vapor.v1.APIKey
*/
export type APIKey = Message<"api.vapor.v1.APIKey"> & {
/**
* Unique identifier for this API key (MongoDB ObjectID).
*
* @generated from field: string id = 1;
*/
id: string;
/**
* Channel ID this key provides access to.
* References the channel collection.
*
* @generated from field: string channel_id = 2;
*/
channelId: string;
/**
* Human-readable name/description for the key.
* Examples: "Production API", "CI/CD Pipeline", "Overlay API Key"
*
* @generated from field: string name = 3;
*/
name: string;
/**
* Role granted to this API key.
* Determines the permissions level for this key.
* Common values: "overlay", "editor", "administrator"
*
* @generated from field: string role = 4;
*/
role: string;
/**
* Additional permission scopes for fine-grained access control.
* Can be used to further restrict what the key can access.
*
* @generated from field: repeated string scopes = 5;
*/
scopes: string[];
/**
* Timestamp when this key was created.
*
* @generated from field: google.protobuf.Timestamp created_at = 6;
*/
createdAt?: Timestamp;
/**
* Timestamp when this key was last updated.
*
* @generated from field: google.protobuf.Timestamp updated_at = 7;
*/
updatedAt?: Timestamp;
/**
* Timestamp of last successful use (optional).
* Useful for identifying unused keys.
*
* @generated from field: google.protobuf.Timestamp last_used_at = 8;
*/
lastUsedAt?: Timestamp;
/**
* The actual API key value.
* Note: This field matches the storage layer structure.
* The service layer will handle secure storage (hashing).
* Format: "vpr_" followed by random base64url characters
* @sensitive: Contains authentication credentials
*
* @generated from field: string key = 9;
*/
key: string;
/**
* Indicates if this is the default/overlay API key for the channel.
* Default keys cannot be deleted, only rotated.
* Each channel has exactly one default API key.
*
* @generated from field: bool is_default = 10;
*/
isDefault: boolean;
};
/**
* Describes the message api.vapor.v1.APIKey.
* Use `create(APIKeySchema)` to create a new message.
*/
export declare const APIKeySchema: GenMessage<APIKey>;
/**
* AccessToken represents OAuth tokens for channel API access.
* These tokens are used to interact with the streaming platform's API.
*
* @generated from message api.vapor.v1.AccessToken
*/
export type AccessToken = Message<"api.vapor.v1.AccessToken"> & {
/**
* OAuth access token for the streaming platform API.
* This token is encrypted before storage for security.
* @sensitive: This field contains authentication credentials.
*
* @generated from field: string token = 1;
*/
token: string;
/**
* Timestamp when this access token expires.
* Must refresh before expiration to maintain API access.
*
* @generated from field: google.protobuf.Timestamp expires_at = 2;
*/
expiresAt?: Timestamp;
};
/**
* Describes the message api.vapor.v1.AccessToken.
* Use `create(AccessTokenSchema)` to create a new message.
*/
export declare const AccessTokenSchema: GenMessage<AccessToken>;
/**
* GetUserByIDRequest retrieves a user by their unique identifier.
*
* @generated from message api.vapor.v1.GetUserByIDRequest
*/
export type GetUserByIDRequest = Message<"api.vapor.v1.GetUserByIDRequest"> & {
/**
* User ID to retrieve (MongoDB ObjectID).
* @required
*
* @generated from field: string id = 1;
*/
id: string;
};
/**
* Describes the message api.vapor.v1.GetUserByIDRequest.
* Use `create(GetUserByIDRequestSchema)` to create a new message.
*/
export declare const GetUserByIDRequestSchema: GenMessage<GetUserByIDRequest>;
/**
* GetUserByIDResponse contains the requested user's information.
*
* @generated from message api.vapor.v1.GetUserByIDResponse
*/
export type GetUserByIDResponse = Message<"api.vapor.v1.GetUserByIDResponse"> & {
/**
* User object if found, null if not found.
*
* @generated from field: api.vapor.v1.User user = 1;
*/
user?: User;
};
/**
* Describes the message api.vapor.v1.GetUserByIDResponse.
* Use `create(GetUserByIDResponseSchema)` to create a new message.
*/
export declare const GetUserByIDResponseSchema: GenMessage<GetUserByIDResponse>;
/**
* GetUserByEmailRequest retrieves a user by their email address.
*
* @generated from message api.vapor.v1.GetUserByEmailRequest
*/
export type GetUserByEmailRequest = Message<"api.vapor.v1.GetUserByEmailRequest"> & {
/**
* Email address to search for.
* Must be a valid email format.
* @required
*
* @generated from field: string email = 1;
*/
email: string;
};
/**
* Describes the message api.vapor.v1.GetUserByEmailRequest.
* Use `create(GetUserByEmailRequestSchema)` to create a new message.
*/
export declare const GetUserByEmailRequestSchema: GenMessage<GetUserByEmailRequest>;
/**
* GetUserByEmailResponse contains the user with the specified email.
*
* @generated from message api.vapor.v1.GetUserByEmailResponse
*/
export type GetUserByEmailResponse = Message<"api.vapor.v1.GetUserByEmailResponse"> & {
/**
* User object if found, null if not found.
*
* @generated from field: api.vapor.v1.User user = 1;
*/
user?: User;
};
/**
* Describes the message api.vapor.v1.GetUserByEmailResponse.
* Use `create(GetUserByEmailResponseSchema)` to create a new message.
*/
export declare const GetUserByEmailResponseSchema: GenMessage<GetUserByEmailResponse>;
/**
* GetChannelByIDRequest retrieves a channel by its unique identifier.
*
* @generated from message api.vapor.v1.GetChannelByIDRequest
*/
export type GetChannelByIDRequest = Message<"api.vapor.v1.GetChannelByIDRequest"> & {
/**
* Channel ID to retrieve (MongoDB ObjectID).
* @required
*
* @generated from field: string id = 1;
*/
id: string;
};
/**
* Describes the message api.vapor.v1.GetChannelByIDRequest.
* Use `create(GetChannelByIDRequestSchema)` to create a new message.
*/
export declare const GetChannelByIDRequestSchema: GenMessage<GetChannelByIDRequest>;
/**
* GetChannelByIDResponse contains the requested channel's information.
*
* @generated from message api.vapor.v1.GetChannelByIDResponse
*/
export type GetChannelByIDResponse = Message<"api.vapor.v1.GetChannelByIDResponse"> & {
/**
* Channel object if found, null if not found.
*
* @generated from field: api.vapor.v1.Channel channel = 1;
*/
channel?: Channel;
};
/**
* Describes the message api.vapor.v1.GetChannelByIDResponse.
* Use `create(GetChannelByIDResponseSchema)` to create a new message.
*/
export declare const GetChannelByIDResponseSchema: GenMessage<GetChannelByIDResponse>;
/**
* GetChannelByConnectionIDRequest retrieves a channel by its OAuth connection.
*
* @generated from message api.vapor.v1.GetChannelByConnectionIDRequest
*/
export type GetChannelByConnectionIDRequest = Message<"api.vapor.v1.GetChannelByConnectionIDRequest"> & {
/**
* Connection ID linking the channel to a user.
* @required
*
* @generated from field: string connection_id = 1;
*/
connectionId: string;
};
/**
* Describes the message api.vapor.v1.GetChannelByConnectionIDRequest.
* Use `create(GetChannelByConnectionIDRequestSchema)` to create a new message.
*/
export declare const GetChannelByConnectionIDRequestSchema: GenMessage<GetChannelByConnectionIDRequest>;
/**
* GetChannelByConnectionIDResponse contains the channel linked to the connection.
*
* @generated from message api.vapor.v1.GetChannelByConnectionIDResponse
*/
export type GetChannelByConnectionIDResponse = Message<"api.vapor.v1.GetChannelByConnectionIDResponse"> & {
/**
* Channel object if found, null if not found.
*
* @generated from field: api.vapor.v1.Channel channel = 1;
*/
channel?: Channel;
};
/**
* Describes the message api.vapor.v1.GetChannelByConnectionIDResponse.
* Use `create(GetChannelByConnectionIDResponseSchema)` to create a new message.
*/
export declare const GetChannelByConnectionIDResponseSchema: GenMessage<GetChannelByConnectionIDResponse>;
/**
* GetChannelAccessTokenRequest retrieves OAuth tokens for a channel.
* Requires appropriate authorization to access channel tokens.
*
* @generated from message api.vapor.v1.GetChannelAccessTokenRequest
*/
export type GetChannelAccessTokenRequest = Message<"api.vapor.v1.GetChannelAccessTokenRequest"> & {
/**
* Channel ID to get access tokens for.
* @required
*
* @generated from field: string channel_id = 1;
*/
channelId: string;
};
/**
* Describes the message api.vapor.v1.GetChannelAccessTokenRequest.
* Use `create(GetChannelAccessTokenRequestSchema)` to create a new message.
*/
export declare const GetChannelAccessTokenRequestSchema: GenMessage<GetChannelAccessTokenRequest>;
/**
* GetChannelAccessTokenResponse contains the channel's OAuth tokens.
*
* @generated from message api.vapor.v1.GetChannelAccessTokenResponse
*/
export type GetChannelAccessTokenResponse = Message<"api.vapor.v1.GetChannelAccessTokenResponse"> & {
/**
* OAuth access token for the channel's platform API.
* Tokens are decrypted before returning.
*
* @generated from field: api.vapor.v1.AccessToken access_token = 1;
*/
accessToken?: AccessToken;
};
/**
* Describes the message api.vapor.v1.GetChannelAccessTokenResponse.
* Use `create(GetChannelAccessTokenResponseSchema)` to create a new message.
*/
export declare const GetChannelAccessTokenResponseSchema: GenMessage<GetChannelAccessTokenResponse>;
/**
* GetChannelByProviderIDRequest retrieves a channel by platform-specific ID.
*
* @generated from message api.vapor.v1.GetChannelByProviderIDRequest
*/
export type GetChannelByProviderIDRequest = Message<"api.vapor.v1.GetChannelByProviderIDRequest"> & {
/**
* Platform-specific channel identifier.
* @required
*
* @generated from field: string provider_id = 1;
*/
providerId: string;
/**
* Streaming platform name.
* Valid values: "twitch", "youtube", "facebook", "trovo", "kick", "tiktok", "instagram"
* @required
*
* @generated from field: string provider = 2;
*/
provider: string;
};
/**
* Describes the message api.vapor.v1.GetChannelByProviderIDRequest.
* Use `create(GetChannelByProviderIDRequestSchema)` to create a new message.
*/
export declare const GetChannelByProviderIDRequestSchema: GenMessage<GetChannelByProviderIDRequest>;
/**
* GetChannelByProviderIDResponse contains the channel from the specified platform.
*
* @generated from message api.vapor.v1.GetChannelByProviderIDResponse
*/
export type GetChannelByProviderIDResponse = Message<"api.vapor.v1.GetChannelByProviderIDResponse"> & {
/**
* Channel object if found, null if not found.
*
* @generated from field: api.vapor.v1.Channel channel = 1;
*/
channel?: Channel;
};
/**
* Describes the message api.vapor.v1.GetChannelByProviderIDResponse.
* Use `create(GetChannelByProviderIDResponseSchema)` to create a new message.
*/
export declare const GetChannelByProviderIDResponseSchema: GenMessage<GetChannelByProviderIDResponse>;
/**
* LoginMeta contains metadata about a login attempt for security tracking.
* This information helps detect suspicious activity and provides audit trails.
*
* @generated from message api.vapor.v1.LoginMeta
*/
export type LoginMeta = Message<"api.vapor.v1.LoginMeta"> & {
/**
* User agent string from the client's browser/application.
* Used to identify the client software and version.
*
* @generated from field: optional string user_agent = 2;
*/
userAgent?: string;
/**
* IP address of the client making the login request.
* Used for security monitoring and geographic verification.
*
* @generated from field: optional string remote_ip = 3;
*/
remoteIp?: string;
/**
* Country code (ISO 3166-1 alpha-2) of the login location.
* Examples: "US", "GB", "DE", "JP"
*
* @generated from field: optional string country = 4;
*/
country?: string;
/**
* City name of the login location.
*
* @generated from field: optional string city = 5;
*/
city?: string;
/**
* Region/state/province of the login location.
*
* @generated from field: optional string region = 6;
*/
region?: string;
/**
* Continent of the login location.
* Examples: "North America", "Europe", "Asia"
*
* @generated from field: optional string continent = 7;
*/
continent?: string;
/**
* Geographic latitude of the login location.
* Range: -90.0 to 90.0
*
* @generated from field: optional float latitude = 8;
*/
latitude?: number;
/**
* Geographic longitude of the login location.
* Range: -180.0 to 180.0
*
* @generated from field: optional float longitude = 9;
*/
longitude?: number;
};
/**
* Describes the message api.vapor.v1.LoginMeta.
* Use `create(LoginMetaSchema)` to create a new message.
*/
export declare const LoginMetaSchema: GenMessage<LoginMeta>;
/**
* LoginRequest contains OAuth provider data for streamer login/signup.
* This creates a complete streamer account with channel functionality.
* See AuthService.Login for details on what gets created.
*
* @generated from message api.vapor.v1.LoginRequest
*/
export type LoginRequest = Message<"api.vapor.v1.LoginRequest"> & {
/**
* provider is the provider of the connection.
*
* @generated from field: string provider = 1;
*/
provider: string;
/**
* provider_id is the id of the provider.
*
* @generated from field: string provider_id = 2;
*/
providerId: string;
/**
* username is the username of the user.
*
* @generated from field: string username = 3;
*/
username: string;
/**
* display_name is the display name of the user.
*
* @generated from field: string display_name = 4;
*/
displayName: string;
/**
* email is the email of the user.
*
* @generated from field: string email = 5;
*/
email: string;
/**
* avatar is the avatar of the user.
*
* @generated from field: string avatar = 6;
*/
avatar: string;
/**
* broadcaster_type is the broadcaster type of the user.
*
* @generated from field: string broadcaster_type = 7;
*/
broadcasterType: string;
/**
* scopes is the scopes of the user.
*
* @generated from field: repeated string scopes = 8;
*/
scopes: string[];
/**
* email_verified is the email verified of the user.
*
* @generated from field: bool email_verified = 9;
*/
emailVerified: boolean;
/**
* access_token is the access token of the user.
*
* @generated from field: string access_token = 10;
*/
accessToken: string;
/**
* refresh_token is the refresh token of the user.
*
* @generated from field: string refresh_token = 11;
*/
refreshToken: string;
/**
* expires_at is the expires at of the access token.
*
* @generated from field: google.protobuf.Timestamp expires_at = 12;
*/
expiresAt?: Timestamp;
/**
* country is the country of the user.
*
* @generated from field: string country = 13;
*/
country: string;
/**
* language is the language of the user.
*
* @generated from field: string language = 14;
*/
language: string;
/**
* meta is the meta of the login.
*
* @generated from field: api.vapor.v1.LoginMeta meta = 15;
*/
meta?: LoginMeta;
/**
* Type of login determining what resources are created.
* Streamers get channels, others get basic user accounts.
*
* @generated from field: api.vapor.v1.LoginRequest.LoginType login_type = 16;
*/
loginType: LoginRequest_LoginType;
};
/**
* Describes the message api.vapor.v1.LoginRequest.
* Use `create(LoginRequestSchema)` to create a new message.
*/
export declare const LoginRequestSchema: GenMessage<LoginRequest>;
/**
* LoginType specifies the type of account being created/accessed.
*
* @generated from enum api.vapor.v1.LoginRequest.LoginType
*/
export declare enum LoginRequest_LoginType {
/**
* Default unspecified type (should not be used).
*
* @generated from enum value: LOGIN_TYPE_UNSPECIFIED = 0;
*/
UNSPECIFIED = 0,
/**
* Streamer login - creates full channel and broadcasting capabilities.
*
* @generated from enum value: LOGIN_TYPE_STREAMER = 1;
*/
STREAMER = 1,
/**
* Staff login - internal team member access.
*
* @generated from enum value: LOGIN_TYPE_STAFF = 2;
*/
STAFF = 2,
/**
* Advertiser login - advertising partner access.
*
* @generated from enum value: LOGIN_TYPE_ADVERTISER = 3;
*/
ADVERTISER = 3
}
/**
* Describes the enum api.vapor.v1.LoginRequest.LoginType.
*/
export declare const LoginRequest_LoginTypeSchema: GenEnum<LoginRequest_LoginType>;
/**
* LoginResponse contains the created session and authentication data.
* The user now has a complete streamer account with channel access.
*
* @generated from message api.vapor.v1.LoginResponse
*/
export type LoginResponse = Message<"api.vapor.v1.LoginResponse"> & {
/**
* session_id is the id of the session.
*
* @generated from field: string session_id = 1;
*/
sessionId: string;
/**
* user_id is the id of the user.
*
* @generated from field: string user_id = 2;
*/
userId: string;
/**
* JWT authentication token created by Vapor.
* Used for platform-wide authentication.
* @sensitive: Contains authentication credentials.
*
* @generated from field: string token = 3;
*/
token: string;
/**
* token_type is the type of the token.
*
* @generated from field: string token_type = 4;
*/
tokenType: string;
/**
* token_name is the name of the cookie to set for this token.
* Examples: "vapor_token", "se_token"
*
* @generated from field: string token_name = 5;
*/
tokenName: string;
};
/**
* Describes the message api.vapor.v1.LoginResponse.
* Use `create(LoginResponseSchema)` to create a new message.
*/
export declare const LoginResponseSchema: GenMessage<LoginResponse>;
/**
* UnlinkRequest removes a channel's connection to a user.
* This disconnects the OAuth link but doesn't delete the channel.
*
* @generated from message api.vapor.v1.UnlinkRequest
*/
export type UnlinkRequest = Message<"api.vapor.v1.UnlinkRequest"> & {
/**
* ID of the user requesting the unlink.
* Must have owner permission for the channel.
* @required
*
* @generated from field: string user_id = 1;
*/
userId: string;
/**
* ID of the channel to unlink.
* @required
*
* @generated from field: string channel_id = 2;
*/
channelId: string;
};
/**
* Describes the message api.vapor.v1.UnlinkRequest.
* Use `create(UnlinkRequestSchema)` to create a new message.
*/
export declare const UnlinkRequestSchema: GenMessage<UnlinkRequest>;
/**
* UnlinkResponse confirms the channel was successfully unlinked.
*
* @generated from message api.vapor.v1.UnlinkResponse
*/
export type UnlinkResponse = Message<"api.vapor.v1.UnlinkResponse"> & {};
/**
* Describes the message api.vapor.v1.UnlinkResponse.
* Use `create(UnlinkResponseSchema)` to create a new message.
*/
export declare const UnlinkResponseSchema: GenMessage<UnlinkResponse>;
/**
* ImpersonateChannelRequest allows authorized users to act as a channel.
* Used for support and administrative purposes.
* Requires elevated permissions.
*
* @generated from message api.vapor.v1.ImpersonateChannelRequest
*/
export type ImpersonateChannelRequest = Message<"api.vapor.v1.ImpersonateChannelRequest"> & {
/**
* ID of the user performing the impersonation.
* Must have appropriate admin/support role.
* @required
*
* @generated from field: string user_id = 1;
*/
userId: string;
/**
* ID of the channel to impersonate.
* @required
*
* @generated from field: string channel_id = 2;
*/
channelId: string;
/**
* Metadata about the impersonation for audit logging.
*
* @generated from field: api.vapor.v1.LoginMeta meta = 3;
*/
meta?: LoginMeta;
};
/**
* Describes the message api.vapor.v1.ImpersonateChannelRequest.
* Use `create(ImpersonateChannelRequestSchema)` to create a new message.
*/
export declare const ImpersonateChannelRequestSchema: GenMessage<ImpersonateChannelRequest>;
/**
* ImpersonateChannelResponse provides temporary access to act as a channel.
*
* @generated from message api.vapor.v1.ImpersonateChannelResponse
*/
export type ImpersonateChannelResponse = Message<"api.vapor.v1.ImpersonateChannelResponse"> & {
/**
* JWT token for the impersonation session.
* @sensitive: Contains authentication credentials.
*
* @generated from field: string token = 1;
*/
token: string;
/**
* Session ID for tracking the impersonation.
*
* @generated from field: string session_id = 2;
*/
sessionId: string;
};
/**
* Describes the message api.vapor.v1.ImpersonateChannelResponse.
* Use `create(ImpersonateChannelResponseSchema)` to create a new message.
*/
export declare const ImpersonateChannelResponseSchema: GenMessage<ImpersonateChannelResponse>;
/**
* WhoamiRequest retrieves information about the authenticated user.
* Vapor creates and validates JWT tokens for the platform.
*
* @generated from message api.vapor.v1.WhoamiRequest
*/
export type WhoamiRequest = Message<"api.vapor.v1.WhoamiRequest"> & {
/**
* JWT authentication token created by this service.
* @required
* @sensitive: Contains authentication credentials.
*
* @generated from field: string token = 1;
*/
token: string;
/**
* @generated from field: api.vapor.v1.TokenType token_type = 2;
*/
tokenType: TokenType;
};
/**
* Describes the message api.vapor.v1.WhoamiRequest.
* Use `create(WhoamiRequestSchema)` to create a new message.
*/
export declare const WhoamiRequestSchema: GenMessage<WhoamiRequest>;
/**
* WhoamiResponse contains complete information about the authenticated user.
*
* @generated from message api.vapor.v1.WhoamiResponse
*/
export type WhoamiResponse = Message<"api.vapor.v1.WhoamiResponse"> & {
/**
* User ID of the authenticated user.
*
* @generated from field: string user_id = 1;
*/
userId: string;
/**
* Channel ID of the authenticated user. (optional)
*
* @generated from field: string channel_id = 2;
*/
channelId: string;
/**
* All channel authorizations for this user. (optional)
* Lists every channel the user can access and their role.
*
* @generated from field: repeated api.vapor.v1.Authorization authorizations = 3;
*/
authorizations: Authorization[];
};
/**
* Describes the message api.vapor.v1.WhoamiResponse.
* Use `create(WhoamiResponseSchema)` to create a new message.
*/
export declare const WhoamiResponseSchema: GenMessage<WhoamiResponse>;
/**
* UpdateAccessTokenRequest updates OAuth tokens for a channel.
* Used when tokens are refreshed or re-authorized.
*
* @generated from message api.vapor.v1.UpdateAccessTokenRequest
*/
export type UpdateAccessTokenRequest = Message<"api.vapor.v1.UpdateAccessTokenRequest"> & {
/**
* Channel ID to update tokens for.
* @required
*
* @generated from field: string channel_id = 1;
*/
channelId: string;
/**
* New OAuth access token from the platform.
* @required
* @sensitive: Contains authentication credentials.
*
* @generated from field: string access_token = 2;
*/
accessToken: string;
/**
* New OAuth refresh token (if provided by platform).
* @sensitive: Contains authentication credentials.
*
* @generated from field: string refresh_token = 3;
*/
refreshToken: string;
/**
* When the new access token expires.
* @required
*
* @generated from field: google.protobuf.Timestamp expires_at = 4;
*/
expiresAt?: Timestamp;
};
/**
* Describes the message api.vapor.v1.UpdateAccessTokenRequest.
* Use `create(UpdateAccessTokenRequestSchema)` to create a new message.
*/
export declare const UpdateAccessTokenRequestSchema: GenMessage<UpdateAccessTokenRequest>;
/**
* UpdateAccessTokenResponse confirms the tokens were successfully updated.
*
* @generated from message api.vapor.v1.UpdateAccessTokenResponse
*/
export type UpdateAccessTokenResponse = Message<"api.vapor.v1.UpdateAccessTokenResponse"> & {};
/**
* Describes the message api.vapor.v1.UpdateAccessTokenResponse.
* Use `create(UpdateAccessTokenResponseSchema)` to create a new message.
*/
export declare const UpdateAccessTokenResponseSchema: GenMessage<UpdateAccessTokenResponse>;
/**
* SetPrimaryChannelRequest designates a channel as the user's primary.
* The primary channel is used as the default for operations.
*
* @generated from message api.vapor.v1.SetPrimaryChannelRequest
*/
export type SetPrimaryChannelRequest = Message<"api.vapor.v1.SetPrimaryChannelRequest"> & {
/**
* User ID to update.
* @required
*
* @generated from field: string user_id = 1;
*/
userId: string;
/**
* Channel ID to set as primary.
* User must have authorization for this channel.
* @required
*
* @generated from field: string channel_id = 2;
*/
channelId: string;
};
/**
* Describes the message api.vapor.v1.SetPrimaryChannelRequest.
* Use `create(SetPrimaryChannelRequestSchema)` to create a new message.
*/
export declare const SetPrimaryChannelRequestSchema: GenMessage<SetPrimaryChannelRequest>;
/**
* SetPrimaryChannelResponse confirms the primary channel was updated.
*
* @generated from message api.vapor.v1.SetPrimaryChannelResponse
*/
export type SetPrimaryChannelResponse = Message<"api.vapor.v1.SetPrimaryChannelResponse"> & {};
/**
* Describes the message api.vapor.v1.SetPrimaryChannelResponse.
* Use `create(SetPrimaryChannelResponseSchema)` to create a new message.
*/
export declare const SetPrimaryChannelResponseSchema: GenMessage<SetPrimaryChannelResponse>;
/**
* SuspendUserRequest suspends or unsuspends a user account.
* Suspended users cannot perform any actions on the platform.
*
* @generated from message api.vapor.v1.SuspendUserRequest
*/
export type SuspendUserRequest = Message<"api.vapor.v1.SuspendUserRequest"> & {
/**
* User ID to suspend/unsuspend.
* @required
*
* @generated from field: string user_id = 1;
*/
userId: string;
/**
* Reason for suspension (for audit trail).
* Required when suspending, optional when unsuspending.
*
* @generated from field: string reason = 2;
*/
reason: string;
/**
* Suspension state.
* true = suspend the user, false = unsuspend the user
* @required
*
* @generated from field: bool enabled = 3;
*/
enabled: boolean;
};
/**
* Describes the message api.vapor.v1.SuspendUserRequest.
* Use `create(SuspendUserRequestSchema)` to create a new message.
*/
export declare const SuspendUserRequestSchema: GenMessage<SuspendUserRequest>;
/**
* SuspendUserResponse confirms the user suspension status was updated.
*
* @generated from message api.vapor.v1.SuspendUserResponse
*/
export type SuspendUserResponse = Message<"api.vapor.v1.SuspendUserResponse"> & {};
/**
* Describes the message api.vapor.v1.SuspendUserResponse.
* Use `create(SuspendUserResponseSchema)` to create a new message.
*/
export declare const SuspendUserResponseSchema: GenMessage<SuspendUserResponse>;
/**
* CreateUserRequest contains OAuth provider data for creating staff/advertiser accounts.
* Unlike LoginRequest, this creates a simplified user without channel functionality.
* Use this for non-streamer users who need basic platform access.
*
* Key differences from LoginRequest:
* - No broadcaster_type, country, language fields (streamer-specific)
* - No LoginMeta (geolocation tracking for security)
* - Includes role field to specify user type (staff, advertiser, etc.)
* - Does not create channels, only user + connection records
*
* @generated from message api.vapor.v1.CreateUserRequest
*/
export type CreateUserRequest = Message<"api.vapor.v1.CreateUserRequest"> & {
/**
* provider is the OAuth provider (e.g. "google", "github", "microsoft").
* Use standard provider names for consistency across the platform.
*
* @generated from field: string provider = 1;
*/
provider: string;
/**
* provider_id is the unique identifier from the OAuth provider.
* This must be unique per provider to prevent duplicate accounts.
*
* @generated from field: string provider_id = 2;
*/
providerId: string;
/**
* username is the username/handle from the provider.
* This will be used as the initial display name for the user.
*
* @generated from field: string username = 3;
*/
username: string;
/**
* display_name is the human-readable name from the provider.
* This may be different from username (e.g. "John Doe" vs "johndoe").
*
* @generated from field: string display_name = 4;
*/
displayName: string;
/**
* email is the verified email address from the provider.
* Must be verified by the OAuth provider for security.
*
* @generated from field: string email = 5;
*/
email: string;
/**
* avatar is the URL to the profile picture from the provider.
* This will be used as the user's initial profile image.
*
* @generated from field: string avatar = 6;
*/
avatar: string;
/**
* System-wide role for the user.
* Valid values: "user", "staff", "admin"
* This is separate from channel-level authorizations.
*
* @generated from field: string role = 7;
*/
role: string;
/**
* scopes are the OAuth permissions granted.
*
* @generated from field: repeated string scopes = 8;
*/
scopes: string[];
/**
* email_verified indicates if the email has been verified by the provider.
*
* @generated from field: bool email_verified = 9;
*/
emailVerified: boolean;
/**
* access_token is the OAuth access token.
*
* @generated from field: string access_token = 10;
*/
accessToken: string;
/**
* refresh_token is used to obtain new access tokens.
*
* @generated from field: string refresh_token = 11;
*/
refreshToken: string;
/**
* expires_at is when the access token will expire.
*
* @generated from field: google.protobuf.Timestamp expires_at = 12;
*/
expiresAt?: Timestamp;
};
/**
* Describes the message api.vapor.v1.CreateUserRequest.
* Use `create(CreateUserRequestSchema)` to create a new message.
*/
export declare const CreateUserRequestSchema: GenMessage<CreateUserRequest>;
/**
* CreateUserResponse contains the IDs of the created user and connection.
* The user account is now ready for basic platform access.
* Note: No session or token is created - the user must authenticate separately.
*
* @generated from message api.vapor.v1.CreateUserResponse
*/
export type CreateUserResponse = Message<"api.vapor.v1.CreateUserResponse"> & {
/**
* user_id is the unique identifier of the created user record.
* Use this for subsequent API calls that require user identification.
*
* @generated from field: string user_id = 1;
*/
userId: string;
/**
* connection_id is the unique identifier of the created OAuth connection.
* This links the user to their provider account for future authentication.
*
* @generated from field: string connection_id = 2;
*/
connectionId: string;
};
/**
* Describes the message api.vapor.v1.CreateUserResponse.
* Use `create(CreateUserResponseSchema)` to create a new message.
*/
export declare const CreateUserResponseSchema: GenMessage<CreateUserResponse>;
/**
* ListUserChannelsRequest retrieves all channels accessible by a user.
* Returns channels where the user has any authorization level.
*
* @generated from message api.vapor.v1.ListUserChannelsRequest
*/
export type ListUserChannelsRequest = Message<"api.vapor.v1.ListUserChannelsRequest"> & {
/**
* User ID to list channels for.
* @required
*
* @generated from field: string user_id = 1;
*/
userId: string;
};
/**
* Describes the message api.vapor.v1.ListUserChannelsRequest.
* Use `create(ListUserChannelsRequestSchema)` to create a new message.
*/
export declare const ListUserChannelsRequestSchema: GenMessage<ListUserChannelsRequest>;
/**
* ListUserChannelsResponse contains all channels and authorizations for a user.
*
* @generated from message api.vapor.v1.ListUserChannelsResponse
*/
export type ListUserChannelsResponse = Message<"api.vapor.v1.ListUserChannelsResponse"> & {
/**
* List of all channels the user can access.
* Ordered by authorization creation date (newest first).
*
* @generated from field: repeated api.vapor.v1.ListUserChannelsResponse.UserChannel channels = 1;
*/
channels: ListUserChannelsResponse_UserChannel[];
};
/**
* Describes the message api.vapor.v1.ListUserChannelsResponse.
* Use `create(ListUserChannelsResponseSchema)` to create a new message.
*/
export declare const ListUserChannelsResponseSchema: GenMessage<ListUserChannelsResponse>;
/**
* UserChannel pairs channel information with the user's authorization.
*
* @generated from message api.vapor.v1.ListUserChannelsResponse.UserChannel
*/
export type ListUserChannelsResponse_UserChannel = Message<"api.vapor.v1.ListUserChannelsResponse.UserChannel"> & {
/**
* Full channel details.
*
* @generated from field: api.vapor.v1.Channel channel = 1;
*/
channel?: Channel;
/**
* User's authorization level for this channel.
*
* @generated from field: api.vapor.v1.Authorization authorization = 2;
*/
authorization?: Authorization;
};
/**
* Describes the message api.vapor.v1.ListUserChannelsResponse.UserChannel.
* Use `create(ListUserChannelsResponse_UserChannelSchema)` to create a new message.
*/
export declare const ListUserChannelsResponse_UserChannelSchema: GenMessage<ListUserChannelsResponse_UserChannel>;
/**
* CreateInviteRequest creates a new channel access invitation.
* Only channel owners and administrators can create invitations.
*
* @generated from message api.vapor.v1.CreateInviteRequest
*/
export type CreateInviteRequest = Message<"api.vapor.v1.CreateInviteRequest"> & {
/**
* ID of the user creating the invitation.
* Must have owner or admin role for the channel.
* @required
*
* @generated from field: string user_id = 1;
*/
userId: string;
/**
* ID of the channel to grant access to.
* @required
*
* @generated from field: string channel_id = 2;
*/
channelId: string;
/**
* Role to grant when invitation is accepted.
* Valid values: "administrator", "editor", "viewer"
* Cannot grant "owner" role via invitation.
* @required
*
* @generated from field: string role = 3;
*/
role: string;
/**
* When the invitation expires.
* If not set, uses default expiration (e.g., 7 days).
*
* @generated from field: google.protobuf.Timestamp expires_at = 4;
*/
expiresAt?: Timestamp;
};
/**
* Describes the message api.vapor.v1.CreateInviteRequest.
* Use `create(CreateInviteRequestSchema)` to create a new message.
*/
export declare const CreateInviteRequestSchema: GenMessage<CreateInviteRequest>;
/**
* CreateInviteResponse contains the created invitation details.
*
* @generated from message api.vapor.v1.CreateInviteResponse
*/
export type CreateInviteResponse = Message<"api.vapor.v1.CreateInviteResponse"> & {
/**
* Created invitation object with unique code.
*
* @generated from field: api.vapor.v1.Invitation invite = 1;
*/
invite?: Invitation;
/**
* Full URL for sharing the invitation.
* Recipients can click this link to accept.
*
* @generated from field: string url = 2;
*/
url: string;
};
/**
* Describes the message api.vapor.v1.CreateInviteResponse.
* Use `create(CreateInviteResponseSchema)` to create a new message.
*/
export declare const CreateInviteResponseSchema: GenMessage<CreateInviteResponse>;
/**
* AcceptInviteRequest accepts a channel invitation.
* Creates an authorization for the user with the specified role.
*
* @generated from message api.vapor.v1.AcceptInviteRequest
*/
export type AcceptInviteRequest = Message<"api.vapor.v1.AcceptInviteRequest"> & {
/**
* Unique invitation code from the invitation URL.
* @required
*
* @generated from field: string code = 1;
*/
code: string;
/**
* ID of the user accepting the invitation.
* @required
*
* @generated from field: string user_id = 2;
*/
userId: string;
};
/**
* Describes the message api.vapor.v1.AcceptInviteRequest.
* Use `create(AcceptInviteRequestSchema)` to create a new message.
*/
export declare const AcceptInviteRequestSchema: GenMessage<AcceptInviteRequest>;
/**
* AcceptInviteResponse contains the created authorization.
*
* @generated from message api.vapor.v1.AcceptInviteResponse
*/
export type AcceptInviteResponse =