Skip to content

Commit

Permalink
v2.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
mayur-bhandari committed May 27, 2020
1 parent fed32f6 commit fddcefd
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 30 deletions.
100 changes: 74 additions & 26 deletions CometChat.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,6 @@ export namespace CometChat {
*/
export function isInitialized(): boolean;

/**
* Returns the singleton object of CometChat class.
* if CometChat object is not created yet? it will create and returns it.
*
* @param appId Optional an argument needed for first time initialization.
*/
export function getInstance(appId?: string);

/**
* function to register the FCM token for Push Notification.
* @static
Expand Down Expand Up @@ -333,6 +325,22 @@ export namespace CometChat {
export function blockUsers(blockedUids: String[]): Promise<Object>;
export function unblockUsers(blockedUids: String[]): Promise<Object>;

/**-------------------------------------------------------------------*
* Conversation related functions provided by CometChat class *
*--------------------------------------------------------------------**/

/**
* function to fetch conversation for a specific user/group.
*
* @static
* @param {string} conversationWith
* @param {string} conversationType
* @returns Promise<Conversation>
* @memberof CometChat
*/

export function getConversation(conversationWith: string, conversationType: string): Promise<Conversation>;

/**-------------------------------------------------------------------*
* Group related functions provided by CometChat class *
*--------------------------------------------------------------------**/
Expand Down Expand Up @@ -647,6 +655,32 @@ export namespace CometChat {
* @memberof CometChat
*/
export function logout(): Promise<Object>;

/**
* method to set resource, platform and language variable.
*
* @static
* @param {string} resource
* @param {string} platform
* @param {string} language
* @returns void
* @memberof CometChat
*/
export function setSource(resource: string, platform: string, language: string): void;

/**
* method to call extension API.
*
* @static
* @param {string} slug
* @param {string} method
* @param {string} endpoint
* @param {Object} data
* @returns {Promise<Object>}
* @memberof CometChat
*/
export function callExtension(slug: string, method: string, endpoint: string, data: Object): Promise<Object>;

export function isExtensionEnabled(extensionId: string): Promise<boolean>;
export function clearCache(): void;
export function typingTimer(): void;
Expand Down Expand Up @@ -710,7 +744,7 @@ export namespace CometChat {
setStatusMessage(statusMessage: string): void;
setBlockedByMe(blockedByMe: boolean): void;
getBlockedByMe(): boolean;
setJasBlockedMe(hasBlockedMe: boolean): void;
setHasBlockedMe(hasBlockedMe: boolean): void;
getHasBlockedMeMe(): boolean;
constructor(userObj: UserObj | any);
}
Expand All @@ -724,12 +758,12 @@ export namespace CometChat {
setConversationType(conversationType: string): void;
setLastMessage(lastMessage: TextMessage | MediaMessage | CustomMessage | any): void;
setConversationWith(conversationWith: User | Group): void;
setUnreadMessageCount(unreadMessageCount: number | any): void;
setUnreadMessageCount(unreadMessageCount: number): void;
getConversationId(): string;
getConversationType(): string;
getLastMessage(): TextMessage | MediaMessage | CustomMessage | any;
getConversationWith(): User | Group;
getUnreadMessageCount(): number | any;
getUnreadMessageCount(): number;
constructor(conversationId: string, conversationType: string, lastMessage: TextMessage | MediaMessage | CustomMessage | any, conversationWith: User | Group, unreadMessageCount: number | any)
}

Expand Down Expand Up @@ -1364,6 +1398,18 @@ export namespace CometChat {
message: string;
details: {};
};
EMPTY_STRING: {
code: string;
name: string;
message: string;
details: {};
};
MISSING_KEY: {
code: string;
name: string;
message: string;
details: {};
};
};
export const UserErrors: {
INVALID_STATUS: CometChatException;
Expand Down Expand Up @@ -1469,6 +1515,8 @@ export namespace CometChat {
getScope(): string;
getJoinedAt(): string;
setJoinedAt(joinedAt: string): void;
getMembersCount(): number;
setMembersCount(membersCount: number): void;
}

export class ConnectionListener {
Expand Down Expand Up @@ -1770,7 +1818,6 @@ export namespace CometChat {

export class BannedMembersRequest {
constructor(builder?: BannedMembersRequestBuilder);
setGUID
fetchPrevious(): Promise<GroupMember[] | []>;
fetchNext(): Promise<GroupMember[] | []>;
/**
Expand All @@ -1781,14 +1828,13 @@ export namespace CometChat {
*/
getNextData(): any;
}

export class BannedMembersRequestBuilder {
constructor(guid: string);
limit: number;
searchKeyword: string;
hasJoined: boolean;
setLimit(limit: number): this;
setSearchKeyword(searchKeyword: string): this;
joinedOnly(hasJoined: boolean): this;
build(): BannedMembersRequest;
}

Expand All @@ -1799,15 +1845,17 @@ export namespace CometChat {
getNextData(): any;
getPreData(): any;
}

export class GroupMembersRequestBuilder {
constructor(guid: string);
limit: number;
searchKeyword: string;
guid: string;
constructor(guid: string);
setLimit(limit: number): this;
setSearchKeyword(searchKeyword: string): this;
build(): GroupMembersRequest;
}

export class GroupOutCastMembersRequestBuilder extends GroupMembersRequestBuilder {
isOutCastReq: boolean;
constructor(guid: string);
Expand Down Expand Up @@ -2056,17 +2104,17 @@ export namespace CometChat {
* @returns {Object}
* @memberof FileObject
*/
toJSON(fileObject: Attachment): Object;
getFileExtension(): string;
setFileExtension(extension: string): void;
getFileMimeType(): string;
setFileMimeType(mimeType: string): void;
getFileName(): string;
setFileName(name: string): void;
getFileSize(): number;
setFileSize(size: number): void;
getFileUrl(): string;
setFileUrl(url: string): void;
toJSON(attachment: Attachment): Object;
getExtension(): string;
setExtension(extension: string): void;
getMimeType(): string;
setMimeType(mimeType: string): void;
getName(): string;
setName(name: string): void;
getSize(): number;
setSize(size: number): void;
getUrl(): string;
setUrl(url: string): void;
}

export class MessageReceipt {
Expand Down
2 changes: 1 addition & 1 deletion CometChat.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This guide demonstrates how to add chat to a Javascript application using CometC
First, install via npm

```
npm install @cometchat-pro/cordova-ionic-chat@2.0.7 --save
npm install @cometchat-pro/cordova-ionic-chat@2.0.8 --save
```

Then, import the `CometChat` object wherever you want to use CometChat
Expand All @@ -47,7 +47,7 @@ import { CometChat } from "@cometchat-pro/cordova-ionic-chat"
Include the CometChat Javascript library in your HTML code

```
<script type="text/javascript" src="https://unpkg.com/@cometchat-pro/cordova-ionic-chat@2.0.7/CometChat.js"></script>
<script type="text/javascript" src="https://unpkg.com/@cometchat-pro/cordova-ionic-chat@2.0.8/CometChat.js"></script>
```

To learn more, please refer to our Documentation: <a href="https://prodocs.cometchat.com/v2.0/docs/cordova-ionic-quick-start">Documentation</a>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cometchat-pro/cordova-ionic-chat",
"version": "2.0.7",
"version": "2.0.8",
"description": "A complete chat solution.",
"main": "CometChat.js",
"scripts": {
Expand Down

0 comments on commit fddcefd

Please sign in to comment.