@cloudbase/manager-node 5.10.2 → 5.10.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
CHANGED
package/changelog_content_en.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
## [5.10.
|
|
1
|
+
## [5.10.2] 2026-11-05
|
|
2
2
|
|
|
3
|
-
-
|
|
3
|
+
- [Added] [TODO: translate] env: 新增 describeCreditsUsage 封装账单口径资源点用量
|
package/lib/database/index.js
CHANGED
|
@@ -327,7 +327,6 @@ class DatabaseService {
|
|
|
327
327
|
}
|
|
328
328
|
/**
|
|
329
329
|
* 开通 PG 数据库 Realtime 能力
|
|
330
|
-
* 用于服务首次开通;已开通时重复调用仍返回 Enabled: true(幂等)
|
|
331
330
|
*
|
|
332
331
|
* @param options 开通参数
|
|
333
332
|
* @param options.EnvId 环境 ID(可选,不传则自动使用当前环境 ID)
|
|
@@ -335,17 +334,18 @@ class DatabaseService {
|
|
|
335
334
|
*
|
|
336
335
|
* @example
|
|
337
336
|
* // 使用当前环境 ID 开通
|
|
338
|
-
*
|
|
339
|
-
* console.log(res.Enabled) // true
|
|
337
|
+
* await database.enablePGRealtime()
|
|
340
338
|
*
|
|
341
339
|
* @example
|
|
342
340
|
* // 指定环境 ID 开通
|
|
343
|
-
*
|
|
341
|
+
* await database.enablePGRealtime({ EnvId: 'pg-shared-d4gq5c0ne1a30f155' })
|
|
344
342
|
*/
|
|
345
343
|
async enablePGRealtime(options = {}) {
|
|
346
|
-
|
|
347
|
-
EnvId: options.EnvId
|
|
344
|
+
const { RequestId } = await this.modifyPGRealtimeSettings({
|
|
345
|
+
EnvId: options.EnvId,
|
|
346
|
+
Suspend: false
|
|
348
347
|
});
|
|
348
|
+
return { Enabled: true, RequestId };
|
|
349
349
|
}
|
|
350
350
|
/**
|
|
351
351
|
* 查询 PG Realtime 设置
|
|
@@ -376,7 +376,7 @@ class DatabaseService {
|
|
|
376
376
|
* @returns RequestId
|
|
377
377
|
*
|
|
378
378
|
* @example
|
|
379
|
-
* //
|
|
379
|
+
* // 开通/启用 Realtime
|
|
380
380
|
* await database.modifyPGRealtimeSettings({ Suspend: false })
|
|
381
381
|
*
|
|
382
382
|
* @example
|
package/package.json
CHANGED
|
@@ -229,7 +229,6 @@ export declare class DatabaseService {
|
|
|
229
229
|
executePGSql(options: IExecutePGSqlOptions): Promise<IExecutePGSqlResult>;
|
|
230
230
|
/**
|
|
231
231
|
* 开通 PG 数据库 Realtime 能力
|
|
232
|
-
* 用于服务首次开通;已开通时重复调用仍返回 Enabled: true(幂等)
|
|
233
232
|
*
|
|
234
233
|
* @param options 开通参数
|
|
235
234
|
* @param options.EnvId 环境 ID(可选,不传则自动使用当前环境 ID)
|
|
@@ -237,12 +236,11 @@ export declare class DatabaseService {
|
|
|
237
236
|
*
|
|
238
237
|
* @example
|
|
239
238
|
* // 使用当前环境 ID 开通
|
|
240
|
-
*
|
|
241
|
-
* console.log(res.Enabled) // true
|
|
239
|
+
* await database.enablePGRealtime()
|
|
242
240
|
*
|
|
243
241
|
* @example
|
|
244
242
|
* // 指定环境 ID 开通
|
|
245
|
-
*
|
|
243
|
+
* await database.enablePGRealtime({ EnvId: 'pg-shared-d4gq5c0ne1a30f155' })
|
|
246
244
|
*/
|
|
247
245
|
enablePGRealtime(options?: IEnablePGRealtimeOptions): Promise<IEnablePGRealtimeResult>;
|
|
248
246
|
/**
|
|
@@ -270,7 +268,7 @@ export declare class DatabaseService {
|
|
|
270
268
|
* @returns RequestId
|
|
271
269
|
*
|
|
272
270
|
* @example
|
|
273
|
-
* //
|
|
271
|
+
* // 开通/启用 Realtime
|
|
274
272
|
* await database.modifyPGRealtimeSettings({ Suspend: false })
|
|
275
273
|
*
|
|
276
274
|
* @example
|
package/types/database/type.d.ts
CHANGED
|
@@ -268,7 +268,7 @@ export interface IModifyPGRealtimeSettingsOptions {
|
|
|
268
268
|
/**
|
|
269
269
|
* 挂起租户,全局生效(所有节点)
|
|
270
270
|
* true:立即断开该租户全部在线 WebSocket 连接,拒绝新连接(HTTP 403),并禁用服务端广播 API
|
|
271
|
-
* false
|
|
271
|
+
* false:恢复;未开通时传 false 可直接完成开通
|
|
272
272
|
* 注意:suspend 值的变化都会触发一次断连,客户端需重连
|
|
273
273
|
*/
|
|
274
274
|
Suspend?: boolean;
|