@factorialco/api-client 3.0.0-beta.2026100135 → 3.0.0-beta.2026100136

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.
@@ -2368,6 +2368,238 @@ export type ContractsGermanContractType = {
2368
2368
  */
2369
2369
  name: string;
2370
2370
  };
2371
+ export type ContractsContractFlow = {
2372
+ /**
2373
+ * identifier of the contract version created by the change. Refers to the /contracts/contract_versions endpoint.
2374
+ */
2375
+ contract_version_id: string;
2376
+ /**
2377
+ * identifier of the contract opened by the change, under the target legal entity. Refers to the /contracts/contracts endpoint.
2378
+ */
2379
+ contracts_contract_id?: string;
2380
+ /**
2381
+ * employee identifier, refers to /employees/employees endpoint.
2382
+ */
2383
+ employee_id: string;
2384
+ /**
2385
+ * the day the new contract version takes effect. The employee moves to the target legal entity on this date.
2386
+ */
2387
+ effective_on: string;
2388
+ /**
2389
+ * ISO country code the new contract is governed by, taken from the target legal entity.
2390
+ */
2391
+ country?: string;
2392
+ /**
2393
+ * job title of the employee.
2394
+ */
2395
+ job_title?: string;
2396
+ /**
2397
+ * job catalog level identifier, refers to /job_catalog/levels endpoint.
2398
+ */
2399
+ job_catalog_level_id?: string;
2400
+ /**
2401
+ * the uuid node in the job catalog tree. For now it only supports level nodes. From this point in the job catalog tree you can get the full ancestor path to the root node including the role. Refer to job_catalog/tree_nodes endpoint.
2402
+ */
2403
+ job_catalog_tree_node_uuid?: string;
2404
+ /**
2405
+ * the day the new contract starts. Defaults to effective_on.
2406
+ */
2407
+ starts_on?: string;
2408
+ /**
2409
+ * the day the employee is terminated. It has nothing to do with trial period, these are concepts totally unrelated.
2410
+ */
2411
+ ends_on?: string;
2412
+ /**
2413
+ * boolean that indicates if the employee asociated to this contract belongs to a payroll policy.
2414
+ */
2415
+ has_payroll: boolean;
2416
+ /**
2417
+ * a flag that indicates if the contract version has ever had a trial period.
2418
+ */
2419
+ has_trial_period?: boolean;
2420
+ /**
2421
+ * when the trial period ends. If there is no date, it means that the employee has never been in trial. This date is not related with the end date of a contract.
2422
+ */
2423
+ trial_period_ends_on?: string;
2424
+ /**
2425
+ * the amount of money the employee earns in cents.
2426
+ */
2427
+ salary_amount?: number;
2428
+ /**
2429
+ * the frequency of the salary payment.
2430
+ */
2431
+ salary_frequency?: string;
2432
+ /**
2433
+ * the days of the week the employee works.
2434
+ */
2435
+ working_week_days?: string;
2436
+ /**
2437
+ * the amount of hours the employee works.
2438
+ */
2439
+ working_hours?: number;
2440
+ /**
2441
+ * the frequency of the working hours.
2442
+ */
2443
+ working_hours_frequency?: string;
2444
+ /**
2445
+ * the maximum amount of hours the employee can work in a year.
2446
+ */
2447
+ max_legal_yearly_hours?: number;
2448
+ /**
2449
+ * the maximum amount of hours the employee can work in a week.
2450
+ */
2451
+ maximum_weekly_hours?: number;
2452
+ /**
2453
+ * Defines whether a bank holiday should be considered as a workable or non-workable day.
2454
+ */
2455
+ bank_holiday_treatment: 'workable' | 'non_workable';
2456
+ /**
2457
+ * Working time percentage in cents (e.g., when an employee is working part-time, the percentage of full-time hours they are working).
2458
+ */
2459
+ working_time_percentage_in_cents?: number;
2460
+ /**
2461
+ * Allows companies to define how annual working hours are spread across the year to ensure compliance with legal limits.
2462
+ */
2463
+ annual_working_time_distribution?: 'limit_workdays' | 'limit_daily_hours';
2464
+ /**
2465
+ * the minimum amount of minutes the employee must rest between working periods.
2466
+ */
2467
+ min_rest_minutes_between_days?: number;
2468
+ /**
2469
+ * the maximum amount of minutes the employee can work in a day.
2470
+ */
2471
+ max_work_minutes_per_day?: number;
2472
+ /**
2473
+ * the maximum amount of days the employee can work in a row.
2474
+ */
2475
+ max_work_days_in_row?: number;
2476
+ /**
2477
+ * the minimum amount of hours the employee must rest in a row.
2478
+ */
2479
+ min_rest_hours_in_row?: number;
2480
+ /**
2481
+ * the date the contract version was created.
2482
+ */
2483
+ created_at: string;
2484
+ /**
2485
+ * the date of the last contract version update.
2486
+ */
2487
+ updated_at: string;
2488
+ /**
2489
+ * Country-specific contract data, resolved against the target legal entity's template rather than the employee's current one.
2490
+ */
2491
+ version_data?: {
2492
+ country_data?: {
2493
+ /**
2494
+ * Country code (e.g. es, fr, de, pt).
2495
+ */
2496
+ country: string;
2497
+ fields: Array<{
2498
+ name: string;
2499
+ field_name: string;
2500
+ value_label?: string;
2501
+ value_id: string;
2502
+ }>;
2503
+ /**
2504
+ * Identifiers of the materialized_template_fragment records that produced this country data. After a legal entity change they are the target legal entity's fragments.
2505
+ *
2506
+ */
2507
+ template_fragments: {
2508
+ company_fragment_id?: string;
2509
+ country_fragment_id?: string;
2510
+ legal_entity_fragment_id?: string;
2511
+ };
2512
+ };
2513
+ };
2514
+ /**
2515
+ * flag that indicates if the contract has teleworking.
2516
+ */
2517
+ es_has_teleworking_contract?: boolean;
2518
+ /**
2519
+ * the group of cotization of the employee.
2520
+ */
2521
+ contracts_es_tariff_group_id?: string;
2522
+ /**
2523
+ * the group of cotization of the employee.
2524
+ */
2525
+ es_cotization_group?: number;
2526
+ /**
2527
+ * observations of the contract.
2528
+ */
2529
+ es_contract_observations?: string;
2530
+ /**
2531
+ * the job description of the employee.
2532
+ */
2533
+ es_job_description?: string;
2534
+ /**
2535
+ * contract type identifier.
2536
+ */
2537
+ es_contract_type_id?: string;
2538
+ /**
2539
+ * working day type identifier.
2540
+ */
2541
+ es_working_day_type_id?: string;
2542
+ /**
2543
+ * education level identifier.
2544
+ */
2545
+ es_education_level_id?: string;
2546
+ /**
2547
+ * professional category identifier.
2548
+ */
2549
+ es_professional_category_id?: string;
2550
+ /**
2551
+ * employee type.
2552
+ */
2553
+ fr_employee_type?: string;
2554
+ /**
2555
+ * flag that indicates if the employee is allowed to work within the framework of a fixed number of days.
2556
+ */
2557
+ fr_forfait_jours: boolean;
2558
+ /**
2559
+ * the number of days the employee is allowed to work.
2560
+ */
2561
+ fr_jours_par_an?: number;
2562
+ /**
2563
+ * coefficient for france contracts.
2564
+ */
2565
+ fr_coefficient?: string;
2566
+ /**
2567
+ * contract type identifier.
2568
+ */
2569
+ fr_contract_type_id?: string;
2570
+ /**
2571
+ * level identifier.
2572
+ */
2573
+ fr_level_id?: string;
2574
+ /**
2575
+ * step identifier.
2576
+ */
2577
+ fr_step_id?: string;
2578
+ /**
2579
+ * mutual identifier.
2580
+ */
2581
+ fr_mutual_id?: string;
2582
+ /**
2583
+ * professional category identifier.
2584
+ */
2585
+ fr_professional_category_id?: string;
2586
+ /**
2587
+ * work type identifier.
2588
+ */
2589
+ fr_work_type_id?: string;
2590
+ /**
2591
+ * contract type identifier.
2592
+ */
2593
+ de_contract_type_id?: string;
2594
+ /**
2595
+ * Identifier for the German base salary type. References a payroll concept available via the /payroll/concepts endpoint.
2596
+ */
2597
+ de_base_salary_type_id?: string;
2598
+ /**
2599
+ * contract type identifier.
2600
+ */
2601
+ pt_contract_type_id?: string;
2602
+ };
2371
2603
  export type ContractsMaterializedTemplate = {
2372
2604
  /**
2373
2605
  * Synthetic identifier for this materialized template, composed as {company_id}-{template_type}-{legal_entity_id}-{country_code}. Used as a stable cursor reference for pagination.
@@ -4897,7 +5129,7 @@ export type IntegrationsSyncableItem = {
4897
5129
  /**
4898
5130
  * Type of the syncable item
4899
5131
  */
4900
- syncable_type: 'compensations/compensation' | 'expenses/expense' | 'employee_updates/leave' | 'employee_updates/new_hire' | 'employee_updates/termination' | 'employee_updates/worked_time' | 'finance/vendor';
5132
+ syncable_type: 'compensations/compensation' | 'expenses/expense' | 'employee_updates/contract_change' | 'employee_updates/leave' | 'employee_updates/new_hire' | 'employee_updates/personal_change_id' | 'employee_updates/personal_change_name' | 'employee_updates/personal_change_irpf' | 'employee_updates/personal_change_bank' | 'employee_updates/personal_change_gender' | 'employee_updates/personal_change_health_insurance' | 'employee_updates/personal_change_address' | 'employee_updates/personal_change_residence' | 'employee_updates/personal_change_workplace' | 'employee_updates/personal_change_nationality' | 'employee_updates/personal_change_email' | 'employee_updates/personal_change_phone_number' | 'employee_updates/personal_change_permits_and_certificates' | 'employee_updates/personal_change_taxes_and_deductions' | 'employee_updates/personal_change_work_activity' | 'employee_updates/personal_change_birth_name' | 'employee_updates/personal_change_academic_title' | 'employee_updates/personal_change_country_of_birth' | 'employee_updates/personal_change_place_of_birth' | 'employee_updates/termination' | 'employee_updates/worked_time' | 'finance/vendor';
4901
5133
  };
4902
5134
  export type IntegrationsSyncableState = {
4903
5135
  /**
@@ -5550,6 +5782,18 @@ export type PayrollEmployeesGermanEmployeeDatum = {
5550
5782
  * Identifier of the employee
5551
5783
  */
5552
5784
  employee_id: string;
5785
+ /**
5786
+ * Birth name of the employee, if different from the current surname
5787
+ */
5788
+ birth_name?: string;
5789
+ /**
5790
+ * Country of birth of the employee, as a DATEV nationality key
5791
+ */
5792
+ country_of_birth?: string;
5793
+ /**
5794
+ * Place of birth (city) of the employee
5795
+ */
5796
+ place_of_birth?: string;
5553
5797
  /**
5554
5798
  * Expiration date of the employee's work permit
5555
5799
  */
@@ -13513,6 +13757,125 @@ export type GetApi20261001ResourcesContractsGermanContractTypesByIdResponses = {
13513
13757
  200: ContractsGermanContractType;
13514
13758
  };
13515
13759
  export type GetApi20261001ResourcesContractsGermanContractTypesByIdResponse = GetApi20261001ResourcesContractsGermanContractTypesByIdResponses[keyof GetApi20261001ResourcesContractsGermanContractTypesByIdResponses];
13760
+ export type PostApi20261001ResourcesContractsLegalEntityChangesData = {
13761
+ body?: {
13762
+ /**
13763
+ * The legal entity the employee is moving to. A new contract and contract version are created under this legal entity.
13764
+ */
13765
+ target_legal_entity_id: string;
13766
+ /**
13767
+ * The terms of the contract version that opens the new contract. Same fields as the contract version create endpoint.
13768
+ */
13769
+ contract_details: {
13770
+ /**
13771
+ * the day the new contract version takes effect. The employee moves to the target legal entity on this date.
13772
+ */
13773
+ effective_on: string;
13774
+ /**
13775
+ * employee identifier, refers to /employees/employees endpoint.
13776
+ */
13777
+ employee_id: string;
13778
+ /**
13779
+ * the day the employee is terminated.
13780
+ */
13781
+ ends_on?: string;
13782
+ /**
13783
+ * a flag that indicates if the employee has a trial period.
13784
+ */
13785
+ has_trial_period?: boolean;
13786
+ /**
13787
+ * the uuid node in the job catalog tree. For now it only supports level nodes. Refer to job_catalog/tree_nodes endpoint.
13788
+ */
13789
+ job_catalog_tree_node_uuid?: string;
13790
+ /**
13791
+ * job title of the employee.
13792
+ */
13793
+ job_title?: string;
13794
+ /**
13795
+ * the amount of money the employee earns in cents. When adding a salary to a contract that previously had none, both salary_amount and salary_frequency must be provided together.
13796
+ */
13797
+ salary_amount?: number;
13798
+ /**
13799
+ * the frequency of the salary payment. When adding a salary to a contract that previously had none, both salary_amount and salary_frequency must be provided together.
13800
+ */
13801
+ salary_frequency?: string;
13802
+ /**
13803
+ * when the trial period ends.
13804
+ */
13805
+ trial_period_ends_on?: string;
13806
+ /**
13807
+ * the amount of hours the employee works.
13808
+ */
13809
+ working_hours?: number;
13810
+ /**
13811
+ * the frequency of the working hours.
13812
+ */
13813
+ working_hours_frequency?: string;
13814
+ /**
13815
+ * the days of the week the employee works.
13816
+ */
13817
+ working_week_days?: string;
13818
+ /**
13819
+ * the maximum amount of hours the employee can work in a year.
13820
+ */
13821
+ max_legal_yearly_hours?: number;
13822
+ /**
13823
+ * the maximum amount of hours the employee can work in a week.
13824
+ */
13825
+ maximum_weekly_hours?: number;
13826
+ /**
13827
+ * Defines whether a bank holiday should be considered as a workable or non-workable day.
13828
+ */
13829
+ bank_holiday_treatment?: 'workable' | 'non_workable';
13830
+ /**
13831
+ * Working time percentage in cents (e.g., when an employee is working part-time, the percentage of full-time hours they are working).
13832
+ */
13833
+ working_time_percentage_in_cents?: number;
13834
+ /**
13835
+ * Allows companies to define how annual working hours are spread across the year to ensure compliance with legal limits.
13836
+ */
13837
+ annual_working_time_distribution?: 'limit_workdays' | 'limit_daily_hours';
13838
+ /**
13839
+ * Identifier for the German base salary type. References a payroll concept available via the /payroll/concepts endpoint.
13840
+ */
13841
+ de_base_salary_type_id?: string;
13842
+ /**
13843
+ * List of country-specific field inputs (e.g. contract_type) for the new version. They are validated against the TARGET legal entity's template: discover valid field_name/value_id combinations via GET /resources/contracts/materialized_templates.
13844
+ *
13845
+ */
13846
+ country_data_inputs?: Array<{
13847
+ /**
13848
+ * The templated field to set (e.g. contract_type).
13849
+ */
13850
+ field_name: string;
13851
+ /**
13852
+ * The id of the option to assign to the field.
13853
+ */
13854
+ value_id: string;
13855
+ /**
13856
+ * Only used when the option was sourced from an installed payroll integration (e.g. A3innuva). Leave unset for regular field inputs.
13857
+ *
13858
+ */
13859
+ integration_source?: string;
13860
+ /**
13861
+ * Only used together with integration_source, to label an option that does not yet exist locally. Leave unset for regular field inputs.
13862
+ *
13863
+ */
13864
+ label?: string;
13865
+ }>;
13866
+ };
13867
+ };
13868
+ path?: never;
13869
+ query?: never;
13870
+ url: '/api/2026-10-01/resources/contracts/legal_entity_changes';
13871
+ };
13872
+ export type PostApi20261001ResourcesContractsLegalEntityChangesResponses = {
13873
+ /**
13874
+ * CREATED
13875
+ */
13876
+ 201: ContractsContractFlow;
13877
+ };
13878
+ export type PostApi20261001ResourcesContractsLegalEntityChangesResponse = PostApi20261001ResourcesContractsLegalEntityChangesResponses[keyof PostApi20261001ResourcesContractsLegalEntityChangesResponses];
13516
13879
  export type GetApi20261001ResourcesContractsMaterializedTemplatesData = {
13517
13880
  body?: never;
13518
13881
  path?: never;
@@ -17806,7 +18169,7 @@ export type PostApi20261001ResourcesIntegrationsSyncableSyncRunsBulkUpsertData =
17806
18169
  /**
17807
18170
  * The Factorial resource type this item maps to. Same values returned by GET /syncable_items.
17808
18171
  */
17809
- syncable_type: 'compensations/compensation' | 'expenses/expense' | 'employee_updates/leave' | 'employee_updates/new_hire' | 'employee_updates/termination' | 'employee_updates/worked_time' | 'finance/vendor';
18172
+ syncable_type: 'compensations/compensation' | 'expenses/expense' | 'employee_updates/contract_change' | 'employee_updates/leave' | 'employee_updates/new_hire' | 'employee_updates/personal_change_id' | 'employee_updates/personal_change_name' | 'employee_updates/personal_change_irpf' | 'employee_updates/personal_change_bank' | 'employee_updates/personal_change_gender' | 'employee_updates/personal_change_health_insurance' | 'employee_updates/personal_change_address' | 'employee_updates/personal_change_residence' | 'employee_updates/personal_change_workplace' | 'employee_updates/personal_change_nationality' | 'employee_updates/personal_change_email' | 'employee_updates/personal_change_phone_number' | 'employee_updates/personal_change_permits_and_certificates' | 'employee_updates/personal_change_taxes_and_deductions' | 'employee_updates/personal_change_work_activity' | 'employee_updates/personal_change_birth_name' | 'employee_updates/personal_change_academic_title' | 'employee_updates/personal_change_country_of_birth' | 'employee_updates/personal_change_place_of_birth' | 'employee_updates/termination' | 'employee_updates/worked_time' | 'finance/vendor';
17810
18173
  /**
17811
18174
  * Outcome of processing the item
17812
18175
  */
@@ -19045,6 +19408,18 @@ export type PostApi20261001ResourcesPayrollEmployeesGermanEmployeeDataData = {
19045
19408
  * Identifier of the employee
19046
19409
  */
19047
19410
  employee_id: string;
19411
+ /**
19412
+ * Birth name of the employee, if different from the current surname
19413
+ */
19414
+ birth_name?: string;
19415
+ /**
19416
+ * Country of birth of the employee, as a DATEV nationality key
19417
+ */
19418
+ country_of_birth?: string;
19419
+ /**
19420
+ * Place of birth (city) of the employee
19421
+ */
19422
+ place_of_birth?: string;
19048
19423
  /**
19049
19424
  * Expiration date of the employee's work permit
19050
19425
  */
@@ -19161,6 +19536,18 @@ export type PutApi20261001ResourcesPayrollEmployeesGermanEmployeeDataByIdData =
19161
19536
  * Identifier of the German employee data record
19162
19537
  */
19163
19538
  id: string;
19539
+ /**
19540
+ * Birth name of the employee, if different from the current surname
19541
+ */
19542
+ birth_name?: string;
19543
+ /**
19544
+ * Country of birth of the employee, as a DATEV nationality key
19545
+ */
19546
+ country_of_birth?: string;
19547
+ /**
19548
+ * Place of birth (city) of the employee
19549
+ */
19550
+ place_of_birth?: string;
19164
19551
  /**
19165
19552
  * Expiration date of the employee's work permit
19166
19553
  */