diff --git a/examples/fetch-company.ts b/examples/fetch-company.ts index f484d4b..07a1c9d 100644 --- a/examples/fetch-company.ts +++ b/examples/fetch-company.ts @@ -10,7 +10,6 @@ async function fetchCompanyExample(): Promise { console.log('🚀 TypeScript Linked API example starting...'); await standardExample(linkedapi); await salesNavigatorExample(linkedapi); - } catch (error) { if (error instanceof LinkedApiError) { console.error('🚨 Linked API Error:', error.message); @@ -52,7 +51,7 @@ async function standardExample(linkedapi: LinkedApi): Promise { console.log(`📖 Description: ${company.description}`); console.log(`📍 Location: ${company.location}`); console.log(`🏭 Industry: ${company.industry}`); - console.log(`👥 Employee Count: ${company.employeeCount}`); + console.log(`👥 Employees Count: ${company.employeesCount}`); console.log(`📅 Founded: ${company.yearFounded}`); console.log(`👨‍💼 Employees Retrieved: ${company.employees?.length || 0}`); console.log(`📝 Posts Retrieved: ${company.posts?.length || 0}`); @@ -88,7 +87,7 @@ async function salesNavigatorExample(linkedapi: LinkedApi): Promise { console.log(`📍 Location: ${nvCompany.location}`); console.log(`🏭 Industry: ${nvCompany.industry}`); console.log(`🌐 Website: ${nvCompany.website}`); - console.log(`👥 Employee Count: ${nvCompany.employeeCount}`); + console.log(`👥 Employees Count: ${nvCompany.employeesCount}`); console.log(`📅 Founded: ${nvCompany.yearFounded || 'Not specified'}`); console.log(`👨‍💼 Employees Retrieved: ${nvCompany.employees?.length || 0}`); console.log(`🎯 Decision Makers Retrieved: ${nvCompany.dms?.length || 0}`); diff --git a/examples/fetch-person.ts b/examples/fetch-person.ts index 734c58d..9a24ffe 100644 --- a/examples/fetch-person.ts +++ b/examples/fetch-person.ts @@ -53,6 +53,7 @@ async function standardExample(linkedapi: LinkedApi): Promise { console.log(`📍 Location: ${person.location}`); console.log(`🌐 Skills: ${person.skills}`); console.log(`💼 Experiences: ${person.experiences}`); + console.log(`👥 Followers: ${person.followersCount || 'No followers'}`); } if (personResult.errors.length > 0) { console.error('🚨 Errors:', JSON.stringify(personResult.errors, null, 2)); diff --git a/examples/fetch-post.ts b/examples/fetch-post.ts index 40a6f26..531fc83 100644 --- a/examples/fetch-post.ts +++ b/examples/fetch-post.ts @@ -36,8 +36,9 @@ async function standardExample(linkedapi: LinkedApi): Promise { console.log(`🖼️ Images: ${post.images?.length || 0} image(s)`); console.log(`🎥 Has Video: ${post.hasVideo}`); console.log(`📊 Has Poll: ${post.hasPoll}`); - console.log(`👍 Reactions: ${post.reactionCount}`); - console.log(`💬 Comments: ${post.commentCount}`); + console.log(`👍 Reactions: ${post.reactionsCount}`); + console.log(`💬 Comments: ${post.commentsCount}`); + console.log(`🔄 Reposts: ${post.repostsCount}`); } if (postResult.errors.length > 0) { console.error('🚨 Errors:', JSON.stringify(postResult.errors, null, 2)); diff --git a/examples/search-companies.ts b/examples/search-companies.ts index 339ae70..4e55910 100644 --- a/examples/search-companies.ts +++ b/examples/search-companies.ts @@ -81,7 +81,7 @@ async function salesNavigatorExample(linkedapi: LinkedApi): Promise { results.forEach((company, index) => { console.log(` ${index + 1}. ${company.name}`); console.log(` Industry: ${company.industry}`); - console.log(` Employees: ${company.employeeCount}`); + console.log(` Employees: ${company.employeesCount}`); console.log(` URL: ${company.hashedUrl}`); }); } diff --git a/package.json b/package.json index 85f4fa7..2a3fc4f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "linkedapi-node", - "version": "1.2.2", + "version": "1.2.3", "description": "Official TypeScript SDK for Linked API", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/types/actions/company.ts b/src/types/actions/company.ts index 403db9f..902ceb0 100644 --- a/src/types/actions/company.ts +++ b/src/types/actions/company.ts @@ -12,7 +12,7 @@ export interface TCompany { industry: string; specialties: string; website: string; - employeeCount: number; + employeesCount: number; yearFounded?: number; ventureFinancing: boolean; jobsCount: number; @@ -78,7 +78,7 @@ export interface TNvCompany { headquarters: string; industry: string; website: string; - employeeCount: number; + employeesCount: number; yearFounded?: number; employees?: ReadonlyArray; dms?: ReadonlyArray; diff --git a/src/types/actions/person.ts b/src/types/actions/person.ts index 4f8434b..53c80cb 100644 --- a/src/types/actions/person.ts +++ b/src/types/actions/person.ts @@ -43,6 +43,7 @@ export interface TPerson { position: string; companyName: string; companyHashedUrl: string; + followersCount: number | null; experiences?: ReadonlyArray; education?: ReadonlyArray; skills?: ReadonlyArray; diff --git a/src/types/actions/post.ts b/src/types/actions/post.ts index da69e15..7a461cb 100644 --- a/src/types/actions/post.ts +++ b/src/types/actions/post.ts @@ -9,8 +9,9 @@ export interface TPost { images: ReadonlyArray | null; hasVideo: boolean; hasPoll: boolean; - reactionCount: number; - commentCount: number; + reactionsCount: number; + commentsCount: number; + repostsCount: number; } export const POST_TYPE = { @@ -46,7 +47,7 @@ export interface TComment { time: string; text: string | null; image: string | null; - reactionCount: number; + reactionsCount: number; } export interface TReactToPostParams extends TBaseActionParams { diff --git a/src/types/actions/search-companies.ts b/src/types/actions/search-companies.ts index c03f8b1..b8b1db6 100644 --- a/src/types/actions/search-companies.ts +++ b/src/types/actions/search-companies.ts @@ -77,5 +77,5 @@ export interface TNvSearchCompanyResult { name: string; hashedUrl: string; industry: string; - employeeCount: number; + employeesCount: number; }