@huyooo/ui 0.13.8 → 0.13.9

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.
Files changed (37) hide show
  1. package/dist/{AuthkitAppSetting-u2kUUH6q.js → AuthkitAppSetting-Xe-QQSQ4.js} +403 -406
  2. package/dist/{AuthkitGithubBinding-B-YSWc50.js → AuthkitGithubBinding-CK6ijijV.js} +329 -330
  3. package/dist/{Contact-CIMfdt_b.js → Contact-mb7deQOs.js} +1 -1
  4. package/dist/CustomTable-BT-cnhLR.js +280 -0
  5. package/dist/{MessageHandle-D2dcvWVr.js → MessageHandle-CVueKPFG.js} +1 -1
  6. package/dist/{MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-CSAIRPOj.js → MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-DL4qP8DA.js} +1 -1
  7. package/dist/{PaySubscriptions-BaUlQE-p.js → PaySubscriptions-BkZaeTgv.js} +2 -2
  8. package/dist/{PricingPlans-B0nt843Q.js → PricingPlans-B-GWpft_.js} +1 -1
  9. package/dist/{ReferrerReferees-B50_V69q.js → ReferrerReferees-DFCwvXJ6.js} +2 -2
  10. package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-BHXLN2Tu.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-Iwq1MOFa.js} +5 -5
  11. package/dist/WidthContainer-jOX17pDu.js +691 -0
  12. package/dist/authkit.js +6 -6
  13. package/dist/common.js +2 -2
  14. package/dist/composables/Authkit/resolveRoutePermission.d.ts +4 -0
  15. package/dist/composables/Authkit/useAuthkitAppsAuthPageInfo.d.ts +1 -1
  16. package/dist/composables/Authkit/useAuthkitUsersProfile.d.ts +1 -1
  17. package/dist/composables.js +6 -6
  18. package/dist/main.js +19 -19
  19. package/dist/message.js +2 -2
  20. package/dist/pay.js +2 -2
  21. package/dist/privateCom.js +1 -1
  22. package/dist/referrer.js +1 -1
  23. package/dist/style.css +1 -1
  24. package/dist/types/api/ai.generated.d.ts +378 -247
  25. package/dist/types/api/billing.generated.d.ts +1105 -374
  26. package/dist/{useAuthkitAppsAuthPageInfo-CjPdpZ64.js → useAuthkitAppsAuthPageInfo-nCjfAjiw.js} +17 -7
  27. package/dist/useAuthkitCreateAndUpdate-u-ceTc-m.js +25 -0
  28. package/dist/useAuthkitUsersProfile-BC5EsA2f.js +40 -0
  29. package/dist/{useDownloads-CxoyuqyY.js → useDownloads-BC0QyEFr.js} +9 -9
  30. package/dist/{useLegalLinks-DHqsVvIK.js → useLegalLinks-DeXLE-yv.js} +1 -1
  31. package/dist/{useSEO-DypqLVfr.js → useSEO-BWAREYk4.js} +238 -227
  32. package/dist/user.js +1 -1
  33. package/package.json +2 -1
  34. package/dist/CustomTable-BBcd4nNL.js +0 -278
  35. package/dist/WidthContainer-BQIboxrg.js +0 -695
  36. package/dist/useAuthkitCreateAndUpdate-CsYn-oYu.js +0 -25
  37. package/dist/useAuthkitUsersProfile-CIFqG3gd.js +0 -36
@@ -87,6 +87,15 @@ export type Api = {
87
87
  return: any;
88
88
  };
89
89
  };
90
+ manageOptions: {
91
+ /** 管理端表单与筛选用产品选项 */
92
+ post: {
93
+ body: {
94
+ status?: "" | "active" | "archived";
95
+ };
96
+ return: any;
97
+ };
98
+ };
90
99
  updateSort: {
91
100
  /** 批量更新产品排序 */
92
101
  post: {
@@ -99,7 +108,7 @@ export type Api = {
99
108
  return: any;
100
109
  };
101
110
  };
102
- listActive: {
111
+ options: {
103
112
  /** 获取定价页面可用产品列表(公开) */
104
113
  post: {
105
114
  return: any;
@@ -172,21 +181,16 @@ export type Api = {
172
181
  return: any;
173
182
  };
174
183
  };
175
- listByProduct: {
176
- /** 获取指定产品的所有可用价格方案 */
184
+ options: {
185
+ /** 按产品或免费体验筛选可用价格方案 */
177
186
  post: {
178
187
  body: {
179
- productId: string;
188
+ productId?: string;
189
+ freeOnly?: boolean;
180
190
  };
181
191
  return: any;
182
192
  };
183
193
  };
184
- listFreeActive: {
185
- /** 获取当前应用可领取的免费体验价格方案 */
186
- post: {
187
- return: any;
188
- };
189
- };
190
194
  };
191
195
  subscriptions: {
192
196
  create: {
@@ -278,6 +282,15 @@ export type Api = {
278
282
  return: any;
279
283
  };
280
284
  };
285
+ statistics: {
286
+ /** 获取订阅概览页统计数据(状态计数、MRR、产品分布、最近订阅) */
287
+ post: {
288
+ body: {
289
+ recentLimit?: number;
290
+ };
291
+ return: any;
292
+ };
293
+ };
281
294
  history: {
282
295
  /** 查询单个订阅的权益变化历史(管理端) */
283
296
  post: {
@@ -889,7 +902,7 @@ export type Api = {
889
902
  return: any;
890
903
  };
891
904
  };
892
- getTrendChart: {
905
+ trendChart: {
893
906
  /** 获取积分变动趋势图表数据 */
894
907
  post: {
895
908
  body: {
@@ -901,7 +914,7 @@ export type Api = {
901
914
  return: any;
902
915
  };
903
916
  };
904
- getTypeDistributionChart: {
917
+ typeDistributionChart: {
905
918
  /** 获取积分类型分布图表数据 */
906
919
  post: {
907
920
  body: {
@@ -912,7 +925,7 @@ export type Api = {
912
925
  return: any;
913
926
  };
914
927
  };
915
- getRankingChart: {
928
+ rankingChart: {
916
929
  /** 获取用户积分排行榜 */
917
930
  post: {
918
931
  body: {
@@ -1302,13 +1315,13 @@ export type Api = {
1302
1315
  return: any;
1303
1316
  };
1304
1317
  };
1305
- getConfig: {
1318
+ findOne: {
1306
1319
  /** 获取当前预警配置 */
1307
1320
  post: {
1308
1321
  return: any;
1309
1322
  };
1310
1323
  };
1311
- findAlerts: {
1324
+ find: {
1312
1325
  /** 分页查询预警记录 */
1313
1326
  post: {
1314
1327
  body: {
@@ -1359,27 +1372,36 @@ export type Api = {
1359
1372
  };
1360
1373
  billingUsage: {
1361
1374
  charges: {
1362
- list: {
1363
- /** 查询 billingUsageRecord 全站扣费流水 */
1375
+ find: {
1376
+ /** 查询 billingUsageRecord 全站扣费明细 */
1364
1377
  post: {
1365
1378
  body: {
1379
+ where?: {
1380
+ keyword?: string;
1381
+ userId?: string;
1382
+ serviceGroup?: "ai" | "platform" | "storage";
1383
+ businessLineKey?: string;
1384
+ billingProductLineKey?: string;
1385
+ serviceKey?: string;
1386
+ serviceKeys?: string[];
1387
+ meterKey?: string;
1388
+ priceListId?: string;
1389
+ pricingType?: "flat" | "tiered" | "meters";
1390
+ subjectKey?: string;
1391
+ id?: string;
1392
+ idempotencyKey?: string;
1393
+ resourceId?: string;
1394
+ status?: "pending" | "charged" | "failed" | "canceled";
1395
+ startDate?: string;
1396
+ endDate?: string;
1397
+ };
1366
1398
  page?: number;
1367
1399
  pageSize?: number;
1368
- userId?: string;
1369
- serviceGroup?: "ai" | "platform" | "storage";
1370
- serviceKey?: string;
1371
- chargeMethodKey?: string;
1372
- subjectKey?: string;
1373
- id?: string;
1374
- idempotencyKey?: string;
1375
- resourceId?: string;
1376
- startDate?: string;
1377
- endDate?: string;
1378
1400
  };
1379
1401
  return: any;
1380
1402
  };
1381
1403
  };
1382
- get: {
1404
+ findOne: {
1383
1405
  /** 按 ID 查询单条扣费记录(含 AI 扩展字段,供详情抽屉) */
1384
1406
  post: {
1385
1407
  body: {
@@ -1391,14 +1413,19 @@ export type Api = {
1391
1413
  };
1392
1414
  consumption: {
1393
1415
  overview: {
1394
- /** 聚合 AI / 平台 / 存储积分消耗 */
1416
+ /** 聚合已入账扣费结果 */
1395
1417
  post: {
1396
1418
  body: {
1397
- userId?: string;
1398
- serviceGroup?: "ai" | "platform" | "storage";
1399
- serviceKey?: string;
1400
- startDate?: string;
1401
- endDate?: string;
1419
+ where?: {
1420
+ userId?: string;
1421
+ serviceGroup?: "ai" | "platform" | "storage";
1422
+ businessLineKey?: string;
1423
+ billingProductLineKey?: string;
1424
+ serviceKey?: string;
1425
+ serviceKeys?: string[];
1426
+ startDate?: string;
1427
+ endDate?: string;
1428
+ };
1402
1429
  };
1403
1430
  return: any;
1404
1431
  };
@@ -1407,11 +1434,16 @@ export type Api = {
1407
1434
  /** 按日聚合积分消耗趋势 */
1408
1435
  post: {
1409
1436
  body: {
1410
- userId?: string;
1411
- serviceGroup?: "ai" | "platform" | "storage";
1412
- serviceKey?: string;
1413
- startDate?: string;
1414
- endDate?: string;
1437
+ where?: {
1438
+ userId?: string;
1439
+ serviceGroup?: "ai" | "platform" | "storage";
1440
+ businessLineKey?: string;
1441
+ billingProductLineKey?: string;
1442
+ serviceKey?: string;
1443
+ serviceKeys?: string[];
1444
+ startDate?: string;
1445
+ endDate?: string;
1446
+ };
1415
1447
  limit?: number;
1416
1448
  };
1417
1449
  return: any;
@@ -1484,7 +1516,7 @@ export type Api = {
1484
1516
  return: any;
1485
1517
  };
1486
1518
  };
1487
- detail: {
1519
+ findOne: {
1488
1520
  /** 管理端查询单个积分充值订单详情及操作时间线 */
1489
1521
  post: {
1490
1522
  body: {
@@ -1539,7 +1571,7 @@ export type Api = {
1539
1571
  };
1540
1572
  };
1541
1573
  rechargePackage: {
1542
- list: {
1574
+ find: {
1543
1575
  /** 获取充值套餐列表(管理端) */
1544
1576
  post: {
1545
1577
  body: {
@@ -1655,7 +1687,7 @@ export type Api = {
1655
1687
  return: any;
1656
1688
  };
1657
1689
  };
1658
- list: {
1690
+ find: {
1659
1691
  /** 查询退款记录列表 */
1660
1692
  post: {
1661
1693
  body: {
@@ -1670,7 +1702,7 @@ export type Api = {
1670
1702
  return: any;
1671
1703
  };
1672
1704
  };
1673
- detail: {
1705
+ findOne: {
1674
1706
  /** 查询单个退款单详情 */
1675
1707
  post: {
1676
1708
  body: {
@@ -1706,7 +1738,7 @@ export type Api = {
1706
1738
  };
1707
1739
  };
1708
1740
  serviceDefinition: {
1709
- list: {
1741
+ find: {
1710
1742
  /** 获取应用的所有服务定义 */
1711
1743
  post: {
1712
1744
  body: {
@@ -1757,7 +1789,7 @@ export type Api = {
1757
1789
  post: {
1758
1790
  body: {
1759
1791
  serviceType: string;
1760
- chargeMethodKey?: string;
1792
+ priceListId?: string;
1761
1793
  metadata: Record<string, unknown>;
1762
1794
  idempotencyKey?: string;
1763
1795
  resourceId?: string;
@@ -1770,7 +1802,7 @@ export type Api = {
1770
1802
  post: {
1771
1803
  body: {
1772
1804
  serviceType: string;
1773
- chargeMethodKey?: string;
1805
+ priceListId?: string;
1774
1806
  metadata: Record<string, unknown>;
1775
1807
  freeQuotaOverride?: number;
1776
1808
  };
@@ -1800,7 +1832,6 @@ export type Api = {
1800
1832
  idempotencyKey?: string;
1801
1833
  resourceId?: string;
1802
1834
  serviceKey?: string;
1803
- chargeMethodKey?: string;
1804
1835
  userId?: string;
1805
1836
  startDate?: string;
1806
1837
  endDate?: string;
@@ -1809,66 +1840,58 @@ export type Api = {
1809
1840
  };
1810
1841
  };
1811
1842
  };
1812
- servicePricing: {
1813
- overview: {
1814
- post: {
1815
- return: any;
1816
- };
1817
- };
1818
- list: {
1819
- post: {
1820
- body: {
1821
- serviceKey?: string;
1822
- };
1823
- return: any;
1824
- };
1825
- };
1826
- get: {
1843
+ priceList: {
1844
+ find: {
1827
1845
  post: {
1828
1846
  body: {
1829
- serviceKey: string;
1830
- chargeMethodKey: string;
1847
+ where?: {
1848
+ priceListId?: string;
1849
+ businessLineKey?: string;
1850
+ billingProductLineKey?: string;
1851
+ serviceKey?: string;
1852
+ meterKey?: string;
1853
+ pricingType?: "flat" | "tiered" | "meters";
1854
+ keyword?: string;
1855
+ enabled?: boolean;
1856
+ };
1857
+ page?: number;
1858
+ pageSize?: number;
1831
1859
  };
1832
1860
  return: any;
1833
1861
  };
1834
1862
  };
1835
- upsert: {
1863
+ findOne: {
1836
1864
  post: {
1837
1865
  body: {
1838
- serviceKey: string;
1839
- chargeMethodKey: string;
1840
- originalPrice: number;
1841
- sellPrice: number;
1842
- enabled?: boolean;
1866
+ id: string;
1843
1867
  };
1844
1868
  return: any;
1845
1869
  };
1846
1870
  };
1847
- importLegacy: {
1848
- /** 幂等:将旧 pricingRule 导入 billingServicePricing */
1849
- post: {
1850
- return: any;
1851
- };
1852
- };
1853
- };
1854
- priceList: {
1855
- list: {
1871
+ options: {
1872
+ /** 筛选项、绑价表单 Select 用价目表下拉 */
1856
1873
  post: {
1857
1874
  body: {
1875
+ businessLineKey?: string;
1876
+ billingProductLineKey?: string;
1858
1877
  serviceKey?: string;
1859
- chargeMethodKey?: string;
1860
- pricingType?: "flat" | "tiered" | "dimensions";
1878
+ pricingType?: "flat" | "tiered" | "meters";
1861
1879
  enabled?: boolean;
1862
- page?: number;
1863
- pageSize?: number;
1864
1880
  };
1865
1881
  return: any;
1866
1882
  };
1867
1883
  };
1868
- get: {
1884
+ previewSchema: {
1885
+ /** 由所选计费项生成填价表单结构 */
1869
1886
  post: {
1870
1887
  body: {
1871
- id: string;
1888
+ businessLineKey: string;
1889
+ serviceKey: string;
1890
+ meterRefs: {
1891
+ businessLineKey: string;
1892
+ serviceKey: string;
1893
+ meterKey: string;
1894
+ }[];
1872
1895
  };
1873
1896
  return: any;
1874
1897
  };
@@ -1876,12 +1899,17 @@ export type Api = {
1876
1899
  create: {
1877
1900
  post: {
1878
1901
  body: {
1902
+ businessLineKey: string;
1879
1903
  serviceKey: string;
1880
- chargeMethodKey: string;
1904
+ meterRefs?: {
1905
+ businessLineKey: string;
1906
+ serviceKey: string;
1907
+ meterKey: string;
1908
+ }[];
1881
1909
  name: string;
1882
1910
  currency?: "CNY" | "USD";
1883
1911
  enabled?: boolean;
1884
- pricing: {
1912
+ pricingValues: {
1885
1913
  type: "flat";
1886
1914
  originalPrice: number;
1887
1915
  sellPrice: number;
@@ -1889,7 +1917,7 @@ export type Api = {
1889
1917
  type: "tiered";
1890
1918
  priceStructure: "flat" | "segmented";
1891
1919
  tiers: {
1892
- tierKey?: string;
1920
+ match?: Record<string, string>;
1893
1921
  tierRangeMode?: "at_most" | "at_least" | "between";
1894
1922
  minTokens?: number;
1895
1923
  maxTokens?: number;
@@ -1900,20 +1928,19 @@ export type Api = {
1900
1928
  billingEnabled: boolean;
1901
1929
  }[];
1902
1930
  } | {
1903
- type: "dimensions";
1904
- dimensions: {
1905
- dimensionKey: string;
1906
- unit: string;
1907
- priceStructure?: "flat" | "segmented";
1931
+ type: "meters";
1932
+ meters: {
1933
+ componentKey: string;
1934
+ businessLineKey: string;
1935
+ serviceKey: string;
1936
+ meterKey: string;
1908
1937
  tiers: {
1909
- tierKey?: string;
1938
+ match?: Record<string, string>;
1910
1939
  tierRangeMode?: "at_most" | "at_least" | "between";
1911
1940
  minTokens?: number;
1912
1941
  maxTokens?: number;
1913
1942
  minInclusive?: boolean;
1914
1943
  maxInclusive?: boolean;
1915
- minOutputTokens?: number;
1916
- maxOutputTokens?: number;
1917
1944
  originalFenPerUnit: number;
1918
1945
  sellFenPerUnit: number;
1919
1946
  billingEnabled: boolean;
@@ -1931,7 +1958,12 @@ export type Api = {
1931
1958
  name?: string;
1932
1959
  currency?: "CNY" | "USD";
1933
1960
  enabled?: boolean;
1934
- pricing?: {
1961
+ meterRefs?: {
1962
+ businessLineKey: string;
1963
+ serviceKey: string;
1964
+ meterKey: string;
1965
+ }[];
1966
+ pricingValues?: {
1935
1967
  type: "flat";
1936
1968
  originalPrice: number;
1937
1969
  sellPrice: number;
@@ -1939,7 +1971,7 @@ export type Api = {
1939
1971
  type: "tiered";
1940
1972
  priceStructure: "flat" | "segmented";
1941
1973
  tiers: {
1942
- tierKey?: string;
1974
+ match?: Record<string, string>;
1943
1975
  tierRangeMode?: "at_most" | "at_least" | "between";
1944
1976
  minTokens?: number;
1945
1977
  maxTokens?: number;
@@ -1950,20 +1982,19 @@ export type Api = {
1950
1982
  billingEnabled: boolean;
1951
1983
  }[];
1952
1984
  } | {
1953
- type: "dimensions";
1954
- dimensions: {
1955
- dimensionKey: string;
1956
- unit: string;
1957
- priceStructure?: "flat" | "segmented";
1985
+ type: "meters";
1986
+ meters: {
1987
+ componentKey: string;
1988
+ businessLineKey: string;
1989
+ serviceKey: string;
1990
+ meterKey: string;
1958
1991
  tiers: {
1959
- tierKey?: string;
1992
+ match?: Record<string, string>;
1960
1993
  tierRangeMode?: "at_most" | "at_least" | "between";
1961
1994
  minTokens?: number;
1962
1995
  maxTokens?: number;
1963
1996
  minInclusive?: boolean;
1964
1997
  maxInclusive?: boolean;
1965
- minOutputTokens?: number;
1966
- maxOutputTokens?: number;
1967
1998
  originalFenPerUnit: number;
1968
1999
  sellFenPerUnit: number;
1969
2000
  billingEnabled: boolean;
@@ -1984,13 +2015,16 @@ export type Api = {
1984
2015
  };
1985
2016
  };
1986
2017
  priceBinding: {
1987
- list: {
2018
+ find: {
1988
2019
  post: {
1989
2020
  body: {
1990
- subjectType?: "model-profile";
1991
- subjectKey?: string;
1992
- serviceKey?: string;
1993
- enabled?: boolean;
2021
+ where?: {
2022
+ subjectType?: "model-profile";
2023
+ subjectKey?: string;
2024
+ serviceKey?: string;
2025
+ businessLineKey?: string;
2026
+ enabled?: boolean;
2027
+ };
1994
2028
  };
1995
2029
  return: any;
1996
2030
  };
@@ -2015,21 +2049,34 @@ export type Api = {
2015
2049
  };
2016
2050
  };
2017
2051
  };
2018
- billingMethodDefinition: {
2019
- list: {
2052
+ businessLine: {
2053
+ find: {
2020
2054
  post: {
2021
2055
  body: {
2022
- serviceKey?: string;
2056
+ where?: {
2057
+ keyword?: string;
2058
+ enabled?: boolean;
2059
+ };
2060
+ withStats?: boolean;
2023
2061
  page?: number;
2024
2062
  pageSize?: number;
2025
2063
  };
2026
2064
  return: any;
2027
2065
  };
2028
2066
  };
2029
- get: {
2067
+ findOne: {
2068
+ post: {
2069
+ body: {
2070
+ businessLineKey: string;
2071
+ };
2072
+ return: any;
2073
+ };
2074
+ };
2075
+ options: {
2076
+ /** 筛选项、表单 Select 用业务线下拉 */
2030
2077
  post: {
2031
2078
  body: {
2032
- chargeMethodKey: string;
2079
+ enabled?: boolean;
2033
2080
  };
2034
2081
  return: any;
2035
2082
  };
@@ -2037,25 +2084,8 @@ export type Api = {
2037
2084
  create: {
2038
2085
  post: {
2039
2086
  body: {
2040
- serviceKey: string;
2041
- chargeMethodKey: string;
2087
+ businessLineKey: string;
2042
2088
  label: string;
2043
- billingUnit: string;
2044
- chargeKind: "instant" | "settlement";
2045
- settlementPeriod?: "second" | "minute" | "hour" | "day" | "month";
2046
- priceStructure?: "flat" | "segmented";
2047
- tiers?: {
2048
- tierKey?: string;
2049
- tierRangeMode?: "at_most" | "at_least" | "between";
2050
- minTokens?: number;
2051
- maxTokens?: number;
2052
- minInclusive?: boolean;
2053
- maxInclusive?: boolean;
2054
- originalFenPerUnit: number;
2055
- sellFenPerUnit: number;
2056
- billingEnabled: boolean;
2057
- }[];
2058
- enabled?: boolean;
2059
2089
  };
2060
2090
  return: any;
2061
2091
  };
@@ -2063,23 +2093,8 @@ export type Api = {
2063
2093
  update: {
2064
2094
  post: {
2065
2095
  body: {
2066
- id: string;
2096
+ businessLineKey: string;
2067
2097
  label?: string;
2068
- billingUnit?: string;
2069
- chargeKind?: "instant" | "settlement";
2070
- settlementPeriod?: "second" | "minute" | "hour" | "day" | "month";
2071
- priceStructure?: "flat" | "segmented";
2072
- tiers?: {
2073
- tierKey?: string;
2074
- tierRangeMode?: "at_most" | "at_least" | "between";
2075
- minTokens?: number;
2076
- maxTokens?: number;
2077
- minInclusive?: boolean;
2078
- maxInclusive?: boolean;
2079
- originalFenPerUnit: number;
2080
- sellFenPerUnit: number;
2081
- billingEnabled: boolean;
2082
- }[];
2083
2098
  enabled?: boolean;
2084
2099
  };
2085
2100
  return: any;
@@ -2088,108 +2103,452 @@ export type Api = {
2088
2103
  delete: {
2089
2104
  post: {
2090
2105
  body: {
2091
- id: string;
2106
+ businessLineKey: string;
2092
2107
  };
2093
2108
  return: any;
2094
2109
  };
2095
2110
  };
2096
2111
  };
2097
- export: {
2098
- recharge: {
2099
- /** 导出充值订单记录为 CSV 格式 */
2112
+ billingProductLine: {
2113
+ find: {
2100
2114
  post: {
2101
2115
  body: {
2102
- startDate?: string;
2103
- endDate?: string;
2104
- status?: string;
2116
+ where?: {
2117
+ businessLineKey?: string;
2118
+ keyword?: string;
2119
+ enabled?: boolean;
2120
+ };
2121
+ withStats?: boolean;
2122
+ page?: number;
2123
+ pageSize?: number;
2105
2124
  };
2106
2125
  return: any;
2107
2126
  };
2108
2127
  };
2109
- refund: {
2110
- /** 导出退款记录为 CSV 格式 */
2128
+ findOne: {
2111
2129
  post: {
2112
2130
  body: {
2113
- startDate?: string;
2114
- endDate?: string;
2115
- status?: string;
2131
+ productLineId: string;
2116
2132
  };
2117
2133
  return: any;
2118
2134
  };
2119
2135
  };
2120
- pointsHistory: {
2121
- /** 导出积分变动记录为 CSV 格式 */
2136
+ options: {
2137
+ /** 筛选项、表单 Select 用产品线下拉 */
2122
2138
  post: {
2123
2139
  body: {
2124
- startDate?: string;
2125
- endDate?: string;
2126
- type?: string;
2127
- userId?: string;
2140
+ businessLineKey?: string;
2141
+ enabled?: boolean;
2128
2142
  };
2129
2143
  return: any;
2130
2144
  };
2131
2145
  };
2132
- };
2133
- financeReport: {
2134
- overview: {
2135
- /** 获取收入概览数据 */
2146
+ create: {
2136
2147
  post: {
2137
2148
  body: {
2138
- startDate?: string;
2139
- endDate?: string;
2149
+ businessLineKey: string;
2150
+ productLineKey: string;
2151
+ label: string;
2140
2152
  };
2141
2153
  return: any;
2142
2154
  };
2143
2155
  };
2144
- trend: {
2145
- /** 获取收入趋势数据(按日/周/月) */
2156
+ update: {
2146
2157
  post: {
2147
2158
  body: {
2148
- period: "day" | "week" | "month";
2149
- days?: number;
2159
+ productLineId: string;
2160
+ label?: string;
2161
+ enabled?: boolean;
2150
2162
  };
2151
2163
  return: any;
2152
2164
  };
2153
2165
  };
2154
- packageRank: {
2155
- /** 获取套餐销售排行数据 */
2166
+ delete: {
2156
2167
  post: {
2157
2168
  body: {
2158
- startDate?: string;
2159
- endDate?: string;
2160
- limit?: number;
2169
+ productLineId: string;
2161
2170
  };
2162
2171
  return: any;
2163
2172
  };
2164
2173
  };
2165
- userRank: {
2166
- /** 获取用户充值排行数据 */
2167
- post: {
2168
- body: {
2169
- startDate?: string;
2170
- endDate?: string;
2171
- limit?: number;
2174
+ };
2175
+ billingServiceCatalog: {
2176
+ service: {
2177
+ find: {
2178
+ post: {
2179
+ body: {
2180
+ where?: {
2181
+ businessLineKey?: string;
2182
+ billingProductLineKey?: string;
2183
+ productLine?: string;
2184
+ source?: "builtin" | "custom";
2185
+ serviceKey?: string;
2186
+ keyword?: string;
2187
+ enabled?: boolean;
2188
+ };
2189
+ page?: number;
2190
+ pageSize?: number;
2191
+ };
2192
+ return: any;
2193
+ };
2194
+ };
2195
+ options: {
2196
+ /** 筛选项、表单 Select 用服务下拉 */
2197
+ post: {
2198
+ body: {
2199
+ businessLineKey?: string;
2200
+ billingProductLineKey?: string;
2201
+ enabled?: boolean;
2202
+ };
2203
+ return: any;
2204
+ };
2205
+ };
2206
+ create: {
2207
+ post: {
2208
+ body: {
2209
+ businessLineKey: string;
2210
+ billingProductLineKey: string;
2211
+ serviceType: string;
2212
+ name: string;
2213
+ description?: string;
2214
+ dependencies?: {
2215
+ businessLineKey: string;
2216
+ billingProductLineKey: string;
2217
+ serviceKey: string;
2218
+ meterKeys?: string[];
2219
+ required?: boolean;
2220
+ }[];
2221
+ };
2222
+ return: any;
2223
+ };
2224
+ };
2225
+ update: {
2226
+ post: {
2227
+ body: {
2228
+ businessLineKey: string;
2229
+ serviceKey: string;
2230
+ label?: string;
2231
+ description?: string;
2232
+ billingProductLineKey?: string;
2233
+ dependencies?: {
2234
+ businessLineKey: string;
2235
+ billingProductLineKey: string;
2236
+ serviceKey: string;
2237
+ meterKeys?: string[];
2238
+ required?: boolean;
2239
+ }[];
2240
+ enabled?: boolean;
2241
+ };
2242
+ return: any;
2243
+ };
2244
+ };
2245
+ delete: {
2246
+ post: {
2247
+ body: {
2248
+ businessLineKey: string;
2249
+ serviceKey: string;
2250
+ };
2251
+ return: any;
2252
+ };
2253
+ };
2254
+ };
2255
+ runtime: {
2256
+ export: {
2257
+ /** 前端运行时缓存:服务 + 价目表 operation */
2258
+ post: {
2259
+ return: any;
2172
2260
  };
2173
- return: any;
2174
2261
  };
2175
2262
  };
2176
2263
  };
2177
- reconciliation: {
2178
- generate: {
2179
- /** 生成指定日期的对账报告 */
2264
+ billingMeter: {
2265
+ find: {
2180
2266
  post: {
2181
2267
  body: {
2182
- date: string;
2268
+ where?: {
2269
+ businessLineKey?: string;
2270
+ billingProductLineKey?: string;
2271
+ serviceKey?: string;
2272
+ chargeMode?: "instant" | "settlement";
2273
+ source?: "builtin" | "custom";
2274
+ keyword?: string;
2275
+ enabled?: boolean;
2276
+ };
2277
+ page?: number;
2278
+ pageSize?: number;
2183
2279
  };
2184
2280
  return: any;
2185
2281
  };
2186
2282
  };
2187
- list: {
2188
- /** 查询对账报告列表 */
2283
+ options: {
2189
2284
  post: {
2190
2285
  body: {
2191
- page?: number;
2192
- pageSize?: number;
2286
+ businessLineKey?: string;
2287
+ billingProductLineKey?: string;
2288
+ serviceKey?: string;
2289
+ enabled?: boolean;
2290
+ };
2291
+ return: any;
2292
+ };
2293
+ };
2294
+ create: {
2295
+ post: {
2296
+ body: {
2297
+ businessLineKey: string;
2298
+ serviceKey: string;
2299
+ meterKey: string;
2300
+ label: string;
2301
+ description?: string;
2302
+ chargeMode?: "instant" | "settlement";
2303
+ settlementPeriod?: "hour" | "day" | "month";
2304
+ pricingSchema?: {
2305
+ unitLabel: string;
2306
+ quantityScale?: number;
2307
+ priceStructure?: "flat" | "segmented" | "keyed";
2308
+ matchKeys?: {
2309
+ key: string;
2310
+ label: string;
2311
+ values: {
2312
+ value: string;
2313
+ label: string;
2314
+ }[];
2315
+ }[];
2316
+ tiers: {
2317
+ match?: Record<string, string>;
2318
+ tierRangeMode?: "at_most" | "at_least" | "between";
2319
+ minTokens?: number;
2320
+ maxTokens?: number;
2321
+ minInclusive?: boolean;
2322
+ maxInclusive?: boolean;
2323
+ }[];
2324
+ };
2325
+ enabled?: boolean;
2326
+ };
2327
+ return: any;
2328
+ };
2329
+ };
2330
+ update: {
2331
+ post: {
2332
+ body: {
2333
+ id: string;
2334
+ businessLineKey?: string;
2335
+ serviceKey?: string;
2336
+ meterKey?: string;
2337
+ label?: string;
2338
+ description?: string;
2339
+ chargeMode?: "instant" | "settlement";
2340
+ settlementPeriod?: "hour" | "day" | "month";
2341
+ pricingSchema?: {
2342
+ unitLabel: string;
2343
+ quantityScale?: number;
2344
+ priceStructure?: "flat" | "segmented" | "keyed";
2345
+ matchKeys?: {
2346
+ key: string;
2347
+ label: string;
2348
+ values: {
2349
+ value: string;
2350
+ label: string;
2351
+ }[];
2352
+ }[];
2353
+ tiers: {
2354
+ match?: Record<string, string>;
2355
+ tierRangeMode?: "at_most" | "at_least" | "between";
2356
+ minTokens?: number;
2357
+ maxTokens?: number;
2358
+ minInclusive?: boolean;
2359
+ maxInclusive?: boolean;
2360
+ }[];
2361
+ };
2362
+ enabled?: boolean;
2363
+ };
2364
+ return: any;
2365
+ };
2366
+ };
2367
+ delete: {
2368
+ post: {
2369
+ body: {
2370
+ id: string;
2371
+ };
2372
+ return: any;
2373
+ };
2374
+ };
2375
+ };
2376
+ billingMeterChargeItem: {
2377
+ find: {
2378
+ post: {
2379
+ body: {
2380
+ where?: {
2381
+ keyword?: string;
2382
+ userId?: string;
2383
+ businessLineKey?: string;
2384
+ billingProductLineKey?: string;
2385
+ serviceKey?: string;
2386
+ meterKey?: string;
2387
+ priceListId?: string;
2388
+ pricingType?: "flat" | "tiered" | "meters";
2389
+ resourceId?: string;
2390
+ subjectKey?: string;
2391
+ idempotencyKey?: string;
2392
+ billingUsageRecordId?: string;
2393
+ chargeMode?: "instant" | "settlement";
2394
+ status?: "pending" | "accumulating" | "charged" | "failed" | "canceled";
2395
+ startDate?: string;
2396
+ endDate?: string;
2397
+ };
2398
+ page?: number;
2399
+ pageSize?: number;
2400
+ };
2401
+ return: any;
2402
+ };
2403
+ };
2404
+ overview: {
2405
+ post: {
2406
+ body: {
2407
+ where?: {
2408
+ keyword?: string;
2409
+ userId?: string;
2410
+ businessLineKey?: string;
2411
+ billingProductLineKey?: string;
2412
+ serviceKey?: string;
2413
+ meterKey?: string;
2414
+ priceListId?: string;
2415
+ pricingType?: "flat" | "tiered" | "meters";
2416
+ resourceId?: string;
2417
+ subjectKey?: string;
2418
+ idempotencyKey?: string;
2419
+ billingUsageRecordId?: string;
2420
+ chargeMode?: "instant" | "settlement";
2421
+ status?: "pending" | "accumulating" | "charged" | "failed" | "canceled";
2422
+ startDate?: string;
2423
+ endDate?: string;
2424
+ };
2425
+ };
2426
+ return: any;
2427
+ };
2428
+ };
2429
+ trend: {
2430
+ post: {
2431
+ body: {
2432
+ where?: {
2433
+ keyword?: string;
2434
+ userId?: string;
2435
+ businessLineKey?: string;
2436
+ billingProductLineKey?: string;
2437
+ serviceKey?: string;
2438
+ meterKey?: string;
2439
+ priceListId?: string;
2440
+ pricingType?: "flat" | "tiered" | "meters";
2441
+ resourceId?: string;
2442
+ subjectKey?: string;
2443
+ idempotencyKey?: string;
2444
+ billingUsageRecordId?: string;
2445
+ chargeMode?: "instant" | "settlement";
2446
+ status?: "pending" | "accumulating" | "charged" | "failed" | "canceled";
2447
+ startDate?: string;
2448
+ endDate?: string;
2449
+ };
2450
+ limit?: number;
2451
+ };
2452
+ return: any;
2453
+ };
2454
+ };
2455
+ };
2456
+ export: {
2457
+ recharge: {
2458
+ /** 导出充值订单记录为 CSV 格式 */
2459
+ post: {
2460
+ body: {
2461
+ startDate?: string;
2462
+ endDate?: string;
2463
+ status?: string;
2464
+ };
2465
+ return: any;
2466
+ };
2467
+ };
2468
+ refund: {
2469
+ /** 导出退款记录为 CSV 格式 */
2470
+ post: {
2471
+ body: {
2472
+ startDate?: string;
2473
+ endDate?: string;
2474
+ status?: string;
2475
+ };
2476
+ return: any;
2477
+ };
2478
+ };
2479
+ pointsHistory: {
2480
+ /** 导出积分变动记录为 CSV 格式 */
2481
+ post: {
2482
+ body: {
2483
+ startDate?: string;
2484
+ endDate?: string;
2485
+ type?: string;
2486
+ userId?: string;
2487
+ };
2488
+ return: any;
2489
+ };
2490
+ };
2491
+ };
2492
+ financeReport: {
2493
+ overview: {
2494
+ /** 获取收入概览数据 */
2495
+ post: {
2496
+ body: {
2497
+ startDate?: string;
2498
+ endDate?: string;
2499
+ };
2500
+ return: any;
2501
+ };
2502
+ };
2503
+ trend: {
2504
+ /** 获取收入趋势数据(按日/周/月) */
2505
+ post: {
2506
+ body: {
2507
+ period: "day" | "week" | "month";
2508
+ days?: number;
2509
+ };
2510
+ return: any;
2511
+ };
2512
+ };
2513
+ packageRank: {
2514
+ /** 获取套餐销售排行数据 */
2515
+ post: {
2516
+ body: {
2517
+ startDate?: string;
2518
+ endDate?: string;
2519
+ limit?: number;
2520
+ };
2521
+ return: any;
2522
+ };
2523
+ };
2524
+ userRank: {
2525
+ /** 获取用户充值排行数据 */
2526
+ post: {
2527
+ body: {
2528
+ startDate?: string;
2529
+ endDate?: string;
2530
+ limit?: number;
2531
+ };
2532
+ return: any;
2533
+ };
2534
+ };
2535
+ };
2536
+ reconciliation: {
2537
+ generate: {
2538
+ /** 生成指定日期的对账报告 */
2539
+ post: {
2540
+ body: {
2541
+ date: string;
2542
+ };
2543
+ return: any;
2544
+ };
2545
+ };
2546
+ find: {
2547
+ /** 查询对账报告列表 */
2548
+ post: {
2549
+ body: {
2550
+ page?: number;
2551
+ pageSize?: number;
2193
2552
  status?: string;
2194
2553
  startDate?: string;
2195
2554
  endDate?: string;
@@ -2197,7 +2556,7 @@ export type Api = {
2197
2556
  return: any;
2198
2557
  };
2199
2558
  };
2200
- detail: {
2559
+ findOne: {
2201
2560
  /** 查询对账报告详情 */
2202
2561
  post: {
2203
2562
  body: {
@@ -2251,7 +2610,7 @@ export type Api = {
2251
2610
  return: any;
2252
2611
  };
2253
2612
  };
2254
- list: {
2613
+ find: {
2255
2614
  /** 查询发票申请列表 */
2256
2615
  post: {
2257
2616
  body: {
@@ -2265,7 +2624,7 @@ export type Api = {
2265
2624
  return: any;
2266
2625
  };
2267
2626
  };
2268
- detail: {
2627
+ findOne: {
2269
2628
  /** 查询发票详情 */
2270
2629
  post: {
2271
2630
  body: {
@@ -2400,8 +2759,9 @@ export type Api = {
2400
2759
  body: {
2401
2760
  appId: string;
2402
2761
  userId: string;
2762
+ businessLineKey: string;
2403
2763
  serviceKey: string;
2404
- chargeMethodKey: string;
2764
+ priceListId: string;
2405
2765
  amount: number;
2406
2766
  freeQuotaOverride?: number;
2407
2767
  };
@@ -2416,8 +2776,9 @@ export type Api = {
2416
2776
  items: {
2417
2777
  key: string;
2418
2778
  userId: string;
2779
+ businessLineKey: string;
2419
2780
  serviceKey: string;
2420
- chargeMethodKey: string;
2781
+ priceListId?: string;
2421
2782
  amount: number;
2422
2783
  freeQuotaOverride?: number;
2423
2784
  }[];
@@ -2431,8 +2792,9 @@ export type Api = {
2431
2792
  body: {
2432
2793
  appId: string;
2433
2794
  userId: string;
2795
+ businessLineKey: string;
2434
2796
  serviceKey: string;
2435
- chargeMethodKey: string;
2797
+ priceListId?: string;
2436
2798
  amount: number;
2437
2799
  metadata?: Record<string, unknown>;
2438
2800
  idempotencyKey?: string;
@@ -2458,21 +2820,44 @@ export type Api = {
2458
2820
  return: any;
2459
2821
  };
2460
2822
  };
2823
+ 'preview-meter-charge': {
2824
+ /** 供 ai-server 等根据价目表与 meter 用量计算积分 */
2825
+ post: {
2826
+ body: {
2827
+ appId: string;
2828
+ businessLineKey: string;
2829
+ serviceKey: string;
2830
+ priceListId?: string;
2831
+ meterUsage: Record<string, number>;
2832
+ meterMatchContext?: Record<string, Record<string, string>>;
2833
+ meterTierMatchUsage?: Record<string, number>;
2834
+ exchangeRate?: number;
2835
+ };
2836
+ return: any;
2837
+ };
2838
+ };
2461
2839
  'record-ai': {
2462
- /** 供 ai-server 计价后写入统一用量账本并扣积分 */
2840
+ /** 供 ai-server 传入 meter 用量,由计费引擎算价并扣积分 */
2463
2841
  post: {
2464
2842
  body: {
2465
2843
  appId: string;
2466
2844
  userId: string;
2845
+ businessLineKey: string;
2467
2846
  idempotencyKey: string;
2468
2847
  serviceKey: string;
2469
- chargeMethodKey: string;
2848
+ priceListId: string;
2470
2849
  resourceId?: string;
2471
2850
  subjectKey: string;
2851
+ sourceService?: string;
2852
+ sourceType?: string;
2853
+ sourceId?: string;
2472
2854
  labels?: Record<string, string>;
2473
- pointsConsumed: number;
2474
- quantity?: number;
2475
- unit?: string;
2855
+ quantity: number;
2856
+ unit: string;
2857
+ meterUsage: Record<string, number>;
2858
+ meterMatchContext?: Record<string, Record<string, string>>;
2859
+ meterTierMatchUsage?: Record<string, number>;
2860
+ exchangeRate?: number;
2476
2861
  snapshot?: {
2477
2862
  priceListId?: string;
2478
2863
  usage?: Record<string, number>;
@@ -2482,7 +2867,7 @@ export type Api = {
2482
2867
  return: any;
2483
2868
  };
2484
2869
  };
2485
- list: {
2870
+ find: {
2486
2871
  /** 供 ai-server 等内部服务查询 billingUsageRecord */
2487
2872
  post: {
2488
2873
  body: {
@@ -2490,9 +2875,8 @@ export type Api = {
2490
2875
  userId?: string;
2491
2876
  serviceGroup?: "ai" | "platform" | "storage";
2492
2877
  serviceGroups?: "ai" | "platform" | "storage"[];
2493
- referenceId?: string;
2878
+ resourceId?: string;
2494
2879
  serviceKey?: string;
2495
- chargeMethodKey?: string;
2496
2880
  model?: string;
2497
2881
  subjectKeys?: string[];
2498
2882
  id?: string;
@@ -2519,12 +2903,12 @@ export type Api = {
2519
2903
  return: any;
2520
2904
  };
2521
2905
  };
2522
- 'by-reference': {
2523
- /** 按 referenceId 联合查询用量与积分流水 */
2906
+ 'by-resource': {
2907
+ /** 按 resourceId 联合查询用量与积分流水 */
2524
2908
  post: {
2525
2909
  body: {
2526
2910
  appId: string;
2527
- referenceId: string;
2911
+ resourceId: string;
2528
2912
  serviceKey?: string;
2529
2913
  };
2530
2914
  return: any;
@@ -2552,6 +2936,7 @@ export type Api = {
2552
2936
  operatorId: string;
2553
2937
  supplierId: string;
2554
2938
  profileId: string;
2939
+ profileName?: string;
2555
2940
  productLine: string;
2556
2941
  currency: "CNY" | "USD";
2557
2942
  plans: unknown[];
@@ -2588,6 +2973,19 @@ export type Api = {
2588
2973
  };
2589
2974
  };
2590
2975
  };
2976
+ billingCatalog: {
2977
+ list: {
2978
+ /** 服务 + 价目表 operation 列表(供 ai-server 等内部服务) */
2979
+ post: {
2980
+ body: {
2981
+ appId: string;
2982
+ billingProductLineKey?: "ai" | "storage" | "platform";
2983
+ group?: "ai" | "storage" | "platform";
2984
+ };
2985
+ return: any;
2986
+ };
2987
+ };
2988
+ };
2591
2989
  points: {
2592
2990
  'by-request-ids': {
2593
2991
  /** 供 ai-server 溯源:通过 requestId 列表查询 pointsHistory */
@@ -2694,6 +3092,12 @@ export interface ApiClient {
2694
3092
  id: string;
2695
3093
  }, config?: RequestConfig) => RequestBuilder<any>;
2696
3094
  };
3095
+ manageOptions: {
3096
+ /** 管理端表单与筛选用产品选项 */
3097
+ post: (body: {
3098
+ status?: "" | "active" | "archived";
3099
+ }, config?: RequestConfig) => RequestBuilder<any>;
3100
+ };
2697
3101
  updateSort: {
2698
3102
  /** 批量更新产品排序 */
2699
3103
  post: (body: {
@@ -2703,7 +3107,7 @@ export interface ApiClient {
2703
3107
  }[];
2704
3108
  }, config?: RequestConfig) => RequestBuilder<any>;
2705
3109
  };
2706
- listActive: {
3110
+ options: {
2707
3111
  /** 获取定价页面可用产品列表(公开) */
2708
3112
  post: (config?: RequestConfig) => RequestBuilder<any>;
2709
3113
  };
@@ -2759,16 +3163,13 @@ export interface ApiClient {
2759
3163
  id: string;
2760
3164
  }, config?: RequestConfig) => RequestBuilder<any>;
2761
3165
  };
2762
- listByProduct: {
2763
- /** 获取指定产品的所有可用价格方案 */
3166
+ options: {
3167
+ /** 按产品或免费体验筛选可用价格方案 */
2764
3168
  post: (body: {
2765
- productId: string;
3169
+ productId?: string;
3170
+ freeOnly?: boolean;
2766
3171
  }, config?: RequestConfig) => RequestBuilder<any>;
2767
3172
  };
2768
- listFreeActive: {
2769
- /** 获取当前应用可领取的免费体验价格方案 */
2770
- post: (config?: RequestConfig) => RequestBuilder<any>;
2771
- };
2772
3173
  };
2773
3174
  subscriptions: {
2774
3175
  create: {
@@ -2835,6 +3236,12 @@ export interface ApiClient {
2835
3236
  };
2836
3237
  }, config?: RequestConfig) => RequestBuilder<any>;
2837
3238
  };
3239
+ statistics: {
3240
+ /** 获取订阅概览页统计数据(状态计数、MRR、产品分布、最近订阅) */
3241
+ post: (body: {
3242
+ recentLimit?: number;
3243
+ }, config?: RequestConfig) => RequestBuilder<any>;
3244
+ };
2838
3245
  history: {
2839
3246
  /** 查询单个订阅的权益变化历史(管理端) */
2840
3247
  post: (body: {
@@ -3288,7 +3695,7 @@ export interface ApiClient {
3288
3695
  period?: "day" | "week" | "month" | "year";
3289
3696
  }, config?: RequestConfig) => RequestBuilder<any>;
3290
3697
  };
3291
- getTrendChart: {
3698
+ trendChart: {
3292
3699
  /** 获取积分变动趋势图表数据 */
3293
3700
  post: (body: {
3294
3701
  userId?: string;
@@ -3297,7 +3704,7 @@ export interface ApiClient {
3297
3704
  granularity: "minute" | "hour" | "day" | "month" | "year";
3298
3705
  }, config?: RequestConfig) => RequestBuilder<any>;
3299
3706
  };
3300
- getTypeDistributionChart: {
3707
+ typeDistributionChart: {
3301
3708
  /** 获取积分类型分布图表数据 */
3302
3709
  post: (body: {
3303
3710
  userId?: string;
@@ -3305,7 +3712,7 @@ export interface ApiClient {
3305
3712
  endTime?: string;
3306
3713
  }, config?: RequestConfig) => RequestBuilder<any>;
3307
3714
  };
3308
- getRankingChart: {
3715
+ rankingChart: {
3309
3716
  /** 获取用户积分排行榜 */
3310
3717
  post: (body: {
3311
3718
  type?: "earn" | "spend" | "reversal" | "clawback" | "adjust";
@@ -3604,11 +4011,11 @@ export interface ApiClient {
3604
4011
  cooldownHours?: number;
3605
4012
  }, config?: RequestConfig) => RequestBuilder<any>;
3606
4013
  };
3607
- getConfig: {
4014
+ findOne: {
3608
4015
  /** 获取当前预警配置 */
3609
4016
  post: (config?: RequestConfig) => RequestBuilder<any>;
3610
4017
  };
3611
- findAlerts: {
4018
+ find: {
3612
4019
  /** 分页查询预警记录 */
3613
4020
  post: (body: {
3614
4021
  where?: {
@@ -3647,24 +4054,33 @@ export interface ApiClient {
3647
4054
  };
3648
4055
  billingUsage: {
3649
4056
  charges: {
3650
- list: {
3651
- /** 查询 billingUsageRecord 全站扣费流水 */
4057
+ find: {
4058
+ /** 查询 billingUsageRecord 全站扣费明细 */
3652
4059
  post: (body: {
3653
- page?: number;
3654
- pageSize?: number;
3655
- userId?: string;
3656
- serviceGroup?: "ai" | "platform" | "storage";
3657
- serviceKey?: string;
3658
- chargeMethodKey?: string;
3659
- subjectKey?: string;
3660
- id?: string;
3661
- idempotencyKey?: string;
3662
- resourceId?: string;
3663
- startDate?: string;
3664
- endDate?: string;
4060
+ where?: {
4061
+ keyword?: string;
4062
+ userId?: string;
4063
+ serviceGroup?: "ai" | "platform" | "storage";
4064
+ businessLineKey?: string;
4065
+ billingProductLineKey?: string;
4066
+ serviceKey?: string;
4067
+ serviceKeys?: string[];
4068
+ meterKey?: string;
4069
+ priceListId?: string;
4070
+ pricingType?: "flat" | "tiered" | "meters";
4071
+ subjectKey?: string;
4072
+ id?: string;
4073
+ idempotencyKey?: string;
4074
+ resourceId?: string;
4075
+ status?: "pending" | "charged" | "failed" | "canceled";
4076
+ startDate?: string;
4077
+ endDate?: string;
4078
+ };
4079
+ page?: number;
4080
+ pageSize?: number;
3665
4081
  }, config?: RequestConfig) => RequestBuilder<any>;
3666
4082
  };
3667
- get: {
4083
+ findOne: {
3668
4084
  /** 按 ID 查询单条扣费记录(含 AI 扩展字段,供详情抽屉) */
3669
4085
  post: (body: {
3670
4086
  id: string;
@@ -3673,23 +4089,33 @@ export interface ApiClient {
3673
4089
  };
3674
4090
  consumption: {
3675
4091
  overview: {
3676
- /** 聚合 AI / 平台 / 存储积分消耗 */
4092
+ /** 聚合已入账扣费结果 */
3677
4093
  post: (body: {
3678
- userId?: string;
3679
- serviceGroup?: "ai" | "platform" | "storage";
3680
- serviceKey?: string;
3681
- startDate?: string;
3682
- endDate?: string;
4094
+ where?: {
4095
+ userId?: string;
4096
+ serviceGroup?: "ai" | "platform" | "storage";
4097
+ businessLineKey?: string;
4098
+ billingProductLineKey?: string;
4099
+ serviceKey?: string;
4100
+ serviceKeys?: string[];
4101
+ startDate?: string;
4102
+ endDate?: string;
4103
+ };
3683
4104
  }, config?: RequestConfig) => RequestBuilder<any>;
3684
4105
  };
3685
4106
  trend: {
3686
4107
  /** 按日聚合积分消耗趋势 */
3687
4108
  post: (body: {
3688
- userId?: string;
3689
- serviceGroup?: "ai" | "platform" | "storage";
3690
- serviceKey?: string;
3691
- startDate?: string;
3692
- endDate?: string;
4109
+ where?: {
4110
+ userId?: string;
4111
+ serviceGroup?: "ai" | "platform" | "storage";
4112
+ businessLineKey?: string;
4113
+ billingProductLineKey?: string;
4114
+ serviceKey?: string;
4115
+ serviceKeys?: string[];
4116
+ startDate?: string;
4117
+ endDate?: string;
4118
+ };
3693
4119
  limit?: number;
3694
4120
  }, config?: RequestConfig) => RequestBuilder<any>;
3695
4121
  };
@@ -3743,7 +4169,7 @@ export interface ApiClient {
3743
4169
  };
3744
4170
  }, config?: RequestConfig) => RequestBuilder<any>;
3745
4171
  };
3746
- detail: {
4172
+ findOne: {
3747
4173
  /** 管理端查询单个积分充值订单详情及操作时间线 */
3748
4174
  post: (body: {
3749
4175
  orderId: string;
@@ -3781,7 +4207,7 @@ export interface ApiClient {
3781
4207
  };
3782
4208
  };
3783
4209
  rechargePackage: {
3784
- list: {
4210
+ find: {
3785
4211
  /** 获取充值套餐列表(管理端) */
3786
4212
  post: (body: {
3787
4213
  includeDisabled?: boolean;
@@ -3867,7 +4293,7 @@ export interface ApiClient {
3867
4293
  remark: string;
3868
4294
  }, config?: RequestConfig) => RequestBuilder<any>;
3869
4295
  };
3870
- list: {
4296
+ find: {
3871
4297
  /** 查询退款记录列表 */
3872
4298
  post: (body: {
3873
4299
  page?: number;
@@ -3879,7 +4305,7 @@ export interface ApiClient {
3879
4305
  endDate?: string;
3880
4306
  }, config?: RequestConfig) => RequestBuilder<any>;
3881
4307
  };
3882
- detail: {
4308
+ findOne: {
3883
4309
  /** 查询单个退款单详情 */
3884
4310
  post: (body: {
3885
4311
  refundNo: string;
@@ -3904,7 +4330,7 @@ export interface ApiClient {
3904
4330
  };
3905
4331
  };
3906
4332
  serviceDefinition: {
3907
- list: {
4333
+ find: {
3908
4334
  /** 获取应用的所有服务定义 */
3909
4335
  post: (body: {
3910
4336
  page?: number;
@@ -3942,7 +4368,7 @@ export interface ApiClient {
3942
4368
  /** 上报服务用量,自动计费扣费 */
3943
4369
  post: (body: {
3944
4370
  serviceType: string;
3945
- chargeMethodKey?: string;
4371
+ priceListId?: string;
3946
4372
  metadata: Record<string, unknown>;
3947
4373
  idempotencyKey?: string;
3948
4374
  resourceId?: string;
@@ -3952,7 +4378,7 @@ export interface ApiClient {
3952
4378
  /** 按当前定价规则预估本次用量费用,不写入记录、不扣积分 */
3953
4379
  post: (body: {
3954
4380
  serviceType: string;
3955
- chargeMethodKey?: string;
4381
+ priceListId?: string;
3956
4382
  metadata: Record<string, unknown>;
3957
4383
  freeQuotaOverride?: number;
3958
4384
  }, config?: RequestConfig) => RequestBuilder<any>;
@@ -3976,66 +4402,69 @@ export interface ApiClient {
3976
4402
  idempotencyKey?: string;
3977
4403
  resourceId?: string;
3978
4404
  serviceKey?: string;
3979
- chargeMethodKey?: string;
3980
4405
  userId?: string;
3981
4406
  startDate?: string;
3982
4407
  endDate?: string;
3983
4408
  }, config?: RequestConfig) => RequestBuilder<any>;
3984
4409
  };
3985
4410
  };
3986
- servicePricing: {
3987
- overview: {
3988
- post: (config?: RequestConfig) => RequestBuilder<any>;
3989
- };
3990
- list: {
3991
- post: (body: {
3992
- serviceKey?: string;
3993
- }, config?: RequestConfig) => RequestBuilder<any>;
3994
- };
3995
- get: {
4411
+ priceList: {
4412
+ find: {
3996
4413
  post: (body: {
3997
- serviceKey: string;
3998
- chargeMethodKey: string;
4414
+ where?: {
4415
+ priceListId?: string;
4416
+ businessLineKey?: string;
4417
+ billingProductLineKey?: string;
4418
+ serviceKey?: string;
4419
+ meterKey?: string;
4420
+ pricingType?: "flat" | "tiered" | "meters";
4421
+ keyword?: string;
4422
+ enabled?: boolean;
4423
+ };
4424
+ page?: number;
4425
+ pageSize?: number;
3999
4426
  }, config?: RequestConfig) => RequestBuilder<any>;
4000
4427
  };
4001
- upsert: {
4428
+ findOne: {
4002
4429
  post: (body: {
4003
- serviceKey: string;
4004
- chargeMethodKey: string;
4005
- originalPrice: number;
4006
- sellPrice: number;
4007
- enabled?: boolean;
4430
+ id: string;
4008
4431
  }, config?: RequestConfig) => RequestBuilder<any>;
4009
4432
  };
4010
- importLegacy: {
4011
- /** 幂等:将旧 pricingRule 导入 billingServicePricing */
4012
- post: (config?: RequestConfig) => RequestBuilder<any>;
4013
- };
4014
- };
4015
- priceList: {
4016
- list: {
4433
+ options: {
4434
+ /** 筛选项、绑价表单 Select 用价目表下拉 */
4017
4435
  post: (body: {
4436
+ businessLineKey?: string;
4437
+ billingProductLineKey?: string;
4018
4438
  serviceKey?: string;
4019
- chargeMethodKey?: string;
4020
- pricingType?: "flat" | "tiered" | "dimensions";
4439
+ pricingType?: "flat" | "tiered" | "meters";
4021
4440
  enabled?: boolean;
4022
- page?: number;
4023
- pageSize?: number;
4024
4441
  }, config?: RequestConfig) => RequestBuilder<any>;
4025
4442
  };
4026
- get: {
4443
+ previewSchema: {
4444
+ /** 由所选计费项生成填价表单结构 */
4027
4445
  post: (body: {
4028
- id: string;
4446
+ businessLineKey: string;
4447
+ serviceKey: string;
4448
+ meterRefs: {
4449
+ businessLineKey: string;
4450
+ serviceKey: string;
4451
+ meterKey: string;
4452
+ }[];
4029
4453
  }, config?: RequestConfig) => RequestBuilder<any>;
4030
4454
  };
4031
4455
  create: {
4032
4456
  post: (body: {
4457
+ businessLineKey: string;
4033
4458
  serviceKey: string;
4034
- chargeMethodKey: string;
4459
+ meterRefs?: {
4460
+ businessLineKey: string;
4461
+ serviceKey: string;
4462
+ meterKey: string;
4463
+ }[];
4035
4464
  name: string;
4036
4465
  currency?: "CNY" | "USD";
4037
4466
  enabled?: boolean;
4038
- pricing: {
4467
+ pricingValues: {
4039
4468
  type: "flat";
4040
4469
  originalPrice: number;
4041
4470
  sellPrice: number;
@@ -4043,7 +4472,7 @@ export interface ApiClient {
4043
4472
  type: "tiered";
4044
4473
  priceStructure: "flat" | "segmented";
4045
4474
  tiers: {
4046
- tierKey?: string;
4475
+ match?: Record<string, string>;
4047
4476
  tierRangeMode?: "at_most" | "at_least" | "between";
4048
4477
  minTokens?: number;
4049
4478
  maxTokens?: number;
@@ -4054,20 +4483,19 @@ export interface ApiClient {
4054
4483
  billingEnabled: boolean;
4055
4484
  }[];
4056
4485
  } | {
4057
- type: "dimensions";
4058
- dimensions: {
4059
- dimensionKey: string;
4060
- unit: string;
4061
- priceStructure?: "flat" | "segmented";
4486
+ type: "meters";
4487
+ meters: {
4488
+ componentKey: string;
4489
+ businessLineKey: string;
4490
+ serviceKey: string;
4491
+ meterKey: string;
4062
4492
  tiers: {
4063
- tierKey?: string;
4493
+ match?: Record<string, string>;
4064
4494
  tierRangeMode?: "at_most" | "at_least" | "between";
4065
4495
  minTokens?: number;
4066
4496
  maxTokens?: number;
4067
4497
  minInclusive?: boolean;
4068
4498
  maxInclusive?: boolean;
4069
- minOutputTokens?: number;
4070
- maxOutputTokens?: number;
4071
4499
  originalFenPerUnit: number;
4072
4500
  sellFenPerUnit: number;
4073
4501
  billingEnabled: boolean;
@@ -4082,7 +4510,12 @@ export interface ApiClient {
4082
4510
  name?: string;
4083
4511
  currency?: "CNY" | "USD";
4084
4512
  enabled?: boolean;
4085
- pricing?: {
4513
+ meterRefs?: {
4514
+ businessLineKey: string;
4515
+ serviceKey: string;
4516
+ meterKey: string;
4517
+ }[];
4518
+ pricingValues?: {
4086
4519
  type: "flat";
4087
4520
  originalPrice: number;
4088
4521
  sellPrice: number;
@@ -4090,7 +4523,7 @@ export interface ApiClient {
4090
4523
  type: "tiered";
4091
4524
  priceStructure: "flat" | "segmented";
4092
4525
  tiers: {
4093
- tierKey?: string;
4526
+ match?: Record<string, string>;
4094
4527
  tierRangeMode?: "at_most" | "at_least" | "between";
4095
4528
  minTokens?: number;
4096
4529
  maxTokens?: number;
@@ -4101,20 +4534,19 @@ export interface ApiClient {
4101
4534
  billingEnabled: boolean;
4102
4535
  }[];
4103
4536
  } | {
4104
- type: "dimensions";
4105
- dimensions: {
4106
- dimensionKey: string;
4107
- unit: string;
4108
- priceStructure?: "flat" | "segmented";
4537
+ type: "meters";
4538
+ meters: {
4539
+ componentKey: string;
4540
+ businessLineKey: string;
4541
+ serviceKey: string;
4542
+ meterKey: string;
4109
4543
  tiers: {
4110
- tierKey?: string;
4544
+ match?: Record<string, string>;
4111
4545
  tierRangeMode?: "at_most" | "at_least" | "between";
4112
4546
  minTokens?: number;
4113
4547
  maxTokens?: number;
4114
4548
  minInclusive?: boolean;
4115
4549
  maxInclusive?: boolean;
4116
- minOutputTokens?: number;
4117
- maxOutputTokens?: number;
4118
4550
  originalFenPerUnit: number;
4119
4551
  sellFenPerUnit: number;
4120
4552
  billingEnabled: boolean;
@@ -4130,12 +4562,15 @@ export interface ApiClient {
4130
4562
  };
4131
4563
  };
4132
4564
  priceBinding: {
4133
- list: {
4565
+ find: {
4134
4566
  post: (body: {
4135
- subjectType?: "model-profile";
4136
- subjectKey?: string;
4137
- serviceKey?: string;
4138
- enabled?: boolean;
4567
+ where?: {
4568
+ subjectType?: "model-profile";
4569
+ subjectKey?: string;
4570
+ serviceKey?: string;
4571
+ businessLineKey?: string;
4572
+ enabled?: boolean;
4573
+ };
4139
4574
  }, config?: RequestConfig) => RequestBuilder<any>;
4140
4575
  };
4141
4576
  upsert: {
@@ -4152,61 +4587,253 @@ export interface ApiClient {
4152
4587
  }, config?: RequestConfig) => RequestBuilder<any>;
4153
4588
  };
4154
4589
  };
4155
- billingMethodDefinition: {
4156
- list: {
4590
+ businessLine: {
4591
+ find: {
4157
4592
  post: (body: {
4158
- serviceKey?: string;
4593
+ where?: {
4594
+ keyword?: string;
4595
+ enabled?: boolean;
4596
+ };
4597
+ withStats?: boolean;
4159
4598
  page?: number;
4160
4599
  pageSize?: number;
4161
4600
  }, config?: RequestConfig) => RequestBuilder<any>;
4162
4601
  };
4163
- get: {
4602
+ findOne: {
4603
+ post: (body: {
4604
+ businessLineKey: string;
4605
+ }, config?: RequestConfig) => RequestBuilder<any>;
4606
+ };
4607
+ options: {
4608
+ /** 筛选项、表单 Select 用业务线下拉 */
4609
+ post: (body: {
4610
+ enabled?: boolean;
4611
+ }, config?: RequestConfig) => RequestBuilder<any>;
4612
+ };
4613
+ create: {
4614
+ post: (body: {
4615
+ businessLineKey: string;
4616
+ label: string;
4617
+ }, config?: RequestConfig) => RequestBuilder<any>;
4618
+ };
4619
+ update: {
4620
+ post: (body: {
4621
+ businessLineKey: string;
4622
+ label?: string;
4623
+ enabled?: boolean;
4624
+ }, config?: RequestConfig) => RequestBuilder<any>;
4625
+ };
4626
+ delete: {
4164
4627
  post: (body: {
4165
- chargeMethodKey: string;
4628
+ businessLineKey: string;
4629
+ }, config?: RequestConfig) => RequestBuilder<any>;
4630
+ };
4631
+ };
4632
+ billingProductLine: {
4633
+ find: {
4634
+ post: (body: {
4635
+ where?: {
4636
+ businessLineKey?: string;
4637
+ keyword?: string;
4638
+ enabled?: boolean;
4639
+ };
4640
+ withStats?: boolean;
4641
+ page?: number;
4642
+ pageSize?: number;
4643
+ }, config?: RequestConfig) => RequestBuilder<any>;
4644
+ };
4645
+ findOne: {
4646
+ post: (body: {
4647
+ productLineId: string;
4648
+ }, config?: RequestConfig) => RequestBuilder<any>;
4649
+ };
4650
+ options: {
4651
+ /** 筛选项、表单 Select 用产品线下拉 */
4652
+ post: (body: {
4653
+ businessLineKey?: string;
4654
+ enabled?: boolean;
4166
4655
  }, config?: RequestConfig) => RequestBuilder<any>;
4167
4656
  };
4168
4657
  create: {
4169
4658
  post: (body: {
4659
+ businessLineKey: string;
4660
+ productLineKey: string;
4661
+ label: string;
4662
+ }, config?: RequestConfig) => RequestBuilder<any>;
4663
+ };
4664
+ update: {
4665
+ post: (body: {
4666
+ productLineId: string;
4667
+ label?: string;
4668
+ enabled?: boolean;
4669
+ }, config?: RequestConfig) => RequestBuilder<any>;
4670
+ };
4671
+ delete: {
4672
+ post: (body: {
4673
+ productLineId: string;
4674
+ }, config?: RequestConfig) => RequestBuilder<any>;
4675
+ };
4676
+ };
4677
+ billingServiceCatalog: {
4678
+ service: {
4679
+ find: {
4680
+ post: (body: {
4681
+ where?: {
4682
+ businessLineKey?: string;
4683
+ billingProductLineKey?: string;
4684
+ productLine?: string;
4685
+ source?: "builtin" | "custom";
4686
+ serviceKey?: string;
4687
+ keyword?: string;
4688
+ enabled?: boolean;
4689
+ };
4690
+ page?: number;
4691
+ pageSize?: number;
4692
+ }, config?: RequestConfig) => RequestBuilder<any>;
4693
+ };
4694
+ options: {
4695
+ /** 筛选项、表单 Select 用服务下拉 */
4696
+ post: (body: {
4697
+ businessLineKey?: string;
4698
+ billingProductLineKey?: string;
4699
+ enabled?: boolean;
4700
+ }, config?: RequestConfig) => RequestBuilder<any>;
4701
+ };
4702
+ create: {
4703
+ post: (body: {
4704
+ businessLineKey: string;
4705
+ billingProductLineKey: string;
4706
+ serviceType: string;
4707
+ name: string;
4708
+ description?: string;
4709
+ dependencies?: {
4710
+ businessLineKey: string;
4711
+ billingProductLineKey: string;
4712
+ serviceKey: string;
4713
+ meterKeys?: string[];
4714
+ required?: boolean;
4715
+ }[];
4716
+ }, config?: RequestConfig) => RequestBuilder<any>;
4717
+ };
4718
+ update: {
4719
+ post: (body: {
4720
+ businessLineKey: string;
4721
+ serviceKey: string;
4722
+ label?: string;
4723
+ description?: string;
4724
+ billingProductLineKey?: string;
4725
+ dependencies?: {
4726
+ businessLineKey: string;
4727
+ billingProductLineKey: string;
4728
+ serviceKey: string;
4729
+ meterKeys?: string[];
4730
+ required?: boolean;
4731
+ }[];
4732
+ enabled?: boolean;
4733
+ }, config?: RequestConfig) => RequestBuilder<any>;
4734
+ };
4735
+ delete: {
4736
+ post: (body: {
4737
+ businessLineKey: string;
4738
+ serviceKey: string;
4739
+ }, config?: RequestConfig) => RequestBuilder<any>;
4740
+ };
4741
+ };
4742
+ runtime: {
4743
+ export: {
4744
+ /** 前端运行时缓存:服务 + 价目表 operation */
4745
+ post: (config?: RequestConfig) => RequestBuilder<any>;
4746
+ };
4747
+ };
4748
+ };
4749
+ billingMeter: {
4750
+ find: {
4751
+ post: (body: {
4752
+ where?: {
4753
+ businessLineKey?: string;
4754
+ billingProductLineKey?: string;
4755
+ serviceKey?: string;
4756
+ chargeMode?: "instant" | "settlement";
4757
+ source?: "builtin" | "custom";
4758
+ keyword?: string;
4759
+ enabled?: boolean;
4760
+ };
4761
+ page?: number;
4762
+ pageSize?: number;
4763
+ }, config?: RequestConfig) => RequestBuilder<any>;
4764
+ };
4765
+ options: {
4766
+ post: (body: {
4767
+ businessLineKey?: string;
4768
+ billingProductLineKey?: string;
4769
+ serviceKey?: string;
4770
+ enabled?: boolean;
4771
+ }, config?: RequestConfig) => RequestBuilder<any>;
4772
+ };
4773
+ create: {
4774
+ post: (body: {
4775
+ businessLineKey: string;
4170
4776
  serviceKey: string;
4171
- chargeMethodKey: string;
4777
+ meterKey: string;
4172
4778
  label: string;
4173
- billingUnit: string;
4174
- chargeKind: "instant" | "settlement";
4175
- settlementPeriod?: "second" | "minute" | "hour" | "day" | "month";
4176
- priceStructure?: "flat" | "segmented";
4177
- tiers?: {
4178
- tierKey?: string;
4179
- tierRangeMode?: "at_most" | "at_least" | "between";
4180
- minTokens?: number;
4181
- maxTokens?: number;
4182
- minInclusive?: boolean;
4183
- maxInclusive?: boolean;
4184
- originalFenPerUnit: number;
4185
- sellFenPerUnit: number;
4186
- billingEnabled: boolean;
4187
- }[];
4779
+ description?: string;
4780
+ chargeMode?: "instant" | "settlement";
4781
+ settlementPeriod?: "hour" | "day" | "month";
4782
+ pricingSchema?: {
4783
+ unitLabel: string;
4784
+ quantityScale?: number;
4785
+ priceStructure?: "flat" | "segmented" | "keyed";
4786
+ matchKeys?: {
4787
+ key: string;
4788
+ label: string;
4789
+ values: {
4790
+ value: string;
4791
+ label: string;
4792
+ }[];
4793
+ }[];
4794
+ tiers: {
4795
+ match?: Record<string, string>;
4796
+ tierRangeMode?: "at_most" | "at_least" | "between";
4797
+ minTokens?: number;
4798
+ maxTokens?: number;
4799
+ minInclusive?: boolean;
4800
+ maxInclusive?: boolean;
4801
+ }[];
4802
+ };
4188
4803
  enabled?: boolean;
4189
4804
  }, config?: RequestConfig) => RequestBuilder<any>;
4190
4805
  };
4191
4806
  update: {
4192
4807
  post: (body: {
4193
4808
  id: string;
4809
+ businessLineKey?: string;
4810
+ serviceKey?: string;
4811
+ meterKey?: string;
4194
4812
  label?: string;
4195
- billingUnit?: string;
4196
- chargeKind?: "instant" | "settlement";
4197
- settlementPeriod?: "second" | "minute" | "hour" | "day" | "month";
4198
- priceStructure?: "flat" | "segmented";
4199
- tiers?: {
4200
- tierKey?: string;
4201
- tierRangeMode?: "at_most" | "at_least" | "between";
4202
- minTokens?: number;
4203
- maxTokens?: number;
4204
- minInclusive?: boolean;
4205
- maxInclusive?: boolean;
4206
- originalFenPerUnit: number;
4207
- sellFenPerUnit: number;
4208
- billingEnabled: boolean;
4209
- }[];
4813
+ description?: string;
4814
+ chargeMode?: "instant" | "settlement";
4815
+ settlementPeriod?: "hour" | "day" | "month";
4816
+ pricingSchema?: {
4817
+ unitLabel: string;
4818
+ quantityScale?: number;
4819
+ priceStructure?: "flat" | "segmented" | "keyed";
4820
+ matchKeys?: {
4821
+ key: string;
4822
+ label: string;
4823
+ values: {
4824
+ value: string;
4825
+ label: string;
4826
+ }[];
4827
+ }[];
4828
+ tiers: {
4829
+ match?: Record<string, string>;
4830
+ tierRangeMode?: "at_most" | "at_least" | "between";
4831
+ minTokens?: number;
4832
+ maxTokens?: number;
4833
+ minInclusive?: boolean;
4834
+ maxInclusive?: boolean;
4835
+ }[];
4836
+ };
4210
4837
  enabled?: boolean;
4211
4838
  }, config?: RequestConfig) => RequestBuilder<any>;
4212
4839
  };
@@ -4216,6 +4843,77 @@ export interface ApiClient {
4216
4843
  }, config?: RequestConfig) => RequestBuilder<any>;
4217
4844
  };
4218
4845
  };
4846
+ billingMeterChargeItem: {
4847
+ find: {
4848
+ post: (body: {
4849
+ where?: {
4850
+ keyword?: string;
4851
+ userId?: string;
4852
+ businessLineKey?: string;
4853
+ billingProductLineKey?: string;
4854
+ serviceKey?: string;
4855
+ meterKey?: string;
4856
+ priceListId?: string;
4857
+ pricingType?: "flat" | "tiered" | "meters";
4858
+ resourceId?: string;
4859
+ subjectKey?: string;
4860
+ idempotencyKey?: string;
4861
+ billingUsageRecordId?: string;
4862
+ chargeMode?: "instant" | "settlement";
4863
+ status?: "pending" | "accumulating" | "charged" | "failed" | "canceled";
4864
+ startDate?: string;
4865
+ endDate?: string;
4866
+ };
4867
+ page?: number;
4868
+ pageSize?: number;
4869
+ }, config?: RequestConfig) => RequestBuilder<any>;
4870
+ };
4871
+ overview: {
4872
+ post: (body: {
4873
+ where?: {
4874
+ keyword?: string;
4875
+ userId?: string;
4876
+ businessLineKey?: string;
4877
+ billingProductLineKey?: string;
4878
+ serviceKey?: string;
4879
+ meterKey?: string;
4880
+ priceListId?: string;
4881
+ pricingType?: "flat" | "tiered" | "meters";
4882
+ resourceId?: string;
4883
+ subjectKey?: string;
4884
+ idempotencyKey?: string;
4885
+ billingUsageRecordId?: string;
4886
+ chargeMode?: "instant" | "settlement";
4887
+ status?: "pending" | "accumulating" | "charged" | "failed" | "canceled";
4888
+ startDate?: string;
4889
+ endDate?: string;
4890
+ };
4891
+ }, config?: RequestConfig) => RequestBuilder<any>;
4892
+ };
4893
+ trend: {
4894
+ post: (body: {
4895
+ where?: {
4896
+ keyword?: string;
4897
+ userId?: string;
4898
+ businessLineKey?: string;
4899
+ billingProductLineKey?: string;
4900
+ serviceKey?: string;
4901
+ meterKey?: string;
4902
+ priceListId?: string;
4903
+ pricingType?: "flat" | "tiered" | "meters";
4904
+ resourceId?: string;
4905
+ subjectKey?: string;
4906
+ idempotencyKey?: string;
4907
+ billingUsageRecordId?: string;
4908
+ chargeMode?: "instant" | "settlement";
4909
+ status?: "pending" | "accumulating" | "charged" | "failed" | "canceled";
4910
+ startDate?: string;
4911
+ endDate?: string;
4912
+ };
4913
+ limit?: number;
4914
+ }, config?: RequestConfig) => RequestBuilder<any>;
4915
+ };
4916
+ };
4219
4917
  export: {
4220
4918
  recharge: {
4221
4919
  /** 导出充值订单记录为 CSV 格式 */
@@ -4282,7 +4980,7 @@ export interface ApiClient {
4282
4980
  date: string;
4283
4981
  }, config?: RequestConfig) => RequestBuilder<any>;
4284
4982
  };
4285
- list: {
4983
+ find: {
4286
4984
  /** 查询对账报告列表 */
4287
4985
  post: (body: {
4288
4986
  page?: number;
@@ -4292,7 +4990,7 @@ export interface ApiClient {
4292
4990
  endDate?: string;
4293
4991
  }, config?: RequestConfig) => RequestBuilder<any>;
4294
4992
  };
4295
- detail: {
4993
+ findOne: {
4296
4994
  /** 查询对账报告详情 */
4297
4995
  post: (body: {
4298
4996
  id: string;
@@ -4334,7 +5032,7 @@ export interface ApiClient {
4334
5032
  remark?: string;
4335
5033
  }, config?: RequestConfig) => RequestBuilder<any>;
4336
5034
  };
4337
- list: {
5035
+ find: {
4338
5036
  /** 查询发票申请列表 */
4339
5037
  post: (body: {
4340
5038
  page?: number;
@@ -4345,7 +5043,7 @@ export interface ApiClient {
4345
5043
  endDate?: string;
4346
5044
  }, config?: RequestConfig) => RequestBuilder<any>;
4347
5045
  };
4348
- detail: {
5046
+ findOne: {
4349
5047
  /** 查询发票详情 */
4350
5048
  post: (body: {
4351
5049
  invoiceNo: string;
@@ -4443,8 +5141,9 @@ export interface ApiClient {
4443
5141
  post: (body: {
4444
5142
  appId: string;
4445
5143
  userId: string;
5144
+ businessLineKey: string;
4446
5145
  serviceKey: string;
4447
- chargeMethodKey: string;
5146
+ priceListId: string;
4448
5147
  amount: number;
4449
5148
  freeQuotaOverride?: number;
4450
5149
  }, config?: RequestConfig) => RequestBuilder<any>;
@@ -4456,8 +5155,9 @@ export interface ApiClient {
4456
5155
  items: {
4457
5156
  key: string;
4458
5157
  userId: string;
5158
+ businessLineKey: string;
4459
5159
  serviceKey: string;
4460
- chargeMethodKey: string;
5160
+ priceListId?: string;
4461
5161
  amount: number;
4462
5162
  freeQuotaOverride?: number;
4463
5163
  }[];
@@ -4468,8 +5168,9 @@ export interface ApiClient {
4468
5168
  post: (body: {
4469
5169
  appId: string;
4470
5170
  userId: string;
5171
+ businessLineKey: string;
4471
5172
  serviceKey: string;
4472
- chargeMethodKey: string;
5173
+ priceListId?: string;
4473
5174
  amount: number;
4474
5175
  metadata?: Record<string, unknown>;
4475
5176
  idempotencyKey?: string;
@@ -4490,20 +5191,40 @@ export interface ApiClient {
4490
5191
  reversalIdempotencyKey?: string;
4491
5192
  }, config?: RequestConfig) => RequestBuilder<any>;
4492
5193
  };
5194
+ 'preview-meter-charge': {
5195
+ /** 供 ai-server 等根据价目表与 meter 用量计算积分 */
5196
+ post: (body: {
5197
+ appId: string;
5198
+ businessLineKey: string;
5199
+ serviceKey: string;
5200
+ priceListId?: string;
5201
+ meterUsage: Record<string, number>;
5202
+ meterMatchContext?: Record<string, Record<string, string>>;
5203
+ meterTierMatchUsage?: Record<string, number>;
5204
+ exchangeRate?: number;
5205
+ }, config?: RequestConfig) => RequestBuilder<any>;
5206
+ };
4493
5207
  'record-ai': {
4494
- /** 供 ai-server 计价后写入统一用量账本并扣积分 */
5208
+ /** 供 ai-server 传入 meter 用量,由计费引擎算价并扣积分 */
4495
5209
  post: (body: {
4496
5210
  appId: string;
4497
5211
  userId: string;
5212
+ businessLineKey: string;
4498
5213
  idempotencyKey: string;
4499
5214
  serviceKey: string;
4500
- chargeMethodKey: string;
5215
+ priceListId: string;
4501
5216
  resourceId?: string;
4502
5217
  subjectKey: string;
5218
+ sourceService?: string;
5219
+ sourceType?: string;
5220
+ sourceId?: string;
4503
5221
  labels?: Record<string, string>;
4504
- pointsConsumed: number;
4505
- quantity?: number;
4506
- unit?: string;
5222
+ quantity: number;
5223
+ unit: string;
5224
+ meterUsage: Record<string, number>;
5225
+ meterMatchContext?: Record<string, Record<string, string>>;
5226
+ meterTierMatchUsage?: Record<string, number>;
5227
+ exchangeRate?: number;
4507
5228
  snapshot?: {
4508
5229
  priceListId?: string;
4509
5230
  usage?: Record<string, number>;
@@ -4511,16 +5232,15 @@ export interface ApiClient {
4511
5232
  };
4512
5233
  }, config?: RequestConfig) => RequestBuilder<any>;
4513
5234
  };
4514
- list: {
5235
+ find: {
4515
5236
  /** 供 ai-server 等内部服务查询 billingUsageRecord */
4516
5237
  post: (body: {
4517
5238
  appId: string;
4518
5239
  userId?: string;
4519
5240
  serviceGroup?: "ai" | "platform" | "storage";
4520
5241
  serviceGroups?: "ai" | "platform" | "storage"[];
4521
- referenceId?: string;
5242
+ resourceId?: string;
4522
5243
  serviceKey?: string;
4523
- chargeMethodKey?: string;
4524
5244
  model?: string;
4525
5245
  subjectKeys?: string[];
4526
5246
  id?: string;
@@ -4542,11 +5262,11 @@ export interface ApiClient {
4542
5262
  timezone?: string;
4543
5263
  }, config?: RequestConfig) => RequestBuilder<any>;
4544
5264
  };
4545
- 'by-reference': {
4546
- /** 按 referenceId 联合查询用量与积分流水 */
5265
+ 'by-resource': {
5266
+ /** 按 resourceId 联合查询用量与积分流水 */
4547
5267
  post: (body: {
4548
5268
  appId: string;
4549
- referenceId: string;
5269
+ resourceId: string;
4550
5270
  serviceKey?: string;
4551
5271
  }, config?: RequestConfig) => RequestBuilder<any>;
4552
5272
  };
@@ -4568,6 +5288,7 @@ export interface ApiClient {
4568
5288
  operatorId: string;
4569
5289
  supplierId: string;
4570
5290
  profileId: string;
5291
+ profileName?: string;
4571
5292
  productLine: string;
4572
5293
  currency: "CNY" | "USD";
4573
5294
  plans: unknown[];
@@ -4593,6 +5314,16 @@ export interface ApiClient {
4593
5314
  }, config?: RequestConfig) => RequestBuilder<any>;
4594
5315
  };
4595
5316
  };
5317
+ billingCatalog: {
5318
+ list: {
5319
+ /** 服务 + 价目表 operation 列表(供 ai-server 等内部服务) */
5320
+ post: (body: {
5321
+ appId: string;
5322
+ billingProductLineKey?: "ai" | "storage" | "platform";
5323
+ group?: "ai" | "storage" | "platform";
5324
+ }, config?: RequestConfig) => RequestBuilder<any>;
5325
+ };
5326
+ };
4596
5327
  points: {
4597
5328
  'by-request-ids': {
4598
5329
  /** 供 ai-server 溯源:通过 requestId 列表查询 pointsHistory */