@curviate/sdk 0.2.0 → 0.3.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,26 @@ Versioning: semantic — minor for additive changes, patch for bug fixes; no sta
7
7
 
8
8
  ---
9
9
 
10
+ ## [0.3.0] — 2026-06-29
11
+
12
+ ### Added
13
+
14
+ - `sendInMail` now accepts `surface: "classic"` for sending InMail from an account's own premium InMail credits (in addition to `"sales_nav"` and `"recruiter"`). The `recipient_urn` field accepts either a member URN (`urn:li:member:<id>`) or a member provider id (`ACo…`).
15
+
16
+ ### Changed
17
+
18
+ - Regenerated types from the current API: refreshed several endpoint descriptions (message delete, post id forms, reaction list) to match the live reference. No request/response shapes changed beyond the `surface` addition above.
19
+
20
+ ---
21
+
22
+ ## [0.2.1] — 2026-06-29
23
+
24
+ ### Fixed
25
+
26
+ - `deleteMessage` and `addReaction` no longer inject `account_id` into the request. The server resolves the owning account from the message id — sending a client-supplied `account_id` was rejected by the server's strict schema, making both methods unusable via `client.account(id)`. The server's schemas are also relaxed (patch on the server side) so existing SDK installs continue to work without updating.
27
+
28
+ ---
29
+
10
30
  ## [0.2.0] — 2026-06-28
11
31
 
12
32
  ### Added
package/dist/index.d.ts CHANGED
@@ -76,10 +76,14 @@ type HttpMethod = "GET" | "HEAD" | "POST" | "PATCH" | "PUT" | "DELETE";
76
76
  * - `"query"` — GET reads, body-less destructive verbs (DELETE), and
77
77
  * filter-search POSTs (whose body is the filter set, with `account_id` in
78
78
  * the query string) all carry it as a query parameter.
79
+ * - `"none"` — the endpoint resolves the owning account server-side; the
80
+ * SDK sends no `account_id` in the query or body. Use for id-scoped
81
+ * operations where the server infers ownership from the resource id
82
+ * (e.g. `deleteMessage`, `addReaction`).
79
83
  *
80
84
  * Defaults to `"query"` so a method that omits it keeps the read-style location.
81
85
  */
82
- type AccountIdLocation = "body" | "query";
86
+ type AccountIdLocation = "body" | "query" | "none";
83
87
  /** Per-call request shape passed by a resource method. */
84
88
  interface RequestArgs {
85
89
  method: HttpMethod;
@@ -3719,7 +3723,7 @@ interface paths {
3719
3723
  post?: never;
3720
3724
  /**
3721
3725
  * Delete a message
3722
- * @description Deletes a previously sent message within the ~60-minute delete window. A persistent 502 on an older message most likely means the window has passed. A bare DELETE with account_id query param is all that is required.
3726
+ * @description Deletes a previously sent message within the ~60-minute delete window. A persistent 502 on an older message most likely means the window has passed. A bare DELETE is all that is required; the owning account is resolved server-side.
3723
3727
  */
3724
3728
  delete: {
3725
3729
  parameters: {
@@ -4385,7 +4389,7 @@ interface paths {
4385
4389
  put?: never;
4386
4390
  /**
4387
4391
  * Send an InMail
4388
- * @description Sends a LinkedIn InMail to a member who is not a direct connection. The surface field selects whether the send is attributed to a prospecting or recruiting seat.
4392
+ * @description Sends a LinkedIn InMail to a member who is not a direct connection. The surface field selects the sending context: classic uses the account's own premium InMail credits, while sales_nav and recruiter attribute the send to the matching seat.
4389
4393
  */
4390
4394
  post: {
4391
4395
  parameters: {
@@ -4399,13 +4403,13 @@ interface paths {
4399
4403
  "application/json": {
4400
4404
  /** @description The connected LinkedIn account to send the InMail from. */
4401
4405
  account_id: string;
4402
- /** @description LinkedIn member URN of the InMail recipient (e.g. urn:li:member:99999). */
4406
+ /** @description LinkedIn member URN (`urn:li:member:<id>`) or member provider id (`ACo…`). */
4403
4407
  recipient_urn: string;
4404
4408
  /**
4405
- * @description InMail surface — determines which access level is required (sales_nav or recruiter).
4409
+ * @description InMail surface — determines which access level is required (classic, sales_nav, or recruiter).
4406
4410
  * @enum {string}
4407
4411
  */
4408
- surface: "sales_nav" | "recruiter";
4412
+ surface: "sales_nav" | "recruiter" | "classic";
4409
4413
  /** @description InMail subject line (1–200 chars). */
4410
4414
  subject: string;
4411
4415
  /** @description InMail body text (1–8000 chars). */
@@ -4453,7 +4457,7 @@ interface paths {
4453
4457
  "application/json": components["schemas"]["Error"];
4454
4458
  };
4455
4459
  };
4456
- /** @description The account plan does not include Sales Navigator or Recruiter access — upgrade required. */
4460
+ /** @description The classic surface requires only a connected account; the sales_nav and recruiter surfaces require the matching plan access — upgrade required. Also returned when the account lacks the InMail credits or feature needed to send. */
4457
4461
  403: {
4458
4462
  headers: {
4459
4463
  [name: string]: unknown;
@@ -4695,7 +4699,7 @@ interface paths {
4695
4699
  };
4696
4700
  header?: never;
4697
4701
  path: {
4698
- /** @description The post's `social_id`, as returned by the get-post / list-posts response. LinkedIn post URL id-forms accepted: if the URL contains `activity-` use the bare numeric id (e.g. `…-activity-7332661864792854528-…` `7332661864792854528`); if it contains `ugcPost-` use `urn:li:ugcPost:ID`; if it contains `share-` use `urn:li:share:ID`. Alternatively, use the `social_id` returned by GET /v1/posts, list endpoints, or create. */
4702
+ /** @description The post's `social_id`, as returned by the get-post / list-posts response. Full LinkedIn share URLs are accepted directly (e.g. `https://www.linkedin.com/posts/someone_title-activity-7332661864792854528-Qh99/` or `https://www.linkedin.com/feed/update/urn:li:activity:7332661864792854528-slug`). Bare numeric ids and URN forms are also accepted: `7332661864792854528`, `urn:li:activity:N`, `urn:li:ugcPost:N`, `urn:li:share:N`. */
4699
4703
  post_id: string;
4700
4704
  };
4701
4705
  cookie?: never;
@@ -5257,7 +5261,7 @@ interface paths {
5257
5261
  };
5258
5262
  header?: never;
5259
5263
  path: {
5260
- /** @description The post's `social_id`, as returned by the get-post / list-posts response. LinkedIn post URL id-forms accepted: if the URL contains `activity-` use the bare numeric id (e.g. `…-activity-7332661864792854528-…` `7332661864792854528`); if it contains `ugcPost-` use `urn:li:ugcPost:ID`; if it contains `share-` use `urn:li:share:ID`. Alternatively, use the `social_id` returned by GET /v1/posts, list endpoints, or create. */
5264
+ /** @description The post's `social_id`, as returned by the get-post / list-posts response. Full LinkedIn share URLs are accepted directly (e.g. `https://www.linkedin.com/posts/someone_title-activity-7332661864792854528-Qh99/` or `https://www.linkedin.com/feed/update/urn:li:activity:7332661864792854528-slug`). Bare numeric ids and URN forms are also accepted: `7332661864792854528`, `urn:li:activity:N`, `urn:li:ugcPost:N`, `urn:li:share:N`. */
5261
5265
  post_id: string;
5262
5266
  };
5263
5267
  cookie?: never;
@@ -5403,7 +5407,7 @@ interface paths {
5403
5407
  query?: never;
5404
5408
  header?: never;
5405
5409
  path: {
5406
- /** @description The post's `social_id`, as returned by the get-post / list-posts response. LinkedIn post URL id-forms accepted: if the URL contains `activity-` use the bare numeric id (e.g. `…-activity-7332661864792854528-…` `7332661864792854528`); if it contains `ugcPost-` use `urn:li:ugcPost:ID`; if it contains `share-` use `urn:li:share:ID`. Alternatively, use the `social_id` returned by GET /v1/posts, list endpoints, or create. */
5410
+ /** @description The post's `social_id`, as returned by the get-post / list-posts response. Full LinkedIn share URLs are accepted directly (e.g. `https://www.linkedin.com/posts/someone_title-activity-7332661864792854528-Qh99/` or `https://www.linkedin.com/feed/update/urn:li:activity:7332661864792854528-slug`). Bare numeric ids and URN forms are also accepted: `7332661864792854528`, `urn:li:activity:N`, `urn:li:ugcPost:N`, `urn:li:share:N`. */
5407
5411
  post_id: string;
5408
5412
  };
5409
5413
  cookie?: never;
@@ -5584,14 +5588,14 @@ interface paths {
5584
5588
  query: {
5585
5589
  /** @description Account ID to use for the request. */
5586
5590
  account_id: string;
5587
- /** @description Maximum reactions to return (1–50, default 20). */
5591
+ /** @description Maximum reactions to return (1–50, default 20). A cursor: null in the response does not confirm all reactions were returned — the list may be truncated at the requested limit. Use the --all flag or the paginate() helper for exhaustive reads. */
5588
5592
  limit?: number;
5589
5593
  /** @description Pagination cursor from a previous response. */
5590
5594
  cursor?: string;
5591
5595
  };
5592
5596
  header?: never;
5593
5597
  path: {
5594
- /** @description The post's `social_id`, as returned by the get-post / list-posts response. LinkedIn post URL id-forms accepted: if the URL contains `activity-` use the bare numeric id (e.g. `…-activity-7332661864792854528-…` `7332661864792854528`); if it contains `ugcPost-` use `urn:li:ugcPost:ID`; if it contains `share-` use `urn:li:share:ID`. Alternatively, use the `social_id` returned by GET /v1/posts, list endpoints, or create. */
5598
+ /** @description The post's `social_id`, as returned by the get-post / list-posts response. Full LinkedIn share URLs are accepted directly (e.g. `https://www.linkedin.com/posts/someone_title-activity-7332661864792854528-Qh99/` or `https://www.linkedin.com/feed/update/urn:li:activity:7332661864792854528-slug`). Bare numeric ids and URN forms are also accepted: `7332661864792854528`, `urn:li:activity:N`, `urn:li:ugcPost:N`, `urn:li:share:N`. */
5595
5599
  post_id: string;
5596
5600
  };
5597
5601
  cookie?: never;
@@ -5737,7 +5741,7 @@ interface paths {
5737
5741
  query?: never;
5738
5742
  header?: never;
5739
5743
  path: {
5740
- /** @description The post's `social_id`, as returned by the get-post / list-posts response. LinkedIn post URL id-forms accepted: if the URL contains `activity-` use the bare numeric id (e.g. `…-activity-7332661864792854528-…` `7332661864792854528`); if it contains `ugcPost-` use `urn:li:ugcPost:ID`; if it contains `share-` use `urn:li:share:ID`. Alternatively, use the `social_id` returned by GET /v1/posts, list endpoints, or create. */
5744
+ /** @description The post's `social_id`, as returned by the get-post / list-posts response. Full LinkedIn share URLs are accepted directly (e.g. `https://www.linkedin.com/posts/someone_title-activity-7332661864792854528-Qh99/` or `https://www.linkedin.com/feed/update/urn:li:activity:7332661864792854528-slug`). Bare numeric ids and URN forms are also accepted: `7332661864792854528`, `urn:li:activity:N`, `urn:li:ugcPost:N`, `urn:li:share:N`. */
5741
5745
  post_id: string;
5742
5746
  };
5743
5747
  cookie?: never;
package/dist/index.js CHANGED
@@ -267,6 +267,7 @@ function createContext(config, accountId) {
267
267
  if (accountId !== void 0) {
268
268
  if (target === "body") {
269
269
  body = injectAccountIdIntoBody(body, accountId);
270
+ } else if (target === "none") {
270
271
  } else {
271
272
  query = { account_id: accountId, ...args.query };
272
273
  }
@@ -527,7 +528,9 @@ var MessagingResource = class {
527
528
  deleteMessage(messageId) {
528
529
  return this.ctx.request({
529
530
  method: "DELETE",
530
- path: `/v1/messages/${messageId}`
531
+ path: `/v1/messages/${messageId}`,
532
+ accountIdIn: "none"
533
+ // server resolves owning account from message id
531
534
  });
532
535
  }
533
536
  /**
@@ -547,7 +550,8 @@ var MessagingResource = class {
547
550
  method: "POST",
548
551
  path: `/v1/messages/${messageId}/reactions`,
549
552
  body,
550
- accountIdIn: "body"
553
+ accountIdIn: "none"
554
+ // server resolves owning account from message id
551
555
  });
552
556
  }
553
557
  /** Send an InMail. `POST /v1/messages/inmail` */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curviate/sdk",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "private": false,
5
5
  "description": "TypeScript SDK for the Curviate API.",
6
6
  "license": "MIT",
@@ -8,7 +8,7 @@
8
8
  "homepage": "https://docs.curviate.com",
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "https://github.com/curviate/sdk.git"
11
+ "url": "git+https://github.com/curviate/sdk.git"
12
12
  },
13
13
  "bugs": {
14
14
  "url": "https://github.com/curviate/sdk/issues"
@@ -3614,7 +3614,7 @@ export interface paths {
3614
3614
  post?: never;
3615
3615
  /**
3616
3616
  * Delete a message
3617
- * @description Deletes a previously sent message within the ~60-minute delete window. A persistent 502 on an older message most likely means the window has passed. A bare DELETE with account_id query param is all that is required.
3617
+ * @description Deletes a previously sent message within the ~60-minute delete window. A persistent 502 on an older message most likely means the window has passed. A bare DELETE is all that is required; the owning account is resolved server-side.
3618
3618
  */
3619
3619
  delete: {
3620
3620
  parameters: {
@@ -4280,7 +4280,7 @@ export interface paths {
4280
4280
  put?: never;
4281
4281
  /**
4282
4282
  * Send an InMail
4283
- * @description Sends a LinkedIn InMail to a member who is not a direct connection. The surface field selects whether the send is attributed to a prospecting or recruiting seat.
4283
+ * @description Sends a LinkedIn InMail to a member who is not a direct connection. The surface field selects the sending context: classic uses the account's own premium InMail credits, while sales_nav and recruiter attribute the send to the matching seat.
4284
4284
  */
4285
4285
  post: {
4286
4286
  parameters: {
@@ -4294,13 +4294,13 @@ export interface paths {
4294
4294
  "application/json": {
4295
4295
  /** @description The connected LinkedIn account to send the InMail from. */
4296
4296
  account_id: string;
4297
- /** @description LinkedIn member URN of the InMail recipient (e.g. urn:li:member:99999). */
4297
+ /** @description LinkedIn member URN (`urn:li:member:<id>`) or member provider id (`ACo…`). */
4298
4298
  recipient_urn: string;
4299
4299
  /**
4300
- * @description InMail surface — determines which access level is required (sales_nav or recruiter).
4300
+ * @description InMail surface — determines which access level is required (classic, sales_nav, or recruiter).
4301
4301
  * @enum {string}
4302
4302
  */
4303
- surface: "sales_nav" | "recruiter";
4303
+ surface: "sales_nav" | "recruiter" | "classic";
4304
4304
  /** @description InMail subject line (1–200 chars). */
4305
4305
  subject: string;
4306
4306
  /** @description InMail body text (1–8000 chars). */
@@ -4348,7 +4348,7 @@ export interface paths {
4348
4348
  "application/json": components["schemas"]["Error"];
4349
4349
  };
4350
4350
  };
4351
- /** @description The account plan does not include Sales Navigator or Recruiter access — upgrade required. */
4351
+ /** @description The classic surface requires only a connected account; the sales_nav and recruiter surfaces require the matching plan access — upgrade required. Also returned when the account lacks the InMail credits or feature needed to send. */
4352
4352
  403: {
4353
4353
  headers: {
4354
4354
  [name: string]: unknown;
@@ -4590,7 +4590,7 @@ export interface paths {
4590
4590
  };
4591
4591
  header?: never;
4592
4592
  path: {
4593
- /** @description The post's `social_id`, as returned by the get-post / list-posts response. LinkedIn post URL id-forms accepted: if the URL contains `activity-` use the bare numeric id (e.g. `…-activity-7332661864792854528-…` `7332661864792854528`); if it contains `ugcPost-` use `urn:li:ugcPost:ID`; if it contains `share-` use `urn:li:share:ID`. Alternatively, use the `social_id` returned by GET /v1/posts, list endpoints, or create. */
4593
+ /** @description The post's `social_id`, as returned by the get-post / list-posts response. Full LinkedIn share URLs are accepted directly (e.g. `https://www.linkedin.com/posts/someone_title-activity-7332661864792854528-Qh99/` or `https://www.linkedin.com/feed/update/urn:li:activity:7332661864792854528-slug`). Bare numeric ids and URN forms are also accepted: `7332661864792854528`, `urn:li:activity:N`, `urn:li:ugcPost:N`, `urn:li:share:N`. */
4594
4594
  post_id: string;
4595
4595
  };
4596
4596
  cookie?: never;
@@ -5152,7 +5152,7 @@ export interface paths {
5152
5152
  };
5153
5153
  header?: never;
5154
5154
  path: {
5155
- /** @description The post's `social_id`, as returned by the get-post / list-posts response. LinkedIn post URL id-forms accepted: if the URL contains `activity-` use the bare numeric id (e.g. `…-activity-7332661864792854528-…` `7332661864792854528`); if it contains `ugcPost-` use `urn:li:ugcPost:ID`; if it contains `share-` use `urn:li:share:ID`. Alternatively, use the `social_id` returned by GET /v1/posts, list endpoints, or create. */
5155
+ /** @description The post's `social_id`, as returned by the get-post / list-posts response. Full LinkedIn share URLs are accepted directly (e.g. `https://www.linkedin.com/posts/someone_title-activity-7332661864792854528-Qh99/` or `https://www.linkedin.com/feed/update/urn:li:activity:7332661864792854528-slug`). Bare numeric ids and URN forms are also accepted: `7332661864792854528`, `urn:li:activity:N`, `urn:li:ugcPost:N`, `urn:li:share:N`. */
5156
5156
  post_id: string;
5157
5157
  };
5158
5158
  cookie?: never;
@@ -5298,7 +5298,7 @@ export interface paths {
5298
5298
  query?: never;
5299
5299
  header?: never;
5300
5300
  path: {
5301
- /** @description The post's `social_id`, as returned by the get-post / list-posts response. LinkedIn post URL id-forms accepted: if the URL contains `activity-` use the bare numeric id (e.g. `…-activity-7332661864792854528-…` `7332661864792854528`); if it contains `ugcPost-` use `urn:li:ugcPost:ID`; if it contains `share-` use `urn:li:share:ID`. Alternatively, use the `social_id` returned by GET /v1/posts, list endpoints, or create. */
5301
+ /** @description The post's `social_id`, as returned by the get-post / list-posts response. Full LinkedIn share URLs are accepted directly (e.g. `https://www.linkedin.com/posts/someone_title-activity-7332661864792854528-Qh99/` or `https://www.linkedin.com/feed/update/urn:li:activity:7332661864792854528-slug`). Bare numeric ids and URN forms are also accepted: `7332661864792854528`, `urn:li:activity:N`, `urn:li:ugcPost:N`, `urn:li:share:N`. */
5302
5302
  post_id: string;
5303
5303
  };
5304
5304
  cookie?: never;
@@ -5479,14 +5479,14 @@ export interface paths {
5479
5479
  query: {
5480
5480
  /** @description Account ID to use for the request. */
5481
5481
  account_id: string;
5482
- /** @description Maximum reactions to return (1–50, default 20). */
5482
+ /** @description Maximum reactions to return (1–50, default 20). A cursor: null in the response does not confirm all reactions were returned — the list may be truncated at the requested limit. Use the --all flag or the paginate() helper for exhaustive reads. */
5483
5483
  limit?: number;
5484
5484
  /** @description Pagination cursor from a previous response. */
5485
5485
  cursor?: string;
5486
5486
  };
5487
5487
  header?: never;
5488
5488
  path: {
5489
- /** @description The post's `social_id`, as returned by the get-post / list-posts response. LinkedIn post URL id-forms accepted: if the URL contains `activity-` use the bare numeric id (e.g. `…-activity-7332661864792854528-…` `7332661864792854528`); if it contains `ugcPost-` use `urn:li:ugcPost:ID`; if it contains `share-` use `urn:li:share:ID`. Alternatively, use the `social_id` returned by GET /v1/posts, list endpoints, or create. */
5489
+ /** @description The post's `social_id`, as returned by the get-post / list-posts response. Full LinkedIn share URLs are accepted directly (e.g. `https://www.linkedin.com/posts/someone_title-activity-7332661864792854528-Qh99/` or `https://www.linkedin.com/feed/update/urn:li:activity:7332661864792854528-slug`). Bare numeric ids and URN forms are also accepted: `7332661864792854528`, `urn:li:activity:N`, `urn:li:ugcPost:N`, `urn:li:share:N`. */
5490
5490
  post_id: string;
5491
5491
  };
5492
5492
  cookie?: never;
@@ -5632,7 +5632,7 @@ export interface paths {
5632
5632
  query?: never;
5633
5633
  header?: never;
5634
5634
  path: {
5635
- /** @description The post's `social_id`, as returned by the get-post / list-posts response. LinkedIn post URL id-forms accepted: if the URL contains `activity-` use the bare numeric id (e.g. `…-activity-7332661864792854528-…` `7332661864792854528`); if it contains `ugcPost-` use `urn:li:ugcPost:ID`; if it contains `share-` use `urn:li:share:ID`. Alternatively, use the `social_id` returned by GET /v1/posts, list endpoints, or create. */
5635
+ /** @description The post's `social_id`, as returned by the get-post / list-posts response. Full LinkedIn share URLs are accepted directly (e.g. `https://www.linkedin.com/posts/someone_title-activity-7332661864792854528-Qh99/` or `https://www.linkedin.com/feed/update/urn:li:activity:7332661864792854528-slug`). Bare numeric ids and URN forms are also accepted: `7332661864792854528`, `urn:li:activity:N`, `urn:li:ugcPost:N`, `urn:li:share:N`. */
5636
5636
  post_id: string;
5637
5637
  };
5638
5638
  cookie?: never;