Skip to content

Commit

Permalink
fix(taro): cloudID 相关类型补充
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaofinger authored and Chen-jj committed Jul 8, 2021
1 parent 7ae90ea commit 30321b0
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
2 changes: 2 additions & 0 deletions packages/taro-components/types/Button.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ declare namespace ButtonProps {
iv: string
/* 用户信息的调用状态 */
errMsg: string
/** 敏感数据对应的云 ID,开通[云开发](https://developers.weixin.qq.com/miniprogram/dev/wxcloud/basis/getting-started.html)的小程序才会返回,可通过云调用直接获取开放数据,详细见[云调用直接获取开放数据](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/signature.html#method-cloud) */
cloudID?: string
}

/** 性别的合法值 */
Expand Down
10 changes: 10 additions & 0 deletions packages/taro/types/api/cloud/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,11 @@ declare namespace Taro {
*/
static init(config?: cloud.IInitConfig): void

/** 声明字符串为 CloudID(开放数据 ID),该接口传入一个字符串,返回一个 CloudID 特殊对象,将该对象传至云函数可以获取其对应的开放数据。
* @see https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-sdk-api/open/Cloud.CloudID.html
*/
static CloudID(cloudID: string): void

/** 调用云函数
* @supported weapp
* @example
Expand Down Expand Up @@ -502,6 +507,11 @@ declare namespace Taro {
*/
init(config?: cloud.IInitConfig): Promise<void>

/** 声明字符串为 CloudID(开放数据 ID),该接口传入一个字符串,返回一个 CloudID 特殊对象,将该对象传至云函数可以获取其对应的开放数据。
* @see https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-sdk-api/open/Cloud.CloudID.html
*/
static CloudID(cloudID: string): void

/** 调用云函数
* @supported weapp
* @example
Expand Down
2 changes: 1 addition & 1 deletion packages/taro/types/api/open-api/user-info.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ declare namespace Taro {

interface SuccessCallbackResult extends General.CallbackResult {
/** 敏感数据对应的云 ID,开通[云开发](https://developers.weixin.qq.com/miniprogram/dev/wxcloud/basis/getting-started.html)的小程序才会返回,可通过云调用直接获取开放数据,详细见[云调用直接获取开放数据](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/signature.html#method-cloud) */
cloudID: string
cloudID?: string
/** 包括敏感数据在内的完整用户信息的加密数据,详见 [用户数据的签名验证和加解密]((signature#加密数据解密算法)) */
encryptedData: string
/** 加密算法的初始向量,详见 [用户数据的签名验证和加解密]((signature#加密数据解密算法)) */
Expand Down
6 changes: 3 additions & 3 deletions packages/taro/types/api/open-api/werun.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ declare namespace Taro {

interface SuccessCallbackResult extends General.CallbackResult {
/** 敏感数据对应的云 ID,开通云开发的小程序才会返回,可通过云调用直接获取开放数据,详细见[云调用直接获取开放数据](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/signature.html#method-cloud) */
cloudID: string
cloudID?: string
/** 包括敏感数据在内的完整用户信息的加密数据,详细见[加密数据解密算法](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/signature.html)。解密后得到的数据结构见后文 */
encryptedData: string
/** 加密算法的初始向量,详细见[加密数据解密算法](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/signature.html) */
Expand All @@ -42,7 +42,7 @@ declare namespace Taro {
* **开放数据 JSON 结构**
* 敏感数据有两种获取方式,一是使用 [加密数据解密算法]((open-ability/signature#加密数据解密算法)) 。
* 获取得到的开放数据为以下 json 结构:
*
*
* ```json
* {
* "stepInfoList": [
Expand All @@ -57,7 +57,7 @@ declare namespace Taro {
* ]
* }
* ```
*
*
* stepInfoList 中,每一项结构如下:
*
* | 属性 | 类型 | 说明 |
Expand Down
2 changes: 1 addition & 1 deletion packages/taro/types/api/share/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ declare namespace Taro {

interface SuccessCallbackResult extends General.CallbackResult {
/** 敏感数据对应的云 ID,开通[云开发](https://developers.weixin.qq.com/miniprogram/dev/wxcloud/basis/getting-started.html)的小程序才会返回,可通过云调用直接获取开放数据,详细见[云调用直接获取开放数据](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/signature.html#method-cloud) */
cloudID: string
cloudID?: string
/** 包括敏感数据在内的完整转发信息的加密数据,详细见[加密数据解密算法](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/signature.html) */
encryptedData: string
/** 错误信息 */
Expand Down

0 comments on commit 30321b0

Please sign in to comment.