Skip to content

Commit f67e4a5

Browse files
committed
docs(uniapp): render nullable table types safely
1 parent 1d5278e commit f67e4a5

21 files changed

Lines changed: 120 additions & 120 deletions

content/zh/docs/chat/sdk/uniapp/calling/managing-calls/accept-call.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ Promise 成功后,`roomCredentials` 是 `OpenIMSignalingAcceptResult | null`
1818

1919
| 字段 | 类型 | 说明 |
2020
| --- | --- | --- |
21-
| `roomID` | <code>string &#124; null</code> | 本次通话的媒体房间 ID。 |
22-
| `token` | <code>string &#124; null</code> | 加入媒体房间使用的短期凭据。 |
23-
| `liveURL` | <code>string &#124; null</code> | 媒体服务返回的连接地址。 |
24-
| `invitation` | <code>OpenIMSignalingInvitationInfo &#124; null</code> | 服务端返回的邀请快照。 |
21+
| `roomID` | `string``null` | 本次通话的媒体房间 ID。 |
22+
| `token` | `string``null` | 加入媒体房间使用的短期凭据。 |
23+
| `liveURL` | `string``null` | 媒体服务返回的连接地址。 |
24+
| `invitation` | `OpenIMSignalingInvitationInfo``null` | 服务端返回的邀请快照。 |
2525

2626
这些字段均为可选值且敏感,只保存在内存中。取得有效的 `token``roomID` 后再连接媒体房间;Promise 成功、对方收到接受事件和媒体真正连接是不同阶段。后续状态由[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)继续合并。

content/zh/docs/chat/sdk/uniapp/calling/managing-calls/start-single-call.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ Promise 成功后,`roomCredentials` 是 `OpenIMSignalingInviteResult | null`
6666

6767
| 字段 | 类型 | 说明 |
6868
| --- | --- | --- |
69-
| `roomID` | <code>string &#124; null</code> | 本次通话的媒体房间 ID。 |
70-
| `token` | <code>string &#124; null</code> | 加入媒体房间使用的短期凭据,只应保存在内存中。 |
71-
| `liveURL` | <code>string &#124; null</code> | 媒体服务返回的房间连接地址。 |
72-
| `busyLineUserIDList` | <code>string[] &#124; null</code> | 因忙线未能进入邀请流程的用户 ID。 |
73-
| `invitation` | <code>OpenIMSignalingInvitationInfo &#124; null</code> | 服务端返回的邀请快照。 |
69+
| `roomID` | `string``null` | 本次通话的媒体房间 ID。 |
70+
| `token` | `string``null` | 加入媒体房间使用的短期凭据,只应保存在内存中。 |
71+
| `liveURL` | `string``null` | 媒体服务返回的房间连接地址。 |
72+
| `busyLineUserIDList` | `string[]``null` | 因忙线未能进入邀请流程的用户 ID。 |
73+
| `invitation` | `OpenIMSignalingInvitationInfo``null` | 服务端返回的邀请快照。 |
7474

7575
取得有效的 `token``roomID` 后再连接媒体房间。Promise 成功只表示信令请求完成并取得房间凭据,不表示对方已经接听;后续状态见[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)。邀请成功后若页面展示失败,应主动取消。不要在日志中打印 token 或 liveURL。

content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Promise 成功后,结果是 `OpenIMSignalingGetRoomByGroupIDResult | null` 快
1818

1919
| 字段 | 类型 | 说明 |
2020
| --- | --- | --- |
21-
| `roomID` | <code>string &#124; null</code> | 当前群通话的房间 ID。 |
22-
| `invitation` | <code>OpenIMSignalingInvitationInfo &#124; null</code> | 当前房间对应的原始邀请信息。 |
21+
| `roomID` | `string``null` | 当前群通话的房间 ID。 |
22+
| `invitation` | `OpenIMSignalingInvitationInfo``null` | 当前房间对应的原始邀请信息。 |
2323

2424
当前 uni-app / uni-app x 合同不像 Wasm 结果那样包含参与者资料;成员快照应由媒体引擎或业务状态提供,不要伪造 `participant` 字段。
2525

content/zh/docs/chat/sdk/uniapp/file-uploads/upload-file.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ sourcePath: '/sdk/uniapp/file-uploads/upload-file'
1414
| `name` | `string` || 文件名。 |
1515
| `contentType` | `string` || MIME 类型。 |
1616
| `uuid` | `string` || 业务为本次上传生成的稳定任务 ID。 |
17-
| `cancelID` | <code>string &#124; null</code> || 用于取消本次上传的稳定 ID。 |
18-
| `cause` | <code>string &#124; null</code> || 业务侧记录的上传用途或原因。 |
17+
| `cancelID` | `string``null` || 用于取消本次上传的稳定 ID。 |
18+
| `cause` | `string``null` || 业务侧记录的上传用途或原因。 |
1919

2020
如果界面需要显示进度,应在调用 `uploadFile()` 前注册进度事件,避免较小文件在监听建立前完成上传。
2121

@@ -52,12 +52,12 @@ Promise 成功后,结果是 `OpenIMUploadFileResult | null`:
5252

5353
| 字段 | 类型 | 说明 |
5454
| --- | --- | --- |
55-
| `url` | <code>string &#124; null</code> | 上传后的远端资源 URL。 |
56-
| `uri` | <code>string &#124; null</code> | 服务端返回的资源 URI。 |
57-
| `uuid` | <code>string &#124; null</code> | 本次上传的任务标识。 |
58-
| `size` | <code>number &#124; null</code> | 文件大小。 |
59-
| `typ` | <code>number &#124; null</code> | 服务端返回的资源类型。 |
60-
| `mediaID` | <code>string &#124; null</code> | 媒体资源 ID。 |
55+
| `url` | `string``null` | 上传后的远端资源 URL。 |
56+
| `uri` | `string``null` | 服务端返回的资源 URI。 |
57+
| `uuid` | `string``null` | 本次上传的任务标识。 |
58+
| `size` | `number``null` | 文件大小。 |
59+
| `typ` | `number``null` | 服务端返回的资源类型。 |
60+
| `mediaID` | `string``null` | 媒体资源 ID。 |
6161

6262
使用 `result?.url` 写入头像、群资料或创建对应消息对象。Promise 成功只表示上传请求成功,不表示资料已经更新,也不表示聊天消息已经创建或发送;后续业务写入必须单独完成。
6363

content/zh/docs/chat/sdk/uniapp/group/create-group.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ sourcePath: '/sdk/uniapp/group/create-group'
1212
| --- | --- | --- | --- |
1313
| `groupInfo.groupName` | `string` || 群名称。 |
1414
| `groupInfo.groupType` | `2` || 当前合同支持的群类型固定为 `2`|
15-
| `groupInfo.notification` | <code>string &#124; null</code> || 初始群公告。 |
16-
| `groupInfo.introduction` | <code>string &#124; null</code> || 群简介。 |
17-
| `groupInfo.faceURL` | <code>string &#124; null</code> || 群头像 URL。 |
18-
| `groupInfo.ex` | <code>string &#124; null</code> || 群扩展字符串,完整写入。 |
15+
| `groupInfo.notification` | `string``null` || 初始群公告。 |
16+
| `groupInfo.introduction` | `string``null` || 群简介。 |
17+
| `groupInfo.faceURL` | `string``null` || 群头像 URL。 |
18+
| `groupInfo.ex` | `string``null` || 群扩展字符串,完整写入。 |
1919
| `memberUserIDs` | `string[]` || 初始普通成员用户 ID。 |
20-
| `adminUserIDs` | <code>string[] &#124; null</code> || 初始管理员用户 ID。 |
20+
| `adminUserIDs` | `string[]``null` || 初始管理员用户 ID。 |
2121

2222
```uts
2323
import { createGroup } from '@/uni_modules/unix-openim-sdk'

content/zh/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ sourcePath: '/sdk/uniapp/group/group-applications/get-group-application-list-as-
1212

1313
| 参数 | 类型 | 是否必填 | 说明 |
1414
| --- | --- | --- | --- |
15-
| `offset` | <code>number &#124; null</code> || 分页偏移量,首页传 `0`|
16-
| `count` | <code>number &#124; null</code> || 本次读取数量。 |
15+
| `offset` | `number``null` || 分页偏移量,首页传 `0`|
16+
| `count` | `number``null` || 本次读取数量。 |
1717

1818
```uts
1919
import { getGroupApplicationListAsApplicant } from '@/uni_modules/unix-openim-sdk'

content/zh/docs/chat/sdk/uniapp/group/join-group.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ sourcePath: '/sdk/uniapp/group/join-group'
1313
| `groupID` | `string` || 要申请加入的群 ID。 |
1414
| `reqMsg` | `string` || 申请说明,可能向群主或管理员展示。 |
1515
| `joinSource` | `number` || 入群来源值,使用产品与服务端约定。 |
16-
| `ex` | <code>string &#124; null</code> || 申请扩展字符串,只按已确认协议填写。 |
16+
| `ex` | `string``null` || 申请扩展字符串,只按已确认协议填写。 |
1717

1818
```uts
1919
import { joinGroup } from '@/uni_modules/unix-openim-sdk'

content/zh/docs/chat/sdk/uniapp/group/update-group-profile.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ sourcePath: '/sdk/uniapp/group/update-group-profile'
1111
| 参数 | 类型 | 是否必填 | 说明 |
1212
| --- | --- | --- | --- |
1313
| `groupID` | `string` || 要更新的群组 ID。 |
14-
| `groupName` | <code>string &#124; null</code> || 新群名称。 |
15-
| `introduction` | <code>string &#124; null</code> || 新群简介。 |
16-
| `faceURL` | <code>string &#124; null</code> || 新群头像地址。 |
14+
| `groupName` | `string``null` || 新群名称。 |
15+
| `introduction` | `string``null` || 新群简介。 |
16+
| `faceURL` | `string``null` || 新群头像地址。 |
1717

1818
`groupID` 外,至少传入一个实际要修改的资料字段。未传字段保持原值。
1919

content/zh/docs/chat/sdk/uniapp/message/composing-messages/check-speech-to-text.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ Promise 成功后,结果是 `OpenIMSpeechToTextCapabilitiesResult | null`:
1616

1717
| 字段 | 类型 | 说明 |
1818
| --- | --- | --- |
19-
| `format` | <code>string[] &#124; null</code> | 支持的音频格式。 |
20-
| `sampleRateHz` | <code>number[] &#124; null</code> | 支持的音频采样率,单位为赫兹。 |
21-
| `maxRecordTimeMs` | <code>number &#124; null</code> | 最大录音时长,单位为毫秒。 |
22-
| `maxFileSize` | <code>number &#124; null</code> | 最大文件大小,单位为字节。 |
23-
| `provider` | <code>string &#124; null</code> | 当前语音识别服务提供方。 |
24-
| `requestType` | <code>string &#124; null</code> | 服务端要求的请求类型。 |
25-
| `crossDomain` | <code>boolean &#124; null</code> | 是否允许跨域处理。 |
19+
| `format` | `string[]``null` | 支持的音频格式。 |
20+
| `sampleRateHz` | `number[]``null` | 支持的音频采样率,单位为赫兹。 |
21+
| `maxRecordTimeMs` | `number``null` | 最大录音时长,单位为毫秒。 |
22+
| `maxFileSize` | `number``null` | 最大文件大小,单位为字节。 |
23+
| `provider` | `string``null` | 当前语音识别服务提供方。 |
24+
| `requestType` | `string``null` | 服务端要求的请求类型。 |
25+
| `crossDomain` | `boolean``null` | 是否允许跨域处理。 |
2626

2727
在展示转写入口前查询并缓存当前 session 的结果。录音完成后按能力字段校验格式、采样率、时长和字节数;能力可能随服务端、语言或账号变化,重新登录后应刷新。查询失败或没有能力时停用入口,不要猜测限制。查询不会触发消息事件。

content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-card-message.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ sourcePath: '/sdk/uniapp/message/creating-messages/create-card-message'
1010

1111
| 参数 | 类型 | 建议 | 说明 |
1212
| --- | --- | --- | --- |
13-
| `userID` | <code>string &#124; null</code> | 必填 | 名片对应的用户 ID。 |
14-
| `nickname` | <code>string &#124; null</code> | 必填 | 名片中保存的展示名称。 |
15-
| `faceURL` | <code>string &#124; null</code> | 必填 | 名片中保存的头像地址。 |
16-
| `ex` | <code>string &#124; null</code> | 必填 | 名片扩展信息;没有内容时传空字符串。 |
13+
| `userID` | `string``null` | 必填 | 名片对应的用户 ID。 |
14+
| `nickname` | `string``null` | 必填 | 名片中保存的展示名称。 |
15+
| `faceURL` | `string``null` | 必填 | 名片中保存的头像地址。 |
16+
| `ex` | `string``null` | 必填 | 名片扩展信息;没有内容时传空字符串。 |
1717

1818
```uts
1919
import { createCardMessage } from '@/uni_modules/unix-openim-sdk'

0 commit comments

Comments
 (0)