Skip to content

Add skill endorsement operations - #10

Merged
KirillSergeevich merged 1 commit into
mainfrom
task/endorse-sdk
Oct 15, 2026
Merged

KirillSergeevich merged 1 commit into
mainfrom
task/endorse-sdk

Conversation

@KirillSergeevich

@KirillSergeevich KirillSergeevich commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds the SDK surface for the st.endorsePersonSkill action and the st.doForSkills iteration in Linked API.

  • endorsePersonSkill.execute({ personUrl, skillName }) endorses one skill on a 1st-degree connection's profile by its exact name; letter case and extra spaces are ignored. The result is void. Failures arrive in the usual errors list: personNotFound, connectionNotFound, skillNotFound, endorsementUnavailable, limitExceeded.
  • endorsePersonSkills.execute({ personUrl, skillNamePatterns? }) endorses every skill whose name matches any of the case-insensitive RE2 patterns, or every skill when skillNamePatterns is omitted. The workflow is st.openPersonPage → st.retrievePersonSkills → st.doForSkills → st.endorsePersonSkill.
    • Data: Array<{ skillName, success, error? }>. It lists only the selected skills, in profile order.
    • Per-skill errors stay on that skill's item, for example limitExceeded on the rest of the list after the daily cap, or connectionNotFound.
    • Workflow-level errors give no data and arrive in errors. These are failures to open the profile or read its skills: personNotFound, selfProfileNotAllowed, or a profile-view limitExceeded.
  • Adds skillNotFound, endorsementUnavailable and limitExceeded to the action error vocabulary. stEndorsements is already in TLimitCategory on main (Add stEndorsements limit category #11).
  • Version 2.3.19.

Rebased on main 540df6e. The branch keeps main's formatting of the files #11 touched.

Verification

  • npm run typecheck, npm run lint and npm run build pass.
  • npm test: 3 suites, 82 tests. That includes a new src/operations/__tests__/endorse-operations.test.ts, which exercises both operations through their public execute/result path with the HTTP layer mocked. It covers:
    • the exact request JSON, with and without patterns;
    • success;
    • every error type;
    • mixed per-skill results, with unselected skills dropped;
    • the capped tail;
    • root and read failures;
    • an empty selection.
  • npm pack --dry-run ships the new operations and no compiled tests.

@KirillSergeevich KirillSergeevich changed the title Add skill endorsement operations (2.4.0) Add skill endorsement operations (2.3.19) Oct 15, 2026
- endorsePersonSkill: endorse one skill on a 1st-degree connection's
  profile by its exact name.
- endorsePersonSkills: endorse every skill whose name matches any of the
  given case-insensitive RE2 patterns (all skills when omitted); returns
  the selected skills in profile order, each with its own success/error.
- Add the skillNotFound, endorsementUnavailable and limitExceeded action
  error types.
- Bump version to 2.3.19.
@KirillSergeevich KirillSergeevich changed the title Add skill endorsement operations (2.3.19) Add skill endorsement operations Oct 15, 2026
@KirillSergeevich
KirillSergeevich merged commit e06fc21 into main Oct 15, 2026
2 checks passed
@KirillSergeevich
KirillSergeevich deleted the task/endorse-sdk branch October 15, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant