linkedapi 1.6.2__tar.gz → 1.6.3__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 (170) hide show
  1. {linkedapi-1.6.2 → linkedapi-1.6.3}/PKG-INFO +1 -1
  2. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/__init__.py +5 -1
  3. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/client.py +6 -0
  4. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/errors.py +2 -0
  5. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/__init__.py +4 -0
  6. linkedapi-1.6.3/linkedapi/operations/find_person_by_email.py +23 -0
  7. linkedapi-1.6.3/linkedapi/operations/find_person_email.py +28 -0
  8. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/__init__.py +24 -0
  9. linkedapi-1.6.3/linkedapi/types/email.py +49 -0
  10. {linkedapi-1.6.2 → linkedapi-1.6.3}/pyproject.toml +1 -1
  11. {linkedapi-1.6.2 → linkedapi-1.6.3}/tests/test_errors.py +1 -0
  12. linkedapi-1.6.3/tests/test_find_person_email.py +147 -0
  13. {linkedapi-1.6.2 → linkedapi-1.6.3}/tests/test_open_vocabularies.py +10 -0
  14. {linkedapi-1.6.2 → linkedapi-1.6.3}/tests/test_operations.py +3 -1
  15. {linkedapi-1.6.2 → linkedapi-1.6.3}/.github/workflows/publish.yaml +0 -0
  16. {linkedapi-1.6.2 → linkedapi-1.6.3}/.gitignore +0 -0
  17. {linkedapi-1.6.2 → linkedapi-1.6.3}/LICENSE +0 -0
  18. {linkedapi-1.6.2 → linkedapi-1.6.3}/README.md +0 -0
  19. {linkedapi-1.6.2 → linkedapi-1.6.3}/examples/verify_webhook_signature.py +0 -0
  20. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/admin/__init__.py +0 -0
  21. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/admin/accounts.py +0 -0
  22. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/admin/admin.py +0 -0
  23. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/admin/http_client.py +0 -0
  24. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/admin/limits.py +0 -0
  25. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/admin/subscription.py +0 -0
  26. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/admin/webhooks.py +0 -0
  27. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/changelog.py +0 -0
  28. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/config.py +0 -0
  29. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/core/__init__.py +0 -0
  30. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/core/operation.py +0 -0
  31. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/core/polling.py +0 -0
  32. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/http/__init__.py +0 -0
  33. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/http/base.py +0 -0
  34. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/http/linked_api_http_client.py +0 -0
  35. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/mappers/__init__.py +0 -0
  36. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/mappers/array.py +0 -0
  37. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/mappers/base.py +0 -0
  38. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/mappers/endorse_person_skills.py +0 -0
  39. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/mappers/send_message.py +0 -0
  40. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/mappers/simple.py +0 -0
  41. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/mappers/then.py +0 -0
  42. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/mappers/void.py +0 -0
  43. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/accept_invitation.py +0 -0
  44. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/check_connection_status.py +0 -0
  45. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/comment_on_post.py +0 -0
  46. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/create_post.py +0 -0
  47. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/create_repost.py +0 -0
  48. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/custom_workflow.py +0 -0
  49. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/endorse_person_skill.py +0 -0
  50. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/endorse_person_skills.py +0 -0
  51. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/fetch_company.py +0 -0
  52. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/fetch_job.py +0 -0
  53. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/fetch_person.py +0 -0
  54. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/fetch_post.py +0 -0
  55. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/ignore_invitation.py +0 -0
  56. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/manage_conversation.py +0 -0
  57. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/nv_create_list.py +0 -0
  58. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/nv_create_saved_search.py +0 -0
  59. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/nv_delete_list.py +0 -0
  60. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/nv_delete_saved_search.py +0 -0
  61. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/nv_fetch_company.py +0 -0
  62. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/nv_fetch_person.py +0 -0
  63. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/nv_manage_conversation.py +0 -0
  64. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/nv_remove_account_from_list.py +0 -0
  65. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/nv_remove_lead_from_list.py +0 -0
  66. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/nv_rename_list.py +0 -0
  67. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/nv_retrieve_alerts.py +0 -0
  68. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/nv_retrieve_list_accounts.py +0 -0
  69. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/nv_retrieve_list_leads.py +0 -0
  70. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/nv_retrieve_lists.py +0 -0
  71. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/nv_retrieve_saved_searches.py +0 -0
  72. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/nv_save_account.py +0 -0
  73. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/nv_save_lead.py +0 -0
  74. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/nv_search_companies.py +0 -0
  75. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/nv_search_people.py +0 -0
  76. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/nv_send_message.py +0 -0
  77. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/nv_sync_conversation.py +0 -0
  78. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/nv_sync_inbox.py +0 -0
  79. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/nv_unsave_account.py +0 -0
  80. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/nv_unsave_lead.py +0 -0
  81. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/rc_archive_project.py +0 -0
  82. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/rc_create_project.py +0 -0
  83. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/rc_fetch_person.py +0 -0
  84. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/rc_rename_project.py +0 -0
  85. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/rc_retrieve_project_candidates.py +0 -0
  86. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/rc_retrieve_projects.py +0 -0
  87. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/rc_save_to_project.py +0 -0
  88. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/rc_search_people.py +0 -0
  89. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/rc_send_message.py +0 -0
  90. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/rc_sync_inbox.py +0 -0
  91. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/react_to_comment.py +0 -0
  92. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/react_to_post.py +0 -0
  93. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/remove_connection.py +0 -0
  94. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/reply_to_comment.py +0 -0
  95. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/retrieve_connections.py +0 -0
  96. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/retrieve_feed.py +0 -0
  97. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/retrieve_invitations.py +0 -0
  98. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/retrieve_pending_requests.py +0 -0
  99. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/retrieve_performance.py +0 -0
  100. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/retrieve_profile_viewers.py +0 -0
  101. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/retrieve_ssi.py +0 -0
  102. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/search_companies.py +0 -0
  103. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/search_jobs.py +0 -0
  104. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/search_people.py +0 -0
  105. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/search_posts.py +0 -0
  106. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/send_connection_request.py +0 -0
  107. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/send_message.py +0 -0
  108. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/sync_conversation.py +0 -0
  109. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/sync_inbox.py +0 -0
  110. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/sync_network.py +0 -0
  111. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/operations/withdraw_connection_request.py +0 -0
  112. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/py.typed +0 -0
  113. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/account.py +0 -0
  114. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/admin/__init__.py +0 -0
  115. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/admin/accounts.py +0 -0
  116. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/admin/config.py +0 -0
  117. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/admin/limits.py +0 -0
  118. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/admin/subscription.py +0 -0
  119. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/base.py +0 -0
  120. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/changelog.py +0 -0
  121. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/company.py +0 -0
  122. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/connection.py +0 -0
  123. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/feed.py +0 -0
  124. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/jobs.py +0 -0
  125. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/message.py +0 -0
  126. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/network.py +0 -0
  127. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/nv_alerts.py +0 -0
  128. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/nv_list_management.py +0 -0
  129. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/nv_list_members.py +0 -0
  130. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/nv_saved_searches.py +0 -0
  131. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/nv_saved_subjects.py +0 -0
  132. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/params.py +0 -0
  133. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/person.py +0 -0
  134. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/post.py +0 -0
  135. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/profile_viewers.py +0 -0
  136. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/rc_people.py +0 -0
  137. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/rc_projects.py +0 -0
  138. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/responses.py +0 -0
  139. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/search_companies.py +0 -0
  140. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/search_people.py +0 -0
  141. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/search_posts.py +0 -0
  142. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/signals.py +0 -0
  143. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/statistics.py +0 -0
  144. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/viewer_state.py +0 -0
  145. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/webhooks.py +0 -0
  146. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/types/workflow.py +0 -0
  147. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/webhooks/__init__.py +0 -0
  148. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/webhooks/headers.py +0 -0
  149. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/webhooks/parse.py +0 -0
  150. {linkedapi-1.6.2 → linkedapi-1.6.3}/linkedapi/webhooks/signature.py +0 -0
  151. {linkedapi-1.6.2 → linkedapi-1.6.3}/tests/conftest.py +0 -0
  152. {linkedapi-1.6.2 → linkedapi-1.6.3}/tests/test_admin.py +0 -0
  153. {linkedapi-1.6.2 → linkedapi-1.6.3}/tests/test_admin_webhooks.py +0 -0
  154. {linkedapi-1.6.2 → linkedapi-1.6.3}/tests/test_changelog.py +0 -0
  155. {linkedapi-1.6.2 → linkedapi-1.6.3}/tests/test_direct_methods.py +0 -0
  156. {linkedapi-1.6.2 → linkedapi-1.6.3}/tests/test_endorse_operations.py +0 -0
  157. {linkedapi-1.6.2 → linkedapi-1.6.3}/tests/test_http_client.py +0 -0
  158. {linkedapi-1.6.2 → linkedapi-1.6.3}/tests/test_limits_categories.py +0 -0
  159. {linkedapi-1.6.2 → linkedapi-1.6.3}/tests/test_mappers.py +0 -0
  160. {linkedapi-1.6.2 → linkedapi-1.6.3}/tests/test_models.py +0 -0
  161. {linkedapi-1.6.2 → linkedapi-1.6.3}/tests/test_nv_backlog.py +0 -0
  162. {linkedapi-1.6.2 → linkedapi-1.6.3}/tests/test_nv_list_management.py +0 -0
  163. {linkedapi-1.6.2 → linkedapi-1.6.3}/tests/test_nv_retrieve_alerts.py +0 -0
  164. {linkedapi-1.6.2 → linkedapi-1.6.3}/tests/test_nv_saved_subjects.py +0 -0
  165. {linkedapi-1.6.2 → linkedapi-1.6.3}/tests/test_polling.py +0 -0
  166. {linkedapi-1.6.2 → linkedapi-1.6.3}/tests/test_rc_operations.py +0 -0
  167. {linkedapi-1.6.2 → linkedapi-1.6.3}/tests/test_signals.py +0 -0
  168. {linkedapi-1.6.2 → linkedapi-1.6.3}/tests/test_webhook_signature.py +0 -0
  169. {linkedapi-1.6.2 → linkedapi-1.6.3}/tests/test_webhooks.py +0 -0
  170. {linkedapi-1.6.2 → linkedapi-1.6.3}/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.6.2
3
+ Version: 1.6.3
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
@@ -46,6 +46,8 @@ from linkedapi.operations import (
46
46
  FetchPersonMapper,
47
47
  FetchPost,
48
48
  FetchPostMapper,
49
+ FindPersonByEmail,
50
+ FindPersonEmail,
49
51
  IgnoreInvitation,
50
52
  ManageConversation,
51
53
  NvCreateList,
@@ -116,7 +118,7 @@ from linkedapi.webhooks import (
116
118
  verify_webhook_signature,
117
119
  )
118
120
 
119
- __version__ = "1.6.2"
121
+ __version__ = "1.6.3"
120
122
  PredefinedOperation = Operation
121
123
 
122
124
  __all__ = [
@@ -143,6 +145,8 @@ __all__ = [
143
145
  "FetchJobMapper",
144
146
  "FetchPerson",
145
147
  "FetchPersonMapper",
148
+ "FindPersonByEmail",
149
+ "FindPersonEmail",
146
150
  "FetchPost",
147
151
  "FetchPostMapper",
148
152
  "HttpClient",
@@ -20,6 +20,8 @@ from linkedapi.operations import (
20
20
  FetchJob,
21
21
  FetchPerson,
22
22
  FetchPost,
23
+ FindPersonByEmail,
24
+ FindPersonEmail,
23
25
  IgnoreInvitation,
24
26
  ManageConversation,
25
27
  NvCreateList,
@@ -130,6 +132,8 @@ class LinkedApi:
130
132
  self.search_posts = SearchPosts(self.http_client)
131
133
  self.fetch_company = FetchCompany(self.http_client)
132
134
  self.fetch_person = FetchPerson(self.http_client)
135
+ self.find_person_email = FindPersonEmail(self.http_client)
136
+ self.find_person_by_email = FindPersonByEmail(self.http_client)
133
137
  self.endorse_person_skill = EndorsePersonSkill(self.http_client)
134
138
  self.endorse_person_skills = EndorsePersonSkills(self.http_client)
135
139
  self.fetch_post = FetchPost(self.http_client)
@@ -202,6 +206,8 @@ class LinkedApi:
202
206
  self.search_posts,
203
207
  self.fetch_company,
204
208
  self.fetch_person,
209
+ self.find_person_email,
210
+ self.find_person_by_email,
205
211
  self.endorse_person_skill,
206
212
  self.endorse_person_skills,
207
213
  self.fetch_post,
@@ -160,6 +160,7 @@ LinkedApiErrorType = Literal[
160
160
  "signalLimitReached",
161
161
  "signalNotFound",
162
162
  "signalStopped",
163
+ "insufficientEnrichmentCredits",
163
164
  ]
164
165
  LINKED_API_ERROR_TYPES: tuple[str, ...] = (
165
166
  "linkedApiTokenRequired",
@@ -188,6 +189,7 @@ LINKED_API_ERROR_TYPES: tuple[str, ...] = (
188
189
  "signalLimitReached",
189
190
  "signalNotFound",
190
191
  "signalStopped",
192
+ "insufficientEnrichmentCredits",
191
193
  )
192
194
 
193
195
 
@@ -10,6 +10,8 @@ from linkedapi.operations.fetch_company import FetchCompany, FetchCompanyMapper
10
10
  from linkedapi.operations.fetch_job import FetchJob, FetchJobMapper
11
11
  from linkedapi.operations.fetch_person import FetchPerson, FetchPersonMapper
12
12
  from linkedapi.operations.fetch_post import FetchPost, FetchPostMapper
13
+ from linkedapi.operations.find_person_by_email import FindPersonByEmail
14
+ from linkedapi.operations.find_person_email import FindPersonEmail
13
15
  from linkedapi.operations.ignore_invitation import IgnoreInvitation
14
16
  from linkedapi.operations.manage_conversation import ManageConversation
15
17
  from linkedapi.operations.nv_create_list import NvCreateList
@@ -85,6 +87,8 @@ __all__ = [
85
87
  "FetchPersonMapper",
86
88
  "FetchPost",
87
89
  "FetchPostMapper",
90
+ "FindPersonByEmail",
91
+ "FindPersonEmail",
88
92
  "IgnoreInvitation",
89
93
  "ManageConversation",
90
94
  "NvCreateList",
@@ -0,0 +1,23 @@
1
+ from __future__ import annotations
2
+
3
+ from linkedapi.core import Operation
4
+ from linkedapi.mappers import SimpleWorkflowMapper
5
+ from linkedapi.types import FindPersonByEmailParams, FindPersonByEmailResult
6
+
7
+
8
+ class FindPersonByEmail(Operation[FindPersonByEmailParams, FindPersonByEmailResult]):
9
+ """Find the LinkedIn profile URL of the person behind an email address.
10
+
11
+ The lookup uses 10 enrichment credits only when a profile is found (``provider_status`` is
12
+ ``found``); otherwise ``person_url`` is None and nothing is charged. With fewer than 10
13
+ credits, ``execute`` raises ``insufficientEnrichmentCredits``. It opens no LinkedIn page and
14
+ counts against no account limit. To read the profile, pass ``person_url`` to ``fetch_person``.
15
+
16
+ See https://linkedapi.io/docs/action-st-find-person-by-email/
17
+ and https://linkedapi.io/docs/enrichment-credits/
18
+ """
19
+
20
+ operation_name = "findPersonByEmail"
21
+ mapper = SimpleWorkflowMapper[FindPersonByEmailParams, FindPersonByEmailResult](
22
+ "st.findPersonByEmail", result_model=FindPersonByEmailResult
23
+ )
@@ -0,0 +1,28 @@
1
+ from __future__ import annotations
2
+
3
+ from linkedapi.core import Operation
4
+ from linkedapi.mappers import SimpleWorkflowMapper
5
+ from linkedapi.types import FindPersonEmailParams, FindPersonEmailResult
6
+
7
+
8
+ class FindPersonEmail(Operation[FindPersonEmailParams, FindPersonEmailResult]):
9
+ """Find a person's email address by their LinkedIn URL.
10
+
11
+ The address comes from the person's Contact info, from an email-finding provider, or both,
12
+ as ``source`` says (default ``contactInfo``, which is free). Provider lookups are paid with
13
+ enrichment credits: a lookup uses 1 credit only when ``provider_status`` is ``found``. With a
14
+ paid source and no credits, ``execute`` raises ``insufficientEnrichmentCredits``.
15
+ ``require_work_email`` is allowed only with ``contactInfoThenProvider``.
16
+
17
+ The action opens the person's profile (one stPersonProfileViews) and, when it needs the
18
+ company's website, their current company page (one stCompanyPageViews).
19
+
20
+ Action errors: personNotFound, selfProfileNotAllowed, limitExceeded, unexpectedError.
21
+ See https://linkedapi.io/docs/action-st-find-person-email/
22
+ and https://linkedapi.io/docs/enrichment-credits/
23
+ """
24
+
25
+ operation_name = "findPersonEmail"
26
+ mapper = SimpleWorkflowMapper[FindPersonEmailParams, FindPersonEmailResult](
27
+ "st.findPersonEmail", result_model=FindPersonEmailResult
28
+ )
@@ -88,6 +88,19 @@ from linkedapi.types.connection import (
88
88
  SendConnectionRequestParams,
89
89
  WithdrawConnectionRequestParams,
90
90
  )
91
+ from linkedapi.types.email import (
92
+ EmailProviderStatus,
93
+ FindPersonByEmailParams,
94
+ FindPersonByEmailResult,
95
+ FindPersonEmailParams,
96
+ FindPersonEmailResult,
97
+ FindPersonEmailSource,
98
+ PersonEmail,
99
+ PersonEmailSource,
100
+ PersonEmailStatus,
101
+ PersonEmailType,
102
+ ReverseEmailProviderStatus,
103
+ )
91
104
  from linkedapi.types.feed import FeedPost, RetrieveFeedParams
92
105
  from linkedapi.types.jobs import (
93
106
  FetchJobParams,
@@ -445,6 +458,7 @@ __all__ = [
445
458
  "DeleteWebhookHeaderParams",
446
459
  "DeleteWebhookParams",
447
460
  "DisconnectParams",
461
+ "EmailProviderStatus",
448
462
  "EmploymentType",
449
463
  "EndorsePersonSkillParams",
450
464
  "EndorsePersonSkillsParams",
@@ -457,6 +471,11 @@ __all__ = [
457
471
  "FetchPersonResult",
458
472
  "FetchPostParams",
459
473
  "FetchPostResult",
474
+ "FindPersonByEmailParams",
475
+ "FindPersonByEmailResult",
476
+ "FindPersonEmailParams",
477
+ "FindPersonEmailResult",
478
+ "FindPersonEmailSource",
460
479
  "GetConnectionSessionParams",
461
480
  "GetLimitsParams",
462
481
  "GetLimitsUsageParams",
@@ -560,6 +579,10 @@ __all__ = [
560
579
  "PersonBirthday",
561
580
  "PersonContactInfo",
562
581
  "PersonEducation",
582
+ "PersonEmail",
583
+ "PersonEmailSource",
584
+ "PersonEmailStatus",
585
+ "PersonEmailType",
563
586
  "PersonExperience",
564
587
  "PersonLanguage",
565
588
  "PersonSkill",
@@ -644,6 +667,7 @@ __all__ = [
644
667
  "RetrieveProfileViewersParams",
645
668
  "RetrieveSSIResult",
646
669
  "RevealWebhookSecretParams",
670
+ "ReverseEmailProviderStatus",
647
671
  "RotateWebhookSecretParams",
648
672
  "SalaryPeriod",
649
673
  "SearchCompaniesFilter",
@@ -0,0 +1,49 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Literal
4
+
5
+ from linkedapi.types.base import LinkedApiModel
6
+ from linkedapi.types.params import BaseActionParams
7
+
8
+ FindPersonEmailSource = Literal["contactInfo", "provider", "contactInfoThenProvider", "all"]
9
+ EmailProviderStatus = Literal[
10
+ "notRequested",
11
+ "noName",
12
+ "noCompanyDomain",
13
+ "companyPageLimitReached",
14
+ "insufficientCredits",
15
+ "found",
16
+ "notFound",
17
+ "unavailable",
18
+ ]
19
+ PersonEmailSource = Literal["contactInfo", "provider"]
20
+ PersonEmailType = Literal["work", "personal", "unknown"]
21
+ PersonEmailStatus = Literal["valid", "probable"]
22
+ ReverseEmailProviderStatus = Literal["found", "notFound", "insufficientCredits", "unavailable"]
23
+
24
+
25
+ class FindPersonEmailParams(BaseActionParams):
26
+ person_url: str
27
+ source: FindPersonEmailSource | None = None
28
+ require_work_email: bool | None = None
29
+
30
+
31
+ class PersonEmail(LinkedApiModel):
32
+ address: str
33
+ source: PersonEmailSource | str
34
+ type: PersonEmailType | str
35
+ status: PersonEmailStatus | str | None = None
36
+
37
+
38
+ class FindPersonEmailResult(LinkedApiModel):
39
+ emails: list[PersonEmail]
40
+ provider_status: EmailProviderStatus | str
41
+
42
+
43
+ class FindPersonByEmailParams(BaseActionParams):
44
+ email: str
45
+
46
+
47
+ class FindPersonByEmailResult(LinkedApiModel):
48
+ person_url: str | None = None
49
+ provider_status: ReverseEmailProviderStatus | str
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "linkedapi"
7
- version = "1.6.2"
7
+ version = "1.6.3"
8
8
  description = "Official synchronous Python SDK for Linked API."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -42,6 +42,7 @@ def test_error_type_sets_match_node_contract() -> None:
42
42
  "signalLimitReached",
43
43
  "signalNotFound",
44
44
  "signalStopped",
45
+ "insufficientEnrichmentCredits",
45
46
  )
46
47
  assert LINKED_API_ACTION_ERROR_TYPES == (
47
48
  "personNotFound",
@@ -0,0 +1,147 @@
1
+ from __future__ import annotations
2
+
3
+ import pytest
4
+ from conftest import FakeHttpClient
5
+
6
+ from linkedapi import (
7
+ FindPersonByEmailParams,
8
+ FindPersonEmailParams,
9
+ LinkedApi,
10
+ LinkedApiError,
11
+ )
12
+
13
+ PERSON_URL = "https://www.linkedin.com/in/example-person"
14
+ EMAIL = "person@example.com"
15
+
16
+
17
+ def queue_completion(fake_http_client: FakeHttpClient, completion: dict[str, object]) -> None:
18
+ fake_http_client.queue_response(result={"workflowId": "wf1", "workflowStatus": "pending"})
19
+ fake_http_client.queue_response(
20
+ result={"workflowStatus": "completed", "completion": completion}
21
+ )
22
+
23
+
24
+ def test_find_person_email_request_and_result(fake_http_client: FakeHttpClient) -> None:
25
+ sdk = LinkedApi(fake_http_client)
26
+ data = {
27
+ "emails": [
28
+ {"address": "jane@gmail.com", "source": "contactInfo", "type": "personal"},
29
+ {
30
+ "address": "jane.doe@acme.com",
31
+ "source": "provider",
32
+ "type": "work",
33
+ "status": "valid",
34
+ },
35
+ ],
36
+ "providerStatus": "found",
37
+ }
38
+ queue_completion(
39
+ fake_http_client, {"actionType": "st.findPersonEmail", "success": True, "data": data}
40
+ )
41
+
42
+ started = sdk.find_person_email.execute(
43
+ FindPersonEmailParams(
44
+ person_url=PERSON_URL, source="contactInfoThenProvider", require_work_email=True
45
+ )
46
+ )
47
+ result = sdk.find_person_email.result(started.workflow_id)
48
+
49
+ assert sdk.find_person_email in sdk.operations
50
+ assert fake_http_client.calls[0] == (
51
+ "POST",
52
+ "/workflows",
53
+ {
54
+ "actionType": "st.findPersonEmail",
55
+ "personUrl": PERSON_URL,
56
+ "source": "contactInfoThenProvider",
57
+ "requireWorkEmail": True,
58
+ },
59
+ )
60
+ assert result.errors == []
61
+ assert result.data is not None
62
+ assert result.data.provider_status == "found"
63
+ assert result.data.model_dump(by_alias=True, exclude_none=True) == data
64
+
65
+
66
+ def test_find_person_email_omits_unset_source(fake_http_client: FakeHttpClient) -> None:
67
+ sdk = LinkedApi(fake_http_client)
68
+ queue_completion(
69
+ fake_http_client,
70
+ {
71
+ "actionType": "st.findPersonEmail",
72
+ "success": True,
73
+ "data": {"emails": [], "providerStatus": "notRequested"},
74
+ },
75
+ )
76
+
77
+ sdk.find_person_email.execute(FindPersonEmailParams(person_url=PERSON_URL))
78
+
79
+ assert fake_http_client.calls[0][2] == {
80
+ "actionType": "st.findPersonEmail",
81
+ "personUrl": PERSON_URL,
82
+ }
83
+
84
+
85
+ def test_find_person_email_rejects_an_unknown_source() -> None:
86
+ with pytest.raises(ValueError):
87
+ FindPersonEmailParams.model_validate({"personUrl": PERSON_URL, "source": "guess"})
88
+
89
+
90
+ def test_find_person_email_returns_the_action_error(fake_http_client: FakeHttpClient) -> None:
91
+ sdk = LinkedApi(fake_http_client)
92
+ error = {"type": "personNotFound", "message": "The provided URL is not an existing person."}
93
+ queue_completion(
94
+ fake_http_client, {"actionType": "st.findPersonEmail", "success": False, "error": error}
95
+ )
96
+
97
+ started = sdk.find_person_email.execute(FindPersonEmailParams(person_url=PERSON_URL))
98
+ result = sdk.find_person_email.result(started.workflow_id)
99
+
100
+ assert result.data is None
101
+ assert [item.model_dump() for item in result.errors] == [error]
102
+
103
+
104
+ def test_find_person_email_raises_insufficient_enrichment_credits(
105
+ fake_http_client: FakeHttpClient,
106
+ ) -> None:
107
+ sdk = LinkedApi(fake_http_client)
108
+ fake_http_client.queue_error(
109
+ LinkedApiError("insufficientEnrichmentCredits", "Insufficient enrichment credits")
110
+ )
111
+
112
+ with pytest.raises(LinkedApiError) as error:
113
+ sdk.find_person_email.execute(
114
+ FindPersonEmailParams(person_url=PERSON_URL, source="provider")
115
+ )
116
+
117
+ assert error.value.type == "insufficientEnrichmentCredits"
118
+
119
+
120
+ @pytest.mark.parametrize(
121
+ "data",
122
+ [
123
+ {"personUrl": "https://www.linkedin.com/in/jane-doe", "providerStatus": "found"},
124
+ {"personUrl": None, "providerStatus": "notFound"},
125
+ ],
126
+ )
127
+ def test_find_person_by_email_request_and_result(
128
+ fake_http_client: FakeHttpClient, data: dict[str, object]
129
+ ) -> None:
130
+ sdk = LinkedApi(fake_http_client)
131
+ queue_completion(
132
+ fake_http_client, {"actionType": "st.findPersonByEmail", "success": True, "data": data}
133
+ )
134
+
135
+ started = sdk.find_person_by_email.execute(FindPersonByEmailParams(email=EMAIL))
136
+ result = sdk.find_person_by_email.result(started.workflow_id)
137
+
138
+ assert sdk.find_person_by_email in sdk.operations
139
+ assert fake_http_client.calls[0] == (
140
+ "POST",
141
+ "/workflows",
142
+ {"actionType": "st.findPersonByEmail", "email": EMAIL},
143
+ )
144
+ assert result.errors == []
145
+ assert result.data is not None
146
+ assert result.data.person_url == data["personUrl"]
147
+ assert result.data.provider_status == data["providerStatus"]
@@ -22,6 +22,8 @@ RESPONSE_VOCABULARIES = [
22
22
  ("ContentViewerState", "reaction", "like"),
23
23
  ("ConversationPollResult", "type", "st"),
24
24
  ("FeedPost", "type", "original"),
25
+ ("FindPersonByEmailResult", "provider_status", "found"),
26
+ ("FindPersonEmailResult", "provider_status", "found"),
25
27
  ("InboxMessage", "type", "st"),
26
28
  ("InboxMessage", "sender", "us"),
27
29
  ("InboxPersonMessage", "type", "st"),
@@ -41,6 +43,9 @@ RESPONSE_VOCABULARIES = [
41
43
  ("MessageWebhookEventData", "sender", "us"),
42
44
  ("NetworkEvent", "type", "connectionAccepted"),
43
45
  ("NetworkWebhookEvent", "type", "network.connectionAccepted"),
46
+ ("PersonEmail", "source", "provider"),
47
+ ("PersonEmail", "type", "work"),
48
+ ("PersonEmail", "status", "valid"),
44
49
  ("PersonExperience", "employment_type", "fullTime"),
45
50
  ("PersonExperience", "location_type", "onSite"),
46
51
  ("PersonLanguage", "proficiency", "elementary"),
@@ -89,6 +94,7 @@ REQUEST_VOCABULARIES = [
89
94
  ("CreatePostAttachment", "type", "image", False),
90
95
  ("DeleteLimitEntry", "category", "stPersonProfileViews", False),
91
96
  ("DeleteLimitEntry", "period", "daily", False),
97
+ ("FindPersonEmailParams", "source", "provider", False),
92
98
  ("IgnoreInvitationParams", "invitation_type", "connect", False),
93
99
  ("InboxPersonPollRequest", "type", "st", False),
94
100
  ("InboxPollRequest", "type", "st", False),
@@ -152,6 +158,10 @@ VALID_PAYLOADS: dict[str, dict[str, Any]] = {
152
158
  "ReactToCommentParams": {"commentUrl": "https://www.linkedin.com/feed/update/fixture"},
153
159
  "SetLimitEntry": {"category": "stMessages", "period": "daily", "maxValue": 50},
154
160
  "DeleteLimitEntry": {"category": "stMessages", "period": "daily"},
161
+ "FindPersonByEmailResult": {"personUrl": None},
162
+ "FindPersonEmailParams": {"personUrl": PERSON_URL},
163
+ "FindPersonEmailResult": {"emails": []},
164
+ "PersonEmail": {"address": "person@example.com", "source": "provider", "type": "work"},
155
165
  "SetSeatsParams": {"quantity": 1, "seatType": "core", "billingPeriod": "month"},
156
166
  "SetWebhookParams": {"url": "https://example.test/webhook"},
157
167
  "SetWebhookPayloadModeParams": {"id": "webhook-1", "payloadMode": "thin"},
@@ -29,6 +29,8 @@ def test_linked_api_exposes_all_predefined_operations() -> None:
29
29
  operation_names = [
30
30
  "custom_workflow",
31
31
  "fetch_person",
32
+ "find_person_email",
33
+ "find_person_by_email",
32
34
  "nv_fetch_person",
33
35
  "fetch_company",
34
36
  "nv_fetch_company",
@@ -103,7 +105,7 @@ def test_linked_api_exposes_all_predefined_operations() -> None:
103
105
  assert hasattr(operation, "execute")
104
106
  assert hasattr(operation, "result")
105
107
  assert hasattr(operation, "cancel")
106
- assert len(linkedapi.operations) == 69
108
+ assert len(linkedapi.operations) == 71
107
109
 
108
110
 
109
111
  def test_operation_mappers_match_node_contract() -> None:
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes