TypeScript

This page contains an overview of all relevant changes made to the TypeScript SDK and the latest version releases

Version 0.0.1 Beta.36 (2023-01-13)

New Features

  • Introduced Sub Channel functionality. Now users can create sub channels inside a channel.

Breaking Changes

  • Replaced channelId, data parameters with subChannelId, dataType for createMessage, queryMessages, liveMessages

before:

const query = createQuery(createMessage, {
  channelId,
  data: 'text',
  ...
});

const query = createQuery(queryMessages, {
  channelId,
  ...
});

const unsubscribe = liveMessages({ channelId }, callback);

starting 0.0.1 Beta.36:

const query = createQuery(createMessage, {
  subChannelId,
  dataType: 'text',
  ...
});

const query = createQuery(queryMessages, {
  subChannelId,
  ...
});

const unsubscribe = liveMessages({ subChannelId }, callback);
  • fileId for file, image, video, audio messages is moved from message.fileId to message.data.fileId

  • Before, messages were sent into the channel. Now, messages are sent into the sub channels of the channel. Each channel has at least one sub channel, the main one, where all old messages were migrated. To keep querying, creating messages in the same space use channel.defaultSubChannelId for subChannelId parameter for createMessage, queryMessages, liveMessages

before:

const unsubscribe = liveMessages({ channelId: channel.channelId }, callback);

starting 0.0.1 Beta.36:

const unsubscribe = liveMessages({ subChannelId: channel.defaultSubChanneld }, callback);
  • to receive real time updates for channel of type broadcast, live, it's sub channels and messages (keep liveMessages working) you need manually to subscribe for them

import { getChannelTopic, subscribeTopic } from '@amityco/ts-sdk';

let unsubscribe;

runQuery(
  createQuery(getChannel, 'channelId'),
  ({ data: channel, loading, error }) => {
    if (loading && error) {
      return;
    }
    
    unsubscribe = subscribeTopic(getChannelTopic(channel));
  },
);

Version 0.0.1 Beta.35 (2022-12-16)

Fixes

  • SDK Upgrade

Version 0.0.1 Beta.34 (2022-12-02)

New Features

Fixes

  • Fixed issue where unread messages did not show the correct number.

Version 0.0.1 Beta.33 (2022-11-18)

New Features

  • Upgraded the post review feature. When a moderator role is demoted to a user role, post creation must be approved by a moderator.

Version 0.0.1 Beta.32 (2022-11-04)

New Features

  • Introduced the ability for User roles to create community with “Admin can post only” settings.

Fixes

  • Fixed issue where the user could not remove reaction from the message.

Version 0.0.1 Beta.31 (2022-10-21)

New Features

Fixes

  • Fixed issue where querying the Live channel membership filter after muting was not possible.

Version 0.0.1 Beta.30 (2022-10-07)

New Features

  • Enhanced Live Collections for Channel Member collections. Any member added to or removed from a channel is automatically included in the query collection.

  • Introduced ability to create video messgaes in Live, Broadcast, Community and Chat channels.

  • When creating a poll post, the closedIn value is set to 30 days by default if the user does not set any value.

Version 0.0.1 Beta.29 (2022-09-23)

New Features

  • Introduced ability to manage community post settings via SDK (i.e. 'Only Admins Can Post' or 'Approve Member Posts')

Fixes:

  • Non-members with the User role can no longer be able to get information about the conversation channel.

  • Non-members with the User role can no longer query messages within the conversation channel.

Version 0.0.1 Beta.28 (2022-09-09)

New Features

  • Enhanced LiveCollections for Message collection, Followers/Following collection. Newly created messages and new followers are now automatically reflected in their respective collections.

  • Enhanced Video on Demand (VOD) configurations. Videos you upload with our SDK can now be transcoded to 4 different resolutions (from 360p to 1080p) with a maximum file size of 1 GB and a duration of up to 2 hours.

Version 0.0.1 Beta.27 (2022-08-26)

New Features

  • Enhanced LiveCollections for message reactions. Newly created reactions are now automatically added into the collection.

  • Introduced ability to ban/un-ban channel members. Admins can now ban/un-ban channel members.

Version 0.0.1 Beta.26 (2022-08-11)

New Features

  • Enhanced LiveCollections for comments collection. Newly added comments are now automatically added into the collection

Fixes

  • Fixed issue where two different messageIds were being returned when attempting to create a new message

Breaking Change

  • queryReactions pagination parameters changed from {limit: number; after: number;} to {limit: number; before: string} which before should be referenceId

Version 0.0.1 Beta.25 (2022-07-29)

New Features

  • Introduced post review feature. Admin can now approve or decline a community post

  • Introduced ability to flag and unflag users

  • Introduced onPollUpdated feature that allows to receive reactive callback when a user chooses to Vote, Close and Delete on a poll

Fixes

  • Fixed issue where tags cannot be updated on a channel if new parameter is sent

Version 0.0.1 Beta.24 (2022-07-12)

Fixes

  • SDK Upgrade

Version 0.0.1 Beta.23 (2022-07-04)

Fixes

  • Fixed issue with myReactions array disappearing when message was updated

  • Fixed issue with messages being created multiple times

Version 0.0.1 Beta.22 (2022-06-17)

Fixes

  • Fixed issue with comment sorting

  • Fixed issue with Amity.Message<"text"> function being replaced by "never"

  • Added missing type for isDeleted parameter in queryChannels

  • Added missing type for contentDataPoll

  • Support tags in chat

Version 0.0.1 Beta.21 (2022-06-02)

Fixes

  • Passed the channel member model to the related channel member event callback

Version 0.0.1 Beta.20 (2022-05-20)

New Features

  • When a user log in with only a ‘user id’, the user's display name will no longer be replaced with the user id.

  • Support ability to query reactions

Fixes

  • Fixed picture rotation issue when uploading an image in chat

Version 0.0.1 Beta.19 (2022-05-09)

New Features

  • Ability to filter channels by tags.

  • New createImage function to upload images.

Fixes

  • createPoll Typo

Breaking Changes

Version 0.0.1 Beta.18 (2022-04-22)

New Features

  • Ability to create, update and delete poll post.

  • Ability to vote poll post.

  • Ability to mention user in poll post

Fixes

  • Regex related to Real Time Event to support in android low end devices.

  • Accessing global object on all ends

Breaking Changes

Version 0.0.1 Beta.17 (2022-03-31)

New Features

  • Realtime events for comments and posts in User feed

  • Add tag type property in Post model

  • Upload video in posts and messages

Breaking Changes

  • Change addCommunityMembersRole to addCommunityMembersRoles and the second parameter(roles) should be sent as array

Before v0.0.1-beta.17

addCommunityMembersRole(communityId, 'admin', ['user1', 'user2'])

Starting v0.0.1-beta.17

addCommunityMembersRoles(communityId, ['admin'], ['user1', 'user2'])
  • Change removeCommunityMembersRole to removeCommunityMembersRoles and the second parameter(roles) should be sent as array

Before v0.0.1-beta.17

removeCommunityMembersRole(communityId, 'admin', ['user1', 'user2'])

Starting v0.0.1-beta.17

removeCommunityMembersRoles(communityId, ['admin'], ['user1', 'user2'])

Version 0.0.1 Beta.16 (2022-03-17)

New Feature

  • Syntax improvement for Amity.Paged. Refer to Pagination for its usage.

    const [options, setOptions] =
        useState<Amity.RunQueryOptions<typeof queryMessages>>();

Version 0.0.1 Beta.15 (2022-03-03)

Fixes

  • Resolve undefined API_ENDPOINT by adding API_REGIONS constant

  • Fix observers callback type

Version 0.0.1 Beta.14 (2022-02-17)

New Feature

  • Mention individual users in chat

Fixes

  • Paging type issue in query methods ( i.e. queryPosts, queryComments , queryMessages, queryChannels, queryCommunities)

  • Incorrect type returned in runQuery response

Version 0.0.1 Beta.13 (2022-02-04)

New Features

  • User can leave Community

  • Ability to report unnecessary Comments

  • Ability to report unnecessary Posts

  • User can edit or update one's own Posts

  • Mention users in Comments

  • Mention users in Posts (text, image, file, and audio posts)

  • Ability to comment and reply in Posts

  • User can invite and dismiss Community Members

  • Ability to create a private/public Community

Version 0.0.1 Beta.12 (2022-01-21)

Fixes

  • Only the first observable can call the update callback if there are more than one observables listening to the same event simultaneously

  • Unhandled exception if connection is closed without error instance

Due to current limitation, we encounter observers call duplication. We are working on fixing this issue for the next release.

Version 0.0.1 Beta.11 (2022-01-11)

Fix

  • Get user function issues

Version 0.0.1 Beta.10 (2021-12-29)

New Features

  • New Internal Cache System

  • Query Users Caching

  • runQuery algorithm is revamped so that it reads better, and includes constantly loading/origin values with meaning

  • All API endpoints will return at least an Amity.Cached

    Due to a technical issue, prevPage and nextPage are not available in the returned interface for queries including pagination. A temporary fix is to use // @ts-ignore to avoid typing error. A fix for this issue will be available in our next release.

Fix

  • Run latest version with MQTT support on react-native

Breaking Changes

  • clearCache function is renamed to disableCache

  • Amity.QueryMetadata is deprecated, use Amity.SnapshotOptions instead

  • Returned data from runQuery is changed from an object with keys to an array of items

Version 0.0.1 Beta.9 (2021-12-24)

Fix

  • SDK Upgrade

Version 0.0.1 Beta.7 (2021-11-10)

Fix

  • SDK Upgrade

Version 0.0.1 Beta.6 (2021-10-28)

Fix

  • SDK Upgrade

Version 0.0.1 Beta.5 (2021-10-14)

New Feature

  • Global ban error handling

Version 0.0.1 Beta.4 (2021-10-05)

New Feature

  • Channel Types Filter for querying Channels

Version 0.0.1 Beta.3 (2021-09-21)

New Features

Initial beta release. Included the following Chat features:

  • Create Text, Image, and File Messages

  • Flag and Unflag Messages

  • Query and Get Messages

  • Update and Delete Messages

  • Add and Remove Reaction from Messages

  • Join and Leave Channels

  • Create Channels

  • Query and Get Channels

Last updated