Skip to content

Commit d323572

Browse files
feat(rn-sdk): document OpenIMApiError; make operationID optional; update API params
- Replace CatchResponse with OpenIMApiError (name, code, message, operationID) - Mark operationID as optional across RN SDK docs - Update params for getFriendApplicationListAsApplicant/Recipient and getGroupApplicationListAsApplicant/Recipient
1 parent c09c60c commit d323572

File tree

105 files changed

+353
-327
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+353
-327
lines changed

docs/sdks/api/conversation/changeInputStates.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ IMSDK.asyncApi('changeInputStates', IMSDK.uuid(), {
252252
OpenIMSDKRN.changeInputStates({
253253
conversationID: string,
254254
focus: boolean,
255-
}, operationID: string): Promise<void>
255+
}, operationID?: string): Promise<void>
256256
```
257257

258258
### 输入参数
@@ -261,13 +261,13 @@ OpenIMSDKRN.changeInputStates({
261261
| -------------- | -------- | -------- | ------- |
262262
| conversationID | string || 会话 ID |
263263
| focus | boolean || 是否正在输入 |
264-
| operationID | string | | 操作 ID,用于定位问题,保持唯一,建议用当前时间和随机数 |
264+
| operationID | string | | 操作 ID,用于定位问题,保持唯一,建议用当前时间和随机数 |
265265

266266
### 返回结果
267267
| 参数名称 | 参数类型 | 描述 |
268268
| --------------- | ------------------------------------------------------- | ------------ |
269269
| Promise.then() | Promise<void\> | 调用成功回调 |
270-
| Promise.catch() | Promise<[Response](docs/sdks/class/response.mdx)\> | 调用失败回调 |
270+
| Promise.catch() | Promise<[OpenIMApiError](docs/sdks/class/response.mdx)\> | 调用失败回调 |
271271

272272
### 代码示例
273273

docs/sdks/api/conversation/clearConversationAndDeleteAllMsg.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,21 +229,21 @@ IMSDK.asyncApi(
229229
### 函数原型
230230

231231
```ts showLineNumbers
232-
OpenIMSDKRN.clearConversationAndDeleteAllMsg(operationID: string, conversationID: string): Promise<void>
232+
OpenIMSDKRN.clearConversationAndDeleteAllMsg(conversationID: string, operationID?: string): Promise<void>
233233
```
234234

235235
### 输入参数
236236

237237
| 参数名称 | 参数类型 | 是否必填 | 描述 |
238238
| -------------- | -------- | -------- | ------------------------------------------------------- |
239-
| operationID | string || 操作 ID,用于定位问题,保持唯一,建议用当前时间和随机数 |
240239
| conversationID | string || 会话 ID |
240+
| operationID | string || 操作 ID,用于定位问题,保持唯一,建议用当前时间和随机数 |
241241

242242
### 返回结果
243243
| 参数名称 | 参数类型 | 描述 |
244244
| --------------- | ------------------------------------------------------- | ------------ |
245245
| Promise.then() | Promise<void\> | 调用成功回调 |
246-
| Promise.catch() | Promise<[Response](docs/sdks/class/response.mdx)\> | 调用失败回调 |
246+
| Promise.catch() | Promise<[OpenIMApiError](docs/sdks/class/response.mdx)\> | 调用失败回调 |
247247

248248
### 代码示例
249249

docs/sdks/api/conversation/deleteConversationAndDeleteAllMsg.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,21 +223,21 @@ IMSDK.asyncApi(
223223
### 函数原型
224224

225225
```ts showLineNumbers
226-
OpenIMSDKRN.deleteConversationAndDeleteAllMsg(operationID: string, conversationID: string): Promise<void>
226+
OpenIMSDKRN.deleteConversationAndDeleteAllMsg(conversationID: string, operationID?: string): Promise<void>
227227
```
228228

229229
### 输入参数
230230

231231
| 参数名称 | 参数类型 | 是否必填 | 描述 |
232232
| -------------- | -------- | -------- | ------------------------------------------------------- |
233-
| operationID | string || 操作 ID,用于定位问题,保持唯一,建议用当前时间和随机数 |
234233
| conversationID | string || 会话 ID |
234+
| operationID | string || 操作 ID,用于定位问题,保持唯一,建议用当前时间和随机数 |
235235

236236
### 返回结果
237237
| 参数名称 | 参数类型 | 描述 |
238238
| --------------- | ------------------------------------------------------- | ------------ |
239239
| Promise.then() | Promise<void\> | 调用成功回调 |
240-
| Promise.catch() | Promise<[Response](docs/sdks/class/response.mdx)\> | 调用失败回调 |
240+
| Promise.catch() | Promise<[OpenIMApiError](docs/sdks/class/response.mdx)\> | 调用失败回调 |
241241

242242
### 代码示例
243243

docs/sdks/api/conversation/getAllConversationList.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,21 +218,21 @@ IMSDK.asyncApi('getAllConversationList', IMSDK.uuid())
218218
### 函数原型
219219

220220
```ts showLineNumbers
221-
OpenIMSDKRN.getAllConversationList(operationID: string): Promise<ConversationItem[]>
221+
OpenIMSDKRN.getAllConversationList(operationID?: string): Promise<ConversationItem[]>
222222
```
223223

224224
### 输入参数
225225

226226
| 参数名称 | 参数类型 | 是否必填 | 描述 |
227227
| ----------- | -------- | -------- | ------------------------------------------------------- |
228-
| operationID | string | | 操作 ID,用于定位问题,保持唯一,建议用当前时间和随机数 |
228+
| operationID | string | | 操作 ID,用于定位问题,保持唯一,建议用当前时间和随机数 |
229229

230230
### 返回结果
231231

232232
| 参数名称 | 参数类型 | 描述 |
233233
| --------------- | --------------------------------------------------------------------------------------------- | ------------ |
234234
| Promise.then() | Promise<[ConversationItem](docs/sdks/class/conversation/conversationInfo.mdx)[]>\> | 调用成功回调 |
235-
| Promise.catch() | Promise<[Response](docs/sdks/class/response.mdx)\> | 调用失败回调 |
235+
| Promise.catch() | Promise<[OpenIMApiError](docs/sdks/class/response.mdx)\> | 调用失败回调 |
236236

237237
### 代码示例
238238

docs/sdks/api/conversation/getConversationIDBySessionType.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,24 +230,24 @@ IMSDK.asyncApi('getConversationIDBySessionType', IMSDK.uuid(), {
230230
OpenIMSDKRN.getConversationIDBySessionType({
231231
sourceID: string,
232232
sessionType: number,
233-
}, operationID: string): Promise<string>
233+
}, operationID?: string): Promise<string>
234234
```
235235

236236
### 输入参数
237237

238238
| 参数名称 | 参数类型 | 是否必填 | 描述 |
239239
| ----------- | -------------------------------------------------- | -------- | ------------------------------------------------------- |
240-
| operationID | string || 操作 ID,用于定位问题,保持唯一,建议用当前时间和随机数 |
241240
| sourceID | string || 会话的用户 ID(单聊)或 groupID(群聊) |
242241
| sessionType | [SessionType](docs/sdks/enum/conversationType.mdx) || 会话类型 |
242+
| operationID | string || 操作 ID,用于定位问题,保持唯一,建议用当前时间和随机数 |
243243

244244

245245
### 返回结果
246246

247247
| 参数名称 | 参数类型 | 描述 |
248248
| --------------- | ------------------------------------------------------- | ------------ |
249249
| Promise.then() | Promise<string\> | 调用成功回调 |
250-
| Promise.catch() | Promise<[CatchResponse](docs/sdks/class/response.mdx)\> | 调用失败回调 |
250+
| Promise.catch() | Promise<[OpenIMApiError](docs/sdks/class/response.mdx)\> | 调用失败回调 |
251251

252252
### 代码示例
253253

docs/sdks/api/conversation/getConversationListSplit.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,24 +248,24 @@ IMSDK.asyncApi('getConversationListSplit', IMSDK.uuid(), {
248248
OpenIMSDKRN.getConversationListSplit({
249249
offset: number,
250250
count: number,
251-
}, operationID: string): Promise<ConversationItem[]>
251+
}, operationID?: string): Promise<ConversationItem[]>
252252
```
253253

254254
### 输入参数
255255

256256
| 参数名称 | 参数类型 | 是否必填 | 描述 |
257257
| ----------- | -------- | -------- | ------------------------------------------------------- |
258-
| operationID | string || 操作 ID,用于定位问题,保持唯一,建议用当前时间和随机数 |
259258
| offset | number || 分页拉取起始下标 |
260259
| count | number || 一页拉取的数量 |
260+
| operationID | string || 操作 ID,用于定位问题,保持唯一,建议用当前时间和随机数 |
261261

262262

263263
### 返回结果
264264

265265
| 参数名称 | 参数类型 | 描述 |
266266
| --------------- | -------------------------------------------------------------------------------- | ------------ |
267267
| Promise.then() | Promise<[ConversationItem](docs/sdks/class/conversation/conversationInfo.mdx)[]> | 调用成功回调 |
268-
| Promise.catch() | Promise<[CatchResponse](docs/sdks/class/response.mdx)\> | 调用失败回调 |
268+
| Promise.catch() | Promise<[OpenIMApiError](docs/sdks/class/response.mdx)\> | 调用失败回调 |
269269

270270
### 代码示例
271271

docs/sdks/api/conversation/getInputStates.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ IMSDK.asyncApi('getInputstates', IMSDK.uuid(), {
250250
OpenIMSDKRN.getInputstates({
251251
conversationID: string,
252252
userID: string,
253-
}, operationID: string): Promise<number[]>
253+
}, operationID?: string): Promise<number[]>
254254
```
255255

256256
### 输入参数
@@ -259,13 +259,13 @@ OpenIMSDKRN.getInputstates({
259259
| -------------- | -------- | -------- | ------- |
260260
| conversationID | string || 会话 ID |
261261
| userID | string || 用户ID |
262-
| operationID | string | | 操作 ID,用于定位问题,保持唯一,建议用当前时间和随机数 |
262+
| operationID | string | | 操作 ID,用于定位问题,保持唯一,建议用当前时间和随机数 |
263263

264264
### 返回结果
265265
| 参数名称 | 参数类型 | 描述 |
266266
| --------------- | ------------------------------------------------------- | ------------ |
267267
| Promise.then() | Promise<number[]\> | 调用成功回调 |
268-
| Promise.catch() | Promise<[Response](docs/sdks/class/response.mdx)\> | 调用失败回调 |
268+
| Promise.catch() | Promise<[OpenIMApiError](docs/sdks/class/response.mdx)\> | 调用失败回调 |
269269

270270
### 代码示例
271271

docs/sdks/api/conversation/getMultipleConversation.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,23 +220,22 @@ IMSDK.asyncApi('getMultipleConversation', IMSDK.uuid(), ['conversationID'])
220220
```ts showLineNumbers
221221
OpenIMSDKRN.getMultipleConversation({
222222
conversationIDList: string[],
223-
}, operationID: string): Promise<ConversationItem[]>
223+
}, operationID?: string): Promise<ConversationItem[]>
224224
```
225225

226226
### 输入参数
227227

228228
| 参数名称 | 参数类型 | 是否必填 | 描述 |
229229
| ------------------ | -------- | -------- | ------------------------------------------------------- |
230-
| operationID | string || 操作 ID,用于定位问题,保持唯一,建议用当前时间和随机数 |
231230
| conversationIDList | string[] || 会话 ID 列表 |
232-
231+
| operationID | string || 操作 ID,用于定位问题,保持唯一,建议用当前时间和随机数 |
233232

234233
### 返回结果
235234

236235
| 参数名称 | 参数类型 | 描述 |
237236
| --------------- | -------------------------------------------------------------------------------- | ------------ |
238237
| Promise.then() | Promise<[ConversationItem](docs/sdks/class/conversation/conversationInfo.mdx)[]> | 调用成功回调 |
239-
| Promise.catch() | Promise<[CatchResponse](docs/sdks/class/response.mdx)\> | 调用失败回调 |
238+
| Promise.catch() | Promise<[OpenIMApiError](docs/sdks/class/response.mdx)\> | 调用失败回调 |
240239

241240
### 代码示例
242241

docs/sdks/api/conversation/getOneConversation.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,24 +243,23 @@ IMSDK.asyncApi('getOneConversation', IMSDK.uuid(), {
243243
OpenIMSDKRN.getOneConversation({
244244
sessionType: number,
245245
sourceID: string,
246-
}, operationID: string): Promise<ConversationItem>
246+
}, operationID?: string): Promise<ConversationItem>
247247
```
248248

249249
### 输入参数
250250

251251
| 参数名称 | 参数类型 | 是否必填 | 描述 |
252252
| ----------- | -------------------------------------------------- | -------- | ------------------------------------------------------- |
253-
| operationID | string || 操作 ID,用于定位问题,保持唯一,建议用当前时间和随机数 |
254253
| sourceID | string || 会话的用户 ID(单聊)或 groupID(群聊) |
255254
| sessionType | [SessionType](docs/sdks/enum/conversationType.mdx) || 会话类型 |
256-
255+
| operationID | string || 操作 ID,用于定位问题,保持唯一,建议用当前时间和随机数 |
257256

258257
### 返回结果
259258

260259
| 参数名称 | 参数类型 | 描述 |
261260
| --------------- | ------------------------------------------------------------------------------ | ------------ |
262261
| Promise.then() | Promise<[ConversationItem](docs/sdks/class/conversation/conversationInfo.mdx)> | 调用成功回调 |
263-
| Promise.catch() | Promise<[CatchResponse](docs/sdks/class/response.mdx)\> | 调用失败回调 |
262+
| Promise.catch() | Promise<[OpenIMApiError](docs/sdks/class/response.mdx)\> | 调用失败回调 |
264263

265264
### 代码示例
266265

docs/sdks/api/conversation/getTotalUnreadMsgCount.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,21 +211,21 @@ IMSDK.asyncApi('getTotalUnreadMsgCount', IMSDK.uuid())
211211
### 函数原型
212212

213213
```ts showLineNumbers
214-
OpenIMSDKRN.getTotalUnreadMsgCount(operationID: string): Promise<number>
214+
OpenIMSDKRN.getTotalUnreadMsgCount(operationID?: string): Promise<number>
215215
```
216216

217217
### 输入参数
218218

219219
| 参数名称 | 参数类型 | 是否必填 | 描述 |
220220
| ----------- | -------- | -------- | ------------------------------------------------------- |
221-
| operationID | string | | 操作 ID,用于定位问题,保持唯一,建议用当前时间和随机数 |
221+
| operationID | string | | 操作 ID,用于定位问题,保持唯一,建议用当前时间和随机数 |
222222

223223
### 返回结果
224224

225225
| 参数名称 | 参数类型 | 描述 |
226226
| --------------- | ------------------------------------------------------- | ------------ |
227227
| Promise.then() | Promise<number\> | 调用成功回调 |
228-
| Promise.catch() | Promise<[CatchResponse](docs/sdks/class/response.mdx)\> | 调用失败回调 |
228+
| Promise.catch() | Promise<[OpenIMApiError](docs/sdks/class/response.mdx)\> | 调用失败回调 |
229229

230230
### 代码示例
231231

0 commit comments

Comments
 (0)