Class SessionUser

The user who is logged in to this client. This is the user that is used to make authenticated requests to the FakeYou API.

Implements

Constructors

  • Parameters

    • client: Client

      The main client.

    • data: {
          can_approve_w2l_templates: boolean;
          can_ban_users: boolean;
          can_delete_other_users_tts_models: boolean;
          can_delete_other_users_tts_results: boolean;
          can_delete_other_users_w2l_results: boolean;
          can_delete_other_users_w2l_templates: boolean;
          can_delete_own_account: boolean;
          can_delete_own_tts_models: boolean;
          can_delete_own_tts_results: boolean;
          can_delete_own_w2l_results: boolean;
          can_delete_own_w2l_templates: boolean;
          can_delete_users: boolean;
          can_edit_other_users_profiles: boolean;
          can_edit_other_users_tts_models: boolean;
          can_edit_other_users_w2l_templates: boolean;
          can_upload_tts_models: boolean;
          can_upload_w2l_templates: boolean;
          can_use_tts: boolean;
          can_use_w2l: boolean;
          display_name: string;
          email_gravatar_hash: string;
          storyteller_stream_plan: string;
          user_token: string;
          username: string;
      }

      The raw session user data from the FakeYou API.

      • can_approve_w2l_templates: boolean
      • can_ban_users: boolean
      • can_delete_other_users_tts_models: boolean
      • can_delete_other_users_tts_results: boolean
      • can_delete_other_users_w2l_results: boolean
      • can_delete_other_users_w2l_templates: boolean
      • can_delete_own_account: boolean
      • can_delete_own_tts_models: boolean
      • can_delete_own_tts_results: boolean
      • can_delete_own_w2l_results: boolean
      • can_delete_own_w2l_templates: boolean
      • can_delete_users: boolean
      • can_edit_other_users_profiles: boolean
      • can_edit_other_users_tts_models: boolean
      • can_edit_other_users_w2l_templates: boolean
      • can_upload_tts_models: boolean
      • can_upload_w2l_templates: boolean
      • can_use_tts: boolean
      • can_use_w2l: boolean
      • display_name: string
      • email_gravatar_hash: string
      • storyteller_stream_plan: string
      • user_token: string
      • username: string

    Returns SessionUser

Properties

canApproveW2lTemplates: boolean
canBanUsers: boolean
canDeleteOtherUsersTtsModels: boolean
canDeleteOtherUsersTtsResults: boolean
canDeleteOtherUsersW2lResults: boolean
canDeleteOtherUsersW2lTemplates: boolean
canDeleteOwnAccount: boolean
canDeleteOwnTtsModels: boolean
canDeleteOwnTtsResults: boolean
canDeleteOwnW2lResults: boolean
canDeleteOwnW2lTemplates: boolean
canDeleteUsers: boolean
canEditOtherUsersProfiles: boolean
canEditOtherUsersTtsModels: boolean
canEditOtherUsersW2lTemplates: boolean
canUploadTtsModels: boolean
canUploadW2lTemplates: boolean
canUseTts: boolean
canUseW2l: boolean
client: Client
displayName: string
emailGravatarHash: string
fetchProfile: ((this) => Promise<ProfileUser | undefined>) = implFetchUser

Fetch the profile of the currently logged in user which contains more information than the session user.

Type declaration

    • (this): Promise<ProfileUser | undefined>
    • Fetch the profile of the currently logged in user which contains more information than the session user.

      Parameters

      Returns Promise<ProfileUser | undefined>

      The profile of the currently logged in user. Undefined if no user is logged in.

Returns

The profile of the currently logged in user. Undefined if no user is logged in.

storytellerStreamPlan: string
token: string
username: string

The username of the user.

webUrl: string

The URL to the profile of the currently logged in user's profile.

Methods

Generated using TypeDoc