@factorialco/api-client 4.0.0-beta.2027010101 → 4.0.0-beta.2027010103

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.
@@ -1394,6 +1394,8 @@ export const getApi20270101ResourcesCompensationsPayrollResultsById = (options)
1394
1394
  * when the run's cycle is limited to a people group, they must belong to it. Off-cycle
1395
1395
  * runs only apply the people group and a 365-day termination window. The error lists
1396
1396
  * these employees in `errors.employee_ids`, so they can be removed and the rest resent.
1397
+ * From API version 2027-01-01, compensations/payroll_run_participants returns the
1398
+ * employees of a regular run that are accepted, so they can be checked beforehand.
1397
1399
  * - a concept is a base salary concept or is disabled
1398
1400
  * - an employee entry does not include the company's net_pay concept (find its id with
1399
1401
  * compensations/concepts)
@@ -1454,6 +1456,30 @@ export const getApi20270101ResourcesCompensationsPayrollRunEmployeesCompensation
1454
1456
  url: '/api/2027-01-01/resources/compensations/payroll_run_employees_compensations/{id}',
1455
1457
  ...options
1456
1458
  });
1459
+ /**
1460
+ * Reads all Payroll run participants
1461
+ *
1462
+ * Returns the participants of each regular payroll run: the employees whose payroll results
1463
+ * compensations/payroll_results bulk_create accepts. Use it before an import to send results
1464
+ * only for these employees.
1465
+ *
1466
+ * Off-cycle runs (any payment_type other than regular, see compensations/payroll_runs) are
1467
+ * rejected. They have no fixed population: most of the company's employees are likely to be
1468
+ * valid for one, so a list from this endpoint would not provide much value when trying to
1469
+ * know who an off-cycle payment is for. Knowing which employees to sync is a task the
1470
+ * integration developer should be responsible for: post them directly to bulk_create, whose
1471
+ * employee checks always act as a guardrail and reject any employee who isn't valid for the
1472
+ * run.
1473
+ *
1474
+ * The list is not paginated: every participant is returned in one response. It only
1475
+ * includes employees the caller is allowed to see.
1476
+ *
1477
+ */
1478
+ export const getApi20270101ResourcesCompensationsPayrollRunParticipants = (options) => (options.client ?? client).get({
1479
+ security: [{ scheme: 'bearer', type: 'http' }, { name: 'x-api-key', type: 'apiKey' }],
1480
+ url: '/api/2027-01-01/resources/compensations/payroll_run_participants',
1481
+ ...options
1482
+ });
1457
1483
  /**
1458
1484
  * Reads all Compensations
1459
1485
  *
@@ -6365,6 +6391,48 @@ export const putApi20270101ResourcesTimeoffAllowanceIncidencesById = (options) =
6365
6391
  ...options.headers
6366
6392
  }
6367
6393
  });
6394
+ /**
6395
+ * Bulk creates an Allowance incidence
6396
+ *
6397
+ * Creates several allowance adjustments in one call, each exactly as `create` does. All or nothing — if any cannot be created, none are, and the error names it as `allowance_incidences[N]`.
6398
+ */
6399
+ export const postApi20270101ResourcesTimeoffAllowanceIncidencesBulkCreate = (options) => (options?.client ?? client).post({
6400
+ security: [{ scheme: 'bearer', type: 'http' }, { name: 'x-api-key', type: 'apiKey' }],
6401
+ url: '/api/2027-01-01/resources/timeoff/allowance_incidences/bulk_create',
6402
+ ...options,
6403
+ headers: {
6404
+ 'Content-Type': 'application/json',
6405
+ ...options?.headers
6406
+ }
6407
+ });
6408
+ /**
6409
+ * Bulk deletes an Allowance incidence
6410
+ *
6411
+ * Deletes several allowance adjustments in one call. All or nothing — if any cannot be deleted, none are, and the error names it as `ids[N]`.
6412
+ */
6413
+ export const postApi20270101ResourcesTimeoffAllowanceIncidencesBulkDelete = (options) => (options?.client ?? client).post({
6414
+ security: [{ scheme: 'bearer', type: 'http' }, { name: 'x-api-key', type: 'apiKey' }],
6415
+ url: '/api/2027-01-01/resources/timeoff/allowance_incidences/bulk_delete',
6416
+ ...options,
6417
+ headers: {
6418
+ 'Content-Type': 'application/json',
6419
+ ...options?.headers
6420
+ }
6421
+ });
6422
+ /**
6423
+ * Bulk updates an Allowance incidence
6424
+ *
6425
+ * Updates several allowance adjustments in one call, each exactly as `update` does. All or nothing; each adjustment at most once.
6426
+ */
6427
+ export const postApi20270101ResourcesTimeoffAllowanceIncidencesBulkUpdate = (options) => (options?.client ?? client).post({
6428
+ security: [{ scheme: 'bearer', type: 'http' }, { name: 'x-api-key', type: 'apiKey' }],
6429
+ url: '/api/2027-01-01/resources/timeoff/allowance_incidences/bulk_update',
6430
+ ...options,
6431
+ headers: {
6432
+ 'Content-Type': 'application/json',
6433
+ ...options?.headers
6434
+ }
6435
+ });
6368
6436
  /**
6369
6437
  * Reads all Allowance stats
6370
6438
  *
@@ -6539,6 +6607,20 @@ export const postApi20270101ResourcesTimeoffLeavesApproveAll = (options) => (opt
6539
6607
  ...options?.headers
6540
6608
  }
6541
6609
  });
6610
+ /**
6611
+ * Bulk creates a Leave
6612
+ *
6613
+ * Creates several time-off leaves in one call, each for its own employee and leave type, with the same validations as creating one. All or nothing — if any leave cannot be created, none are, and the error names it as `leaves[N]`.
6614
+ */
6615
+ export const postApi20270101ResourcesTimeoffLeavesBulkCreate = (options) => (options?.client ?? client).post({
6616
+ security: [{ scheme: 'bearer', type: 'http' }, { name: 'x-api-key', type: 'apiKey' }],
6617
+ url: '/api/2027-01-01/resources/timeoff/leaves/bulk_create',
6618
+ ...options,
6619
+ headers: {
6620
+ 'Content-Type': 'application/json',
6621
+ ...options?.headers
6622
+ }
6623
+ });
6542
6624
  /**
6543
6625
  * Bulk deletes a Leave
6544
6626
  *
@@ -6553,6 +6635,20 @@ export const postApi20270101ResourcesTimeoffLeavesBulkDelete = (options) => (opt
6553
6635
  ...options?.headers
6554
6636
  }
6555
6637
  });
6638
+ /**
6639
+ * Bulk updates a Leave
6640
+ *
6641
+ * Edits several time-off leaves in one call with the same validations as editing one. It cannot approve a leave nor skip validations. All or nothing — if any edit is refused, none are applied, and the error names it as `leaves[N]`.
6642
+ */
6643
+ export const postApi20270101ResourcesTimeoffLeavesBulkUpdate = (options) => (options?.client ?? client).post({
6644
+ security: [{ scheme: 'bearer', type: 'http' }, { name: 'x-api-key', type: 'apiKey' }],
6645
+ url: '/api/2027-01-01/resources/timeoff/leaves/bulk_update',
6646
+ ...options,
6647
+ headers: {
6648
+ 'Content-Type': 'application/json',
6649
+ ...options?.headers
6650
+ }
6651
+ });
6556
6652
  /**
6557
6653
  * Rejects a Leave
6558
6654
  *