@factorialco/api-client 4.0.0-beta.2027010111 → 4.0.0-beta.2027010113

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.
@@ -686,7 +686,7 @@ export declare const getApi20270101ResourcesCompensationsCyclesById: <ThrowOnErr
686
686
  /**
687
687
  * Reads all Employees compensations
688
688
  *
689
- * Retrieves employee compensations (result_type=compensation)
689
+ * Retrieves employee compensations (result_type=compensation). Listing requires at least one of the `ids`, `payroll_run_ids`, `cycle_ids`, `payroll_run_employee_ids` or `payroll_concept_ids` filters; a list request without any of them is rejected with a 400.
690
690
  */
691
691
  export declare const getApi20270101ResourcesCompensationsEmployeesCompensations: <ThrowOnError extends boolean = false>(options?: Options<GetApi20270101ResourcesCompensationsEmployeesCompensationsData, ThrowOnError>) => RequestResult<GetApi20270101ResourcesCompensationsEmployeesCompensationsResponses, GetApi20270101ResourcesCompensationsEmployeesCompensationsErrors, ThrowOnError>;
692
692
  /**
@@ -704,7 +704,7 @@ export declare const deleteApi20270101ResourcesCompensationsEmployeesCompensatio
704
704
  /**
705
705
  * Reads a single Employees compensation
706
706
  *
707
- * Retrieves employee compensations (result_type=compensation)
707
+ * Retrieves employee compensations (result_type=compensation). Listing requires at least one of the `ids`, `payroll_run_ids`, `cycle_ids`, `payroll_run_employee_ids` or `payroll_concept_ids` filters; a list request without any of them is rejected with a 400.
708
708
  */
709
709
  export declare const getApi20270101ResourcesCompensationsEmployeesCompensationsById: <ThrowOnError extends boolean = false>(options: Options<GetApi20270101ResourcesCompensationsEmployeesCompensationsByIdData, ThrowOnError>) => RequestResult<GetApi20270101ResourcesCompensationsEmployeesCompensationsByIdResponses, GetApi20270101ResourcesCompensationsEmployeesCompensationsByIdErrors, ThrowOnError>;
710
710
  /**
@@ -3394,7 +3394,7 @@ export declare const getApi20270101ResourcesTeamsMemberships: <ThrowOnError exte
3394
3394
  /**
3395
3395
  * Creates a Membership
3396
3396
  *
3397
- * Assign an employee to a team, meaning create a membership. For companies with nested teams, two extra semantics apply. Propagation: memberships are inherited upwards, so after adding an employee to a sub-team, inherited membership rows for its ancestor teams are materialized asynchronously — rows you did not create will appear in later reads. Reuse: if the employee already has a membership row on that team (typically an inherited one), no new row is created — the employee becomes a direct member of the team, the `lead` flag is applied when you send one, and the existing row (with its existing id) is returned instead of a new resource. Omitting `lead` leaves a reused row's leadership as it was, so replaying an addition never demotes a current lead; a genuinely new row is created without it. The response is still `201` when an existing row is reused, so compare the returned `id` against what you already hold to tell the two cases apart.
3397
+ * Assign an employee to a team, meaning create a membership. For companies with nested teams, two extra semantics apply. Propagation: memberships are inherited upwards, so after adding an employee to a sub-team, inherited membership rows for its ancestor teams are materialized asynchronously — rows you did not create will appear in later reads. Reuse: if the employee already has a membership row on that team (typically an inherited one), no new row is created — the employee becomes a direct member of the team and the existing row (with its existing id) is returned instead of a new resource. On a reused row, `lead: true` promotes the employee, while `lead: false` or omitting `lead` leaves their leadership as it was: an addition never demotes a current lead, so use the update endpoint to demote. A genuinely new row is created with the `lead` you send, or without it. The response is still `201` when an existing row is reused, so compare the returned `id` against what you already hold to tell the two cases apart.
3398
3398
  */
3399
3399
  export declare const postApi20270101ResourcesTeamsMemberships: <ThrowOnError extends boolean = false>(options?: Options<PostApi20270101ResourcesTeamsMembershipsData, ThrowOnError>) => RequestResult<PostApi20270101ResourcesTeamsMembershipsResponses, PostApi20270101ResourcesTeamsMembershipsErrors, ThrowOnError>;
3400
3400
  /**
@@ -1299,7 +1299,7 @@ export const getApi20270101ResourcesCompensationsCyclesById = (options) => (opti
1299
1299
  /**
1300
1300
  * Reads all Employees compensations
1301
1301
  *
1302
- * Retrieves employee compensations (result_type=compensation)
1302
+ * Retrieves employee compensations (result_type=compensation). Listing requires at least one of the `ids`, `payroll_run_ids`, `cycle_ids`, `payroll_run_employee_ids` or `payroll_concept_ids` filters; a list request without any of them is rejected with a 400.
1303
1303
  */
1304
1304
  export const getApi20270101ResourcesCompensationsEmployeesCompensations = (options) => (options?.client ?? client).get({
1305
1305
  security: [{ scheme: 'bearer', type: 'http' }, { name: 'x-api-key', type: 'apiKey' }],
@@ -1333,7 +1333,7 @@ export const deleteApi20270101ResourcesCompensationsEmployeesCompensationsById =
1333
1333
  /**
1334
1334
  * Reads a single Employees compensation
1335
1335
  *
1336
- * Retrieves employee compensations (result_type=compensation)
1336
+ * Retrieves employee compensations (result_type=compensation). Listing requires at least one of the `ids`, `payroll_run_ids`, `cycle_ids`, `payroll_run_employee_ids` or `payroll_concept_ids` filters; a list request without any of them is rejected with a 400.
1337
1337
  */
1338
1338
  export const getApi20270101ResourcesCompensationsEmployeesCompensationsById = (options) => (options.client ?? client).get({
1339
1339
  security: [{ scheme: 'bearer', type: 'http' }, { name: 'x-api-key', type: 'apiKey' }],
@@ -6221,7 +6221,7 @@ export const getApi20270101ResourcesTeamsMemberships = (options) => (options?.cl
6221
6221
  /**
6222
6222
  * Creates a Membership
6223
6223
  *
6224
- * Assign an employee to a team, meaning create a membership. For companies with nested teams, two extra semantics apply. Propagation: memberships are inherited upwards, so after adding an employee to a sub-team, inherited membership rows for its ancestor teams are materialized asynchronously — rows you did not create will appear in later reads. Reuse: if the employee already has a membership row on that team (typically an inherited one), no new row is created — the employee becomes a direct member of the team, the `lead` flag is applied when you send one, and the existing row (with its existing id) is returned instead of a new resource. Omitting `lead` leaves a reused row's leadership as it was, so replaying an addition never demotes a current lead; a genuinely new row is created without it. The response is still `201` when an existing row is reused, so compare the returned `id` against what you already hold to tell the two cases apart.
6224
+ * Assign an employee to a team, meaning create a membership. For companies with nested teams, two extra semantics apply. Propagation: memberships are inherited upwards, so after adding an employee to a sub-team, inherited membership rows for its ancestor teams are materialized asynchronously — rows you did not create will appear in later reads. Reuse: if the employee already has a membership row on that team (typically an inherited one), no new row is created — the employee becomes a direct member of the team and the existing row (with its existing id) is returned instead of a new resource. On a reused row, `lead: true` promotes the employee, while `lead: false` or omitting `lead` leaves their leadership as it was: an addition never demotes a current lead, so use the update endpoint to demote. A genuinely new row is created with the `lead` you send, or without it. The response is still `201` when an existing row is reused, so compare the returned `id` against what you already hold to tell the two cases apart.
6225
6225
  */
6226
6226
  export const postApi20270101ResourcesTeamsMemberships = (options) => (options?.client ?? client).post({
6227
6227
  security: [{ scheme: 'bearer', type: 'http' }, { name: 'x-api-key', type: 'apiKey' }],
@@ -8331,11 +8331,29 @@ export type TimeoffAllowanceStatsNew = {
8331
8331
  * Array of cycle objects describing each accrual period for the allowance.
8332
8332
  */
8333
8333
  cycles: Array<{
8334
+ /**
8335
+ * Virtual ID of the cycle, composed of allowance_id/start_at/end_at.
8336
+ */
8334
8337
  id: string;
8338
+ /**
8339
+ * First day this counter covers for the employee. It is the latest of the policy cycle start (regular_start_at), the employee's hire date and the day the employee moved onto this policy, so it is later than regular_start_at when the counter opened part-way through the cycle (for example after a policy change).
8340
+ */
8335
8341
  start_at: string;
8342
+ /**
8343
+ * Last day this counter covers for the employee. It is the earliest of the policy cycle end (regular_end_at), the employee's termination date and the day before the employee moved off this policy, so it is earlier than regular_end_at when the counter closed part-way through the cycle.
8344
+ */
8336
8345
  end_at: string;
8346
+ /**
8347
+ * First day of the policy's own cycle, regardless of when the employee joined the policy.
8348
+ */
8337
8349
  regular_start_at: string;
8350
+ /**
8351
+ * Last day of the policy's own cycle, regardless of when the employee left the policy.
8352
+ */
8338
8353
  regular_end_at: string;
8354
+ /**
8355
+ * ID of the allowance this cycle belongs to.
8356
+ */
8339
8357
  allowance_id: string;
8340
8358
  }>;
8341
8359
  /**
@@ -8421,7 +8439,7 @@ export type TimeoffAllowanceStatsNew = {
8421
8439
  */
8422
8440
  policy_allowance: string;
8423
8441
  /**
8424
- * Allowance days after proration based on employee tenure or configuration.
8442
+ * Allowance days after proration based on employee tenure or configuration. When the allowance prorates (its proration_type is proration_enabled) and the counter covers only part of the cycle (cycles start_at/end_at differ from regular_start_at/regular_end_at, for example after a policy change), it counts only what accrues within those covered days, so it is a part-cycle share of policy_allowance rather than the full-cycle amount. With proration disabled the counter still gets the full policy_allowance over the covered days. Overtime and worked-time allowances are never prorated; they count what was earned in the covered days.
8425
8443
  */
8426
8444
  prorated_allowance_days: string;
8427
8445
  /**
@@ -8819,7 +8837,7 @@ export type TimePlanningPlanningVersion = {
8819
8837
  */
8820
8838
  effective_at: string;
8821
8839
  /**
8822
- * Type of planning tool (shift_management, work_schedules, contract_hours)
8840
+ * Type of planning tool (shift_management, work_schedule, contract_hours)
8823
8841
  */
8824
8842
  planning_tool: string;
8825
8843
  /**
@@ -56125,7 +56143,7 @@ export type GetApi20270101ResourcesTimePlanningPlanningVersionsData = {
56125
56143
  */
56126
56144
  only_active: boolean;
56127
56145
  /**
56128
- * Type of planning tool (shift_management, work_schedules, contract_hours)
56146
+ * Type of planning tool (shift_management, work_schedule, contract_hours)
56129
56147
  */
56130
56148
  planning_tool?: 'shift_management' | 'work_schedule' | 'contract_hours';
56131
56149
  /**
@@ -56203,7 +56221,7 @@ export type PostApi20270101ResourcesTimePlanningPlanningVersionsData = {
56203
56221
  */
56204
56222
  effective_at: string;
56205
56223
  /**
56206
- * Type of planning tool (shift_management, work_schedules, contract_hours)
56224
+ * Type of planning tool (shift_management, work_schedule, contract_hours)
56207
56225
  */
56208
56226
  planning_tool: string;
56209
56227
  /**
@@ -56362,7 +56380,7 @@ export type PutApi20270101ResourcesTimePlanningPlanningVersionsByIdData = {
56362
56380
  */
56363
56381
  number_of_rest_days_in_cents?: number;
56364
56382
  /**
56365
- * Type of planning tool (shift_management, work_schedules, contract_hours)
56383
+ * Type of planning tool (shift_management, work_schedule, contract_hours)
56366
56384
  */
56367
56385
  planning_tool: string;
56368
56386
  /**
@@ -56444,7 +56462,7 @@ export type PostApi20270101ResourcesTimePlanningPlanningVersionsBulkCreateData =
56444
56462
  */
56445
56463
  effective_at: string;
56446
56464
  /**
56447
- * Type of planning tool (shift_management, work_schedules, contract_hours)
56465
+ * Type of planning tool (shift_management, work_schedule, contract_hours)
56448
56466
  */
56449
56467
  planning_tool: string;
56450
56468
  /**