Commit 93fdf4c
docs: update desktop Feature API reference to match current source (#785)
* docs: update desktop Feature API reference to match current source
Because
* The `getExperimentMetaData()` method documented in feature-api.mdx no
longer exists in the source code — it was replaced by
`getEnrollmentMetadata()` on each NimbusFeatures instance
* Three new methods (`getEnrollmentMetadata`, `getAllEnrollments`,
`getAllEnrollmentMetadata`) are undocumented
* Desktop supports co-enrollment via `allowCoenrollment` in the feature
manifest but the docs only cover mobile
* The `off()` heading didn't match the actual method name `offUpdate()`
* The FeatureManifest.yaml example was missing required fields
This commit
* Replaces the removed `getExperimentMetaData` section with
`getEnrollmentMetadata()` documenting all three query modes
* Adds `getAllEnrollments()` and `getAllEnrollmentMetadata()` sections
for co-enrolling features
* Documents the `slug` parameter on `recordExposureEvent()` for
co-enrolling features
* Fixes `off()` heading to `offUpdate()`
* Enriches the manifest example with `owner`, `hasExposure`,
`exposureDescription`, and `allowCoenrollment`
* Adds Desktop co-enrollment support to coenrolling-features.mdx with
manifest example, JS API example, and cross-links
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* docs: address review feedback on desktop API docs
Because
* Reviewer suggested using EnrollmentType constants instead of string
literals to encourage best practices
* T[] syntax preferred over Array<T> for type signatures
* "and/or" more accurate than "or" for co-enrollment scenarios
This commit
* Uses EnrollmentType constants in getEnrollmentMetadata() signature,
parameter docs, and code examples
* Adds import comment showing EnrollmentType is from the same module
* Switches all type signatures to T[] syntax
* Updates wording to "experiments and/or rollouts"
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 7b1cf42 commit 93fdf4c
2 files changed
Lines changed: 98 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
78 | 82 | | |
79 | 83 | | |
80 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
81 | 88 | | |
82 | 89 | | |
83 | 90 | | |
| |||
216 | 223 | | |
217 | 224 | | |
218 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
219 | 230 | | |
220 | 231 | | |
221 | 232 | | |
| |||
305 | 316 | | |
306 | 317 | | |
307 | 318 | | |
308 | | - | |
| 319 | + | |
309 | 320 | | |
310 | 321 | | |
311 | 322 | | |
| |||
342 | 353 | | |
343 | 354 | | |
344 | 355 | | |
345 | | - | |
| 356 | + | |
346 | 357 | | |
347 | | - | |
| 358 | + | |
348 | 359 | | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
| 360 | + | |
354 | 361 | | |
355 | | - | |
| 362 | + | |
356 | 363 | | |
357 | | - | |
358 | | - | |
359 | | - | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
360 | 373 | | |
361 | | - | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
362 | 378 | | |
363 | | - | |
| 379 | + | |
364 | 380 | | |
365 | 381 | | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
366 | 419 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
| |||
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
31 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
32 | 46 | | |
33 | 47 | | |
34 | 48 | | |
| |||
56 | 70 | | |
57 | 71 | | |
58 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
59 | 88 | | |
60 | 89 | | |
61 | 90 | | |
| |||
0 commit comments