Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ const nvPeopleSearch = await linkedapi.account.salesNavigatorSearchPeople({
currentCompanies: ["Tech Solutions", "Innovatech"],
previousCompanies: ["FutureCorp"],
schools: ["Harvard University", "MIT"],
yearsOfExperience: ["0-1", "1-2", "3-5"],
yearsOfExperience: ["lessThanOne", "oneToTwo", "threeToFive"],
},
});
```
Expand All @@ -371,7 +371,7 @@ Send connection requests to LinkedIn users with optional personalized messages.
```typescript
await linkedapi.account.sendConnectionRequest({
personUrl: "https://www.linkedin.com/in/john-doe",
message: "Hello! I'd love to connect and discuss opportunities.",
note: "Hello! I'd love to connect and discuss opportunities.",
});
```

Expand Down Expand Up @@ -559,7 +559,7 @@ Send messages to LinkedIn users through standard LinkedIn messaging.
- **Returns:** `Promise<WorkflowHandler<void>>` - Workflow handler (no result data)

```typescript
await linkedapi.account.messaging.sendMessage({
await linkedapi.account.sendMessage({
personUrl: "https://www.linkedin.com/in/john-doe",
text: "Hello! I saw your post about AI and wanted to connect.",
});
Expand All @@ -576,7 +576,7 @@ Sync conversation history with a LinkedIn user for message polling.
- **Related Methods:** Use with `pollConversations()` to retrieve message history

```typescript
await linkedapi.account.messaging.syncConversation({
await linkedapi.account.syncConversation({
personUrl: "https://www.linkedin.com/in/john-doe",
});
```
Expand All @@ -591,7 +591,7 @@ Send messages through Sales Navigator with enhanced messaging capabilities.
- **Returns:** `Promise<WorkflowHandler<void>>` - Workflow handler (no result data)

```typescript
await linkedapi.account.messaging.salesNavigatorSendMessage({
await linkedapi.account.salesNavigatorSendMessage({
personUrl: "https://www.linkedin.com/sales/people/ABC123",
subject: "Partnership Opportunity",
text: "Hi! I'd love to discuss potential collaboration opportunities.",
Expand All @@ -608,7 +608,7 @@ Sync Sales Navigator conversation for message polling.
- **Returns:** `Promise<WorkflowHandler<void>>` - Workflow handler (no result data)

```typescript
await linkedapi.account.messaging.salesNavigatorSyncConversation({
await linkedapi.account.salesNavigatorSyncConversation({
personUrl: "https://www.linkedin.com/sales/people/ABC123",
});
```
Expand All @@ -624,7 +624,7 @@ Poll multiple conversations to retrieve message history and new messages.
- **Prerequisites:** Must call `syncConversation()` or `salesNavigatorSyncConversation()` for each person before polling

```typescript
const response = await linkedapi.account.messaging.pollConversations([
const response = await linkedapi.account.pollConversations([
{ personUrl: "https://www.linkedin.com/in/john-doe", type: "st" },
{
personUrl: "https://www.linkedin.com/sales/people/ABC123",
Expand Down Expand Up @@ -835,7 +835,7 @@ const peopleSearchWorkflow = await linkedapi.data.searchPeople({
currentCompanies: ["Tech Solutions", "Innovatech"],
previousCompanies: ["FutureCorp"],
schools: ["Harvard University", "MIT"],
yearsOfExperience: ["0-1", "1-2", "3-5"],
yearsOfExperience: ["lessThanOne", "oneToTwo", "threeToFive"],
},
});
```
Expand Down
10 changes: 5 additions & 5 deletions examples/messaging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async function sendMessage(linkedapi: LinkedApi, personUrl: string): Promise<voi
text: 'Hi! I hope you\'re doing well. I came across your profile and was impressed by your work. I\'d love to connect and discuss potential collaboration opportunities.',
};

const messageWorkflow = await linkedapi.account.messaging.sendMessage(messageParams);
const messageWorkflow = await linkedapi.account.sendMessage(messageParams);
console.log('💬 Send message workflow started:', messageWorkflow.workflowId);

await messageWorkflow.result();
Expand All @@ -58,7 +58,7 @@ async function syncConversation(linkedapi: LinkedApi, personUrl: string): Promis
personUrl: personUrl,
};

const syncWorkflow = await linkedapi.account.messaging.syncConversation(syncParams);
const syncWorkflow = await linkedapi.account.syncConversation(syncParams);
console.log('🔄 Sync conversation workflow started:', syncWorkflow.workflowId);

await syncWorkflow.result();
Expand All @@ -76,7 +76,7 @@ async function salesNavigatorSendMessage(linkedapi: LinkedApi, personUrl: string
subject: 'Let\'s connect!',
};

const nvMessageWorkflow = await linkedapi.account.messaging.salesNavigatorSendMessage(nvMessageParams);
const nvMessageWorkflow = await linkedapi.account.salesNavigatorSendMessage(nvMessageParams);
console.log('🎯 Sales Navigator send message workflow started:', nvMessageWorkflow.workflowId);

await nvMessageWorkflow.result();
Expand All @@ -92,7 +92,7 @@ async function salesNavigatorSyncConversation(linkedapi: LinkedApi, personUrl: s
personUrl: personUrl,
};

const nvSyncWorkflow = await linkedapi.account.messaging.salesNavigatorSyncConversation(nvSyncParams);
const nvSyncWorkflow = await linkedapi.account.salesNavigatorSyncConversation(nvSyncParams);
console.log('🎯 Sales Navigator sync conversation workflow started:', nvSyncWorkflow.workflowId);

await nvSyncWorkflow.result();
Expand All @@ -104,7 +104,7 @@ async function salesNavigatorSyncConversation(linkedapi: LinkedApi, personUrl: s
async function pollConversations(linkedapi: LinkedApi, standardPersonUrl: string, nvPersonUrl: string): Promise<void> {
console.log('\n📥 Polling conversations...');

const pollResponse = await linkedapi.account.messaging.pollConversations([
const pollResponse = await linkedapi.account.pollConversations([
{
personUrl: standardPersonUrl,
type: 'st',
Expand Down
7 changes: 3 additions & 4 deletions examples/search-people.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import LinkedApi, { TSearchPeopleYearsOfExperience } from 'linkedapi-node';
import LinkedApi, { TYearsOfExperience } from 'linkedapi-node';

async function searchPeopleExample(): Promise<void> {
const linkedapi = new LinkedApi({
Expand Down Expand Up @@ -60,12 +60,11 @@ async function salesNavigatorExample(linkedapi: LinkedApi): Promise<void> {
term: 'product manager',
limit: 8,
filter: {
firstName: 'Sarah',
position: 'Product Manager',
industries: ['Technology', 'Financial Services'],
currentCompanies: ['Meta', 'Amazon', 'Netflix'],
previousCompanies: ['Uber', 'Airbnb'],
yearsOfExperience: ['3-5', '6-10'] as TSearchPeopleYearsOfExperience[],
previousCompanies: ['Uber', 'Airbnb', 'Microsoft'],
yearsOfExperience: ['threeToFive', 'sixToTen'] as TYearsOfExperience[],
},
};

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "linkedapi-node",
"version": "1.0.0-alpha.1",
"version": "1.0.1",
"description": "Official TypeScript SDK for Linked API",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
Loading