linkedapi 1.4.0__tar.gz → 1.4.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. {linkedapi-1.4.0 → linkedapi-1.4.1}/PKG-INFO +1 -1
  2. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/errors.py +4 -2
  3. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/types/__init__.py +12 -0
  4. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/types/company.py +11 -0
  5. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/types/person.py +2 -0
  6. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/types/post.py +31 -0
  7. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/types/search_people.py +10 -1
  8. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/types/search_posts.py +5 -1
  9. linkedapi-1.4.1/linkedapi/types/viewer_state.py +19 -0
  10. {linkedapi-1.4.0 → linkedapi-1.4.1}/pyproject.toml +1 -1
  11. {linkedapi-1.4.0 → linkedapi-1.4.1}/tests/test_errors.py +2 -1
  12. {linkedapi-1.4.0 → linkedapi-1.4.1}/.github/workflows/publish.yaml +0 -0
  13. {linkedapi-1.4.0 → linkedapi-1.4.1}/.gitignore +0 -0
  14. {linkedapi-1.4.0 → linkedapi-1.4.1}/LICENSE +0 -0
  15. {linkedapi-1.4.0 → linkedapi-1.4.1}/README.md +0 -0
  16. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/__init__.py +0 -0
  17. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/admin/__init__.py +0 -0
  18. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/admin/accounts.py +0 -0
  19. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/admin/admin.py +0 -0
  20. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/admin/http_client.py +0 -0
  21. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/admin/limits.py +0 -0
  22. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/admin/subscription.py +0 -0
  23. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/admin/webhooks.py +0 -0
  24. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/client.py +0 -0
  25. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/config.py +0 -0
  26. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/core/__init__.py +0 -0
  27. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/core/operation.py +0 -0
  28. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/core/polling.py +0 -0
  29. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/http/__init__.py +0 -0
  30. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/http/base.py +0 -0
  31. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/http/linked_api_http_client.py +0 -0
  32. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/mappers/__init__.py +0 -0
  33. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/mappers/array.py +0 -0
  34. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/mappers/base.py +0 -0
  35. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/mappers/send_message.py +0 -0
  36. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/mappers/simple.py +0 -0
  37. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/mappers/then.py +0 -0
  38. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/mappers/void.py +0 -0
  39. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/__init__.py +0 -0
  40. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/accept_invitation.py +0 -0
  41. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/check_connection_status.py +0 -0
  42. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/comment_on_post.py +0 -0
  43. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/create_post.py +0 -0
  44. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/create_repost.py +0 -0
  45. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/custom_workflow.py +0 -0
  46. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/fetch_company.py +0 -0
  47. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/fetch_job.py +0 -0
  48. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/fetch_person.py +0 -0
  49. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/fetch_post.py +0 -0
  50. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/ignore_invitation.py +0 -0
  51. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/manage_conversation.py +0 -0
  52. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/nv_fetch_company.py +0 -0
  53. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/nv_fetch_person.py +0 -0
  54. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/nv_manage_conversation.py +0 -0
  55. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/nv_search_companies.py +0 -0
  56. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/nv_search_people.py +0 -0
  57. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/nv_send_message.py +0 -0
  58. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/nv_sync_conversation.py +0 -0
  59. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/nv_sync_inbox.py +0 -0
  60. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/react_to_comment.py +0 -0
  61. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/react_to_post.py +0 -0
  62. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/remove_connection.py +0 -0
  63. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/reply_to_comment.py +0 -0
  64. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/retrieve_connections.py +0 -0
  65. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/retrieve_feed.py +0 -0
  66. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/retrieve_invitations.py +0 -0
  67. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/retrieve_pending_requests.py +0 -0
  68. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/retrieve_performance.py +0 -0
  69. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/retrieve_profile_viewers.py +0 -0
  70. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/retrieve_ssi.py +0 -0
  71. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/search_companies.py +0 -0
  72. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/search_jobs.py +0 -0
  73. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/search_people.py +0 -0
  74. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/search_posts.py +0 -0
  75. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/send_connection_request.py +0 -0
  76. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/send_message.py +0 -0
  77. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/sync_conversation.py +0 -0
  78. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/sync_inbox.py +0 -0
  79. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/sync_network.py +0 -0
  80. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/operations/withdraw_connection_request.py +0 -0
  81. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/py.typed +0 -0
  82. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/types/account.py +0 -0
  83. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/types/admin/__init__.py +0 -0
  84. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/types/admin/accounts.py +0 -0
  85. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/types/admin/config.py +0 -0
  86. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/types/admin/limits.py +0 -0
  87. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/types/admin/subscription.py +0 -0
  88. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/types/base.py +0 -0
  89. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/types/connection.py +0 -0
  90. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/types/feed.py +0 -0
  91. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/types/jobs.py +0 -0
  92. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/types/message.py +0 -0
  93. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/types/network.py +0 -0
  94. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/types/params.py +0 -0
  95. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/types/profile_viewers.py +0 -0
  96. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/types/responses.py +0 -0
  97. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/types/search_companies.py +0 -0
  98. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/types/statistics.py +0 -0
  99. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/types/webhooks.py +0 -0
  100. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/types/workflow.py +0 -0
  101. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/webhooks/__init__.py +0 -0
  102. {linkedapi-1.4.0 → linkedapi-1.4.1}/linkedapi/webhooks/parse.py +0 -0
  103. {linkedapi-1.4.0 → linkedapi-1.4.1}/tests/conftest.py +0 -0
  104. {linkedapi-1.4.0 → linkedapi-1.4.1}/tests/test_admin.py +0 -0
  105. {linkedapi-1.4.0 → linkedapi-1.4.1}/tests/test_direct_methods.py +0 -0
  106. {linkedapi-1.4.0 → linkedapi-1.4.1}/tests/test_http_client.py +0 -0
  107. {linkedapi-1.4.0 → linkedapi-1.4.1}/tests/test_mappers.py +0 -0
  108. {linkedapi-1.4.0 → linkedapi-1.4.1}/tests/test_models.py +0 -0
  109. {linkedapi-1.4.0 → linkedapi-1.4.1}/tests/test_operations.py +0 -0
  110. {linkedapi-1.4.0 → linkedapi-1.4.1}/tests/test_polling.py +0 -0
  111. {linkedapi-1.4.0 → linkedapi-1.4.1}/tests/test_webhooks.py +0 -0
  112. {linkedapi-1.4.0 → linkedapi-1.4.1}/tests/test_working_hours_contract.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: linkedapi
3
- Version: 1.4.0
3
+ Version: 1.4.1
4
4
  Summary: Official synchronous Python SDK for Linked API.
5
5
  Project-URL: Homepage, https://linkedapi.io
6
6
  Project-URL: Repository, https://github.com/Linked-API/linkedapi-python
@@ -17,13 +17,14 @@ LinkedApiActionErrorType = Literal[
17
17
  "connectionNotFound",
18
18
  "searchingNotAllowed",
19
19
  "searchInterfaceMismatch",
20
- "filterIdentityMismatch",
20
+ "filterNotApplied",
21
21
  "companyNotFound",
22
22
  "postNotFound",
23
23
  "jobNotFound",
24
24
  "commentingNotAllowed",
25
25
  "commentNotFound",
26
26
  "replyingNotAllowed",
27
+ "duplicateComment",
27
28
  "noPostingPermission",
28
29
  "mentionNotResolved",
29
30
  "repostNotAllowed",
@@ -47,13 +48,14 @@ LINKED_API_ACTION_ERROR_TYPES: tuple[str, ...] = (
47
48
  "connectionNotFound",
48
49
  "searchingNotAllowed",
49
50
  "searchInterfaceMismatch",
50
- "filterIdentityMismatch",
51
+ "filterNotApplied",
51
52
  "companyNotFound",
52
53
  "postNotFound",
53
54
  "jobNotFound",
54
55
  "commentingNotAllowed",
55
56
  "commentNotFound",
56
57
  "replyingNotAllowed",
58
+ "duplicateComment",
57
59
  "noPostingPermission",
58
60
  "mentionNotResolved",
59
61
  "repostNotAllowed",
@@ -156,6 +156,7 @@ from linkedapi.types.post import (
156
156
  CommentOnPostParams,
157
157
  CommentOnPostResult,
158
158
  CommentResult,
159
+ ContentViewerState,
159
160
  CreatePostAttachment,
160
161
  CreatePostParams,
161
162
  CreatePostResult,
@@ -167,6 +168,7 @@ from linkedapi.types.post import (
167
168
  PostActorType,
168
169
  PostAuthor,
169
170
  PostComment,
171
+ PostCommentAuthor,
170
172
  PostCommenterType,
171
173
  PostCommentsRetrievalConfig,
172
174
  PostCommentsSort,
@@ -231,6 +233,11 @@ from linkedapi.types.statistics import (
231
233
  RetrievePerformanceResult,
232
234
  RetrieveSSIResult,
233
235
  )
236
+ from linkedapi.types.viewer_state import (
237
+ ConnectionDegree,
238
+ NvConnectionDegreeFilter,
239
+ PersonViewerState,
240
+ )
234
241
  from linkedapi.types.webhooks import (
235
242
  AccountWebhookEvent,
236
243
  AccountWebhookEventData,
@@ -300,11 +307,13 @@ __all__ = [
300
307
  "CommentOnPostResult",
301
308
  "CommentResult",
302
309
  "Company",
310
+ "ConnectionDegree",
303
311
  "ConnectionPerson",
304
312
  "ConnectionSession",
305
313
  "ConnectionSessionResult",
306
314
  "ConnectionSessionStatus",
307
315
  "ConnectionStatus",
316
+ "ContentViewerState",
308
317
  "ConversationPollRequest",
309
318
  "ConversationPollResult",
310
319
  "ConversationType",
@@ -381,6 +390,7 @@ __all__ = [
381
390
  "NvCompanyEmployee",
382
391
  "NvCompanyEmployeeFilter",
383
392
  "NvCompanyEmployeeRetrievalConfig",
393
+ "NvConnectionDegreeFilter",
384
394
  "NvFetchCompanyParams",
385
395
  "NvFetchCompanyResult",
386
396
  "NvManageConversationParams",
@@ -402,10 +412,12 @@ __all__ = [
402
412
  "PersonExperience",
403
413
  "PersonLanguage",
404
414
  "PersonSkill",
415
+ "PersonViewerState",
405
416
  "Post",
406
417
  "PostActorType",
407
418
  "PostAuthor",
408
419
  "PostComment",
420
+ "PostCommentAuthor",
409
421
  "PostCommenterType",
410
422
  "PostCommentsRetrievalConfig",
411
423
  "PostCommentsSort",
@@ -8,6 +8,11 @@ from linkedapi.types.base import LinkedApiModel
8
8
  from linkedapi.types.params import BaseActionParams, LimitParams, LimitSinceParams
9
9
  from linkedapi.types.person import YearsOfExperience
10
10
  from linkedapi.types.post import Post
11
+ from linkedapi.types.viewer_state import (
12
+ ConnectionDegree,
13
+ NvConnectionDegreeFilter,
14
+ PersonViewerState,
15
+ )
11
16
 
12
17
 
13
18
  class StCompanyEmployee(LinkedApiModel):
@@ -17,6 +22,7 @@ class StCompanyEmployee(LinkedApiModel):
17
22
  headline: str | None = None
18
23
  location: str | None = None
19
24
  avatar_url: str | None = None
25
+ viewer_state: PersonViewerState | None = None
20
26
 
21
27
 
22
28
  class StCompanyDm(LinkedApiModel):
@@ -27,6 +33,7 @@ class StCompanyDm(LinkedApiModel):
27
33
  location: str | None = None
28
34
  avatar_url: str | None = None
29
35
  country_code: str | None = None
36
+ viewer_state: PersonViewerState | None = None
30
37
 
31
38
 
32
39
  class Company(LinkedApiModel):
@@ -69,6 +76,7 @@ class StCompanyEmployeesFilter(LinkedApiModel):
69
76
  locations: list[str] | None = None
70
77
  industries: list[str] | None = None
71
78
  schools: list[str] | None = None
79
+ connection_degrees: list[ConnectionDegree] | None = None
72
80
 
73
81
 
74
82
  class StCompanyEmployeesRetrievalConfig(LimitParams):
@@ -91,6 +99,7 @@ class NvCompanyEmployee(LinkedApiModel):
91
99
  position: str | None = None
92
100
  location: str | None = None
93
101
  avatar_url: str | None = None
102
+ viewer_state: PersonViewerState | None = None
94
103
 
95
104
 
96
105
  class NvCompanyDm(LinkedApiModel):
@@ -101,6 +110,7 @@ class NvCompanyDm(LinkedApiModel):
101
110
  location: str | None = None
102
111
  avatar_url: str | None = None
103
112
  country_code: str | None = None
113
+ viewer_state: PersonViewerState | None = None
104
114
 
105
115
 
106
116
  class NvCompany(LinkedApiModel):
@@ -138,6 +148,7 @@ class NvCompanyEmployeeFilter(LinkedApiModel):
138
148
  industries: list[str] | None = None
139
149
  schools: list[str] | None = None
140
150
  years_of_experiences: list[YearsOfExperience] | None = None
151
+ connection_degrees: list[NvConnectionDegreeFilter] | None = None
141
152
 
142
153
 
143
154
  class NvCompanyEmployeeRetrievalConfig(LimitParams):
@@ -4,6 +4,7 @@ from typing import Literal, TypeAlias
4
4
 
5
5
  from linkedapi.types.params import BaseActionParams, LimitSinceParams
6
6
  from linkedapi.types.post import Comment, Post, Reaction
7
+ from linkedapi.types.viewer_state import PersonViewerState
7
8
 
8
9
  EmploymentType = Literal[
9
10
  "fullTime",
@@ -95,6 +96,7 @@ class Person(BaseActionParams):
95
96
  followers_count: int | None = None
96
97
  about: str | None = None
97
98
  avatar_url: str | None = None
99
+ viewer_state: PersonViewerState | None = None
98
100
  experiences: list[PersonExperience] | None = None
99
101
  education: list[PersonEducation] | None = None
100
102
  skills: list[PersonSkill] | None = None
@@ -4,6 +4,7 @@ from typing import Literal, TypeAlias
4
4
 
5
5
  from linkedapi.types.base import LinkedApiModel
6
6
  from linkedapi.types.params import BaseActionParams, LimitParams
7
+ from linkedapi.types.viewer_state import PersonViewerState
7
8
 
8
9
  PostType = Literal["original", "repost"]
9
10
  PostActorType = Literal["person", "company"]
@@ -14,6 +15,18 @@ PostCommentsSort = Literal["mostRelevant", "mostRecent"]
14
15
  AttachmentType = Literal["image", "video", "document"]
15
16
 
16
17
 
18
+ class ContentViewerState(LinkedApiModel):
19
+ """What your account has done with a post or a comment.
20
+
21
+ "reaction" is None if you have not reacted or the page does not show it; comments read in the
22
+ feed always report None. "is_own" is None if this cannot be told; content published as a
23
+ company page you administer is False.
24
+ """
25
+
26
+ reaction: ReactionType | None = None
27
+ is_own: bool | None = None
28
+
29
+
17
30
  class Reaction(LinkedApiModel):
18
31
  post_url: str | None = None
19
32
  time: str | None = None
@@ -69,9 +82,22 @@ class ReplyToCommentParams(BaseActionParams):
69
82
  ReplyToCommentResult: TypeAlias = CommentResult
70
83
 
71
84
 
85
+ class PostCommentAuthor(LinkedApiModel):
86
+ """The commenter in the same actor shape a post's author has."""
87
+
88
+ type: PostActorType | None = None
89
+ name: str | None = None
90
+ profile_url: str | None = None
91
+ headline: str | None = None
92
+ company_url: str | None = None
93
+ viewer_state: PersonViewerState | None = None
94
+
95
+
72
96
  class PostComment(LinkedApiModel):
73
97
  comment_urn: str | None = None
74
98
  comment_url: str | None = None
99
+ author: PostCommentAuthor | None = None
100
+ # Deprecated: use "author" instead of the four commenter_* fields.
75
101
  commenter_url: str | None = None
76
102
  commenter_name: str | None = None
77
103
  commenter_headline: str | None = None
@@ -82,6 +108,7 @@ class PostComment(LinkedApiModel):
82
108
  is_reply: bool | None = None
83
109
  reactions_count: int | None = None
84
110
  replies_count: int | None = None
111
+ viewer_state: ContentViewerState | None = None
85
112
 
86
113
 
87
114
  class PostReaction(LinkedApiModel):
@@ -100,8 +127,11 @@ class PostAuthor(LinkedApiModel):
100
127
  profile_url: str | None = None
101
128
  headline: str | None = None
102
129
  company_url: str | None = None
130
+ # Set for a person author only.
131
+ viewer_state: PersonViewerState | None = None
103
132
 
104
133
 
134
+ # A reposter carries no viewer_state: only the author's relation to your account is reported.
105
135
  class PostReposter(LinkedApiModel):
106
136
  type: PostActorType | None = None
107
137
  name: str | None = None
@@ -131,6 +161,7 @@ class Post(LinkedApiModel):
131
161
  reactions_count: int | None = None
132
162
  comments_count: int | None = None
133
163
  reposts_count: int | None = None
164
+ viewer_state: ContentViewerState | None = None
134
165
  comments: list[PostComment] | None = None
135
166
  reactions: list[PostReaction] | None = None
136
167
 
@@ -3,6 +3,11 @@ from __future__ import annotations
3
3
  from linkedapi.types.base import LinkedApiModel
4
4
  from linkedapi.types.params import BaseActionParams, LimitParams
5
5
  from linkedapi.types.person import YearsOfExperience
6
+ from linkedapi.types.viewer_state import (
7
+ ConnectionDegree,
8
+ NvConnectionDegreeFilter,
9
+ PersonViewerState,
10
+ )
6
11
 
7
12
 
8
13
  class SearchPeopleFilter(LinkedApiModel):
@@ -14,6 +19,7 @@ class SearchPeopleFilter(LinkedApiModel):
14
19
  current_companies: list[str] | None = None
15
20
  previous_companies: list[str] | None = None
16
21
  schools: list[str] | None = None
22
+ connection_degrees: list[ConnectionDegree] | None = None
17
23
 
18
24
 
19
25
  class SearchPeopleParams(BaseActionParams, LimitParams):
@@ -29,10 +35,12 @@ class SearchPeopleResult(LinkedApiModel):
29
35
  headline: str | None = None
30
36
  location: str | None = None
31
37
  avatar_url: str | None = None
38
+ viewer_state: PersonViewerState | None = None
32
39
 
33
40
 
34
41
  class NvSearchPeopleFilter(SearchPeopleFilter):
35
- years_of_experience: list[YearsOfExperience] | None = None
42
+ years_of_experiences: list[YearsOfExperience] | None = None
43
+ connection_degrees: list[NvConnectionDegreeFilter] | None = None # type: ignore[assignment]
36
44
 
37
45
 
38
46
  class NvSearchPeopleParams(BaseActionParams, LimitParams):
@@ -48,3 +56,4 @@ class NvSearchPeopleResult(LinkedApiModel):
48
56
  position: str | None = None
49
57
  location: str | None = None
50
58
  avatar_url: str | None = None
59
+ viewer_state: PersonViewerState | None = None
@@ -4,7 +4,8 @@ from typing import Literal, TypeAlias
4
4
 
5
5
  from linkedapi.types.base import LinkedApiModel
6
6
  from linkedapi.types.params import BaseActionParams, LimitParams
7
- from linkedapi.types.post import PostActorType, PostType
7
+ from linkedapi.types.post import ContentViewerState, PostActorType, PostType
8
+ from linkedapi.types.viewer_state import PersonViewerState
8
9
 
9
10
  PostSearchSort = Literal["topMatch", "latest"]
10
11
  PostSearchDatePosted = Literal["past24Hours", "pastWeek", "pastMonth"]
@@ -78,6 +79,8 @@ class SearchPostActor(LinkedApiModel):
78
79
  profile_url: str | None = None
79
80
  headline: str | None = None
80
81
  company_url: str | None = None
82
+ # Set for a person author only; a reposter carries none.
83
+ viewer_state: PersonViewerState | None = None
81
84
 
82
85
 
83
86
  class SearchPostResult(LinkedApiModel):
@@ -101,3 +104,4 @@ class SearchPostResult(LinkedApiModel):
101
104
  reactions_count: int | None = None
102
105
  comments_count: int | None = None
103
106
  reposts_count: int | None = None
107
+ viewer_state: ContentViewerState | None = None
@@ -0,0 +1,19 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Literal
4
+
5
+ from linkedapi.types.base import LinkedApiModel
6
+
7
+ # Your connection degree to a person, as LinkedIn shows it next to their name.
8
+ ConnectionDegree = Literal["1st", "2nd", "3rd+"]
9
+ # Sales Navigator also filters by members of the groups you belong to.
10
+ NvConnectionDegreeFilter = Literal["1st", "2nd", "3rd+", "groupMembers"]
11
+
12
+
13
+ class PersonViewerState(LinkedApiModel):
14
+ """How your account relates to a person.
15
+
16
+ "connection_degree" is None when LinkedIn shows no degree, e.g. on your own content.
17
+ """
18
+
19
+ connection_degree: ConnectionDegree | None = None
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "linkedapi"
7
- version = "1.4.0"
7
+ version = "1.4.1"
8
8
  description = "Official synchronous Python SDK for Linked API."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -46,13 +46,14 @@ def test_error_type_sets_match_node_contract() -> None:
46
46
  "connectionNotFound",
47
47
  "searchingNotAllowed",
48
48
  "searchInterfaceMismatch",
49
- "filterIdentityMismatch",
49
+ "filterNotApplied",
50
50
  "companyNotFound",
51
51
  "postNotFound",
52
52
  "jobNotFound",
53
53
  "commentingNotAllowed",
54
54
  "commentNotFound",
55
55
  "replyingNotAllowed",
56
+ "duplicateComment",
56
57
  "noPostingPermission",
57
58
  "mentionNotResolved",
58
59
  "repostNotAllowed",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes