@factorialco/api-client 3.0.0-beta.2026100108 → 3.0.0-beta.2026100109

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.
@@ -1404,6 +1404,118 @@ export type CompensationsCycle = {
1404
1404
  */
1405
1405
  updated_at?: string;
1406
1406
  };
1407
+ export type CompensationsEmployeesCompensation = {
1408
+ /**
1409
+ * Employee compensation id
1410
+ */
1411
+ id: string;
1412
+ /**
1413
+ * Employee id (participant of the payroll run)
1414
+ */
1415
+ payroll_run_employee_id: string;
1416
+ /**
1417
+ * Payroll concept id
1418
+ */
1419
+ payroll_concept_id: string;
1420
+ /**
1421
+ * Parent payroll run id
1422
+ */
1423
+ payroll_run_id: string;
1424
+ /**
1425
+ * Amount strategy discriminator
1426
+ */
1427
+ amount_strategy_type: 'compensations_fixed_amount_strategy' | 'compensations_variable_amount_strategy' | 'compensations_per_worked_day_amount_strategy';
1428
+ /**
1429
+ * Amount strategy id
1430
+ */
1431
+ amount_strategy_id: string;
1432
+ /**
1433
+ * Manual override of the strategy-computed amount (nullable)
1434
+ */
1435
+ amount_overwritten?: number;
1436
+ /**
1437
+ * Whether the amount is a manual override
1438
+ */
1439
+ amount_is_overwritten: boolean;
1440
+ /**
1441
+ * Row projection type (always `compensation` on this endpoint)
1442
+ */
1443
+ result_type?: 'compensation' | 'payroll_result';
1444
+ /**
1445
+ * Source type discriminator (nullable — dashboard-created rows have no source)
1446
+ */
1447
+ source_type?: 'compensations_compensationpolicy' | 'timesettings_customtimerangecategory' | 'expenses_expensable' | 'expenses_expense' | 'expenses_mileage' | 'benefits_compensation' | 'salary_advance_request' | 'incentives_compensationplanrequest' | 'attendance_review';
1448
+ /**
1449
+ * Source id (nullable — dashboard-created rows have no source)
1450
+ */
1451
+ source_id?: string;
1452
+ /**
1453
+ * Employee id of the author (nullable)
1454
+ */
1455
+ created_by_employee_id?: string;
1456
+ /**
1457
+ * Employee id of the last updater (nullable)
1458
+ */
1459
+ last_updated_by_employee_id?: string;
1460
+ /**
1461
+ * Timestamp when the compensation record was created
1462
+ */
1463
+ created_at: string;
1464
+ /**
1465
+ * Timestamp when the compensation record was last updated
1466
+ */
1467
+ updated_at: string;
1468
+ };
1469
+ export type CompensationsPayrollResult = {
1470
+ /**
1471
+ * Payroll result id
1472
+ */
1473
+ id: string;
1474
+ /**
1475
+ * Parent payroll run id
1476
+ */
1477
+ payroll_run_id: string;
1478
+ /**
1479
+ * Employee id (participant of the payroll run)
1480
+ */
1481
+ payroll_run_employee_id: string;
1482
+ /**
1483
+ * Payroll concept id
1484
+ */
1485
+ payroll_concept_id: string;
1486
+ /**
1487
+ * Amount strategy discriminator
1488
+ */
1489
+ amount_strategy_type: 'compensations_fixed_amount_strategy' | 'compensations_variable_amount_strategy' | 'compensations_per_worked_day_amount_strategy';
1490
+ /**
1491
+ * Amount strategy id
1492
+ */
1493
+ amount_strategy_id: string;
1494
+ /**
1495
+ * Manual override of the strategy-computed amount (nullable)
1496
+ */
1497
+ amount_overwritten?: number;
1498
+ /**
1499
+ * Whether the amount is a manual override
1500
+ */
1501
+ amount_is_overwritten: boolean;
1502
+ /**
1503
+ * Source type discriminator (always present for payroll_result)
1504
+ */
1505
+ source_type: 'compensations_compensationpolicy' | 'timesettings_customtimerangecategory' | 'expenses_expensable' | 'expenses_expense' | 'expenses_mileage' | 'benefits_compensation' | 'salary_advance_request' | 'incentives_compensationplanrequest' | 'attendance_review';
1506
+ /**
1507
+ * Source id (always present for payroll_result)
1508
+ */
1509
+ source_id: string;
1510
+ /**
1511
+ * Timestamp when the payroll_result row was created
1512
+ */
1513
+ created_at: string;
1514
+ /**
1515
+ * Timestamp when the payroll_result row was last updated
1516
+ */
1517
+ updated_at: string;
1518
+ };
1407
1519
  export type CompensationsPayrollRun = {
1408
1520
  /**
1409
1521
  * Payroll run id
@@ -4342,7 +4454,7 @@ export type IntegrationsSyncableItem = {
4342
4454
  /**
4343
4455
  * Type of the syncable item
4344
4456
  */
4345
- syncable_type: 'compensations/compensation' | 'expenses/expense' | 'employee_updates/leave' | 'finance/vendor';
4457
+ syncable_type: 'compensations/compensation' | 'expenses/expense' | 'employee_updates/leave' | 'employee_updates/worked_time' | 'finance/vendor';
4346
4458
  };
4347
4459
  export type IntegrationsSyncableSyncRun = {
4348
4460
  /**
@@ -5796,9 +5908,9 @@ export type ProcurementPurchaseOrder = {
5796
5908
  */
5797
5909
  vendor_id?: string;
5798
5910
  /**
5799
- * Identifier of the purchase request that generated this purchase order
5911
+ * Identifier of the purchase request that generated this purchase order, if any. Externally-created purchase orders (e.g. synced from an ERP) have no purchase request.
5800
5912
  */
5801
- purchase_request_id: string;
5913
+ purchase_request_id?: string;
5802
5914
  /**
5803
5915
  * Identifier of the legal entity that owns this purchase order
5804
5916
  */
@@ -6228,6 +6340,59 @@ export type ProjectManagementProjectWorker = {
6228
6340
  */
6229
6341
  spending_cost_cents?: number;
6230
6342
  };
6343
+ export type ProjectManagementRate = {
6344
+ /**
6345
+ * The id of the rate
6346
+ */
6347
+ id: string;
6348
+ /**
6349
+ * The id of the company the rate belongs to
6350
+ */
6351
+ company_id: string;
6352
+ /**
6353
+ * The id of the project the rate belongs to
6354
+ */
6355
+ project_id?: string;
6356
+ quote_id?: string;
6357
+ reference_rate_id?: string;
6358
+ /**
6359
+ * The id of the resource the rate applies to. Together with resource_kind it forms the resource's composite identity.
6360
+ */
6361
+ resource_id: string;
6362
+ /**
6363
+ * The kind of resource the rate applies to. Together with resource_id it forms the resource's composite identity.
6364
+ */
6365
+ resource_kind: 'project_worker' | 'project' | 'employee' | 'job_catalog_tree_node';
6366
+ /**
6367
+ * The date from which the rate applies
6368
+ */
6369
+ starts_on: string;
6370
+ ends_on?: string;
6371
+ /**
6372
+ * The charging cost in cents
6373
+ */
6374
+ charging_cost_cents: number;
6375
+ /**
6376
+ * The billing rate in cents
6377
+ */
6378
+ billing_rate_cents: number;
6379
+ /**
6380
+ * The markup-on-cost percentage in cents (e.g. 3000 = 30%)
6381
+ */
6382
+ markup_percentage_cents: number;
6383
+ /**
6384
+ * Computed profit margin on price in cents = (billing - charging) / billing * 10000. Returns 0 when billing equals charging, and -10000 when billing is zero.
6385
+ */
6386
+ margin_percentage_cents: number;
6387
+ /**
6388
+ * The currency of the rate
6389
+ */
6390
+ currency: string;
6391
+ /**
6392
+ * Whether the rate is custom
6393
+ */
6394
+ unlinked: boolean;
6395
+ };
6231
6396
  export type ProjectManagementSubproject = {
6232
6397
  /**
6233
6398
  * The id of the subproject
@@ -9861,7 +10026,7 @@ export type PostApi20261001ResourcesAttendanceShiftsData = {
9861
10026
  /**
9862
10027
  * Source of the shift creation
9863
10028
  */
9864
- source?: 'desktop' | 'mobile' | 'face_recognition' | 'qr_code' | 'mobile_geolocation' | 'shared_device' | 'api' | 'system';
10029
+ source?: 'desktop' | 'mobile' | 'face_recognition' | 'qr_code' | 'mobile_geolocation' | 'shared_device' | 'api' | 'system' | 'one_assistant';
9865
10030
  /**
9866
10031
  * Id of the break configuration
9867
10032
  */
@@ -10860,6 +11025,116 @@ export type GetApi20261001ResourcesCompensationsCyclesByIdResponses = {
10860
11025
  200: CompensationsCycle;
10861
11026
  };
10862
11027
  export type GetApi20261001ResourcesCompensationsCyclesByIdResponse = GetApi20261001ResourcesCompensationsCyclesByIdResponses[keyof GetApi20261001ResourcesCompensationsCyclesByIdResponses];
11028
+ export type GetApi20261001ResourcesCompensationsEmployeesCompensationsData = {
11029
+ body?: never;
11030
+ path?: never;
11031
+ query?: {
11032
+ /**
11033
+ * Employee compensation ids
11034
+ */
11035
+ 'ids[]'?: Array<string>;
11036
+ /**
11037
+ * Filter by payroll run ids, refers to compensations/payroll_runs endpoint.
11038
+ */
11039
+ 'payroll_run_ids[]'?: Array<string>;
11040
+ /**
11041
+ * Filter by parent cycle ids, refers to compensations/cycles endpoint.
11042
+ */
11043
+ 'cycle_ids[]'?: Array<string>;
11044
+ /**
11045
+ * Filter by employee ids (participants of the payroll run)
11046
+ */
11047
+ 'payroll_run_employee_ids[]'?: Array<string>;
11048
+ /**
11049
+ * Filter by payroll concept ids, refers to compensations/concepts endpoint.
11050
+ */
11051
+ 'payroll_concept_ids[]'?: Array<string>;
11052
+ };
11053
+ url: '/api/2026-10-01/resources/compensations/employees_compensations';
11054
+ };
11055
+ export type GetApi20261001ResourcesCompensationsEmployeesCompensationsResponses = {
11056
+ /**
11057
+ * OK
11058
+ */
11059
+ 200: {
11060
+ data?: Array<CompensationsEmployeesCompensation>;
11061
+ meta?: PagedIndexMeta;
11062
+ };
11063
+ };
11064
+ export type GetApi20261001ResourcesCompensationsEmployeesCompensationsResponse = GetApi20261001ResourcesCompensationsEmployeesCompensationsResponses[keyof GetApi20261001ResourcesCompensationsEmployeesCompensationsResponses];
11065
+ export type GetApi20261001ResourcesCompensationsEmployeesCompensationsByIdData = {
11066
+ body?: never;
11067
+ path: {
11068
+ /**
11069
+ * Employee compensation ids
11070
+ */
11071
+ id: string;
11072
+ };
11073
+ query?: never;
11074
+ url: '/api/2026-10-01/resources/compensations/employees_compensations/{id}';
11075
+ };
11076
+ export type GetApi20261001ResourcesCompensationsEmployeesCompensationsByIdResponses = {
11077
+ /**
11078
+ * OK
11079
+ */
11080
+ 200: CompensationsEmployeesCompensation;
11081
+ };
11082
+ export type GetApi20261001ResourcesCompensationsEmployeesCompensationsByIdResponse = GetApi20261001ResourcesCompensationsEmployeesCompensationsByIdResponses[keyof GetApi20261001ResourcesCompensationsEmployeesCompensationsByIdResponses];
11083
+ export type GetApi20261001ResourcesCompensationsPayrollResultsData = {
11084
+ body?: never;
11085
+ path?: never;
11086
+ query?: {
11087
+ /**
11088
+ * Payroll result ids
11089
+ */
11090
+ 'ids[]'?: Array<string>;
11091
+ /**
11092
+ * Filter by payroll run ids, refers to compensations/payroll_runs endpoint.
11093
+ */
11094
+ 'payroll_run_ids[]'?: Array<string>;
11095
+ /**
11096
+ * Filter by parent cycle ids, refers to compensations/cycles endpoint.
11097
+ */
11098
+ 'cycle_ids[]'?: Array<string>;
11099
+ /**
11100
+ * Filter by employee ids (participants of the payroll run)
11101
+ */
11102
+ 'payroll_run_employee_ids[]'?: Array<string>;
11103
+ /**
11104
+ * Filter by payroll concept ids, refers to compensations/concepts endpoint.
11105
+ */
11106
+ 'payroll_concept_ids[]'?: Array<string>;
11107
+ };
11108
+ url: '/api/2026-10-01/resources/compensations/payroll_results';
11109
+ };
11110
+ export type GetApi20261001ResourcesCompensationsPayrollResultsResponses = {
11111
+ /**
11112
+ * OK
11113
+ */
11114
+ 200: {
11115
+ data?: Array<CompensationsPayrollResult>;
11116
+ meta?: PagedIndexMeta;
11117
+ };
11118
+ };
11119
+ export type GetApi20261001ResourcesCompensationsPayrollResultsResponse = GetApi20261001ResourcesCompensationsPayrollResultsResponses[keyof GetApi20261001ResourcesCompensationsPayrollResultsResponses];
11120
+ export type GetApi20261001ResourcesCompensationsPayrollResultsByIdData = {
11121
+ body?: never;
11122
+ path: {
11123
+ /**
11124
+ * Payroll result ids
11125
+ */
11126
+ id: string;
11127
+ };
11128
+ query?: never;
11129
+ url: '/api/2026-10-01/resources/compensations/payroll_results/{id}';
11130
+ };
11131
+ export type GetApi20261001ResourcesCompensationsPayrollResultsByIdResponses = {
11132
+ /**
11133
+ * OK
11134
+ */
11135
+ 200: CompensationsPayrollResult;
11136
+ };
11137
+ export type GetApi20261001ResourcesCompensationsPayrollResultsByIdResponse = GetApi20261001ResourcesCompensationsPayrollResultsByIdResponses[keyof GetApi20261001ResourcesCompensationsPayrollResultsByIdResponses];
10863
11138
  export type GetApi20261001ResourcesCompensationsPayrollRunsData = {
10864
11139
  body?: never;
10865
11140
  path?: never;
@@ -20169,6 +20444,97 @@ export type PostApi20261001ResourcesProjectManagementProjectWorkersUnassignRespo
20169
20444
  200: ProjectManagementProjectWorker;
20170
20445
  };
20171
20446
  export type PostApi20261001ResourcesProjectManagementProjectWorkersUnassignResponse = PostApi20261001ResourcesProjectManagementProjectWorkersUnassignResponses[keyof PostApi20261001ResourcesProjectManagementProjectWorkersUnassignResponses];
20447
+ export type GetApi20261001ResourcesProjectManagementRatesData = {
20448
+ body?: never;
20449
+ path?: never;
20450
+ query: {
20451
+ /**
20452
+ * Filter rates by IDs
20453
+ */
20454
+ 'ids[]': Array<string>;
20455
+ /**
20456
+ * Filter rates by company ID
20457
+ */
20458
+ company_id: string;
20459
+ /**
20460
+ * Filter rates by project ID
20461
+ */
20462
+ project_id: string;
20463
+ /**
20464
+ * Filter rates by canonical resource identity (numeric id or tree node uuid)
20465
+ */
20466
+ 'resource_ids[]': Array<string>;
20467
+ /**
20468
+ * Filter rates by the kind of resource they apply to.
20469
+ */
20470
+ resource_kind: 'project_worker' | 'project' | 'employee' | 'job_catalog_tree_node';
20471
+ /**
20472
+ * Filter rates by reference rate ID
20473
+ */
20474
+ reference_rate_id: string;
20475
+ /**
20476
+ * Filter rates by job catalog role or level name
20477
+ */
20478
+ role_or_level: string;
20479
+ /**
20480
+ * Filter rates by employee name
20481
+ */
20482
+ employee_name: string;
20483
+ /**
20484
+ * Filter rates by quote ID
20485
+ */
20486
+ quote_id: string;
20487
+ /**
20488
+ * If true, retrieve only currently active rates.
20489
+ */
20490
+ only_active: boolean;
20491
+ /**
20492
+ * If true, retrieve only rates that are not linked to a project.
20493
+ */
20494
+ without_project: boolean;
20495
+ /**
20496
+ * If true, retrieve only rates that are not linked to a quote.
20497
+ */
20498
+ without_quote: boolean;
20499
+ /**
20500
+ * Filter rates by record type
20501
+ */
20502
+ record_type: string;
20503
+ /**
20504
+ * Filter rates by reference rate IDs
20505
+ */
20506
+ 'reference_rate_ids[]': Array<string>;
20507
+ };
20508
+ url: '/api/2026-10-01/resources/project_management/rates';
20509
+ };
20510
+ export type GetApi20261001ResourcesProjectManagementRatesResponses = {
20511
+ /**
20512
+ * OK
20513
+ */
20514
+ 200: {
20515
+ data?: Array<ProjectManagementRate>;
20516
+ meta?: PagedIndexMeta;
20517
+ };
20518
+ };
20519
+ export type GetApi20261001ResourcesProjectManagementRatesResponse = GetApi20261001ResourcesProjectManagementRatesResponses[keyof GetApi20261001ResourcesProjectManagementRatesResponses];
20520
+ export type GetApi20261001ResourcesProjectManagementRatesByIdData = {
20521
+ body?: never;
20522
+ path: {
20523
+ /**
20524
+ * Filter rates by IDs
20525
+ */
20526
+ id: string;
20527
+ };
20528
+ query?: never;
20529
+ url: '/api/2026-10-01/resources/project_management/rates/{id}';
20530
+ };
20531
+ export type GetApi20261001ResourcesProjectManagementRatesByIdResponses = {
20532
+ /**
20533
+ * OK
20534
+ */
20535
+ 200: ProjectManagementRate;
20536
+ };
20537
+ export type GetApi20261001ResourcesProjectManagementRatesByIdResponse = GetApi20261001ResourcesProjectManagementRatesByIdResponses[keyof GetApi20261001ResourcesProjectManagementRatesByIdResponses];
20172
20538
  export type GetApi20261001ResourcesProjectManagementSubprojectsData = {
20173
20539
  body?: never;
20174
20540
  path?: never;