brynq-sdk-factorial 2.3.0__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.
Files changed (41) hide show
  1. brynq_sdk_factorial/__init__.py +60 -0
  2. brynq_sdk_factorial/companies.py +76 -0
  3. brynq_sdk_factorial/compensations.py +80 -0
  4. brynq_sdk_factorial/contracts.py +50 -0
  5. brynq_sdk_factorial/costcenter.py +80 -0
  6. brynq_sdk_factorial/custom_fields.py +76 -0
  7. brynq_sdk_factorial/employees.py +57 -0
  8. brynq_sdk_factorial/family_situation.py +50 -0
  9. brynq_sdk_factorial/files.py +22 -0
  10. brynq_sdk_factorial/locations.py +49 -0
  11. brynq_sdk_factorial/payroll.py +54 -0
  12. brynq_sdk_factorial/schemas/attendance_schemas.py +264 -0
  13. brynq_sdk_factorial/schemas/banking_schemas.py +87 -0
  14. brynq_sdk_factorial/schemas/companies_schemas.py +29 -0
  15. brynq_sdk_factorial/schemas/contracts_schemas.py +395 -0
  16. brynq_sdk_factorial/schemas/documents_schemas.py +95 -0
  17. brynq_sdk_factorial/schemas/employee_updates_schemas.py +300 -0
  18. brynq_sdk_factorial/schemas/employees_schemas.py +187 -0
  19. brynq_sdk_factorial/schemas/expenses_schemas.py +144 -0
  20. brynq_sdk_factorial/schemas/family_situation.py +33 -0
  21. brynq_sdk_factorial/schemas/finance_schemas.py +433 -0
  22. brynq_sdk_factorial/schemas/holidays_schemas.py +21 -0
  23. brynq_sdk_factorial/schemas/job_catalog_schemas.py +35 -0
  24. brynq_sdk_factorial/schemas/locations_schemas.py +85 -0
  25. brynq_sdk_factorial/schemas/payroll_employees_schemas.py +33 -0
  26. brynq_sdk_factorial/schemas/payroll_integrations_base_schemas.py +27 -0
  27. brynq_sdk_factorial/schemas/payroll_schemas.py +92 -0
  28. brynq_sdk_factorial/schemas/project_management_schemas.py +192 -0
  29. brynq_sdk_factorial/schemas/shift_management_schemas.py +40 -0
  30. brynq_sdk_factorial/schemas/teams_schemas.py +57 -0
  31. brynq_sdk_factorial/schemas/time_planning_schemas.py +28 -0
  32. brynq_sdk_factorial/schemas/time_settings_schemas.py +29 -0
  33. brynq_sdk_factorial/schemas/timeoff_schemas.py +386 -0
  34. brynq_sdk_factorial/schemas/trainings_schemas.py +215 -0
  35. brynq_sdk_factorial/schemas/work_schedule_schemas.py +82 -0
  36. brynq_sdk_factorial/teams.py +76 -0
  37. brynq_sdk_factorial/workschedules.py +50 -0
  38. brynq_sdk_factorial-2.3.0.dist-info/METADATA +17 -0
  39. brynq_sdk_factorial-2.3.0.dist-info/RECORD +41 -0
  40. brynq_sdk_factorial-2.3.0.dist-info/WHEEL +5 -0
  41. brynq_sdk_factorial-2.3.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,386 @@
1
+ # Auto-generated schemas for category: timeoff
2
+
3
+ import pandas as pd
4
+ import pandera as pa
5
+ from pandera.typing import Series, String, Int, Float, Bool, DateTime
6
+ import pandera.extensions as extensions
7
+ from brynq_sdk_functions import BrynQPanderaDataFrameModel
8
+ from typing import Optional, Annotated
9
+ from pydantic import BaseModel, Field, StringConstraints
10
+
11
+ class Allowance_incidencesGet(BrynQPanderaDataFrameModel):
12
+ id: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=False, description="Unique identifier of the allowance incidence", alias="id")
13
+ employee_id: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=False, description="Employee id of the affected employee", alias="employee_id")
14
+ description: Series[String] = pa.Field(coerce=True, nullable=True, description="Optional comment regarding the incidence", alias="description")
15
+ days_in_cents: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=False, description="How many units * 100 does the incidence add/substract. Can be positive or negative. Example is one unit", alias="days_in_cents")
16
+ timeoff_allowance_id: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=False, description="To what allowance does the incidence affect. It will dictate if its days or hours", alias="timeoff_allowance_id")
17
+ effective_on: Series[String] = pa.Field(coerce=True, nullable=False, description="When does the incidence take effect; this is for time off cycles calculations.", alias="effective_on")
18
+ target_balance: Series[String] = pa.Field(coerce=True, nullable=True, description="Whether the incidence affects the Accrued or the Available counter.", alias="target_balance")
19
+ created_at: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=False, description="Unix timestamp when the DB record was created", alias="created_at")
20
+ updated_at: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=False, description="Unix timestamp when the DB record was last updated", alias="updated_at")
21
+
22
+ class Allowance_statsGet(BrynQPanderaDataFrameModel):
23
+ id: Series[String] = pa.Field(coerce=True, nullable=False, description="", alias="id")
24
+ allowance_id: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=False, description="", alias="allowance_id")
25
+ employee_id: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=False, description="", alias="employee_id")
26
+ year: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=False, description="", alias="year")
27
+ cycles: Series[String] = pa.Field(coerce=True, nullable=False, description="", alias="cycles")
28
+ carry_overs: Series[String] = pa.Field(coerce=True, nullable=False, description="", alias="carry_overs")
29
+ accumulated_carry_over: Series[String] = pa.Field(coerce=True, nullable=False, description="", alias="accumulated_carry_over")
30
+ available_days: Series[String] = pa.Field(coerce=True, nullable=False, description="", alias="available_days")
31
+ total_accrued_units: Series[String] = pa.Field(coerce=True, nullable=False, description="", alias="total_accrued_units")
32
+ incidences: Series[String] = pa.Field(coerce=True, nullable=False, description="", alias="incidences")
33
+ max_balance_cap: Series[String] = pa.Field(coerce=True, nullable=True, description="", alias="max_balance_cap")
34
+ policy_allowance: Series[String] = pa.Field(coerce=True, nullable=False, description="", alias="policy_allowance")
35
+ prorated_allowance_days: Series[String] = pa.Field(coerce=True, nullable=False, description="", alias="prorated_allowance_days")
36
+ total_in_decimal: Series[String] = pa.Field(coerce=True, nullable=True, description="", alias="total_in_decimal")
37
+ used_carry_over: Series[String] = pa.Field(coerce=True, nullable=False, description="", alias="used_carry_over")
38
+ used_days: Series[String] = pa.Field(coerce=True, nullable=False, description="", alias="used_days")
39
+ used_units_until_reference_date: Series[String] = pa.Field(coerce=True, nullable=False, description="", alias="used_units_until_reference_date")
40
+ outstanding_units: Series[String] = pa.Field(coerce=True, nullable=False, description="", alias="outstanding_units")
41
+
42
+ class AllowancesGet(BrynQPanderaDataFrameModel):
43
+ id: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=False, description="Unique identifier of the allowance", alias="id")
44
+ accrued_denominator_in_cents: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=True, description="Only for Allowances based on worked time. It represents how many units you need to work to be granted allowance units", alias="accrued_denominator_in_cents")
45
+ accrued_factor_in_cents: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=True, description="Only for Allowances based on worked time. It represents how many units you are given per unit of time worked", alias="accrued_factor_in_cents")
46
+ accrued_units_availability: Series[String] = pa.Field(coerce=True, nullable=True, description="When can the acrrued units be spent.", alias="accrued_units_availability")
47
+ allowance_type: Series[String] = pa.Field(coerce=True, nullable=False, description="Sets the allowance units. Can be "days" or "hours"", alias="allowance_type")
48
+ available_days: Series[String] = pa.Field(coerce=True, nullable=False, description="Indicates how the allowance units are accrued. For example all_days means all allowance days are given on the first day of the cycle.", alias="available_days")
49
+ carry_over_days: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=True, description="How many units can carry over between cycles", alias="carry_over_days")
50
+ carry_over_units_in_cents: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=True, description="How many units can carry over between cycles multiplied by 100", alias="carry_over_units_in_cents")
51
+ count_holiday_as_workable: Series[Bool] = pa.Field(coerce=True, nullable=False, description="This setting flags if units taken during a bank holiday should be deducted or not from allowance.", alias="count_holiday_as_workable")
52
+ cycle_length: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=True, description="How many months does each allowance cycle last", alias="cycle_length")
53
+ cycle_start: Series[String] = pa.Field(coerce=True, nullable=True, description="When does the cycle start.", alias="cycle_start")
54
+ days_type: Series[String] = pa.Field(coerce=True, nullable=True, description="Indicates if the allowance is based on working on calendar days.", alias="days_type")
55
+ employee_carry_over_starting_year: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=True, description="When does the carryover start", alias="employee_carry_over_starting_year")
56
+ expire_in_months: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=True, description="When does the carryover expire in months.", alias="expire_in_months")
57
+ frequency: Series[String] = pa.Field(coerce=True, nullable=True, description="Defines duration of the allowance cycles. Can be "yearly", "monthly_flexible" or "lifetime"", alias="frequency")
58
+ holiday_allowance_in_cents: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=True, description="Base amount of holiday allowance units multiplied by 100", alias="holiday_allowance_in_cents")
59
+ leave_type_ids: Series[String] = pa.Field(coerce=True, nullable=False, description="An array of leave type ids associated with that allowance", alias="leave_type_ids")
60
+ maximum_amount_in_cents: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=True, description="Maximum the allowance can reach on accrued", alias="maximum_amount_in_cents")
61
+ name: Series[String] = pa.Field(coerce=True, nullable=False, description="Allowance name set by the user", alias="name")
62
+ negative_counter_type: Series[String] = pa.Field(coerce=True, nullable=True, description="Whether the allowance allows to request more days than available", alias="negative_counter_type")
63
+ position: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=True, description="Indicates the position in the allowance when rendering them in UI", alias="position")
64
+ proration_type: Series[String] = pa.Field(coerce=True, nullable=False, description="Whether the allowance has proration enabled or not.", alias="proration_type")
65
+ pto_proratio_enabled: Series[Bool] = pa.Field(coerce=True, nullable=True, description="Whether the allowance days are prorrated or not", alias="pto_proratio_enabled")
66
+ range_type: Series[String] = pa.Field(coerce=True, nullable=True, description="Configures how leaves duration is handled.", alias="range_type")
67
+ rounding: Series[String] = pa.Field(coerce=True, nullable=False, description="How the accrued units of the allowance are rounded. It depends if the allowance is set in hours or days.", alias="rounding")
68
+ send_notification: Series[Bool] = pa.Field(coerce=True, nullable=True, description="", alias="send_notification")
69
+ source_units: Series[String] = pa.Field(coerce=True, nullable=True, description="This field configures the type of allowance (fixed balance, based on worked time)", alias="source_units")
70
+ tenure_period_transition: Series[String] = pa.Field(coerce=True, nullable=True, description="In case the allowance has tenure periods, when is this tenure applied.", alias="tenure_period_transition")
71
+ tenure_periods: Series[String] = pa.Field(coerce=True, nullable=False, description="The tenure periods associated with the allowance.", alias="tenure_periods")
72
+ tenure_periods_enabled: Series[Bool] = pa.Field(coerce=True, nullable=True, description="Whether the allowance has tenure periods enabled or not.", alias="tenure_periods_enabled")
73
+ timeoff_cycle: Series[String] = pa.Field(coerce=True, nullable=False, description="Value to indicate how the allowance cycle is configured. Its an abbreviation of the first and last month.", alias="timeoff_cycle")
74
+ timeoff_policy_id: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=False, description="The Id of the policy to which the allowance belongs to", alias="timeoff_policy_id")
75
+ unlimited_accrued_hours: Series[Bool] = pa.Field(coerce=True, nullable=True, description="Flag to indicate if there is unlimited accrual.", alias="unlimited_accrued_hours")
76
+ unlimited_carry_over: Series[Bool] = pa.Field(coerce=True, nullable=True, description="Flag to indicate if there is unlimited carry over.", alias="unlimited_carry_over")
77
+ unlimited_carry_over_expiration: Series[Bool] = pa.Field(coerce=True, nullable=True, description="Boolean to flag if carryover does not expire", alias="unlimited_carry_over_expiration")
78
+ unlimited_holidays: Series[Bool] = pa.Field(coerce=True, nullable=True, description="Flag to indicate that the allowance has unlimited available days", alias="unlimited_holidays")
79
+
80
+ class Blocked_periodsGet(BrynQPanderaDataFrameModel):
81
+ id: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=False, description="Unique identifier of the blocked period", alias="id")
82
+ company_id: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=False, description="Company id of the blocked period", alias="company_id")
83
+ name: Series[String] = pa.Field(coerce=True, nullable=False, description="Name of the blocked period.", alias="name")
84
+ leave_type_ids: Series[String] = pa.Field(coerce=True, nullable=False, description="Leave types for which absence request has been blocked", alias="leave_type_ids")
85
+ time_periods: Series[String] = pa.Field(coerce=True, nullable=False, description="The tenure periods associated with the allowance.", alias="time_periods")
86
+ strategy: Series[String] = pa.Field(coerce=True, nullable=False, description="Type of access group", alias="strategy")
87
+ members: Series[String] = pa.Field(coerce=True, nullable=False, description="Employees whose timeoff will be affected", alias="members")
88
+ location_ids: Series[String] = pa.Field(coerce=True, nullable=True, description="List of locations workplace identifiers where the employees are located", alias="location_ids")
89
+ team_ids: Series[String] = pa.Field(coerce=True, nullable=True, description="List of team identifiers which the selected employees belong to", alias="team_ids")
90
+ legal_entity_ids: Series[String] = pa.Field(coerce=True, nullable=True, description="List of legal entity identifiers which the selected employees belong to", alias="legal_entity_ids")
91
+
92
+ class Leave_typesGet(BrynQPanderaDataFrameModel):
93
+ id: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=False, description="Identifier of the leave type", alias="id")
94
+ name: Series[String] = pa.Field(coerce=True, nullable=False, description="Name of the leave type", alias="name")
95
+ translated_name: Series[String] = pa.Field(coerce=True, nullable=True, description="Translated name of the leave type, if available", alias="translated_name")
96
+ identifier: Series[String] = pa.Field(coerce=True, nullable=False, description="Unique identifier of the leave type", alias="identifier")
97
+ color: Series[String] = pa.Field(coerce=True, nullable=False, description="The color associated with this leave type", alias="color")
98
+ active: Series[Bool] = pa.Field(coerce=True, nullable=True, description="Whether the leave type is active", alias="active")
99
+ editable: Series[Bool] = pa.Field(coerce=True, nullable=True, description="Whether the leave type is editable", alias="editable")
100
+ approval_required: Series[Bool] = pa.Field(coerce=True, nullable=True, description="Whether approval is required for this leave type", alias="approval_required")
101
+ accrues: Series[Bool] = pa.Field(coerce=True, nullable=True, description="Whether the leave type accrues over time", alias="accrues")
102
+ attachment: Series[Bool] = pa.Field(coerce=True, nullable=False, description="Whether an attachment is required for this leave type", alias="attachment")
103
+ allow_endless: Series[Bool] = pa.Field(coerce=True, nullable=True, description="Whether endless leave is allowed", alias="allow_endless")
104
+ restricted: Series[Bool] = pa.Field(coerce=True, nullable=True, description="Whether the leave type is restricted", alias="restricted")
105
+ visibility: Series[Bool] = pa.Field(coerce=True, nullable=False, description="Whether the leave type is visible to employees", alias="visibility")
106
+ workable: Series[Bool] = pa.Field(coerce=True, nullable=False, description="Whether the leave type is workable", alias="workable")
107
+ payable: Series[Bool] = pa.Field(coerce=True, nullable=True, description="Whether the leave type is payable", alias="payable")
108
+ company_id: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=False, description="Identifier of the company associated with this leave type", alias="company_id")
109
+ is_attachment_mandatory: Series[Bool] = pa.Field(coerce=True, nullable=True, description="Whether the attachment is mandatory", alias="is_attachment_mandatory")
110
+ allowance_ids: Series[String] = pa.Field(coerce=True, nullable=False, description="List of allowance identifiers associated with this leave type", alias="allowance_ids")
111
+ half_days_units_enabled: Series[Bool] = pa.Field(coerce=True, nullable=True, description="Whether half-day units are enabled for this leave type", alias="half_days_units_enabled")
112
+ max_days_in_cents: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=True, description="Maximum days in cents that can be taken", alias="max_days_in_cents")
113
+ min_days_in_cents: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=True, description="Minimum days in cents that must be taken", alias="min_days_in_cents")
114
+ description: Series[String] = pa.Field(coerce=True, nullable=True, description="Description of the leave type", alias="description")
115
+ details_required: Series[Bool] = pa.Field(coerce=True, nullable=False, description="Whether additional details are required for the leave type", alias="details_required")
116
+
117
+ class LeavesGet(BrynQPanderaDataFrameModel):
118
+ id: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=False, description="Identifier of the Leave", alias="id")
119
+ company_id: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=False, description="Company identifier of the employee of the leave", alias="company_id")
120
+ employee_id: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=False, description="Employee identifier of the leave", alias="employee_id")
121
+ start_on: Series[String] = pa.Field(coerce=True, nullable=False, description="The start date of the leave", alias="start_on")
122
+ finish_on: Series[String] = pa.Field(coerce=True, nullable=True, description="The end date of the leave", alias="finish_on")
123
+ half_day: Series[String] = pa.Field(coerce=True, nullable=True, description="Indicates if the leave is taken as a half-day", alias="half_day")
124
+ description: Series[String] = pa.Field(coerce=True, nullable=True, description="A description of the leave", alias="description")
125
+ reason: Series[String] = pa.Field(coerce=True, nullable=True, description="The reason provided by the employee for taking the leave", alias="reason")
126
+ leave_type_id: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=True, description="The identifier for the type of leave", alias="leave_type_id")
127
+ leave_type_name: Series[String] = pa.Field(coerce=True, nullable=True, description="The name of the leave type", alias="leave_type_name")
128
+ approved: Series[Bool] = pa.Field(coerce=True, nullable=True, description="Indicates whether the leave has been approved", alias="approved")
129
+ employee_full_name: Series[String] = pa.Field(coerce=True, nullable=True, description="The full name of the employee taking the leave", alias="employee_full_name")
130
+ start_time: Series[String] = pa.Field(coerce=True, nullable=True, description="The start time of the leave", alias="start_time")
131
+ hours_amount_in_cents: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=True, description="The total number of hours taken for the leave, represented in cents", alias="hours_amount_in_cents")
132
+ updated_at: Series[String] = pa.Field(coerce=True, nullable=False, description="The updated at date of the leave", alias="updated_at")
133
+ created_at: Series[String] = pa.Field(coerce=True, nullable=True, description="The created at date of the leave", alias="created_at")
134
+
135
+ class PoliciesGet(BrynQPanderaDataFrameModel):
136
+ id: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=False, description="The policy id.", alias="id")
137
+ name: Series[String] = pa.Field(coerce=True, nullable=False, description="Policy name.", alias="name")
138
+ main: Series[Bool] = pa.Field(coerce=True, nullable=True, description="Is the main policy? It will return true if it's the main policy if not it will return false.", alias="main")
139
+ company_id: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=False, description="The company id.", alias="company_id")
140
+ description: Series[String] = pa.Field(coerce=True, nullable=True, description="The policy description.", alias="description")
141
+
142
+ class Policy_assignmentsGet(BrynQPanderaDataFrameModel):
143
+ id: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=True, description="Unique identifier of the policy assignment", alias="id")
144
+ timeoff_policy_id: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=False, description="The time off policy id", alias="timeoff_policy_id")
145
+ employee_id: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=False, description="The employee id", alias="employee_id")
146
+ effective_at: Series[String] = pa.Field(coerce=True, nullable=False, description="The effective date of the policy assignment", alias="effective_at")
147
+
148
+ class Allowance_incidencesCreate(BaseModel):
149
+ employee_id: int = Field(..., description="Employee Id", alias="employee_id")
150
+ timeoff_allowance_id: int = Field(..., description="Allowance Id", alias="timeoff_allowance_id")
151
+ days_in_cents: int = Field(..., description="How many units multiplied by 100 do you want to add/substract. Can be positive or negative", alias="days_in_cents")
152
+ description: Optional[str] = Field(None, description="A free text field to add a description to the incidence", alias="description")
153
+ effective_on: str = Field(..., description="When does the incidence take effect. This is related to the allowance cycle.", alias="effective_on")
154
+ target_balance: Annotated[str, StringConstraints(pattern=r'^available|accrued$', strip_whitespace=True)] = Field(..., description="Which counter does the incidence affect. Can be "accrued" or "available"", alias="target_balance")
155
+ _skip_notifications: Optional[bool] = Field(None, description="When set to true, it prevents notifications being sent to employee when this incidence is created", alias="_skip_notifications")
156
+
157
+ class Allowance_incidencesUpdate(BaseModel):
158
+ id: int = Field(..., description="ID", alias="id")
159
+ employee_id: int = Field(..., description="Employee id of the affected employee", alias="employee_id")
160
+ description: Optional[str] = Field(None, description="Optional comment regarding the incidence", alias="description")
161
+ days_in_cents: int = Field(..., description="How many units * 100 does the incidence add/substract. Can be positive or negative. Example is one unit", alias="days_in_cents")
162
+ timeoff_allowance_id: int = Field(..., description="To what allowance does the incidence affect. It will dictate if its days or hours", alias="timeoff_allowance_id")
163
+ effective_on: str = Field(..., description="When does the incidence take effect; this is for time off cycles calculations.", alias="effective_on")
164
+ target_balance: Optional[str] = Field(None, description="Whether the incidence affects the Accrued or the Available counter.", alias="target_balance")
165
+ created_at: int = Field(..., description="Unix timestamp when the DB record was created", alias="created_at")
166
+ updated_at: int = Field(..., description="Unix timestamp when the DB record was last updated", alias="updated_at")
167
+
168
+ class Allowance_incidencesDelete(BaseModel):
169
+ id: int = Field(..., description="ID", alias="id")
170
+
171
+ class Allowance_statsDelete(BaseModel):
172
+ id: int = Field(..., description="ID", alias="id")
173
+
174
+ class AllowancesCreate(BaseModel):
175
+ accrued_denominator_in_cents: Optional[int] = Field(None, description="Only for Allowances based on worked time. It represents how many units you need to work to be granted allowance units", alias="accrued_denominator_in_cents")
176
+ accrued_factor_in_cents: Optional[int] = Field(None, description="Only for Allowances based on worked time. It represents how many units you are given per unit of time worked", alias="accrued_factor_in_cents")
177
+ accrued_units_availability: Annotated[str, StringConstraints(pattern=r'^current_cycle|next_cycle$', strip_whitespace=True)] = Field(..., description="When can the accrued units be spent.", alias="accrued_units_availability")
178
+ allowance_type: Annotated[str, StringConstraints(pattern=r'^days|hours$', strip_whitespace=True)] = Field(..., description="Sets the allowance units. Can be "days" or "hours"", alias="allowance_type")
179
+ available_days: Annotated[str, StringConstraints(pattern=r'^all_days|generated_days|generated_days_monthly|generated_days_monthly_first_day|monthly_fifteenth|mensiversary|bimonthly_first_and_fifteenth|bimonthly_fifteenth_and_last$', strip_whitespace=True)] = Field(..., description="Indicates how the allowance units are accrued. For example all_days means all allowance days are given on the first day of the cycle.", alias="available_days")
180
+ carry_over_units_in_cents: Optional[int] = Field(None, description="How many units can carry over between cycles multiplied by 100", alias="carry_over_units_in_cents")
181
+ count_holiday_as_workable: bool = Field(..., description="This setting flags if units taken during a bank holiday should be deducted or not from allowance.", alias="count_holiday_as_workable")
182
+ cycle_length: Optional[int] = Field(None, description="How many months does each allowance cycle last", alias="cycle_length")
183
+ cycle_start: Annotated[str, StringConstraints(pattern=r'^jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec|employee_hired_date$', strip_whitespace=True)] = Field(..., description="When does the cycle start.", alias="cycle_start")
184
+ days_type: Annotated[str, StringConstraints(pattern=r'^working_days|natural_days|natural_days_only_range|french_calendar_days|french_ouvres$', strip_whitespace=True)] = Field(..., description="Indicates if the allowance is based on working on calendar days.", alias="days_type")
185
+ expire_in_months: Optional[int] = Field(None, description="When does the carryover expire in months.", alias="expire_in_months")
186
+ frequency: Optional[Annotated[str, StringConstraints(pattern=r'^monthly_flexible|yearly|lifetime$', strip_whitespace=True)]] = Field(None, description="Defines duration of the allowance cycles. Can be "yearly", "monthly_flexible" or "lifetime"", alias="frequency")
187
+ holiday_allowance_in_cents: int = Field(..., description="Base amount of holiday allowance units multiplied by 100", alias="holiday_allowance_in_cents")
188
+ leave_type_ids: str = Field(..., description="An array of leave type ids associated with that allowance", alias="leave_type_ids")
189
+ maximum_amount_in_cents: Optional[int] = Field(None, description="Maximum the allowance can reach on accrued", alias="maximum_amount_in_cents")
190
+ name: str = Field(..., description="Allowance name set by the user", alias="name")
191
+ negative_counter_type: Annotated[str, StringConstraints(pattern=r'^negative_counter_disabled|negative_counter_enabled$', strip_whitespace=True)] = Field(..., description="Whether the allowance allows to request more days than available.", alias="negative_counter_type")
192
+ position: Optional[int] = Field(None, description="Indicates the position in the allowance when rendering them in UI", alias="position")
193
+ proration_type: Annotated[str, StringConstraints(pattern=r'^proration_enabled|proration_disabled$', strip_whitespace=True)] = Field(..., description="Whether the allowance has proration enabled or not.", alias="proration_type")
194
+ pto_proratio_enabled: bool = Field(..., description="Whether the allowance days are prorated or not", alias="pto_proratio_enabled")
195
+ range_type: Optional[Annotated[str, StringConstraints(pattern=r'^exact_range|extra_non_working_days_at_end$', strip_whitespace=True)]] = Field(None, description="Configures how leaves duration is handled.", alias="range_type")
196
+ rounding: Annotated[str, StringConstraints(pattern=r'^half_day|decimals|quarters|round_up$', strip_whitespace=True)] = Field(..., description="How the accrued units of the allowance are rounded. It depends if the allowance is set in hours or days.", alias="rounding")
197
+ source_units: Annotated[str, StringConstraints(pattern=r'^base_units|overtime_units|by_worked_time$', strip_whitespace=True)] = Field(..., description="This field configures the type of allowance (fixed balance, based on worked time)", alias="source_units")
198
+ tenure_period_transition: Optional[Annotated[str, StringConstraints(pattern=r'^beginning_of_cycle|end_of_cycle|after_milestone$', strip_whitespace=True)]] = Field(None, description="In case the allowance has tenure periods, when is this tenure applied.", alias="tenure_period_transition")
199
+ tenure_periods_enabled: Optional[bool] = Field(None, description="Whether the allowance has tenure periods enabled or not.", alias="tenure_periods_enabled")
200
+ tenure_periods: str = Field(..., description="The tenure periods associated with the allowance.", alias="tenure_periods")
201
+ timeoff_policy_id: int = Field(..., description="The Id of the policy to which the allowance belongs to", alias="timeoff_policy_id")
202
+ unlimited_accrued_hours: bool = Field(..., description="Flag to indicate if there is unlimited accrual.", alias="unlimited_accrued_hours")
203
+ unlimited_carry_over: bool = Field(..., description="Flag to indicate if there is unlimited carry over.", alias="unlimited_carry_over")
204
+ unlimited_carry_over_expiration: bool = Field(..., description="Boolean to flag if carryover does not expire", alias="unlimited_carry_over_expiration")
205
+ unlimited_holidays: bool = Field(..., description="Flag to indicate that the allowance has unlimited available days", alias="unlimited_holidays")
206
+
207
+ class AllowancesUpdate(BaseModel):
208
+ id: int = Field(..., description="ID", alias="id")
209
+ accrued_denominator_in_cents: Optional[int] = Field(None, description="Only for Allowances based on worked time. It represents how many units you need to work to be granted allowance units", alias="accrued_denominator_in_cents")
210
+ accrued_factor_in_cents: Optional[int] = Field(None, description="Only for Allowances based on worked time. It represents how many units you are given per unit of time worked", alias="accrued_factor_in_cents")
211
+ accrued_units_availability: Optional[Annotated[str, StringConstraints(pattern=r'^current_cycle|next_cycle$', strip_whitespace=True)]] = Field(None, description="When can the acrrued units be spent.", alias="accrued_units_availability")
212
+ allowance_type: Annotated[str, StringConstraints(pattern=r'^days|hours$', strip_whitespace=True)] = Field(..., description="Sets the allowance units. Can be "days" or "hours"", alias="allowance_type")
213
+ available_days: Annotated[str, StringConstraints(pattern=r'^all_days|generated_days|generated_days_monthly|generated_days_monthly_first_day|monthly_fifteenth|mensiversary|bimonthly_first_and_fifteenth|bimonthly_fifteenth_and_last$', strip_whitespace=True)] = Field(..., description="Indicates how the allowance units are accrued. For example all_days means all allowance days are given on the first day of the cycle.", alias="available_days")
214
+ carry_over_days: Optional[int] = Field(None, description="How many units can carry over between cycles", alias="carry_over_days")
215
+ carry_over_units_in_cents: Optional[int] = Field(None, description="How many units can carry over between cycles multiplied by 100", alias="carry_over_units_in_cents")
216
+ count_holiday_as_workable: bool = Field(..., description="This setting flags if units taken during a bank holiday should be deducted or not from allowance.", alias="count_holiday_as_workable")
217
+ cycle_length: Optional[int] = Field(None, description="How many months does each allowance cycle last", alias="cycle_length")
218
+ cycle_start: Optional[str] = Field(None, description="When does the cycle start.", alias="cycle_start")
219
+ days_type: Optional[Annotated[str, StringConstraints(pattern=r'^working_days|natural_days|natural_days_only_range|french_calendar_days|french_ouvres$', strip_whitespace=True)]] = Field(None, description="Indicates if the allowance is based on working on calendar days.", alias="days_type")
220
+ employee_carry_over_starting_year: Optional[int] = Field(None, description="When does the carryover start", alias="employee_carry_over_starting_year")
221
+ expire_in_months: Optional[int] = Field(None, description="When does the carryover expire in months.", alias="expire_in_months")
222
+ frequency: Optional[Annotated[str, StringConstraints(pattern=r'^monthly_flexible|yearly|lifetime$', strip_whitespace=True)]] = Field(None, description="Defines duration of the allowance cycles. Can be "yearly", "monthly_flexible" or "lifetime"", alias="frequency")
223
+ holiday_allowance_in_cents: Optional[int] = Field(None, description="Base amount of holiday allowance units multiplied by 100", alias="holiday_allowance_in_cents")
224
+ leave_type_ids: str = Field(..., description="An array of leave type ids associated with that allowance", alias="leave_type_ids")
225
+ maximum_amount_in_cents: Optional[int] = Field(None, description="Maximum the allowance can reach on accrued", alias="maximum_amount_in_cents")
226
+ name: str = Field(..., description="Allowance name set by the user", alias="name")
227
+ negative_counter_type: Optional[Annotated[str, StringConstraints(pattern=r'^negative_counter_disabled|negative_counter_enabled$', strip_whitespace=True)]] = Field(None, description="Whether the allowance allows to request more days than available", alias="negative_counter_type")
228
+ position: Optional[int] = Field(None, description="Indicates the position in the allowance when rendering them in UI", alias="position")
229
+ proration_type: Annotated[str, StringConstraints(pattern=r'^proration_enabled|proration_disabled$', strip_whitespace=True)] = Field(..., description="Whether the allowance has proration enabled or not.", alias="proration_type")
230
+ pto_proratio_enabled: Optional[bool] = Field(None, description="Whether the allowance days are prorrated or not", alias="pto_proratio_enabled")
231
+ range_type: Optional[Annotated[str, StringConstraints(pattern=r'^exact_range|extra_non_working_days_at_end$', strip_whitespace=True)]] = Field(None, description="Configures how leaves duration is handled.", alias="range_type")
232
+ rounding: Annotated[str, StringConstraints(pattern=r'^half_day|decimals|quarters|round_up$', strip_whitespace=True)] = Field(..., description="How the accrued units of the allowance are rounded. It depends if the allowance is set in hours or days.", alias="rounding")
233
+ send_notification: Optional[bool] = Field(None, description="", alias="send_notification")
234
+ source_units: Optional[Annotated[str, StringConstraints(pattern=r'^base_units|overtime_units|by_worked_time$', strip_whitespace=True)]] = Field(None, description="This field configures the type of allowance (fixed balance, based on worked time)", alias="source_units")
235
+ tenure_period_transition: Optional[Annotated[str, StringConstraints(pattern=r'^beginning_of_cycle|end_of_cycle|after_milestone$', strip_whitespace=True)]] = Field(None, description="In case the allowance has tenure periods, when is this tenure applied.", alias="tenure_period_transition")
236
+ tenure_periods: str = Field(..., description="The tenure periods associated with the allowance.", alias="tenure_periods")
237
+ tenure_periods_enabled: Optional[bool] = Field(None, description="Whether the allowance has tenure periods enabled or not.", alias="tenure_periods_enabled")
238
+ timeoff_cycle: str = Field(..., description="Value to indicate how the allowance cycle is configured. Its an abbreviation of the first and last month.", alias="timeoff_cycle")
239
+ timeoff_policy_id: int = Field(..., description="The Id of the policy to which the allowance belongs to", alias="timeoff_policy_id")
240
+ unlimited_accrued_hours: Optional[bool] = Field(None, description="Flag to indicate if there is unlimited accrual.", alias="unlimited_accrued_hours")
241
+ unlimited_carry_over: Optional[bool] = Field(None, description="Flag to indicate if there is unlimited carry over.", alias="unlimited_carry_over")
242
+ unlimited_carry_over_expiration: Optional[bool] = Field(None, description="Boolean to flag if carryover does not expire", alias="unlimited_carry_over_expiration")
243
+ unlimited_holidays: Optional[bool] = Field(None, description="Flag to indicate that the allowance has unlimited available days", alias="unlimited_holidays")
244
+
245
+ class AllowancesDelete(BaseModel):
246
+ id: int = Field(..., description="ID", alias="id")
247
+
248
+ class Blocked_periodsCreate(BaseModel):
249
+ company_id: int = Field(..., description="The company id", alias="company_id")
250
+ name: str = Field(..., description="Name of the blocked period.", alias="name")
251
+ leave_type_ids: str = Field(..., description="An array of leave type identifiers for which employees can not request timeoff", alias="leave_type_ids")
252
+
253
+ class Blocked_periodsUpdate(BaseModel):
254
+ id: int = Field(..., description="ID", alias="id")
255
+ company_id: int = Field(..., description="Company id of the blocked period", alias="company_id")
256
+ name: str = Field(..., description="Name of the blocked period.", alias="name")
257
+ leave_type_ids: str = Field(..., description="Leave types for which absence request has been blocked", alias="leave_type_ids")
258
+ time_periods: str = Field(..., description="The tenure periods associated with the allowance.", alias="time_periods")
259
+ strategy: str = Field(..., description="Type of access group", alias="strategy")
260
+ members: str = Field(..., description="Employees whose timeoff will be affected", alias="members")
261
+ location_ids: Optional[str] = Field(None, description="List of locations workplace identifiers where the employees are located", alias="location_ids")
262
+ team_ids: Optional[str] = Field(None, description="List of team identifiers which the selected employees belong to", alias="team_ids")
263
+ legal_entity_ids: Optional[str] = Field(None, description="List of legal entity identifiers which the selected employees belong to", alias="legal_entity_ids")
264
+
265
+ class Blocked_periodsDelete(BaseModel):
266
+ id: int = Field(..., description="ID", alias="id")
267
+
268
+ class Leave_typesCreate(BaseModel):
269
+ accrues: bool = Field(..., description="Whether the leave type accrues over time", alias="accrues")
270
+ approval_required: bool = Field(..., description="Whether approval is required for this leave type", alias="approval_required")
271
+ identifier: str = Field(..., description="A unique identifier for the leave type", alias="identifier")
272
+ attachment: Optional[bool] = Field(None, description="Whether an attachment is required for this leave type", alias="attachment")
273
+ color: str = Field(..., description="The color associated with this leave type", alias="color")
274
+ name: str = Field(..., description="The name of the leave type", alias="name")
275
+ visibility: Optional[bool] = Field(None, description="Whether the leave type is visible to employees", alias="visibility")
276
+ workable: bool = Field(..., description="Whether the leave type is workable (can be worked on during leave)", alias="workable")
277
+ payable: Optional[bool] = Field(None, description="Whether the leave type is payable", alias="payable")
278
+ is_attachment_mandatory: Optional[bool] = Field(None, description="Whether the attachment is mandatory", alias="is_attachment_mandatory")
279
+ half_days_units_enabled: Optional[bool] = Field(None, description="Whether half-day units are enabled for this leave type", alias="half_days_units_enabled")
280
+ max_days_in_cents: Optional[int] = Field(None, description="Maximum days in cents that can be taken", alias="max_days_in_cents")
281
+ min_days_in_cents: Optional[int] = Field(None, description="Minimum days in cents that must be taken", alias="min_days_in_cents")
282
+ company_id: int = Field(..., description="Identifier of the company associated with this leave type", alias="company_id")
283
+ editable: Optional[bool] = Field(None, description="Whether the leave type is editable", alias="editable")
284
+ allow_endless: Optional[bool] = Field(None, description="Whether endless leave is allowed", alias="allow_endless")
285
+ restricted: Optional[bool] = Field(None, description="Whether the leave type is restricted", alias="restricted")
286
+ description: Optional[str] = Field(None, description="Description of the leave type", alias="description")
287
+ details_required: bool = Field(..., description="Whether additional details are required for the leave type", alias="details_required")
288
+
289
+ class Leave_typesUpdate(BaseModel):
290
+ id: int = Field(..., description="ID", alias="id")
291
+ name: str = Field(..., description="Name of the leave type", alias="name")
292
+ translated_name: Optional[str] = Field(None, description="Translated name of the leave type, if available", alias="translated_name")
293
+ identifier: str = Field(..., description="Unique identifier of the leave type", alias="identifier")
294
+ color: str = Field(..., description="The color associated with this leave type", alias="color")
295
+ active: Optional[bool] = Field(None, description="Whether the leave type is active", alias="active")
296
+ editable: Optional[bool] = Field(None, description="Whether the leave type is editable", alias="editable")
297
+ approval_required: Optional[bool] = Field(None, description="Whether approval is required for this leave type", alias="approval_required")
298
+ accrues: Optional[bool] = Field(None, description="Whether the leave type accrues over time", alias="accrues")
299
+ attachment: bool = Field(..., description="Whether an attachment is required for this leave type", alias="attachment")
300
+ allow_endless: Optional[bool] = Field(None, description="Whether endless leave is allowed", alias="allow_endless")
301
+ restricted: Optional[bool] = Field(None, description="Whether the leave type is restricted", alias="restricted")
302
+ visibility: bool = Field(..., description="Whether the leave type is visible to employees", alias="visibility")
303
+ workable: bool = Field(..., description="Whether the leave type is workable", alias="workable")
304
+ payable: Optional[bool] = Field(None, description="Whether the leave type is payable", alias="payable")
305
+ company_id: int = Field(..., description="Identifier of the company associated with this leave type", alias="company_id")
306
+ is_attachment_mandatory: Optional[bool] = Field(None, description="Whether the attachment is mandatory", alias="is_attachment_mandatory")
307
+ allowance_ids: str = Field(..., description="List of allowance identifiers associated with this leave type", alias="allowance_ids")
308
+ half_days_units_enabled: Optional[bool] = Field(None, description="Whether half-day units are enabled for this leave type", alias="half_days_units_enabled")
309
+ max_days_in_cents: Optional[int] = Field(None, description="Maximum days in cents that can be taken", alias="max_days_in_cents")
310
+ min_days_in_cents: Optional[int] = Field(None, description="Minimum days in cents that must be taken", alias="min_days_in_cents")
311
+ description: Optional[str] = Field(None, description="Description of the leave type", alias="description")
312
+ details_required: bool = Field(..., description="Whether additional details are required for the leave type", alias="details_required")
313
+
314
+ class Leave_typesDelete(BaseModel):
315
+ id: int = Field(..., description="ID", alias="id")
316
+
317
+ class LeavesCreate(BaseModel):
318
+ employee_id: int = Field(..., description="The employee id of the leave", alias="employee_id")
319
+ leave_type_id: Optional[int] = Field(None, description="The leave type id", alias="leave_type_id")
320
+ description: Optional[str] = Field(None, description="The description of the leave", alias="description")
321
+ start_on: str = Field(..., description="The valid start date of the leave following the format YYYY-MM-DD", alias="start_on")
322
+ finish_on: Optional[str] = Field(None, description="The valid end date of the leave following the format YYYY-MM-DD", alias="finish_on")
323
+ half_day: Optional[str] = Field(None, description="If the leave is in: [beggining_of_day, end_of_day]", alias="half_day")
324
+ start_time: Optional[str] = Field(None, description="The start time of a leave", alias="start_time")
325
+ hours_amount_in_cents: Optional[int] = Field(None, description="The hours amount in cents of a leave", alias="hours_amount_in_cents")
326
+ medical_leave_type: Optional[int] = Field(None, description="The medical leave type", alias="medical_leave_type")
327
+ effective_on: Optional[str] = Field(None, description="The effective on date of a leave following the format YYYY-MM-DD", alias="effective_on")
328
+ medical_discharge_reason: Optional[str] = Field(None, description="The medical discharge reason of a leave", alias="medical_discharge_reason")
329
+ colegiate_number: Optional[int] = Field(None, description="The colegiate number of a leave", alias="colegiate_number")
330
+ has_previous_relapse: Optional[bool] = Field(None, description="If the leave has previous relapse", alias="has_previous_relapse")
331
+ relapse_leave_id: Optional[int] = Field(None, description="The leave relapse id", alias="relapse_leave_id")
332
+ relapse_on: Optional[str] = Field(None, description="The leave relapse on date following the format YYYY-MM-DD", alias="relapse_on")
333
+ accident_on: Optional[str] = Field(None, description="The leave accident on date following the format YYYY-MM-DD", alias="accident_on")
334
+ paternity_birth_on: Optional[str] = Field(None, description="The leave paternity birth on date following the format YYYY-MM-DD", alias="paternity_birth_on")
335
+
336
+ class LeavesUpdate(BaseModel):
337
+ id: int = Field(..., description="ID", alias="id")
338
+ company_id: int = Field(..., description="Company identifier of the employee of the leave", alias="company_id")
339
+ employee_id: int = Field(..., description="Employee identifier of the leave", alias="employee_id")
340
+ start_on: str = Field(..., description="The start date of the leave", alias="start_on")
341
+ finish_on: Optional[str] = Field(None, description="The end date of the leave", alias="finish_on")
342
+ half_day: Optional[str] = Field(None, description="Indicates if the leave is taken as a half-day", alias="half_day")
343
+ description: Optional[str] = Field(None, description="A description of the leave", alias="description")
344
+ reason: Optional[str] = Field(None, description="The reason provided by the employee for taking the leave", alias="reason")
345
+ leave_type_id: Optional[int] = Field(None, description="The identifier for the type of leave", alias="leave_type_id")
346
+ leave_type_name: Optional[str] = Field(None, description="The name of the leave type", alias="leave_type_name")
347
+ approved: Optional[bool] = Field(None, description="Indicates whether the leave has been approved", alias="approved")
348
+ employee_full_name: Optional[str] = Field(None, description="The full name of the employee taking the leave", alias="employee_full_name")
349
+ start_time: Optional[str] = Field(None, description="The start time of the leave", alias="start_time")
350
+ hours_amount_in_cents: Optional[int] = Field(None, description="The total number of hours taken for the leave, represented in cents", alias="hours_amount_in_cents")
351
+ updated_at: str = Field(..., description="The updated at date of the leave", alias="updated_at")
352
+ created_at: Optional[str] = Field(None, description="The created at date of the leave", alias="created_at")
353
+
354
+ class LeavesDelete(BaseModel):
355
+ id: int = Field(..., description="ID", alias="id")
356
+
357
+ class PoliciesCreate(BaseModel):
358
+ name: str = Field(..., description="The name of the policy.", alias="name")
359
+ main: Optional[bool] = Field(None, description="If the policy is the main policy.", alias="main")
360
+ description: Optional[str] = Field(None, description="Policy description.", alias="description")
361
+ company_id: Optional[int] = Field(None, description="Company ID.", alias="company_id")
362
+
363
+ class PoliciesUpdate(BaseModel):
364
+ id: int = Field(..., description="ID", alias="id")
365
+ name: str = Field(..., description="Policy name.", alias="name")
366
+ main: Optional[bool] = Field(None, description="Is the main policy? It will return true if it's the main policy if not it will return false.", alias="main")
367
+ company_id: int = Field(..., description="The company id.", alias="company_id")
368
+ description: Optional[str] = Field(None, description="The policy description.", alias="description")
369
+
370
+ class PoliciesDelete(BaseModel):
371
+ id: int = Field(..., description="ID", alias="id")
372
+
373
+ class Policy_assignmentsCreate(BaseModel):
374
+ timeoff_policy_id: int = Field(..., description="The time off policy id", alias="timeoff_policy_id")
375
+ employee_id: int = Field(..., description="The employee id", alias="employee_id")
376
+ effective_at: str = Field(..., description="The effective date of the policy assignment", alias="effective_at")
377
+
378
+ class Policy_assignmentsUpdate(BaseModel):
379
+ id: int = Field(..., description="ID", alias="id")
380
+ timeoff_policy_id: int = Field(..., description="The time off policy id", alias="timeoff_policy_id")
381
+ employee_id: int = Field(..., description="The employee id", alias="employee_id")
382
+ effective_at: str = Field(..., description="The effective date of the policy assignment", alias="effective_at")
383
+
384
+ class Policy_assignmentsDelete(BaseModel):
385
+ id: int = Field(..., description="ID", alias="id")
386
+