Skip to content

Commit b723939

Browse files
authored
docs: audit-driven repair of CLI reference, guides, and SDK JSDoc (#473)
Sweep across CLI/guide/API docs and SDK JSDoc to correct stale flags, descriptions, and examples; fill in JSDoc on previously-undocumented public exports so the typedoc-generated API reference covers the full surface; add the missing operations/cap typedoc entry point.
1 parent 8aa076e commit b723939

86 files changed

Lines changed: 1126 additions & 221 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@salesforce/b2c-dx-docs': patch
3+
'@salesforce/b2c-tooling-sdk': patch
4+
---
5+
6+
Documentation audit and repair pass: corrected stale CLI flag and command references across the CLI reference and guides, fixed broken examples (e.g. eCDN mTLS, sandbox `--no-*` flags, WebDAV `get` arguments), aligned SDK JSDoc with current signatures, and added the missing `operations/cap` typedoc entry point so the Commerce App SDK module appears in the API reference. Filled in JSDoc for previously undocumented public exports across the SDK (auth, clients, instance, logging, ods, mrt, cap, cip, debug, scaffold, schemas, skills, etc.) so the generated API docs cover the full public surface.

docs/api-readme.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,22 @@ The SDK is organized into focused submodules that can be imported individually:
2929
├── /operations/content # Page Designer content export
3030
├── /operations/cip # Curated CIP analytics reports and SQL helpers
3131
├── /operations/jobs # Job execution, site archive import/export
32+
├── /operations/cap # Custom API operations
3233
├── /operations/logs # Log tailing and retrieval
3334
├── /operations/mrt # Managed Runtime bundle operations
3435
├── /operations/ods # On-demand sandbox utilities
3536
├── /operations/debug # B2C Script Debugger (SDAPI + DAP adapter)
3637
├── /operations/users # Account Manager users
3738
├── /operations/roles # Account Manager roles
3839
├── /operations/bm-roles # Business Manager roles
40+
├── /operations/bm-users # Business Manager users
3941
├── /operations/orgs # Account Manager organizations
4042
├── /operations/sites # Storefront site info and cartridge paths
4143
44+
├── /test-utils # Testing utilities and helpers
45+
├── /telemetry # Telemetry and analytics
46+
├── /ux # User experience utilities
47+
4248
├── /slas # SLAS helpers
4349
├── /safety # Safety-mode confirmation middleware
4450
├── /discovery # Instance discovery helpers
@@ -106,7 +112,8 @@ const {data} = await slasClient.GET('/tenants/{tenantId}/clients', {
106112
### MRT Operations
107113

108114
```typescript
109-
import {pushBundle, ApiKeyStrategy} from '@salesforce/b2c-tooling-sdk';
115+
import {pushBundle} from '@salesforce/b2c-tooling-sdk/operations/mrt';
116+
import {ApiKeyStrategy} from '@salesforce/b2c-tooling-sdk/auth';
110117

111118
const auth = new ApiKeyStrategy(process.env.MRT_API_KEY!);
112119
const result = await pushBundle(

docs/cli/account-manager.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -383,12 +383,11 @@ b2c am roles list [FLAGS]
383383

384384
- ID
385385
- Description
386-
- Scope
387-
- Internal Role
386+
- Role Enum Name
388387

389388
#### Extended Columns
390389

391-
- Target Type
390+
- Permissions
392391

393392
#### Examples
394393

@@ -755,8 +754,7 @@ b2c am clients list [FLAGS]
755754

756755
#### Extended Columns
757756

758-
- Last Auth
759-
- Disabled
757+
None. All columns are available via the `--columns` flag.
760758

761759
#### Examples
762760

docs/cli/auth.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ export SFCC_CLIENT_ID=your-client-id
3939
b2c auth login
4040
```
4141

42+
### Flags
43+
44+
| Flag | Environment Variable | Description |
45+
|------|---------------------|-------------|
46+
| `--account-manager-host` | `SFCC_ACCOUNT_MANAGER_HOST` | Account Manager hostname (default: account.demandware.com) |
47+
| `--auth-scope` | `SFCC_OAUTH_SCOPES` | OAuth scopes to request (comma-separated or repeated flag) |
48+
4249
After a successful login, subsequent commands use the stored token until it expires or you run `b2c auth logout`.
4350

4451
## b2c auth logout
@@ -118,6 +125,12 @@ Uses `refresh_token` grant when a refresh token is stored, otherwise falls back
118125
b2c auth client renew
119126
```
120127

128+
### Flags
129+
130+
| Flag | Environment Variable | Description |
131+
|------|---------------------|-------------|
132+
| `--account-manager-host` | `SFCC_ACCOUNT_MANAGER_HOST` | Account Manager hostname for OAuth (default: account.demandware.com) |
133+
121134
### Example
122135

123136
```bash
@@ -181,6 +194,13 @@ b2c auth token
181194
| `--client-secret` | `SFCC_CLIENT_SECRET` | Client Secret for OAuth |
182195
| `--auth-scope` | `SFCC_OAUTH_SCOPES` | OAuth scopes to request (can be repeated) |
183196
| `--account-manager-host` | `SFCC_ACCOUNT_MANAGER_HOST` | Account Manager hostname (default: account.demandware.com) |
197+
| `--short-code` | `SFCC_SHORTCODE` | SCAPI short code |
198+
| `--tenant-id` | `SFCC_TENANT_ID` | Organization/tenant ID |
199+
| `--auth-methods` | `SFCC_AUTH_METHODS` | Allowed auth methods in priority order (comma-separated): client-credentials, jwt, implicit, basic, api-key |
200+
| `--user-auth` | | Use browser-based user authentication (implicit OAuth flow) |
201+
| `--jwt-cert` | `SFCC_JWT_CERT` | Path to JWT certificate file (cert.pem) for JWT Bearer authentication |
202+
| `--jwt-key` | `SFCC_JWT_KEY` | Path to JWT private key file (key.pem) for JWT Bearer authentication |
203+
| `--jwt-passphrase` | `SFCC_JWT_PASSPHRASE` | Passphrase for encrypted JWT private key |
184204

185205
### Examples
186206

docs/cli/bm.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ b2c bm roles list [--count <n>] [--start <n>] [--columns <cols>] [--extended]
8787
|------|-------------|
8888
| `--count`, `-n` | Number of roles to return (default 25) |
8989
| `--start` | Start index for pagination (default 0) |
90-
| `--columns`, `-c` | Comma-separated columns to display |
90+
| `--columns`, `-c` | Comma-separated columns to display. Available: `id`, `description`, `userCount`, `userManager` |
9191
| `--extended`, `-x` | Show all columns including extended fields |
9292

9393
```bash
@@ -275,7 +275,7 @@ b2c bm users list [--count <n>] [--start <n>] [--columns <cols>] [--extended]
275275
|------|-------------|
276276
| `--count`, `-n` | Number of users to return (default 25) |
277277
| `--start` | Start index for pagination (default 0) |
278-
| `--columns`, `-c` | Comma-separated columns to display |
278+
| `--columns`, `-c` | Comma-separated columns to display. Available: `login`, `email`, `name`, `disabled`, `locked`, `lastLogin`, `externalId` |
279279
| `--extended`, `-x` | Include extended columns (`lastLogin`, `externalId`) |
280280

281281
```bash
@@ -318,6 +318,10 @@ b2c bm users search [--search-phrase <text>] [--login <login>] [--email <email>]
318318
| `--sort-by` | Sort field (e.g. `last_login_date`) |
319319
| `--sort-order` | `asc` or `desc` |
320320
| `--query` | Raw OCAPI query JSON (overrides convenience flags) |
321+
| `--count`, `-n` | Number of users to return (default 25) |
322+
| `--start` | Start index for pagination (default 0) |
323+
| `--columns`, `-c` | Comma-separated columns to display. Available: `login`, `email`, `name`, `disabled`, `locked`, `lastLogin`, `externalId` |
324+
| `--extended`, `-x` | Include extended columns (`lastLogin`, `externalId`) |
321325

322326
```bash
323327
b2c bm users search --search-phrase smith

docs/cli/cap.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,8 @@ b2c cap list [--site-id SITE_IDS]
230230
| `--site-id SITE_IDS` | `-s` | Site IDs to query (comma-separated). If omitted, queries all sites. |
231231
| `--timeout SECONDS` | `-t` | Timeout in seconds (default: no timeout) |
232232
| `--local` | `-l` | List locally detected Commerce App Packages (no instance required) |
233+
| `--columns COLS` | `-c` | Columns to display (comma-separated). Available columns: `path`, `id`, `name`, `version`, `domain`, `siteId`, `featureName`, `featureType`, `featureSource`, `installStatus`, `configStatus`, `installedAt` |
234+
| `--extended` | `-x` | Show all columns including extended fields |
233235
| `--json` | | Output result as JSON |
234236

235237
### Table Columns

docs/cli/cip.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,21 @@ CIP commands use **OAuth client credentials only**.
3232
| --------------------- | ---------------------------------------------- |
3333
| Client ID | `--client-id` or `SFCC_CLIENT_ID` |
3434
| Client Secret | `--client-secret` or `SFCC_CLIENT_SECRET` |
35-
| Tenant (CIP instance) | `--tenant-id` / `--tenant` or `SFCC_TENANT_ID` |
35+
| Tenant (CIP instance) | `--tenant-id` or `SFCC_TENANT_ID` |
3636

3737
Your API client must include the **Salesforce Commerce API** role with a tenant filter that includes your target instance.
3838

3939
## Connection and Output Flags
4040

41-
These flags are available on all CIP commands:
41+
These flags are available on `cip tables`, `cip describe`, `cip query`, and `cip report` subcommands:
4242

4343
| Flag | Description | Default |
4444
| -------------- | ------------------------------------- | --------------------------------------------- |
4545
| `--format` | Output format: `table`, `csv`, `json` | `table` |
4646
| `--fetch-size` | Frame fetch size for paging | `1000` |
4747
| `--cip-host` | CIP host override | `jdbc.analytics.commercecloud.salesforce.com` |
4848
| `--staging` | Use staging analytics host | `false` |
49+
| `--json` | Output result as JSON | `false` |
4950

5051
## Query and Report Date Flags
5152

@@ -243,4 +244,4 @@ Both `cip query` and report commands support:
243244
- `--format table` (default)
244245
- `--format csv` (writes CSV to stdout)
245246
- `--format json` (writes JSON to stdout)
246-
- `--json` (global JSON mode)
247+
- `--json` (global JSON mode; available on all CIP commands)

docs/cli/code.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,12 @@ b2c code list
4949

5050
### Flags
5151

52-
Uses [global instance and authentication flags](./index#global-flags).
52+
In addition to [global instance and authentication flags](./index#global-flags):
53+
54+
| Flag | Description | Default |
55+
|------|-------------|---------|
56+
| `--columns`, `-c` | Columns to display (comma-separated). Available: id, active, rollback, lastModified, cartridges | All columns |
57+
| `--extended`, `-x` | Show all columns including extended fields | `false` |
5358

5459
### Examples
5560

@@ -116,8 +121,8 @@ In addition to [global flags](./index#global-flags):
116121
| `--activate`, `-a` | Activate code version after deploy | `false` |
117122
| `--reload`, `-r` | Reload (toggle activation to force reload) code version after deploy | `false` |
118123
| `--delete` | Delete existing cartridges before upload | `false` |
119-
| `--cartridge`, `-c` | Include specific cartridge(s) (can be repeated) | |
120-
| `--exclude-cartridge`, `-x` | Exclude specific cartridge(s) (can be repeated) | |
124+
| `--cartridge`, `-c` | Include specific cartridge(s) (comma-separated or repeated) | |
125+
| `--exclude-cartridge`, `-x` | Exclude specific cartridge(s) (comma-separated or repeated) | |
121126

122127
### Examples
123128

@@ -183,8 +188,10 @@ In addition to [global flags](./index#global-flags):
183188
|------|-------------|---------|
184189
| `--output`, `-o` | Output directory for downloaded cartridges | `cartridges` |
185190
| `--mirror`, `-m` | Extract cartridges to their local project locations | `false` |
186-
| `--cartridge`, `-c` | Include specific cartridge(s) (can be repeated) | |
187-
| `--exclude-cartridge`, `-x` | Exclude specific cartridge(s) (can be repeated) | |
191+
| `--cartridge`, `-c` | Include specific cartridge(s) (comma-separated or repeated) | |
192+
| `--exclude-cartridge`, `-x` | Exclude specific cartridge(s) (comma-separated or repeated) | |
193+
194+
**Note:** The `--mirror` and `--output` flags are mutually exclusive. You must use one or the other, not both. Use `--output` to extract all cartridges to a single directory, or use `--mirror` to extract each cartridge to its local project location.
188195

189196
### Examples
190197

@@ -343,8 +350,8 @@ In addition to [global flags](./index#global-flags):
343350

344351
| Flag | Description |
345352
|------|-------------|
346-
| `--cartridge`, `-c` | Include specific cartridge(s) (can be repeated) |
347-
| `--exclude-cartridge`, `-x` | Exclude specific cartridge(s) (can be repeated) |
353+
| `--cartridge`, `-c` | Include specific cartridge(s) (comma-separated or repeated) |
354+
| `--exclude-cartridge`, `-x` | Exclude specific cartridge(s) (comma-separated or repeated) |
348355

349356
### Examples
350357

docs/cli/content.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ In addition to [global flags](./index#global-flags):
179179
| `--components` | Include components in table output | `false` |
180180
| `--tree` | Show tree structure instead of table | `false` |
181181
| `--timeout` | Job timeout in seconds | |
182+
| `--columns`, `-c` | Columns to display (comma-separated). Available: id, type, typeId, children | All columns |
183+
| `--extended`, `-x` | Show all columns including extended fields | `false` |
182184

183185
### Examples
184186

@@ -244,7 +246,7 @@ With `--json`, returns `{ data: [...] }` with each item containing `id`, `type`,
244246

245247
## b2c content validate
246248

247-
Validate Page Designer metadefinition JSON files against bundled JSON schemas. This is a local-only command — no instance connection or authentication is required.
249+
Validate Page Designer metadefinition JSON files against schemas. This is a local-only command — no instance connection or authentication is required.
248250

249251
The command auto-detects the schema type using file path conventions (`experience/pages/` → pagetype, `experience/components/` → componenttype) and falls back to inspecting the JSON properties. You can also specify the type explicitly with `--type`.
250252

docs/cli/custom-apis.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ These flags are available on all Custom APIs commands:
1414
|------|---------------------|-------------|
1515
| `--tenant-id` | `SFCC_TENANT_ID` | (Required) Organization/tenant ID |
1616
| `--short-code` | `SFCC_SHORTCODE` | SCAPI short code |
17+
| `--client-id` | `SFCC_CLIENT_ID` | Account Manager API Client ID |
18+
| `--client-secret` | `SFCC_CLIENT_SECRET` | Account Manager API Client secret |
19+
20+
Additional authentication flags (`--auth-methods`, `--user-auth`, `--account-manager-host`, `--jwt-cert`, `--jwt-key`, `--jwt-passphrase`) and logging flags (`--log-level`, `--debug`, `--jsonl`) are also available. See the [Authentication Guide](/guide/authentication#scapi-authentication) for credential configuration, or run any command with `--help` for the complete flag list.
1721

1822
## Authentication
1923

0 commit comments

Comments
 (0)