Skip to content

feat(sdk): notifications API + remove dead launch(phone=) (#4, #5) - #7

Merged
scttfrdmn merged 1 commit into
mainfrom
feat/notifications-api
Jul 10, 2026
Merged

feat(sdk): notifications API + remove dead launch(phone=) (#4, #5)#7
scttfrdmn merged 1 commit into
mainfrom
feat/notifications-api

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

Closes #4 and #5 — the two gaps from the feature-completeness review. Makes the SDK cover every REST route.

#5 — notifications API (the one uncovered endpoint)

New spore.notifications (NotificationsClient) wrapping POST/DELETE /v1/notifications/register:

spore.notifications.register("+15551234567", platform="slack", workspace_id="T0ABC", user_id="U0XYZ")
spore.notifications.deregister(user_key="slack#T0ABC#U0XYZ")

#4 — remove the dead launch(phone=) param

It was documented for SMS but silently did nothing (launch never accepts phone; SMS is the notifications endpoint). Removed; docstring now points to spore.notifications.register().

Tests / verification

Extended tests/test_sdk.py (17 total): user_key assembly (triple + raw + missing-identity ValueError), deregister DELETE body, the top-level spore.notifications proxy, and launch() rejecting phone=. ruff clean; python -m build + fresh-install smoke green; 3.9-safe (Optional + future annotations, per the #2 lesson). Bump 0.1.3 → 0.1.4.

With this, the SDK is API-complete except the additive launch params in #6 (separate small PR).

#5: add spore.notifications (NotificationsClient) wrapping POST/DELETE
/v1/notifications/register — the one REST route with no SDK coverage.
register()/deregister() take platform/workspace_id/user_id (assembled into the
'platform#workspace#user' key spore-bot uses, per spawn/cmd/bot.go) or a raw
user_key. user_key is caller-supplied by design — it's a chat identity, not
derivable from AWS creds. Adds Client.delete() (JSON-body DELETE). Wired as a
lazy proxy + top-level re-exports, same private-module pattern as #2.

#4: remove the phone= param from spawn.launch() — it was documented for SMS but
silently no-op'd (launch never accepts phone; SMS is the notifications endpoint).
Docstring now points to spore.notifications.register().

Tests: register key-assembly (triple + raw + missing-identity ValueError),
deregister DELETE body, top-level proxy, launch rejects phone=. 17 pass, ruff
clean, build + fresh-install smoke green, 3.9-safe. Bump 0.1.3 -> 0.1.4.

Closes #4, closes #5
@scttfrdmn
scttfrdmn merged commit d2fefb2 into main Jul 10, 2026
5 checks passed
@scttfrdmn
scttfrdmn deleted the feat/notifications-api branch July 10, 2026 22:57
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.

spawn.launch(phone=...) silently does nothing — misleading dead parameter

1 participant