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
5 changes: 2 additions & 3 deletions examples/fetch-company.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ async function fetchCompanyExample(): Promise<void> {
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);
Expand Down Expand Up @@ -52,7 +51,7 @@ async function standardExample(linkedapi: LinkedApi): Promise<void> {
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}`);
Expand Down Expand Up @@ -88,7 +87,7 @@ async function salesNavigatorExample(linkedapi: LinkedApi): Promise<void> {
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}`);
Expand Down
1 change: 1 addition & 0 deletions examples/fetch-person.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ async function standardExample(linkedapi: LinkedApi): Promise<void> {
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));
Expand Down
5 changes: 3 additions & 2 deletions examples/fetch-post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ async function standardExample(linkedapi: LinkedApi): Promise<void> {
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));
Expand Down
2 changes: 1 addition & 1 deletion examples/search-companies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ async function salesNavigatorExample(linkedapi: LinkedApi): Promise<void> {
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}`);
});
}
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.2.2",
"version": "1.2.3",
"description": "Official TypeScript SDK for Linked API",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/types/actions/company.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export interface TCompany {
industry: string;
specialties: string;
website: string;
employeeCount: number;
employeesCount: number;
yearFounded?: number;
ventureFinancing: boolean;
jobsCount: number;
Expand Down Expand Up @@ -78,7 +78,7 @@ export interface TNvCompany {
headquarters: string;
industry: string;
website: string;
employeeCount: number;
employeesCount: number;
yearFounded?: number;
employees?: ReadonlyArray<TNvCompanyEmployee>;
dms?: ReadonlyArray<TNvCompanyDm>;
Expand Down
1 change: 1 addition & 0 deletions src/types/actions/person.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export interface TPerson {
position: string;
companyName: string;
companyHashedUrl: string;
followersCount: number | null;
experiences?: ReadonlyArray<TPersonExperience>;
education?: ReadonlyArray<TPersonEducation>;
skills?: ReadonlyArray<TPersonSkill>;
Expand Down
7 changes: 4 additions & 3 deletions src/types/actions/post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ export interface TPost {
images: ReadonlyArray<string> | null;
hasVideo: boolean;
hasPoll: boolean;
reactionCount: number;
commentCount: number;
reactionsCount: number;
commentsCount: number;
repostsCount: number;
}

export const POST_TYPE = {
Expand Down Expand Up @@ -46,7 +47,7 @@ export interface TComment {
time: string;
text: string | null;
image: string | null;
reactionCount: number;
reactionsCount: number;
}

export interface TReactToPostParams extends TBaseActionParams {
Expand Down
2 changes: 1 addition & 1 deletion src/types/actions/search-companies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,5 @@ export interface TNvSearchCompanyResult {
name: string;
hashedUrl: string;
industry: string;
employeeCount: number;
employeesCount: number;
}