UNPKG

openblox

Version:

Roblox API Wrapper For Both Classic And OpenCloud APIs.

144 lines (143 loc) 4.75 kB
import type { Identifier, ISODateTime, ObjectKeysToCamelCase, ObjectPrettify } from "typeforge"; export type FriendsUserSort = "Alphabetical" | "StatusAlphabetical" | "StatusFrequents"; export type FriendshipOriginSourceType = "Unknown" | "PlayerSearch" | "QrCode" | "InGame" | "UserProfile" | "QqContactImporter" | "WeChatContactImporter" | "ProfileShare" | "PhoneContactImporter" | "FriendRecommendations"; type FriendData<TemporalType> = ObjectPrettify<{ isDeleted: boolean; friendFrequentScore: number; friendFrequentRank: number; hasVerifiedBadge: boolean; description: string | null; created: TemporalType; isBanned: boolean; externalAppDisplayName: string | null; id: number; name: string; displayName: string; }>; export type FriendsMetadataData = { isFriendsFilterBarEnabled: boolean; isFriendsPageSortExperimentEnabled: boolean; isFriendsUserDataStoreCacheEnabled: boolean; frequentFriendSortRollout: number; userName: string; displayName: string; }; export type AuthenticatedUserFriendRequest<TemporalType> = { friendRequest: { sentAt: TemporalType; senderId: Identifier; sourceUniverseId: Identifier; originSourceType: "UserProfile" | "InGame" | "PlayerSearch"; contactName: string | null; }; mutualFriendsList: string[]; hasVerifiedBadge: boolean; description: string; created: TemporalType; isBanned: boolean; externalAppDisplayName: string | null; id: Identifier; name: string; displayName: string; }; export type RawAuthenticatedUserFriendRequestsData = { previousPageCursor: string | null; nextPageCursor: string; data: AuthenticatedUserFriendRequest<ISODateTime>[]; }; export type PrettifiedAuthenticatedUserFriendRequestsData = AuthenticatedUserFriendRequest<Date>[]; type FriendsData<TemporalType> = { isOnline: boolean; presenceType: number; isDeleted: boolean; friendFrequentScore: number; friendFrequentRank: number; hasVerifiedBadge: boolean; description: string; created: TemporalType; isBanned: boolean; externalAppDisplayName: string; id: number; name: string; displayName: string; }; export type RawFriendsListData = { data: FriendsData<ISODateTime>[]; }; export type PrettifiedFriendsListData = FriendsData<Date>[]; type FindFriendData = { id: Identifier; hasVerifiedBadge: boolean; }; export type RawFindFriendsData = { PreviousCursor: null | string; PageItems: FindFriendData[]; NextCursor: null | string; HasMore: null | string; }; export type PrettifiedFindFriendsData = FindFriendData[]; export type RawInactiveFriendsData = { data: FriendData<ISODateTime>[]; }; export type PrettifiedInactiveFriendsData = FriendData<Date>[]; type OnlineFriends_UserPresence<TemporalType> = ObjectPrettify<{ UserPresenceType: string; UserLocationType: string; lastLocation: string; placeId: Identifier; rootPlaceId: Identifier; gameInstanceId: string; universeId: Identifier; lastOnline: TemporalType; }>; export type RawOnlineFriendsUserPresenceData = ObjectPrettify<{ data: { userPresence: OnlineFriends_UserPresence<ISODateTime>; id: Identifier; name: string; displayName: string; }[]; }>; export type PrettifiedOnlineFriendsUserPresenceData = ObjectPrettify<{ userPresence: ObjectKeysToCamelCase<OnlineFriends_UserPresence<Date>>; id: Identifier; name: string; displayName: string; }[]>; export type PrettifiedFriendsSearchData = { id: Identifier; hasVerifiedBadge: false; }[]; export type RawFriendsSearchData = { PreviousCursor: string | null; PageItems: PrettifiedFriendsSearchData; NextCursor: string | null; HasMore: string | null; }; export type RawFriendsStatusesData<RelatedUserId extends Identifier> = { data: { id: RelatedUserId; status: "NotFriends" | "Friends" | "RequestSent" | "RequestReceived"; }[]; }; export type PrettifiedFriendsStatusesData<RelatedUserId extends Identifier> = { [Key in RelatedUserId]: "NotFriends" | "Friends" | "RequestSent" | "RequestReceived" | undefined; }; export type RawUserFollowersData = { data: FriendData<ISODateTime>[]; }; export type PrettifiedUserFollowersData = FriendData<Date>[]; export type RawAuthenticatedUserFollowingsExistData<UserId extends Identifier> = { followings: { isFollowing: boolean; isFollowed: boolean; userId: UserId; }[]; }; export type PrettifiedAuthenticatedUserFollowingsExistData<UserId extends Identifier> = { [Key in UserId]: { isFollowing: boolean; isFollowed: boolean; } | undefined; }; export {};