Skip to main content

Properties

Address APIs.
  • get(address) returns the server’s known address record, country, and available transport services.
  • isFocusSilenced(address) checks whether this device’s Focus settings would silence notifications from the address.
  • isIMessageAvailable(address) checks live iMessage reachability.
Attachment APIs.
  • get(attachment) fetches metadata for an uploaded or received attachment.
  • upload(input) uploads file bytes and optional Live Photo companion data.
  • downloadStream(attachment) streams a header frame followed by byte chunks.
Chat APIs.
  • create(addresses, options) creates a direct or group chat, optionally with an opening message.
  • get(chat) fetches one chat by guid.
  • count(options) counts visible chats, optionally including archived chats.
  • hasBackground(chat) checks whether a chat has a custom background.
  • setBackground(chat, data) replaces a chat background image.
  • removeBackground(chat) clears a chat background image.
  • markRead(chat) marks every unread message in the chat as read.
  • shareContactInfo(chat) sends the local account’s contact card.
  • setTyping(chat, isTyping) starts or stops the transient typing indicator.
  • subscribeEvents(filter) streams chat changes.
Durable event-log APIs.
  • catchUp(since) replays durable message, chat, group, and poll events after the last fully handled sequence, then emits catchup.complete.
Use this after a disconnect before reopening live subscribeEvents streams.
Group APIs.
  • setDisplayName(chat, displayName, options) renames a group chat.
  • addParticipants(chat, addresses, options) invites addresses into a group chat.
  • removeParticipants(chat, addresses, options) removes addresses from a group chat.
  • leave(chat, options) makes the local account leave a group chat.
  • setIcon(chat, data, options) replaces the group photo.
  • getIcon(chat) downloads the group photo bytes and MIME type.
  • removeIcon(chat, options) clears the group photo.
  • subscribeEvents(filter) streams group changes.
Shared-location APIs.
  • list() returns every friend currently sharing a location.
  • get(address) fetches the latest snapshot for one friend.
  • watch(address?) streams location updates outside the durable event log.
Message APIs.
  • sendText(chat, text, options) sends text with replies, subjects, effects, link previews, data-detector scanning, and formatting.
  • sendAttachment(chat, attachment, options) sends an uploaded attachment by GUID with replies, effects, and audio-message mode.
  • sendMultipart(chat, parts, options) sends multiple text / attachment / mention bubbles atomically.
  • sendCustomizedMiniApp(chat, message, options) sends a mini app card backed by the caller’s own iMessage extension and returns the session needed for updates.
  • updateCustomizedMiniApp(session, message, options) updates a caller-owned mini app card in place.
  • edit(chat, message, newText, options) edits an existing message.
  • unsend(chat, message, options) retracts an existing message.
  • setReaction(chat, message, reaction, isSet, options) adds or removes a tapback / emoji reaction.
  • placeSticker(chat, message, sticker, placement, options) places an uploaded sticker attachment on a message.
  • notifySilenced(chat, message, options) triggers Apple’s Notify Anyway action for a Focus-silenced conversation.
  • get(message) fetches one message by its guid.
  • listRecent(filter) pages through recent messages across chats.
  • listInChat(chat, filter) pages through messages in one chat.
  • getEmbeddedMedia(chat, message) downloads Digital Touch / handwritten embedded media bytes.
  • subscribeEvents(filter) streams live message changes.
Poll APIs.
  • create(chat, title, choices, options) creates a poll message.
  • get(pollMessage) reads the latest poll state.
  • vote(pollMessage, optionId, options) casts or changes the local account’s vote.
  • unvote(pollMessage, options) removes the local account’s vote.
  • addOption(pollMessage, text, options) appends a new choice.
  • subscribeEvents(filter) streams poll changes.

Methods

close()

Returns

Promise<void>