-
Notifications
You must be signed in to change notification settings - Fork 25
Closed
Description
Overview
Add CLI support for Marketplace resources including search details and marketplace webhooks using the App Store Connect API. This enables full management of marketplace configuration and webhooks from the CLI with JSON-first output and explicit flags.
Scope
Primary resources from the OpenAPI spec:
marketplaceSearchDetails(GET instance, POST create, PATCH update, DELETE)marketplaceWebhooks(GET list, POST create, PATCH update, DELETE)- App relationships:
apps/{id}/marketplaceSearchDetail
Endpoints:
- GET /v1/marketplaceSearchDetails/{id} (via app relationship)
- POST /v1/marketplaceSearchDetails
- PATCH /v1/marketplaceSearchDetails/{id}
- DELETE /v1/marketplaceSearchDetails/{id}
- GET /v1/marketplaceWebhooks
- POST /v1/marketplaceWebhooks
- PATCH /v1/marketplaceWebhooks/{id}
- DELETE /v1/marketplaceWebhooks/{id}
- GET /v1/apps/{id}/marketplaceSearchDetail
Proposed CLI
Top-level group:
asc marketplace <subcommand> [flags]
Subcommands (all support list/get/create/update/delete unless noted):
marketplace search-details(get/create/update/delete)marketplace webhooks(list/get/create/update/delete)
Examples:
asc marketplace search-details get --app APP_IDasc marketplace search-details create --app APP_ID --keywords "app,game,fun"asc marketplace search-details update --search-detail-id DETAIL_ID --keywords "updated,keywords"asc marketplace search-details delete --search-detail-id DETAIL_ID --confirmasc marketplace webhooks listasc marketplace webhooks get --webhook-id WEBHOOK_IDasc marketplace webhooks create --url https://example.com/webhook --secret secret123 --events MARKETPLACE.SEARCH_UPDATEDasc marketplace webhooks update --webhook-id WEBHOOK_ID --enabled falseasc marketplace webhooks delete --webhook-id WEBHOOK_ID --confirm
Flag patterns
Common:
--app,--output,--pretty,--limit,--next,--paginate--confirmfor destructive operations
Resource-specific examples:
--search-detail-id,--keywords(comma-separated or space-separated)--webhook-id,--url,--secret,--enabled--events(comma-separated list of marketplace event types)
Output
- JSON minified by default
--prettyfor JSON--output table/markdownfor list commands
Acceptance criteria
- Commands appear in
asc --helpandasc marketplace --help - CRUD works for marketplace search details
- CRUD works for marketplace webhooks
- App relationship works for search details
- Pagination flags work (
--paginate,--next,--limit) - Delete requires
--confirm - JSON-first output matches existing conventions
- Table and markdown output for list commands
- Keywords handling works correctly (parsing, formatting)
Tests
- Unit tests for command flag validation and error cases
- HTTP client tests for list/get/create/update/delete
- Output tests for table/markdown
- App relationship tests for search details
- Keywords parsing and formatting tests
Implementation notes
- Add
cmd/marketplace*.goandinternal/asc/client_marketplace*.go - Add output helpers in
internal/asc/output_marketplace.go - Register command in
cmd/root.go - Add resource type constants in
internal/asc/client_types.go - Follow patterns in
cmd/apps.go,cmd/webhooks.go(once created), and output helpers ininternal/asc/output_* - Note: Marketplace search details are typically accessed via app relationship, marketplace webhooks are global
Metadata
Metadata
Assignees
Labels
No labels