Skip to content

Generate Deal pipeline create and update methods - #21

Merged
haegwan merged 1 commit into
mainfrom
deal-pipeline-write
Sep 28, 2026
Merged

haegwan merged 1 commit into
mainfrom
deal-pipeline-write

Conversation

@sanka-change-bot

Copy link
Copy Markdown
Contributor

Summary

Generates deals.create_public_deal_pipeline_api (POST /v2/public/deals/pipelines) and deals.update_public_deal_pipeline_api (PATCH /v2/public/deals/pipelines/{pipeline_id}), sync and async, for the Deal pipeline write API added in sanka-api #4379 (merged as 69f649c37). Method names follow the existing operationId-derived names, such as list_public_deal_pipelines_api.

  • openapi/openapi.json is the shared SDK input (local sanka-sdks commit 80953c1), which adds only these two operations and the nine schemas they use.
  • src/sanka_sdk is scripts/generate_sdk.sh output (Fern python SDK 4.34.0): the two methods in deals/client.py and deals/raw_client.py plus seven types. Nothing is hand-edited. The version stays 0.2.7 and nothing is published.
  • The update method takes stages as the complete ordered list (kept stages by id, new ones without) and removed_stages=[DealPipelineStageRemoval(id, replacement_stage_id)]; a used stage without a replacement fails with 409 STAGE_IN_USE.

Verified with httpx.MockTransport (not committed): create sends POST /v2/public/deals/pipelines?workspace_id=... with only the set stage fields and parses the pipeline; update sends PATCH /v2/public/deals/pipelines/{id} with removed_stages[].replacement_stage_id; a 409 raises ApiError carrying STAGE_IN_USE. No test is added: request serialization is generator-owned, and the behaviour is tested in sanka-api #4379 and sanka-mcp #253.

Line counts: test +0; non-test +1327 (generated SDK and spec).

Publish only after sanka-api #4379 is deployed; the methods 404 before that.

Audit

  • Requester: @haegwan
  • Authoring identity: Sanka Change Bot
  • Head SHA: 76d861682793228a340ba1cd72ec3d78514bfdcd
  • Risk: low
  • Deploy mode: none
  • Production surface: Python SDK source (PyPI sanka-sdk, unpublished)

Validation

  • env PATH=/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin uv run --frozen -- python -W error -m unittest discover -s tests -> passed
  • env PATH=/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin uv build -> passed
  • MockTransport run of the generated client: POST and PATCH paths, bodies and the 409 ApiError verified. -> reported passed
  • No-local-check reason: N/A
  • Required GitHub checks must complete before landing.
  • Valid review findings must be addressed before landing.

Change Safety

  • Data or migration impact: Client source only; no publication or hosted mutation.
  • Rollback: Revert the generated client commit.
  • Monitoring: None; the package is not published by this change.

Approval And Deployment Authorization

  • The PR is ready for final human review; no intended code changes remain.
  • The listed head SHA is the exact revision being presented for approval.

By approving this PR, the reviewer authorizes merge of the exact approved revision. This repository has no production deployment in this flow. A later push requires a new approval.

Add deals.create_public_deal_pipeline_api (POST /v2/public/deals/pipelines)
and deals.update_public_deal_pipeline_api
(PATCH /v2/public/deals/pipelines/{pipeline_id}), sync and async, from the
shared SDK input, which adds only these two operations from sanka-api #4379.
Generated with scripts/generate_sdk.sh (Fern python SDK 4.34.0).
@haegwan
haegwan merged commit 97fe5a9 into main Sep 28, 2026
7 checks passed
@haegwan
haegwan deleted the deal-pipeline-write branch September 28, 2026 22:30
haegwan added a commit that referenced this pull request Sep 28, 2026
Bump the Python SDK from 0.2.7 to 0.2.8 so the merged sync and async
deals.create_public_deal_pipeline_api and
deals.update_public_deal_pipeline_api methods (#21) can be published to
PyPI.

The version lives only in pyproject.toml; `uv lock` updated the project's
own uv.lock entry. The Fern-generated client carries no SDK version
string, so no generated code changes.

Co-authored-by: Haegwan Kim <haegwankim@gmail.com>
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