@cloudbase/wx-cloud-client-sdk 1.8.4 → 1.8.6
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 +1 -1
- package/lib/index.d.ts +0 -1
- package/lib/types/index.d.ts +0 -11
- package/lib/utils.d.ts +0 -2
- package/lib/wxCloudClientSDK.cjs.js +1 -9
- package/lib/wxCloudClientSDK.esm.js +1 -9
- package/lib/wxCloudClientSDK.umd.js +1 -9
- package/package.json +3 -4
- package/lib/auth/index.d.ts +0 -6
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ import { init } from '@cloudbase/wx-cloud-client-sdk';
|
|
|
21
21
|
|
|
22
22
|
// 使用微信云开发实例初始化
|
|
23
23
|
const client = init(wx.cloud, {
|
|
24
|
-
envId: 'your-env-id', // 可选,当 cloud 为
|
|
24
|
+
envId: 'your-env-id', // 可选,当 wx.cloud 为 wx.cloud.Cloud() 实例时需要提供
|
|
25
25
|
});
|
|
26
26
|
```
|
|
27
27
|
|
package/lib/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { generateHTTPClient } from './orm/http-orm-client';
|
|
|
3
3
|
import { MySqlClient } from './db/mysql';
|
|
4
4
|
import { Fetch } from './db/postgrest/types';
|
|
5
5
|
import type { CloudbaseAdapter } from '@cloudbase/adapter-interface';
|
|
6
|
-
export { getAccessToken } from './utils';
|
|
7
6
|
export declare function initHTTPOverCallFunction(cloud: CloudBaseInstance, options?: {
|
|
8
7
|
envId?: string;
|
|
9
8
|
baseUrl?: string;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SDKRequestInterface } from '@cloudbase/adapter-interface';
|
|
2
2
|
import { MySqlClient } from '../db/mysql';
|
|
3
|
-
import { Auth as AuthInstance } from '@cloudbase/auth';
|
|
4
3
|
/**
|
|
5
4
|
* 基础 Model 类型定义
|
|
6
5
|
*/
|
|
@@ -714,17 +713,8 @@ export interface RunMysqlCommandParams {
|
|
|
714
713
|
*/
|
|
715
714
|
export type CloudBaseInstance = {
|
|
716
715
|
callFunction: CallFunction;
|
|
717
|
-
auth: Auth | null;
|
|
718
716
|
};
|
|
719
717
|
export type IMySqlClient = (options?: IMySqlOptions) => MySqlClient;
|
|
720
|
-
export interface Auth {
|
|
721
|
-
signInWithOpenId: AuthInstance['signInWithOpenId'];
|
|
722
|
-
updateUser: AuthInstance['updateUser'];
|
|
723
|
-
getUser: AuthInstance['getUser'];
|
|
724
|
-
getSession: AuthInstance['getSession'];
|
|
725
|
-
refreshSession: AuthInstance['refreshSession'];
|
|
726
|
-
signOut: AuthInstance['signOut'];
|
|
727
|
-
}
|
|
728
718
|
/**
|
|
729
719
|
* 扩展的云实例接口,扩展了云函数调用接口并包含ORM客户端。
|
|
730
720
|
* @hidden
|
|
@@ -733,7 +723,6 @@ export interface ExtendedCloudBaseInstance extends CloudBaseInstance {
|
|
|
733
723
|
models: OrmClient & OrmRawQueryClient;
|
|
734
724
|
mysql: IMySqlClient;
|
|
735
725
|
rdb: IMySqlClient;
|
|
736
|
-
auth: Auth | null;
|
|
737
726
|
}
|
|
738
727
|
/**
|
|
739
728
|
* 云函数调用方法定义。
|
package/lib/utils.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CloudBaseInstance } from './types';
|
|
2
1
|
/**
|
|
3
2
|
* 获取全局对象 window
|
|
4
3
|
* 小程序中可用, 但小程序中对象信息残缺, 无法访问 navigator 对象, ua 信息也无意义
|
|
@@ -10,4 +9,3 @@ export declare function getReferrer(): any;
|
|
|
10
9
|
export declare function getUserAgent(): any;
|
|
11
10
|
export declare const VERSION: string | undefined;
|
|
12
11
|
export declare function getRandomString(): string;
|
|
13
|
-
export declare const getAccessToken: (cloud?: CloudBaseInstance) => Promise<string>;
|