NIMChatroomMemberRequest.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  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. */
  31. typedef NS_ENUM(NSInteger, NIMChatroomMemberInfoUpdateTag) {
  32. /**
  33. * 聊天室成员昵称信息
  34. */
  35. NIMChatroomMemberInfoUpdateTagNick = 5,
  36. /**
  37. * 聊天室成员头像信息
  38. */
  39. NIMChatroomMemberInfoUpdateTagAvatar = 6,
  40. /**
  41. * 聊天室成员扩展信息
  42. */
  43. NIMChatroomMemberInfoUpdateTagExt = 7,
  44. };
  45. /**
  46. * 聊天室获取成员请求
  47. */
  48. @interface NIMChatroomMemberRequest : NSObject
  49. /**
  50. * 聊天室ID
  51. */
  52. @property (nonatomic,copy) NSString *roomId;
  53. /**
  54. * 聊天室成员类型
  55. */
  56. @property (nonatomic,assign) NIMChatroomFetchMemberType type;
  57. /**
  58. * 最后一位成员锚点,不包括此成员。填nil会使用当前服务器最新时间开始查询,即第一页。
  59. */
  60. @property (nullable,nonatomic,strong) NIMChatroomMember *lastMember;
  61. /**
  62. * 获取聊天室成员个数
  63. */
  64. @property (nonatomic,assign) NSUInteger limit;
  65. @end
  66. /**
  67. * 根据用户ID获取聊天室成员请求
  68. */
  69. @interface NIMChatroomMembersByIdsRequest : NSObject
  70. /**
  71. * 聊天室ID
  72. */
  73. @property (nonatomic,copy) NSString *roomId;
  74. /**
  75. * 用户ID列表,最多20个
  76. */
  77. @property (nonatomic,copy) NSArray<NSString *> *userIds;
  78. @end
  79. /**
  80. * 聊天室成员标记请求
  81. */
  82. @interface NIMChatroomMemberUpdateRequest : NSObject
  83. /**
  84. * 聊天室ID
  85. */
  86. @property (nonatomic,copy) NSString *roomId;
  87. /**
  88. * 用户ID
  89. */
  90. @property (nonatomic,copy) NSString *userId;
  91. /**
  92. * 标记是否有效
  93. */
  94. @property (nonatomic,assign) BOOL enable;
  95. /**
  96. * 操作通知事件扩展
  97. */
  98. @property (nullable,nonatomic,copy) NSString *notifyExt;
  99. @end
  100. /**
  101. * 聊天室成员信息修改请求
  102. */
  103. @interface NIMChatroomMemberInfoUpdateRequest : NSObject
  104. /**
  105. * 聊天室ID
  106. */
  107. @property (nonatomic,copy) NSString *roomId;
  108. /**
  109. * 需要更新的信息,修改传入的数据键值对是 {@(NIMChatroomMemberInfoUpdateTag) : NSString},无效数据将被过滤
  110. */
  111. @property (nonatomic,copy) NSDictionary *updateInfo;
  112. /**
  113. * 是否需要通知
  114. */
  115. @property (nonatomic,assign) BOOL needNotify;
  116. /**
  117. * 操作通知事件扩展
  118. */
  119. @property (nullable,nonatomic,copy) NSString *notifyExt;
  120. /**
  121. * 更新的信息是否需要在服务器做持久化,只对固定成员生效,默认为 NO
  122. */
  123. @property (nonatomic,assign) BOOL needSave;
  124. @end
  125. /**
  126. * 聊天室踢人请求
  127. */
  128. @interface NIMChatroomMemberKickRequest : NSObject
  129. /**
  130. * 聊天室ID
  131. */
  132. @property (nonatomic,copy) NSString *roomId;
  133. /**
  134. * 用户ID,仅管理员可以踢人;如userId是管理员仅创建者可以踢.
  135. */
  136. @property (nonatomic,copy) NSString *userId;
  137. /**
  138. * 被踢通知扩展字段
  139. */
  140. @property (nullable,nonatomic,copy) NSString *notifyExt;
  141. @end
  142. NS_ASSUME_NONNULL_END