@curviate/sdk 0.1.0 → 0.2.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,28 @@ Versioning: semantic — minor for additive changes, patch for bug fixes; no sta
7
7
 
8
8
  ---
9
9
 
10
+ ## [0.2.0] — 2026-06-28
11
+
12
+ ### Added
13
+
14
+ - `profiles.getMe(params?)` now accepts an optional `linkedin_sections` array to request specific LinkedIn profile sections (e.g. education, experience, skills); responses include only the requested enrichment fields.
15
+ - `OwnProfile` type is normalized: `is_premium` and `is_open_profile` are always present on the response. Enriched section fields (`headline`, `summary`, `work_experience`, `education`, `skills`, and more) are present when the corresponding section was requested.
16
+ - `Chat` type now includes a `subject` field (nullable string) reflecting the conversation subject where available.
17
+
18
+ ### Changed
19
+
20
+ - Array-valued query parameters are now serialized as repeated keys (`?key=a&key=b`) rather than as a comma-joined string. This matches the server's expected format for array parameters such as `linkedin_sections`.
21
+
22
+ ---
23
+
24
+ ## [0.1.1] — 2026-06-22
25
+
26
+ ### Fixed
27
+
28
+ - Account-scoped write requests now send the account identifier in the request body where the API expects it. Previously the account identifier was always sent as a query parameter, regardless of the operation, which caused account-scoped write requests (sending invitations and InMail, posting and commenting, reacting, endorsing, saving leads, and the Recruiter pipeline writes) to be rejected. Read requests, body-less deletes, and filter-search requests are unaffected — they continue to carry the account identifier as a query parameter, matching the API. An account identifier you pass explicitly in a request still takes precedence and is never overwritten.
29
+
30
+ ---
31
+
10
32
  ## [0.1.0] — 2026-06-21
11
33
 
12
34
  Initial public release.
package/dist/index.d.ts CHANGED
@@ -66,12 +66,37 @@ type HttpMethod = "GET" | "HEAD" | "POST" | "PATCH" | "PUT" | "DELETE";
66
66
  * operation.
67
67
  */
68
68
 
69
+ /**
70
+ * Where the account-scoped `account_id` is injected for this call.
71
+ *
72
+ * `account_id`'s location is per-endpoint and method-dependent:
73
+ * - `"body"` — account-scoped write requests that carry a body declare
74
+ * `account_id` as a body field. The context writes it into the JSON object,
75
+ * or appends it as a form field when the body is `FormData` (multipart).
76
+ * - `"query"` — GET reads, body-less destructive verbs (DELETE), and
77
+ * filter-search POSTs (whose body is the filter set, with `account_id` in
78
+ * the query string) all carry it as a query parameter.
79
+ *
80
+ * Defaults to `"query"` so a method that omits it keeps the read-style location.
81
+ */
82
+ type AccountIdLocation = "body" | "query";
69
83
  /** Per-call request shape passed by a resource method. */
70
84
  interface RequestArgs {
71
85
  method: HttpMethod;
72
86
  path: string;
73
- query?: Record<string, string | number | boolean | undefined | null>;
87
+ /**
88
+ * Query params. Array values serialize as repeated params (e.g. `?k=a&k=b`)
89
+ * to support multi-value fields like `linkedin_sections`.
90
+ */
91
+ query?: Record<string, string | number | boolean | string[] | undefined | null>;
74
92
  body?: unknown;
93
+ /**
94
+ * Where to inject the context's fixed `account_id`. Defaults to `"query"`.
95
+ * Methods whose endpoint requires `account_id` in the request body set
96
+ * `"body"`; the context then routes it into the JSON object or appends it as
97
+ * a `FormData` field, matching the body kind.
98
+ */
99
+ accountIdIn?: AccountIdLocation;
75
100
  }
76
101
  /** The bound caller a resource receives. */
77
102
  type RequestFn = <T = unknown>(args: RequestArgs) => Promise<T>;
@@ -2552,6 +2577,8 @@ interface paths {
2552
2577
  * @enum {number}
2553
2578
  */
2554
2579
  pinned?: 0 | 1;
2580
+ /** @description The conversation subject or InMail subject line; null when none. */
2581
+ subject?: ((string | null) | null) | null;
2555
2582
  }[];
2556
2583
  /** @description Next-page cursor; null on the last page. */
2557
2584
  cursor?: string | null;
@@ -2936,6 +2963,8 @@ interface paths {
2936
2963
  * @enum {number}
2937
2964
  */
2938
2965
  pinned?: 0 | 1;
2966
+ /** @description The conversation subject or InMail subject line; null when none. */
2967
+ subject?: ((string | null) | null) | null;
2939
2968
  /** @description The most recent message in the chat, or null if empty. */
2940
2969
  lastMessage?: {
2941
2970
  /**
@@ -5043,13 +5072,13 @@ interface paths {
5043
5072
  account_id: string;
5044
5073
  /** @description Post body text (1–3000 chars). Not stored or logged. */
5045
5074
  text: string;
5046
- /** @description social_id of a post to repost. Reachability verified live by qa. */
5075
+ /** @description social_id of a post to repost. */
5047
5076
  repost?: string;
5048
- /** @description External URL to include in the post. Reachability verified live by qa. */
5077
+ /** @description External URL to include in the post. */
5049
5078
  external_link?: string;
5050
- /** @description Company page social_id to post as. Reachability verified live by qa. */
5079
+ /** @description Company page social_id to post as. */
5051
5080
  as_organization?: string;
5052
- /** @description JSON-encoded array of mention objects ({name, profile_id, is_company}). Reachability verified live by qa. */
5081
+ /** @description JSON-encoded array of mention objects ({name, profile_id, is_company}). */
5053
5082
  mentions?: {
5054
5083
  /** @description Display name of the mentioned person or company. */
5055
5084
  name: string;
@@ -5058,7 +5087,7 @@ interface paths {
5058
5087
  /** @description true if the mention is a company page. */
5059
5088
  is_company: boolean;
5060
5089
  }[];
5061
- /** @description Include a job posting in the post. Reachability verified live by qa. */
5090
+ /** @description Include a job posting in the post. */
5062
5091
  include_job_posting?: boolean;
5063
5092
  /**
5064
5093
  * Format: binary
@@ -5219,7 +5248,7 @@ interface paths {
5219
5248
  query: {
5220
5249
  /** @description Account ID to use for the request. */
5221
5250
  account_id: string;
5222
- /** @description When supplied, returns replies to this comment instead of top-level comments. Reachability verified live by qa. */
5251
+ /** @description When supplied, returns replies to this comment instead of top-level comments. */
5223
5252
  comment_id?: string;
5224
5253
  /** @description Maximum comments to return (1–50, default 20). */
5225
5254
  limit?: number;
@@ -5386,9 +5415,9 @@ interface paths {
5386
5415
  account_id: string;
5387
5416
  /** @description Comment text (1–1250 chars). Not stored or logged. */
5388
5417
  text: string;
5389
- /** @description When supplied, this comment is a reply to that comment rather than a top-level reply to the post. Reachability verified live by qa. */
5418
+ /** @description When supplied, this comment is a reply to that comment rather than a top-level reply to the post. */
5390
5419
  comment_id?: string;
5391
- /** @description JSON-encoded array of mention objects ({name, profile_id, is_company}). Reachability verified live by qa. */
5420
+ /** @description JSON-encoded array of mention objects ({name, profile_id, is_company}). */
5392
5421
  mentions?: {
5393
5422
  /** @description Display name of the mentioned person or company. */
5394
5423
  name: string;
@@ -5397,9 +5426,9 @@ interface paths {
5397
5426
  /** @description true if the mention is a company page. */
5398
5427
  is_company: boolean;
5399
5428
  }[];
5400
- /** @description Company page social_id to comment as. Reachability verified live by qa. */
5429
+ /** @description Company page social_id to comment as. */
5401
5430
  as_organization?: string;
5402
- /** @description External URL to include in the comment. Reachability verified live by qa. */
5431
+ /** @description External URL to include in the comment. */
5403
5432
  external_link?: string;
5404
5433
  /**
5405
5434
  * Format: binary
@@ -5548,7 +5577,7 @@ interface paths {
5548
5577
  };
5549
5578
  /**
5550
5579
  * List a post's reactions
5551
- * @description Returns reactions on a post. Each item includes the UPPERCASE reaction value and author. Error mapping is conservative — raw-path errors map to 502 unless qa verifies a cleaner status.
5580
+ * @description Returns reactions on a post. Each item includes the UPPERCASE reaction value and author.
5552
5581
  */
5553
5582
  get: {
5554
5583
  parameters: {
@@ -5723,9 +5752,9 @@ interface paths {
5723
5752
  * @enum {string}
5724
5753
  */
5725
5754
  reaction: "like" | "celebrate" | "support" | "love" | "insightful" | "funny";
5726
- /** @description When supplied, the reaction applies to this comment rather than the post. Reachability verified live by qa. */
5755
+ /** @description When supplied, the reaction applies to this comment rather than the post. */
5727
5756
  comment_id?: string;
5728
- /** @description Company page to react as. Reachability verified live by qa. */
5757
+ /** @description Company page to react as. */
5729
5758
  as_organization?: string;
5730
5759
  };
5731
5760
  };
@@ -5854,13 +5883,15 @@ interface paths {
5854
5883
  };
5855
5884
  /**
5856
5885
  * Retrieve your own profile
5857
- * @description Returns the connected account's own LinkedIn profile — name, headline, location, email, and premium/open-profile status.
5886
+ * @description Returns the connected account's own LinkedIn profile — name, headline, location, email, and premium/open-profile status. Request extra sections via linkedin_sections.
5858
5887
  */
5859
5888
  get: {
5860
5889
  parameters: {
5861
5890
  query: {
5862
5891
  /** @description The connected LinkedIn account to read with (acc_…). Required. */
5863
5892
  account_id: string;
5893
+ /** @description Which profile sections to fetch (repeatable). Allowed values: * (all sections), *_preview, about, experience, education, languages, skills, certifications, volunteering_experience, projects, recommendations_received, recommendations_given, and the _preview variant of each section. Omit for base fields only. */
5894
+ linkedin_sections?: ("*" | "*_preview" | "about" | "about_preview" | "experience" | "experience_preview" | "education" | "education_preview" | "languages" | "languages_preview" | "skills" | "skills_preview" | "certifications" | "certifications_preview" | "volunteering_experience" | "volunteering_experience_preview" | "projects" | "projects_preview" | "recommendations_received" | "recommendations_received_preview" | "recommendations_given" | "recommendations_given_preview")[];
5864
5895
  };
5865
5896
  header?: never;
5866
5897
  path?: never;
@@ -5893,12 +5924,12 @@ interface paths {
5893
5924
  /** @description Last name. */
5894
5925
  last_name?: string;
5895
5926
  /** @description LinkedIn public identifier (the slug after linkedin.com/in/). */
5896
- public_identifier?: string;
5897
- /** @description Full LinkedIn public profile URL. */
5927
+ public_identifier?: string | null;
5928
+ /** @description Full LinkedIn public profile URL, synthesized from the public identifier; null if the account has none. */
5898
5929
  public_profile_url?: string | null;
5899
5930
  /** @description Profile picture URL, or null if not set. */
5900
5931
  profile_picture_url?: string | null;
5901
- /** @description LinkedIn headline. */
5932
+ /** @description LinkedIn headline. Empty by default for the account's own profile; supply linkedin_sections to return the populated headline (enrichment path). */
5902
5933
  headline?: string | null;
5903
5934
  /** @description Location as set on the profile. */
5904
5935
  location?: string | null;
@@ -5907,11 +5938,35 @@ interface paths {
5907
5938
  /** @description Current occupation or role. */
5908
5939
  occupation?: string | null;
5909
5940
  /** @description true if this is a LinkedIn Premium account. */
5910
- premium?: boolean;
5941
+ is_premium?: boolean;
5911
5942
  /** @description true if the account has an open profile enabled. */
5912
- open_profile?: boolean;
5943
+ is_open_profile?: boolean;
5913
5944
  /** @description Organizations the account is associated with. */
5914
5945
  organizations?: Record<string, never>[];
5946
+ /** @description Total follower count. Absent by default; present only when linkedin_sections is supplied (enrichment path). */
5947
+ follower_count?: number;
5948
+ /** @description Total connection count. Absent by default; present only when linkedin_sections is supplied (enrichment path). */
5949
+ connections_count?: number;
5950
+ /** @description About/summary text (content pass-through — never stored). Present only when requested via linkedin_sections. */
5951
+ summary?: string | null;
5952
+ /** @description Work experience entries. Present only when requested via linkedin_sections. */
5953
+ work_experience?: Record<string, never>[];
5954
+ /** @description Education entries. Present only when requested via linkedin_sections. */
5955
+ education?: Record<string, never>[];
5956
+ /** @description Skills list. Present only when requested via linkedin_sections. */
5957
+ skills?: string[];
5958
+ /** @description Languages. Present only when requested via linkedin_sections. */
5959
+ languages?: string[];
5960
+ /** @description Certifications. Present only when requested via linkedin_sections. */
5961
+ certifications?: Record<string, never>[];
5962
+ /** @description Projects. Present only when requested via linkedin_sections. */
5963
+ projects?: Record<string, never>[];
5964
+ /** @description Volunteering experience entries. Present only when requested via linkedin_sections. */
5965
+ volunteering_experience?: Record<string, never>[];
5966
+ /** @description Recommendations (content pass-through — never stored). Present only when requested via linkedin_sections. */
5967
+ recommendations?: Record<string, never>[];
5968
+ /** @description Sections LinkedIn rate-limited away for this request. */
5969
+ throttled_sections?: string[];
5915
5970
  };
5916
5971
  };
5917
5972
  };
@@ -8288,7 +8343,7 @@ interface paths {
8288
8343
  };
8289
8344
  /**
8290
8345
  * Resolve search-filter IDs (Recruiter)
8291
- * @description Resolve human-readable terms to opaque Recruiter filter IDs for use in people search requests. The type parameter selects the filter family; type must be one of the 6 verified Recruiter values: GROUPS, DEPARTMENT, HIRING_PROJECTS, SAVED_SEARCHES, SAVED_FILTERS, DEGREE. Classic-only types (JOB_TITLE, LOCATION, PEOPLE, COMPANY, etc.) are rejected with 400 at schema validation, before any external call. Requires a Recruiter seat.
8346
+ * @description Resolve human-readable terms to opaque Recruiter filter IDs for use in people search requests. The type parameter selects the filter family; type must be one of the 6 Recruiter values: GROUPS, DEPARTMENT, HIRING_PROJECTS, SAVED_SEARCHES, SAVED_FILTERS, DEGREE. Classic-only types (JOB_TITLE, LOCATION, PEOPLE, COMPANY, etc.) are rejected with 400 at schema validation, before any external call. Requires a Recruiter seat.
8292
8347
  */
8293
8348
  get: {
8294
8349
  parameters: {
@@ -12267,7 +12322,7 @@ interface paths {
12267
12322
  };
12268
12323
  /**
12269
12324
  * Resolve search-filter IDs (Sales Navigator)
12270
- * @description Resolve human-readable terms to opaque Sales Navigator filter IDs for use in people or company search requests. The type parameter selects the filter family; type must be one of the 12 verified SN values. Classic-only types (LOCATION, PEOPLE, JOB_TITLE, etc.) are rejected with 400 at schema validation, before any external call. To resolve PEOPLE IDs (for the connections_of filter), use GET /v1/search/parameters instead. Requires a Sales Navigator seat.
12325
+ * @description Resolve human-readable terms to opaque Sales Navigator filter IDs for use in people or company search requests. The type parameter selects the filter family; type must be one of the 12 Sales Navigator values. Classic-only types (LOCATION, PEOPLE, JOB_TITLE, etc.) are rejected with 400 at schema validation, before any external call. To resolve PEOPLE IDs (for the connections_of filter), use GET /v1/search/parameters instead. Requires a Sales Navigator seat.
12271
12326
  */
12272
12327
  get: {
12273
12328
  parameters: {
@@ -14272,7 +14327,7 @@ interface paths {
14272
14327
  }[];
14273
14328
  /** @description Messaging events to subscribe to (default: [message.received]) */
14274
14329
  events?: ("message.received" | "message.delivered" | "message.read" | "message.reaction" | "message.edited" | "message.deleted")[];
14275
- /** @description Field-remapping keys for the messaging delivery payload (Array 1) */
14330
+ /** @description Field-remapping keys for the messaging delivery payload */
14276
14331
  data?: string[];
14277
14332
  } | {
14278
14333
  /** @constant */
@@ -14297,7 +14352,7 @@ interface paths {
14297
14352
  }[];
14298
14353
  /** @description User/relation events to subscribe to (default: [connection.accepted]) */
14299
14354
  events?: "connection.accepted"[];
14300
- /** @description Field-remapping keys for the user/relation delivery payload (Array 2) */
14355
+ /** @description Field-remapping keys for the user/relation delivery payload */
14301
14356
  data?: ("user_provider_id" | "user_full_name" | "user_public_identifier" | "user_profile_url" | "user_picture_url")[];
14302
14357
  } | {
14303
14358
  /** @constant */
@@ -15129,6 +15184,8 @@ declare class MessagingResource {
15129
15184
  /** Strip `account_id` from a query-param type (injected by the account-scoped context). */
15130
15185
  type WithoutAccountId<T> = Omit<T, "account_id">;
15131
15186
  type ProfileDetail = paths["/v1/profiles/me"]["get"]["responses"]["200"]["content"]["application/json"];
15187
+ /** Caller-facing query params for `profiles.getMe()` — `account_id` is injected by context. */
15188
+ type ProfileGetMeParams = WithoutAccountId<paths["/v1/profiles/me"]["get"]["parameters"]["query"]>;
15132
15189
  type ProfileGetResult = paths["/v1/profiles/{profile_id}"]["get"]["responses"]["200"]["content"]["application/json"];
15133
15190
  /** Caller-facing query params for `profiles.get()` — `account_id` is injected by context. */
15134
15191
  type ProfileGetParams = WithoutAccountId<paths["/v1/profiles/{profile_id}"]["get"]["parameters"]["query"]>;
@@ -15148,8 +15205,12 @@ type EndorseResult = paths["/v1/profiles/{profile_id}/endorse"]["post"]["respons
15148
15205
  declare class ProfilesResource {
15149
15206
  protected readonly ctx: RequestContext;
15150
15207
  constructor(ctx: RequestContext);
15151
- /** Get the account's own LinkedIn profile. `GET /v1/profiles/me` */
15152
- getMe(): Promise<ProfileDetail>;
15208
+ /**
15209
+ * Get the account's own LinkedIn profile. `GET /v1/profiles/me`
15210
+ * Pass `{ linkedin_sections: ['about', 'experience', ...] }` to request enriched sections.
15211
+ * The `account_id` is injected by the account-scoped context.
15212
+ */
15213
+ getMe(params?: ProfileGetMeParams): Promise<ProfileDetail>;
15153
15214
  /**
15154
15215
  * Get a LinkedIn member profile by id or public handle.
15155
15216
  * `GET /v1/profiles/{profile_id}`
package/dist/index.js CHANGED
@@ -182,7 +182,14 @@ function buildUrl(path, opts) {
182
182
  const url = new URL(path, opts.baseUrl);
183
183
  if (opts.query) {
184
184
  for (const [key, value] of Object.entries(opts.query)) {
185
- if (value !== void 0 && value !== null) url.searchParams.set(key, String(value));
185
+ if (value === void 0 || value === null) continue;
186
+ if (Array.isArray(value)) {
187
+ for (const v of value) {
188
+ url.searchParams.append(key, String(v));
189
+ }
190
+ } else {
191
+ url.searchParams.set(key, String(value));
192
+ }
186
193
  }
187
194
  }
188
195
  return url.toString();
@@ -242,9 +249,28 @@ async function execute(method, path, opts) {
242
249
  }
243
250
 
244
251
  // src/internal/context.ts
252
+ function injectAccountIdIntoBody(body, accountId) {
253
+ if (body instanceof FormData) {
254
+ if (!body.has("account_id")) body.append("account_id", accountId);
255
+ return body;
256
+ }
257
+ if (body !== null && typeof body === "object") {
258
+ const obj = body;
259
+ return "account_id" in obj ? obj : { account_id: accountId, ...obj };
260
+ }
261
+ return body;
262
+ }
245
263
  function createContext(config, accountId) {
246
264
  const request = (args) => {
247
- const query = accountId !== void 0 ? { account_id: accountId, ...args.query } : args.query;
265
+ const target = args.accountIdIn ?? "query";
266
+ let { query, body } = args;
267
+ if (accountId !== void 0) {
268
+ if (target === "body") {
269
+ body = injectAccountIdIntoBody(body, accountId);
270
+ } else {
271
+ query = { account_id: accountId, ...args.query };
272
+ }
273
+ }
248
274
  return execute(args.method, args.path, {
249
275
  apiKey: config.apiKey,
250
276
  baseUrl: config.baseUrl,
@@ -252,7 +278,7 @@ function createContext(config, accountId) {
252
278
  maxRetries: config.maxRetries,
253
279
  ...config.fetch ? { fetch: config.fetch } : {},
254
280
  ...query !== void 0 ? { query } : {},
255
- ...args.body !== void 0 ? { body: args.body } : {}
281
+ ...body !== void 0 ? { body } : {}
256
282
  });
257
283
  };
258
284
  return { request, accountId };
@@ -428,13 +454,15 @@ var MessagingResource = class {
428
454
  return this.ctx.request({
429
455
  method: "POST",
430
456
  path: "/v1/chats",
431
- body: buildFormData(scalars, attachments)
457
+ body: buildFormData(scalars, attachments),
458
+ accountIdIn: "body"
432
459
  });
433
460
  }
434
461
  return this.ctx.request({
435
462
  method: "POST",
436
463
  path: "/v1/chats",
437
- body: scalars
464
+ body: scalars,
465
+ accountIdIn: "body"
438
466
  });
439
467
  }
440
468
  /** Get details of a single chat. `GET /v1/chats/{chat_id}` */
@@ -462,13 +490,15 @@ var MessagingResource = class {
462
490
  return this.ctx.request({
463
491
  method: "POST",
464
492
  path: `/v1/chats/${chatId}/messages`,
465
- body: buildFormData(scalars, attachments)
493
+ body: buildFormData(scalars, attachments),
494
+ accountIdIn: "body"
466
495
  });
467
496
  }
468
497
  return this.ctx.request({
469
498
  method: "POST",
470
499
  path: `/v1/chats/${chatId}/messages`,
471
- body: scalars
500
+ body: scalars,
501
+ accountIdIn: "body"
472
502
  });
473
503
  }
474
504
  /** Trigger a re-sync of a specific chat's message history. `GET /v1/chats/{chat_id}/sync` */
@@ -516,7 +546,8 @@ var MessagingResource = class {
516
546
  return this.ctx.request({
517
547
  method: "POST",
518
548
  path: `/v1/messages/${messageId}/reactions`,
519
- body
549
+ body,
550
+ accountIdIn: "body"
520
551
  });
521
552
  }
522
553
  /** Send an InMail. `POST /v1/messages/inmail` */
@@ -524,7 +555,8 @@ var MessagingResource = class {
524
555
  return this.ctx.request({
525
556
  method: "POST",
526
557
  path: "/v1/messages/inmail",
527
- body
558
+ body,
559
+ accountIdIn: "body"
528
560
  });
529
561
  }
530
562
  /** Get the account's InMail credit balance. `GET /v1/messaging/inmail-balance` */
@@ -550,11 +582,16 @@ var ProfilesResource = class {
550
582
  constructor(ctx) {
551
583
  this.ctx = ctx;
552
584
  }
553
- /** Get the account's own LinkedIn profile. `GET /v1/profiles/me` */
554
- getMe() {
585
+ /**
586
+ * Get the account's own LinkedIn profile. `GET /v1/profiles/me`
587
+ * Pass `{ linkedin_sections: ['about', 'experience', ...] }` to request enriched sections.
588
+ * The `account_id` is injected by the account-scoped context.
589
+ */
590
+ getMe(params) {
555
591
  return this.ctx.request({
556
592
  method: "GET",
557
- path: "/v1/profiles/me"
593
+ path: "/v1/profiles/me",
594
+ ...params ? { query: params } : {}
558
595
  });
559
596
  }
560
597
  /**
@@ -625,7 +662,8 @@ var ProfilesResource = class {
625
662
  return this.ctx.request({
626
663
  method: "POST",
627
664
  path: `/v1/profiles/${profileId}/endorse`,
628
- body
665
+ body,
666
+ accountIdIn: "body"
629
667
  });
630
668
  }
631
669
  };
@@ -640,7 +678,8 @@ var InvitesResource = class {
640
678
  return this.ctx.request({
641
679
  method: "POST",
642
680
  path: "/v1/invites",
643
- body
681
+ body,
682
+ accountIdIn: "body"
644
683
  });
645
684
  }
646
685
  /** List sent invitations. `GET /v1/invites/sent` */
@@ -667,7 +706,8 @@ var InvitesResource = class {
667
706
  return this.ctx.request({
668
707
  method: "POST",
669
708
  path: `/v1/invites/received/${invitationId}`,
670
- body
709
+ body,
710
+ accountIdIn: "body"
671
711
  });
672
712
  }
673
713
  /** Cancel a sent invitation. `DELETE /v1/invites/{invitation_id}` */
@@ -796,7 +836,8 @@ var PostsResource = class {
796
836
  return this.ctx.request({
797
837
  method: "POST",
798
838
  path: "/v1/posts",
799
- body: form
839
+ body: form,
840
+ accountIdIn: "body"
800
841
  });
801
842
  }
802
843
  /** Get a single post. `GET /v1/posts/{post_id}` */
@@ -822,7 +863,8 @@ var PostsResource = class {
822
863
  return this.ctx.request({
823
864
  method: "POST",
824
865
  path: `/v1/posts/${postId}/comments`,
825
- body: buildFormData2(scalars, attachments)
866
+ body: buildFormData2(scalars, attachments),
867
+ accountIdIn: "body"
826
868
  });
827
869
  }
828
870
  /** List reactions on a post. `GET /v1/posts/{post_id}/reactions` */
@@ -838,7 +880,8 @@ var PostsResource = class {
838
880
  return this.ctx.request({
839
881
  method: "POST",
840
882
  path: `/v1/posts/${postId}/reactions`,
841
- body
883
+ body,
884
+ accountIdIn: "body"
842
885
  });
843
886
  }
844
887
  };
@@ -937,13 +980,15 @@ var SalesNavigatorResource = class {
937
980
  attachments,
938
981
  voice_message,
939
982
  video_message
940
- )
983
+ ),
984
+ accountIdIn: "body"
941
985
  });
942
986
  }
943
987
  return this.ctx.request({
944
988
  method: "POST",
945
989
  path: "/v1/sales-navigator/chats",
946
- body: scalars
990
+ body: scalars,
991
+ accountIdIn: "body"
947
992
  });
948
993
  }
949
994
  /**
@@ -965,7 +1010,8 @@ var SalesNavigatorResource = class {
965
1010
  return this.ctx.request({
966
1011
  method: "POST",
967
1012
  path: `/v1/sales-navigator/leads/${userId}`,
968
- body
1013
+ body,
1014
+ accountIdIn: "body"
969
1015
  });
970
1016
  }
971
1017
  /**
@@ -1050,13 +1096,15 @@ var RecruiterResource = class {
1050
1096
  attachments,
1051
1097
  voice_message,
1052
1098
  video_message
1053
- )
1099
+ ),
1100
+ accountIdIn: "body"
1054
1101
  });
1055
1102
  }
1056
1103
  return this.ctx.request({
1057
1104
  method: "POST",
1058
1105
  path: "/v1/recruiter/chats",
1059
- body: scalars
1106
+ body: scalars,
1107
+ accountIdIn: "body"
1060
1108
  });
1061
1109
  }
1062
1110
  /**
@@ -1121,7 +1169,8 @@ var RecruiterResource = class {
1121
1169
  return this.ctx.request({
1122
1170
  method: "POST",
1123
1171
  path: `/v1/recruiter/projects/candidates/${userId}`,
1124
- body
1172
+ body,
1173
+ accountIdIn: "body"
1125
1174
  });
1126
1175
  }
1127
1176
  /**
@@ -1132,7 +1181,8 @@ var RecruiterResource = class {
1132
1181
  return this.ctx.request({
1133
1182
  method: "POST",
1134
1183
  path: `/v1/recruiter/projects/applicants/${userId}`,
1135
- body
1184
+ body,
1185
+ accountIdIn: "body"
1136
1186
  });
1137
1187
  }
1138
1188
  /**
@@ -1143,7 +1193,8 @@ var RecruiterResource = class {
1143
1193
  return this.ctx.request({
1144
1194
  method: "POST",
1145
1195
  path: `/v1/recruiter/projects/applicants/${userId}/reject`,
1146
- body
1196
+ body,
1197
+ accountIdIn: "body"
1147
1198
  });
1148
1199
  }
1149
1200
  /**
@@ -1163,7 +1214,8 @@ var RecruiterResource = class {
1163
1214
  return this.ctx.request({
1164
1215
  method: "POST",
1165
1216
  path: "/v1/recruiter/jobs",
1166
- body
1217
+ body,
1218
+ accountIdIn: "body"
1167
1219
  });
1168
1220
  }
1169
1221
  /**
@@ -1174,7 +1226,8 @@ var RecruiterResource = class {
1174
1226
  return this.ctx.request({
1175
1227
  method: "POST",
1176
1228
  path: `/v1/recruiter/jobs/${jobId}/publish`,
1177
- body
1229
+ body,
1230
+ accountIdIn: "body"
1178
1231
  });
1179
1232
  }
1180
1233
  /**
@@ -1185,7 +1238,8 @@ var RecruiterResource = class {
1185
1238
  return this.ctx.request({
1186
1239
  method: "POST",
1187
1240
  path: `/v1/recruiter/jobs/${jobId}/checkpoint`,
1188
- body
1241
+ body,
1242
+ accountIdIn: "body"
1189
1243
  });
1190
1244
  }
1191
1245
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curviate/sdk",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "private": false,
5
5
  "description": "TypeScript SDK for the Curviate API.",
6
6
  "license": "MIT",
@@ -2472,6 +2472,8 @@ export interface paths {
2472
2472
  * @enum {number}
2473
2473
  */
2474
2474
  pinned?: 0 | 1;
2475
+ /** @description The conversation subject or InMail subject line; null when none. */
2476
+ subject?: ((string | null) | null) | null;
2475
2477
  }[];
2476
2478
  /** @description Next-page cursor; null on the last page. */
2477
2479
  cursor?: string | null;
@@ -2856,6 +2858,8 @@ export interface paths {
2856
2858
  * @enum {number}
2857
2859
  */
2858
2860
  pinned?: 0 | 1;
2861
+ /** @description The conversation subject or InMail subject line; null when none. */
2862
+ subject?: ((string | null) | null) | null;
2859
2863
  /** @description The most recent message in the chat, or null if empty. */
2860
2864
  lastMessage?: {
2861
2865
  /**
@@ -4963,13 +4967,13 @@ export interface paths {
4963
4967
  account_id: string;
4964
4968
  /** @description Post body text (1–3000 chars). Not stored or logged. */
4965
4969
  text: string;
4966
- /** @description social_id of a post to repost. Reachability verified live by qa. */
4970
+ /** @description social_id of a post to repost. */
4967
4971
  repost?: string;
4968
- /** @description External URL to include in the post. Reachability verified live by qa. */
4972
+ /** @description External URL to include in the post. */
4969
4973
  external_link?: string;
4970
- /** @description Company page social_id to post as. Reachability verified live by qa. */
4974
+ /** @description Company page social_id to post as. */
4971
4975
  as_organization?: string;
4972
- /** @description JSON-encoded array of mention objects ({name, profile_id, is_company}). Reachability verified live by qa. */
4976
+ /** @description JSON-encoded array of mention objects ({name, profile_id, is_company}). */
4973
4977
  mentions?: {
4974
4978
  /** @description Display name of the mentioned person or company. */
4975
4979
  name: string;
@@ -4978,7 +4982,7 @@ export interface paths {
4978
4982
  /** @description true if the mention is a company page. */
4979
4983
  is_company: boolean;
4980
4984
  }[];
4981
- /** @description Include a job posting in the post. Reachability verified live by qa. */
4985
+ /** @description Include a job posting in the post. */
4982
4986
  include_job_posting?: boolean;
4983
4987
  /**
4984
4988
  * Format: binary
@@ -5139,7 +5143,7 @@ export interface paths {
5139
5143
  query: {
5140
5144
  /** @description Account ID to use for the request. */
5141
5145
  account_id: string;
5142
- /** @description When supplied, returns replies to this comment instead of top-level comments. Reachability verified live by qa. */
5146
+ /** @description When supplied, returns replies to this comment instead of top-level comments. */
5143
5147
  comment_id?: string;
5144
5148
  /** @description Maximum comments to return (1–50, default 20). */
5145
5149
  limit?: number;
@@ -5306,9 +5310,9 @@ export interface paths {
5306
5310
  account_id: string;
5307
5311
  /** @description Comment text (1–1250 chars). Not stored or logged. */
5308
5312
  text: string;
5309
- /** @description When supplied, this comment is a reply to that comment rather than a top-level reply to the post. Reachability verified live by qa. */
5313
+ /** @description When supplied, this comment is a reply to that comment rather than a top-level reply to the post. */
5310
5314
  comment_id?: string;
5311
- /** @description JSON-encoded array of mention objects ({name, profile_id, is_company}). Reachability verified live by qa. */
5315
+ /** @description JSON-encoded array of mention objects ({name, profile_id, is_company}). */
5312
5316
  mentions?: {
5313
5317
  /** @description Display name of the mentioned person or company. */
5314
5318
  name: string;
@@ -5317,9 +5321,9 @@ export interface paths {
5317
5321
  /** @description true if the mention is a company page. */
5318
5322
  is_company: boolean;
5319
5323
  }[];
5320
- /** @description Company page social_id to comment as. Reachability verified live by qa. */
5324
+ /** @description Company page social_id to comment as. */
5321
5325
  as_organization?: string;
5322
- /** @description External URL to include in the comment. Reachability verified live by qa. */
5326
+ /** @description External URL to include in the comment. */
5323
5327
  external_link?: string;
5324
5328
  /**
5325
5329
  * Format: binary
@@ -5468,7 +5472,7 @@ export interface paths {
5468
5472
  };
5469
5473
  /**
5470
5474
  * List a post's reactions
5471
- * @description Returns reactions on a post. Each item includes the UPPERCASE reaction value and author. Error mapping is conservative — raw-path errors map to 502 unless qa verifies a cleaner status.
5475
+ * @description Returns reactions on a post. Each item includes the UPPERCASE reaction value and author.
5472
5476
  */
5473
5477
  get: {
5474
5478
  parameters: {
@@ -5643,9 +5647,9 @@ export interface paths {
5643
5647
  * @enum {string}
5644
5648
  */
5645
5649
  reaction: "like" | "celebrate" | "support" | "love" | "insightful" | "funny";
5646
- /** @description When supplied, the reaction applies to this comment rather than the post. Reachability verified live by qa. */
5650
+ /** @description When supplied, the reaction applies to this comment rather than the post. */
5647
5651
  comment_id?: string;
5648
- /** @description Company page to react as. Reachability verified live by qa. */
5652
+ /** @description Company page to react as. */
5649
5653
  as_organization?: string;
5650
5654
  };
5651
5655
  };
@@ -5774,13 +5778,15 @@ export interface paths {
5774
5778
  };
5775
5779
  /**
5776
5780
  * Retrieve your own profile
5777
- * @description Returns the connected account's own LinkedIn profile — name, headline, location, email, and premium/open-profile status.
5781
+ * @description Returns the connected account's own LinkedIn profile — name, headline, location, email, and premium/open-profile status. Request extra sections via linkedin_sections.
5778
5782
  */
5779
5783
  get: {
5780
5784
  parameters: {
5781
5785
  query: {
5782
5786
  /** @description The connected LinkedIn account to read with (acc_…). Required. */
5783
5787
  account_id: string;
5788
+ /** @description Which profile sections to fetch (repeatable). Allowed values: * (all sections), *_preview, about, experience, education, languages, skills, certifications, volunteering_experience, projects, recommendations_received, recommendations_given, and the _preview variant of each section. Omit for base fields only. */
5789
+ linkedin_sections?: ("*" | "*_preview" | "about" | "about_preview" | "experience" | "experience_preview" | "education" | "education_preview" | "languages" | "languages_preview" | "skills" | "skills_preview" | "certifications" | "certifications_preview" | "volunteering_experience" | "volunteering_experience_preview" | "projects" | "projects_preview" | "recommendations_received" | "recommendations_received_preview" | "recommendations_given" | "recommendations_given_preview")[];
5784
5790
  };
5785
5791
  header?: never;
5786
5792
  path?: never;
@@ -5813,12 +5819,12 @@ export interface paths {
5813
5819
  /** @description Last name. */
5814
5820
  last_name?: string;
5815
5821
  /** @description LinkedIn public identifier (the slug after linkedin.com/in/). */
5816
- public_identifier?: string;
5817
- /** @description Full LinkedIn public profile URL. */
5822
+ public_identifier?: string | null;
5823
+ /** @description Full LinkedIn public profile URL, synthesized from the public identifier; null if the account has none. */
5818
5824
  public_profile_url?: string | null;
5819
5825
  /** @description Profile picture URL, or null if not set. */
5820
5826
  profile_picture_url?: string | null;
5821
- /** @description LinkedIn headline. */
5827
+ /** @description LinkedIn headline. Empty by default for the account's own profile; supply linkedin_sections to return the populated headline (enrichment path). */
5822
5828
  headline?: string | null;
5823
5829
  /** @description Location as set on the profile. */
5824
5830
  location?: string | null;
@@ -5827,11 +5833,35 @@ export interface paths {
5827
5833
  /** @description Current occupation or role. */
5828
5834
  occupation?: string | null;
5829
5835
  /** @description true if this is a LinkedIn Premium account. */
5830
- premium?: boolean;
5836
+ is_premium?: boolean;
5831
5837
  /** @description true if the account has an open profile enabled. */
5832
- open_profile?: boolean;
5838
+ is_open_profile?: boolean;
5833
5839
  /** @description Organizations the account is associated with. */
5834
5840
  organizations?: Record<string, never>[];
5841
+ /** @description Total follower count. Absent by default; present only when linkedin_sections is supplied (enrichment path). */
5842
+ follower_count?: number;
5843
+ /** @description Total connection count. Absent by default; present only when linkedin_sections is supplied (enrichment path). */
5844
+ connections_count?: number;
5845
+ /** @description About/summary text (content pass-through — never stored). Present only when requested via linkedin_sections. */
5846
+ summary?: string | null;
5847
+ /** @description Work experience entries. Present only when requested via linkedin_sections. */
5848
+ work_experience?: Record<string, never>[];
5849
+ /** @description Education entries. Present only when requested via linkedin_sections. */
5850
+ education?: Record<string, never>[];
5851
+ /** @description Skills list. Present only when requested via linkedin_sections. */
5852
+ skills?: string[];
5853
+ /** @description Languages. Present only when requested via linkedin_sections. */
5854
+ languages?: string[];
5855
+ /** @description Certifications. Present only when requested via linkedin_sections. */
5856
+ certifications?: Record<string, never>[];
5857
+ /** @description Projects. Present only when requested via linkedin_sections. */
5858
+ projects?: Record<string, never>[];
5859
+ /** @description Volunteering experience entries. Present only when requested via linkedin_sections. */
5860
+ volunteering_experience?: Record<string, never>[];
5861
+ /** @description Recommendations (content pass-through — never stored). Present only when requested via linkedin_sections. */
5862
+ recommendations?: Record<string, never>[];
5863
+ /** @description Sections LinkedIn rate-limited away for this request. */
5864
+ throttled_sections?: string[];
5835
5865
  };
5836
5866
  };
5837
5867
  };
@@ -8208,7 +8238,7 @@ export interface paths {
8208
8238
  };
8209
8239
  /**
8210
8240
  * Resolve search-filter IDs (Recruiter)
8211
- * @description Resolve human-readable terms to opaque Recruiter filter IDs for use in people search requests. The type parameter selects the filter family; type must be one of the 6 verified Recruiter values: GROUPS, DEPARTMENT, HIRING_PROJECTS, SAVED_SEARCHES, SAVED_FILTERS, DEGREE. Classic-only types (JOB_TITLE, LOCATION, PEOPLE, COMPANY, etc.) are rejected with 400 at schema validation, before any external call. Requires a Recruiter seat.
8241
+ * @description Resolve human-readable terms to opaque Recruiter filter IDs for use in people search requests. The type parameter selects the filter family; type must be one of the 6 Recruiter values: GROUPS, DEPARTMENT, HIRING_PROJECTS, SAVED_SEARCHES, SAVED_FILTERS, DEGREE. Classic-only types (JOB_TITLE, LOCATION, PEOPLE, COMPANY, etc.) are rejected with 400 at schema validation, before any external call. Requires a Recruiter seat.
8212
8242
  */
8213
8243
  get: {
8214
8244
  parameters: {
@@ -12187,7 +12217,7 @@ export interface paths {
12187
12217
  };
12188
12218
  /**
12189
12219
  * Resolve search-filter IDs (Sales Navigator)
12190
- * @description Resolve human-readable terms to opaque Sales Navigator filter IDs for use in people or company search requests. The type parameter selects the filter family; type must be one of the 12 verified SN values. Classic-only types (LOCATION, PEOPLE, JOB_TITLE, etc.) are rejected with 400 at schema validation, before any external call. To resolve PEOPLE IDs (for the connections_of filter), use GET /v1/search/parameters instead. Requires a Sales Navigator seat.
12220
+ * @description Resolve human-readable terms to opaque Sales Navigator filter IDs for use in people or company search requests. The type parameter selects the filter family; type must be one of the 12 Sales Navigator values. Classic-only types (LOCATION, PEOPLE, JOB_TITLE, etc.) are rejected with 400 at schema validation, before any external call. To resolve PEOPLE IDs (for the connections_of filter), use GET /v1/search/parameters instead. Requires a Sales Navigator seat.
12191
12221
  */
12192
12222
  get: {
12193
12223
  parameters: {
@@ -14192,7 +14222,7 @@ export interface paths {
14192
14222
  }[];
14193
14223
  /** @description Messaging events to subscribe to (default: [message.received]) */
14194
14224
  events?: ("message.received" | "message.delivered" | "message.read" | "message.reaction" | "message.edited" | "message.deleted")[];
14195
- /** @description Field-remapping keys for the messaging delivery payload (Array 1) */
14225
+ /** @description Field-remapping keys for the messaging delivery payload */
14196
14226
  data?: string[];
14197
14227
  } | {
14198
14228
  /** @constant */
@@ -14217,7 +14247,7 @@ export interface paths {
14217
14247
  }[];
14218
14248
  /** @description User/relation events to subscribe to (default: [connection.accepted]) */
14219
14249
  events?: "connection.accepted"[];
14220
- /** @description Field-remapping keys for the user/relation delivery payload (Array 2) */
14250
+ /** @description Field-remapping keys for the user/relation delivery payload */
14221
14251
  data?: ("user_provider_id" | "user_full_name" | "user_public_identifier" | "user_profile_url" | "user_picture_url")[];
14222
14252
  } | {
14223
14253
  /** @constant */