@cloudbase/manager-node 5.8.8-beta.0 → 5.8.8

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.
@@ -0,0 +1,133 @@
1
+ import { Environment } from '../environment';
2
+ import { CreatePlatformEnvParams, CreatePlatformEnvRes, CreatePlatformHTTPServiceRouteParams, CreatePlatformHTTPServiceRouteRes, DescribePlatformAccountCircleParams, DescribePlatformAccountCircleRes, DescribePlatformCreditsUsageDetailParams, DescribePlatformCreditsUsageDetailRes, DescribePlatformCreditsUsageParams, DescribePlatformCreditsUsageRes, DescribePlatformEnvCreditsRankingParams, DescribePlatformEnvCreditsRankingRes, DescribePlatformEnvUsageParams, DescribePlatformEnvUsageRes, DescribePlatformHTTPServiceRouteParams, DescribePlatformHTTPServiceRouteRes, DescribePlatformPackageListParams, DescribePlatformPackageListRes, DescribePlatformsParams, DescribePlatformsRes, DeletePlatformHTTPServiceRouteParams, DeletePlatformHTTPServiceRouteRes, DestroyPlatformEnvParams, DestroyPlatformEnvRes, ModifyPlatformEnvParams, ModifyPlatformEnvRes, ModifyPlatformHTTPServiceRouteParams, ModifyPlatformHTTPServiceRouteRes, VerifyPlatformHTTPServiceRouteParams, VerifyPlatformHTTPServiceRouteRes } from './type';
3
+ /**
4
+ * 平台版服务
5
+ * 提供平台版套餐查询、资源用量统计、环境生命周期管理及 HTTP 访问服务路由管理能力
6
+ */
7
+ export declare class PlatformService {
8
+ private environment;
9
+ private envId;
10
+ private cloudService;
11
+ constructor(environment: Environment);
12
+ /**
13
+ * 查询在售的平台版套餐列表
14
+ * 返回当前可购买的平台版套餐,包括计费下单配置(BillTags)、套餐规格(Spec)等商品信息,
15
+ * 用于购买前的套餐查询,不涉及用户已购资源。
16
+ * @param {DescribePlatformPackageListParams} params 查询参数,可通过 PackageId 查询指定套餐
17
+ * @returns {Promise<DescribePlatformPackageListRes>} 在售套餐列表
18
+ */
19
+ describePlatformPackageList(params?: DescribePlatformPackageListParams): Promise<DescribePlatformPackageListRes>;
20
+ /**
21
+ * 查询当前账号下的平台版资源实例列表
22
+ * 返回已购平台版资源的计费信息(购买与过期时间、计费状态、自动续费),
23
+ * 以及存储、日志、静态托管等底层资源明细。
24
+ * @param {DescribePlatformsParams} params 查询参数,PlatformIds 指定实例(缺省分页返回全部),Limit 取值 [10, 100]
25
+ * @returns {Promise<DescribePlatformsRes>} 平台版资源列表及总数
26
+ * @throws {CloudBaseError} Limit 非法时抛出,须为 10 至 100 的整数
27
+ */
28
+ describePlatforms(params?: DescribePlatformsParams): Promise<DescribePlatformsRes>;
29
+ /**
30
+ * 查询平台版资源当前所处的计费周期
31
+ * 平台版资源点按月结算,计费周期自购买日起算,每个周期各享有一笔抵扣额度。
32
+ * 例如 2026-01-05 购买 3 个月(2026-04-05 到期),则三个周期分别为
33
+ * 01-05 ~ 02-05、02-06 ~ 03-05、03-06 ~ 04-05。
34
+ * @param {DescribePlatformAccountCircleParams} params 查询参数,WithHistoryCircle 为 true 时附带返回最近两个历史周期
35
+ * @returns {Promise<DescribePlatformAccountCircleRes>} 当前周期起止时间及是否过期
36
+ */
37
+ describePlatformAccountCircle(params: DescribePlatformAccountCircleParams): Promise<DescribePlatformAccountCircleRes>;
38
+ /**
39
+ * 查询平台版资源的资源点用量汇总
40
+ * 返回指定时间范围内的资源点用量统计,包括套餐内抵扣、资源包抵扣、
41
+ * 按量上报、原价消耗四类总量的每日明细。
42
+ * @param {DescribePlatformCreditsUsageParams} params 查询参数,StartDate/EndDate 格式为 'YYYY-MM-DD'
43
+ * @returns {Promise<DescribePlatformCreditsUsageRes>} 四类用量总量及每日明细
44
+ */
45
+ describePlatformCreditsUsage(params: DescribePlatformCreditsUsageParams): Promise<DescribePlatformCreditsUsageRes>;
46
+ /**
47
+ * 查询平台版资源的资源点用量明细
48
+ * 按模块(Usages)→ 指标(MetricUsageDetail)→ 每日明细(ValueDetailList)三个层级,
49
+ * 返回各模块的资源点用量及原始用量明细。
50
+ * @param {DescribePlatformCreditsUsageDetailParams} params 查询参数,Modules 指定查询的模块(如 FLEXDB、SCF、AI、COS 等)
51
+ * @returns {Promise<DescribePlatformCreditsUsageDetailRes>} 各模块的用量明细数据
52
+ */
53
+ describePlatformCreditsUsageDetail(params: DescribePlatformCreditsUsageDetailParams): Promise<DescribePlatformCreditsUsageDetailRes>;
54
+ /**
55
+ * 查询平台版下各环境的资源点用量排行
56
+ * 按 TimeRange 指定的时间范围返回各环境的资源点用量排序,
57
+ * 排行数据由后台定时计算,可能存在小时级延迟。
58
+ * @param {DescribePlatformEnvCreditsRankingParams} params 查询参数,TimeRange 缺省为 Today(近 1 天)
59
+ * @returns {Promise<DescribePlatformEnvCreditsRankingRes>} 环境用量排行列表及分页信息
60
+ */
61
+ describePlatformEnvCreditsRanking(params?: DescribePlatformEnvCreditsRankingParams): Promise<DescribePlatformEnvCreditsRankingRes>;
62
+ /**
63
+ * 查询平台版环境内各资源类型的用量
64
+ * 按资源类型(存储、函数、数据库等)返回各指标的用量及按日明细,
65
+ * 包括资源点用量与原始用量值及对应单位。
66
+ * @param {DescribePlatformEnvUsageParams} params 查询参数,EnvId 缺省时使用当前环境,ResourceTypes 指定资源类型
67
+ * @returns {Promise<DescribePlatformEnvUsageRes>} 资源用量明细及资源点总量
68
+ */
69
+ describePlatformEnvUsage(params: DescribePlatformEnvUsageParams): Promise<DescribePlatformEnvUsageRes>;
70
+ /**
71
+ * 创建平台版环境
72
+ * 在已购平台版资源下开通新环境。
73
+ * @param {CreatePlatformEnvParams} params 创建参数,ReqKey 为幂等键,可用于防止重复创建
74
+ * @returns {Promise<CreatePlatformEnvRes>} 新创建环境的 EnvId
75
+ */
76
+ createPlatformEnv(params: CreatePlatformEnvParams): Promise<CreatePlatformEnvRes>;
77
+ /**
78
+ * 修改平台版环境状态
79
+ * 支持启用/禁用环境,以及云存储(Storage)、FlexDB 资源的状态变更,未传入的资源不做更新。
80
+ * @param {ModifyPlatformEnvParams} params 修改参数,EnvId 缺省时使用当前环境
81
+ * @returns {Promise<ModifyPlatformEnvRes>} 环境的最终状态
82
+ * @throws {CloudBaseError} Status 非法时抛出,仅支持 ENABLE / DISABLE
83
+ */
84
+ modifyPlatformEnv(params: ModifyPlatformEnvParams): Promise<ModifyPlatformEnvRes>;
85
+ /**
86
+ * 删除平台版环境
87
+ * 删除操作不可逆,须显式指定目标环境 ID。
88
+ * @param {DestroyPlatformEnvParams} params 删除参数,EnvId 为必填
89
+ * @returns {Promise<DestroyPlatformEnvRes>} 请求执行结果
90
+ */
91
+ destroyPlatformEnv(params: DestroyPlatformEnvParams): Promise<DestroyPlatformEnvRes>;
92
+ /**
93
+ * 校验 HTTP 访问服务路由配置(预检)
94
+ * 创建路由前的只读预检,覆盖域名归属权、证书、配额、路由冲突、域名占用等检查项,
95
+ * 不创建任何资源。Passed 为 true 时可调用 createPlatformHttpServiceRoute 正式创建;
96
+ * 为 false 时根据各检查项的 Code 定位并修正问题。
97
+ * 预检通过不代表创建必然成功,但预检不通过则创建必然失败。
98
+ * @param {VerifyPlatformHTTPServiceRouteParams} params 校验参数,包含待校验的域名路由信息
99
+ * @returns {Promise<VerifyPlatformHTTPServiceRouteRes>} 整体校验结果及各检查项明细
100
+ */
101
+ verifyPlatformHttpServiceRoute(params: VerifyPlatformHTTPServiceRouteParams): Promise<VerifyPlatformHTTPServiceRouteRes>;
102
+ /**
103
+ * 创建 HTTP 访问服务路由
104
+ * 不传 Domain.Routes 时仅创建域名信息。域名与路由均为异步下发,创建后需调用
105
+ * describePlatformHttpServiceRoute 轮询域名状态,直到 SUCCESS 或 FAIL(FAIL 可删除后重新创建);
106
+ * 下发完成前访问域名可能返回 404 或 HTTPS 握手失败。
107
+ * @param {CreatePlatformHTTPServiceRouteParams} params 创建参数
108
+ * @returns {Promise<CreatePlatformHTTPServiceRouteRes>} 域名归属权验证指引(归属校验未通过时返回)
109
+ */
110
+ createPlatformHttpServiceRoute(params: CreatePlatformHTTPServiceRouteParams): Promise<CreatePlatformHTTPServiceRouteRes>;
111
+ /**
112
+ * 修改 HTTP 访问服务路由
113
+ * 增量更新,对应字段未传入则不修改。
114
+ * @param {ModifyPlatformHTTPServiceRouteParams} params 修改参数,包含目标域名及待更新的路由信息
115
+ * @returns {Promise<ModifyPlatformHTTPServiceRouteRes>} 请求执行结果
116
+ */
117
+ modifyPlatformHttpServiceRoute(params: ModifyPlatformHTTPServiceRouteParams): Promise<ModifyPlatformHTTPServiceRouteRes>;
118
+ /**
119
+ * 删除 HTTP 访问服务路由
120
+ * Paths 为空时删除域名及其下全部路由,非空时仅删除指定路径的路由。
121
+ * @param {DeletePlatformHTTPServiceRouteParams} params 删除参数,Paths 缺省时删除整个域名
122
+ * @returns {Promise<DeletePlatformHTTPServiceRouteRes>} 请求执行结果
123
+ */
124
+ deletePlatformHttpServiceRoute(params: DeletePlatformHTTPServiceRouteParams): Promise<DeletePlatformHTTPServiceRouteRes>;
125
+ /**
126
+ * 查询 HTTP 访问服务路由
127
+ * 返回各域名及其路由信息列表、自定义接入的源站域名及域名总数,
128
+ * 支持按 Domain、Path、DomainType、UpstreamResourceType 过滤及分页。
129
+ * @param {DescribePlatformHTTPServiceRouteParams} params 查询参数,Limit 默认 20、最大 1000
130
+ * @returns {Promise<DescribePlatformHTTPServiceRouteRes>} 域名路由列表及域名总数
131
+ */
132
+ describePlatformHttpServiceRoute(params: DescribePlatformHTTPServiceRouteParams): Promise<DescribePlatformHTTPServiceRouteRes>;
133
+ }
@@ -0,0 +1,525 @@
1
+ /**
2
+ * 平台版套餐相关接口类型定义
3
+ */
4
+ import { CircleTime, MetricUsage } from '../interfaces/tcb.interface';
5
+ import { HTTPServiceDomain, HTTPServiceDomainParam, HTTPServiceRouteFilter, OwnershipVerificationInfo, VerifyHttpServiceRouteCheckItem } from '../env/type';
6
+ /**
7
+ * 平台版环境配置(资源状态变更)
8
+ * 用于云存储(Storage)、FlexDB(文档型数据库)等资源的状态更新
9
+ */
10
+ export interface PlatformEnvResource {
11
+ /** 资源状态(为空或不传则不更新)。ENABLE:正常 / DISABLE:彻底禁用 / READONLY:只读 */
12
+ Status?: 'ENABLE' | 'DISABLE' | 'READONLY';
13
+ }
14
+ /**
15
+ * ModifyPlatformEnv 请求参数
16
+ */
17
+ export interface ModifyPlatformEnvParams {
18
+ /** 环境ID(可选,不传则自动使用当前环境 ID) */
19
+ EnvId?: string;
20
+ /** 环境状态。ENABLE:启用环境 / DISABLE:禁用环境 */
21
+ Status?: 'ENABLE' | 'DISABLE';
22
+ /** 云存储信息变更(不传或为空则不更新) */
23
+ Storage?: PlatformEnvResource;
24
+ /** FlexDB(文档型数据库)状态更新(为空或不传则不更新) */
25
+ FlexDB?: PlatformEnvResource;
26
+ }
27
+ /**
28
+ * ModifyPlatformEnv 返回结果
29
+ */
30
+ export interface ModifyPlatformEnvRes {
31
+ /** 最终状态,如 manualLimited */
32
+ Status?: string;
33
+ /** 唯一请求 ID */
34
+ RequestId: string;
35
+ }
36
+ /**
37
+ * 平台版套餐信息
38
+ */
39
+ export interface PlatformPackageInfo {
40
+ /** 套餐id */
41
+ PackageId?: string;
42
+ /** 套餐名称 */
43
+ Name?: string;
44
+ /** 计费下单参数(JSON 字符串) */
45
+ BillTags?: string;
46
+ /** 套餐规格信息(JSON 字符串) */
47
+ Spec?: string;
48
+ /** 套餐描述信息 */
49
+ Description?: string;
50
+ /** 套餐数字id */
51
+ Id?: number;
52
+ }
53
+ /**
54
+ * DescribePlatformPackageList 请求参数
55
+ */
56
+ export interface DescribePlatformPackageListParams {
57
+ /** 平台版套餐id */
58
+ PackageId?: string;
59
+ }
60
+ /**
61
+ * DescribePlatformPackageList 返回结果
62
+ */
63
+ export interface DescribePlatformPackageListRes {
64
+ /** 平台版套餐列表 */
65
+ PackageList: PlatformPackageInfo[];
66
+ /** 唯一请求 ID */
67
+ RequestId: string;
68
+ }
69
+ /**
70
+ * 平台版资源项信息(平台版套餐下的具体资源,如日志、云存储、静态托管)
71
+ */
72
+ export interface PlatFormResourceInfo {
73
+ /** 资源类型。log:日志 / storage:云存储 / hosting:静态托管 */
74
+ ResType?: string;
75
+ /** 资源唯一标识 */
76
+ ResName?: string;
77
+ /** 资源详细信息(JSON 字符串) */
78
+ Detail?: string;
79
+ /** 资源状态。0:正常 / 5:初始化中 */
80
+ Status?: number;
81
+ /** 资源id */
82
+ PlatformId?: number;
83
+ /** 对应平台资源id */
84
+ Id?: number;
85
+ }
86
+ /**
87
+ * 平台版资源信息
88
+ */
89
+ export interface PlatformInfo {
90
+ /** 平台版套餐id */
91
+ PlatformId?: string;
92
+ /** 套餐别名 */
93
+ Alias?: string;
94
+ /** 套餐id */
95
+ PackageId?: string;
96
+ /** 计费状态。normal:正常 / isolated:已隔离 / destroyed:已销毁 */
97
+ BillStatus?: string;
98
+ /** 套餐资源状态。0:可用 / 5:发货中 */
99
+ Status?: number;
100
+ /** 资源配置(JSON 字符串) */
101
+ Spec?: string;
102
+ /** 购买时间,格式 'YYYY-MM-DD HH:mm:ss' */
103
+ BillTime?: string;
104
+ /** 套餐过期时间,格式 'YYYY-MM-DD HH:mm:ss' */
105
+ ExpireTime?: string;
106
+ /** 是否自动续费。0:未设置 / 1:自动续费 / 2:设置为到期不续费 */
107
+ IsAutoRenew?: number;
108
+ /** 资源信息列表 */
109
+ Resources?: PlatFormResourceInfo[];
110
+ /** 所属地域。ap-shanghai:上海 / ap-singapore:新加坡 */
111
+ Region?: string;
112
+ }
113
+ /**
114
+ * DescribePlatforms 请求参数
115
+ */
116
+ export interface DescribePlatformsParams {
117
+ /** 平台版套餐id列表(不指定则分页返回当前账号下所有平台版资源) */
118
+ PlatformIds?: string[];
119
+ /** 分页限制,取值范围 [10, 100],默认 10 */
120
+ Limit?: number;
121
+ /** 分页偏移量,默认 0 */
122
+ Offset?: number;
123
+ }
124
+ /**
125
+ * DescribePlatforms 返回结果
126
+ */
127
+ export interface DescribePlatformsRes {
128
+ /** 平台版资源列表 */
129
+ PlatformList: PlatformInfo[];
130
+ /** 总数 */
131
+ Total?: number;
132
+ /** 唯一请求 ID */
133
+ RequestId: string;
134
+ }
135
+ /**
136
+ * DescribePlatformAccountCircle 请求参数
137
+ */
138
+ export interface DescribePlatformAccountCircleParams {
139
+ /** 平台版资源id */
140
+ PlatformId: string;
141
+ /** false 仅返回当前套餐周期,true 返回当前周期以及上个、上上个周期 */
142
+ WithHistoryCircle?: boolean;
143
+ }
144
+ /**
145
+ * DescribePlatformAccountCircle 返回结果
146
+ */
147
+ export interface DescribePlatformAccountCircleRes {
148
+ /** 套餐计费周期开始时间 */
149
+ StartTime: string;
150
+ /** 套餐计费周期结束时间 */
151
+ EndTime: string;
152
+ /** 依次为当前套餐的上个、上上个历史周期(开始时间不早于下单时间,可能不足两个周期) */
153
+ HistoryTime?: CircleTime[];
154
+ /** 套餐当前是否过期 */
155
+ Expired?: boolean;
156
+ /** 唯一请求 ID */
157
+ RequestId: string;
158
+ }
159
+ /**
160
+ * 平台版每日资源点消耗数据
161
+ */
162
+ export interface PlatformCreditsUsageDaily {
163
+ /** 日期 */
164
+ Date?: string;
165
+ /** 资源点套餐内用量 */
166
+ DeductValue?: number;
167
+ /** 资源点资源包用量 */
168
+ PackageDeductValue?: number;
169
+ /** 资源点按量用量 */
170
+ ReportValue?: number;
171
+ /** 资源点原价消耗 */
172
+ OriginCredits?: number;
173
+ }
174
+ /**
175
+ * DescribePlatformCreditsUsage 请求参数
176
+ */
177
+ export interface DescribePlatformCreditsUsageParams {
178
+ /** 开始日期,格式 'YYYY-MM-DD' */
179
+ StartDate: string;
180
+ /** 结束日期,格式 'YYYY-MM-DD' */
181
+ EndDate: string;
182
+ /** 平台版资源id */
183
+ PlatformId: string;
184
+ }
185
+ /**
186
+ * DescribePlatformCreditsUsage 返回结果
187
+ */
188
+ export interface DescribePlatformCreditsUsageRes {
189
+ /** 资源点套餐内抵扣总量 */
190
+ DeductValueCount?: number;
191
+ /** 资源点资源包抵扣总量 */
192
+ PackageDeductValueCount?: number;
193
+ /** 资源点按量上报总量 */
194
+ ReportValueCount?: number;
195
+ /** 资源点原价消耗总量 */
196
+ OriginCreditsCount?: number;
197
+ /** 每日资源点用量列表 */
198
+ DailyList?: PlatformCreditsUsageDaily[];
199
+ /** 唯一请求 ID */
200
+ RequestId: string;
201
+ }
202
+ /**
203
+ * 模块内平台版资源点用量及原始用量数据
204
+ */
205
+ export interface PlatformPkgCreditsUsage {
206
+ /** 平台版资源id */
207
+ PlatformId?: string;
208
+ /** 模块 */
209
+ Module?: string;
210
+ /** module 总资源点用量 */
211
+ CreditsValue?: number;
212
+ /** 指标用量明细 */
213
+ MetricUsageDetail?: MetricUsage[];
214
+ /** 资源点套餐内用量 */
215
+ DeductValue?: number;
216
+ /** 资源点资源包用量 */
217
+ PackageDeductValue?: number;
218
+ /** 资源点按量用量 */
219
+ ReportValue?: number;
220
+ /** 资源点原价消耗 */
221
+ OriginCredits?: number;
222
+ }
223
+ /**
224
+ * DescribePlatformCreditsUsageDetail 请求参数
225
+ */
226
+ export interface DescribePlatformCreditsUsageDetailParams {
227
+ /** 模块列表。枚举值:
228
+ * FLEXDB 文档数据库 / TDSQL MYSQL数据库 / SCF 云函数 / AI 大模型 / EKS 云托管 /
229
+ * COS 云存储 / HOSTING 静态托管 / Auth 用户权限 / APIInvocation API调用 /
230
+ * HTTPInvocation HTTP调用 / VM 主机 / Workflow 工作流 / Other 其他 /
231
+ * PostgreSQL PostgreSQL / Token Token */
232
+ Modules: string[];
233
+ /** 开始日期,格式 'YYYY-MM-DD' */
234
+ StartDate: string;
235
+ /** 结束日期,格式 'YYYY-MM-DD' */
236
+ EndDate: string;
237
+ /** 是否需要每日用量明细 */
238
+ NeedUsageDetails: boolean;
239
+ /** 平台版资源id */
240
+ PlatformId: string;
241
+ }
242
+ /**
243
+ * DescribePlatformCreditsUsageDetail 返回结果
244
+ */
245
+ export interface DescribePlatformCreditsUsageDetailRes {
246
+ /** 用量数据 */
247
+ Usages: PlatformPkgCreditsUsage[];
248
+ /** 唯一请求 ID */
249
+ RequestId: string;
250
+ }
251
+ /**
252
+ * 每日用量详情
253
+ */
254
+ export interface DailyUsageList {
255
+ /** 资源点用量 */
256
+ Credits?: number;
257
+ /** 资源点用量日期,格式 'YYYY-MM-DD' */
258
+ Date?: string;
259
+ /** 原始资源用量 */
260
+ UsageValue?: number;
261
+ }
262
+ /**
263
+ * 平台版指标用量信息
264
+ */
265
+ export interface PlatformMetricUsageItem {
266
+ /** 指标名称 */
267
+ MetricName?: string;
268
+ /** 原始资源类型。如 COS:对象存储 */
269
+ OriginalResourceType?: string;
270
+ /** 原始指标名 */
271
+ OriginalMetricName?: string;
272
+ /** 资源用量 */
273
+ UsageValue?: number;
274
+ /** 资源用量单位,如 MB、Count */
275
+ UsageUnit?: string;
276
+ /** 资源点 */
277
+ Credits?: number;
278
+ /** 用量按日明细列表 */
279
+ DailyUsageList?: DailyUsageList[];
280
+ }
281
+ /**
282
+ * 平台版资源用量信息
283
+ */
284
+ export interface PlatformResUsageItem {
285
+ /** 资源类型。Storage:云存储 / Function:云函数 / Database:数据库 / HOSTING:静态托管 /
286
+ * Log:日志 / Gateway:网关 / Cloudrun:云托管 / Token:Token / EO:EdgeOne */
287
+ ResourceType?: string;
288
+ /** 该资源类型的资源点总量 */
289
+ TotalCredits?: number;
290
+ /** 指标用量信息 */
291
+ Metrics?: PlatformMetricUsageItem[];
292
+ }
293
+ /**
294
+ * DescribePlatformEnvUsage 请求参数
295
+ */
296
+ export interface DescribePlatformEnvUsageParams {
297
+ /** 环境ID(可选,不传则自动使用当前环境 ID) */
298
+ EnvId?: string;
299
+ /** 查询用量起始时间,格式 'YYYY-MM-DD' */
300
+ StartDate?: string;
301
+ /** 查询用量结束时间,格式 'YYYY-MM-DD' */
302
+ EndDate?: string;
303
+ /** 资源类型。Storage:云存储 / Function:云函数 / Database:数据库 / HOSTING:静态托管 /
304
+ * Log:日志 / Gateway:网关 / Cloudrun:云托管 / Token:Token / EO:EdgeOne */
305
+ ResourceTypes?: string[];
306
+ /** 是否展示用量明细 */
307
+ NeedUsageDetails?: boolean;
308
+ }
309
+ /**
310
+ * DescribePlatformEnvUsage 返回结果
311
+ */
312
+ export interface DescribePlatformEnvUsageRes {
313
+ /** 资源用量信息 */
314
+ Resources?: PlatformResUsageItem[];
315
+ /** 资源点总量 */
316
+ TotalCredits?: number;
317
+ /** 资源点取整倍数 */
318
+ CreditsScale?: number;
319
+ /** 唯一请求 ID */
320
+ RequestId: string;
321
+ }
322
+ /**
323
+ * 环境资源点排行项
324
+ */
325
+ export interface EnvCreditsRank {
326
+ /** 环境id */
327
+ EnvId?: string;
328
+ /** 总资源点用量 */
329
+ TotalCredits?: number;
330
+ /** 资源点从上往下排行序号 */
331
+ Rank?: number;
332
+ }
333
+ /**
334
+ * DescribePlatformEnvCreditsRanking 请求参数
335
+ */
336
+ export interface DescribePlatformEnvCreditsRankingParams {
337
+ /** 平台版资源id */
338
+ PlatformId?: string;
339
+ /** 查询时间范围。Today:近1天 / Recent7Days:近7天 / CurrentCycle:当前计费周期 /
340
+ * PreviousCycle:上一个计费周期 / Previous2Cycle:上两个计费周期。默认 Today */
341
+ TimeRange?: string;
342
+ /** 每页条数,默认 50 */
343
+ PageSize?: number;
344
+ /** 分页 offset */
345
+ AfterRank?: number;
346
+ }
347
+ /**
348
+ * DescribePlatformEnvCreditsRanking 返回结果
349
+ */
350
+ export interface DescribePlatformEnvCreditsRankingRes {
351
+ /** 查询时间范围。Recent7Days:近7天 / Recent30Days:近30天 / CurrentCycle:当前计费周期 /
352
+ * PreviousCycle:上一个计费周期 / Previous2Cycle:上两个计费周期 */
353
+ TimeRange?: string;
354
+ /** 起始时间,格式 'YYYY-MM-DD HH:mm:ss' */
355
+ StartTime?: string;
356
+ /** 结束时间,格式 'YYYY-MM-DD HH:mm:ss' */
357
+ EndTime?: string;
358
+ /** 统计的截止时间,格式 'YYYY-MM-DD HH:mm:ss' */
359
+ DataAsOfTime?: string;
360
+ /** 是否还有下一页数据 */
361
+ HasMore?: boolean;
362
+ /** 下一条数据的 offset 值 */
363
+ NextAfterRank?: number;
364
+ /** 总数量 */
365
+ TotalCount?: number;
366
+ /** 资源点精度 */
367
+ CreditsScale?: number;
368
+ /** 排行快照版本 */
369
+ SnapshotId?: string;
370
+ /** 环境排行列表 */
371
+ Items?: EnvCreditsRank[];
372
+ /** 唯一请求 ID */
373
+ RequestId: string;
374
+ }
375
+ /**
376
+ * DestroyPlatformEnv 请求参数
377
+ */
378
+ export interface DestroyPlatformEnvParams {
379
+ /** 环境id */
380
+ EnvId: string;
381
+ }
382
+ /**
383
+ * DestroyPlatformEnv 返回结果
384
+ */
385
+ export interface DestroyPlatformEnvRes {
386
+ /** 唯一请求 ID */
387
+ RequestId: string;
388
+ }
389
+ /**
390
+ * CreatePlatformEnv 请求参数
391
+ */
392
+ export interface CreatePlatformEnvParams {
393
+ /** 环境别名 */
394
+ Alias: string;
395
+ /** 套餐池标识 */
396
+ PlatformId: string;
397
+ /** 幂等键 */
398
+ ReqKey: string;
399
+ }
400
+ /**
401
+ * CreatePlatformEnv 返回结果
402
+ */
403
+ export interface CreatePlatformEnvRes {
404
+ /** 环境id */
405
+ EnvId?: string;
406
+ /** 唯一请求 ID */
407
+ RequestId: string;
408
+ }
409
+ /**
410
+ * ModifyPlatformHTTPServiceRoute 请求参数
411
+ */
412
+ export interface ModifyPlatformHTTPServiceRouteParams {
413
+ /** 平台id */
414
+ PlatformId: string;
415
+ /** 域名路由信息(增量修改,对应字段不传则不修改) */
416
+ Domain: HTTPServiceDomainParam;
417
+ }
418
+ /**
419
+ * ModifyPlatformHTTPServiceRoute 返回结果
420
+ */
421
+ export interface ModifyPlatformHTTPServiceRouteRes {
422
+ /** 唯一请求 ID */
423
+ RequestId: string;
424
+ }
425
+ /**
426
+ * CreatePlatformHTTPServiceRoute 请求参数
427
+ */
428
+ export interface CreatePlatformHTTPServiceRouteParams {
429
+ /** 平台id */
430
+ PlatformId: string;
431
+ /** 域名路由信息。不传 Domain.Routes 时仅创建域名信息 */
432
+ Domain: HTTPServiceDomainParam;
433
+ }
434
+ /**
435
+ * CreatePlatformHTTPServiceRoute 返回结果
436
+ */
437
+ export interface CreatePlatformHTTPServiceRouteRes {
438
+ /** 归属权校验不通过时返回的验证指引,按指引配置 DNS 或文件验证后,
439
+ * 可调用 verifyPlatformHttpServiceRoute 验证归属权是否通过 */
440
+ OwnershipVerification?: OwnershipVerificationInfo;
441
+ /** 唯一请求 ID */
442
+ RequestId: string;
443
+ }
444
+ /**
445
+ * VerifyPlatformHTTPServiceRoute 请求参数
446
+ */
447
+ export interface VerifyPlatformHTTPServiceRouteParams {
448
+ /** 平台id */
449
+ PlatformId: string;
450
+ /** 域名路由信息 */
451
+ Domain: HTTPServiceDomainParam;
452
+ }
453
+ /**
454
+ * VerifyPlatformHTTPServiceRoute 返回结果
455
+ */
456
+ export interface VerifyPlatformHTTPServiceRouteRes {
457
+ /** 前置校验总开关。所有启用的检查项均为 PASS 或 SKIPPED 时为 true,
458
+ * 任一检查项为 FAIL 时为 false */
459
+ Passed?: boolean;
460
+ /** 域名归属权校验结果 */
461
+ Ownership?: VerifyHttpServiceRouteCheckItem;
462
+ /** 证书校验结果;CertId 为空时 Status=SKIPPED */
463
+ Cert?: VerifyHttpServiceRouteCheckItem;
464
+ /** 域名/路径数量配额校验结果 */
465
+ Quota?: VerifyHttpServiceRouteCheckItem;
466
+ /** 同域名下路由路径冲突校验结果 */
467
+ RouteConflict?: VerifyHttpServiceRouteCheckItem;
468
+ /** 域名被其他环境占用校验结果 */
469
+ DomainConflict?: VerifyHttpServiceRouteCheckItem;
470
+ /** 内部域名且非内部账号校验结果 */
471
+ InternalAccount?: VerifyHttpServiceRouteCheckItem;
472
+ /** 域名黑名单校验结果 */
473
+ Blacklist?: VerifyHttpServiceRouteCheckItem;
474
+ /** AccessType=CDN 时 CDN 资源存在性/状态校验结果(含 ICP 未备案提示) */
475
+ CDNResource?: VerifyHttpServiceRouteCheckItem;
476
+ /** AccessType=EO 时的 EdgeOne 预检结果(域名冲突/备案/归属权) */
477
+ EO?: VerifyHttpServiceRouteCheckItem;
478
+ /** 唯一请求 ID */
479
+ RequestId: string;
480
+ }
481
+ /**
482
+ * DeletePlatformHTTPServiceRoute 请求参数
483
+ */
484
+ export interface DeletePlatformHTTPServiceRouteParams {
485
+ /** 平台id */
486
+ PlatformId: string;
487
+ /** 域名 */
488
+ Domain: string;
489
+ /** 路径列表。为空则表示删除此域名及所有路由;不为空则仅删除对应的 path 路由 */
490
+ Paths?: string[];
491
+ }
492
+ /**
493
+ * DeletePlatformHTTPServiceRoute 返回结果
494
+ */
495
+ export interface DeletePlatformHTTPServiceRouteRes {
496
+ /** 唯一请求 ID */
497
+ RequestId: string;
498
+ }
499
+ /**
500
+ * DescribePlatformHTTPServiceRoute 请求参数
501
+ */
502
+ export interface DescribePlatformHTTPServiceRouteParams {
503
+ /** 平台id */
504
+ PlatformId: string;
505
+ /** 过滤条件。可过滤: Domain、Path、DomainType、UpstreamResourceType。
506
+ * 过滤条件数量限制为 10,Values 单条不超过 100 */
507
+ Filters?: HTTPServiceRouteFilter[];
508
+ /** 分页偏移量,默认 0 */
509
+ Offset?: number;
510
+ /** 分页限制,默认 20,最大值 1000 */
511
+ Limit?: number;
512
+ }
513
+ /**
514
+ * DescribePlatformHTTPServiceRoute 返回结果
515
+ */
516
+ export interface DescribePlatformHTTPServiceRouteRes {
517
+ /** 域名路由信息列表 */
518
+ Domains?: HTTPServiceDomain[];
519
+ /** 自定义接入的源站域名(HTTPService接入层域名) */
520
+ OriginDomain: string;
521
+ /** 域名总数,分页查询使用总数判断是否已经拉取到所有数据 */
522
+ TotalCount: number;
523
+ /** 唯一请求 ID */
524
+ RequestId: string;
525
+ }
@@ -201,6 +201,22 @@ export interface ISearchResult {
201
201
  type OnProgress = (progressData: IProgressData) => void;
202
202
  type OnFileFinish = (error: Error, res: any, fileData: any) => void;
203
203
  export { md5File } from './helper';
204
+ export interface IBatchDeleteFailure {
205
+ fileId: string;
206
+ cloudPath: string | undefined;
207
+ code: string;
208
+ }
209
+ /**
210
+ * 整理 storage.batchDeleteFile 的逐文件删除结果,取出失败项并回填对应的 cloudPath
211
+ *
212
+ * 该接口逐文件返回 code,未失败的文件已经删除成功。把结果汇总成一条错误消息会丢掉逐项信息,
213
+ * 调用方无法区分「删掉了哪些」和「哪些本来就不存在」,因此保留结构化失败列表。
214
+ * 接口未保证 delete_list 与入参同序,这里按 fileID 反查。
215
+ */
216
+ export declare function collectBatchDeleteFailures(deleteList: {
217
+ fileID: string;
218
+ code: string;
219
+ }[], fileIdList: string[], cloudPathList: string[]): IBatchDeleteFailure[];
204
220
  export declare class StorageService {
205
221
  private environment;
206
222
  private tcbService;