Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions types/chat.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { StellarPublicKey } from "@/types/user";

/** Message as returned by the chat API */
export interface ChatMessageAPI {
id: number;
Expand All @@ -6,7 +8,8 @@ export interface ChatMessageAPI {
createdAt: string;
user: {
username: string;
wallet: string;
/** Stellar public key (G..., 56 characters) */
wallet: StellarPublicKey;
avatar: string | null;
};
}
Expand All @@ -18,7 +21,8 @@ export interface ChatMessage {
message: string;
color: string;
avatar?: string | null;
wallet?: string;
/** Stellar public key (G..., 56 characters) */
wallet?: StellarPublicKey;
messageType: "message" | "emote" | "system";
createdAt: string;
/** True while an optimistic message is being confirmed by the API */
Expand All @@ -27,7 +31,8 @@ export interface ChatMessage {

/** Payload for sending a chat message */
export interface SendChatMessagePayload {
wallet: string;
/** Stellar public key (G..., 56 characters) */
wallet: StellarPublicKey;
playbackId: string;
content: string;
messageType?: "message" | "emote" | "system";
Expand Down
5 changes: 4 additions & 1 deletion types/settings/profile.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { StellarPublicKey } from "@/types/user";

// Types
export type Platform =
| "instagram"
Expand All @@ -19,7 +21,8 @@ export interface FormState {
username: string;
email: string;
bio: string;
wallet: string;
/** Stellar public key (G..., 56 characters) */
wallet: StellarPublicKey;
socialLinkUrl: string;
socialLinkTitle: string;
language: string;
Expand Down
12 changes: 9 additions & 3 deletions types/user.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/** Stellar public key — 56-character Base32 string starting with 'G' */
export type StellarPublicKey = string;

export interface SocialLink {
socialTitle: string;
socialLink: string;
Expand All @@ -12,7 +15,8 @@ export interface Creator {

export interface User {
id: string;
wallet: string;
/** Stellar public key (G..., 56 characters) */
wallet: StellarPublicKey;
username: string;
email: string;
streamkey?: string;
Expand All @@ -29,7 +33,8 @@ export interface User {
export interface UserRegistrationInput {
email: string;
username: string;
wallet: string;
/** Stellar public key (G..., 56 characters) */
wallet: StellarPublicKey;
socialLinks?: SocialLink[];
emailNotifications?: boolean;
creator?: Partial<Creator>;
Expand All @@ -39,7 +44,8 @@ export type UserUpdateInput = {
username?: string;
email?: string;
bio?: string;
wallet?: string;
/** Stellar public key (G..., 56 characters) */
wallet?: StellarPublicKey;
avatar?: string | File;
streamkey?: string;
emailVerified?: boolean;
Expand Down
Loading