import Client from "../client" ; import { PartialUser } from "./User" ; import { UpdateContactUpsellSuppressionOptions , UpdateTwoStepStatusOptions , UpdateUserPrivacyOptions , UpdateUserPromotionChannelsOptions } from "../client/apis/AccountSettingsAPI" ; import { DeletePhoneOptions , ResendPhoneCodeOptions , SetPhoneNumberOptions , UpdateUserBirthdateOptions , VerifyPhoneOptions } from "../client/apis/AccountInformationAPI" ; export interface ClientUserOptions { id : number ; name : string ; } export default class ClientUser extends PartialUser { public client : Client ; constructor ( data , client ) { super ( data , client ) ; this . client = client ; } getAppChatPrivacy ( ) { return this . client . apis . accountSettingsAPI . getAppChatPrivacy ( ) ; } updateAppChatPrivacy ( privacy ) { return this . client . apis . accountSettingsAPI . updateAppChatPrivacy ( { appChatPrivacy : privacy } ) ; } getGameChatPrivacy ( ) { return this . client . apis . accountSettingsAPI . getGameChatPrivacy ( ) ; } updateGameChatPrivacy ( privacy ) { return this . client . apis . accountSettingsAPI . updateGameChatPrivacy ( { gameChatPrivacy : privacy } ) ; } getInventoryPrivacy ( ) { return this . client . apis . accountSettingsAPI . getInventoryPrivacy ( ) ; } updateInventoryPrivacy ( privacy ) { return this . client . apis . accountSettingsAPI . updateInventoryPrivacy ( { inventoryPrivacy : privacy } ) ; } getPrivacy ( ) { return this . client . apis . accountSettingsAPI . getUserPrivacy ( ) ; } updatePrivacy ( options ) { return this . client . apis . accountSettingsAPI . updateUserPrivacy ( options ) ; } getPrivacySettingsInfo ( ) { return this . client . apis . accountSettingsAPI . getUserPrivacySettingsInfo ( ) ; } getPrivateMessagePrivacy ( ) { return this . client . apis . accountSettingsAPI . getUserPrivateMessagePrivacy ( ) ; } updatePrivateMessagePrivacy ( privacy ) { return this . client . apis . accountSettingsAPI . updateUserPrivateMessagePrivacy ( { privateMessagePrivacy : privacy } ) ; } getEmailStatus ( ) { return this . client . apis . accountSettingsAPI . getUserEmailStatus ( ) ; } updateEmail ( email , password ) { return this . client . apis . accountSettingsAPI . updateUserEmail ( { emailAddress : email , password } ) ; } sendEmailVerification ( ) { return this . client . apis . accountSettingsAPI . sendEmailVerification ( ) ; } getWebsiteTheme ( ) { return this . client . apis . accountSettingsAPI . getWebsiteTheme ( ) ; } updateWebsiteTheme ( theme ) { return this . client . apis . accountSettingsAPI . updateWebsiteTheme ( { themeType : theme } ) ; } getTradePrivacy ( ) { return this . client . apis . accountSettingsAPI . getUserTradePrivacy ( ) ; } updateTradePrivacy ( privacy ) { return this . client . apis . accountSettingsAPI . updateUserTradePrivacy ( { tradePrivacy : privacy } ) ; } getTradeQualityFilter ( ) { return this . client . apis . accountSettingsAPI . getUserTradeQualityFilter ( ) ; } updateTradeQualityFilter ( quality ) { return this . client . apis . accountSettingsAPI . updateUserTradeQualityFilter ( { tradeValue : quality } ) ; } updateTwoStepStatus ( options ) { return this . client . apis . accountSettingsAPI . updateTwoStepStatus ( options ) ; } getContactUpsell ( ) { return this . client . apis . accountSettingsAPI . getContactUpsell ( ) ; } updateContactUpsellSuppression ( options ) { return this . client . apis . accountSettingsAPI . updateContactUpsellSuppression ( options ) ; } updatePromotionChannels ( options ) { return this . client . apis . accountSettingsAPI . updateUserPromotionChannels ( options ) ; } getBirthdate ( ) { return this . client . apis . accountInformationAPI . getUserBirthdate ( ) ; } updateBirthdate ( options ) { return this . client . apis . accountInformationAPI . updateUserBirthdate ( options ) ; } getProfileDescription ( ) { return this . client . apis . accountInformationAPI . getUserDescription ( ) ; } updateProfileDescription ( description ) { return this . client . apis . accountInformationAPI . updateUserDescription ( { description } ) ; } getGender ( ) { return this . client . apis . accountInformationAPI . getUserGender ( ) ; } updateGender ( gender ) { return this . client . apis . accountInformationAPI . updateUserGender ( { gender } ) ; } getConsecutiveXboxLoginDays ( ) { return this . client . apis . accountInformationAPI . getConsecutiveXboxLoginDays ( ) ; } getVerifiedPhoneNumber ( ) { return this . client . apis . accountInformationAPI . getVerifiedPhoneNumber ( ) ; } setPhoneNumber ( options ) { return this . client . apis . accountInformationAPI . setPhoneNumber ( options ) ; } deletePhone ( options ) { return this . client . apis . accountInformationAPI . deletePhone ( options ) ; } resendPhoneCode ( options ) { return this . client . apis . accountInformationAPI . resendPhoneCode ( options ) ; } verifyPhone ( options ) { return this . client . apis . accountInformationAPI . verifyPhone ( options ) ; } getPromotionChannels ( ) { return this . client . apis . accountInformationAPI . getSelfPromotionChannels ( ) ; } removeStarCodeAffiliate ( ) { return this . client . apis . accountInformationAPI . removeStarCodeAffiliate ( ) ; } getStarCodeAffiliate ( ) { return this . client . apis . accountInformationAPI . getStarCodeAffiliate ( ) ; } addStarCodeAffiliate ( code ) { return this . client . apis . accountInformationAPI . addStarCodeAffiliate ( { code } ) ; } getPasswordStatus ( ) { return this . client . apis . authAPI . getCurrentUserPasswordStatus ( ) ; } changeUserPassword ( newPassword , oldPassword ) { return this . client . apis . authAPI . changeUserPassword ( { currentPassword : oldPassword , newPassword } ) ; } changeUsername ( newUsername , password ) { return this . client . apis . authAPI . changeUserUsername ( { password , username : newUsername } ) ; } }