NIMChatroomMemberRequest.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. //
  2. // NIMChatroomMemberRequest.h
  3. // NIMLib
  4. //
  5. // Created by Netease.
  6. // Copyright © 2016年 Netease. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. @class NIMChatroomMember;
  11. /**
  12. * 聊天室成员类型
  13. */
  14. typedef NS_ENUM(NSInteger, NIMChatroomFetchMemberType){
  15. /**
  16. * 聊天室固定成员,包括创建者,管理员,普通等级用户,受限用户(禁言+黑名单),有数量上限
  17. */
  18. NIMChatroomFetchMemberTypeRegular,
  19. /**
  20. * 聊天室临时成员,只有在线时才能在列表中看到,数量无上限
  21. */
  22. NIMChatroomFetchMemberTypeTemp,
  23. /**
  24. * 聊天室在线的固定成员
  25. */
  26. NIMChatroomFetchMemberTypeRegularOnline,
  27. /**
  28. * 聊天室非固定成员(反向查询)
  29. */
  30. NIMChatroomFetchMemberTypeUnRegularReversedOrder,
  31. };
  32. /**
  33. * 聊天室成员信息修改字段
  34. */
  35. typedef NS_ENUM(NSInteger, NIMChatroomMemberInfoUpdateTag) {
  36. /**
  37. * 聊天室成员昵称信息
  38. */
  39. NIMChatroomMemberInfoUpdateTagNick = 5,
  40. /**
  41. * 聊天室成员头像信息
  42. */
  43. NIMChatroomMemberInfoUpdateTagAvatar = 6,
  44. /**
  45. * 聊天室成员扩展信息
  46. */
  47. NIMChatroomMemberInfoUpdateTagExt = 7,
  48. };
  49. /**
  50. * 聊天室获取成员请求
  51. */
  52. @interface NIMChatroomMemberRequest : NSObject
  53. /**
  54. * 聊天室ID
  55. */
  56. @property (nonatomic,copy) NSString *roomId;
  57. /**
  58. * 聊天室成员类型
  59. */
  60. @property (nonatomic,assign) NIMChatroomFetchMemberType type;
  61. /**
  62. * 最后一位成员锚点,不包括此成员。填nil会使用当前服务器最新时间开始查询,即第一页。
  63. */
  64. @property (nullable,nonatomic,strong) NIMChatroomMember *lastMember;
  65. /**
  66. * 获取聊天室成员个数
  67. */
  68. @property (nonatomic,assign) NSUInteger limit;
  69. @end
  70. /**
  71. * 根据用户ID获取聊天室成员请求
  72. */
  73. @interface NIMChatroomMembersByIdsRequest : NSObject
  74. /**
  75. * 聊天室ID
  76. */
  77. @property (nonatomic,copy) NSString *roomId;
  78. /**
  79. * 用户ID列表,最多20个
  80. */
  81. @property (nonatomic,copy) NSArray<NSString *> *userIds;
  82. @end
  83. /**
  84. * 聊天室成员标记请求
  85. */
  86. @interface NIMChatroomMemberUpdateRequest : NSObject
  87. /**
  88. * 聊天室ID
  89. */
  90. @property (nonatomic,copy) NSString *roomId;
  91. /**
  92. * 用户ID
  93. */
  94. @property (nonatomic,copy) NSString *userId;
  95. /**
  96. * 标记是否有效
  97. */
  98. @property (nonatomic,assign) BOOL enable;
  99. /**
  100. * 操作通知事件扩展
  101. */
  102. @property (nullable,nonatomic,copy) NSString *notifyExt;
  103. @end
  104. /**
  105. * 聊天室成员信息修改请求
  106. */
  107. @interface NIMChatroomMemberInfoUpdateRequest : NSObject
  108. /**
  109. * 聊天室ID
  110. */
  111. @property (nonatomic,copy) NSString *roomId;
  112. /**
  113. * 需要更新的信息,修改传入的数据键值对是 {@(NIMChatroomMemberInfoUpdateTag) : NSString},无效数据将被过滤
  114. */
  115. @property (nonatomic,copy) NSDictionary *updateInfo;
  116. /**
  117. * 是否需要通知
  118. */
  119. @property (nonatomic,assign) BOOL needNotify;
  120. /**
  121. * 操作通知事件扩展
  122. */
  123. @property (nullable,nonatomic,copy) NSString *notifyExt;
  124. /**
  125. * 更新的信息是否需要在服务器做持久化,只对固定成员生效,默认为 NO
  126. */
  127. @property (nonatomic,assign) BOOL needSave;
  128. @end
  129. /**
  130. * 聊天室踢人请求
  131. */
  132. @interface NIMChatroomMemberKickRequest : NSObject
  133. /**
  134. * 聊天室ID
  135. */
  136. @property (nonatomic,copy) NSString *roomId;
  137. /**
  138. * 用户ID,仅管理员可以踢人;如userId是管理员仅创建者可以踢.
  139. */
  140. @property (nonatomic,copy) NSString *userId;
  141. /**
  142. * 被踢通知扩展字段
  143. */
  144. @property (nullable,nonatomic,copy) NSString *notifyExt;
  145. @end
  146. NS_ASSUME_NONNULL_END