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 by sending RAW binary image data. API Gateway will base64-encode it and set isBase64Encoded for the Lambda handler.

    Accepts Blobs/Buffers/ArrayBuffers/Uint8Arrays or Data URLs/base64 strings.

    Size limit: <= 3.5MB (decoded/binary).

    Parameters

    • file:
          | string
          | Blob
          | ArrayBuffer
          | Uint8Array<ArrayBufferLike>
          | Buffer<ArrayBufferLike>
    • OptionalcontentType: string

    Returns Promise<ApiResponse<ProfilePictureUploadResponse, ProfilePictureUploadResponse>>

  • Parameters

    • code: string

    Returns Promise<ApiResponse<void, void>>