tencentcloud-sdk-nodejs-tokenhub 4.1.264 → 4.1.266

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tencentcloud-sdk-nodejs-tokenhub",
3
- "version": "4.1.264",
3
+ "version": "4.1.266",
4
4
  "description": "腾讯云 API NODEJS SDK",
5
5
  "main": "./tencentcloud/index.js",
6
6
  "module": "./es/index.js",
@@ -57,7 +57,7 @@ export declare class Client extends TencentCloudCommon.AbstractClient {
57
57
  /**
58
58
  * 查询 TokenPlan APIKey 调用明细。
59
59
 
60
- 从 CLS 日志服务查询套餐下的调用明细,按 pkg_id 过滤,支持游标分页。
60
+ 从 CLS 日志服务查询套餐下的调用明细,按 team_id 过滤,支持游标分页。
61
61
  */
62
62
  DescribeTokenPlanApiKeyUsageDetail(req: DescribeTokenPlanApiKeyUsageDetailRequest, cb?: (error: string, rep: DescribeTokenPlanApiKeyUsageDetailResponse) => void): Promise<DescribeTokenPlanApiKeyUsageDetailResponse>;
63
63
  /**
@@ -71,7 +71,7 @@ export declare class Client extends TencentCloudCommon.AbstractClient {
71
71
 
72
72
  更新 API 密钥的备注信息、 IP 白名单和 Token 限额(修改限额推荐使用QuotaDesired参数)。所有可选参数不传表示不修改。
73
73
  */
74
- ModifyApiKeyInfo(req?: ModifyApiKeyInfoRequest, cb?: (error: string, rep: ModifyApiKeyInfoResponse) => void): Promise<ModifyApiKeyInfoResponse>;
74
+ ModifyApiKeyInfo(req: ModifyApiKeyInfoRequest, cb?: (error: string, rep: ModifyApiKeyInfoResponse) => void): Promise<ModifyApiKeyInfoResponse>;
75
75
  /**
76
76
  * 查询术语条目列表。
77
77
 
@@ -103,7 +103,7 @@ export declare class Client extends TencentCloudCommon.AbstractClient {
103
103
  /**
104
104
  * 更新 API 密钥的启用或禁用状态。
105
105
  */
106
- ModifyApiKeyStatus(req?: ModifyApiKeyStatusRequest, cb?: (error: string, rep: ModifyApiKeyStatusResponse) => void): Promise<ModifyApiKeyStatusResponse>;
106
+ ModifyApiKeyStatus(req: ModifyApiKeyStatusRequest, cb?: (error: string, rep: ModifyApiKeyStatusResponse) => void): Promise<ModifyApiKeyStatusResponse>;
107
107
  /**
108
108
  * 升配套餐。
109
109
 
@@ -115,7 +115,7 @@ export declare class Client extends TencentCloudCommon.AbstractClient {
115
115
 
116
116
  创建一个新的 API 密钥,创建成功后返回 API 密钥 ID。需指定平台类型、绑定方式和初始状态。
117
117
  */
118
- CreateApiKey(req?: CreateApiKeyRequest, cb?: (error: string, rep: CreateApiKeyResponse) => void): Promise<CreateApiKeyResponse>;
118
+ CreateApiKey(req: CreateApiKeyRequest, cb?: (error: string, rep: CreateApiKeyResponse) => void): Promise<CreateApiKeyResponse>;
119
119
  /**
120
120
  * 创建术语库。
121
121
 
@@ -171,7 +171,7 @@ export declare class Client extends TencentCloudCommon.AbstractClient {
171
171
  /**
172
172
  * 删除指定的 API 密钥,同时清理关联的模型绑定关系。
173
173
  */
174
- DeleteApiKey(req?: DeleteApiKeyRequest, cb?: (error: string, rep: DeleteApiKeyResponse) => void): Promise<DeleteApiKeyResponse>;
174
+ DeleteApiKey(req: DeleteApiKeyRequest, cb?: (error: string, rep: DeleteApiKeyResponse) => void): Promise<DeleteApiKeyResponse>;
175
175
  /**
176
176
  * 查询 TokenPlan APIKey 密钥(明文)。
177
177
 
@@ -95,7 +95,7 @@ class Client extends TencentCloudCommon.AbstractClient {
95
95
  /**
96
96
  * 查询 TokenPlan APIKey 调用明细。
97
97
 
98
- 从 CLS 日志服务查询套餐下的调用明细,按 pkg_id 过滤,支持游标分页。
98
+ 从 CLS 日志服务查询套餐下的调用明细,按 team_id 过滤,支持游标分页。
99
99
  */
100
100
  async DescribeTokenPlanApiKeyUsageDetail(req, cb) {
101
101
  return this.request("DescribeTokenPlanApiKeyUsageDetail", req, cb);
@@ -76,15 +76,15 @@ export interface TokenPlanApiKeyListItem {
76
76
  */
77
77
  export interface BindingItem {
78
78
  /**
79
- * 资源 ID(模型 ID 或服务 ID)。
79
+ * <p>资源 ID(模型 ID 或服务 ID)。</p>
80
80
  */
81
81
  ResourceId: string;
82
82
  /**
83
- * 资源类型。取值:endpoint(服务)、model(模型)。
83
+ * <p>资源类型。取值:endpoint(推理服务)、model(模型)。推荐绑定endpoint,绑定model即将下线。已绑定model的apikey仍可使用,但控制台回显将不会展示模型绑定列表。</p><p>枚举值:</p><ul><li>endpoint: 绑定到endpoint(默认推理服务或自定义推理服务)</li></ul>
84
84
  */
85
85
  ResourceType: string;
86
86
  /**
87
- * 资源状态
87
+ * <p>资源状态</p>
88
88
  */
89
89
  Status?: string;
90
90
  }
@@ -114,6 +114,23 @@ export interface DescribeTokenPlanApiKeyListResponse {
114
114
  */
115
115
  RequestId?: string;
116
116
  }
117
+ /**
118
+ * Token 限额期望状态
119
+ */
120
+ export interface QuotasDesired {
121
+ /**
122
+ * <p>限额周期,必填。取值:d(按日)、m(按月)、lifetime(总额度)。</p>
123
+ */
124
+ CycleUnit: string;
125
+ /**
126
+ * <p>单周期额度(Token 数),必填,不能大于10万亿。使用字符串避免大数精度丢失。同维度若与现网不同视为升配/降配。</p>
127
+ */
128
+ CycleCredits: string;
129
+ /**
130
+ * <p>月度限额起始日。CycleUnit=m 时可选,1~31,默认 1。小月(如 2 月)由下游自动取该月最后一天。已有月度限额包时,更新月起始日视为周期窗口切换,会 delete 旧包后 add 新包,累计额度会重置</p>
131
+ */
132
+ MonthStartDay?: number;
133
+ }
117
134
  /**
118
135
  * DeleteGlossary返回参数结构体
119
136
  */
@@ -324,6 +341,23 @@ export interface GlossaryEntryItem {
324
341
  */
325
342
  UpdatedAt?: number;
326
343
  }
344
+ /**
345
+ * Token 限额配置项(创建 API 密钥时用)
346
+ */
347
+ export interface QuotaCreateItem {
348
+ /**
349
+ * <p>限额周期。取值:d(按日)、m(按月)、lifetime(总额度,不重置)。</p>
350
+ */
351
+ CycleUnit: string;
352
+ /**
353
+ * <p>维度当期限额总量(Token 数),不能大于10万亿。使用字符串避免大数精度丢失。</p>
354
+ */
355
+ CycleCredits: string;
356
+ /**
357
+ * <p>月度限额起始日。CycleUnit 为 m 时可选,1~31,默认 1。小月(如 2 月)由下游自动取该月最后一天。</p>
358
+ */
359
+ MonthStartDay?: number;
360
+ }
327
361
  /**
328
362
  * ModifyGlossaryEntries返回参数结构体
329
363
  */
@@ -921,7 +955,16 @@ export interface SubPackageBalance {
921
955
  /**
922
956
  * DeleteApiKey请求参数结构体
923
957
  */
924
- export type DeleteApiKeyRequest = null;
958
+ export interface DeleteApiKeyRequest {
959
+ /**
960
+ * <p>API 密钥 ID。</p>
961
+ */
962
+ ApiKeyId: string;
963
+ /**
964
+ * <p>平台类型。取值:maas。</p>
965
+ */
966
+ Platform: string;
967
+ }
925
968
  /**
926
969
  * UpgradeTokenPlanTeamOrder返回参数结构体
927
970
  */
@@ -1208,7 +1251,20 @@ export interface ModelChargingInfo {
1208
1251
  /**
1209
1252
  * ModifyApiKeyStatus请求参数结构体
1210
1253
  */
1211
- export type ModifyApiKeyStatusRequest = null;
1254
+ export interface ModifyApiKeyStatusRequest {
1255
+ /**
1256
+ * <p>API 密钥 ID。</p>
1257
+ */
1258
+ ApiKeyId: string;
1259
+ /**
1260
+ * <p>平台类型。取值:maas。</p>
1261
+ */
1262
+ Platform: string;
1263
+ /**
1264
+ * <p>状态。取值:enable(启用)、disable(禁用)。</p>
1265
+ */
1266
+ Status: string;
1267
+ }
1212
1268
  /**
1213
1269
  * DescribeTokenPlan请求参数结构体
1214
1270
  */
@@ -1416,7 +1472,32 @@ export interface DescribeTokenPlanApiKeyUsageDetailResponse {
1416
1472
  /**
1417
1473
  * ModifyApiKeyInfo请求参数结构体
1418
1474
  */
1419
- export type ModifyApiKeyInfoRequest = null;
1475
+ export interface ModifyApiKeyInfoRequest {
1476
+ /**
1477
+ * <p>API 密钥 ID。</p>
1478
+ */
1479
+ ApiKeyId: string;
1480
+ /**
1481
+ * <p>平台类型。取值:maas。</p>
1482
+ */
1483
+ Platform: string;
1484
+ /**
1485
+ * <p>API 密钥名称。最大 128 字符。不传表示不修改。</p>
1486
+ */
1487
+ ApiKeyName?: string;
1488
+ /**
1489
+ * <p>备注。</p>
1490
+ */
1491
+ Remark?: string;
1492
+ /**
1493
+ * <p>IP 白名单列表。支持 IPv4(如 1.2.3.4)、CIDR(如 10.0.0.0/24)格式,IPv6暂不支持。最多 50 个,不支持重复。传入空数组表示清空白名单(不限制 IP)。不传表示不修改。</p>
1494
+ */
1495
+ IpWhitelist?: Array<string>;
1496
+ /**
1497
+ * <p>【修改限额推荐使用QuotaDesired参数】Token 限额期望状态。可选,不传表示不修改,传入空数组表示清空。和 Quotas(Token限额配置)字段互斥,不支持同时传入</p>
1498
+ */
1499
+ QuotasDesired?: Array<QuotasDesired>;
1500
+ }
1420
1501
  /**
1421
1502
  * Token Plan 套餐列表项
1422
1503
  */
@@ -1591,6 +1672,10 @@ export interface BatchCreateFailedItem {
1591
1672
  * CreateApiKey返回参数结构体
1592
1673
  */
1593
1674
  export interface CreateApiKeyResponse {
1675
+ /**
1676
+ * <p>apikey id</p>
1677
+ */
1678
+ ApiKeyId?: string;
1594
1679
  /**
1595
1680
  * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1596
1681
  */
@@ -1701,21 +1786,25 @@ export interface DeleteTokenPlanApiKeyRequest {
1701
1786
  */
1702
1787
  export interface ModelChargingItem {
1703
1788
  /**
1704
- * 价格维度标识。取值:Input(输入)、Output(输出)、Cache(缓存命中)、Thinking(思考)、BatchInput(批量输入)、BatchOutput(批量输出)、BatchCache(批量缓存命中)、ImageInput(输入图片)、ImageOutput(输出图片)、Search(搜索调用)。
1789
+ * <p>价格维度标识。取值:Input(输入)、Output(输出)、Cache(缓存命中)、Thinking(思考)、BatchInput(批量输入)、BatchOutput(批量输出)、BatchCache(批量缓存命中)、ImageInput(输入图片)、ImageOutput(输出图片)、Search(搜索调用)。</p>
1705
1790
  */
1706
1791
  PriceName?: string;
1707
1792
  /**
1708
- * 价格维度展示名,后端直接提供当前语言文本(如 输入、Input),前端无需翻译。
1793
+ * <p>价格维度展示名,后端直接提供当前语言文本(如 输入、Input),前端无需翻译。</p>
1709
1794
  */
1710
1795
  DisplayName?: string;
1711
1796
  /**
1712
- * 价格数值。
1797
+ * <p>价格数值。</p>
1713
1798
  */
1714
1799
  Price?: string;
1715
1800
  /**
1716
- * 价格单位,后端直接提供当前语言文本(如 元/百万tokens、元/张、积分/次)。
1801
+ * <p>价格单位,后端直接提供当前语言文本(如 元/百万tokens、元/张、积分/次)。</p>
1717
1802
  */
1718
1803
  PriceUnit?: string;
1804
+ /**
1805
+ * <p>高峰价格,为空表示无高峰定价</p>
1806
+ */
1807
+ PeakPrice?: string;
1719
1808
  }
1720
1809
  /**
1721
1810
  * DescribeTokenPlanApiKey返回参数结构体
@@ -2062,4 +2151,37 @@ export interface RequestSort {
2062
2151
  /**
2063
2152
  * CreateApiKey请求参数结构体
2064
2153
  */
2065
- export type CreateApiKeyRequest = null;
2154
+ export interface CreateApiKeyRequest {
2155
+ /**
2156
+ * <p>API 密钥名称,创建后不可修改。</p>
2157
+ */
2158
+ ApiKeyName: string;
2159
+ /**
2160
+ * <p>平台类型。取值:maas</p>
2161
+ */
2162
+ Platform: string;
2163
+ /**
2164
+ * <p>绑定类型。取值:all(全部模型和接入点)、model_custom_endpoint_custom(自定义模型+自定义接入点)。</p><p>枚举值:</p><ul><li>all: 全部模型和接入点</li><li>model_custom_endpoint_custom: 自定义模型+自定义接入点</li></ul>
2165
+ */
2166
+ BindType: string;
2167
+ /**
2168
+ * <p>备注信息</p>
2169
+ */
2170
+ Remark?: string;
2171
+ /**
2172
+ * <p>初始状态。取值:enable(启用)、disable(禁用)。不传默认 enable。</p>
2173
+ */
2174
+ Status?: string;
2175
+ /**
2176
+ * <p>资源绑定列表(model 和 endpoint 混合),每项需显式指定 ResourceType。BindType 为 all 时不填;BindType 为model_custom_endpoint_custom时必填。</p>
2177
+ */
2178
+ Bindings?: Array<BindingItem>;
2179
+ /**
2180
+ * <p>IP 白名单列表。支持 IPv4(如 1.2.3.4)和 CIDR(如 10.0.0.0/24)格式,IPv6暂不支持。最多 50 个条目,不支持重复。不传或传空数组表示不限制 IP。</p>
2181
+ */
2182
+ IpWhitelist?: Array<string>;
2183
+ /**
2184
+ * <p>Token 限额配置多维度列表。可选,不传表示不开启限额。</p>
2185
+ */
2186
+ Quotas?: Array<QuotaCreateItem>;
2187
+ }