talentro-commons 0.19.17__py3-none-any.whl → 0.19.19__py3-none-any.whl
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.
- talentro/acquisition/dataclasses.py +3 -1
- talentro/candidates/dataclasses.py +17 -0
- {talentro_commons-0.19.17.dist-info → talentro_commons-0.19.19.dist-info}/METADATA +1 -1
- {talentro_commons-0.19.17.dist-info → talentro_commons-0.19.19.dist-info}/RECORD +5 -5
- {talentro_commons-0.19.17.dist-info → talentro_commons-0.19.19.dist-info}/WHEEL +0 -0
|
@@ -74,7 +74,8 @@ class CampaignInfo(ResolvableCompanyModel):
|
|
|
74
74
|
feed=feed,
|
|
75
75
|
selection_criteria=model.selection_criteria,
|
|
76
76
|
application_flow_settings=model.application_flow_settings,
|
|
77
|
-
status_detail=model.status_detail
|
|
77
|
+
status_detail=model.status_detail,
|
|
78
|
+
apply_count=model.apply_count
|
|
78
79
|
)
|
|
79
80
|
|
|
80
81
|
|
|
@@ -158,4 +159,5 @@ class AdInfo(ResolvableCompanyModel):
|
|
|
158
159
|
vacancy_id=model.vacancy_id,
|
|
159
160
|
|
|
160
161
|
campaign=campaign,
|
|
162
|
+
apply_count=model.apply_count
|
|
161
163
|
)
|
|
@@ -6,6 +6,7 @@ from pydantic import BaseModel
|
|
|
6
6
|
from talentro.acquisition.dataclasses import CampaignInfo, AdInfo
|
|
7
7
|
from talentro.candidates.models import Application as ApplicationModel, Document as DocumentModel, \
|
|
8
8
|
Candidate as CandidateModel, Source as SourceModel
|
|
9
|
+
from talentro.general.dataclasses import FileData
|
|
9
10
|
from talentro.services.caching import CacheService
|
|
10
11
|
from talentro.services.clients import MSClient
|
|
11
12
|
from talentro.vacancies.dataclasses import VacancyInfo
|
|
@@ -142,6 +143,22 @@ class ApplicationInfo(BaseModel):
|
|
|
142
143
|
|
|
143
144
|
documents: list[DocumentInfo]
|
|
144
145
|
|
|
146
|
+
@staticmethod
|
|
147
|
+
async def resolve_object(object_id: UUID, organization_id: UUID) -> "ApplicationInfo | None":
|
|
148
|
+
cache = CacheService()
|
|
149
|
+
|
|
150
|
+
cache_key = f"resolver:org:{organization_id}:application_id:{object_id}"
|
|
151
|
+
|
|
152
|
+
if value := await cache.get(cache_key):
|
|
153
|
+
return value
|
|
154
|
+
|
|
155
|
+
result = await MSClient.candidates().get(f"applications/{object_id}", headers={"X-Organization-ID": str(organization_id)})
|
|
156
|
+
|
|
157
|
+
if result.status_code != 200:
|
|
158
|
+
return None
|
|
159
|
+
|
|
160
|
+
return ApplicationInfo(**result.json())
|
|
161
|
+
|
|
145
162
|
@classmethod
|
|
146
163
|
async def from_model(cls: "ApplicationInfo", model: ApplicationModel) -> 'ApplicationInfo':
|
|
147
164
|
if model.source:
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
talentro/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
talentro/acquisition/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
talentro/acquisition/dataclasses.py,sha256=
|
|
3
|
+
talentro/acquisition/dataclasses.py,sha256=5NoDPCyRLDmj16Mz8O11osjAWVVp3BeUZnzwg51lZ6g,5010
|
|
4
4
|
talentro/acquisition/models.py,sha256=gBkxPFfrlOkx4KNCoKXDQggNAVaYHo6pJ07RCfUeeJ0,4148
|
|
5
5
|
talentro/billing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
talentro/billing/dataclasses.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
talentro/billing/models.py,sha256=rbmcJh-FcU5I3oFRhnD413YqIade1nxvqvksvEtCvMs,825
|
|
8
8
|
talentro/candidates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
talentro/candidates/dataclasses.py,sha256=
|
|
9
|
+
talentro/candidates/dataclasses.py,sha256=I8fCbVLPvL5KXBFw2lSl9tzEQRjAos3BDkAMQ-8pHtA,5599
|
|
10
10
|
talentro/candidates/models.py,sha256=8HDywWUf0X0ckgl8t6vtkglVEIMEe5RJoKOr0-yn0C0,2396
|
|
11
11
|
talentro/constants.py,sha256=08CuJ1qVbgi4IDZThw7CQt_D65jGwekGrkMEg8eDGZo,861
|
|
12
12
|
talentro/event.py,sha256=Xie-nosLwEpg35Hir9yCKtJBXM-_R4O1fyknOtG_6IY,4595
|
|
@@ -39,6 +39,6 @@ talentro/vacancies/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
|
|
|
39
39
|
talentro/vacancies/dataclasses.py,sha256=E6H5fsZH4IwtBFSLDolzF6u39tEIrANtWiNVoB65P0c,15074
|
|
40
40
|
talentro/vacancies/models.py,sha256=GoXr71CNzU6csf8gdmv84etb3Rm-Cdfigp1yqPI_jjQ,4822
|
|
41
41
|
talentro/vacancies/taxanomy.py,sha256=B6DMq9Wbs0aXFwD9aZveSlLwAC9eq1iCO_KM-FmrV7M,6384
|
|
42
|
-
talentro_commons-0.19.
|
|
43
|
-
talentro_commons-0.19.
|
|
44
|
-
talentro_commons-0.19.
|
|
42
|
+
talentro_commons-0.19.19.dist-info/METADATA,sha256=8BqF3Zjtiom_hUyeejv7eexlPWGUJJehUry1sQxCANM,1508
|
|
43
|
+
talentro_commons-0.19.19.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
44
|
+
talentro_commons-0.19.19.dist-info/RECORD,,
|
|
File without changes
|