@factorialco/api-client 3.0.0-beta.2026100137 → 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 +13 -8
  4. package/dist/cjs/generated/index.js.map +1 -1
  5. package/dist/cjs/generated/sdk.gen.d.ts +36 -6
  6. package/dist/cjs/generated/sdk.gen.d.ts.map +1 -1
  7. package/dist/cjs/generated/sdk.gen.js +77 -10
  8. package/dist/cjs/generated/sdk.gen.js.map +1 -1
  9. package/dist/cjs/generated/types.gen.d.ts +210 -2
  10. package/dist/cjs/generated/types.gen.d.ts.map +1 -1
  11. package/dist/cjs/sdk.d.ts +45 -1
  12. package/dist/cjs/sdk.d.ts.map +1 -1
  13. package/dist/cjs/sdk.js +57 -3
  14. package/dist/cjs/sdk.js.map +1 -1
  15. package/dist/cjs/webhooks.d.ts +7 -1
  16. package/dist/cjs/webhooks.d.ts.map +1 -1
  17. package/dist/cjs/webhooks.js +2 -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 +36 -6
  24. package/dist/esm/generated/sdk.gen.d.ts.map +1 -1
  25. package/dist/esm/generated/sdk.gen.js +67 -5
  26. package/dist/esm/generated/sdk.gen.js.map +1 -1
  27. package/dist/esm/generated/types.gen.d.ts +210 -2
  28. package/dist/esm/generated/types.gen.d.ts.map +1 -1
  29. package/dist/esm/sdk.d.ts +45 -1
  30. package/dist/esm/sdk.d.ts.map +1 -1
  31. package/dist/esm/sdk.js +52 -1
  32. package/dist/esm/sdk.js.map +1 -1
  33. package/dist/esm/webhooks.d.ts +7 -1
  34. package/dist/esm/webhooks.d.ts.map +1 -1
  35. package/dist/esm/webhooks.js +2 -0
  36. package/dist/esm/webhooks.js.map +1 -1
  37. package/package.json +1 -1
@@ -4729,6 +4729,40 @@ export const putApi20261001ResourcesPostsPostsById = (options) => (options.clien
4729
4729
  ...options.headers
4730
4730
  }
4731
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
+ });
4732
4766
  /**
4733
4767
  * Reads all Po field values
4734
4768
  *
@@ -6044,7 +6078,7 @@ export const getApi20261001ResourcesTeamsMemberships = (options) => (options?.cl
6044
6078
  /**
6045
6079
  * Creates a Membership
6046
6080
  *
6047
- * 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.
6048
6082
  */
6049
6083
  export const postApi20261001ResourcesTeamsMemberships = (options) => (options?.client ?? client).post({
6050
6084
  security: [{ scheme: 'bearer', type: 'http' }, { name: 'x-api-key', type: 'apiKey' }],
@@ -6058,7 +6092,7 @@ export const postApi20261001ResourcesTeamsMemberships = (options) => (options?.c
6058
6092
  /**
6059
6093
  * Deletes a Membership
6060
6094
  *
6061
- * 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.
6062
6096
  */
6063
6097
  export const deleteApi20261001ResourcesTeamsMembershipsById = (options) => (options.client ?? client).delete({
6064
6098
  security: [{ scheme: 'bearer', type: 'http' }, { name: 'x-api-key', type: 'apiKey' }],
@@ -6078,7 +6112,7 @@ export const getApi20261001ResourcesTeamsMembershipsById = (options) => (options
6078
6112
  /**
6079
6113
  * Updates a Membership
6080
6114
  *
6081
- * 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.
6082
6116
  */
6083
6117
  export const putApi20261001ResourcesTeamsMembershipsById = (options) => (options.client ?? client).put({
6084
6118
  security: [{ scheme: 'bearer', type: 'http' }, { name: 'x-api-key', type: 'apiKey' }],
@@ -6089,6 +6123,20 @@ export const putApi20261001ResourcesTeamsMembershipsById = (options) => (options
6089
6123
  ...options.headers
6090
6124
  }
6091
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
+ });
6092
6140
  /**
6093
6141
  * Reads all Teams
6094
6142
  *
@@ -6102,7 +6150,7 @@ export const getApi20261001ResourcesTeamsTeams = (options) => (options?.client ?
6102
6150
  /**
6103
6151
  * Creates a Team
6104
6152
  *
6105
- * 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.
6106
6154
  */
6107
6155
  export const postApi20261001ResourcesTeamsTeams = (options) => (options?.client ?? client).post({
6108
6156
  security: [{ scheme: 'bearer', type: 'http' }, { name: 'x-api-key', type: 'apiKey' }],
@@ -6116,7 +6164,7 @@ export const postApi20261001ResourcesTeamsTeams = (options) => (options?.client
6116
6164
  /**
6117
6165
  * Deletes a Team
6118
6166
  *
6119
- * 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.
6120
6168
  */
6121
6169
  export const deleteApi20261001ResourcesTeamsTeamsById = (options) => (options.client ?? client).delete({
6122
6170
  security: [{ scheme: 'bearer', type: 'http' }, { name: 'x-api-key', type: 'apiKey' }],
@@ -6147,6 +6195,20 @@ export const putApi20261001ResourcesTeamsTeamsById = (options) => (options.clien
6147
6195
  ...options.headers
6148
6196
  }
6149
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
+ });
6150
6212
  /**
6151
6213
  * Reads all Allowances
6152
6214
  *