brynq-sdk-acerta 1.1.1__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.
- brynq_sdk_acerta/__init__.py +14 -0
- brynq_sdk_acerta/acerta.py +118 -0
- brynq_sdk_acerta/addresses.py +99 -0
- brynq_sdk_acerta/agreements.py +426 -0
- brynq_sdk_acerta/bank_accounts.py +90 -0
- brynq_sdk_acerta/code_lists.py +264 -0
- brynq_sdk_acerta/company_cars.py +135 -0
- brynq_sdk_acerta/contact_information.py +79 -0
- brynq_sdk_acerta/cost_centers.py +94 -0
- brynq_sdk_acerta/employees.py +121 -0
- brynq_sdk_acerta/employees_additional_information.py +87 -0
- brynq_sdk_acerta/employer.py +179 -0
- brynq_sdk_acerta/family_members.py +99 -0
- brynq_sdk_acerta/family_situation.py +99 -0
- brynq_sdk_acerta/inservice.py +99 -0
- brynq_sdk_acerta/salaries.py +74 -0
- brynq_sdk_acerta/schemas/__init__.py +135 -0
- brynq_sdk_acerta/schemas/address.py +80 -0
- brynq_sdk_acerta/schemas/agreement.py +982 -0
- brynq_sdk_acerta/schemas/bank_account.py +87 -0
- brynq_sdk_acerta/schemas/company_car.py +124 -0
- brynq_sdk_acerta/schemas/contact_information.py +83 -0
- brynq_sdk_acerta/schemas/cost_center.py +82 -0
- brynq_sdk_acerta/schemas/employee.py +406 -0
- brynq_sdk_acerta/schemas/employer.py +71 -0
- brynq_sdk_acerta/schemas/family.py +220 -0
- brynq_sdk_acerta/schemas/in_service.py +243 -0
- brynq_sdk_acerta/schemas/in_service_config.py +28 -0
- brynq_sdk_acerta/schemas/planning.py +37 -0
- brynq_sdk_acerta/schemas/salaries.py +84 -0
- brynq_sdk_acerta-1.1.1.dist-info/METADATA +21 -0
- brynq_sdk_acerta-1.1.1.dist-info/RECORD +34 -0
- brynq_sdk_acerta-1.1.1.dist-info/WHEEL +5 -0
- brynq_sdk_acerta-1.1.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Schema for GET /v2/employees/{employeeId}
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
import pandas as pd
|
|
6
|
+
import pandera as pa
|
|
7
|
+
from pandera.typing import Series
|
|
8
|
+
from pydantic import BaseModel, Field
|
|
9
|
+
from typing import Optional
|
|
10
|
+
from brynq_sdk_functions import BrynQPanderaDataFrameModel
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# class EmployeeGet(BrynQPanderaDataFrameModel):
|
|
14
|
+
# """Schema for GET /v2/employees/{employeeId} endpoint (flat fields only)."""
|
|
15
|
+
|
|
16
|
+
# # Identification
|
|
17
|
+
# employee_id: Series[pd.StringDtype] = pa.Field(coerce=True, description="Employee identifier", alias="employeeId")
|
|
18
|
+
|
|
19
|
+
# # Personal data - name and identification
|
|
20
|
+
# national_registration_number: Series[pd.StringDtype] = pa.Field(coerce=True, description="Social security number", alias="personalData.nationalRegistrationNumber")
|
|
21
|
+
# last_name: Series[pd.StringDtype] = pa.Field(coerce=True, description="Last name", alias="personalData.name.lastName")
|
|
22
|
+
# first_name: Series[pd.StringDtype] = pa.Field(coerce=True, description="First name", alias="personalData.name.firstName")
|
|
23
|
+
# nick_name: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="Nick name", alias="personalData.name.nickName")
|
|
24
|
+
|
|
25
|
+
# # Personal data - gender, nationality, languages
|
|
26
|
+
# gender_code: Series[pd.StringDtype] = pa.Field(coerce=True, description="Gender code", alias="personalData.gender.code")
|
|
27
|
+
# gender_description: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="Gender description", alias="personalData.gender.description")
|
|
28
|
+
# nationality_code: Series[pd.StringDtype] = pa.Field(coerce=True, description="Nationality code", alias="personalData.nationality.code")
|
|
29
|
+
# nationality_description: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="Nationality description", alias="personalData.nationality.description")
|
|
30
|
+
# official_language_code: Series[pd.StringDtype] = pa.Field(coerce=True, description="Official language code", alias="personalData.officialLanguage.code")
|
|
31
|
+
# official_language_description: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="Official language description", alias="personalData.officialLanguage.description")
|
|
32
|
+
# spoken_language_code: Series[pd.StringDtype] = pa.Field(coerce=True, description="Spoken language code", alias="personalData.spokenLanguage.code")
|
|
33
|
+
# spoken_language_description: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="Spoken language description", alias="personalData.spokenLanguage.description")
|
|
34
|
+
|
|
35
|
+
# # Birth data
|
|
36
|
+
# date_of_birth: Series[pd.StringDtype] = pa.Field(coerce=True, description="Birth date", alias="personalData.birth.dateOfBirth")
|
|
37
|
+
# place_of_birth: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="Birth place", alias="personalData.birth.placeOfBirth")
|
|
38
|
+
# birth_country_name: Series[pd.StringDtype] = pa.Field(coerce=True, description="Birth country name", alias="personalData.birth.countryOfBirth.name")
|
|
39
|
+
# birth_country_nis_code: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="Birth country NIS code", alias="personalData.birth.countryOfBirth.NISCode")
|
|
40
|
+
|
|
41
|
+
# # Contact person (as single dict field)
|
|
42
|
+
# contact_persons: Series[pd.StringDtype] = pa.Field(coerce=True, description="Contact persons data", alias="contactPersonData.contactPersons")
|
|
43
|
+
|
|
44
|
+
# # Family situation (active period only)
|
|
45
|
+
# family_period_start_date: Series[pd.StringDtype] = pa.Field(coerce=True, description="Family situation start date", alias="familySituationData.period.startDate")
|
|
46
|
+
# family_period_end_date: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="Family situation end date", alias="familySituationData.period.endDate")
|
|
47
|
+
# marital_status_code: Series[pd.StringDtype] = pa.Field(coerce=True, description="Marital status code", alias="familySituationData.maritalStatus.code")
|
|
48
|
+
# marital_status_description: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="Marital status description", alias="familySituationData.maritalStatus.description")
|
|
49
|
+
# marital_status_date: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="Date when civil status applied", alias="familySituationData.maritalStatusDate")
|
|
50
|
+
|
|
51
|
+
# class _Annotation:
|
|
52
|
+
# primary_key = "employee_id"
|
|
53
|
+
# foreign_keys = {}
|
|
54
|
+
|
|
55
|
+
# class Config:
|
|
56
|
+
# metadata = {"class": "Employee", "dependencies": []}
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class AdditionalInformationGet(BrynQPanderaDataFrameModel):
|
|
60
|
+
"""Schema for GET /employee-data-management/v3/employees/{employeeId}/additional-information endpoint."""
|
|
61
|
+
|
|
62
|
+
employee_id: Series[pd.StringDtype] = pa.Field(coerce=True, description="Employee identifier", alias="employeeId")
|
|
63
|
+
period_start_date: Series[pd.StringDtype] = pa.Field(coerce=True, description="History segment start date", alias="period.startDate")
|
|
64
|
+
period_end_date: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="History segment end date", alias="period.endDate")
|
|
65
|
+
educational_degree_code: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="Educational degree code", alias="educationalDegree.code")
|
|
66
|
+
educational_degree_description: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="Educational degree description", alias="educationalDegree.description")
|
|
67
|
+
leadership_level_code: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="Leadership level code", alias="leadershipLevel.code")
|
|
68
|
+
leadership_level_description: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="Leadership level description", alias="leadershipLevel.description")
|
|
69
|
+
|
|
70
|
+
class _Annotation:
|
|
71
|
+
primary_key = "employee_id"
|
|
72
|
+
foreign_keys = {}
|
|
73
|
+
|
|
74
|
+
class Config:
|
|
75
|
+
metadata = {"class": "AdditionalInformation", "dependencies": []}
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class AdditionalInformationUpdate(BaseModel):
|
|
79
|
+
"""Schema for PATCH /employee-data-management/v3/employees/{employeeId}/additional-information"""
|
|
80
|
+
# Function parameters
|
|
81
|
+
employee_id: str = Field(..., description="Employee identifier", alias="employeeId")
|
|
82
|
+
|
|
83
|
+
from_date: Optional[str] = Field(None, example="2022-01-01", description="Date from which the information is valid", alias="fromDate")
|
|
84
|
+
educational_degree: Optional[str] = Field(None, min_length=2, max_length=2, example="05", description="Educational degree code", alias="educationalDegree")
|
|
85
|
+
leadership_level: Optional[str] = Field(None, min_length=2, max_length=2, example="02", description="Leadership level code", alias="leadershipLevel")
|
|
86
|
+
|
|
87
|
+
class Config:
|
|
88
|
+
populate_by_name = True
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
class PersonalDetailsGet(BrynQPanderaDataFrameModel):
|
|
92
|
+
"""Schema for GET /employee-data-management/v3/employees/{employeeId}/personal-details endpoint."""
|
|
93
|
+
|
|
94
|
+
employee_id: Series[pd.StringDtype] = pa.Field(coerce=True, description="Employee identifier", alias="employeeId")
|
|
95
|
+
last_name: Series[pd.StringDtype] = pa.Field(coerce=True, description="Last name", alias="name.lastName")
|
|
96
|
+
first_name: Series[pd.StringDtype] = pa.Field(coerce=True, description="First name", alias="name.firstName")
|
|
97
|
+
middle_name: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="Middle name", alias="name.middleName")
|
|
98
|
+
nick_name: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="Nick name", alias="name.nickName")
|
|
99
|
+
date_of_birth: Series[pd.StringDtype] = pa.Field(coerce=True, description="Date of birth", alias="birth.dateOfBirth")
|
|
100
|
+
place_of_birth: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="Place of birth", alias="birth.placeOfBirth")
|
|
101
|
+
birth_country_nis_code: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="Birth country NIS code", alias="birth.countryOfBirth.NISCode")
|
|
102
|
+
birth_country_name: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="Birth country name", alias="birth.countryOfBirth.name")
|
|
103
|
+
date_of_death: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="Date of death", alias="dateOfDeath")
|
|
104
|
+
gender_code: Series[pd.StringDtype] = pa.Field(coerce=True, description="Gender code", alias="gender.code")
|
|
105
|
+
gender_description: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="Gender description", alias="gender.description")
|
|
106
|
+
nationality_code: Series[pd.StringDtype] = pa.Field(coerce=True, description="Nationality code", alias="nationality.code")
|
|
107
|
+
nationality_description: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="Nationality description", alias="nationality.description")
|
|
108
|
+
official_language_code: Series[pd.StringDtype] = pa.Field(coerce=True, description="Official language code", alias="officialLanguage.code")
|
|
109
|
+
official_language_description: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="Official language description", alias="officialLanguage.description")
|
|
110
|
+
spoken_language_code: Series[pd.StringDtype] = pa.Field(coerce=True, description="Spoken language code", alias="spokenLanguage.code")
|
|
111
|
+
spoken_language_description: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="Spoken language description", alias="spokenLanguage.description")
|
|
112
|
+
national_registration_number: Series[pd.StringDtype] = pa.Field(coerce=True, description="Social Security Number", alias="nationalRegistrationNumber")
|
|
113
|
+
vaph_number: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="VAPH number", alias="vaphNumber")
|
|
114
|
+
identity_card_number: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="Identity card number", alias="identityCardNumber")
|
|
115
|
+
work_permit_number: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="Work permit number", alias="workPermitNumber")
|
|
116
|
+
work_permit_valid_until: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="Work permit expiration date", alias="workPermitValidUntil")
|
|
117
|
+
fiscal_id_number: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="FIN number", alias="fiscalIdNumber")
|
|
118
|
+
press_number: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="Press number", alias="pressNumber")
|
|
119
|
+
|
|
120
|
+
class _Annotation:
|
|
121
|
+
primary_key = "employee_id"
|
|
122
|
+
foreign_keys = {}
|
|
123
|
+
|
|
124
|
+
class Config:
|
|
125
|
+
metadata = {"class": "PersonalDetails", "dependencies": []}
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
class EmployeeName(BaseModel):
|
|
129
|
+
"""Reusable name schema for PATCH endpoint - no prefix in field names"""
|
|
130
|
+
last_name: str = Field(..., min_length=1, max_length=35, example="Doe", description="Last name", alias="lastName")
|
|
131
|
+
first_name: str = Field(..., min_length=1, max_length=35, example="John", description="First name", alias="firstName")
|
|
132
|
+
middle_name: Optional[str] = Field(None, min_length=1, max_length=75, example="Johnny", description="Middle name of the employee", alias="middleName")
|
|
133
|
+
nick_name: Optional[str] = Field(None, min_length=1, max_length=16, example="Johnny", description="Nick name", alias="nickName")
|
|
134
|
+
|
|
135
|
+
class Config:
|
|
136
|
+
allow_population_by_field_name = True
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
class EmployeeBirth(BaseModel):
|
|
140
|
+
"""Reusable birth information schema - no prefix in field names"""
|
|
141
|
+
date_of_birth: str = Field(..., example="2000-01-01", description="Date of birth. Must be less than current date and >= 1900-01-01", alias="dateOfBirth")
|
|
142
|
+
place_of_birth: Optional[str] = Field(None, min_length=1, max_length=35, example="Leuven", description="Place of birth of the employee", alias="placeOfBirth")
|
|
143
|
+
country_of_birth: Optional[str] = Field(None, min_length=3, max_length=3, example="150", description="Country of birth", alias="countryOfBirth")
|
|
144
|
+
|
|
145
|
+
class Config:
|
|
146
|
+
allow_population_by_field_name = True
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
class PersonalDetailsUpdate(BaseModel):
|
|
150
|
+
"""Schema for PATCH /employee-data-management/v3/employees/{employeeId}/personal-details"""
|
|
151
|
+
# Function parameters
|
|
152
|
+
employee_id: str = Field(..., description="Employee identifier", alias="employeeId")
|
|
153
|
+
|
|
154
|
+
name: Optional[EmployeeName] = Field(None, description="Name information", alias="name", json_schema_extra={"prefix": ""})
|
|
155
|
+
birth: Optional[EmployeeBirth] = Field(None, description="Birth information", alias="birth", json_schema_extra={"prefix": ""})
|
|
156
|
+
date_of_death: Optional[str] = Field(None, example="2022-01-01", description="Date of death", alias="dateOfDeath")
|
|
157
|
+
gender: Optional[str] = Field(None, min_length=1, max_length=1, example="M", description="Gender code", alias="gender")
|
|
158
|
+
nationality: Optional[str] = Field(None, min_length=3, max_length=3, example="150", description="Nationality code", alias="nationality")
|
|
159
|
+
official_language: Optional[str] = Field(None, min_length=2, max_length=2, example="NL", description="Official language code", alias="officialLanguage")
|
|
160
|
+
spoken_language: Optional[str] = Field(None, min_length=2, max_length=2, example="FR", description="Spoken language code", alias="spokenLanguage")
|
|
161
|
+
national_registration_number: Optional[str] = Field(None, pattern=r"^\d{11}$", example="00000000128", description="Social Security Number", alias="nationalRegistrationNumber")
|
|
162
|
+
vaph_number: Optional[str] = Field(None, min_length=1, max_length=7, example="9049167", description="VAPH number", alias="vaphNumber")
|
|
163
|
+
identity_card_number: Optional[str] = Field(None, min_length=1, max_length=12, example="1548151412", description="Identity card number", alias="identityCardNumber")
|
|
164
|
+
work_permit_number: Optional[str] = Field(None, min_length=1, max_length=7, example="B105005", description="Work permit number", alias="workPermitNumber")
|
|
165
|
+
work_permit_valid_until: Optional[str] = Field(None, example="2022-01-01", description="Work permit expiration date", alias="workPermitValidUntil")
|
|
166
|
+
fiscal_id_number: Optional[str] = Field(None, min_length=1, max_length=20, example="7602155", description="FIN number", alias="fiscalIdNumber")
|
|
167
|
+
press_number: Optional[str] = Field(None, min_length=1, max_length=9, example="4512121", description="Press number", alias="pressNumber")
|
|
168
|
+
|
|
169
|
+
class Config:
|
|
170
|
+
allow_population_by_field_name = True
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
# POST Employee Schemas - /v3/employees
|
|
174
|
+
class EmployeePersonalDetails(BaseModel):
|
|
175
|
+
"""Personal details for POST employee request - uses json_schema_extra for birth"""
|
|
176
|
+
last_name: str = Field(..., min_length=1, max_length=35, example="Doe", description="Last name of the employee", alias="lastName")
|
|
177
|
+
first_name: str = Field(..., min_length=1, max_length=35, example="John", description="First name of the employee", alias="firstName")
|
|
178
|
+
middle_name: Optional[str] = Field(None, min_length=1, max_length=35, example="Johnny", description="Middle name of the employee", alias="middleName")
|
|
179
|
+
nick_name: Optional[str] = Field(None, min_length=1, max_length=35, example="Johnny", description="Nick name of the employee", alias="nickName")
|
|
180
|
+
birth: EmployeeBirth = Field(..., description="Birth information of the employee", alias="birth", json_schema_extra={"prefix": "birth_"})
|
|
181
|
+
date_of_death: Optional[str] = Field(None, example="2022-01-01", description="Date of death. Must be less than current date and >= 1900-01-01", alias="dateOfDeath")
|
|
182
|
+
gender: str = Field(..., min_length=1, max_length=1, example="M", description="Gender of the employee", alias="gender")
|
|
183
|
+
nationality: str = Field(..., min_length=3, max_length=3, example="150", description="Nationality of the employee", alias="nationality")
|
|
184
|
+
official_language: str = Field(..., min_length=2, max_length=2, example="NL", description="Official language of the employee", alias="officialLanguage")
|
|
185
|
+
spoken_language: str = Field(..., min_length=2, max_length=2, example="FR", description="Spoken language of the employee", alias="spokenLanguage")
|
|
186
|
+
national_registration_number: str = Field(..., pattern=r"^\d{11}$", example="00000000128", description="Social Security Number of the employee", alias="nationalRegistrationNumber")
|
|
187
|
+
vaph_number: Optional[str] = Field(None, min_length=1, max_length=7, example="9049167", description="VAPH number of the employee", alias="vaphNumber")
|
|
188
|
+
identity_card_number: Optional[str] = Field(None, min_length=1, max_length=12, example="1548151412", description="Identity card number of the employee", alias="identityCardNumber")
|
|
189
|
+
work_permit_number: Optional[str] = Field(None, min_length=1, max_length=7, example="B105005", description="Work permit number of the employee", alias="workPermitNumber")
|
|
190
|
+
work_permit_valid_until: Optional[str] = Field(None, example="2022-01-01", description="Work permit expiration date", alias="workPermitValidUntil")
|
|
191
|
+
fiscal_id_number: Optional[str] = Field(None, min_length=1, max_length=20, example="7602155", description="FIN number of the employee", alias="fiscalIdNumber")
|
|
192
|
+
press_number: Optional[str] = Field(None, min_length=1, max_length=9, example="4512121", description="Press number of the employee", alias="pressNumber")
|
|
193
|
+
|
|
194
|
+
class Config:
|
|
195
|
+
allow_population_by_field_name = True
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
class AddressBase(BaseModel):
|
|
199
|
+
"""Reusable base address schema - no prefix in field names"""
|
|
200
|
+
street: str = Field(..., min_length=1, max_length=40, example="Bondgenotenlaan", description="Street name", alias="street")
|
|
201
|
+
house_number: str = Field(..., min_length=1, max_length=9, example="2", description="House number", alias="houseNumber")
|
|
202
|
+
post_box: Optional[str] = Field(None, min_length=1, max_length=4, example="A", description="Box number", alias="postBox")
|
|
203
|
+
postal_code: str = Field(..., min_length=1, max_length=14, example="3000", description="Postal code", alias="postalCode")
|
|
204
|
+
community: str = Field(..., min_length=1, max_length=35, example="Leuven", description="City name", alias="community")
|
|
205
|
+
country: str = Field(..., min_length=3, max_length=3, example="150", description="NIS Code of the country", alias="country")
|
|
206
|
+
|
|
207
|
+
class Config:
|
|
208
|
+
allow_population_by_field_name = True
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
class EmployeeAddressDetails(BaseModel):
|
|
212
|
+
"""Address details for POST employee request - uses AddressBase with prefixes in json_schema_extra"""
|
|
213
|
+
official_address: AddressBase = Field(..., description="Official address of the employee. Cannot be emptied", alias="officialAddress", json_schema_extra={"prefix": "official_address_"})
|
|
214
|
+
correspondence_address: Optional[AddressBase] = Field(None, description="Correspondence address of the employee. Can be emptied", alias="correspondenceAddress", json_schema_extra={"prefix": "correspondence_address_"})
|
|
215
|
+
|
|
216
|
+
class Config:
|
|
217
|
+
allow_population_by_field_name = True
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
class EmployeeAdditionalInformation(BaseModel):
|
|
221
|
+
"""Additional information for POST employee request"""
|
|
222
|
+
educational_degree: Optional[str] = Field(None, min_length=2, max_length=2, example="04", description="Educational degree", alias="educationalDegree")
|
|
223
|
+
leadership_level: Optional[str] = Field(None, min_length=2, max_length=2, example="02", description="Leadership level", alias="leadershipLevel")
|
|
224
|
+
|
|
225
|
+
class Config:
|
|
226
|
+
allow_population_by_field_name = True
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
class ContactBase(BaseModel):
|
|
230
|
+
"""Reusable base contact schema - no prefix in field names"""
|
|
231
|
+
telephone: Optional[str] = Field(None, min_length=1, max_length=100, example="016588774", description="Phone number", alias="telephone")
|
|
232
|
+
mobile: Optional[str] = Field(None, min_length=1, max_length=100, example="0479877458", description="Mobile number", alias="mobile")
|
|
233
|
+
email: Optional[str] = Field(None, min_length=1, max_length=100, pattern=r"^[^@\s]+@[^@\s]+\.[^@\s]+$", example="contact@acerta.be", description="E-mail", alias="email")
|
|
234
|
+
|
|
235
|
+
class Config:
|
|
236
|
+
allow_population_by_field_name = True
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
class EmergencyContactBase(BaseModel):
|
|
240
|
+
"""Reusable base emergency contact schema - no prefix in field names"""
|
|
241
|
+
relationship: Optional[str] = Field(None, min_length=2, max_length=2, example="10", description="Relationship with the person who to call in case of emergency", alias="relationship")
|
|
242
|
+
name: Optional[str] = Field(None, min_length=1, max_length=50, description="Name of the person in case of emergency", alias="name")
|
|
243
|
+
number: Optional[str] = Field(None, min_length=1, max_length=100, example="0498778855", description="Contact phone number", alias="number")
|
|
244
|
+
|
|
245
|
+
class Config:
|
|
246
|
+
allow_population_by_field_name = True
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
class EmployeeContactInformation(BaseModel):
|
|
250
|
+
"""Contact information for POST employee request - uses base schemas with prefixes in json_schema_extra"""
|
|
251
|
+
personal: Optional[ContactBase] = Field(None, description="Private contact information", alias="personal", json_schema_extra={"prefix": "personal_"})
|
|
252
|
+
work: Optional[ContactBase] = Field(None, description="Work related contact information", alias="work", json_schema_extra={"prefix": "work_"})
|
|
253
|
+
primary_emergency_contact: Optional[EmergencyContactBase] = Field(None, description="Contact person in case of emergency (primary)", alias="primaryEmergencyContact", json_schema_extra={"prefix": "primary_emergency_contact_"})
|
|
254
|
+
secondary_emergency_contact: Optional[EmergencyContactBase] = Field(None, description="Contact person in case of emergency (secondary)", alias="secondaryEmergencyContact", json_schema_extra={"prefix": "secondary_emergency_contact_"})
|
|
255
|
+
|
|
256
|
+
class Config:
|
|
257
|
+
allow_population_by_field_name = True
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
class EmployeeCivilStatus(BaseModel):
|
|
261
|
+
"""Civil status for POST employee request - no prefix in field names"""
|
|
262
|
+
status: str = Field(..., min_length=2, max_length=2, example="06", description="Marital status code", alias="status")
|
|
263
|
+
in_effect_date: Optional[str] = Field(None, example="2022-01-01", description="Date from which the marital status is valid. Mandatory when value differs from 01 (single)", alias="inEffectDate")
|
|
264
|
+
date_of_marriage_or_cohabitation: Optional[str] = Field(None, example="2022-01-01", description="May only and must be present when Married (02), Legally cohabiting (07) or factually separated (04)", alias="dateOfMarriageOrCohabitation")
|
|
265
|
+
|
|
266
|
+
class Config:
|
|
267
|
+
allow_population_by_field_name = True
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
class EmployeePartner(BaseModel):
|
|
271
|
+
"""Partner information for POST employee request - no prefix in field names"""
|
|
272
|
+
last_name: Optional[str] = Field(None, min_length=1, max_length=35, example="Achternaam", description="Partner last name", alias="lastName")
|
|
273
|
+
first_name: Optional[str] = Field(None, min_length=1, max_length=35, example="Voornaam", description="Partner first name", alias="firstName")
|
|
274
|
+
birth_date: Optional[str] = Field(None, example="2022-01-01", description="Partner birth date. Must be >= 1800-01-01", alias="birthDate")
|
|
275
|
+
is_disabled: bool = Field(..., description="Partner disabled indicator", alias="isDisabled")
|
|
276
|
+
income: str = Field(..., min_length=2, max_length=2, example="01", description="Partner income code", alias="income")
|
|
277
|
+
|
|
278
|
+
class Config:
|
|
279
|
+
allow_population_by_field_name = True
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
class EmployeeDependantsChildren(BaseModel):
|
|
283
|
+
"""Dependent children for POST employee request - no prefix in field names"""
|
|
284
|
+
not_disabled: int = Field(..., ge=0, le=99, example=1, description="Number of dependant not disabled children", alias="notDisabled")
|
|
285
|
+
disabled: int = Field(..., ge=0, le=99, example=1, description="Number of disabled dependant children", alias="disabled")
|
|
286
|
+
|
|
287
|
+
class Config:
|
|
288
|
+
allow_population_by_field_name = True
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
class EmployeeDependantsOver65(BaseModel):
|
|
292
|
+
"""Dependent persons 65+ for POST employee request - no prefix in field names"""
|
|
293
|
+
not_disabled: int = Field(..., ge=0, le=99, example=1, description="Number of not disabled dependants over 65", alias="notDisabled")
|
|
294
|
+
disabled: int = Field(..., ge=0, le=99, example=1, description="Number of disabled dependants over 65", alias="disabled")
|
|
295
|
+
needing_care: int = Field(..., ge=0, le=99, example=1, description="Number of dependants over 65 needing care", alias="needingCare")
|
|
296
|
+
|
|
297
|
+
class Config:
|
|
298
|
+
allow_population_by_field_name = True
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
class EmployeeDependantsOthers(BaseModel):
|
|
302
|
+
"""Other dependent persons for POST employee request - no prefix in field names"""
|
|
303
|
+
not_disabled: int = Field(..., ge=0, le=99, example=1, description="Number of not disabled other dependants", alias="notDisabled")
|
|
304
|
+
disabled: int = Field(..., ge=0, le=99, example=1, description="Number of other disabled dependants", alias="disabled")
|
|
305
|
+
|
|
306
|
+
class Config:
|
|
307
|
+
allow_population_by_field_name = True
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
class EmployeeDependants(BaseModel):
|
|
311
|
+
"""Dependants information for POST employee request - uses sub-schemas with prefixes in json_schema_extra"""
|
|
312
|
+
children: EmployeeDependantsChildren = Field(..., description="Number of dependant children", alias="children", json_schema_extra={"prefix": "children_"})
|
|
313
|
+
over65: EmployeeDependantsOver65 = Field(..., description="Number of dependent persons 65+", alias="over65", json_schema_extra={"prefix": "over65_"})
|
|
314
|
+
others: Optional[EmployeeDependantsOthers] = Field(None, description="Number of other dependent persons", alias="others", json_schema_extra={"prefix": "others_"})
|
|
315
|
+
|
|
316
|
+
class Config:
|
|
317
|
+
allow_population_by_field_name = True
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
class EmployeeFiscalDetails(BaseModel):
|
|
321
|
+
"""Fiscal details for POST employee request - no prefix in field names"""
|
|
322
|
+
has_family_burden: Optional[bool] = Field(None, description="Dependent family in case of early retirement", alias="hasFamilyBurden")
|
|
323
|
+
is_unmarried_with_dependant_child: Optional[bool] = Field(None, description="Not married with dependent child", alias="isUnmarriedWithDependantChild")
|
|
324
|
+
is_disabled: bool = Field(..., description="Disabled indicator", alias="isDisabled")
|
|
325
|
+
merging_gross_net_calculation: str = Field(..., min_length=2, max_length=2, example="02", description="Merging gross net calculation code", alias="mergingGrossNetCalculation")
|
|
326
|
+
is_young_employee: Optional[bool] = Field(None, description="Young employee. Only visible for EverESSt-clients", alias="isYoungEmployee")
|
|
327
|
+
tax_volunteerism_amount: Optional[float] = Field(None, example=27530.12, description="Additional monthly payroll withholding tax amount", alias="taxVolunteerismAmount")
|
|
328
|
+
|
|
329
|
+
class Config:
|
|
330
|
+
allow_population_by_field_name = True
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
class EmployeeFamilySituation(BaseModel):
|
|
334
|
+
"""Family situation for POST employee request - uses sub-schemas with prefixes in json_schema_extra"""
|
|
335
|
+
civil_status: EmployeeCivilStatus = Field(..., description="Civil status of the employee", alias="civilStatus", json_schema_extra={"prefix": "civil_status_"})
|
|
336
|
+
partner: Optional[EmployeePartner] = Field(None, description="Information regarding the partner. May only and must be present when Married (02), Legally cohabiting (07) or Factually separated (04)", alias="partner", json_schema_extra={"prefix": "partner_"})
|
|
337
|
+
dependants: EmployeeDependants = Field(..., description="Number of dependent persons", alias="dependants", json_schema_extra={"prefix": "dependants_"})
|
|
338
|
+
fiscal_details: EmployeeFiscalDetails = Field(..., description="Fiscal details", alias="fiscalDetails", json_schema_extra={"prefix": "fiscal_details_"})
|
|
339
|
+
|
|
340
|
+
class Config:
|
|
341
|
+
allow_population_by_field_name = True
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
class EmployeeBankDetails(BaseModel):
|
|
345
|
+
"""Bank details for POST employee request - no prefix in field names"""
|
|
346
|
+
name_of_bank: Optional[str] = Field(None, min_length=1, max_length=35, example="Access Bank Group", description="Name of bank", alias="nameOfBank")
|
|
347
|
+
street: Optional[str] = Field(None, min_length=1, max_length=40, example="Oniru Road", description="Street name", alias="street")
|
|
348
|
+
house_number: Optional[str] = Field(None, min_length=1, max_length=19, example="14", description="Number", alias="houseNumber")
|
|
349
|
+
post_box: Optional[str] = Field(None, min_length=1, max_length=4, example="A", description="Box", alias="postBox")
|
|
350
|
+
postal_code: Optional[str] = Field(None, min_length=1, max_length=14, example="101241", description="Postcode", alias="postalCode")
|
|
351
|
+
community: Optional[str] = Field(None, min_length=1, max_length=35, example="Victoria Island", description="Community", alias="community")
|
|
352
|
+
country: Optional[str] = Field(None, min_length=3, max_length=3, example="234", description="Country NIS code", alias="country")
|
|
353
|
+
|
|
354
|
+
class Config:
|
|
355
|
+
allow_population_by_field_name = True
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
class EmployeeForeignBankAccount(BaseModel):
|
|
359
|
+
"""Foreign bank account for POST employee request - no prefix in field names, uses json_schema_extra for sub-schema"""
|
|
360
|
+
bic: str = Field(..., min_length=1, max_length=11, pattern=r"^([A-Z]{4}[A-Z]{2}[A-Z0-9]{2}[A-Z0-9]{3}|[A-Z]{4}[A-Z]{2}[A-Z0-9]{2})$", example="HBUKGB4B", description="BIC (Bank Identifier Code)", alias="bic")
|
|
361
|
+
costs: str = Field(..., min_length=4, max_length=4, example="CRED", description="Costs code", alias="costs")
|
|
362
|
+
bank_details: Optional[EmployeeBankDetails] = Field(None, description="Details of the foreign bank", alias="bankDetails", json_schema_extra={"prefix": "foreign_bank_account_bank_details_"})
|
|
363
|
+
|
|
364
|
+
class Config:
|
|
365
|
+
allow_population_by_field_name = True
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
class EmployeeBankAccountOwner(BaseModel):
|
|
369
|
+
"""Bank account owner for POST employee request - no prefix in field names"""
|
|
370
|
+
last_name: Optional[str] = Field(None, min_length=1, max_length=35, example="Achternaam", description="Owner last name of the bank account", alias="lastName")
|
|
371
|
+
first_name: Optional[str] = Field(None, min_length=1, max_length=35, example="Voornaam", description="Owner first name of the bank account", alias="firstName")
|
|
372
|
+
street: Optional[str] = Field(None, min_length=1, max_length=40, example="Gemeentestraat", description="Owner street name of the bank account", alias="street")
|
|
373
|
+
house_number: Optional[str] = Field(None, min_length=1, max_length=14, example="61", description="Owner house number of the bank account", alias="houseNumber")
|
|
374
|
+
post_box: Optional[str] = Field(None, min_length=1, max_length=4, example="A", description="Owner box number of the bank account", alias="postBox")
|
|
375
|
+
postal_code: Optional[str] = Field(None, min_length=1, max_length=14, example="3210", description="Owner zip code of the bank account", alias="postalCode")
|
|
376
|
+
community: Optional[str] = Field(None, min_length=1, max_length=35, example="Linden", description="Owner city name of the bank account", alias="community")
|
|
377
|
+
country: Optional[str] = Field(None, min_length=3, max_length=3, example="150", description="Country NIS code", alias="country")
|
|
378
|
+
|
|
379
|
+
class Config:
|
|
380
|
+
allow_population_by_field_name = True
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
class EmployeeBankAccount(BaseModel):
|
|
384
|
+
"""Bank account for POST employee request - uses json_schema_extra for nested schemas"""
|
|
385
|
+
iban: str = Field(..., min_length=1, max_length=34, example="BE68539007547034", description="Bank account number", alias="iban")
|
|
386
|
+
text: Optional[str] = Field(None, min_length=1, max_length=40, example="Dit is een tekst", description="Notice text", alias="text")
|
|
387
|
+
foreign_bank_account: Optional[EmployeeForeignBankAccount] = Field(None, description="If it concerns a foreign bank account", alias="foreignBankAccount", json_schema_extra={"prefix": "foreign_bank_account_"})
|
|
388
|
+
bank_account_owner: Optional[EmployeeBankAccountOwner] = Field(None, description="If the employee is not the owner of the bankaccount", alias="bankAccountOwner", json_schema_extra={"prefix": "bank_account_owner_"})
|
|
389
|
+
|
|
390
|
+
class Config:
|
|
391
|
+
allow_population_by_field_name = True
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
class EmployeeCreate(BaseModel):
|
|
395
|
+
"""Schema for POST /v3/employees endpoint"""
|
|
396
|
+
employer_id: str = Field(..., min_length=11, max_length=11, example="01458741541", description="Acerta internal reference for an employer", alias="employerId")
|
|
397
|
+
external_reference: Optional[str] = Field(None, min_length=1, max_length=40, example="ext-ref-0225742-AD-00027", description="External reference during creation", alias="externalReference")
|
|
398
|
+
personal_details: EmployeePersonalDetails = Field(..., description="Employee details such as name, nationality, date of birth, etc.", alias="personalDetails", json_schema_extra={"prefix": ""})
|
|
399
|
+
addresses: EmployeeAddressDetails = Field(..., description="Address details of the employee", alias="addresses")
|
|
400
|
+
additional_information: Optional[EmployeeAdditionalInformation] = Field(None, description="Educational degree and leadership level", alias="additionalInformation")
|
|
401
|
+
contact_information: Optional[EmployeeContactInformation] = Field(None, description="Contact information of the employee", alias="contactInformation")
|
|
402
|
+
family_situation: EmployeeFamilySituation = Field(..., description="Marital status information, partner details, dependents", alias="familySituation")
|
|
403
|
+
bank_accounts: Optional[EmployeeBankAccount] = Field(None, description="Bank account information", alias="bankAccounts")
|
|
404
|
+
|
|
405
|
+
class Config:
|
|
406
|
+
allow_population_by_field_name = True
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Schemas for Employer resource
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
import pandas as pd
|
|
6
|
+
import pandera as pa
|
|
7
|
+
from pandera.typing import Series
|
|
8
|
+
from brynq_sdk_functions import BrynQPanderaDataFrameModel
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# GET Schema for Joint Committees
|
|
12
|
+
class JointCommitteeGet(BrynQPanderaDataFrameModel):
|
|
13
|
+
"""Schema for GET /employers/{employerId}/joint-committees endpoint"""
|
|
14
|
+
|
|
15
|
+
employer_id: Series[pd.StringDtype] = pa.Field(coerce=True, description="Employer identifier", alias="employerId")
|
|
16
|
+
code: Series[pd.StringDtype] = pa.Field(coerce=True, description="Joint committee code", alias="code")
|
|
17
|
+
description: Series[pd.StringDtype] = pa.Field(coerce=True, description="Joint committee description", alias="description")
|
|
18
|
+
# links_rel: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="HAL link relation", alias="_links.rel")
|
|
19
|
+
# links_href: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="HAL link href", alias="_links.href")
|
|
20
|
+
# links_title: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="HAL link title", alias="_links.title")
|
|
21
|
+
# links_type: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="HAL link type", alias="_links.type")
|
|
22
|
+
# links_templated: Series[pd.BooleanDtype] = pa.Field(coerce=True, nullable=True, description="HAL link templated flag", alias="_links.templated")
|
|
23
|
+
|
|
24
|
+
class _Annotation:
|
|
25
|
+
primary_key = "code"
|
|
26
|
+
|
|
27
|
+
class Config:
|
|
28
|
+
metadata = {"class": "JointCommittee", "dependencies": []}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
# GET Schema for Functions (per employer-data-management spec)
|
|
32
|
+
class FunctionGet(BrynQPanderaDataFrameModel):
|
|
33
|
+
"""Schema for GET /v1/employers/{employerId}/functions endpoint"""
|
|
34
|
+
|
|
35
|
+
# Function identification
|
|
36
|
+
function_id: Series[pd.StringDtype] = pa.Field(coerce=True, description="Code of the function", alias="functionId")
|
|
37
|
+
|
|
38
|
+
# Period information
|
|
39
|
+
period_start_date: Series[pd.StringDtype] = pa.Field(coerce=True, description="The start date of the record", alias="period.startDate")
|
|
40
|
+
period_end_date: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="The end date of the record", alias="period.endDate")
|
|
41
|
+
|
|
42
|
+
# Descriptions (handled as JSON string since it's a list)
|
|
43
|
+
descriptions: Series[pd.StringDtype] = pa.Field(coerce=True, description="Function descriptions per language (as JSON)", alias="descriptions")
|
|
44
|
+
|
|
45
|
+
class _Annotation:
|
|
46
|
+
primary_key = "function_id"
|
|
47
|
+
|
|
48
|
+
class Config:
|
|
49
|
+
metadata = {"class": "Function", "dependencies": []}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
# GET Schema for Salary Codes
|
|
53
|
+
class SalaryCodeGet(BrynQPanderaDataFrameModel):
|
|
54
|
+
"""Schema for GET /v1/employers/{employerId}/salary-codes endpoint"""
|
|
55
|
+
|
|
56
|
+
# Salary Code identification
|
|
57
|
+
salary_code_id: Series[pd.StringDtype] = pa.Field(coerce=True, description="The identifier of the salary code", alias="salaryCodeId")
|
|
58
|
+
|
|
59
|
+
# Period information
|
|
60
|
+
period_start_date: Series[pd.StringDtype] = pa.Field(coerce=True, description="The start date of the record", alias="period.startDate")
|
|
61
|
+
period_end_date: Series[pd.StringDtype] = pa.Field(coerce=True, nullable=True, description="The end date of the record", alias="period.endDate")
|
|
62
|
+
|
|
63
|
+
# Descriptions (handled as JSON string since it's a list)
|
|
64
|
+
descriptions: Series[pd.StringDtype] = pa.Field(coerce=True, description="Salary code descriptions per language (as JSON)", alias="descriptions")
|
|
65
|
+
|
|
66
|
+
class _Annotation:
|
|
67
|
+
primary_key = "salary_code_id"
|
|
68
|
+
foreign_keys = {}
|
|
69
|
+
|
|
70
|
+
class Config:
|
|
71
|
+
metadata = {"class": "SalaryCode", "dependencies": []}
|