Skip to content

Commit 1d8cfc5

Browse files
Merge pull request #1 from Linked-API/1.0.1
1.0.1
2 parents fe39174 + 6dc7705 commit 1d8cfc5

File tree

10 files changed

+251
-311
lines changed

10 files changed

+251
-311
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ const nvPeopleSearch = await linkedapi.account.salesNavigatorSearchPeople({
354354
currentCompanies: ["Tech Solutions", "Innovatech"],
355355
previousCompanies: ["FutureCorp"],
356356
schools: ["Harvard University", "MIT"],
357-
yearsOfExperience: ["0-1", "1-2", "3-5"],
357+
yearsOfExperience: ["lessThanOne", "oneToTwo", "threeToFive"],
358358
},
359359
});
360360
```
@@ -371,7 +371,7 @@ Send connection requests to LinkedIn users with optional personalized messages.
371371
```typescript
372372
await linkedapi.account.sendConnectionRequest({
373373
personUrl: "https://www.linkedin.com/in/john-doe",
374-
message: "Hello! I'd love to connect and discuss opportunities.",
374+
note: "Hello! I'd love to connect and discuss opportunities.",
375375
});
376376
```
377377

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

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

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

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

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

626626
```typescript
627-
const response = await linkedapi.account.messaging.pollConversations([
627+
const response = await linkedapi.account.pollConversations([
628628
{ personUrl: "https://www.linkedin.com/in/john-doe", type: "st" },
629629
{
630630
personUrl: "https://www.linkedin.com/sales/people/ABC123",
@@ -835,7 +835,7 @@ const peopleSearchWorkflow = await linkedapi.data.searchPeople({
835835
currentCompanies: ["Tech Solutions", "Innovatech"],
836836
previousCompanies: ["FutureCorp"],
837837
schools: ["Harvard University", "MIT"],
838-
yearsOfExperience: ["0-1", "1-2", "3-5"],
838+
yearsOfExperience: ["lessThanOne", "oneToTwo", "threeToFive"],
839839
},
840840
});
841841
```

examples/messaging.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async function sendMessage(linkedapi: LinkedApi, personUrl: string): Promise<voi
4242
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.',
4343
};
4444

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

4848
await messageWorkflow.result();
@@ -58,7 +58,7 @@ async function syncConversation(linkedapi: LinkedApi, personUrl: string): Promis
5858
personUrl: personUrl,
5959
};
6060

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

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

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

8282
await nvMessageWorkflow.result();
@@ -92,7 +92,7 @@ async function salesNavigatorSyncConversation(linkedapi: LinkedApi, personUrl: s
9292
personUrl: personUrl,
9393
};
9494

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

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

107-
const pollResponse = await linkedapi.account.messaging.pollConversations([
107+
const pollResponse = await linkedapi.account.pollConversations([
108108
{
109109
personUrl: standardPersonUrl,
110110
type: 'st',

examples/search-people.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import LinkedApi, { TSearchPeopleYearsOfExperience } from 'linkedapi-node';
1+
import LinkedApi, { TYearsOfExperience } from 'linkedapi-node';
22

33
async function searchPeopleExample(): Promise<void> {
44
const linkedapi = new LinkedApi({
@@ -60,12 +60,11 @@ async function salesNavigatorExample(linkedapi: LinkedApi): Promise<void> {
6060
term: 'product manager',
6161
limit: 8,
6262
filter: {
63-
firstName: 'Sarah',
6463
position: 'Product Manager',
6564
industries: ['Technology', 'Financial Services'],
6665
currentCompanies: ['Meta', 'Amazon', 'Netflix'],
67-
previousCompanies: ['Uber', 'Airbnb'],
68-
yearsOfExperience: ['3-5', '6-10'] as TSearchPeopleYearsOfExperience[],
66+
previousCompanies: ['Uber', 'Airbnb', 'Microsoft'],
67+
yearsOfExperience: ['threeToFive', 'sixToTen'] as TYearsOfExperience[],
6968
},
7069
};
7170

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "linkedapi-node",
3-
"version": "1.0.0-alpha.1",
3+
"version": "1.0.1",
44
"description": "Official TypeScript SDK for Linked API",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

0 commit comments

Comments
 (0)