[GH-ISSUE #250] Add Pass Type IDs CLI support #77

Closed
opened 2026-02-26 21:33:12 +03:00 by kerem · 0 comments
Owner

Originally created by @rudrankriyam on GitHub (Jan 28, 2026).
Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/250

Overview

Add CLI support for Pass Type IDs, which are used for Apple Wallet (Passbook) passes. This enables full management of pass type IDs from the CLI with JSON-first output and explicit flags.

Scope

Primary resources from the OpenAPI spec:

  • passTypeIds (list, get, create, update, delete)
  • Relationships: passTypeIds/{id}/certificates, passTypeIds/{id}/relationships/certificates
  • Related resources: certificates/{id}/passTypeId, certificates/{id}/relationships/passTypeId

Endpoints:

  • GET /v1/passTypeIds
  • GET /v1/passTypeIds/{id}
  • GET /v1/passTypeIds/{id}/certificates
  • GET /v1/passTypeIds/{id}/relationships/certificates
  • GET /v1/certificates/{id}/passTypeId
  • GET /v1/certificates/{id}/relationships/passTypeId
  • POST /v1/passTypeIds
  • PATCH /v1/passTypeIds/{id}
  • DELETE /v1/passTypeIds/{id}

Proposed CLI

Top-level group:

  • asc pass-type-ids <subcommand> [flags]

Subcommands (all support list/get/create/update/delete unless noted):

  • pass-type-ids list|get|create|update|delete
  • pass-type-ids certificates list|get (read-only, certificates are managed separately)

Examples:

  • asc pass-type-ids list
  • asc pass-type-ids get --pass-type-id PASS_TYPE_ID
  • asc pass-type-ids create --identifier com.example.pass --name "Example Pass"
  • asc pass-type-ids update --pass-type-id PASS_TYPE_ID --name "Updated Name"
  • asc pass-type-ids delete --pass-type-id PASS_TYPE_ID --confirm
  • asc pass-type-ids certificates list --pass-type-id PASS_TYPE_ID

Flag patterns

Common:

  • --output, --pretty, --limit, --next, --paginate
  • --confirm for destructive operations

Resource-specific examples:

  • --pass-type-id
  • --identifier (reverse domain format)
  • --name

Output

  • JSON minified by default
  • --pretty for JSON
  • --output table/markdown for list commands

Acceptance criteria

  • Commands appear in asc --help and asc pass-type-ids --help
  • CRUD works for pass type IDs
  • List command works without filters (all pass type IDs)
  • Create supports identifier and name
  • Update supports name changes
  • Certificates list command works (read-only)
  • Pagination flags work (--paginate, --next, --limit)
  • Delete requires --confirm
  • JSON-first output matches existing conventions
  • Table and markdown output for list commands

Tests

  • Unit tests for command flag validation and error cases
  • HTTP client tests for list/get/create/update/delete
  • Relationship tests for certificates listing
  • Output tests for table/markdown

Implementation notes

  • Add cmd/pass_type_ids.go and internal/asc/client_pass_type_ids.go
  • Add output helpers in internal/asc/output_pass_type_ids.go
  • Register command in cmd/root.go
  • Add resource type constants in internal/asc/client_types.go
  • Follow patterns in cmd/bundle_ids.go, cmd/certificates.go, and output helpers in internal/asc/output_*
Originally created by @rudrankriyam on GitHub (Jan 28, 2026). Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/250 # Overview Add CLI support for Pass Type IDs, which are used for Apple Wallet (Passbook) passes. This enables full management of pass type IDs from the CLI with JSON-first output and explicit flags. # Scope Primary resources from the OpenAPI spec: - `passTypeIds` (list, get, create, update, delete) - Relationships: `passTypeIds/{id}/certificates`, `passTypeIds/{id}/relationships/certificates` - Related resources: `certificates/{id}/passTypeId`, `certificates/{id}/relationships/passTypeId` Endpoints: - GET /v1/passTypeIds - GET /v1/passTypeIds/{id} - GET /v1/passTypeIds/{id}/certificates - GET /v1/passTypeIds/{id}/relationships/certificates - GET /v1/certificates/{id}/passTypeId - GET /v1/certificates/{id}/relationships/passTypeId - POST /v1/passTypeIds - PATCH /v1/passTypeIds/{id} - DELETE /v1/passTypeIds/{id} # Proposed CLI Top-level group: - `asc pass-type-ids <subcommand> [flags]` Subcommands (all support list/get/create/update/delete unless noted): - `pass-type-ids list|get|create|update|delete` - `pass-type-ids certificates list|get` (read-only, certificates are managed separately) Examples: - `asc pass-type-ids list` - `asc pass-type-ids get --pass-type-id PASS_TYPE_ID` - `asc pass-type-ids create --identifier com.example.pass --name "Example Pass"` - `asc pass-type-ids update --pass-type-id PASS_TYPE_ID --name "Updated Name"` - `asc pass-type-ids delete --pass-type-id PASS_TYPE_ID --confirm` - `asc pass-type-ids certificates list --pass-type-id PASS_TYPE_ID` # Flag patterns Common: - `--output`, `--pretty`, `--limit`, `--next`, `--paginate` - `--confirm` for destructive operations Resource-specific examples: - `--pass-type-id` - `--identifier` (reverse domain format) - `--name` # Output - JSON minified by default - `--pretty` for JSON - `--output table/markdown` for list commands # Acceptance criteria - [ ] Commands appear in `asc --help` and `asc pass-type-ids --help` - [ ] CRUD works for pass type IDs - [ ] List command works without filters (all pass type IDs) - [ ] Create supports identifier and name - [ ] Update supports name changes - [ ] Certificates list command works (read-only) - [ ] Pagination flags work (`--paginate`, `--next`, `--limit`) - [ ] Delete requires `--confirm` - [ ] JSON-first output matches existing conventions - [ ] Table and markdown output for list commands # Tests - Unit tests for command flag validation and error cases - HTTP client tests for list/get/create/update/delete - Relationship tests for certificates listing - Output tests for table/markdown # Implementation notes - Add `cmd/pass_type_ids.go` and `internal/asc/client_pass_type_ids.go` - Add output helpers in `internal/asc/output_pass_type_ids.go` - Register command in `cmd/root.go` - Add resource type constants in `internal/asc/client_types.go` - Follow patterns in `cmd/bundle_ids.go`, `cmd/certificates.go`, and output helpers in `internal/asc/output_*`
kerem closed this issue 2026-02-26 21:33:13 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/App-Store-Connect-CLI#77
No description provided.