all repos — stealth-developers @ 0996f523cf428a2a7cda4b5116820a26bb06efe2

src/roblox/types/users.ts (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
import type { ISO8601, RobloxUserId, UserRef } from ".";

// -- /cloud/v2/users/{userId} -------------------------------------------------
export interface GetUserResponse {
	path: string;
	createTime: ISO8601;

	id: UserRef;
	name: string;
	displayName: string;

	about: string;
	locale: string;
	premium: boolean;
	idVerified: boolean;
	socialNetworkProfiles: {
		facebook: string;
		twitter: string;
		youtube: string;
		twitch: string;
		guilded: string;
		visibility: string;
	};
}

// -- users.roblox.com/v1/usernames/users --------------------------------------
export interface GetUsersByUsernamesPayload {
	usernames: string[];
	excludeBannedUsers: boolean;
}
export interface GetUsersByUsernamesResponse {
	data: {
		requestedUsername: string;
		hasVerifiedBadge: boolean;
		id: RobloxUserId;
		name: string;
		displayName: string;
	}[];
}

// -- users.roblox.com/v1/users/search -----------------------------------------
export type SearchUsersResponse = {
	previousPageCursor: string;
	nextPageCursor: string;
	data: {
		previousUsernames: string[];
		hasVerifiedBadge: boolean;
		id: RobloxUserId;
		name: string;
		displayName: string;
	}[];
};