@curviate/sdk 0.13.0 → 0.14.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/CHANGELOG.md CHANGED
@@ -7,6 +7,30 @@ Versioning: semantic — minor for additive changes, patch for bug fixes; no sta
7
7
 
8
8
  ---
9
9
 
10
+ ## [0.14.1] — 2026-07-07
11
+
12
+ ### Fixed
13
+
14
+ - **`constructEvent` examples referenced a wrong header name (`X-Curviate-Signature` → `Curviate-Signature`); corrected a stale default-count description.** The JSDoc and both code examples (Express/Node, Hono) for `constructEvent` named the header `X-Curviate-Signature`; the dispatcher actually sends `Curviate-Signature` (Node lowercases it to `curviate-signature` on `req.headers`), so integrators copying the examples verbatim got `undefined` for the signature header. Also corrected the generated `events` field description on the webhook-create schema from a stale "default: all 7" to "default: all 11 lifecycle events", matching the account_status catalogue.
15
+
16
+ ---
17
+
18
+ ## [0.14.0] — 2026-07-07
19
+
20
+ Webhooks surface re-based onto the v2 catalogue. Additive minor: one new method,
21
+ one type-only breaking note for `CurviateEvent` (see below).
22
+
23
+ ### Added
24
+
25
+ - **`webhooks.get(id)`.** Return a single webhook owned by the calling tenant (`GET /v1/webhooks/{id}`). The plaintext secret is never present on a read — only `secret_prefix`. Type `WebhookGetResult`. The `webhooks` namespace is now 7 methods (was 6).
26
+ - **Webhook event catalogue expanded 21 → 27** (`webhooks.listEvents()`), grouped messaging (8) / user (2) / account_status (14), plus 3 tier-gated. New subscribable-but-not-default events: `chat.updated`, `chat.deleted` (messaging), `connection.new` (user), `account.initial_sync.running` / `account.initial_sync.completed` / `account.initial_sync.failed` (account_status). Catalogue entries may now carry an `availability: "realtime" | "no_longer_realtime" | "not_realtime"` field.
27
+
28
+ ### Changed (type-only breaking note)
29
+
30
+ - **`CurviateEvent` union re-keyed 19 → 24 deliverable events** to match the create-subscribable catalogue. Renamed/removed: `account.stopped`, `account.sync_started`, `account.sync_complete`, `account.creation_success`, `account.sync_success`, `account.reconnect_required`, `account.checkpoint` are gone; the account-lifecycle names now split across `account.synced`, `account.reconnected`, `account.reconnect_needed`, `account.paused`, `account.connecting`, `account.permission_revoked`. Net-new members: `chat.updated`, `chat.deleted`, `connection.new`, `account.initial_sync.running`, `account.initial_sync.completed`, `account.initial_sync.failed`. A `switch`/exhaustiveness check on `event.type` for any of the 7 removed names will now fail to compile — update the case list. Runtime HMAC verification (`constructEvent`) is unaffected; this is a types-only change.
31
+
32
+ ---
33
+
10
34
  ## [0.13.0] — 2026-07-05
11
35
 
12
36
  Accounts/Auth surface migration. This is a **breaking** minor (pre-1.0): the account
package/README.md CHANGED
@@ -154,7 +154,7 @@ import { constructEvent, WebhookSignatureError } from "@curviate/sdk";
154
154
 
155
155
  // Express (Node 18+)
156
156
  app.post("/webhook", express.raw({ type: "application/json" }), async (req, res) => {
157
- const sig = req.headers["x-curviate-signature"] as string;
157
+ const sig = req.headers["curviate-signature"] as string;
158
158
  const secret = process.env.CURVIATE_WEBHOOK_SECRET!;
159
159
 
160
160
  let event;
@@ -176,7 +176,7 @@ app.post("/webhook", express.raw({ type: "application/json" }), async (req, res)
176
176
  case "account.connected":
177
177
  handleAccountConnected(event.data);
178
178
  break;
179
- // 17 more event types — all in the CurviateEvent union
179
+ // 22 more event types — all in the CurviateEvent union
180
180
  }
181
181
 
182
182
  res.sendStatus(200);
@@ -185,7 +185,7 @@ app.post("/webhook", express.raw({ type: "application/json" }), async (req, res)
185
185
  // Hono / Vercel Edge — always await (Web Crypto is async)
186
186
  app.post("/webhook", async (c) => {
187
187
  const rawBody = await c.req.text();
188
- const event = await constructEvent(rawBody, c.req.header("x-curviate-signature")!, secret);
188
+ const event = await constructEvent(rawBody, c.req.header("curviate-signature")!, secret);
189
189
  return c.text("ok");
190
190
  });
191
191
  ```
package/dist/index.d.ts CHANGED
@@ -16726,7 +16726,7 @@ interface paths {
16726
16726
  value: string;
16727
16727
  }[];
16728
16728
  /** @description Messaging events to subscribe to (default: [message.received]) */
16729
- events?: ("message.received" | "message.delivered" | "message.read" | "message.reaction" | "message.edited" | "message.deleted")[];
16729
+ events?: ("message.received" | "message.delivered" | "message.read" | "message.reaction" | "message.edited" | "message.deleted" | "chat.updated" | "chat.deleted")[];
16730
16730
  /**
16731
16731
  * @description Field-remapping keys for the messaging delivery payload
16732
16732
  * @default []
@@ -16761,7 +16761,7 @@ interface paths {
16761
16761
  value: string;
16762
16762
  }[];
16763
16763
  /** @description User/relation events to subscribe to (default: [connection.accepted]) */
16764
- events?: "connection.accepted"[];
16764
+ events?: ("connection.accepted" | "connection.new")[];
16765
16765
  /**
16766
16766
  * @description Field-remapping keys for the user/relation delivery payload
16767
16767
  * @default []
@@ -16795,8 +16795,8 @@ interface paths {
16795
16795
  key: string;
16796
16796
  value: string;
16797
16797
  }[];
16798
- /** @description Account-status events to subscribe to (default: all 7) */
16799
- events?: ("account.created" | "account.connected" | "account.synced" | "account.reconnected" | "account.reconnect_needed" | "account.creation_failed" | "account.disconnected" | "account.error" | "account.paused" | "account.connecting" | "account.permission_revoked")[];
16798
+ /** @description Account-status events to subscribe to (default: all 11 lifecycle events) */
16799
+ events?: ("account.created" | "account.connected" | "account.synced" | "account.reconnected" | "account.reconnect_needed" | "account.creation_failed" | "account.disconnected" | "account.error" | "account.paused" | "account.connecting" | "account.permission_revoked" | "account.initial_sync.running" | "account.initial_sync.completed" | "account.initial_sync.failed")[];
16800
16800
  };
16801
16801
  };
16802
16802
  };
@@ -16918,7 +16918,7 @@ interface paths {
16918
16918
  };
16919
16919
  /**
16920
16920
  * List webhook event types
16921
- * @description Returns the complete canonical event catalogue (21 events) grouped by source: messaging (6), user (1), account_status (11), plus 3 tier-gated events. No quota consumed.
16921
+ * @description Returns the complete canonical event catalogue (27 events) grouped by source: messaging (8), user (2), account_status (14), plus 3 tier-gated events. No quota consumed.
16922
16922
  */
16923
16923
  get: {
16924
16924
  parameters: {
@@ -16960,6 +16960,11 @@ interface paths {
16960
16960
  * @enum {string}
16961
16961
  */
16962
16962
  tier?: "recruiter" | "sales_nav";
16963
+ /**
16964
+ * @description Delivery timing. Omitted (equivalent to 'realtime') on every live-pushed event. 'no_longer_realtime' means no push exists for this event; 'not_realtime' means the event is polled, not pushed, and may lag the underlying LinkedIn event.
16965
+ * @enum {string}
16966
+ */
16967
+ availability?: "realtime" | "no_longer_realtime" | "not_realtime";
16963
16968
  }[];
16964
16969
  }[];
16965
16970
  };
@@ -17003,7 +17008,113 @@ interface paths {
17003
17008
  path?: never;
17004
17009
  cookie?: never;
17005
17010
  };
17006
- get?: never;
17011
+ /**
17012
+ * Get a webhook
17013
+ * @description Returns a single webhook owned by the calling tenant. The plaintext secret is never present on a read — only the prefix.
17014
+ */
17015
+ get: {
17016
+ parameters: {
17017
+ query?: never;
17018
+ header?: never;
17019
+ path: {
17020
+ /** @description Webhook id (wh_-prefixed ULID). */
17021
+ id: string;
17022
+ };
17023
+ cookie?: never;
17024
+ };
17025
+ requestBody?: never;
17026
+ responses: {
17027
+ /** @description The webhook, if owned by the calling tenant. The signing secret is never returned on a read — only the prefix. */
17028
+ 200: {
17029
+ headers: {
17030
+ "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
17031
+ RateLimit: components["headers"]["RateLimit"];
17032
+ [name: string]: unknown;
17033
+ };
17034
+ content: {
17035
+ "application/json": {
17036
+ /**
17037
+ * @description Response type discriminator.
17038
+ * @enum {string}
17039
+ */
17040
+ object?: "webhook";
17041
+ /** @description Webhook id (wh_-prefixed ULID). */
17042
+ id?: string;
17043
+ /**
17044
+ * @description The event source this webhook subscribes to (immutable).
17045
+ * @enum {string}
17046
+ */
17047
+ source?: "messaging" | "user" | "account_status";
17048
+ /** @description The URL that receives delivery POST requests. */
17049
+ request_url?: string;
17050
+ /** @description Human-readable label. */
17051
+ name?: string | null;
17052
+ /**
17053
+ * @description Delivery body encoding.
17054
+ * @enum {string}
17055
+ */
17056
+ format?: "json" | "form";
17057
+ /** @description Accounts targeted by this webhook. Non-empty — each id is owned by the tenant. */
17058
+ account_ids?: string[];
17059
+ /** @description A disabled webhook is kept but delivers nothing. */
17060
+ enabled?: boolean;
17061
+ /** @description Custom headers added to each delivery POST. */
17062
+ headers?: {
17063
+ key?: string;
17064
+ value?: string;
17065
+ }[];
17066
+ /** @description Canonical event names this webhook subscribes to. */
17067
+ events?: string[];
17068
+ /** @description Field-remapping keys for the delivery payload (messaging and user sources only). */
17069
+ data?: string[];
17070
+ /** @description First 8 characters of the signing secret. The full secret is never returned on edit — it is preserved unchanged. */
17071
+ secret_prefix?: string;
17072
+ /** @description ISO-8601 creation timestamp. */
17073
+ created_at?: string;
17074
+ };
17075
+ };
17076
+ };
17077
+ /** @description Malformed or empty webhook id. */
17078
+ 400: {
17079
+ headers: {
17080
+ [name: string]: unknown;
17081
+ };
17082
+ content: {
17083
+ "application/json": components["schemas"]["Error"];
17084
+ };
17085
+ };
17086
+ /** @description Missing or invalid API key. */
17087
+ 401: {
17088
+ headers: {
17089
+ [name: string]: unknown;
17090
+ };
17091
+ content: {
17092
+ "application/json": components["schemas"]["Error"];
17093
+ };
17094
+ };
17095
+ /** @description Webhook not found or not owned by this tenant. */
17096
+ 404: {
17097
+ headers: {
17098
+ [name: string]: unknown;
17099
+ };
17100
+ content: {
17101
+ "application/json": components["schemas"]["Error"];
17102
+ };
17103
+ };
17104
+ /** @description Rate limited — slow down and retry after the hinted delay. */
17105
+ 429: {
17106
+ headers: {
17107
+ "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
17108
+ RateLimit: components["headers"]["RateLimit"];
17109
+ "Retry-After": components["headers"]["Retry-After"];
17110
+ [name: string]: unknown;
17111
+ };
17112
+ content: {
17113
+ "application/json": components["schemas"]["Error"];
17114
+ };
17115
+ };
17116
+ };
17117
+ };
17007
17118
  put?: never;
17008
17119
  post?: never;
17009
17120
  /**
@@ -18335,12 +18446,13 @@ declare class CompaniesResource {
18335
18446
  }
18336
18447
 
18337
18448
  /**
18338
- * Webhooks resource — 6 methods (root-scoped).
18449
+ * Webhooks resource — 7 methods (root-scoped).
18339
18450
  *
18340
18451
  * Root-scoped: webhooks are tenant-wide, not account-scoped. All methods are
18341
18452
  * mounted directly on the root client (like `accounts`).
18342
18453
  * `getStateDiff` is placed here because it is tagged Webhooks in the OpenAPI
18343
18454
  * (`GET /v1/accounts/:id/state-diff` enables event-driven state sync).
18455
+ * `get` is net-new — a single tenant-scoped read by id.
18344
18456
  */
18345
18457
 
18346
18458
  type WebhookCreateBody = paths["/v1/webhooks"]["post"]["requestBody"]["content"]["application/json"];
@@ -18348,6 +18460,7 @@ type WebhookCreateResult = paths["/v1/webhooks"]["post"]["responses"]["201"]["co
18348
18460
  type WebhookListParams = NonNullable<paths["/v1/webhooks"]["get"]["parameters"]["query"]>;
18349
18461
  type WebhookListResult = paths["/v1/webhooks"]["get"]["responses"]["200"]["content"]["application/json"];
18350
18462
  type WebhookListEventsResult = paths["/v1/webhooks/events"]["get"]["responses"]["200"]["content"]["application/json"];
18463
+ type WebhookGetResult = paths["/v1/webhooks/{id}"]["get"]["responses"]["200"]["content"]["application/json"];
18351
18464
  type WebhookUpdateBody = paths["/v1/webhooks/{id}"]["patch"]["requestBody"]["content"]["application/json"];
18352
18465
  type WebhookUpdateResult = paths["/v1/webhooks/{id}"]["patch"]["responses"]["200"]["content"]["application/json"];
18353
18466
  type WebhookDeleteResult = paths["/v1/webhooks/{id}"]["delete"]["responses"]["200"]["content"]["application/json"];
@@ -18369,10 +18482,16 @@ declare class WebhooksResource {
18369
18482
  */
18370
18483
  list(params?: WebhookListParams): Promise<WebhookListResult>;
18371
18484
  /**
18372
- * Return the complete canonical webhook event catalogue (21 events, grouped by source).
18485
+ * Return the complete canonical webhook event catalogue (27 events, grouped by source).
18373
18486
  * `GET /v1/webhooks/events`
18374
18487
  */
18375
18488
  listEvents(): Promise<WebhookListEventsResult>;
18489
+ /**
18490
+ * Return a single webhook owned by the calling tenant.
18491
+ * `GET /v1/webhooks/{id}`
18492
+ * The plaintext secret is never present on a read — only `secret_prefix`.
18493
+ */
18494
+ get(id: string): Promise<WebhookGetResult>;
18376
18495
  /**
18377
18496
  * Update a webhook in place. `source` is immutable.
18378
18497
  * `PATCH /v1/webhooks/{id}`
@@ -18658,8 +18777,19 @@ interface AccountPayload {
18658
18777
  [key: string]: unknown;
18659
18778
  }
18660
18779
  /**
18661
- * The complete discriminated union of all 19 canonical Curviate webhook events.
18662
- * The `type` field is the discriminant.
18780
+ * The complete discriminated union of all 24 canonical, create-subscribable
18781
+ * Curviate webhook events. The `type` field is the discriminant.
18782
+ *
18783
+ * Re-keyed for the v2 catalogue (was 19). Renamed/removed vs. the prior set:
18784
+ * `account.stopped`, `account.sync_started`, `account.sync_complete`,
18785
+ * `account.creation_success`, `account.sync_success`, `account.reconnect_required`,
18786
+ * and `account.checkpoint` are gone — the account-lifecycle names now split
18787
+ * across `account.synced` / `account.reconnected` / `account.reconnect_needed` /
18788
+ * `account.paused` / `account.connecting` / `account.permission_revoked`. Net-new:
18789
+ * `chat.updated`, `chat.deleted`, `connection.new`, and the three
18790
+ * `account.initial_sync.*` events. This union is pinned at compile time against
18791
+ * the generated create-events enum (see `test/webhooks.constructEvent.test.ts`)
18792
+ * — it must never drift from the served catalogue again.
18663
18793
  *
18664
18794
  * @example
18665
18795
  * const event = await constructEvent(rawBody, header, secret);
@@ -18685,9 +18815,18 @@ type CurviateEvent = {
18685
18815
  } | {
18686
18816
  type: "message.reaction";
18687
18817
  data: MessagePayload;
18818
+ } | {
18819
+ type: "chat.updated";
18820
+ data: MessagePayload;
18821
+ } | {
18822
+ type: "chat.deleted";
18823
+ data: MessagePayload;
18688
18824
  } | {
18689
18825
  type: "connection.accepted";
18690
18826
  data: ConnectionPayload;
18827
+ } | {
18828
+ type: "connection.new";
18829
+ data: ConnectionPayload;
18691
18830
  } | {
18692
18831
  type: "account.created";
18693
18832
  data: AccountPayload;
@@ -18695,34 +18834,40 @@ type CurviateEvent = {
18695
18834
  type: "account.connected";
18696
18835
  data: AccountPayload;
18697
18836
  } | {
18698
- type: "account.disconnected";
18837
+ type: "account.synced";
18699
18838
  data: AccountPayload;
18700
18839
  } | {
18701
- type: "account.error";
18840
+ type: "account.reconnected";
18702
18841
  data: AccountPayload;
18703
18842
  } | {
18704
- type: "account.stopped";
18843
+ type: "account.reconnect_needed";
18705
18844
  data: AccountPayload;
18706
18845
  } | {
18707
- type: "account.sync_started";
18846
+ type: "account.creation_failed";
18708
18847
  data: AccountPayload;
18709
18848
  } | {
18710
- type: "account.sync_complete";
18849
+ type: "account.disconnected";
18711
18850
  data: AccountPayload;
18712
18851
  } | {
18713
- type: "account.creation_success";
18852
+ type: "account.error";
18714
18853
  data: AccountPayload;
18715
18854
  } | {
18716
- type: "account.creation_failed";
18855
+ type: "account.paused";
18856
+ data: AccountPayload;
18857
+ } | {
18858
+ type: "account.connecting";
18859
+ data: AccountPayload;
18860
+ } | {
18861
+ type: "account.permission_revoked";
18717
18862
  data: AccountPayload;
18718
18863
  } | {
18719
- type: "account.sync_success";
18864
+ type: "account.initial_sync.running";
18720
18865
  data: AccountPayload;
18721
18866
  } | {
18722
- type: "account.reconnect_required";
18867
+ type: "account.initial_sync.completed";
18723
18868
  data: AccountPayload;
18724
18869
  } | {
18725
- type: "account.checkpoint";
18870
+ type: "account.initial_sync.failed";
18726
18871
  data: AccountPayload;
18727
18872
  };
18728
18873
  /**
@@ -18749,7 +18894,7 @@ interface ConstructEventOptions {
18749
18894
  *
18750
18895
  * @param rawBody - The raw (un-parsed) request body as a string or Buffer.
18751
18896
  * **Must be the exact bytes received** — do not JSON.parse then re-serialize.
18752
- * @param signatureHeader - Full value of the `X-Curviate-Signature` header.
18897
+ * @param signatureHeader - Full value of the `Curviate-Signature` header.
18753
18898
  * @param secret - The webhook signing secret from your webhook registration.
18754
18899
  * @param opts - Optional verification settings.
18755
18900
  * @returns `Promise<CurviateEvent>` — a typed event once verified.
@@ -18759,7 +18904,7 @@ interface ConstructEventOptions {
18759
18904
  * @example
18760
18905
  * // Express handler (Node 18+)
18761
18906
  * app.post('/webhook', express.raw({ type: 'application/json' }), async (req, res) => {
18762
- * const sig = req.headers['x-curviate-signature'] as string;
18907
+ * const sig = req.headers['curviate-signature'] as string;
18763
18908
  * let event;
18764
18909
  * try {
18765
18910
  * event = await constructEvent(req.body, sig, secret);
@@ -18777,7 +18922,7 @@ interface ConstructEventOptions {
18777
18922
  * // Hono / Vercel Edge
18778
18923
  * app.post('/webhook', async (c) => {
18779
18924
  * const rawBody = await c.req.text();
18780
- * const event = await constructEvent(rawBody, c.req.header('x-curviate-signature')!, secret);
18925
+ * const event = await constructEvent(rawBody, c.req.header('curviate-signature')!, secret);
18781
18926
  * return c.text('ok');
18782
18927
  * });
18783
18928
  */
package/dist/index.js CHANGED
@@ -1630,7 +1630,7 @@ var WebhooksResource = class {
1630
1630
  });
1631
1631
  }
1632
1632
  /**
1633
- * Return the complete canonical webhook event catalogue (21 events, grouped by source).
1633
+ * Return the complete canonical webhook event catalogue (27 events, grouped by source).
1634
1634
  * `GET /v1/webhooks/events`
1635
1635
  */
1636
1636
  listEvents() {
@@ -1639,6 +1639,17 @@ var WebhooksResource = class {
1639
1639
  path: "/v1/webhooks/events"
1640
1640
  });
1641
1641
  }
1642
+ /**
1643
+ * Return a single webhook owned by the calling tenant.
1644
+ * `GET /v1/webhooks/{id}`
1645
+ * The plaintext secret is never present on a read — only `secret_prefix`.
1646
+ */
1647
+ get(id) {
1648
+ return this.ctx.request({
1649
+ method: "GET",
1650
+ path: `/v1/webhooks/${id}`
1651
+ });
1652
+ }
1642
1653
  /**
1643
1654
  * Update a webhook in place. `source` is immutable.
1644
1655
  * `PATCH /v1/webhooks/{id}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curviate/sdk",
3
- "version": "0.13.0",
3
+ "version": "0.14.1",
4
4
  "private": false,
5
5
  "description": "TypeScript SDK for the Curviate API.",
6
6
  "license": "MIT",
@@ -16617,7 +16617,7 @@ export interface paths {
16617
16617
  value: string;
16618
16618
  }[];
16619
16619
  /** @description Messaging events to subscribe to (default: [message.received]) */
16620
- events?: ("message.received" | "message.delivered" | "message.read" | "message.reaction" | "message.edited" | "message.deleted")[];
16620
+ events?: ("message.received" | "message.delivered" | "message.read" | "message.reaction" | "message.edited" | "message.deleted" | "chat.updated" | "chat.deleted")[];
16621
16621
  /**
16622
16622
  * @description Field-remapping keys for the messaging delivery payload
16623
16623
  * @default []
@@ -16652,7 +16652,7 @@ export interface paths {
16652
16652
  value: string;
16653
16653
  }[];
16654
16654
  /** @description User/relation events to subscribe to (default: [connection.accepted]) */
16655
- events?: "connection.accepted"[];
16655
+ events?: ("connection.accepted" | "connection.new")[];
16656
16656
  /**
16657
16657
  * @description Field-remapping keys for the user/relation delivery payload
16658
16658
  * @default []
@@ -16686,8 +16686,8 @@ export interface paths {
16686
16686
  key: string;
16687
16687
  value: string;
16688
16688
  }[];
16689
- /** @description Account-status events to subscribe to (default: all 7) */
16690
- events?: ("account.created" | "account.connected" | "account.synced" | "account.reconnected" | "account.reconnect_needed" | "account.creation_failed" | "account.disconnected" | "account.error" | "account.paused" | "account.connecting" | "account.permission_revoked")[];
16689
+ /** @description Account-status events to subscribe to (default: all 11 lifecycle events) */
16690
+ events?: ("account.created" | "account.connected" | "account.synced" | "account.reconnected" | "account.reconnect_needed" | "account.creation_failed" | "account.disconnected" | "account.error" | "account.paused" | "account.connecting" | "account.permission_revoked" | "account.initial_sync.running" | "account.initial_sync.completed" | "account.initial_sync.failed")[];
16691
16691
  };
16692
16692
  };
16693
16693
  };
@@ -16809,7 +16809,7 @@ export interface paths {
16809
16809
  };
16810
16810
  /**
16811
16811
  * List webhook event types
16812
- * @description Returns the complete canonical event catalogue (21 events) grouped by source: messaging (6), user (1), account_status (11), plus 3 tier-gated events. No quota consumed.
16812
+ * @description Returns the complete canonical event catalogue (27 events) grouped by source: messaging (8), user (2), account_status (14), plus 3 tier-gated events. No quota consumed.
16813
16813
  */
16814
16814
  get: {
16815
16815
  parameters: {
@@ -16851,6 +16851,11 @@ export interface paths {
16851
16851
  * @enum {string}
16852
16852
  */
16853
16853
  tier?: "recruiter" | "sales_nav";
16854
+ /**
16855
+ * @description Delivery timing. Omitted (equivalent to 'realtime') on every live-pushed event. 'no_longer_realtime' means no push exists for this event; 'not_realtime' means the event is polled, not pushed, and may lag the underlying LinkedIn event.
16856
+ * @enum {string}
16857
+ */
16858
+ availability?: "realtime" | "no_longer_realtime" | "not_realtime";
16854
16859
  }[];
16855
16860
  }[];
16856
16861
  };
@@ -16894,7 +16899,113 @@ export interface paths {
16894
16899
  path?: never;
16895
16900
  cookie?: never;
16896
16901
  };
16897
- get?: never;
16902
+ /**
16903
+ * Get a webhook
16904
+ * @description Returns a single webhook owned by the calling tenant. The plaintext secret is never present on a read — only the prefix.
16905
+ */
16906
+ get: {
16907
+ parameters: {
16908
+ query?: never;
16909
+ header?: never;
16910
+ path: {
16911
+ /** @description Webhook id (wh_-prefixed ULID). */
16912
+ id: string;
16913
+ };
16914
+ cookie?: never;
16915
+ };
16916
+ requestBody?: never;
16917
+ responses: {
16918
+ /** @description The webhook, if owned by the calling tenant. The signing secret is never returned on a read — only the prefix. */
16919
+ 200: {
16920
+ headers: {
16921
+ "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
16922
+ RateLimit: components["headers"]["RateLimit"];
16923
+ [name: string]: unknown;
16924
+ };
16925
+ content: {
16926
+ "application/json": {
16927
+ /**
16928
+ * @description Response type discriminator.
16929
+ * @enum {string}
16930
+ */
16931
+ object?: "webhook";
16932
+ /** @description Webhook id (wh_-prefixed ULID). */
16933
+ id?: string;
16934
+ /**
16935
+ * @description The event source this webhook subscribes to (immutable).
16936
+ * @enum {string}
16937
+ */
16938
+ source?: "messaging" | "user" | "account_status";
16939
+ /** @description The URL that receives delivery POST requests. */
16940
+ request_url?: string;
16941
+ /** @description Human-readable label. */
16942
+ name?: string | null;
16943
+ /**
16944
+ * @description Delivery body encoding.
16945
+ * @enum {string}
16946
+ */
16947
+ format?: "json" | "form";
16948
+ /** @description Accounts targeted by this webhook. Non-empty — each id is owned by the tenant. */
16949
+ account_ids?: string[];
16950
+ /** @description A disabled webhook is kept but delivers nothing. */
16951
+ enabled?: boolean;
16952
+ /** @description Custom headers added to each delivery POST. */
16953
+ headers?: {
16954
+ key?: string;
16955
+ value?: string;
16956
+ }[];
16957
+ /** @description Canonical event names this webhook subscribes to. */
16958
+ events?: string[];
16959
+ /** @description Field-remapping keys for the delivery payload (messaging and user sources only). */
16960
+ data?: string[];
16961
+ /** @description First 8 characters of the signing secret. The full secret is never returned on edit — it is preserved unchanged. */
16962
+ secret_prefix?: string;
16963
+ /** @description ISO-8601 creation timestamp. */
16964
+ created_at?: string;
16965
+ };
16966
+ };
16967
+ };
16968
+ /** @description Malformed or empty webhook id. */
16969
+ 400: {
16970
+ headers: {
16971
+ [name: string]: unknown;
16972
+ };
16973
+ content: {
16974
+ "application/json": components["schemas"]["Error"];
16975
+ };
16976
+ };
16977
+ /** @description Missing or invalid API key. */
16978
+ 401: {
16979
+ headers: {
16980
+ [name: string]: unknown;
16981
+ };
16982
+ content: {
16983
+ "application/json": components["schemas"]["Error"];
16984
+ };
16985
+ };
16986
+ /** @description Webhook not found or not owned by this tenant. */
16987
+ 404: {
16988
+ headers: {
16989
+ [name: string]: unknown;
16990
+ };
16991
+ content: {
16992
+ "application/json": components["schemas"]["Error"];
16993
+ };
16994
+ };
16995
+ /** @description Rate limited — slow down and retry after the hinted delay. */
16996
+ 429: {
16997
+ headers: {
16998
+ "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
16999
+ RateLimit: components["headers"]["RateLimit"];
17000
+ "Retry-After": components["headers"]["Retry-After"];
17001
+ [name: string]: unknown;
17002
+ };
17003
+ content: {
17004
+ "application/json": components["schemas"]["Error"];
17005
+ };
17006
+ };
17007
+ };
17008
+ };
16898
17009
  put?: never;
16899
17010
  post?: never;
16900
17011
  /**