@cloudbase/js-sdk 3.5.2 → 3.5.3
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/CHANGELOG.md +8 -0
- package/ai/dist/index.esm.js +1 -1
- package/ai/dist/index.esm.js.map +1 -1
- package/ai/dist/index.js +1 -1
- package/ai/dist/index.js.map +1 -1
- package/app/dist/index.esm.js +1 -1
- package/app/dist/index.esm.js.map +1 -1
- package/app/dist/index.js +1 -1
- package/app/dist/index.js.map +1 -1
- package/app/dist/index.node.esm.js +1 -1
- package/app/dist/index.node.esm.js.map +1 -1
- package/app/dist/index.node.js +1 -1
- package/app/dist/index.node.js.map +1 -1
- package/auth/dist/index.esm.js +1 -1
- package/auth/dist/index.esm.js.map +1 -1
- package/auth/dist/index.js +1 -1
- package/auth/dist/index.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.node.cjs.js +1 -1
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.esm.js +1 -1
- package/dist/index.node.esm.js.map +1 -1
- package/index.d.ts +37 -1
- package/miniprogram_dist/ai.js +1 -1
- package/miniprogram_dist/app.js +1 -1
- package/miniprogram_dist/auth.js +1 -1
- package/miniprogram_dist/index.js +1 -1
- package/miniprogram_dist/mysql.js +1 -1
- package/miniprogram_dist/oauth.js +1 -1
- package/mysql/dist/index.esm.js +1 -1
- package/mysql/dist/index.esm.js.map +1 -1
- package/mysql/dist/index.js +1 -1
- package/mysql/dist/index.js.map +1 -1
- package/oauth/dist/index.esm.js +1 -1
- package/oauth/dist/index.esm.js.map +1 -1
- package/oauth/dist/index.js +1 -1
- package/oauth/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/types/package.json +1 -1
- package/utilities/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -302,6 +302,12 @@ declare namespace cloudbase {
|
|
|
302
302
|
*
|
|
303
303
|
*/
|
|
304
304
|
function registerEndPointWithKey(props: ISetEndPointWithKey): void
|
|
305
|
+
/**
|
|
306
|
+
* 一次性设置所有端点,只需传入 host 地址,自动拼接路径
|
|
307
|
+
* @param host - 主机地址,如 "43.144.98.4" 或 "//43.144.98.4"
|
|
308
|
+
* @param protocol - 协议,默认 "http"
|
|
309
|
+
*/
|
|
310
|
+
function registerHost(host: string, protocol?: 'http' | 'https'): void
|
|
305
311
|
/**
|
|
306
312
|
* 【谨慎操作】注册功能模块
|
|
307
313
|
*
|
|
@@ -688,9 +694,39 @@ declare namespace cloudbase.app {
|
|
|
688
694
|
mysql: IMySqlClient
|
|
689
695
|
rdb: IMySqlClient
|
|
690
696
|
|
|
691
|
-
ai(): AI
|
|
697
|
+
ai(options?: { baseUrl?: string }): AI
|
|
692
698
|
|
|
693
699
|
apis: ICloudbaseApis
|
|
700
|
+
|
|
701
|
+
/**
|
|
702
|
+
* 一次性设置所有端点,只需传入 host 地址,自动拼接路径
|
|
703
|
+
* @param host - 主机地址,如 "43.144.98.4" 或 "//43.144.98.4"
|
|
704
|
+
* @param protocol - 协议,默认 "http"
|
|
705
|
+
*/
|
|
706
|
+
registerHost(host: string, protocol?: 'http' | 'https'): void
|
|
707
|
+
|
|
708
|
+
/**
|
|
709
|
+
* 获取指定类型的端点信息
|
|
710
|
+
* @param key - 端点类型
|
|
711
|
+
*/
|
|
712
|
+
getEndPointWithKey(key: cloudbase.EndPointKey): { BASE_URL: string; PROTOCOL: string }
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* 修改SDK请求的云开发服务地址
|
|
716
|
+
* @param url 服务地址
|
|
717
|
+
* @param protocol 【可选】强制使用某种协议,默认与主站协议一致
|
|
718
|
+
*/
|
|
719
|
+
registerEndPoint(url: string, protocol?: 'http' | 'https'): void
|
|
720
|
+
|
|
721
|
+
/**
|
|
722
|
+
* 修改SDK请求的「云开发/网关」服务地址,通过 key 指定
|
|
723
|
+
*/
|
|
724
|
+
registerEndPointWithKey(props: cloudbase.ISetEndPointWithKey): void
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* 解析验证码 URL 参数
|
|
728
|
+
*/
|
|
729
|
+
parseCaptcha(url: string): any
|
|
694
730
|
}
|
|
695
731
|
}
|
|
696
732
|
/**
|