Skip to content

@W-20893605 Add eCDN CLI commands and SDK client#58

Merged
clavery merged 12 commits intomainfrom
feature/W-20893605-ecdn-zones
Jan 22, 2026
Merged

@W-20893605 Add eCDN CLI commands and SDK client#58
clavery merged 12 commits intomainfrom
feature/W-20893605-ecdn-zones

Conversation

@clavery
Copy link
Copy Markdown
Collaborator

@clavery clavery commented Jan 20, 2026

Summary

Implements comprehensive CLI support for managing eCDN (embedded Content Delivery Network) zones through the CDN Zones API.

SDK Client

  • New createCdnZonesClient function with OpenAPI-typed client
  • OAuth scopes: sfcc.cdn-zones (read) and sfcc.cdn-zones.rw (write)
  • Helper toOrganizationId() for tenant ID to org ID conversion

CLI Commands (~60 commands)

Topic Commands
ecdn zones list, create
ecdn cache purge, ocapi-toggle
ecdn certificates list, add, get, update, delete, validate
ecdn security get, update
ecdn speed get, update
ecdn cipher-suites get, update
ecdn origin-headers get, set, delete
ecdn mtls list, create, get, delete
ecdn logpush ownership, jobs (list, create, get, update, delete)
ecdn page-shield notifications (list, create, delete), policies (list, create, get, update, delete), scripts (list, get)
ecdn mrt-rules get, create, update, delete, rules (update, delete)
ecdn waf groups (list, update), rules (list, get, update), rulesets (list, update), managed-rules (list, update), owasp (get, update), migrate
ecdn firewall list, create, get, update, delete, reorder
ecdn rate-limit list, create, get, update, delete

Features

  • Zone resolution by name or ID (case-insensitive lookup)
  • Table output with configurable columns
  • JSON output mode for scripting
  • Comprehensive flag support for all API options

Testing

  • SDK client tests with MSW mocking
  • CLI command tests for representative commands (zones/list, cache/purge, security/get, security/update)
  • Test helpers for eCDN command stubbing

Documentation

  • CLI reference documentation (docs/cli/ecdn.md)
  • User skill documentation (plugins/b2c-cli/skills/b2c-ecdn/SKILL.md)

@clavery clavery changed the title feat: Add eCDN (embedded CDN) CLI commands and SDK client @W-20893605 Add eCDN CLI commands and SDK client Jan 20, 2026
@clavery
Copy link
Copy Markdown
Collaborator Author

clavery commented Jan 21, 2026

FYI this is difficult to test live. Testers please let me know if you need access

Resolved conflict in clients/index.ts by keeping both:
- CDN zones client exports (from feature branch)
- error-utils export (from main)
Resolved conflicts by combining both branches:
- package.json: include both mrt-b2c and cdn-zones type generation
- clients/index.ts: export both MrtB2C and CdnZones clients
- middleware-registry.ts: add both mrt-b2c and cdn-zones to HttpClientType
@clavery clavery merged commit 6a7132c into main Jan 22, 2026
3 checks passed
@clavery clavery deleted the feature/W-20893605-ecdn-zones branch January 27, 2026 01:22
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