@trainheroic-unofficial/js 3.6.0 → 3.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -70,7 +70,7 @@ So a write is the same call with a body:
70
70
 
71
71
  ```ts
72
72
  const created = await client.request("POST", "/2.0/coach/exercise/create", {
73
- body: { title: "Sled Push" },
73
+ body: { title: "Sled Push", points_of_performance: "" },
74
74
  });
75
75
  ```
76
76
 
@@ -117,16 +117,22 @@ failures without coupling the SDK to a telemetry vendor:
117
117
  const client = new TrainHeroicClient(email, password, savedSession, {
118
118
  onSession: saveSession,
119
119
  onHttpError: (error) => telemetry.captureException(error),
120
+ transport: (url, init) => fetch(url, init), // optional host-specific HTTP transport
120
121
  });
121
122
  ```
122
123
 
124
+ The client keeps at most four API operations in flight. A custom `transport` receives the same
125
+ URL and `RequestInit` that the default global `fetch` would receive; hosted runtimes can use this
126
+ seam to add coordination without changing SDK authentication or response parsing.
127
+
123
128
  `onHttpError` receives a `TrainHeroicHttpError` containing the method, status, host, a bounded
124
129
  request-body summary, and sanitized provider response diagnostics. The request summary records
125
- field names plus a small allowlist of non-sensitive enum values; arbitrary request values are
126
- never included. Response diagnostics retain bounded status fields and boolean success flags while
127
- redacting all free-form strings and omitting unknown fields. Paths, query strings, credentials,
128
- session tokens, and login
129
- request and response data remain excluded. A transient 401/403
130
+ field names, array lengths, a derived date-span count, and a small allowlist of non-sensitive enum
131
+ values; arbitrary request values are never included. Response diagnostics retain bounded
132
+ provider error strings, status fields, and boolean success flags. Credential values, email
133
+ addresses, IPv4 addresses, and SSNs are scrubbed from diagnostic strings, and unknown response
134
+ fields are omitted. Paths, query strings, session tokens, and login request and response data
135
+ remain excluded. A transient 401/403
130
136
  that succeeds after automatic re-login does not call the hook, and synchronous or asynchronous
131
137
  hook failures never change the request result.
132
138
 
@@ -162,7 +168,8 @@ The `.` entry imports no `node:*` modules. Anything that touches the filesystem
162
168
  scheduled and completed workouts, per-exercise history, personal records, and working maxes.
163
169
  - **Analytics.** Coach analytics reports via `queryAnalytics`, with `analyticsMetricCatalog`
164
170
  and `ANALYTICS_METRIC_KEYS` for discovery. `teamVolume` rolls up per-athlete training
165
- summary rows into a team total.
171
+ summary rows into a team total. Large training summaries are read as sequential five-athlete,
172
+ 90-day batches and merged into one report.
166
173
  - **Messaging.** Tools for conversation streams: listing them, reading a stream, and
167
174
  building or sending or deleting a comment.
168
175