@cloudbase/js-sdk 2.8.14-beta.0 → 2.8.16-beta.0

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/index.d.ts CHANGED
@@ -2,7 +2,6 @@ import { CloudbaseAdapter } from '@cloudbase/adapter-interface';
2
2
  import { ICloudbaseUpgradedConfig, ICloudbase, Persistence } from '@cloudbase/types';
3
3
  import { OrmClient, OrmRawQueryClient } from '@cloudbase/model';
4
4
  import { authModels } from '@cloudbase/oauth';
5
- import { OrmClient, OrmRawQueryClient } from '@cloudbase/model'
6
5
 
7
6
  type KV<T> = {
8
7
  [key: string]: T;
@@ -72,6 +71,15 @@ declare namespace cloudbase {
72
71
  entity: any;
73
72
  target: string;
74
73
  }
74
+
75
+ type EndPointKey = 'CLOUD_API' | 'GATEWAY';
76
+
77
+ interface ISetEndPointWithKey {
78
+ key: EndPointKey;
79
+ url?: string;
80
+ protocol?: 'http' | 'https';
81
+ }
82
+
75
83
  /**
76
84
  * 初始化Cloudbase
77
85
  *
@@ -152,6 +160,20 @@ declare namespace cloudbase {
152
160
  * @param protocol 【可选】强制使用某种协议,默认与主站协议一致
153
161
  */
154
162
  function registerEndPoint(url: string, protocol?: 'http' | 'https'): void;
163
+ /**
164
+ * 【谨慎操作】修改SDK请求的「云开发/网关」服务地址
165
+ *
166
+ * @example
167
+ * ```javascript
168
+ * cloudbase.registerEndPointWithKey({
169
+ * key: "GATEWAY",
170
+ * url: "",
171
+ * protocol: ""
172
+ * });
173
+ * ```
174
+ *
175
+ */
176
+ function registerEndPointWithKey(props: ISetEndPointWithKey): void;
155
177
  /**
156
178
  * 【谨慎操作】注册功能模块
157
179
  *