linkedapi 1.1.1__tar.gz → 1.2.0__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 (98) hide show
  1. {linkedapi-1.1.1 → linkedapi-1.2.0}/.github/workflows/publish.yaml +4 -4
  2. {linkedapi-1.1.1 → linkedapi-1.2.0}/PKG-INFO +1 -1
  3. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/__init__.py +11 -1
  4. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/client.py +15 -0
  5. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/errors.py +2 -0
  6. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/__init__.py +10 -0
  7. linkedapi-1.2.0/linkedapi/operations/accept_connection_request.py +12 -0
  8. linkedapi-1.2.0/linkedapi/operations/ignore_connection_request.py +12 -0
  9. linkedapi-1.2.0/linkedapi/operations/manage_conversation.py +12 -0
  10. linkedapi-1.2.0/linkedapi/operations/nv_manage_conversation.py +12 -0
  11. linkedapi-1.2.0/linkedapi/operations/retrieve_connection_requests.py +15 -0
  12. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/types/__init__.py +10 -0
  13. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/types/connection.py +15 -1
  14. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/types/message.py +10 -0
  15. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/types/webhooks.py +3 -3
  16. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/webhooks/parse.py +1 -1
  17. {linkedapi-1.1.1 → linkedapi-1.2.0}/pyproject.toml +1 -1
  18. {linkedapi-1.1.1 → linkedapi-1.2.0}/tests/test_errors.py +1 -0
  19. {linkedapi-1.1.1 → linkedapi-1.2.0}/tests/test_operations.py +19 -1
  20. {linkedapi-1.1.1 → linkedapi-1.2.0}/tests/test_webhooks.py +4 -4
  21. {linkedapi-1.1.1 → linkedapi-1.2.0}/.gitignore +0 -0
  22. {linkedapi-1.1.1 → linkedapi-1.2.0}/LICENSE +0 -0
  23. {linkedapi-1.1.1 → linkedapi-1.2.0}/README.md +0 -0
  24. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/admin/__init__.py +0 -0
  25. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/admin/accounts.py +0 -0
  26. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/admin/admin.py +0 -0
  27. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/admin/http_client.py +0 -0
  28. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/admin/limits.py +0 -0
  29. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/admin/subscription.py +0 -0
  30. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/admin/webhooks.py +0 -0
  31. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/config.py +0 -0
  32. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/core/__init__.py +0 -0
  33. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/core/operation.py +0 -0
  34. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/core/polling.py +0 -0
  35. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/http/__init__.py +0 -0
  36. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/http/base.py +0 -0
  37. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/http/linked_api_http_client.py +0 -0
  38. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/mappers/__init__.py +0 -0
  39. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/mappers/array.py +0 -0
  40. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/mappers/base.py +0 -0
  41. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/mappers/simple.py +0 -0
  42. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/mappers/then.py +0 -0
  43. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/mappers/void.py +0 -0
  44. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/check_connection_status.py +0 -0
  45. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/comment_on_post.py +0 -0
  46. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/create_post.py +0 -0
  47. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/custom_workflow.py +0 -0
  48. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/fetch_company.py +0 -0
  49. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/fetch_job.py +0 -0
  50. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/fetch_person.py +0 -0
  51. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/fetch_post.py +0 -0
  52. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/nv_fetch_company.py +0 -0
  53. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/nv_fetch_person.py +0 -0
  54. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/nv_search_companies.py +0 -0
  55. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/nv_search_people.py +0 -0
  56. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/nv_send_message.py +0 -0
  57. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/nv_sync_conversation.py +0 -0
  58. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/nv_sync_inbox.py +0 -0
  59. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/react_to_post.py +0 -0
  60. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/remove_connection.py +0 -0
  61. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/retrieve_connections.py +0 -0
  62. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/retrieve_pending_requests.py +0 -0
  63. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/retrieve_performance.py +0 -0
  64. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/retrieve_ssi.py +0 -0
  65. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/search_companies.py +0 -0
  66. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/search_jobs.py +0 -0
  67. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/search_people.py +0 -0
  68. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/send_connection_request.py +0 -0
  69. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/send_message.py +0 -0
  70. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/sync_conversation.py +0 -0
  71. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/sync_inbox.py +0 -0
  72. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/operations/withdraw_connection_request.py +0 -0
  73. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/py.typed +0 -0
  74. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/types/account.py +0 -0
  75. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/types/admin/__init__.py +0 -0
  76. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/types/admin/accounts.py +0 -0
  77. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/types/admin/config.py +0 -0
  78. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/types/admin/limits.py +0 -0
  79. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/types/admin/subscription.py +0 -0
  80. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/types/base.py +0 -0
  81. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/types/company.py +0 -0
  82. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/types/jobs.py +0 -0
  83. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/types/params.py +0 -0
  84. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/types/person.py +0 -0
  85. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/types/post.py +0 -0
  86. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/types/responses.py +0 -0
  87. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/types/search_companies.py +0 -0
  88. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/types/search_people.py +0 -0
  89. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/types/statistics.py +0 -0
  90. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/types/workflow.py +0 -0
  91. {linkedapi-1.1.1 → linkedapi-1.2.0}/linkedapi/webhooks/__init__.py +0 -0
  92. {linkedapi-1.1.1 → linkedapi-1.2.0}/tests/conftest.py +0 -0
  93. {linkedapi-1.1.1 → linkedapi-1.2.0}/tests/test_admin.py +0 -0
  94. {linkedapi-1.1.1 → linkedapi-1.2.0}/tests/test_direct_methods.py +0 -0
  95. {linkedapi-1.1.1 → linkedapi-1.2.0}/tests/test_http_client.py +0 -0
  96. {linkedapi-1.1.1 → linkedapi-1.2.0}/tests/test_mappers.py +0 -0
  97. {linkedapi-1.1.1 → linkedapi-1.2.0}/tests/test_models.py +0 -0
  98. {linkedapi-1.1.1 → linkedapi-1.2.0}/tests/test_polling.py +0 -0
@@ -10,10 +10,10 @@ jobs:
10
10
 
11
11
  steps:
12
12
  - name: Checkout code
13
- uses: actions/checkout@v4
13
+ uses: actions/checkout@v5
14
14
 
15
15
  - name: Set up Python
16
- uses: actions/setup-python@v5
16
+ uses: actions/setup-python@v6
17
17
  with:
18
18
  python-version: '3.12'
19
19
 
@@ -38,10 +38,10 @@ jobs:
38
38
 
39
39
  steps:
40
40
  - name: Checkout code
41
- uses: actions/checkout@v4
41
+ uses: actions/checkout@v5
42
42
 
43
43
  - name: Set up Python
44
- uses: actions/setup-python@v5
44
+ uses: actions/setup-python@v6
45
45
  with:
46
46
  python-version: '3.12'
47
47
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: linkedapi
3
- Version: 1.1.1
3
+ Version: 1.2.0
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
@@ -29,6 +29,7 @@ from linkedapi.mappers import (
29
29
  VoidWorkflowMapper,
30
30
  )
31
31
  from linkedapi.operations import (
32
+ AcceptConnectionRequest,
32
33
  CheckConnectionStatus,
33
34
  CommentOnPost,
34
35
  CreatePost,
@@ -41,10 +42,13 @@ from linkedapi.operations import (
41
42
  FetchPersonMapper,
42
43
  FetchPost,
43
44
  FetchPostMapper,
45
+ IgnoreConnectionRequest,
46
+ ManageConversation,
44
47
  NvFetchCompany,
45
48
  NvFetchCompanyMapper,
46
49
  NvFetchPerson,
47
50
  NvFetchPersonMapper,
51
+ NvManageConversation,
48
52
  NvSearchCompanies,
49
53
  NvSearchPeople,
50
54
  NvSendMessage,
@@ -52,6 +56,7 @@ from linkedapi.operations import (
52
56
  NvSyncInbox,
53
57
  ReactToPost,
54
58
  RemoveConnection,
59
+ RetrieveConnectionRequests,
55
60
  RetrieveConnections,
56
61
  RetrievePendingRequests,
57
62
  RetrievePerformance,
@@ -69,11 +74,12 @@ from linkedapi.types import * # noqa: F403
69
74
  from linkedapi.types import __all__ as _types_all
70
75
  from linkedapi.webhooks import parse_webhook_event
71
76
 
72
- __version__ = "1.1.1"
77
+ __version__ = "1.2.0"
73
78
  PredefinedOperation = Operation
74
79
 
75
80
  __all__ = [
76
81
  *_types_all,
82
+ "AcceptConnectionRequest",
77
83
  "AdminAccounts",
78
84
  "AdminHttpClient",
79
85
  "AdminLimits",
@@ -95,6 +101,7 @@ __all__ = [
95
101
  "FetchPost",
96
102
  "FetchPostMapper",
97
103
  "HttpClient",
104
+ "IgnoreConnectionRequest",
98
105
  "LINKED_API_ACTION_ERROR_TYPES",
99
106
  "LINKED_API_ERROR_TYPES",
100
107
  "LinkedApi",
@@ -105,11 +112,13 @@ __all__ = [
105
112
  "LinkedApiErrorType",
106
113
  "LinkedApiHttpClient",
107
114
  "LinkedApiWorkflowTimeoutError",
115
+ "ManageConversation",
108
116
  "MappedResponse",
109
117
  "NvFetchCompany",
110
118
  "NvFetchCompanyMapper",
111
119
  "NvFetchPerson",
112
120
  "NvFetchPersonMapper",
121
+ "NvManageConversation",
113
122
  "NvSearchCompanies",
114
123
  "NvSearchPeople",
115
124
  "NvSendMessage",
@@ -120,6 +129,7 @@ __all__ = [
120
129
  "ReactToPost",
121
130
  "RemoveConnection",
122
131
  "ResponseMapping",
132
+ "RetrieveConnectionRequests",
123
133
  "RetrieveConnections",
124
134
  "RetrievePendingRequests",
125
135
  "RetrievePerformance",
@@ -8,6 +8,7 @@ from linkedapi.errors import LinkedApiError
8
8
  from linkedapi.http import HttpClient, LinkedApiHttpClient
9
9
  from linkedapi.mappers import MappedResponse
10
10
  from linkedapi.operations import (
11
+ AcceptConnectionRequest,
11
12
  CheckConnectionStatus,
12
13
  CommentOnPost,
13
14
  CreatePost,
@@ -16,8 +17,11 @@ from linkedapi.operations import (
16
17
  FetchJob,
17
18
  FetchPerson,
18
19
  FetchPost,
20
+ IgnoreConnectionRequest,
21
+ ManageConversation,
19
22
  NvFetchCompany,
20
23
  NvFetchPerson,
24
+ NvManageConversation,
21
25
  NvSearchCompanies,
22
26
  NvSearchPeople,
23
27
  NvSendMessage,
@@ -25,6 +29,7 @@ from linkedapi.operations import (
25
29
  NvSyncInbox,
26
30
  ReactToPost,
27
31
  RemoveConnection,
32
+ RetrieveConnectionRequests,
28
33
  RetrieveConnections,
29
34
  RetrievePendingRequests,
30
35
  RetrievePerformance,
@@ -62,10 +67,14 @@ class LinkedApi:
62
67
  self.send_message = SendMessage(self.http_client)
63
68
  self.sync_conversation = SyncConversation(self.http_client)
64
69
  self.sync_inbox = SyncInbox(self.http_client)
70
+ self.manage_conversation = ManageConversation(self.http_client)
65
71
  self.check_connection_status = CheckConnectionStatus(self.http_client)
66
72
  self.send_connection_request = SendConnectionRequest(self.http_client)
67
73
  self.withdraw_connection_request = WithdrawConnectionRequest(self.http_client)
74
+ self.accept_connection_request = AcceptConnectionRequest(self.http_client)
75
+ self.ignore_connection_request = IgnoreConnectionRequest(self.http_client)
68
76
  self.retrieve_pending_requests = RetrievePendingRequests(self.http_client)
77
+ self.retrieve_connection_requests = RetrieveConnectionRequests(self.http_client)
69
78
  self.retrieve_connections = RetrieveConnections(self.http_client)
70
79
  self.remove_connection = RemoveConnection(self.http_client)
71
80
  self.search_companies = SearchCompanies(self.http_client)
@@ -83,6 +92,7 @@ class LinkedApi:
83
92
  self.nv_send_message = NvSendMessage(self.http_client)
84
93
  self.nv_sync_conversation = NvSyncConversation(self.http_client)
85
94
  self.nv_sync_inbox = NvSyncInbox(self.http_client)
95
+ self.nv_manage_conversation = NvManageConversation(self.http_client)
86
96
  self.nv_search_companies = NvSearchCompanies(self.http_client)
87
97
  self.nv_search_people = NvSearchPeople(self.http_client)
88
98
  self.nv_fetch_company = NvFetchCompany(self.http_client)
@@ -93,10 +103,14 @@ class LinkedApi:
93
103
  self.send_message,
94
104
  self.sync_conversation,
95
105
  self.sync_inbox,
106
+ self.manage_conversation,
96
107
  self.check_connection_status,
97
108
  self.send_connection_request,
98
109
  self.withdraw_connection_request,
110
+ self.accept_connection_request,
111
+ self.ignore_connection_request,
99
112
  self.retrieve_pending_requests,
113
+ self.retrieve_connection_requests,
100
114
  self.retrieve_connections,
101
115
  self.remove_connection,
102
116
  self.search_companies,
@@ -114,6 +128,7 @@ class LinkedApi:
114
128
  self.nv_send_message,
115
129
  self.nv_sync_conversation,
116
130
  self.nv_sync_inbox,
131
+ self.nv_manage_conversation,
117
132
  self.nv_search_companies,
118
133
  self.nv_search_people,
119
134
  self.nv_fetch_company,
@@ -23,6 +23,7 @@ LinkedApiActionErrorType = Literal[
23
23
  "noPostingPermission",
24
24
  "noSalesNavigator",
25
25
  "conversationsNotSynced",
26
+ "threadNotFound",
26
27
  ]
27
28
  LINKED_API_ACTION_ERROR_TYPES: tuple[str, ...] = (
28
29
  "personNotFound",
@@ -45,6 +46,7 @@ LINKED_API_ACTION_ERROR_TYPES: tuple[str, ...] = (
45
46
  "noPostingPermission",
46
47
  "noSalesNavigator",
47
48
  "conversationsNotSynced",
49
+ "threadNotFound",
48
50
  )
49
51
 
50
52
  LinkedApiErrorType = Literal[
@@ -1,3 +1,4 @@
1
+ from linkedapi.operations.accept_connection_request import AcceptConnectionRequest
1
2
  from linkedapi.operations.check_connection_status import CheckConnectionStatus
2
3
  from linkedapi.operations.comment_on_post import CommentOnPost
3
4
  from linkedapi.operations.create_post import CreatePost
@@ -6,8 +7,11 @@ from linkedapi.operations.fetch_company import FetchCompany, FetchCompanyMapper
6
7
  from linkedapi.operations.fetch_job import FetchJob, FetchJobMapper
7
8
  from linkedapi.operations.fetch_person import FetchPerson, FetchPersonMapper
8
9
  from linkedapi.operations.fetch_post import FetchPost, FetchPostMapper
10
+ from linkedapi.operations.ignore_connection_request import IgnoreConnectionRequest
11
+ from linkedapi.operations.manage_conversation import ManageConversation
9
12
  from linkedapi.operations.nv_fetch_company import NvFetchCompany, NvFetchCompanyMapper
10
13
  from linkedapi.operations.nv_fetch_person import NvFetchPerson, NvFetchPersonMapper
14
+ from linkedapi.operations.nv_manage_conversation import NvManageConversation
11
15
  from linkedapi.operations.nv_search_companies import NvSearchCompanies
12
16
  from linkedapi.operations.nv_search_people import NvSearchPeople
13
17
  from linkedapi.operations.nv_send_message import NvSendMessage
@@ -15,6 +19,7 @@ from linkedapi.operations.nv_sync_conversation import NvSyncConversation
15
19
  from linkedapi.operations.nv_sync_inbox import NvSyncInbox
16
20
  from linkedapi.operations.react_to_post import ReactToPost
17
21
  from linkedapi.operations.remove_connection import RemoveConnection
22
+ from linkedapi.operations.retrieve_connection_requests import RetrieveConnectionRequests
18
23
  from linkedapi.operations.retrieve_connections import RetrieveConnections
19
24
  from linkedapi.operations.retrieve_pending_requests import RetrievePendingRequests
20
25
  from linkedapi.operations.retrieve_performance import RetrievePerformance
@@ -29,6 +34,7 @@ from linkedapi.operations.sync_inbox import SyncInbox
29
34
  from linkedapi.operations.withdraw_connection_request import WithdrawConnectionRequest
30
35
 
31
36
  __all__ = [
37
+ "AcceptConnectionRequest",
32
38
  "CheckConnectionStatus",
33
39
  "CommentOnPost",
34
40
  "CreatePost",
@@ -41,10 +47,13 @@ __all__ = [
41
47
  "FetchPersonMapper",
42
48
  "FetchPost",
43
49
  "FetchPostMapper",
50
+ "IgnoreConnectionRequest",
51
+ "ManageConversation",
44
52
  "NvFetchCompany",
45
53
  "NvFetchCompanyMapper",
46
54
  "NvFetchPerson",
47
55
  "NvFetchPersonMapper",
56
+ "NvManageConversation",
48
57
  "NvSearchCompanies",
49
58
  "NvSearchPeople",
50
59
  "NvSendMessage",
@@ -52,6 +61,7 @@ __all__ = [
52
61
  "NvSyncInbox",
53
62
  "ReactToPost",
54
63
  "RemoveConnection",
64
+ "RetrieveConnectionRequests",
55
65
  "RetrieveConnections",
56
66
  "RetrievePendingRequests",
57
67
  "RetrievePerformance",
@@ -0,0 +1,12 @@
1
+ from __future__ import annotations
2
+
3
+ from linkedapi.core import Operation
4
+ from linkedapi.mappers import VoidWorkflowMapper
5
+ from linkedapi.types import AcceptConnectionRequestParams
6
+
7
+
8
+ class AcceptConnectionRequest(Operation[AcceptConnectionRequestParams, None]):
9
+ """Accept an incoming standard LinkedIn connection request."""
10
+
11
+ operation_name = "acceptConnectionRequest"
12
+ mapper = VoidWorkflowMapper[AcceptConnectionRequestParams]("st.acceptConnectionRequest")
@@ -0,0 +1,12 @@
1
+ from __future__ import annotations
2
+
3
+ from linkedapi.core import Operation
4
+ from linkedapi.mappers import VoidWorkflowMapper
5
+ from linkedapi.types import IgnoreConnectionRequestParams
6
+
7
+
8
+ class IgnoreConnectionRequest(Operation[IgnoreConnectionRequestParams, None]):
9
+ """Ignore an incoming standard LinkedIn connection request."""
10
+
11
+ operation_name = "ignoreConnectionRequest"
12
+ mapper = VoidWorkflowMapper[IgnoreConnectionRequestParams]("st.ignoreConnectionRequest")
@@ -0,0 +1,12 @@
1
+ from __future__ import annotations
2
+
3
+ from linkedapi.core import Operation
4
+ from linkedapi.mappers import VoidWorkflowMapper
5
+ from linkedapi.types import ManageConversationParams
6
+
7
+
8
+ class ManageConversation(Operation[ManageConversationParams, None]):
9
+ """Manage a standard LinkedIn conversation thread."""
10
+
11
+ operation_name = "manageConversation"
12
+ mapper = VoidWorkflowMapper[ManageConversationParams]("st.manageConversation")
@@ -0,0 +1,12 @@
1
+ from __future__ import annotations
2
+
3
+ from linkedapi.core import Operation
4
+ from linkedapi.mappers import VoidWorkflowMapper
5
+ from linkedapi.types import NvManageConversationParams
6
+
7
+
8
+ class NvManageConversation(Operation[NvManageConversationParams, None]):
9
+ """Manage a Sales Navigator conversation thread."""
10
+
11
+ operation_name = "nvManageConversation"
12
+ mapper = VoidWorkflowMapper[NvManageConversationParams]("nv.manageConversation")
@@ -0,0 +1,15 @@
1
+ from __future__ import annotations
2
+
3
+ from linkedapi.core import Operation
4
+ from linkedapi.mappers import ArrayWorkflowMapper
5
+ from linkedapi.types import RetrieveConnectionRequestsResult
6
+
7
+
8
+ class RetrieveConnectionRequests(Operation[None, list[RetrieveConnectionRequestsResult]]):
9
+ """Retrieve incoming standard LinkedIn connection requests."""
10
+
11
+ operation_name = "retrieveConnectionRequests"
12
+ mapper = ArrayWorkflowMapper[None, RetrieveConnectionRequestsResult](
13
+ "st.retrieveConnectionRequests",
14
+ RetrieveConnectionRequestsResult,
15
+ )
@@ -68,13 +68,16 @@ from linkedapi.types.company import (
68
68
  StCompanyEmployeesRetrievalConfig,
69
69
  )
70
70
  from linkedapi.types.connection import (
71
+ AcceptConnectionRequestParams,
71
72
  CheckConnectionStatusParams,
72
73
  CheckConnectionStatusResult,
73
74
  ConnectionPerson,
74
75
  ConnectionStatus,
76
+ IgnoreConnectionRequestParams,
75
77
  NvOpenPersonPageParams,
76
78
  NvOpenPersonPageResult,
77
79
  RemoveConnectionParams,
80
+ RetrieveConnectionRequestsResult,
78
81
  RetrieveConnectionsFilter,
79
82
  RetrieveConnectionsParams,
80
83
  RetrieveConnectionsResult,
@@ -103,8 +106,10 @@ from linkedapi.types.message import (
103
106
  ConversationType,
104
107
  InboxMessage,
105
108
  InboxPollRequest,
109
+ ManageConversationParams,
106
110
  Message,
107
111
  MessageSender,
112
+ NvManageConversationParams,
108
113
  NvSendMessageParams,
109
114
  NvSyncConversationParams,
110
115
  NvSyncInboxParams,
@@ -219,6 +224,7 @@ from linkedapi.types.workflow import (
219
224
  )
220
225
 
221
226
  __all__ = [
227
+ "AcceptConnectionRequestParams",
222
228
  "AccountInfo",
223
229
  "AccountWebhookEvent",
224
230
  "AccountWebhookEventData",
@@ -275,6 +281,7 @@ __all__ = [
275
281
  "GetConnectionSessionParams",
276
282
  "GetLimitsParams",
277
283
  "GetLimitsUsageParams",
284
+ "IgnoreConnectionRequestParams",
278
285
  "InboxMessage",
279
286
  "InboxPollRequest",
280
287
  "Job",
@@ -298,6 +305,7 @@ __all__ = [
298
305
  "LinkedApiRequestError",
299
306
  "LinkedApiResponse",
300
307
  "LocationType",
308
+ "ManageConversationParams",
301
309
  "MaxAnnualRevenue",
302
310
  "Message",
303
311
  "MessageSender",
@@ -313,6 +321,7 @@ __all__ = [
313
321
  "NvCompanyEmployeeRetrievalConfig",
314
322
  "NvFetchCompanyParams",
315
323
  "NvFetchCompanyResult",
324
+ "NvManageConversationParams",
316
325
  "NvOpenPersonPageParams",
317
326
  "NvOpenPersonPageResult",
318
327
  "NvSearchCompaniesFilter",
@@ -352,6 +361,7 @@ __all__ = [
352
361
  "ReparseAccountInfoResult",
353
362
  "ReplayWebhookDeliveryParams",
354
363
  "ResetLimitsParams",
364
+ "RetrieveConnectionRequestsResult",
355
365
  "RetrieveConnectionsFilter",
356
366
  "RetrieveConnectionsParams",
357
367
  "RetrieveConnectionsResult",
@@ -5,7 +5,7 @@ from typing import Literal
5
5
  from linkedapi.types.base import LinkedApiModel
6
6
  from linkedapi.types.params import BaseActionParams, LimitParams
7
7
 
8
- ConnectionStatus = Literal["connected", "pending", "notConnected"]
8
+ ConnectionStatus = Literal["connected", "pending", "incoming", "notConnected"]
9
9
 
10
10
 
11
11
  class ConnectionPerson(LinkedApiModel):
@@ -42,6 +42,20 @@ class RetrievePendingRequestsResult(LinkedApiModel):
42
42
  sent_time: str | None = None
43
43
 
44
44
 
45
+ class AcceptConnectionRequestParams(BaseActionParams):
46
+ person_url: str
47
+
48
+
49
+ class IgnoreConnectionRequestParams(BaseActionParams):
50
+ person_url: str
51
+
52
+
53
+ class RetrieveConnectionRequestsResult(LinkedApiModel):
54
+ name: str | None = None
55
+ public_url: str | None = None
56
+ headline: str | None = None
57
+
58
+
45
59
  class RetrieveConnectionsFilter(LinkedApiModel):
46
60
  first_name: str | None = None
47
61
  last_name: str | None = None
@@ -23,6 +23,11 @@ class SyncInboxParams(BaseActionParams):
23
23
  pass
24
24
 
25
25
 
26
+ class ManageConversationParams(BaseActionParams):
27
+ thread_id: str
28
+ operation: str
29
+
30
+
26
31
  class NvSendMessageParams(BaseActionParams):
27
32
  text: str
28
33
  person_url: str | None = None
@@ -38,6 +43,11 @@ class NvSyncInboxParams(BaseActionParams):
38
43
  pass
39
44
 
40
45
 
46
+ class NvManageConversationParams(BaseActionParams):
47
+ thread_id: str
48
+ operation: str
49
+
50
+
41
51
  class ConversationPollRequest(LinkedApiModel):
42
52
  person_url: str
43
53
  type: ConversationType
@@ -14,8 +14,8 @@ WebhookEventType = Literal[
14
14
  "account.reconnectionRequired",
15
15
  "account.frozen",
16
16
  "account.deleted",
17
- "linkedin.messageReceived",
18
- "linkedin.messageSent",
17
+ "inbox.messageReceived",
18
+ "inbox.messageSent",
19
19
  "webhook.test",
20
20
  ]
21
21
  WebhookDeliveryStatus = Literal["pending", "delivering", "success", "failed"]
@@ -107,7 +107,7 @@ class MessageWebhookEventData(LinkedApiModel):
107
107
 
108
108
  class MessageWebhookEvent(LinkedApiModel):
109
109
  id: str
110
- type: Literal["linkedin.messageReceived", "linkedin.messageSent"]
110
+ type: Literal["inbox.messageReceived", "inbox.messageSent"]
111
111
  created_at: str | None = None
112
112
  data: MessageWebhookEventData
113
113
 
@@ -42,7 +42,7 @@ def parse_webhook_event(raw_body: str | bytes) -> WebhookEvent:
42
42
  return WorkflowWebhookEvent.model_validate(parsed)
43
43
  if event_type.startswith("account."):
44
44
  return AccountWebhookEvent.model_validate(parsed)
45
- if event_type.startswith("linkedin."):
45
+ if event_type.startswith("inbox."):
46
46
  return MessageWebhookEvent.model_validate(parsed)
47
47
  if event_type == "webhook.test":
48
48
  return WebhookTestEvent.model_validate(parsed)
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "linkedapi"
7
- version = "1.1.1"
7
+ version = "1.2.0"
8
8
  description = "Official synchronous Python SDK for Linked API."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -49,6 +49,7 @@ def test_error_type_sets_match_node_contract() -> None:
49
49
  "noPostingPermission",
50
50
  "noSalesNavigator",
51
51
  "conversationsNotSynced",
52
+ "threadNotFound",
52
53
  )
53
54
 
54
55
 
@@ -29,15 +29,20 @@ def test_linked_api_exposes_all_predefined_operations() -> None:
29
29
  "send_connection_request",
30
30
  "check_connection_status",
31
31
  "withdraw_connection_request",
32
+ "accept_connection_request",
33
+ "ignore_connection_request",
32
34
  "retrieve_pending_requests",
35
+ "retrieve_connection_requests",
33
36
  "retrieve_connections",
34
37
  "remove_connection",
35
38
  "send_message",
36
39
  "sync_conversation",
37
40
  "sync_inbox",
41
+ "manage_conversation",
38
42
  "nv_send_message",
39
43
  "nv_sync_conversation",
40
44
  "nv_sync_inbox",
45
+ "nv_manage_conversation",
41
46
  "react_to_post",
42
47
  "comment_on_post",
43
48
  "create_post",
@@ -50,7 +55,7 @@ def test_linked_api_exposes_all_predefined_operations() -> None:
50
55
  assert hasattr(operation, "execute")
51
56
  assert hasattr(operation, "result")
52
57
  assert hasattr(operation, "cancel")
53
- assert len(linkedapi.operations) == 29
58
+ assert len(linkedapi.operations) == 34
54
59
 
55
60
 
56
61
  def test_operation_mappers_match_node_contract() -> None:
@@ -66,10 +71,23 @@ def test_operation_mappers_match_node_contract() -> None:
66
71
  assert linkedapi.fetch_job.mapper.default_params == {"basicInfo": True}
67
72
  assert isinstance(linkedapi.send_connection_request.mapper, VoidWorkflowMapper)
68
73
  assert linkedapi.send_connection_request.mapper.action_type == "st.sendConnectionRequest"
74
+ assert isinstance(linkedapi.accept_connection_request.mapper, VoidWorkflowMapper)
75
+ assert linkedapi.accept_connection_request.mapper.action_type == "st.acceptConnectionRequest"
76
+ assert isinstance(linkedapi.ignore_connection_request.mapper, VoidWorkflowMapper)
77
+ assert linkedapi.ignore_connection_request.mapper.action_type == "st.ignoreConnectionRequest"
78
+ assert isinstance(linkedapi.retrieve_connection_requests.mapper, ArrayWorkflowMapper)
79
+ assert (
80
+ linkedapi.retrieve_connection_requests.mapper.base_action_type
81
+ == "st.retrieveConnectionRequests"
82
+ )
69
83
  assert isinstance(linkedapi.sync_inbox.mapper, VoidWorkflowMapper)
70
84
  assert linkedapi.sync_inbox.mapper.action_type == "st.syncInbox"
71
85
  assert isinstance(linkedapi.nv_sync_inbox.mapper, VoidWorkflowMapper)
72
86
  assert linkedapi.nv_sync_inbox.mapper.action_type == "nv.syncInbox"
87
+ assert isinstance(linkedapi.manage_conversation.mapper, VoidWorkflowMapper)
88
+ assert linkedapi.manage_conversation.mapper.action_type == "st.manageConversation"
89
+ assert isinstance(linkedapi.nv_manage_conversation.mapper, VoidWorkflowMapper)
90
+ assert linkedapi.nv_manage_conversation.mapper.action_type == "nv.manageConversation"
73
91
 
74
92
 
75
93
  def test_execute_and_result_flow_returns_pydantic_data(
@@ -41,7 +41,7 @@ def test_parse_message_received_event() -> None:
41
41
  json.dumps(
42
42
  {
43
43
  "id": "e3",
44
- "type": "linkedin.messageReceived",
44
+ "type": "inbox.messageReceived",
45
45
  "data": {
46
46
  "accountId": "a1",
47
47
  "type": "st",
@@ -57,7 +57,7 @@ def test_parse_message_received_event() -> None:
57
57
  )
58
58
 
59
59
  assert isinstance(event, MessageWebhookEvent)
60
- assert event.type == "linkedin.messageReceived"
60
+ assert event.type == "inbox.messageReceived"
61
61
  assert event.data.thread_id == "t1"
62
62
  assert event.data.message_id == "m1"
63
63
  assert event.data.sender == "them"
@@ -68,14 +68,14 @@ def test_parse_message_sent_event() -> None:
68
68
  json.dumps(
69
69
  {
70
70
  "id": "e4",
71
- "type": "linkedin.messageSent",
71
+ "type": "inbox.messageSent",
72
72
  "data": {"accountId": "a1", "type": "nv", "sender": "us", "text": "hi"},
73
73
  }
74
74
  )
75
75
  )
76
76
 
77
77
  assert isinstance(event, MessageWebhookEvent)
78
- assert event.type == "linkedin.messageSent"
78
+ assert event.type == "inbox.messageSent"
79
79
  assert event.data.type == "nv"
80
80
 
81
81
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes