Skip to content

Add CLI support for notification management#709

Merged
alicenstar merged 3 commits intomainfrom
codex-notification-cli-support
May 1, 2026
Merged

Add CLI support for notification management#709
alicenstar merged 3 commits intomainfrom
codex-notification-cli-support

Conversation

@alicenstar
Copy link
Copy Markdown
Member

@alicenstar alicenstar commented May 1, 2026

Summary

  • Add a top-level notification command for subscription, event, email, and webhook management
  • Add vendor v3 client and types for all notification APIs
  • Add CLI validation and client tests for the new notification flows

Shortcut story: https://app.shortcut.com/replicated/story/135446/cli-support-for-notification-management

Backend counterpart: replicatedhq/vandoor#9650

Commands added

Command Description
notification subscription ls List notification subscriptions
notification subscription get ID Get a subscription by ID
notification subscription create --file FILE Create a subscription from a JSON file
notification subscription update ID --file FILE Update a subscription from a JSON file
notification subscription rm ID Delete a subscription
notification subscription events ID List delivery events for a subscription
notification event ls List all notification delivery events
notification event retry EVENT_ID Retry a failed notification event
notification event-type ls List available event types (supports -q search and --limit)
notification email resend-verification --email EMAIL Resend a verification email
notification email verify --email EMAIL --code CODE Verify an email address
notification webhook test --file FILE Send a test payload to a webhook URL

Test output

star@StarR-CK2R4J3VHV replicated % ./bin/testrep notification event-type ls --q customer
KEY                           DISPLAY NAME                        CATEGORY    DESCRIPTION
customer.created              Customer Created                    Customer    When a new customer is created
customer.updated              Customer Updated                    Customer    When a customer's details or license is updated
customer.archived             Customer Archived                   Customer    When a customer is archived
customer.unarchived           Customer Unarchived                 Customer    When a customer is restored from archived state
customer.license_expiring     Customer License Expiring           Customer    When a customer's license is approaching expiration
customer.pending_signup       Pending Self-Service Signup         Customer    When someone signs up for a trial via self-service
customer.ep_invite_sent       Enterprise Portal Invite Sent       Customer    When an Enterprise Portal invite is sent to a user
customer.ep_access_granted    Enterprise Portal Access Granted    Customer    When a customer first accesses the Enterprise Portal for a given license type
customer.ep_user_joined       Enterprise Portal User Joined       Customer    When a user joins an Enterprise Portal customer (invite acceptance, self-signup, or SAML JIT)
release.asset_downloaded      Release Asset Downloaded            Release     When a release asset (such as a Helm chart or .tgz bundle) is pulled by a customer


star@StarR-CK2R4J3VHV replicated % ./bin/testrep notification subscription ls
ID                                  NAME                                            TYPE       DESTINATION                                                                        ENABLED    VERIFIED
42c051231677dcb67d4c605b25881d79    release.build_failed                            email      star@replicated.com                                                                true       true
ba4619e7b11b6c8c3701e41d365e7083    3 event types                                   email      star@replicated.com                                                                true       true
b2d65d09f99fd128c23707e7f681553a    2 event types                                   webhook    https://hooks.slack.com/services/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    true       -
3645fa47f77687442016d7691b91216f    Customer Updated Notification Test (Marc W.)    email      marcw@replicated.com                                                               true       false
ad6d4cf4a41af4f60b5f0fa0e5f06e4d    14 event types                                  webhook    https://webhook.site/9d2888ba-81b8-495f-9a18-18c826387194                          false      -
41c200225ff89372491417fe0866c20c    customer.created                                email      grant@replicated.com                                                               true       true
ef4a53735a0b6c0da48e0b10307840dc    release.created                                 email      grant@replicated.com                                                               true       true

star@StarR-CK2R4J3VHV replicated %  ./bin/testrep notification subscription create --file /tmp/sub.json
ID                                  NAME                 TYPE     DESTINATION            ENABLED    VERIFIED
d2f144ee21db632798316779daf3c7bd    test subscription    email    star@replicated.com    true       true
Screenshot 2026-05-01 at 2 44 37 PM

Flow for verifying emails:

star@StarR-CK2R4J3VHV replicated % ./bin/testrep notification email resend-verification --email star+newnew@replicated.com
SUCCESS    MESSAGE
true       Verification email sent successfully

star@StarR-CK2R4J3VHV replicated % ./bin/testrep notification email verify --email star+newnew@replicated.com --code GOT25I
SUCCESS    MESSAGE
true       Email address verified successfully

@alicenstar alicenstar marked this pull request as ready for review May 1, 2026 17:10
@alicenstar alicenstar merged commit f472f55 into main May 1, 2026
6 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.

2 participants