@curviate/sdk 0.8.0 → 0.9.0

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/CHANGELOG.md CHANGED
@@ -7,6 +7,21 @@ Versioning: semantic — minor for additive changes, patch for bug fixes; no sta
7
7
 
8
8
  ---
9
9
 
10
+ ## [0.9.0] — 2026-07-03
11
+
12
+ ### Added
13
+
14
+ - **Account enrichment fields.** `accounts.list()` items and `accounts.get()` now carry six cached account-detail fields, populated by an async background enrichment on every successful account activation: `username`, `premium_id`, `public_identifier`, `substrate_created_at` (ISO-8601 UTC), `signatures` (`{title, content}[]`), and `groups` (`string[]`). All six are `null`/`[]` until the account's first enrichment pass completes — never `undefined`, never a missing key. Types: `AccountListPage`, `AccountDetail`.
15
+ - `accounts.get()` gains `seat_id` (`string | null`) — the seat the account occupies, `null` for an admin seatless account. Previously only `accounts.list()` items carried this field.
16
+
17
+ ### Changed
18
+
19
+ - `connected_at` (on both `accounts.list()` items and `accounts.get()`) and `last_checked_at` (`accounts.get()`) now consistently emit ISO-8601 UTC (`…Z`) timestamps — a prior docs-vs-runtime drift meant these could reach callers in raw Postgres wire format. No type change (already typed as `string`/`string | null`); this is a runtime-correctness fix reflected in the regenerated example values.
20
+ - Regenerated types from the current API surface. No resource method signatures changed — purely additive response fields.
21
+ - `quotas[]` (on `accounts.get()`) is now documented as advisory usage-safety recommendations: daily families never cause a rejected request; only `account.per_minute` is a binding limit enforced with HTTP 429. `recommended_throttle_hint` semantics documented per level (`none` / `slow_down` / `backoff` are advisory; `stop` is reserved for the binding per-minute limit). JSDoc-only — no type shape change.
22
+
23
+ ---
24
+
10
25
  ## [0.8.0] — 2026-07-02
11
26
 
12
27
  ### Added
package/dist/index.d.ts CHANGED
@@ -164,8 +164,23 @@ interface paths {
164
164
  headline?: string | null;
165
165
  /** @description The seat this account occupies. */
166
166
  seat_id?: string | null;
167
- /** @description ISO-8601 connection timestamp. */
168
- connected_at?: string;
167
+ /** @description ISO-8601 UTC connection timestamp. */
168
+ connected_at?: string | null;
169
+ /** @description Cached account username. Null until enriched. */
170
+ username?: string | null;
171
+ /** @description Cached premium-membership id. Null until enriched, or for non-premium accounts. */
172
+ premium_id?: string | null;
173
+ /** @description Cached public profile identifier. Null until enriched. */
174
+ public_identifier?: string | null;
175
+ /** @description ISO-8601 UTC creation timestamp of the underlying LinkedIn account — distinct from connected_at. Null until enriched. */
176
+ substrate_created_at?: string | null;
177
+ /** @description Cached signature blocks (title + content) for the account. Empty until enriched. */
178
+ signatures?: {
179
+ title?: string;
180
+ content?: string;
181
+ }[];
182
+ /** @description Cached group names the account belongs to. Empty until enriched. */
183
+ groups?: string[];
169
184
  }[];
170
185
  /** @description Next-page cursor; null on the last page. */
171
186
  cursor?: string | null;
@@ -508,9 +523,28 @@ interface paths {
508
523
  auth_method?: string;
509
524
  full_name?: string | null;
510
525
  headline?: string | null;
526
+ /** @description ISO-8601 UTC connection timestamp. */
511
527
  connected_at?: string | null;
528
+ /** @description ISO-8601 UTC time the account state was last checked. */
512
529
  last_checked_at?: string;
513
- /** @description Per-account quota view one entry per tracked family (messages.daily, connection_requests.daily, profile_views.daily, inmail.daily, account.per_minute). */
530
+ /** @description The seat this account occupies (null for an admin seatless account). */
531
+ seat_id?: string | null;
532
+ /** @description Cached account username. Null until enriched. */
533
+ username?: string | null;
534
+ /** @description Cached premium-membership id. Null until enriched, or for non-premium accounts. */
535
+ premium_id?: string | null;
536
+ /** @description Cached public profile identifier. Null until enriched. */
537
+ public_identifier?: string | null;
538
+ /** @description ISO-8601 UTC creation timestamp of the underlying LinkedIn account — distinct from connected_at. Null until enriched. */
539
+ substrate_created_at?: string | null;
540
+ /** @description Cached signature blocks (title + content) for the account. Empty until enriched. */
541
+ signatures?: {
542
+ title?: string;
543
+ content?: string;
544
+ }[];
545
+ /** @description Cached group names the account belongs to. Empty until enriched. */
546
+ groups?: string[];
547
+ /** @description Usage-safety recommendations for this account — one entry per tracked family (messages.daily, connection_requests.daily, profile_views.daily, inmail.daily, profile.endorse, account.per_minute). These are advisory only: Curviate never rejects a request because a daily recommendation is exceeded; only account.per_minute is a binding limit enforced with HTTP 429. */
514
548
  quotas?: {
515
549
  /** @description Quota family (e.g. messages.daily, account.per_minute). */
516
550
  quota_name?: string;
@@ -521,7 +555,7 @@ interface paths {
521
555
  /** @description ISO-8601 UTC time the current window resets. */
522
556
  reset_time?: string;
523
557
  /**
524
- * @description Pacing hint.
558
+ * @description Pacing recommendation for this family, advisory only. `none` (under 80% consumed), `slow_down` (80-99% consumed), and `backoff` (100%+ consumed) never block a request. `stop` is reserved exclusively for `account.per_minute` — the sole binding limit, whose breach is enforced with HTTP 429.
525
559
  * @enum {string}
526
560
  */
527
561
  recommended_throttle_hint?: "none" | "slow_down" | "backoff" | "stop";
@@ -15047,6 +15081,11 @@ declare class AccountsResource {
15047
15081
  /**
15048
15082
  * List the tenant's connected LinkedIn accounts, cursor-paginated.
15049
15083
  *
15084
+ * Each item also carries a small set of cached account-detail fields
15085
+ * (`username`, `premium_id`, `public_identifier`, `substrate_created_at`,
15086
+ * `signatures`, `groups`) populated by an async background enrichment —
15087
+ * `null`/`[]` until the account's first enrichment pass completes.
15088
+ *
15050
15089
  * @param params - optional `limit` (1–250) and `cursor` (from a prior page).
15051
15090
  * @returns a page of accounts and the next-page `cursor` (null when exhausted).
15052
15091
  *
@@ -15077,7 +15116,14 @@ declare class AccountsResource {
15077
15116
  createConnectLink(body: AccountConnectLinkBody): Promise<AccountConnectLinkResult>;
15078
15117
  /**
15079
15118
  * Return metadata and current state for one connected account, including the
15080
- * central `quotas[]` view for all tracked quota families.
15119
+ * central `quotas[]` view for all tracked quota families and `seat_id` (the
15120
+ * seat this account occupies, `null` for an admin seatless account).
15121
+ *
15122
+ * This is a stale-while-revalidate read — it always returns immediately
15123
+ * from the cached row (never blocks on a live substrate call), and the
15124
+ * six cached enrichment fields (`username`, `premium_id`,
15125
+ * `public_identifier`, `substrate_created_at`, `signatures`, `groups`) are
15126
+ * `null`/`[]` until the account's first enrichment pass completes.
15081
15127
  */
15082
15128
  get(accountId: string): Promise<AccountDetail>;
15083
15129
  /**
package/dist/index.js CHANGED
@@ -308,6 +308,11 @@ var AccountsResource = class {
308
308
  /**
309
309
  * List the tenant's connected LinkedIn accounts, cursor-paginated.
310
310
  *
311
+ * Each item also carries a small set of cached account-detail fields
312
+ * (`username`, `premium_id`, `public_identifier`, `substrate_created_at`,
313
+ * `signatures`, `groups`) populated by an async background enrichment —
314
+ * `null`/`[]` until the account's first enrichment pass completes.
315
+ *
311
316
  * @param params - optional `limit` (1–250) and `cursor` (from a prior page).
312
317
  * @returns a page of accounts and the next-page `cursor` (null when exhausted).
313
318
  *
@@ -368,7 +373,14 @@ var AccountsResource = class {
368
373
  }
369
374
  /**
370
375
  * Return metadata and current state for one connected account, including the
371
- * central `quotas[]` view for all tracked quota families.
376
+ * central `quotas[]` view for all tracked quota families and `seat_id` (the
377
+ * seat this account occupies, `null` for an admin seatless account).
378
+ *
379
+ * This is a stale-while-revalidate read — it always returns immediately
380
+ * from the cached row (never blocks on a live substrate call), and the
381
+ * six cached enrichment fields (`username`, `premium_id`,
382
+ * `public_identifier`, `substrate_created_at`, `signatures`, `groups`) are
383
+ * `null`/`[]` until the account's first enrichment pass completes.
372
384
  */
373
385
  get(accountId) {
374
386
  return this.ctx.request({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curviate/sdk",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "private": false,
5
5
  "description": "TypeScript SDK for the Curviate API.",
6
6
  "license": "MIT",
@@ -55,8 +55,23 @@ export interface paths {
55
55
  headline?: string | null;
56
56
  /** @description The seat this account occupies. */
57
57
  seat_id?: string | null;
58
- /** @description ISO-8601 connection timestamp. */
59
- connected_at?: string;
58
+ /** @description ISO-8601 UTC connection timestamp. */
59
+ connected_at?: string | null;
60
+ /** @description Cached account username. Null until enriched. */
61
+ username?: string | null;
62
+ /** @description Cached premium-membership id. Null until enriched, or for non-premium accounts. */
63
+ premium_id?: string | null;
64
+ /** @description Cached public profile identifier. Null until enriched. */
65
+ public_identifier?: string | null;
66
+ /** @description ISO-8601 UTC creation timestamp of the underlying LinkedIn account — distinct from connected_at. Null until enriched. */
67
+ substrate_created_at?: string | null;
68
+ /** @description Cached signature blocks (title + content) for the account. Empty until enriched. */
69
+ signatures?: {
70
+ title?: string;
71
+ content?: string;
72
+ }[];
73
+ /** @description Cached group names the account belongs to. Empty until enriched. */
74
+ groups?: string[];
60
75
  }[];
61
76
  /** @description Next-page cursor; null on the last page. */
62
77
  cursor?: string | null;
@@ -399,9 +414,28 @@ export interface paths {
399
414
  auth_method?: string;
400
415
  full_name?: string | null;
401
416
  headline?: string | null;
417
+ /** @description ISO-8601 UTC connection timestamp. */
402
418
  connected_at?: string | null;
419
+ /** @description ISO-8601 UTC time the account state was last checked. */
403
420
  last_checked_at?: string;
404
- /** @description Per-account quota view one entry per tracked family (messages.daily, connection_requests.daily, profile_views.daily, inmail.daily, account.per_minute). */
421
+ /** @description The seat this account occupies (null for an admin seatless account). */
422
+ seat_id?: string | null;
423
+ /** @description Cached account username. Null until enriched. */
424
+ username?: string | null;
425
+ /** @description Cached premium-membership id. Null until enriched, or for non-premium accounts. */
426
+ premium_id?: string | null;
427
+ /** @description Cached public profile identifier. Null until enriched. */
428
+ public_identifier?: string | null;
429
+ /** @description ISO-8601 UTC creation timestamp of the underlying LinkedIn account — distinct from connected_at. Null until enriched. */
430
+ substrate_created_at?: string | null;
431
+ /** @description Cached signature blocks (title + content) for the account. Empty until enriched. */
432
+ signatures?: {
433
+ title?: string;
434
+ content?: string;
435
+ }[];
436
+ /** @description Cached group names the account belongs to. Empty until enriched. */
437
+ groups?: string[];
438
+ /** @description Usage-safety recommendations for this account — one entry per tracked family (messages.daily, connection_requests.daily, profile_views.daily, inmail.daily, profile.endorse, account.per_minute). These are advisory only: Curviate never rejects a request because a daily recommendation is exceeded; only account.per_minute is a binding limit enforced with HTTP 429. */
405
439
  quotas?: {
406
440
  /** @description Quota family (e.g. messages.daily, account.per_minute). */
407
441
  quota_name?: string;
@@ -412,7 +446,7 @@ export interface paths {
412
446
  /** @description ISO-8601 UTC time the current window resets. */
413
447
  reset_time?: string;
414
448
  /**
415
- * @description Pacing hint.
449
+ * @description Pacing recommendation for this family, advisory only. `none` (under 80% consumed), `slow_down` (80-99% consumed), and `backoff` (100%+ consumed) never block a request. `stop` is reserved exclusively for `account.per_minute` — the sole binding limit, whose breach is enforced with HTTP 429.
416
450
  * @enum {string}
417
451
  */
418
452
  recommended_throttle_hint?: "none" | "slow_down" | "backoff" | "stop";