Skip to content

Commit f5b2261

Browse files
authored
Merge pull request #7 from Linked-API/1.2.3
1.2.3
2 parents ec6f4c5 + a3f4bd2 commit f5b2261

File tree

9 files changed

+16
-13
lines changed

9 files changed

+16
-13
lines changed

examples/fetch-company.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ async function fetchCompanyExample(): Promise<void> {
1010
console.log('🚀 TypeScript Linked API example starting...');
1111
await standardExample(linkedapi);
1212
await salesNavigatorExample(linkedapi);
13-
1413
} catch (error) {
1514
if (error instanceof LinkedApiError) {
1615
console.error('🚨 Linked API Error:', error.message);
@@ -52,7 +51,7 @@ async function standardExample(linkedapi: LinkedApi): Promise<void> {
5251
console.log(`📖 Description: ${company.description}`);
5352
console.log(`📍 Location: ${company.location}`);
5453
console.log(`🏭 Industry: ${company.industry}`);
55-
console.log(`👥 Employee Count: ${company.employeeCount}`);
54+
console.log(`👥 Employees Count: ${company.employeesCount}`);
5655
console.log(`📅 Founded: ${company.yearFounded}`);
5756
console.log(`👨‍💼 Employees Retrieved: ${company.employees?.length || 0}`);
5857
console.log(`📝 Posts Retrieved: ${company.posts?.length || 0}`);
@@ -88,7 +87,7 @@ async function salesNavigatorExample(linkedapi: LinkedApi): Promise<void> {
8887
console.log(`📍 Location: ${nvCompany.location}`);
8988
console.log(`🏭 Industry: ${nvCompany.industry}`);
9089
console.log(`🌐 Website: ${nvCompany.website}`);
91-
console.log(`👥 Employee Count: ${nvCompany.employeeCount}`);
90+
console.log(`👥 Employees Count: ${nvCompany.employeesCount}`);
9291
console.log(`📅 Founded: ${nvCompany.yearFounded || 'Not specified'}`);
9392
console.log(`👨‍💼 Employees Retrieved: ${nvCompany.employees?.length || 0}`);
9493
console.log(`🎯 Decision Makers Retrieved: ${nvCompany.dms?.length || 0}`);

examples/fetch-person.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ async function standardExample(linkedapi: LinkedApi): Promise<void> {
5353
console.log(`📍 Location: ${person.location}`);
5454
console.log(`🌐 Skills: ${person.skills}`);
5555
console.log(`💼 Experiences: ${person.experiences}`);
56+
console.log(`👥 Followers: ${person.followersCount || 'No followers'}`);
5657
}
5758
if (personResult.errors.length > 0) {
5859
console.error('🚨 Errors:', JSON.stringify(personResult.errors, null, 2));

examples/fetch-post.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ async function standardExample(linkedapi: LinkedApi): Promise<void> {
3636
console.log(`🖼️ Images: ${post.images?.length || 0} image(s)`);
3737
console.log(`🎥 Has Video: ${post.hasVideo}`);
3838
console.log(`📊 Has Poll: ${post.hasPoll}`);
39-
console.log(`👍 Reactions: ${post.reactionCount}`);
40-
console.log(`💬 Comments: ${post.commentCount}`);
39+
console.log(`👍 Reactions: ${post.reactionsCount}`);
40+
console.log(`💬 Comments: ${post.commentsCount}`);
41+
console.log(`🔄 Reposts: ${post.repostsCount}`);
4142
}
4243
if (postResult.errors.length > 0) {
4344
console.error('🚨 Errors:', JSON.stringify(postResult.errors, null, 2));

examples/search-companies.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ async function salesNavigatorExample(linkedapi: LinkedApi): Promise<void> {
8181
results.forEach((company, index) => {
8282
console.log(` ${index + 1}. ${company.name}`);
8383
console.log(` Industry: ${company.industry}`);
84-
console.log(` Employees: ${company.employeeCount}`);
84+
console.log(` Employees: ${company.employeesCount}`);
8585
console.log(` URL: ${company.hashedUrl}`);
8686
});
8787
}

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.2.2",
3+
"version": "1.2.3",
44
"description": "Official TypeScript SDK for Linked API",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/types/actions/company.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export interface TCompany {
1212
industry: string;
1313
specialties: string;
1414
website: string;
15-
employeeCount: number;
15+
employeesCount: number;
1616
yearFounded?: number;
1717
ventureFinancing: boolean;
1818
jobsCount: number;
@@ -78,7 +78,7 @@ export interface TNvCompany {
7878
headquarters: string;
7979
industry: string;
8080
website: string;
81-
employeeCount: number;
81+
employeesCount: number;
8282
yearFounded?: number;
8383
employees?: ReadonlyArray<TNvCompanyEmployee>;
8484
dms?: ReadonlyArray<TNvCompanyDm>;

src/types/actions/person.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export interface TPerson {
4343
position: string;
4444
companyName: string;
4545
companyHashedUrl: string;
46+
followersCount: number | null;
4647
experiences?: ReadonlyArray<TPersonExperience>;
4748
education?: ReadonlyArray<TPersonEducation>;
4849
skills?: ReadonlyArray<TPersonSkill>;

src/types/actions/post.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ export interface TPost {
99
images: ReadonlyArray<string> | null;
1010
hasVideo: boolean;
1111
hasPoll: boolean;
12-
reactionCount: number;
13-
commentCount: number;
12+
reactionsCount: number;
13+
commentsCount: number;
14+
repostsCount: number;
1415
}
1516

1617
export const POST_TYPE = {
@@ -46,7 +47,7 @@ export interface TComment {
4647
time: string;
4748
text: string | null;
4849
image: string | null;
49-
reactionCount: number;
50+
reactionsCount: number;
5051
}
5152

5253
export interface TReactToPostParams extends TBaseActionParams {

src/types/actions/search-companies.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,5 @@ export interface TNvSearchCompanyResult {
7777
name: string;
7878
hashedUrl: string;
7979
industry: string;
80-
employeeCount: number;
80+
employeesCount: number;
8181
}

0 commit comments

Comments
 (0)