You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: refactor SDK module structure for cleaner public API (#87)
* feat: refactor SDK module structure for cleaner public API
Reorganize SDK modules to improve discoverability and align with
documentation structure:
Module reorganization:
- Move operations/docs -> docs/ (top-level for B2C Script API docs)
- Move operations/scapi-schemas -> schemas/ (top-level for OpenAPI utils)
- Remove platform/ module (consolidated into operations/mrt, operations/ods)
- Remove deprecated src/logger.ts (use logging/ module)
Documentation updates:
- Revise API landing page intro to reflect full SDK scope
- Restructure Quick Start with capability examples (instance ops, jobs,
platform clients, MRT operations)
- Update typedoc.json entry points to match actual modules and align
ordering with documentation structure
CLI command updates:
- Update docs commands to import from new @salesforce/b2c-tooling-sdk/docs
- Update scapi schemas command to import from new /schemas module
* docs: add curated endpoint documentation to API clients
Add common endpoints table, code examples, and API reference links
to each client type alias JSDoc. Also adds a Typed Clients section
to the API landing page linking to all available clients.
When you explicitly override the hostname with a value that differs from dw.json, the system protects against credential leakage by ignoring the dw.json credentials. This prevents accidentally using production credentials against a staging server.
@@ -169,32 +180,48 @@ When both are configured, WebDAV uses Basic auth and OCAPI uses OAuth.
169
180
170
181
## Typed Clients
171
182
183
+
The SDK provides typed clients for B2C Commerce APIs. All clients use [openapi-fetch](https://openapi-ts.dev/openapi-fetch/) for full TypeScript support with type-safe paths, parameters, and responses.
184
+
185
+
### Instance Clients
186
+
187
+
These clients are accessed via `B2CInstance` for operations on a specific B2C Commerce instance:
|[OcapiClient](./clients/type-aliases/OcapiClient.md)| Data API operations (sites, jobs, code versions) |[OCAPI Data API](https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-commerce-ocapi/b2c-api-doc.html)|
193
+
194
+
### Platform Service Clients
195
+
196
+
These clients are created directly for platform-wide services:
197
+
198
+
| Client | Description | API Reference |
199
+
|--------|-------------|---------------|
200
+
|[SlasClient](./clients/type-aliases/SlasClient.md)| SLAS tenant and client management |[SLAS Admin API](https://developer.salesforce.com/docs/commerce/commerce-api/references/slas-admin?meta=Summary)|
|[CdnZonesClient](./clients/type-aliases/CdnZonesClient.md)| eCDN zone and cache management |[CDN Zones API](https://developer.salesforce.com/docs/commerce/commerce-api/references/cdn-api-process-apis?meta=Summary)|
0 commit comments