linkedapi 1.0.1__tar.gz → 1.1.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 (90) hide show
  1. {linkedapi-1.0.1 → linkedapi-1.1.0}/.gitignore +1 -0
  2. {linkedapi-1.0.1 → linkedapi-1.1.0}/PKG-INFO +1 -1
  3. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/__init__.py +11 -1
  4. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/admin/__init__.py +2 -0
  5. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/admin/accounts.py +23 -0
  6. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/admin/admin.py +3 -1
  7. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/admin/subscription.py +0 -18
  8. linkedapi-1.1.0/linkedapi/admin/webhooks.py +82 -0
  9. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/client.py +6 -0
  10. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/errors.py +6 -0
  11. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/operations/__init__.py +5 -0
  12. linkedapi-1.1.0/linkedapi/operations/fetch_job.py +23 -0
  13. linkedapi-1.1.0/linkedapi/operations/search_jobs.py +15 -0
  14. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/types/__init__.py +74 -10
  15. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/types/admin/__init__.py +8 -10
  16. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/types/admin/accounts.py +22 -0
  17. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/types/admin/subscription.py +0 -21
  18. linkedapi-1.1.0/linkedapi/types/jobs.py +131 -0
  19. linkedapi-1.1.0/linkedapi/types/webhooks.py +105 -0
  20. linkedapi-1.1.0/linkedapi/webhooks/__init__.py +3 -0
  21. linkedapi-1.1.0/linkedapi/webhooks/parse.py +48 -0
  22. {linkedapi-1.0.1 → linkedapi-1.1.0}/pyproject.toml +1 -1
  23. {linkedapi-1.0.1 → linkedapi-1.1.0}/tests/test_admin.py +9 -6
  24. {linkedapi-1.0.1 → linkedapi-1.1.0}/tests/test_errors.py +3 -0
  25. {linkedapi-1.0.1 → linkedapi-1.1.0}/tests/test_operations.py +7 -1
  26. {linkedapi-1.0.1 → linkedapi-1.1.0}/.github/workflows/publish.yaml +0 -0
  27. {linkedapi-1.0.1 → linkedapi-1.1.0}/LICENSE +0 -0
  28. {linkedapi-1.0.1 → linkedapi-1.1.0}/README.md +0 -0
  29. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/admin/http_client.py +0 -0
  30. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/admin/limits.py +0 -0
  31. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/config.py +0 -0
  32. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/core/__init__.py +0 -0
  33. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/core/operation.py +0 -0
  34. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/core/polling.py +0 -0
  35. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/http/__init__.py +0 -0
  36. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/http/base.py +0 -0
  37. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/http/linked_api_http_client.py +0 -0
  38. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/mappers/__init__.py +0 -0
  39. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/mappers/array.py +0 -0
  40. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/mappers/base.py +0 -0
  41. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/mappers/simple.py +0 -0
  42. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/mappers/then.py +0 -0
  43. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/mappers/void.py +0 -0
  44. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/operations/check_connection_status.py +0 -0
  45. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/operations/comment_on_post.py +0 -0
  46. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/operations/create_post.py +0 -0
  47. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/operations/custom_workflow.py +0 -0
  48. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/operations/fetch_company.py +0 -0
  49. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/operations/fetch_person.py +0 -0
  50. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/operations/fetch_post.py +0 -0
  51. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/operations/nv_fetch_company.py +0 -0
  52. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/operations/nv_fetch_person.py +0 -0
  53. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/operations/nv_search_companies.py +0 -0
  54. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/operations/nv_search_people.py +0 -0
  55. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/operations/nv_send_message.py +0 -0
  56. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/operations/nv_sync_conversation.py +0 -0
  57. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/operations/react_to_post.py +0 -0
  58. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/operations/remove_connection.py +0 -0
  59. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/operations/retrieve_connections.py +0 -0
  60. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/operations/retrieve_pending_requests.py +0 -0
  61. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/operations/retrieve_performance.py +0 -0
  62. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/operations/retrieve_ssi.py +0 -0
  63. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/operations/search_companies.py +0 -0
  64. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/operations/search_people.py +0 -0
  65. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/operations/send_connection_request.py +0 -0
  66. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/operations/send_message.py +0 -0
  67. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/operations/sync_conversation.py +0 -0
  68. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/operations/withdraw_connection_request.py +0 -0
  69. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/py.typed +0 -0
  70. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/types/account.py +0 -0
  71. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/types/admin/config.py +0 -0
  72. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/types/admin/limits.py +0 -0
  73. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/types/base.py +0 -0
  74. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/types/company.py +0 -0
  75. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/types/connection.py +0 -0
  76. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/types/message.py +0 -0
  77. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/types/params.py +0 -0
  78. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/types/person.py +0 -0
  79. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/types/post.py +0 -0
  80. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/types/responses.py +0 -0
  81. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/types/search_companies.py +0 -0
  82. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/types/search_people.py +0 -0
  83. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/types/statistics.py +0 -0
  84. {linkedapi-1.0.1 → linkedapi-1.1.0}/linkedapi/types/workflow.py +0 -0
  85. {linkedapi-1.0.1 → linkedapi-1.1.0}/tests/conftest.py +0 -0
  86. {linkedapi-1.0.1 → linkedapi-1.1.0}/tests/test_direct_methods.py +0 -0
  87. {linkedapi-1.0.1 → linkedapi-1.1.0}/tests/test_http_client.py +0 -0
  88. {linkedapi-1.0.1 → linkedapi-1.1.0}/tests/test_mappers.py +0 -0
  89. {linkedapi-1.0.1 → linkedapi-1.1.0}/tests/test_models.py +0 -0
  90. {linkedapi-1.0.1 → linkedapi-1.1.0}/tests/test_polling.py +0 -0
@@ -6,4 +6,5 @@ dist/
6
6
  .ruff_cache/
7
7
  .pytest_cache/
8
8
  .venv/
9
+ uv.lock
9
10
  build/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: linkedapi
3
- Version: 1.0.1
3
+ Version: 1.1.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
@@ -3,6 +3,7 @@ from linkedapi.admin import (
3
3
  AdminHttpClient,
4
4
  AdminLimits,
5
5
  AdminSubscription,
6
+ AdminWebhooks,
6
7
  LinkedApiAdmin,
7
8
  )
8
9
  from linkedapi.client import LinkedApi
@@ -34,6 +35,8 @@ from linkedapi.operations import (
34
35
  CustomWorkflow,
35
36
  FetchCompany,
36
37
  FetchCompanyMapper,
38
+ FetchJob,
39
+ FetchJobMapper,
37
40
  FetchPerson,
38
41
  FetchPersonMapper,
39
42
  FetchPost,
@@ -53,6 +56,7 @@ from linkedapi.operations import (
53
56
  RetrievePerformance,
54
57
  RetrieveSSI,
55
58
  SearchCompanies,
59
+ SearchJobs,
56
60
  SearchPeople,
57
61
  SendConnectionRequest,
58
62
  SendMessage,
@@ -61,8 +65,9 @@ from linkedapi.operations import (
61
65
  )
62
66
  from linkedapi.types import * # noqa: F403
63
67
  from linkedapi.types import __all__ as _types_all
68
+ from linkedapi.webhooks import parse_webhook_event
64
69
 
65
- __version__ = "1.0.0"
70
+ __version__ = "1.1.0"
66
71
  PredefinedOperation = Operation
67
72
 
68
73
  __all__ = [
@@ -71,6 +76,7 @@ __all__ = [
71
76
  "AdminHttpClient",
72
77
  "AdminLimits",
73
78
  "AdminSubscription",
79
+ "AdminWebhooks",
74
80
  "ActionConfig",
75
81
  "ArrayWorkflowMapper",
76
82
  "BaseMapper",
@@ -80,6 +86,8 @@ __all__ = [
80
86
  "CustomWorkflow",
81
87
  "FetchCompany",
82
88
  "FetchCompanyMapper",
89
+ "FetchJob",
90
+ "FetchJobMapper",
83
91
  "FetchPerson",
84
92
  "FetchPersonMapper",
85
93
  "FetchPost",
@@ -114,6 +122,7 @@ __all__ = [
114
122
  "RetrievePerformance",
115
123
  "RetrieveSSI",
116
124
  "SearchCompanies",
125
+ "SearchJobs",
117
126
  "SearchPeople",
118
127
  "SendConnectionRequest",
119
128
  "SendMessage",
@@ -123,5 +132,6 @@ __all__ = [
123
132
  "VoidWorkflowMapper",
124
133
  "WithdrawConnectionRequest",
125
134
  "__version__",
135
+ "parse_webhook_event",
126
136
  "poll_workflow_result",
127
137
  ]
@@ -3,11 +3,13 @@ from linkedapi.admin.admin import LinkedApiAdmin
3
3
  from linkedapi.admin.http_client import AdminHttpClient
4
4
  from linkedapi.admin.limits import AdminLimits
5
5
  from linkedapi.admin.subscription import AdminSubscription
6
+ from linkedapi.admin.webhooks import AdminWebhooks
6
7
 
7
8
  __all__ = [
8
9
  "AdminAccounts",
9
10
  "AdminHttpClient",
10
11
  "AdminLimits",
11
12
  "AdminSubscription",
13
+ "AdminWebhooks",
12
14
  "LinkedApiAdmin",
13
15
  ]
@@ -11,10 +11,14 @@ from linkedapi.types.admin import (
11
11
  CancelConnectionSessionParams,
12
12
  ConnectionSessionResult,
13
13
  CreateConnectionSessionResult,
14
+ CreateReconnectionSessionParams,
15
+ CreateReconnectionSessionResult,
14
16
  DisconnectParams,
15
17
  GetConnectionSessionParams,
16
18
  RegenerateTokenParams,
17
19
  RegenerateTokenResult,
20
+ ReparseAccountInfoParams,
21
+ ReparseAccountInfoResult,
18
22
  )
19
23
 
20
24
  TModel = TypeVar("TModel", bound=BaseModel)
@@ -30,6 +34,14 @@ class AdminAccounts:
30
34
  def disconnect(self, params: DisconnectParams) -> None:
31
35
  self._post_void("/admin/accounts.disconnect", "Failed to disconnect account", params)
32
36
 
37
+ def reparse_account_info(self, params: ReparseAccountInfoParams) -> ReparseAccountInfoResult:
38
+ return self._post_result(
39
+ "/admin/accounts.reparseAccountInfo",
40
+ ReparseAccountInfoResult,
41
+ "Failed to reparse account info",
42
+ params,
43
+ )
44
+
33
45
  def regenerate_identification_token(
34
46
  self,
35
47
  params: RegenerateTokenParams,
@@ -48,6 +60,17 @@ class AdminAccounts:
48
60
  "Failed to create connection session",
49
61
  )
50
62
 
63
+ def create_reconnection_session(
64
+ self,
65
+ params: CreateReconnectionSessionParams,
66
+ ) -> CreateReconnectionSessionResult:
67
+ return self._post_result(
68
+ "/admin/accounts.createReconnectionSession",
69
+ CreateReconnectionSessionResult,
70
+ "Failed to create reconnection session",
71
+ params,
72
+ )
73
+
51
74
  def get_connection_session(
52
75
  self,
53
76
  params: GetConnectionSessionParams,
@@ -6,12 +6,13 @@ from linkedapi.admin.accounts import AdminAccounts
6
6
  from linkedapi.admin.http_client import AdminHttpClient
7
7
  from linkedapi.admin.limits import AdminLimits
8
8
  from linkedapi.admin.subscription import AdminSubscription
9
+ from linkedapi.admin.webhooks import AdminWebhooks
9
10
  from linkedapi.http import HttpClient
10
11
  from linkedapi.types.admin import AdminConfig
11
12
 
12
13
 
13
14
  class LinkedApiAdmin:
14
- """Admin SDK for Linked API subscription, account, and limit management."""
15
+ """Admin SDK for Linked API subscription, account, limit, and webhook management."""
15
16
 
16
17
  def __init__(self, config: AdminConfig | HttpClient[Any]) -> None:
17
18
  http_client = (
@@ -20,3 +21,4 @@ class LinkedApiAdmin:
20
21
  self.subscription = AdminSubscription(http_client)
21
22
  self.accounts = AdminAccounts(http_client)
22
23
  self.limits = AdminLimits(http_client)
24
+ self.webhooks = AdminWebhooks(http_client)
@@ -7,11 +7,8 @@ from pydantic import BaseModel
7
7
  from linkedapi.errors import LinkedApiError
8
8
  from linkedapi.http import HttpClient
9
9
  from linkedapi.types.admin import (
10
- BillingLinkResult,
11
- CancelResult,
12
10
  SetSeatsParams,
13
11
  SetSeatsResult,
14
- SubscriptionPricingResult,
15
12
  SubscriptionSeatsResult,
16
13
  SubscriptionStatus,
17
14
  )
@@ -33,26 +30,11 @@ class AdminSubscription:
33
30
  "/admin/subscription.getSeats", SubscriptionSeatsResult, "Failed to get seats"
34
31
  )
35
32
 
36
- def get_pricing(self) -> SubscriptionPricingResult:
37
- return self._post_result(
38
- "/admin/subscription.getPricing", SubscriptionPricingResult, "Failed to get pricing"
39
- )
40
-
41
33
  def set_seats(self, params: SetSeatsParams) -> SetSeatsResult:
42
34
  return self._post_result(
43
35
  "/admin/subscription.setSeats", SetSeatsResult, "Failed to set seats", params
44
36
  )
45
37
 
46
- def get_billing_link(self) -> BillingLinkResult:
47
- return self._post_result(
48
- "/admin/subscription.getBillingLink", BillingLinkResult, "Failed to get billing link"
49
- )
50
-
51
- def cancel(self) -> CancelResult:
52
- return self._post_result(
53
- "/admin/subscription.cancel", CancelResult, "Failed to cancel subscription"
54
- )
55
-
56
38
  def _post_result(
57
39
  self,
58
40
  path: str,
@@ -0,0 +1,82 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Any
4
+
5
+ from linkedapi.errors import LinkedApiError
6
+ from linkedapi.http import HttpClient
7
+ from linkedapi.types.webhooks import (
8
+ DeleteWebhookParams,
9
+ ReplayWebhookDeliveryParams,
10
+ SetWebhookParams,
11
+ SetWebhookPayloadModeParams,
12
+ WebhookDelivery,
13
+ WebhookSubscription,
14
+ )
15
+
16
+
17
+ class AdminWebhooks:
18
+ """Manage the client's registered outbound webhook and inspect recent deliveries.
19
+
20
+ A client may hold at most one active webhook. It receives every event Linked API emits
21
+ (workflow lifecycle + account status changes); filter by the event ``type`` on your receiver.
22
+ """
23
+
24
+ def __init__(self, http_client: HttpClient[Any]) -> None:
25
+ self.http_client = http_client
26
+
27
+ def set(self, params: SetWebhookParams) -> WebhookSubscription:
28
+ result = self._post_result("/admin/webhook.set", "Failed to set webhook", params)
29
+ return WebhookSubscription.model_validate(result["webhook"])
30
+
31
+ def get(self) -> list[WebhookSubscription]:
32
+ result = self._post_result("/admin/webhook.get", "Failed to get webhooks")
33
+ return [WebhookSubscription.model_validate(item) for item in result["webhooks"]]
34
+
35
+ def set_payload_mode(self, params: SetWebhookPayloadModeParams) -> WebhookSubscription:
36
+ result = self._post_result(
37
+ "/admin/webhook.setPayloadMode",
38
+ "Failed to set webhook payload mode",
39
+ params,
40
+ )
41
+ return WebhookSubscription.model_validate(result["webhook"])
42
+
43
+ def delete(self, params: DeleteWebhookParams) -> None:
44
+ self._post_void("/admin/webhook.delete", "Failed to delete webhook", params)
45
+
46
+ def deliveries(self) -> list[WebhookDelivery]:
47
+ result = self._post_result("/admin/webhook.deliveries", "Failed to get webhook deliveries")
48
+ return [WebhookDelivery.model_validate(item) for item in result["deliveries"]]
49
+
50
+ def replay_delivery(self, params: ReplayWebhookDeliveryParams) -> None:
51
+ self._post_void(
52
+ "/admin/webhook.replayDelivery",
53
+ "Failed to replay webhook delivery",
54
+ params,
55
+ )
56
+
57
+ def send_test(self) -> None:
58
+ self._post_void("/admin/webhook.sendTest", "Failed to send test webhook")
59
+
60
+ def _post_result(
61
+ self,
62
+ path: str,
63
+ default_message: str,
64
+ params: Any | None = None,
65
+ ) -> dict[str, Any]:
66
+ response = self.http_client.post(path, params)
67
+ if response.success and response.result is not None:
68
+ result: dict[str, Any] = response.result
69
+ return result
70
+ raise LinkedApiError(
71
+ response.error.type if response.error else "httpError",
72
+ response.error.message if response.error else default_message,
73
+ )
74
+
75
+ def _post_void(self, path: str, default_message: str, params: Any | None = None) -> None:
76
+ response = self.http_client.post(path, params)
77
+ if response.success:
78
+ return
79
+ raise LinkedApiError(
80
+ response.error.type if response.error else "httpError",
81
+ response.error.message if response.error else default_message,
82
+ )
@@ -13,6 +13,7 @@ from linkedapi.operations import (
13
13
  CreatePost,
14
14
  CustomWorkflow,
15
15
  FetchCompany,
16
+ FetchJob,
16
17
  FetchPerson,
17
18
  FetchPost,
18
19
  NvFetchCompany,
@@ -28,6 +29,7 @@ from linkedapi.operations import (
28
29
  RetrievePerformance,
29
30
  RetrieveSSI,
30
31
  SearchCompanies,
32
+ SearchJobs,
31
33
  SearchPeople,
32
34
  SendConnectionRequest,
33
35
  SendMessage,
@@ -60,9 +62,11 @@ class LinkedApi:
60
62
  self.remove_connection = RemoveConnection(self.http_client)
61
63
  self.search_companies = SearchCompanies(self.http_client)
62
64
  self.search_people = SearchPeople(self.http_client)
65
+ self.search_jobs = SearchJobs(self.http_client)
63
66
  self.fetch_company = FetchCompany(self.http_client)
64
67
  self.fetch_person = FetchPerson(self.http_client)
65
68
  self.fetch_post = FetchPost(self.http_client)
69
+ self.fetch_job = FetchJob(self.http_client)
66
70
  self.react_to_post = ReactToPost(self.http_client)
67
71
  self.comment_on_post = CommentOnPost(self.http_client)
68
72
  self.create_post = CreatePost(self.http_client)
@@ -87,9 +91,11 @@ class LinkedApi:
87
91
  self.remove_connection,
88
92
  self.search_companies,
89
93
  self.search_people,
94
+ self.search_jobs,
90
95
  self.fetch_company,
91
96
  self.fetch_person,
92
97
  self.fetch_post,
98
+ self.fetch_job,
93
99
  self.react_to_post,
94
100
  self.comment_on_post,
95
101
  self.create_post,
@@ -9,6 +9,8 @@ LinkedApiActionErrorType = Literal[
9
9
  "alreadyPending",
10
10
  "alreadyConnected",
11
11
  "emailRequired",
12
+ "noteTooLong",
13
+ "noteLimitExceeded",
12
14
  "requestNotAllowed",
13
15
  "notPending",
14
16
  "retrievingNotAllowed",
@@ -16,6 +18,7 @@ LinkedApiActionErrorType = Literal[
16
18
  "searchingNotAllowed",
17
19
  "companyNotFound",
18
20
  "postNotFound",
21
+ "jobNotFound",
19
22
  "commentingNotAllowed",
20
23
  "noPostingPermission",
21
24
  "noSalesNavigator",
@@ -28,6 +31,8 @@ LINKED_API_ACTION_ERROR_TYPES: tuple[str, ...] = (
28
31
  "alreadyPending",
29
32
  "alreadyConnected",
30
33
  "emailRequired",
34
+ "noteTooLong",
35
+ "noteLimitExceeded",
31
36
  "requestNotAllowed",
32
37
  "notPending",
33
38
  "retrievingNotAllowed",
@@ -35,6 +40,7 @@ LINKED_API_ACTION_ERROR_TYPES: tuple[str, ...] = (
35
40
  "searchingNotAllowed",
36
41
  "companyNotFound",
37
42
  "postNotFound",
43
+ "jobNotFound",
38
44
  "commentingNotAllowed",
39
45
  "noPostingPermission",
40
46
  "noSalesNavigator",
@@ -3,6 +3,7 @@ from linkedapi.operations.comment_on_post import CommentOnPost
3
3
  from linkedapi.operations.create_post import CreatePost
4
4
  from linkedapi.operations.custom_workflow import CustomWorkflow
5
5
  from linkedapi.operations.fetch_company import FetchCompany, FetchCompanyMapper
6
+ from linkedapi.operations.fetch_job import FetchJob, FetchJobMapper
6
7
  from linkedapi.operations.fetch_person import FetchPerson, FetchPersonMapper
7
8
  from linkedapi.operations.fetch_post import FetchPost, FetchPostMapper
8
9
  from linkedapi.operations.nv_fetch_company import NvFetchCompany, NvFetchCompanyMapper
@@ -18,6 +19,7 @@ from linkedapi.operations.retrieve_pending_requests import RetrievePendingReques
18
19
  from linkedapi.operations.retrieve_performance import RetrievePerformance
19
20
  from linkedapi.operations.retrieve_ssi import RetrieveSSI
20
21
  from linkedapi.operations.search_companies import SearchCompanies
22
+ from linkedapi.operations.search_jobs import SearchJobs
21
23
  from linkedapi.operations.search_people import SearchPeople
22
24
  from linkedapi.operations.send_connection_request import SendConnectionRequest
23
25
  from linkedapi.operations.send_message import SendMessage
@@ -31,6 +33,8 @@ __all__ = [
31
33
  "CustomWorkflow",
32
34
  "FetchCompany",
33
35
  "FetchCompanyMapper",
36
+ "FetchJob",
37
+ "FetchJobMapper",
34
38
  "FetchPerson",
35
39
  "FetchPersonMapper",
36
40
  "FetchPost",
@@ -50,6 +54,7 @@ __all__ = [
50
54
  "RetrievePerformance",
51
55
  "RetrieveSSI",
52
56
  "SearchCompanies",
57
+ "SearchJobs",
53
58
  "SearchPeople",
54
59
  "SendConnectionRequest",
55
60
  "SendMessage",
@@ -0,0 +1,23 @@
1
+ from __future__ import annotations
2
+
3
+ from linkedapi.core import Operation
4
+ from linkedapi.mappers import ThenWorkflowMapper
5
+ from linkedapi.types import FetchJobParams, Job
6
+
7
+
8
+ class FetchJobMapper(ThenWorkflowMapper[FetchJobParams, Job]):
9
+ def __init__(self) -> None:
10
+ super().__init__(
11
+ action_configs=[],
12
+ response_mappings=[],
13
+ base_action_type="st.openJob",
14
+ default_params={"basicInfo": True},
15
+ result_model=Job,
16
+ )
17
+
18
+
19
+ class FetchJob(Operation[FetchJobParams, Job]):
20
+ """Fetch a LinkedIn job."""
21
+
22
+ operation_name = "fetchJob"
23
+ mapper = FetchJobMapper()
@@ -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 SearchJobResult, SearchJobsParams
6
+
7
+
8
+ class SearchJobs(Operation[SearchJobsParams, list[SearchJobResult]]):
9
+ """Search jobs on standard LinkedIn."""
10
+
11
+ operation_name = "searchJobs"
12
+ mapper = ArrayWorkflowMapper[SearchJobsParams, SearchJobResult](
13
+ "st.searchJobs",
14
+ SearchJobResult,
15
+ )
@@ -4,15 +4,14 @@ from linkedapi.types.admin import (
4
4
  AdminAccount,
5
5
  AdminAccountStatus,
6
6
  AdminConfig,
7
- BillingLinkResult,
8
7
  BillingPeriod,
9
8
  CancelConnectionSessionParams,
10
- CancelResult,
11
9
  ConnectionSession,
12
10
  ConnectionSessionResult,
13
11
  ConnectionSessionStatus,
14
12
  CreateConnectionSessionResult,
15
- Currency,
13
+ CreateReconnectionSessionParams,
14
+ CreateReconnectionSessionResult,
16
15
  DeleteLimitEntry,
17
16
  DeleteLimitsParams,
18
17
  DisconnectParams,
@@ -28,6 +27,8 @@ from linkedapi.types.admin import (
28
27
  PendingConnectionSession,
29
28
  RegenerateTokenParams,
30
29
  RegenerateTokenResult,
30
+ ReparseAccountInfoParams,
31
+ ReparseAccountInfoResult,
31
32
  ResetLimitsParams,
32
33
  SeatType,
33
34
  SetLimitEntry,
@@ -35,8 +36,6 @@ from linkedapi.types.admin import (
35
36
  SetSeatsParams,
36
37
  SetSeatsResult,
37
38
  SetSeatsStatus,
38
- SubscriptionPricingResult,
39
- SubscriptionProduct,
40
39
  SubscriptionSeat,
41
40
  SubscriptionSeatsResult,
42
41
  SubscriptionStatus,
@@ -83,6 +82,21 @@ from linkedapi.types.connection import (
83
82
  SendConnectionRequestParams,
84
83
  WithdrawConnectionRequestParams,
85
84
  )
85
+ from linkedapi.types.jobs import (
86
+ FetchJobParams,
87
+ FetchJobResult,
88
+ Job,
89
+ JobCurrency,
90
+ JobDatePosted,
91
+ JobEmploymentType,
92
+ JobExperienceLevel,
93
+ JobSalary,
94
+ JobWorkplaceType,
95
+ SalaryPeriod,
96
+ SearchJobResult,
97
+ SearchJobsFilter,
98
+ SearchJobsParams,
99
+ )
86
100
  from linkedapi.types.message import (
87
101
  ConversationPollRequest,
88
102
  ConversationPollResult,
@@ -164,6 +178,26 @@ from linkedapi.types.statistics import (
164
178
  RetrievePerformanceResult,
165
179
  RetrieveSSIResult,
166
180
  )
181
+ from linkedapi.types.webhooks import (
182
+ AccountWebhookEvent,
183
+ AccountWebhookEventData,
184
+ AccountWebhookStatus,
185
+ DeleteWebhookParams,
186
+ ReplayWebhookDeliveryParams,
187
+ SetWebhookParams,
188
+ SetWebhookPayloadModeParams,
189
+ WebhookDelivery,
190
+ WebhookDeliveryStatus,
191
+ WebhookEvent,
192
+ WebhookEventType,
193
+ WebhookPayloadMode,
194
+ WebhookSubscription,
195
+ WebhookTestEvent,
196
+ WebhookTestEventData,
197
+ WorkflowWebhookEvent,
198
+ WorkflowWebhookEventData,
199
+ WorkflowWebhookStatus,
200
+ )
167
201
  from linkedapi.types.workflow import (
168
202
  LinkedApiActionError,
169
203
  WorkflowCancelResponse,
@@ -180,6 +214,9 @@ from linkedapi.types.workflow import (
180
214
 
181
215
  __all__ = [
182
216
  "AccountInfo",
217
+ "AccountWebhookEvent",
218
+ "AccountWebhookEventData",
219
+ "AccountWebhookStatus",
183
220
  "AccountsResult",
184
221
  "AdminAccount",
185
222
  "AdminAccountStatus",
@@ -195,10 +232,8 @@ __all__ = [
195
232
  "BaseFetchPersonParamsWide",
196
233
  "BaseFetchPostParams",
197
234
  "BaseFetchPostParamsWide",
198
- "BillingLinkResult",
199
235
  "BillingPeriod",
200
236
  "CancelConnectionSessionParams",
201
- "CancelResult",
202
237
  "CheckConnectionStatusParams",
203
238
  "CheckConnectionStatusResult",
204
239
  "Comment",
@@ -216,13 +251,17 @@ __all__ = [
216
251
  "CreatePostAttachment",
217
252
  "CreatePostParams",
218
253
  "CreatePostResult",
219
- "Currency",
254
+ "CreateReconnectionSessionParams",
255
+ "CreateReconnectionSessionResult",
220
256
  "DeleteLimitEntry",
221
257
  "DeleteLimitsParams",
258
+ "DeleteWebhookParams",
222
259
  "DisconnectParams",
223
260
  "EmploymentType",
224
261
  "FetchCompanyParams",
225
262
  "FetchCompanyResult",
263
+ "FetchJobParams",
264
+ "FetchJobResult",
226
265
  "FetchPersonParams",
227
266
  "FetchPersonResult",
228
267
  "FetchPostParams",
@@ -230,6 +269,13 @@ __all__ = [
230
269
  "GetConnectionSessionParams",
231
270
  "GetLimitsParams",
232
271
  "GetLimitsUsageParams",
272
+ "Job",
273
+ "JobCurrency",
274
+ "JobDatePosted",
275
+ "JobEmploymentType",
276
+ "JobExperienceLevel",
277
+ "JobSalary",
278
+ "JobWorkplaceType",
233
279
  "LanguageProficiency",
234
280
  "Limit",
235
281
  "LimitCategory",
@@ -291,6 +337,9 @@ __all__ = [
291
337
  "RegenerateTokenParams",
292
338
  "RegenerateTokenResult",
293
339
  "RemoveConnectionParams",
340
+ "ReparseAccountInfoParams",
341
+ "ReparseAccountInfoResult",
342
+ "ReplayWebhookDeliveryParams",
294
343
  "ResetLimitsParams",
295
344
  "RetrieveConnectionsFilter",
296
345
  "RetrieveConnectionsParams",
@@ -298,10 +347,14 @@ __all__ = [
298
347
  "RetrievePendingRequestsResult",
299
348
  "RetrievePerformanceResult",
300
349
  "RetrieveSSIResult",
350
+ "SalaryPeriod",
301
351
  "SearchCompaniesFilter",
302
352
  "SearchCompaniesParams",
303
353
  "SearchCompanyResult",
304
354
  "SearchCompanySize",
355
+ "SearchJobResult",
356
+ "SearchJobsFilter",
357
+ "SearchJobsParams",
305
358
  "SearchPeopleFilter",
306
359
  "SearchPeopleParams",
307
360
  "SearchPeopleResult",
@@ -313,17 +366,25 @@ __all__ = [
313
366
  "SetSeatsParams",
314
367
  "SetSeatsResult",
315
368
  "SetSeatsStatus",
369
+ "SetWebhookParams",
370
+ "SetWebhookPayloadModeParams",
316
371
  "StCompanyDm",
317
372
  "StCompanyEmployee",
318
373
  "StCompanyEmployeesFilter",
319
374
  "StCompanyEmployeesRetrievalConfig",
320
- "SubscriptionPricingResult",
321
- "SubscriptionProduct",
322
375
  "SubscriptionSeat",
323
376
  "SubscriptionSeatsResult",
324
377
  "SubscriptionStatus",
325
378
  "SubscriptionStatusValue",
326
379
  "SyncConversationParams",
380
+ "WebhookDelivery",
381
+ "WebhookDeliveryStatus",
382
+ "WebhookEvent",
383
+ "WebhookEventType",
384
+ "WebhookPayloadMode",
385
+ "WebhookSubscription",
386
+ "WebhookTestEvent",
387
+ "WebhookTestEventData",
327
388
  "WithdrawConnectionRequestParams",
328
389
  "WorkflowCancelResponse",
329
390
  "WorkflowCompletion",
@@ -335,6 +396,9 @@ __all__ = [
335
396
  "WorkflowResponse",
336
397
  "WorkflowStartedResponse",
337
398
  "WorkflowStatus",
399
+ "WorkflowWebhookEvent",
400
+ "WorkflowWebhookEventData",
401
+ "WorkflowWebhookStatus",
338
402
  "YearsOfExperience",
339
403
  "dump_model_by_name",
340
404
  "serialize_model",