easemob-websdk 4.0.2 → 4.0.3-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Easemob-chat.d.ts CHANGED
@@ -2169,10 +2169,27 @@ export declare namespace EasemobChat {
2169
2169
  */
2170
2170
  fetchGroupSharedFileList(this: Connection, params: {
2171
2171
  groupId: string,
2172
+ pageNum?: number,
2173
+ pageSize?: number,
2172
2174
  success?: (res: AsyncResult<FetchGroupSharedFileListResult>) => void,
2173
2175
  error?: (error: ErrorEvent) => void
2174
2176
  }): Promise<AsyncResult<FetchGroupSharedFileListResult>>;
2175
2177
 
2178
+ /**
2179
+ * Down load group file.
2180
+ *
2181
+ * ```typescript
2182
+ * connection.downloadGroupSharedFile({groupId: 'groupId', fileId: 'fileId', onFileDownloadComplete: (data)=>{console.log(data)}})
2183
+ * ```
2184
+ */
2185
+ downloadGroupSharedFile(this: Connection, params: {
2186
+ groupId: string,
2187
+ fileId: string,
2188
+ secret?: string,
2189
+ onFileDownloadComplete?: (data: Blob) => void,
2190
+ onFileDownloadError?: (err: ErrorEvent) => void
2191
+ }): void
2192
+
2176
2193
  // Contact API
2177
2194
  /**
2178
2195
  * Gets friends blacklist.
@@ -2301,6 +2318,7 @@ export declare namespace EasemobChat {
2301
2318
  start?: number | null,
2302
2319
  count?: number,
2303
2320
  isGroup?: boolean,
2321
+ format?: boolean,
2304
2322
  success?: (res: MessageBody[]) => void,
2305
2323
  fail?: (error: ErrorEvent) => void
2306
2324
  }): Promise<MessageBody[]>;
@@ -2614,14 +2632,16 @@ export declare namespace EasemobChat {
2614
2632
  interface ReadMsgSetParameters {
2615
2633
  id: string,
2616
2634
  to: string,
2617
- from?: string
2635
+ from?: string,
2636
+ chatType: 'singleChat' | 'groupChat',
2618
2637
  }
2619
2638
  interface ReadMsgBody extends ReadMsgSetParameters {
2620
2639
  type: 'read';
2621
2640
  ackId?: string;
2622
2641
  mid?: string,
2623
- groupReadCount?: number;
2642
+ groupReadCount?: { [key: string]: number };
2624
2643
  ackContent?: string;
2644
+ chatType: 'singleChat' | 'groupChat',
2625
2645
  }
2626
2646
  interface ReadParameters {
2627
2647
  type: 'read',
@@ -2632,7 +2652,9 @@ export declare namespace EasemobChat {
2632
2652
  to: string,
2633
2653
  from?: string,
2634
2654
  type: 'read';
2635
- id: string;
2655
+ id: string,
2656
+ ackContent?: string,
2657
+ chatType: 'singleChat' | 'groupChat',
2636
2658
  }
2637
2659
 
2638
2660
  interface DeliveryParameters {
@@ -2724,6 +2746,7 @@ export declare namespace EasemobChat {
2724
2746
  msg: string,
2725
2747
  from?: string
2726
2748
  ext?: { [key: string]: any },
2749
+ msgConfig?: { allowGroupAck: boolean }
2727
2750
  }
2728
2751
 
2729
2752
  interface CmdParameters {
@@ -2765,6 +2788,7 @@ export declare namespace EasemobChat {
2765
2788
  from?: string
2766
2789
  roomType?: boolean,
2767
2790
  ext?: { [key: string]: any },
2791
+ msgConfig?: { allowGroupAck: boolean }
2768
2792
  }
2769
2793
 
2770
2794
 
@@ -2810,6 +2834,7 @@ export declare namespace EasemobChat {
2810
2834
  customExts: { [key: string]: any }
2811
2835
  from?: string
2812
2836
  ext?: { [key: string]: any },
2837
+ msgConfig?: { allowGroupAck: boolean }
2813
2838
  }
2814
2839
 
2815
2840
  interface LocationParameters {
@@ -2845,7 +2870,8 @@ export declare namespace EasemobChat {
2845
2870
  success?: (data: SendMsgResult) => void,
2846
2871
  fail?: () => void,
2847
2872
  ext?: { [key: string]: any },
2848
- time: number
2873
+ time: number,
2874
+ msgConfig?: { allowGroupAck: boolean }
2849
2875
  }
2850
2876
 
2851
2877
  interface CreateLocationMsgParameters {
@@ -2858,6 +2884,7 @@ export declare namespace EasemobChat {
2858
2884
  lng: number,
2859
2885
  from?: string
2860
2886
  ext?: { [key: string]: any },
2887
+ msgConfig?: { allowGroupAck: boolean }
2861
2888
  }
2862
2889
 
2863
2890
  interface FileParameters {
@@ -2917,7 +2944,8 @@ export declare namespace EasemobChat {
2917
2944
  url: string,
2918
2945
  type: string,
2919
2946
  filename: string
2920
- }
2947
+ },
2948
+ msgConfig?: { allowGroupAck: boolean }
2921
2949
  }
2922
2950
 
2923
2951
  interface ImgParameters {
@@ -2980,7 +3008,8 @@ export declare namespace EasemobChat {
2980
3008
  url: string,
2981
3009
  type: string,
2982
3010
  filename: string
2983
- }
3011
+ },
3012
+ msgConfig?: { allowGroupAck: boolean }
2984
3013
  }
2985
3014
 
2986
3015
  interface AudioParameters {
@@ -3029,8 +3058,8 @@ export declare namespace EasemobChat {
3029
3058
  chatType: ChatType,
3030
3059
  file: FileObj,
3031
3060
  filename: string,
3032
- length: number,
3033
- file_length: number,
3061
+ length?: number,
3062
+ file_length?: number,
3034
3063
  fileInputId?: string,
3035
3064
  to: string,
3036
3065
  from?: string
@@ -3046,7 +3075,8 @@ export declare namespace EasemobChat {
3046
3075
  url: string,
3047
3076
  type: string,
3048
3077
  filename: string
3049
- }
3078
+ },
3079
+ msgConfig?: { allowGroupAck: boolean }
3050
3080
  }
3051
3081
 
3052
3082
  interface VideoParameters {
@@ -3094,8 +3124,8 @@ export declare namespace EasemobChat {
3094
3124
  chatType: ChatType,
3095
3125
  file: FileObj,
3096
3126
  filename: string,
3097
- length: number,
3098
- file_length: number,
3127
+ length?: number,
3128
+ file_length?: number,
3099
3129
  fileInputId?: string,
3100
3130
  to: string,
3101
3131
  from?: string
@@ -3108,7 +3138,8 @@ export declare namespace EasemobChat {
3108
3138
  url: string,
3109
3139
  type: string,
3110
3140
  filename: string
3111
- }
3141
+ },
3142
+ msgConfig?: { allowGroupAck: boolean }
3112
3143
  }
3113
3144
 
3114
3145
  interface ReceivedMsgBody {