@things-factory/integration-anthropic 0.0.0-stage → 10.1.241
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/dist-server/engine/connector/anthropic-admin-client.d.ts +28 -0
- package/dist-server/engine/connector/anthropic-admin-client.js +51 -0
- package/dist-server/engine/connector/anthropic-admin-client.js.map +1 -0
- package/dist-server/engine/connector/anthropic-admin-connector.d.ts +19 -0
- package/dist-server/engine/connector/anthropic-admin-connector.js +39 -0
- package/dist-server/engine/connector/anthropic-admin-connector.js.map +1 -0
- package/dist-server/engine/connector/index.d.ts +1 -0
- package/dist-server/engine/connector/index.js +4 -0
- package/dist-server/engine/connector/index.js.map +1 -0
- package/dist-server/engine/index.d.ts +2 -0
- package/dist-server/engine/index.js +5 -0
- package/dist-server/engine/index.js.map +1 -0
- package/dist-server/engine/task/anthropic-cost-report.d.ts +18 -0
- package/dist-server/engine/task/anthropic-cost-report.js +54 -0
- package/dist-server/engine/task/anthropic-cost-report.js.map +1 -0
- package/dist-server/engine/task/index.d.ts +1 -0
- package/dist-server/engine/task/index.js +4 -0
- package/dist-server/engine/task/index.js.map +1 -0
- package/dist-server/index.d.ts +3 -0
- package/dist-server/index.js +9 -0
- package/dist-server/index.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/helps/integration/connector/anthropic-admin-connector.md +8 -0
- package/helps/integration/task/anthropic-cost-report.md +20 -0
- package/package.json +27 -4
- package/things-factory.config.js +1 -0
- package/translations/en.json +4 -0
- package/translations/es.json +4 -0
- package/translations/ja.json +4 -0
- package/translations/ko.json +4 -0
- package/translations/ms.json +4 -0
- package/translations/zh.json +4 -0
- package/README.md +0 -3
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Anthropic Admin API 커넥터
|
|
2
|
+
|
|
3
|
+
Anthropic 조직(Claude Console)의 Admin API 에 연결합니다.
|
|
4
|
+
|
|
5
|
+
- **Admin API 키** — Claude Console › Settings › Admin keys 에서 만든 `sk-ant-admin...` 키. 일반 API 키(워크스페이스 키)는 거절됩니다. 조직 관리자만 만들 수 있습니다.
|
|
6
|
+
- **엔드포인트** — 비워 두면 `https://api.anthropic.com`.
|
|
7
|
+
|
|
8
|
+
claude.ai 의 Team · Pro 구독 요금은 이 API 에 나오지 않습니다 — API 사용 비용만 읽습니다.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Anthropic 월 비용
|
|
2
|
+
|
|
3
|
+
커넥션의 조직이 API 사용에 쓴 비용을 이번 달 전까지 닫힌 달마다, 모델별로 읽습니다(cost_report). 달러로 돌려줍니다.
|
|
4
|
+
|
|
5
|
+
## 파라미터
|
|
6
|
+
|
|
7
|
+
- `months` — 읽을 달 수(1~12, 비우면 3)
|
|
8
|
+
|
|
9
|
+
## 결과
|
|
10
|
+
|
|
11
|
+
- `vendorAccount` — 조직 id(구독 계정의 「계정 식별자」와 맞춘다)
|
|
12
|
+
- `vendorName` — 조직 이름
|
|
13
|
+
- `currency` — `USD`
|
|
14
|
+
- `months` — 달마다 `month`(YYYY-MM)와 `lines`(`label` 모델 · `amount` 달러)
|
|
15
|
+
|
|
16
|
+
다음 단계에서 `local-graphql-mutate` 로 `syncSaasCosts(costs: $costs)` 를 부르면 구독 서비스의 청구 기록이 쓰입니다.
|
|
17
|
+
|
|
18
|
+
## 다음 단계
|
|
19
|
+
|
|
20
|
+
`local-graphql-mutate` — mutation `mutation ($costs: [SaasCostsInput!]!) { syncSaasCosts(costs: $costs) { results { accountName written kept } unmatched } }`, 변수 `costs` → 이 단계 이름. 계정 식별자가 맞는 구독 계정이 없으면 `unmatched` 에 그 id 가 나온다 — 그 값을 계정 식별자에 적는다.
|
package/package.json
CHANGED
|
@@ -1,6 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/integration-anthropic",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "10.1.241",
|
|
4
|
+
"main": "dist-server/index.js",
|
|
5
|
+
"things-factory": true,
|
|
6
|
+
"author": "heartyoh <heartyoh@hatiolab.com>",
|
|
7
|
+
"description": "Anthropic Admin API connector for Things-Factory integration engine - what an organization's API usage cost, month by month.",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public",
|
|
11
|
+
"@things-factory:registry": "https://registry.npmjs.org"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/hatiolab/things-factory.git",
|
|
16
|
+
"directory": "packages/integration-anthropic"
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "tsc --p tsconfig.json",
|
|
20
|
+
"build:server": "npm run clean:server && tsc",
|
|
21
|
+
"clean:server": "rm -rf dist-server",
|
|
22
|
+
"clean": "npm run clean:server",
|
|
23
|
+
"test": "node --test test/*.test.mjs"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@things-factory/integration-base": "^10.1.241"
|
|
27
|
+
},
|
|
28
|
+
"gitHead": "d7fe2e1a1eb7c02cb21b897da26d385df014f908"
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default {}
|
package/README.md
DELETED