@wport/cli 0.9.3 → 0.10.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/CHANGELOG.md CHANGED
@@ -5,6 +5,74 @@
5
5
 
6
6
  ---
7
7
 
8
+ ## [0.10.1] — 2026-09-10
9
+
10
+ ### Changed
11
+
12
+ - **`enterprise usage` 輸出標明計量語意**:月配額行改為 `X / Y calls used`,並加一行說明
13
+ 「所有認證通過的 API 呼叫計數;`whoami`/`usage` 與 key rotate 豁免」——對齊後端 2026-09-10
14
+ 上線的 quota PRD 對齊(talent#233:guard 層 per-request 計數,原先只計職缺建立)。
15
+ 純顯示變更,wire 契約與 exit code 不變。(0.10.0 已以 `next` tag 發布、不可覆寫,故以
16
+ patch 版收納本變更。)
17
+
18
+ ## [0.10.0] — 2026-09-09
19
+
20
+ ### Added
21
+
22
+ - **`wport enterprise company replace <section>`(新指令)**:整段取代四個公司內容區塊
23
+ (`pain-points` / `awards` / `milestones` / `qa-items`)。輸入為 `{ "items": [...] }`,
24
+ 走 `--file <path>` 或 `-`(stdin)。
25
+
26
+ **這是整段取代,不是 add/update:未列於輸入中的既有項目會被刪除。** 因此指令會在每次寫入前
27
+ 先 `GET /company`、比對 `enc_id`,只要有任何項目將被移除(包含「非空但漏掉一筆」,
28
+ 不只 `items: []`),就列出即將刪除的 `enc_id` 與摘要並要求 `--confirm`,否則 exit 2。
29
+
30
+ 寫入使用同一次 preflight 取得的 `block_revisions.<block>` 作為 `If-Match` 樂觀鎖;
31
+ 遇 409(stale revision)**不自動重送**,改為重新 `GET` 顯示差異後 exit 2。
32
+ 預設帶 `Idempotency-Key`(`randomUUID()`),可用 `--idempotency-key` 覆寫。
33
+
34
+ - **`company update` 的 `basic` 節新增六個可寫欄位**:`representative_name`、
35
+ `establishment_date`、`directors`(`string[]`),以及三個公開頁顯示開關
36
+ `is_representative_visible` / `is_establishment_date_visible` / `is_directors_visible`
37
+ (皆 `0|1`,**未設時預設 0 = 隱藏**)。
38
+
39
+ `is_uniform_number_visible` **刻意不開放**(保留在 `FORBIDDEN_FIELDS`),
40
+ `uniform_number` 維持唯讀。
41
+
42
+ - **`company update` 的 `descriptions` 節新增 `video_links`**(≤3,YouTube / Vimeo)。
43
+ 與同節其他三個欄位不同:帶 `video_links` 時會自動附上 `If-Match`(樂觀鎖),
44
+ 且與 `description` 在後端是**同一筆原子寫入**。移除既有影片(含漏一部與 `video_links: []`
45
+ 清空)套用與 `replace` **相同的** `--confirm` 規則;428/409 不自動重送。
46
+
47
+ 只送 `video_links` 而不送 `description` 時,CLI 會以 preflight 讀到的現值回填,
48
+ 不會清空既有的公司介紹。
49
+
50
+ - **`company view` 表格模式新增區塊摘要**(五個區塊各自的筆數)。
51
+ `block_revisions` **只在 `--output json` 顯示**——它是 opaque token,不是人類可讀的版本號。
52
+
53
+ - **可程式判讀的錯誤碼**:新增五個 `error_code` 的專屬訊息裝飾
54
+ (`profile_revision_required` / `profile_revision_conflict` / `block_max_exceeded` /
55
+ `block_item_forbidden` / `unsupported_video_provider`)。分流一律依 `error_code`
56
+ 優先於 HTTP status,**不解析多語系 `message`**。
57
+
58
+ - **enterprise 線導入 OpenAPI codegen**:契約凍結自 talent repo commit
59
+ `4cf6ca74b4f50dc256b2536b5101c2b9fed3c422`,產物與 source manifest 進版控,
60
+ CI 新增 `enterprise schema drift gate`(驗 sha256 → 驗 prefix → 跑 codegen →
61
+ `git diff --exit-code`)。新指令的型別取自 `components['schemas']`。
62
+
63
+ ### Changed
64
+
65
+ - 依賴 bump:`@wport/core` `^0.2.0` → `^0.3.0`(0.x 的 caret 不跨 minor,需顯式升)。
66
+ core 0.3.0 為純 additive(新增 `enterprisePut` 與 enterprise schema 型別匯出),
67
+ 無移除任何既有匯出,CLI 既有行為不受影響。
68
+
69
+ ### ⚠️ 後端相依
70
+
71
+ 本版新增的指令與欄位需要 talent 後端 **2026-09-09 或之後的版本**
72
+ (PR hotfire-digital/W101-TalentSearchHub#232,已於該日上正式站)。
73
+ 對更舊的後端使用新欄位會因 `forbidNonWhitelisted` 被回 400。
74
+ 既有指令不受影響。
75
+
8
76
  ## [0.9.3] — 2026-08-26
9
77
 
10
78
  ### Changed
package/README.md CHANGED
@@ -85,6 +85,26 @@ wport enterprise company view
85
85
  wport enterprise company update --file company-patch.json
86
86
  wport enterprise company logo upload ./logo.png
87
87
 
88
+ # `basic` section (via company update) also accepts: representative_name, establishment_date,
89
+ # directors (string[]), and their three display toggles is_representative_visible /
90
+ # is_establishment_date_visible / is_directors_visible (all default to 0 = hidden when unset).
91
+ # is_uniform_number_visible is intentionally NOT supported.
92
+
93
+ # `descriptions` section (via company update) also accepts video_links (<=3, YouTube/Vimeo URLs).
94
+ # Unlike the other three description fields, video_links is optimistic-locked: it is written
95
+ # atomically with `description` using an If-Match derived from your latest `company view`
96
+ # (handled automatically — no flag needed). Removing any existing video (a non-empty submission
97
+ # that drops one, or `video_links: []` to clear all) requires --confirm; a stale revision (409)
98
+ # is never auto-retried — re-run `company view` and retry.
99
+ wport enterprise company update --file company-video-links.json --confirm
100
+
101
+ # Replace an entire profile block (full replacement — items not listed are deleted;
102
+ # any deletion needs --confirm, whether from a non-empty submission or an empty one)
103
+ wport enterprise company replace pain-points --file pain-points.json --confirm
104
+ wport enterprise company replace awards --file awards.json
105
+ wport enterprise company replace milestones --file milestones.json
106
+ wport enterprise company replace qa-items --file qa-items.json
107
+
88
108
  # Talent pool: browse applicants and reply (no bulk export by design)
89
109
  wport enterprise talents list --tab applied
90
110
  wport enterprise talents view <enc_resume_id>
@@ -99,7 +119,7 @@ wport enterprise campaigns publish <enc_id>
99
119
  wport enterprise keys list
100
120
  wport enterprise keys rotate <enc_id> --reveal
101
121
 
102
- # Monthly quota + rate-limit headroom
122
+ # Monthly quota (all authenticated API calls) + rate-limit ceiling
103
123
  wport enterprise usage
104
124
 
105
125
  # Agent / CI friendly: no key on disk