@cloudbase/wx-cloud-client-sdk 1.8.0 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -6
- package/lib/auth/index.d.ts +1 -3
- package/lib/index.d.ts +0 -1
- package/lib/types/index.d.ts +7 -1
- package/lib/wxCloudClientSDK.cjs.js +2 -2
- package/lib/wxCloudClientSDK.esm.js +2 -2
- package/lib/wxCloudClientSDK.umd.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,7 +18,6 @@ import { init } from '@cloudbase/wx-cloud-client-sdk';
|
|
|
18
18
|
// 使用微信云开发实例初始化
|
|
19
19
|
const client = init(wx.cloud, {
|
|
20
20
|
envId: 'your-env-id',
|
|
21
|
-
accessKey: 'your-access-key', // 可选,客户端 Publishable Key
|
|
22
21
|
});
|
|
23
22
|
```
|
|
24
23
|
|
|
@@ -130,11 +129,10 @@ await auth.signOut();
|
|
|
130
129
|
|
|
131
130
|
初始化 SDK(使用云函数调用)。
|
|
132
131
|
|
|
133
|
-
| 参数
|
|
134
|
-
|
|
|
135
|
-
| cloud
|
|
136
|
-
| options.envId
|
|
137
|
-
| options.accessKey | string | 否 | 客户端 Publishable Key |
|
|
132
|
+
| 参数 | 类型 | 必填 | 说明 |
|
|
133
|
+
| ------------- | ----------------- | ---- | -------------- |
|
|
134
|
+
| cloud | CloudBaseInstance | 是 | 微信云开发实例 |
|
|
135
|
+
| options.envId | string | 否 | 环境 ID |
|
|
138
136
|
|
|
139
137
|
### 数据模型方法
|
|
140
138
|
|
package/lib/auth/index.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { CloudBaseInstance } from '../types';
|
|
2
|
-
import { Auth } from '@cloudbase/auth';
|
|
1
|
+
import { CloudBaseInstance, Auth } from '../types';
|
|
3
2
|
export declare const generateAuthClient: (cloud: CloudBaseInstance, options?: {
|
|
4
3
|
envId?: string;
|
|
5
|
-
accessKey?: string;
|
|
6
4
|
}) => Auth;
|
package/lib/index.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ export declare function initHTTPOverCallFunction(cloud: CloudBaseInstance, optio
|
|
|
11
11
|
}): ExtendedCloudBaseInstance;
|
|
12
12
|
export declare function init(cloud: CloudBaseInstance, options?: {
|
|
13
13
|
envId?: string;
|
|
14
|
-
accessKey?: string;
|
|
15
14
|
}): ExtendedCloudBaseInstance;
|
|
16
15
|
declare function generateMySQLClient(cloud: CloudBaseInstance, options?: {
|
|
17
16
|
envId?: string;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SDKRequestInterface } from '@cloudbase/adapter-interface';
|
|
2
2
|
import { MySqlClient } from '../db/mysql';
|
|
3
|
-
import { Auth } from '@cloudbase/auth';
|
|
3
|
+
import { Auth as AuthInstance } from '@cloudbase/auth';
|
|
4
4
|
/**
|
|
5
5
|
* 基础 Model 类型定义
|
|
6
6
|
*/
|
|
@@ -717,6 +717,12 @@ export type CloudBaseInstance = {
|
|
|
717
717
|
auth: any;
|
|
718
718
|
};
|
|
719
719
|
export type IMySqlClient = (options?: IMySqlOptions) => MySqlClient;
|
|
720
|
+
export interface Auth {
|
|
721
|
+
signInWithOpenId: AuthInstance['signInWithOpenId'];
|
|
722
|
+
getUser: AuthInstance['getUser'];
|
|
723
|
+
getSession: AuthInstance['getSession'];
|
|
724
|
+
refreshSession: AuthInstance['refreshSession'];
|
|
725
|
+
}
|
|
720
726
|
/**
|
|
721
727
|
* 扩展的云实例接口,扩展了云函数调用接口并包含ORM客户端。
|
|
722
728
|
* @hidden
|