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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
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;
}[];
};
// -- cloud/v2/users/{user_id}:generateThumbnail -------------------------------
export interface GenerateThumbnailResponse {
done: true;
response: {
imageUri: string;
"@type": "apis.roblox.com/roblox.open_cloud.cloud.v2.GenerateUserThumbnailResponse";
};
}
export interface GenerateThumbnailOptions {
shape?: "SHAPE_UNSPECIFIED" | "ROUND" | "SQUARE";
format?: "FORMAT_UNSPECIFIED" | "PNG" | "JPEG";
size?: 48 | 50 | 60 | 75 | 100 | 110 | 150 | 180 | 352 | 420 | 720;
}
// -- bloxlink -----------------------------------------------------------------
export type BloxlinkError = {
error: string;
};
export type BloxlinkSuccess = {
robloxID: string;
resolved: object;
};
export type BloxlinkResult = [BloxlinkSuccess, null] | [null, BloxlinkError];
|