Skip to content

document: 書類ビュー (docview/openview/statusview) 取得サブコマンドを追加#27

Merged
buty4649 merged 1 commit intomainfrom
worktree-documents-html-views
Apr 17, 2026
Merged

document: 書類ビュー (docview/openview/statusview) 取得サブコマンドを追加#27
buty4649 merged 1 commit intomainfrom
worktree-documents-html-views

Conversation

@buty4649
Copy link
Copy Markdown
Contributor

Summary

  • `xp document docview` (GET /api/v1/documents/docview) — 新規書類・関連書類作成用 HTML ビュー取得
  • `xp document docview-upload` (POST /multiapi/v1/documents/docview) — 事前入力値・添付ファイル付き HTML ビュー取得 (multipart)
  • `xp document openview` (GET /api/v1/documents/{docid}/openview) — 書類表示 HTML 取得
  • `xp document statusview` (GET /api/v1/documents/{docid}/statusview) — 承認進捗状況 HTML 取得

内部実装として、バイナリレスポンス取得の共通ヘルパー `downloadBytes` を導入し、既存の `DownloadPDF` もそれを使うよう整理。

Test plan

  • `go test -race ./...` 通過
  • `xp document docview --form-code XXXX --route-code ""` でHTMLがダウンロードされる
  • `xp document openview ` / `statusview ` でHTMLがダウンロードされる
  • `xp document docview-upload --form-code XXXX --route-code "" --datas @data.json --file ./sample.txt` で事前入力・添付付きHTMLがダウンロードされる

refs #25

🤖 Generated with Claude Code

- `xp document docview` (GET /api/v1/documents/docview) 新規書類作成用HTMLビュー取得
- `xp document docview-upload` (POST /multiapi/v1/documents/docview) 事前入力値・添付ファイル付きでHTMLビューを取得 (multipart)
- `xp document openview` (GET /api/v1/documents/{docid}/openview) 書類表示HTML取得
- `xp document statusview` (GET /api/v1/documents/{docid}/statusview) 承認進捗状況HTML取得
- HTMLダウンロード共通ヘルパー downloadBytes を追加し、既存 DownloadPDF も整理
- 対応する schema JSON (document.docview / document.docview.upload / document.openview / document.statusview) を同梱
@buty4649 buty4649 self-assigned this Apr 17, 2026
@buty4649 buty4649 enabled auto-merge (squash) April 17, 2026 07:59
@buty4649 buty4649 merged commit 5f86260 into main Apr 17, 2026
2 checks passed
@buty4649 buty4649 deleted the worktree-documents-html-views branch April 17, 2026 07:59
@pepabo-pr-maker pepabo-pr-maker bot mentioned this pull request Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant