Skip to content

Reconcile SDK contracts with native releases and campaign updates - #320

Merged
purpshell merged 9 commits into
mainfrom
codex/native-release-contract-20260927
Sep 30, 2026
Merged

purpshell merged 9 commits into
mainfrom
codex/native-release-contract-20260927

Conversation

@purpshell

@purpshell purpshell commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

The SDK contract snapshots were pinned before the native feature decision gained experimentRevision. Refreshing from the exact API source also brings three Campaigns operations and the updated webhook catalog into view. This PR copies the Messaging and Platform OpenAPI files byte for byte from polymorfa/polymorfa commit 5c8014d7d58b4d3e483d9d124ee9d88bd85820f9, the merge of PR #388 into dev (first coordinated at PR source commit 2f24c1d62), reconciles every operation fingerprint, and adds typed campaign update and reschedule methods.

The SDK now removes retired BanSafe webhook events and test fixtures, types campaign.rescheduled, and limits organization webhook tests to their documented input.

Repinning to the merge commit adds 17 operations and changes 236 fingerprints (none removed). 211 changes only add documented rate-limit response headers. The rest are typed in this PR: campaign sendWindow on both surfaces and a typed open PlatformCampaign result for Platform list, get, create and update; the QuickLink reauthorization purpose; hosted-history mediaRetrieval; participant handRaised; and webhook replyChoice/parentMessageId (cherry-picked from SDK dev) plus message.ack pricing. MessagingClient.voip.place is partial: the API now accepts participants or groupId, which SDK dev implements but this main-based branch does not. The referral route is absent from the pinned specs, so referrals stay Console-only.

Uncovered new operations (recorded in the ledger, no new methods invented): 15 missing. Six Calls operations (call links, link preview, raised hand, ring participant, call reaction, GET /platform/calls/{callId}) are implemented on SDK dev. Nine Official API operations have no typed method: four Cloud template routes (proposed in #308), stored message media (proposed in #316), service window, credential health, credential reauthorization and Meta pricing summary. Two Console account-health routes are excluded.

Verification at head: format, lint, typecheck, build:workspaces, full tests (116 files, 1,302 tests), build, strict coverage (529 operations: 381 covered, 1 partial, 15 missing, 132 excluded, 0 changed), Functions coverage, retired-name checks, npm pack --dry-run and npm audit --omit=dev all passed.

Six-part assessment:

  • API: Updated by polymorfa/polymorfa PR #388 (merged into dev as 5c8014d7d); this PR copies the authoritative Messaging and Platform specs from that merge commit and changes no API runtime.
  • SDKs: Updated TypeScript methods, types, webhook catalog, examples, snapshots, source hashes, and ledger. Partial: group call placement and the 15 missing operations listed above. Other SDK languages are absent from this repository.
  • CLI: Unaffected; the CLI has no feature evaluation command or campaign SDK dependency change in this PR. Registry publication remains a separate gate.
  • Docs: Updated this repository's SDK README and contract reconciliation notes. Customer-facing API and product docs are in polymorfa/polymorfa PR #388.
  • Feature releases: Unaffected by SDK runtime changes; the native release authority and stage are controlled by polymorfa/polymorfa PR #388. Snapshot merge does not make any feature generally available.
  • Admin controls: Unaffected in this repository; the control surface and reviewed writes are in polymorfa/polymorfa PR #388.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • New Features

    • Added campaign send-window settings, update and reschedule operations, and rescheduling event notifications.
    • Expanded message and webhook data with reply choices, referral and pricing details, and call hand-raise status.
    • Added history media status information, reauthorization QuickLink support, and organization-specific webhook testing.
    • Improved typing for Platform campaign responses and operations.
  • Documentation

    • Updated campaign, webhook, and API coverage documentation to reflect current capabilities.

@purpshell

Copy link
Copy Markdown
Member Author

@codex review

@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 7e496a01-989e-4414-8a81-b72a4dfb7c51

📥 Commits

Reviewing files that changed from the base of the PR and between ba798d8 and 2574141.

📒 Files selected for processing (31)
  • CHANGELOG.md
  • contracts/README.md
  • contracts/coverage.json
  • contracts/openapi.messaging.json
  • contracts/openapi.platform.json
  • contracts/source.json
  • contracts/testing-events.json
  • examples/full-platform/app/api/admin/campaigns/route.ts
  • examples/full-platform/lib/webhooks.ts
  • packages/typescript/README.md
  • packages/typescript/src/index.ts
  • packages/typescript/src/messaging/campaigns.ts
  • packages/typescript/src/messaging/history.ts
  • packages/typescript/src/messaging/quicklinks.ts
  • packages/typescript/src/messaging/testing-configuration.ts
  • packages/typescript/src/messaging/types.ts
  • packages/typescript/src/platform/campaigns.ts
  • packages/typescript/src/platform/developer-resources.ts
  • packages/typescript/src/platform/developer-types.ts
  • packages/typescript/src/platform/types.ts
  • packages/typescript/src/webhooks/events.ts
  • packages/typescript/src/webhooks/index.ts
  • packages/typescript/test/campaigns.test.ts
  • packages/typescript/test/coverage-reconciliation.test.ts
  • packages/typescript/test/coverage.test.ts
  • packages/typescript/test/organization-webhook-test.test.ts
  • packages/typescript/test/platform-automation.test.ts
  • packages/typescript/test/platform-campaign-create.test.ts
  • packages/typescript/test/testing-events.test.ts
  • packages/typescript/test/webhook-contract.test.ts
  • packages/typescript/test/webhook-event-types.test.ts
💤 Files with no reviewable changes (1)
  • packages/typescript/src/messaging/testing-configuration.ts

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.


📝 Walkthrough

Walkthrough

The TypeScript SDK adds campaign update and reschedule methods, send-window types, and typed Platform campaign results. It also updates message, history, QuickLink, and webhook types, removes several BanSafe event contracts, and synchronizes examples, documentation, fixtures, and coverage records.

Changes

Campaign and campaign API

Layer / File(s) Summary
Campaign types and operations
packages/typescript/src/messaging/types.ts, packages/typescript/src/messaging/campaigns.ts, packages/typescript/src/platform/types.ts, packages/typescript/src/platform/campaigns.ts, packages/typescript/test/campaigns.test.ts, packages/typescript/test/platform-campaign-create.test.ts, packages/typescript/test/platform-automation.test.ts, examples/full-platform/app/api/admin/campaigns/route.ts, packages/typescript/README.md, contracts/README.md
Messaging campaigns gain send-window, update, and reschedule contracts and methods. Platform campaign methods use typed results; creation omits idempotency keys and automatic retries, while rescheduling accepts an idempotency key. Tests, examples, and documentation reflect these changes.
History, QuickLink, and organization webhook types
packages/typescript/src/messaging/history.ts, packages/typescript/src/messaging/quicklinks.ts, packages/typescript/src/platform/developer-types.ts, packages/typescript/src/platform/developer-resources.ts, packages/typescript/test/organization-webhook-test.test.ts, CHANGELOG.md
History messages gain media-retrieval metadata, and QuickLinkPurpose adds reauthorization. Organization webhook tests accept an event type and disallow body and session ID inputs. The changelog records public type additions.
Webhook payloads and event types
packages/typescript/src/webhooks/events.ts, packages/typescript/src/webhooks/index.ts, packages/typescript/src/index.ts, packages/typescript/test/webhook-contract.test.ts, packages/typescript/test/webhook-event-types.test.ts, packages/typescript/README.md, examples/full-platform/lib/webhooks.ts
Webhook types add campaign rescheduling, message reply and referral fields, pricing reports, and hand-raise state. Enforcement, health-change, and risk-change BanSafe event types are removed. Exports, tests, documentation, and the example webhook handler are updated.
Contract snapshots and test-event fixtures
contracts/README.md, contracts/source.json, contracts/testing-events.json, packages/typescript/src/messaging/testing-configuration.ts, packages/typescript/test/coverage-reconciliation.test.ts, packages/typescript/test/coverage.test.ts, packages/typescript/test/testing-events.test.ts
Contract metadata and coverage records reference updated API source revisions. Retired BanSafe test events and overrides are removed from contract fixtures and SDK configuration. Coverage expectations use the updated totals and operation statuses.

Priority: ⬇️ Low

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant MessagingCampaignsResource
  participant withIdempotencyKey
  participant CampaignsAPI
  Caller->>MessagingCampaignsResource: Call reschedule with campaign ID and request body
  MessagingCampaignsResource->>withIdempotencyKey: Process request options
  MessagingCampaignsResource->>CampaignsAPI: POST to campaign reschedule endpoint
  CampaignsAPI-->>MessagingCampaignsResource: Return campaign operation
  MessagingCampaignsResource-->>Caller: Return API response
Loading

Merge Risk: ⚪ Minimal · up to 25741

The campaign and webhook contract updates have no established merge-blocking issue. Rescheduling matches the pinned API contract, and snapshot metadata and coverage counts are consistent. Merge after normal checks pass.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 22 files. (5 skipped: 5… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main changes: reconciling SDK contracts with native API releases and adding campaign updates.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 22 files. (5 skipped: 5 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-27T06:08:41.794787Z 4328430 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8dc35625a4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/typescript/src/messaging/types.ts Outdated
@purpshell

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b1091ea02b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread contracts/openapi.messaging.json
Comment thread packages/typescript/README.md
@purpshell

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5a3e3a9460

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/typescript/README.md Outdated
Comment thread packages/typescript/README.md
@purpshell

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 4328430952

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@purpshell

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4328430952

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/typescript/README.md Outdated
Copy the Messaging and Platform OpenAPI snapshots byte for byte from
polymorfa/polymorfa 5c8014d7d58b4d3e483d9d124ee9d88bd85820f9 (PR #388 merged
into dev) and reconcile the ledger: 529 operations, 381 covered, 1 partial,
15 missing, 132 excluded, 0 changed. Type campaign send windows, the open
PlatformCampaign result, QuickLink reauthorization purpose, hosted-history
mediaRetrieval and participant handRaised.
Cherry-picked reply choice types from SDK dev; add message.ack pricing and
webhook participant handRaised; record the reviewed ledger changes.
@purpshell
purpshell merged commit 8cd92f1 into main Sep 30, 2026
3 checks passed
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