@jovo-community/plugin-playfab
Version:
A Jovo Framework plugin for PlayFab LiveOps game backend.
64 lines (63 loc) • 2.14 kB
TypeScript
import { Extensible, PluginConfig, Plugin, Jovo } from '@jovotech/framework';
export interface PlayerProfileViewConstraints {
ShowAvatarUrl: boolean;
ShowBannedUntil: boolean;
ShowCampaignAttributions: boolean;
ShowContactEmailAddresses: boolean;
ShowCreated: boolean;
ShowDisplayName: boolean;
ShowExperimentVariants: boolean;
ShowLastLogin: boolean;
ShowLinkedAccounts: boolean;
ShowLocations: boolean;
ShowMemberships: boolean;
ShowOrigination: boolean;
ShowPushNotificationRegistrations: boolean;
ShowStatistics: boolean;
ShowTags: boolean;
ShowTotalValueToDateInUsd: boolean;
ShowValuesToDate: boolean;
}
export interface GetPlayerCombinedInfoRequestParams {
GetCharacterInventories: boolean;
GetCharacterList: boolean;
GetPlayerProfile: boolean;
GetPlayerStatistics: boolean;
GetTitleData: boolean;
GetUserAccountInfo: boolean;
GetUserData: boolean;
GetUserInventory: boolean;
GetUserReadOnlyData: boolean;
GetUserVirtualCurrency: boolean;
PlayerStatisticNames?: string[];
ProfileConstraints?: PlayerProfileViewConstraints;
TitleDataKeys?: string[];
UserDataKeys?: string[];
UserReadOnlyDataKeys?: string[];
}
export interface ProfileInfo {
displayName?: string;
avatarUrl?: string;
extendedProfile?: unknown;
}
export interface PlayFabPluginConfig extends PluginConfig {
titleId: string;
developerSecretKey: string;
login: {
autoLogin: boolean;
infoRequestParameters: GetPlayerCombinedInfoRequestParams;
onNewProfile?: (jovo: Jovo) => ProfileInfo | Promise<ProfileInfo>;
maxNewProfileRetries: number;
extendedProfileKey: string;
};
leaderboard: {
topMax: number;
neighborMax: number;
profileConstraints: PlayerProfileViewConstraints;
userDataKeys: string[];
};
}
export declare class PlayFabPlugin extends Plugin<PlayFabPluginConfig> {
mount(parent: Extensible): Promise<void> | void;
getDefaultConfig(): PlayFabPluginConfig;
}