gangtise-openapi-cli 0.40.1 → 0.41.1
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/README.md +188 -52
- package/dist/src/cli.js +260 -14
- package/dist/src/core/client.js +33 -8
- package/dist/src/core/driveUpload.js +29 -0
- package/dist/src/core/endpoints.js +226 -4
- package/dist/src/core/errors.js +5 -2
- package/dist/src/core/normalize.js +1 -1
- package/dist/src/version.js +1 -1
- package/gangtise-openapi/SKILL.md +71 -20
- package/gangtise-openapi/references/commands/alternative.md +14 -7
- package/gangtise-openapi/references/commands/bond.md +132 -0
- package/gangtise-openapi/references/commands/fundamental.md +3 -1
- package/gangtise-openapi/references/commands/indicator.md +2 -2
- package/gangtise-openapi/references/commands/insight.md +33 -5
- package/gangtise-openapi/references/commands/quote.md +7 -10
- package/gangtise-openapi/references/commands/reference-and-lookup.md +10 -1
- package/gangtise-openapi/references/commands/tool.md +35 -0
- package/gangtise-openapi/references/commands/vault.md +27 -1
- package/gangtise-openapi/references/errors.md +5 -5
- package/gangtise-openapi/references/examples.md +13 -9
- package/gangtise-openapi/references/fields.md +9 -7
- package/gangtise-openapi/references/response-schema.md +19 -5
- package/package.json +2 -2
|
@@ -20,7 +20,9 @@ CLI 自动处理 envelope:`{code, msg, data}` 信封会按 `code === "000000"`
|
|
|
20
20
|
|
|
21
21
|
| 命令 | data 结构 | 关键提取字段 |
|
|
22
22
|
|------|----------|------------|
|
|
23
|
-
| insight opinion list | `{list, total}` | `list[].
|
|
23
|
+
| insight opinion list | `{list, total}` | `list[].chiefOpinionId`(`detail` 用)/ `list[].title` / `list[].brief`(正文前 200 字)/ `list[].publishTime` / `list[].author{chiefId, chiefName, researchAreaList, brokerID, brokerName}`(机构点评类 `chiefId` / `chiefName` 为 `null`)/ `list[].securityList[]{securityCode, securityName}` / `list[].industryList[]{industryCode, industryName}` / `list[].conceptList[]{conceptId, conceptName}` / `list[].llmTagList` |
|
|
24
|
+
| insight opinion list --with-content | `{list, total}`(旧版结构) | 同上但**没有顶层 `title` / `brief`**;标题与正文在 `list[].contentList.title` / `list[].contentList.content`(对象,不是数组) |
|
|
25
|
+
| insight opinion detail | `{total, list}`;缺失时另有 `missingIds` / `unfetchedIds` / `unfetchedError` + `partial` | `list[]` 同 list 的字段 + `content`(正文全文) |
|
|
24
26
|
| insight summary list | `{list, total}` | `list[].summaryId` / `list[].title` / `list[].publishTime` |
|
|
25
27
|
| insight summary download | 文件路径(stdout) | — |
|
|
26
28
|
| insight pamirs-summary list | `{list, total}` | `list[].summaryId` / `list[].title` / `list[].brief` / `list[].summaryTime`(纪要生成时间)/ `list[].publishTime`(发布时间)/ `list[].securityList[]{securityCode, securityName}` / `list[].researchAreaList[]{researchAreaId, researchAreaName}` / `list[].conceptList[]{conceptId, conceptName}` / `list[].categoryList` / `list[].marketList`。⚠️ `conceptList` / `categoryList` / `marketList` 三个标签字段**稀疏,且是否有值随记录和查法而变**:不带筛选时经常整条为空,用 `--category` 或 `--market` 任一过滤时回填率明显更高(这两个字段绑定,一起有或一起没有)。所以**别拉全量再本地分组**(会漏记录),也**别据此断言某条记录没有该属性**(为空只说明这次没回填)。详见 `commands/insight.md` |
|
|
@@ -36,7 +38,8 @@ CLI 自动处理 envelope:`{code, msg, data}` 信封会按 `code === "000000"`
|
|
|
36
38
|
| insight announcement-hk download | 文件路径(stdout) | — |
|
|
37
39
|
| insight announcement-us list | `{list, total}` | `list[].announcementId` / `list[].title` / `list[].publishTime` / `list[].securityList[].securityCode` / `list[].primaryCategory.categoryName` / `list[].sourceName` |
|
|
38
40
|
| insight announcement-us download | 文件路径(stdout) | — |
|
|
39
|
-
| insight foreign-opinion list | `{list, total}` | `list[].foreignOpinionId` / `list[].titleTranslate` / `list[].publishTime` / `list[].publisher
|
|
41
|
+
| insight foreign-opinion list | `{list, total}` | `list[].foreignOpinionId`(`detail` 用)/ `list[].title` / `list[].titleTranslate` / `list[].brief` / `list[].briefTranslate` / `list[].publishTime` / `list[].region{regionCode, regionName}` / `list[].publisher{brokerId, brokerName}` / `list[].securityList[]{securityCode, securityName, rating, ratingChange, targetPrice, currency}` / `list[].industryList[]{industryId, industryName, rating, ratingChange}`;`--with-content` 另有顶层 `content` / `contentTranslate`、无 `brief` |
|
|
42
|
+
| insight foreign-opinion detail | 同 opinion detail | `list[]` 同 list 的字段 + `content`(原文)/ `contentTranslate`(中文译文) |
|
|
40
43
|
| insight independent-opinion list | `{list, total}` | `list[].independentOpinionId` / `list[].titleTranslate` / `list[].briefTranslate` / `list[].publishTime` / `list[].analyst.analystName` |
|
|
41
44
|
| insight independent-opinion download | 文件路径(stdout) | — |
|
|
42
45
|
| insight official-account list | `{list, total}` | `list[].articleId` / `list[].accountName` / `list[].title` / `list[].publishTime` / `list[].articleCategory` / `list[].summary` / `list[].industryList[].industryName` / `list[].conceptList[].conceptName` / `list[].securityList[].securityCode` |
|
|
@@ -44,7 +47,9 @@ CLI 自动处理 envelope:`{code, msg, data}` 信封会按 `code === "000000"`
|
|
|
44
47
|
| insight qa list | `{list, total}` | `list[].source`(conference/interactive/survey)/ `list[].publishTime` / `list[].question` / `list[].answer` / `list[].member` / `list[].securityCode` / `list[].questionCategory[]` / `list[].answerImportant`(1/0) |
|
|
45
48
|
| insight performance-calendar list | `{list, total}` | `list[].performanceReportId`(下载用)/ `list[].securityCodeList[]`(A+H 可能多个)/ `list[].securityName` / `list[].category`(performanceForecast/performanceExpress/performanceAnnouncement)/ `list[].publishDate`(带 ` 00:00:00` 后缀)/ `list[].title` / `list[].hasAttachment`(`false` 则无法下载) |
|
|
46
49
|
| insight performance-calendar download | 文件路径(stdout,PDF) | — |
|
|
50
|
+
| insight highlight list | `{list, total}` | `list[].highlightId` / `list[].title`(会议名称)/ `list[].publishTime` / `list[].content`(**HTML 片段**:`<p>` 包裹、小标题 `<strong>`)/ `list[].securityList[]{securityCode, securityName}` / `list[].researchAreaList[]{researchAreaId, researchAreaName}` |
|
|
47
51
|
| tool file-parse | `{taskId, status:"pending", hint}`(提交);`--wait` 或 `file-parse-check` 就绪后 = 文件路径(stdout,ZIP) | ZIP 内 `file.md` + `images/`;未就绪时 check 输出 `{taskId, status:"pending"}`(退出码 0) |
|
|
52
|
+
| tool web-search | `{query, total, hints, list}` | `list[].title` / `list[].url` / `list[].site` / `list[].snippet` / `list[].content`(仅 `--include-content`,否则 `null`)/ `list[].contentTruncated` / `list[].publishTime`(判不出时 `null`)/ `list[].publishTimeSource` / `list[].indexTime`(索引时间,不等于发布时间)/ `list[].tier`(T0–T3)/ `list[].flags[]` / `list[].upgradedFrom[]`;`total = 0` 时看 `hints` |
|
|
48
53
|
| insight report-image list | `[{...}]`(扁平数组,无 `total`) | `[].chunkId`(下载用 `--chunk-id`)/ `[].title` / `[].sourceId` / `[].broker` / `[].category` / `[].page` / `[].totalPages` / `[].imageCaption[]` / `[].imageFootnote[]` / `[].pageContent`(该页 OCR/描述) |
|
|
49
54
|
| insight report-image download | 文件路径(stdout,JPEG) | — |
|
|
50
55
|
| reference securities-search | `{returnedCount, list}` | `list[].gtsCode` / `list[].gtsName` / `list[].category` / `list[].matchScore` / `list[].matchType` |
|
|
@@ -56,7 +61,7 @@ CLI 自动处理 envelope:`{code, msg, data}` 信封会按 `code === "000000"`
|
|
|
56
61
|
| reference concept-search | `{returnedCount, list}` | `list[].conceptId` / `list[].conceptName` / `list[].matchScore` |
|
|
57
62
|
| reference sector-search | `{returnedCount, list}` | `list[].sectorId` / `list[].sectorName` / `list[].hierarchy`(层级路径) / `list[].matchScore` |
|
|
58
63
|
| reference sector-constituents | `{total, list}` | `list[].gtsCode` / `list[].gtsName`;total=0 说明 sectorId 不对(先 sector-search 确认) |
|
|
59
|
-
| quote day-kline(及已下线的 day-kline-hk / day-kline-us / index-day-kline) | `{fieldList, list}` 或规范化后 `{list: [{...}]}` | `tradeDate` / `securityCode` / `open` / `close` / `pctChange` / `volume` / `amount`(全球指数为 `null`)/ `adjustFactor`(指数为 `null`,ETF
|
|
64
|
+
| quote day-kline(及已下线的 day-kline-hk / day-kline-us / index-day-kline) | `{fieldList, list}` 或规范化后 `{list: [{...}]}` | `tradeDate` / `securityCode` / `open` / `close` / `pctChange` / `volume` / `amount`(全球指数为 `null`)/ `adjustFactor`(指数为 `null`,ETF 有值);四者字段相同,均不含指数名称 |
|
|
60
65
|
| quote minute-kline | `{list: [{...}]}` | `tradeTime` / `open` / `close` / `volume` |
|
|
61
66
|
| quote realtime | `{fieldList, list, total}` 或规范化后 `{list: [{...}]}` | `securityCode` / `exchange` / `tradeDate` / `tradeTime` / `tradeStatus` / `open` / `high` / `low` / `latestPrice` / `preClose` / `change` / `pctChange` / `volume` / `amount` / `amplitude`(共 15 个,**无 `close`、无市值、无 `turnoverRate` / `volumeRatio`**;美股 `amount`、全球指数 `volume` / `amount` / `amplitude` 为 `null`) |
|
|
62
67
|
| quote fund-flow | `{fieldList, list, total}` 列式 → 规范化后 `{list: [{...}], total}` 宽表 | `securityCode` / `tradeDate` + 请求的字段(`mainNetInflow` / `largeInflow` / `xlargeOutflow` / …) |
|
|
@@ -76,6 +81,13 @@ CLI 自动处理 envelope:`{code, msg, data}` 信封会按 `code === "000000"`
|
|
|
76
81
|
| ai viewpoint-debate | 同 earnings-review | — |
|
|
77
82
|
| vault drive-list | `{list, total}` | `list[].fileId`(下载用 `--file-id`)/ `list[].title` / `list[].fileType` / `list[].uploadTime` |
|
|
78
83
|
| vault drive-download | 文件路径(stdout) | — |
|
|
84
|
+
| vault drive-folder-list | `{folderTotal, folderList, fileTotal, fileList}` | `folderList[]{folderId, parentId, folderName, spaceType, createTime}` / `fileList[]{fileId, title, fileSize, createTime}`;只含直接下级 |
|
|
85
|
+
| vault drive-upload | `{fileId, title, folderId, spaceType, fileSize}` | `fileId`(后续重命名 / 移动 / 删除用) |
|
|
86
|
+
| vault drive-create-folder | `{folderId, parentId, folderName, spaceType, createTime}` | `folderId` |
|
|
87
|
+
| vault drive-rename | `{id, name}` | — |
|
|
88
|
+
| vault drive-move-folder / drive-delete-folder | `{folderId, parentId}` / `{folderId}` | — |
|
|
89
|
+
| vault drive-copy | `{successList, failList}` | `successList[]{fileId, newFileId}`(`newFileId` 是另一空间里副本的 ID);`failList[]{fileId, failReason}`,非空时 `partial` + 退出码 3 |
|
|
90
|
+
| vault drive-move-file / drive-delete-file | `{successList, failList}` | `successList[]` 为文件 ID;`failList[]{fileId, failReason}`,非空时 `partial` + 退出码 3 |
|
|
79
91
|
| vault record-list | `{list, total}` | `list[].recordId` / `list[].title` / `list[].category` / `list[].createTime` / `list[].recordDuration` |
|
|
80
92
|
| vault record-download | 文件路径(stdout) | — |
|
|
81
93
|
| vault my-conference-list | `{list, total}` | `list[].conferenceId` / `list[].title` / `list[].category` / `list[].institution.institutionName` / `list[].publishTime` |
|
|
@@ -89,8 +101,10 @@ CLI 自动处理 envelope:`{code, msg, data}` 信封会按 `code === "000000"`
|
|
|
89
101
|
| vault stock-pool-delete | `{successList, failList}` | 同上,但键是 `failList[].poolId`;删不存在的池算幂等成功,计入 `successList` |
|
|
90
102
|
| alternative edb-search | `{list: [...]}` 指标列表 | `indicatorId` / `indicatorName` / `dataSource` / `frequency` / `unit` |
|
|
91
103
|
| alternative edb-data | 列表,每行 `{date, <indicatorId>: value, ...}` 宽表 | `date` + 每个 `--indicator-id` 一列(该日指标值) |
|
|
92
|
-
| alternative concept-info | `{conceptId, conceptName, ...}`(单对象,**非列表**) | `conceptName` / `definition` / `investmentLogic` / `industrySpace` / `competitiveLandscape
|
|
93
|
-
| alternative concept-securities | `{conceptId, conceptName, securityCount, securityDetail}`(单对象,分组) | `securityCount` / `securityDetail[].groupName` / `securityDetail[].securityList[].securityCode` / `.securityName` / `.isKey` / `.inclusionReason
|
|
104
|
+
| alternative concept-info | `{conceptId, conceptName, ...}`(单对象,**非列表**) | `conceptName` / `definition` / `investmentLogic` / `industrySpace` / `competitiveLandscape`;**`keyEvents[].date` / `keyEvents[].content` 仅 `--full`**;文本字段未配置为 `null` |
|
|
105
|
+
| alternative concept-securities | `{conceptId, conceptName, securityCount, securityDetail}`(单对象,分组) | `securityCount` / `securityDetail[].groupName` / `securityDetail[].securityList[].securityCode` / `.securityName` / `.isKey` / `.inclusionReason`(**这两列仅 `--full`**);无成分股时 `securityDetail` 为 `null` |
|
|
106
|
+
| bond basic-info / issuer-info / daily-quote / valuation / cash-flow / issuance-detail / rating-overview / rating-change / issuer-rating-change / issuance-plan / exercise-notice | 列式 `{fieldList, list, total}` → 规范化后 `{list: [{...}], total}` | 字段名按 `--field` 或全部;每条命令的默认列恒在最前(如 `securityCode` + `tradeDate`、`issuerName`、`issueDate`),见 `commands/bond.md` |
|
|
107
|
+
| bond announcement | 列式 `{fieldList, list}`(**无 `total`**)→ 规范化后为行数组 | `announcementDate` / `securityCode` + 其余字段;翻过末页为 `[]` |
|
|
94
108
|
| indicator search | `[{indicatorCode, indicatorName, ...}]`(列表) | `indicatorCode` / `indicatorName` / `description` / `scopeList[].market` / `scopeList[].securityType` / `scopeList[].usageRestriction`(接口限制,`null`=无限制) / `parameterList[].paramKey`(**参数名以此为准**) / `.enumList[].value` / `score` |
|
|
95
109
|
| indicator cross-section | CLI 拍平为宽表 `{list, total}` | `list[].security` / `list[].name` + 每个指标名一列;**单日多指标 × 多证券**,每行一只证券。**没有 `date` 列**(查询日期挂在每个指标的参数上,各列可为不同日期);原始响应的 `values` 为 `[证券][指标]` |
|
|
96
110
|
| indicator time-series | CLI 拍平为宽表 `{list, total}` | `list[].date` + 序列列:单证券时列=各指标、多证券时列=各证券;每行一个日期。原始响应 `values` 仍为 `[序列][日期]` |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gangtise-openapi-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.1",
|
|
4
4
|
"description": "CLI for Gangtise OpenAPI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"commander": "^14.0.0",
|
|
40
|
-
"undici": "^7.
|
|
40
|
+
"undici": "^7.29.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "^20.19.43",
|