Skip to content

Commit eb7f3da

Browse files
Add post data
1 parent d33a3c9 commit eb7f3da

3 files changed

Lines changed: 48 additions & 3 deletions

File tree

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": "2.0.1",
3+
"version": "2.0.2",
44
"description": "Control your LinkedIn accounts and retrieve real-time data, all through this Node.js SDK.",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/types/actions/post.ts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,18 @@ export interface TPost {
44
url: string;
55
time: string;
66
type: TPostType;
7+
activityUrn: string | null;
8+
author: TPostAuthor | null;
9+
reposter: TPostReposter | null;
710
repostText: string | null;
11+
hashtags: ReadonlyArray<string>;
12+
mentions: ReadonlyArray<string>;
13+
externalLinks: ReadonlyArray<string>;
814
text: string | null;
915
images: ReadonlyArray<string> | null;
16+
documentSlides: ReadonlyArray<string>;
1017
hasVideo: boolean;
18+
videoThumbnail: string | null;
1119
hasPoll: boolean;
1220
reactionsCount: number;
1321
commentsCount: number;
@@ -22,6 +30,42 @@ export const POST_TYPE = {
2230
} as const;
2331
export type TPostType = (typeof POST_TYPE)[keyof typeof POST_TYPE];
2432

33+
export const POST_ACTOR_TYPE = {
34+
company: 'company',
35+
person: 'person',
36+
} as const;
37+
export type TPostActorType = (typeof POST_ACTOR_TYPE)[keyof typeof POST_ACTOR_TYPE];
38+
39+
export interface TPostPersonAuthor {
40+
type: typeof POST_ACTOR_TYPE.person;
41+
name: string | null;
42+
profileUrl: string | null;
43+
headline: string | null;
44+
}
45+
46+
export interface TPostCompanyAuthor {
47+
type: typeof POST_ACTOR_TYPE.company;
48+
name: string | null;
49+
companyUrl: string | null;
50+
}
51+
52+
export type TPostAuthor = TPostPersonAuthor | TPostCompanyAuthor;
53+
54+
export interface TPostPersonReposter {
55+
type: typeof POST_ACTOR_TYPE.person;
56+
name: string | null;
57+
profileUrl: string | null;
58+
headline: string | null;
59+
}
60+
61+
export interface TPostCompanyReposter {
62+
type: typeof POST_ACTOR_TYPE.company;
63+
name: string | null;
64+
companyUrl: string | null;
65+
}
66+
67+
export type TPostReposter = TPostPersonReposter | TPostCompanyReposter;
68+
2569
export interface TReaction {
2670
postUrl: string;
2771
time: string;

src/types/workflows.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ export interface TWorkflowStatusResponse {
4444
message?: string;
4545
}
4646

47-
export interface TWorkflowResponse<TResult extends TWorkflowData = TWorkflowData>
48-
extends TWorkflowStatusResponse {
47+
export interface TWorkflowResponse<
48+
TResult extends TWorkflowData = TWorkflowData,
49+
> extends TWorkflowStatusResponse {
4950
completion?: TWorkflowCompletion<TResult>;
5051
failure?: TWorkflowFailure;
5152
}

0 commit comments

Comments
 (0)