Skip to content

Commit

Permalink
Merge pull request #99 from jpush/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
huangminlinux authored Feb 26, 2019
2 parents bac6013 + 73939e4 commit 5b227c1
Show file tree
Hide file tree
Showing 9 changed files with 2,045 additions and 2,223 deletions.
2,176 changes: 1,089 additions & 1,087 deletions ionic/index.ts

Large diffs are not rendered by default.

40 changes: 30 additions & 10 deletions ionic/jmessage/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
import { IonicNativePlugin } from '@ionic-native/core';
/**
* @name jmessage
* @description
* This plugin does something
*
* @usage
* ```typescript
* import { jmessage } from '@ionic-native/jmessage';
*
*
* constructor(private jmessage: jmessage) { }
*
* ...
*
*
* this.jmessage.functionName('Hello', 123)
* .then((res: any) => console.log(res))
* .catch((error: any) => console.error(error));
*
* ```
*/
export interface JMSingleType {
type: 'single';
username: string;
Expand Down Expand Up @@ -73,9 +94,9 @@ export declare type JMCustomMessage = JMNormalMessage & {
export interface JMEventMessage {
type: 'event';
eventType: 'group_member_added' | 'group_member_removed' | 'group_member_exit';
usernames: JMUserInfo[];
usernames: string[];
}
export declare type JMAllMessage = JMTextMessage | JMVoiceMessage | JMImageMessage | JMFileMessage | JMEventMessage;
export declare type JMAllMessage = JMTextMessage | JMVoiceMessage | JMImageMessage | JMFileMessage | JMEventMessage | JMCustomMessage;
export declare type JMMessageEventListener = (message: JMAllMessage) => void;
export declare type JMSyncOfflineMessageListener = (event: {
conversation: JMConversationInfo;
Expand Down Expand Up @@ -217,7 +238,7 @@ export interface JMMessageSendOptions {
*/
notificationText?: string;
}
export declare class JMChatRoom {
export declare class JMChatRoomOriginal {
getChatRoomInfoListOfApp(params: {
start: number;
count: number;
Expand All @@ -240,18 +261,14 @@ export declare class JMChatRoom {
}, success: () => void, fail: (error: JMError) => void): void;
getChatRoomConversationList(success: (conversationList: JMConversationInfo[]) => void, fail: (error: JMError) => void): void;
}
/**
* @name jmessage
* @description
* This plugin does something
*/
export declare class JMessagePlugin extends IonicNativePlugin {
export declare class JMessagePluginOriginal extends IonicNativePlugin {
/**
* This function does something
* @param obj {string} Some param to configure something
* @param arg1 {string} Some param to configure something
* @param arg2 {number} Another param to configure something
* @return {Promise<any>} Returns a promise that resolves when something happens
*/
functionName(arg1: string, arg2: number): Promise<any>;
init(params: JMConfig): void;
setDebugMode(params: {
enable: boolean;
Expand Down Expand Up @@ -563,3 +580,6 @@ export declare class JMessagePlugin extends IonicNativePlugin {
addReceiveGroupAdminApprovalListener(params: JMReceiveGroupAdminApprovalListener): void;
removeReceiveGroupAdminApprovalListener(params: JMReceiveGroupAdminApprovalListener): void;
}

export declare const JMChatRoom: JMChatRoomOriginal;
export declare const JMessagePlugin: JMessagePluginOriginal;
Loading

0 comments on commit 5b227c1

Please sign in to comment.