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

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 (37) hide show
  1. package/dist/cjs/generated/index.d.ts +2 -2
  2. package/dist/cjs/generated/index.d.ts.map +1 -1
  3. package/dist/cjs/generated/index.js +15 -8
  4. package/dist/cjs/generated/index.js.map +1 -1
  5. package/dist/cjs/generated/sdk.gen.d.ts +48 -6
  6. package/dist/cjs/generated/sdk.gen.d.ts.map +1 -1
  7. package/dist/cjs/generated/sdk.gen.js +113 -16
  8. package/dist/cjs/generated/sdk.gen.js.map +1 -1
  9. package/dist/cjs/generated/types.gen.d.ts +292 -12
  10. package/dist/cjs/generated/types.gen.d.ts.map +1 -1
  11. package/dist/cjs/sdk.d.ts +49 -1
  12. package/dist/cjs/sdk.d.ts.map +1 -1
  13. package/dist/cjs/sdk.js +61 -3
  14. package/dist/cjs/sdk.js.map +1 -1
  15. package/dist/cjs/webhooks.d.ts +10 -1
  16. package/dist/cjs/webhooks.d.ts.map +1 -1
  17. package/dist/cjs/webhooks.js +3 -0
  18. package/dist/cjs/webhooks.js.map +1 -1
  19. package/dist/esm/generated/index.d.ts +2 -2
  20. package/dist/esm/generated/index.d.ts.map +1 -1
  21. package/dist/esm/generated/index.js +1 -1
  22. package/dist/esm/generated/index.js.map +1 -1
  23. package/dist/esm/generated/sdk.gen.d.ts +48 -6
  24. package/dist/esm/generated/sdk.gen.d.ts.map +1 -1
  25. package/dist/esm/generated/sdk.gen.js +95 -5
  26. package/dist/esm/generated/sdk.gen.js.map +1 -1
  27. package/dist/esm/generated/types.gen.d.ts +292 -12
  28. package/dist/esm/generated/types.gen.d.ts.map +1 -1
  29. package/dist/esm/sdk.d.ts +49 -1
  30. package/dist/esm/sdk.d.ts.map +1 -1
  31. package/dist/esm/sdk.js +56 -1
  32. package/dist/esm/sdk.js.map +1 -1
  33. package/dist/esm/webhooks.d.ts +10 -1
  34. package/dist/esm/webhooks.d.ts.map +1 -1
  35. package/dist/esm/webhooks.js +3 -0
  36. package/dist/esm/webhooks.js.map +1 -1
  37. package/package.json +1 -1
@@ -1374,6 +1374,20 @@ export const getApi20261001ResourcesCompensationsPayrollResultsById = (options)
1374
1374
  url: '/api/2026-10-01/resources/compensations/payroll_results/{id}',
1375
1375
  ...options
1376
1376
  });
1377
+ /**
1378
+ * Bulk creates a Payroll result
1379
+ *
1380
+ * Imports payroll result amounts for employees of a payroll run. Re-posting an (employee, concept) pair replaces its amount; concepts not included in the request are left untouched. Every employee entry must include the company's net_pay concept.
1381
+ */
1382
+ export const postApi20261001ResourcesCompensationsPayrollResultsBulkCreate = (options) => (options?.client ?? client).post({
1383
+ security: [{ scheme: 'bearer', type: 'http' }, { name: 'x-api-key', type: 'apiKey' }],
1384
+ url: '/api/2026-10-01/resources/compensations/payroll_results/bulk_create',
1385
+ ...options,
1386
+ headers: {
1387
+ 'Content-Type': 'application/json',
1388
+ ...options?.headers
1389
+ }
1390
+ });
1377
1391
  /**
1378
1392
  * Reads all Payroll runs
1379
1393
  *
@@ -4715,6 +4729,40 @@ export const putApi20261001ResourcesPostsPostsById = (options) => (options.clien
4715
4729
  ...options.headers
4716
4730
  }
4717
4731
  });
4732
+ /**
4733
+ * Creates a Materialized process
4734
+ *
4735
+ * Creates a Materialized process
4736
+ */
4737
+ export const postApi20261001ResourcesProcessesMaterializedProcesses = (options) => (options?.client ?? client).post({
4738
+ security: [{ scheme: 'bearer', type: 'http' }, { name: 'x-api-key', type: 'apiKey' }],
4739
+ url: '/api/2026-10-01/resources/processes/materialized_processes',
4740
+ ...options,
4741
+ headers: {
4742
+ 'Content-Type': 'application/json',
4743
+ ...options?.headers
4744
+ }
4745
+ });
4746
+ /**
4747
+ * Reads all Processes
4748
+ *
4749
+ * Reads all Processes
4750
+ */
4751
+ export const getApi20261001ResourcesProcessesProcesses = (options) => (options?.client ?? client).get({
4752
+ security: [{ scheme: 'bearer', type: 'http' }, { name: 'x-api-key', type: 'apiKey' }],
4753
+ url: '/api/2026-10-01/resources/processes/processes',
4754
+ ...options
4755
+ });
4756
+ /**
4757
+ * Reads a single Process
4758
+ *
4759
+ * Reads a single Process
4760
+ */
4761
+ export const getApi20261001ResourcesProcessesProcessesById = (options) => (options.client ?? client).get({
4762
+ security: [{ scheme: 'bearer', type: 'http' }, { name: 'x-api-key', type: 'apiKey' }],
4763
+ url: '/api/2026-10-01/resources/processes/processes/{id}',
4764
+ ...options
4765
+ });
4718
4766
  /**
4719
4767
  * Reads all Po field values
4720
4768
  *
@@ -6030,7 +6078,7 @@ export const getApi20261001ResourcesTeamsMemberships = (options) => (options?.cl
6030
6078
  /**
6031
6079
  * Creates a Membership
6032
6080
  *
6033
- * Assign an employee to a team, meaning create a membership.
6081
+ * 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.
6034
6082
  */
6035
6083
  export const postApi20261001ResourcesTeamsMemberships = (options) => (options?.client ?? client).post({
6036
6084
  security: [{ scheme: 'bearer', type: 'http' }, { name: 'x-api-key', type: 'apiKey' }],
@@ -6044,7 +6092,7 @@ export const postApi20261001ResourcesTeamsMemberships = (options) => (options?.c
6044
6092
  /**
6045
6093
  * Deletes a Membership
6046
6094
  *
6047
- * Delete the membership to remove the employee from the team.
6095
+ * Delete the membership to remove the employee from the team. For companies with nested teams what actually gets deleted depends on the kind of row: deleting a direct membership removes it, and the inherited copies it produced in the ancestor teams are cleaned up asynchronously. Deleting an INHERITED membership instead removes the employee's direct membership in EVERY sub-team that row originates from — rows with other ids, in teams you did not name — and the request is rejected altogether if you cannot manage one of those sub-teams. The inherited row you named also disappears asynchronously rather than in the request, so an immediate re-read may still return it; repeating the DELETE is safe rather than an error. Read that employee's memberships with `with_source_attribution` before deleting to see what is at stake: `direct` indicates which kind of row it is, and `source_team_ids` where the deletion would land. Both are advisory — the read and the delete resolve their answers independently, so re-read after deleting rather than assuming which branch ran.
6048
6096
  */
6049
6097
  export const deleteApi20261001ResourcesTeamsMembershipsById = (options) => (options.client ?? client).delete({
6050
6098
  security: [{ scheme: 'bearer', type: 'http' }, { name: 'x-api-key', type: 'apiKey' }],
@@ -6064,7 +6112,7 @@ export const getApi20261001ResourcesTeamsMembershipsById = (options) => (options
6064
6112
  /**
6065
6113
  * Updates a Membership
6066
6114
  *
6067
- * Update the membership to either make the employee a lead of the team or remove them as a lead.
6115
+ * Update the membership to either make the employee a lead of the team or remove them as a lead. For companies with nested teams, promoting an inherited membership (`lead: true`) first converts the employee into a direct member of the team (leads must be direct members), so the row becomes direct as a side effect. Demoting (`lead: false`) only removes the lead flag and keeps the membership.
6068
6116
  */
6069
6117
  export const putApi20261001ResourcesTeamsMembershipsById = (options) => (options.client ?? client).put({
6070
6118
  security: [{ scheme: 'bearer', type: 'http' }, { name: 'x-api-key', type: 'apiKey' }],
@@ -6075,6 +6123,20 @@ export const putApi20261001ResourcesTeamsMembershipsById = (options) => (options
6075
6123
  ...options.headers
6076
6124
  }
6077
6125
  });
6126
+ /**
6127
+ * Moves a Membership
6128
+ *
6129
+ * Move a membership to a different team in one operation (the employee is removed from the current team and added to the destination). Requires the nested teams feature and permission to manage both teams. Only direct memberships can be moved — moving an inherited row is rejected.
6130
+ */
6131
+ export const postApi20261001ResourcesTeamsMembershipsMove = (options) => (options?.client ?? client).post({
6132
+ security: [{ scheme: 'bearer', type: 'http' }, { name: 'x-api-key', type: 'apiKey' }],
6133
+ url: '/api/2026-10-01/resources/teams/memberships/move',
6134
+ ...options,
6135
+ headers: {
6136
+ 'Content-Type': 'application/json',
6137
+ ...options?.headers
6138
+ }
6139
+ });
6078
6140
  /**
6079
6141
  * Reads all Teams
6080
6142
  *
@@ -6088,7 +6150,7 @@ export const getApi20261001ResourcesTeamsTeams = (options) => (options?.client ?
6088
6150
  /**
6089
6151
  * Creates a Team
6090
6152
  *
6091
- * Create a team with a given name
6153
+ * Create a team with a given name. Passing `parent_team_id` creates it as a sub-team of that parent (nested teams): it requires the nested teams feature — companies without it get a validation error — plus permission to manage the parent team, and the hierarchy is capped at 4 levels.
6092
6154
  */
6093
6155
  export const postApi20261001ResourcesTeamsTeams = (options) => (options?.client ?? client).post({
6094
6156
  security: [{ scheme: 'bearer', type: 'http' }, { name: 'x-api-key', type: 'apiKey' }],
@@ -6102,7 +6164,7 @@ export const postApi20261001ResourcesTeamsTeams = (options) => (options?.client
6102
6164
  /**
6103
6165
  * Deletes a Team
6104
6166
  *
6105
- * Delete a team
6167
+ * Delete a team. Its memberships are deleted with it. For companies with nested teams, a team that still has sub-teams cannot be deleted: the request fails and lists them, so move them to another parent team (or to the root) first. Deletion never cascades — sub-teams are never deleted along with their parent.
6106
6168
  */
6107
6169
  export const deleteApi20261001ResourcesTeamsTeamsById = (options) => (options.client ?? client).delete({
6108
6170
  security: [{ scheme: 'bearer', type: 'http' }, { name: 'x-api-key', type: 'apiKey' }],
@@ -6133,6 +6195,20 @@ export const putApi20261001ResourcesTeamsTeamsById = (options) => (options.clien
6133
6195
  ...options.headers
6134
6196
  }
6135
6197
  });
6198
+ /**
6199
+ * Moves a Team
6200
+ *
6201
+ * Move a team under a different parent team, or to the root of the hierarchy. Requires the nested teams feature — companies without it get a forbidden error — plus permission to manage the moved team and both parents involved; the hierarchy is capped at 4 levels. The team keeps its direct members; inherited memberships are re-propagated asynchronously to the new ancestors.
6202
+ */
6203
+ export const postApi20261001ResourcesTeamsTeamsMove = (options) => (options?.client ?? client).post({
6204
+ security: [{ scheme: 'bearer', type: 'http' }, { name: 'x-api-key', type: 'apiKey' }],
6205
+ url: '/api/2026-10-01/resources/teams/teams/move',
6206
+ ...options,
6207
+ headers: {
6208
+ 'Content-Type': 'application/json',
6209
+ ...options?.headers
6210
+ }
6211
+ });
6136
6212
  /**
6137
6213
  * Reads all Allowances
6138
6214
  *
@@ -6437,6 +6513,20 @@ export const postApi20261001ResourcesTimeoffLeavesApproveAll = (options) => (opt
6437
6513
  ...options?.headers
6438
6514
  }
6439
6515
  });
6516
+ /**
6517
+ * Bulk deletes a Leave
6518
+ *
6519
+ * Cancels several time-off leaves in one call. All or nothing — if any leave cannot be cancelled, none of them are.
6520
+ */
6521
+ export const postApi20261001ResourcesTimeoffLeavesBulkDelete = (options) => (options?.client ?? client).post({
6522
+ security: [{ scheme: 'bearer', type: 'http' }, { name: 'x-api-key', type: 'apiKey' }],
6523
+ url: '/api/2026-10-01/resources/timeoff/leaves/bulk_delete',
6524
+ ...options,
6525
+ headers: {
6526
+ 'Content-Type': 'application/json',
6527
+ ...options?.headers
6528
+ }
6529
+ });
6440
6530
  /**
6441
6531
  * Rejects a Leave
6442
6532
  *