Skip to content

Commit

Permalink
doc: Add some documentation to wasm bindings (refs #24)
Browse files Browse the repository at this point in the history
  • Loading branch information
nesium committed Feb 9, 2024
1 parent 71ac3e7 commit dcb9d50
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bindings/prose-sdk-js/src/types/room.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ export interface RoomBase {
readonly name: string;
readonly participants: ParticipantInfo[];
sendMessage(body: string): Promise<void>;
updateMessage(messageID: string, body: string): Promise<void>;
sendMessage(request: SendMessageRequest): Promise<void>;
updateMessage(messageID: string, request: SendMessageRequest): Promise<void>;
retractMessage(messageID: string): Promise<void>;
toggleReactionToMessage(id: string, emoji: string): Promise<void>;
Expand Down
2 changes: 2 additions & 0 deletions bindings/prose-sdk-js/src/types/send_message_request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ use crate::types::{Attachment, AttachmentsArray, IntoJSArray};

#[wasm_bindgen]
pub struct SendMessageRequest {
/// The body of the message.
body: Option<String>,
/// The URLs of the files to attach to the message.
attachments: Vec<Attachment>,
}

Expand Down
1 change: 1 addition & 0 deletions bindings/prose-sdk-js/src/types/upload_slot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use crate::types::{IntoJSArray, UploadHeadersArray};
#[wasm_bindgen]
pub struct UploadSlot {
upload_url: String,
/// Set these headers on your PUT request when uploading.
upload_headers: Vec<UploadHeader>,
download_url: String,
}
Expand Down

0 comments on commit dcb9d50

Please sign in to comment.