linkedapi 1.4.0__tar.gz → 1.4.2__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.
- {linkedapi-1.4.0 → linkedapi-1.4.2}/PKG-INFO +1 -1
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/__init__.py +1 -1
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/errors.py +4 -2
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/types/__init__.py +12 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/types/company.py +11 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/types/person.py +2 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/types/post.py +31 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/types/search_people.py +10 -1
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/types/search_posts.py +5 -1
- linkedapi-1.4.2/linkedapi/types/viewer_state.py +19 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/types/workflow.py +2 -1
- {linkedapi-1.4.0 → linkedapi-1.4.2}/pyproject.toml +1 -1
- {linkedapi-1.4.0 → linkedapi-1.4.2}/tests/test_errors.py +2 -1
- {linkedapi-1.4.0 → linkedapi-1.4.2}/tests/test_operations.py +0 -1
- {linkedapi-1.4.0 → linkedapi-1.4.2}/tests/test_polling.py +2 -8
- {linkedapi-1.4.0 → linkedapi-1.4.2}/tests/test_working_hours_contract.py +2 -5
- {linkedapi-1.4.0 → linkedapi-1.4.2}/.github/workflows/publish.yaml +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/.gitignore +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/LICENSE +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/README.md +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/admin/__init__.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/admin/accounts.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/admin/admin.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/admin/http_client.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/admin/limits.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/admin/subscription.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/admin/webhooks.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/client.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/config.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/core/__init__.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/core/operation.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/core/polling.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/http/__init__.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/http/base.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/http/linked_api_http_client.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/mappers/__init__.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/mappers/array.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/mappers/base.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/mappers/send_message.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/mappers/simple.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/mappers/then.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/mappers/void.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/__init__.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/accept_invitation.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/check_connection_status.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/comment_on_post.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/create_post.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/create_repost.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/custom_workflow.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/fetch_company.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/fetch_job.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/fetch_person.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/fetch_post.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/ignore_invitation.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/manage_conversation.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/nv_fetch_company.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/nv_fetch_person.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/nv_manage_conversation.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/nv_search_companies.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/nv_search_people.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/nv_send_message.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/nv_sync_conversation.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/nv_sync_inbox.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/react_to_comment.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/react_to_post.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/remove_connection.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/reply_to_comment.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/retrieve_connections.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/retrieve_feed.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/retrieve_invitations.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/retrieve_pending_requests.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/retrieve_performance.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/retrieve_profile_viewers.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/retrieve_ssi.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/search_companies.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/search_jobs.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/search_people.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/search_posts.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/send_connection_request.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/send_message.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/sync_conversation.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/sync_inbox.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/sync_network.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/operations/withdraw_connection_request.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/py.typed +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/types/account.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/types/admin/__init__.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/types/admin/accounts.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/types/admin/config.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/types/admin/limits.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/types/admin/subscription.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/types/base.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/types/connection.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/types/feed.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/types/jobs.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/types/message.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/types/network.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/types/params.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/types/profile_viewers.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/types/responses.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/types/search_companies.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/types/statistics.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/types/webhooks.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/webhooks/__init__.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/linkedapi/webhooks/parse.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/tests/conftest.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/tests/test_admin.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/tests/test_direct_methods.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/tests/test_http_client.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/tests/test_mappers.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/tests/test_models.py +0 -0
- {linkedapi-1.4.0 → linkedapi-1.4.2}/tests/test_webhooks.py +0 -0
|
@@ -17,13 +17,14 @@ LinkedApiActionErrorType = Literal[
|
|
|
17
17
|
"connectionNotFound",
|
|
18
18
|
"searchingNotAllowed",
|
|
19
19
|
"searchInterfaceMismatch",
|
|
20
|
-
"
|
|
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
|
-
"
|
|
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
|
-
|
|
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
|
|
@@ -44,7 +44,8 @@ class WorkflowCancelResponse(LinkedApiModel):
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
class WorkflowResponse(LinkedApiModel):
|
|
47
|
-
|
|
47
|
+
# GET /workflows/{id} never returns workflowId; only the start response carries it.
|
|
48
|
+
workflow_id: str | None = None
|
|
48
49
|
workflow_status: WorkflowStatus
|
|
49
50
|
message: str | None = None
|
|
50
51
|
pending_reason: WorkflowPendingReason | None = None
|
|
@@ -46,13 +46,14 @@ def test_error_type_sets_match_node_contract() -> None:
|
|
|
46
46
|
"connectionNotFound",
|
|
47
47
|
"searchingNotAllowed",
|
|
48
48
|
"searchInterfaceMismatch",
|
|
49
|
-
"
|
|
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",
|
|
@@ -370,7 +370,6 @@ def test_execute_and_result_flow_returns_pydantic_data(
|
|
|
370
370
|
fake_http_client.queue_response(result={"workflowId": "wf1", "workflowStatus": "pending"})
|
|
371
371
|
fake_http_client.queue_response(
|
|
372
372
|
result={
|
|
373
|
-
"workflowId": "wf1",
|
|
374
373
|
"workflowStatus": "completed",
|
|
375
374
|
"completion": {
|
|
376
375
|
"actionType": "st.openPersonPage",
|
|
@@ -17,15 +17,10 @@ from linkedapi import (
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
def test_operation_result_polls_until_completion(fake_http_client: FakeHttpClient) -> None:
|
|
20
|
-
fake_http_client.queue_response(
|
|
21
|
-
|
|
22
|
-
)
|
|
23
|
-
fake_http_client.queue_response(
|
|
24
|
-
result={"workflowId": "wf1", "workflowStatus": "running", "message": "running"}
|
|
25
|
-
)
|
|
20
|
+
fake_http_client.queue_response(result={"workflowStatus": "pending", "message": "queued"})
|
|
21
|
+
fake_http_client.queue_response(result={"workflowStatus": "running", "message": "running"})
|
|
26
22
|
fake_http_client.queue_response(
|
|
27
23
|
result={
|
|
28
|
-
"workflowId": "wf1",
|
|
29
24
|
"workflowStatus": "completed",
|
|
30
25
|
"completion": {
|
|
31
26
|
"actionType": "st.retrieveSSI",
|
|
@@ -52,7 +47,6 @@ def test_operation_result_wraps_response_validation_error(
|
|
|
52
47
|
) -> None:
|
|
53
48
|
fake_http_client.queue_response(
|
|
54
49
|
result={
|
|
55
|
-
"workflowId": "wf1",
|
|
56
50
|
"workflowStatus": "completed",
|
|
57
51
|
"completion": {
|
|
58
52
|
"actionType": "st.openPersonPage",
|
|
@@ -72,7 +72,6 @@ class TestStatusCarriesPendingReason:
|
|
|
72
72
|
def test_carries_the_outside_working_hours_reason(self) -> None:
|
|
73
73
|
operation = _operation(
|
|
74
74
|
{
|
|
75
|
-
"workflowId": "wf-1",
|
|
76
75
|
"workflowStatus": "pending",
|
|
77
76
|
"pendingReason": "outsideWorkingHours",
|
|
78
77
|
}
|
|
@@ -84,9 +83,7 @@ class TestStatusCarriesPendingReason:
|
|
|
84
83
|
assert result.pending_reason == "outsideWorkingHours"
|
|
85
84
|
|
|
86
85
|
def test_carries_the_queued_reason(self) -> None:
|
|
87
|
-
operation = _operation(
|
|
88
|
-
{"workflowId": "wf-1", "workflowStatus": "pending", "pendingReason": "queued"}
|
|
89
|
-
)
|
|
86
|
+
operation = _operation({"workflowStatus": "pending", "pendingReason": "queued"})
|
|
90
87
|
|
|
91
88
|
result = operation.status("wf-1")
|
|
92
89
|
|
|
@@ -94,7 +91,7 @@ class TestStatusCarriesPendingReason:
|
|
|
94
91
|
assert result.pending_reason == "queued"
|
|
95
92
|
|
|
96
93
|
def test_keeps_none_when_the_api_sends_nothing(self) -> None:
|
|
97
|
-
operation = _operation({"
|
|
94
|
+
operation = _operation({"workflowStatus": "running"})
|
|
98
95
|
|
|
99
96
|
result = operation.status("wf-1")
|
|
100
97
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|