Class Registration

Constructors

Properties

api: Api

Methods

  • Deletes the current user's profile pictures

    Returns Promise<ApiResponse<void, void>>

    Promise resolving when profile pictures are successfully deleted

    await registration.deleteProfilePicture()
    console.log('Profile pictures deleted')
  • Retrieves a profile picture for a specific user and size

    Parameters

    • uid: string

      User ID whose profile picture to retrieve

    • size: ProfilePictureSize = 'medium'

      Image size variant (thumb, medium, large)

    Returns Promise<ApiResponse<ProfilePictureResponse, ProfilePictureResponse>>

    Promise resolving to profile picture response with signed URL

    // Get medium size profile picture for user
    const result = await registration.getProfilePicture('user123', 'medium')
    console.log('Image URL:', result.url)

    // Get thumbnail for current user
    const result = await registration.getProfilePicture('current', 'thumb')
  • Parameters

    • configurationHash: string
    • email: string

    Returns Promise<ApiResponse<{ message: string }, { message: string }>>

  • Uploads a profile picture for the current user

    Parameters

    • imageData: string

      Base64 encoded image data (max 3.5MB decoded size)

    • contentType: string

      MIME type of the image (e.g., 'image/jpeg')

    Returns Promise<ApiResponse<ProfilePictureUploadResponse, ProfilePictureUploadResponse>>

    Promise resolving to upload confirmation with signed URLs for all sizes

    // Upload a profile picture (max 3.5MB)
    const result = await registration.uploadProfilePicture(
    'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQ...',
    'image/jpeg'
    )
    console.log('Upload successful:', result.urls)
  • Parameters

    • code: string

    Returns Promise<ApiResponse<void, void>>