@factorialco/api-client 4.0.0-beta.2027010119 → 4.0.0-beta.2027010121

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.
@@ -5254,7 +5254,7 @@ export type IntegrationsSyncableItem = {
5254
5254
  /**
5255
5255
  * Type of the syncable item
5256
5256
  */
5257
- syncable_type: 'compensations/compensation' | 'expenses/expense' | 'employee_updates/contract_change' | 'employee_updates/leave' | 'employee_updates/new_hire' | 'employee_updates/personal_change_id' | 'employee_updates/personal_change_name' | 'employee_updates/personal_change_irpf' | 'employee_updates/personal_change_bank' | 'employee_updates/personal_change_gender' | 'employee_updates/personal_change_health_insurance' | 'employee_updates/personal_change_address' | 'employee_updates/personal_change_residence' | 'employee_updates/personal_change_workplace' | 'employee_updates/personal_change_nationality' | 'employee_updates/personal_change_email' | 'employee_updates/personal_change_phone_number' | 'employee_updates/personal_change_permits_and_certificates' | 'employee_updates/personal_change_taxes_and_deductions' | 'employee_updates/personal_change_work_activity' | 'employee_updates/personal_change_birth_name' | 'employee_updates/personal_change_academic_title' | 'employee_updates/personal_change_country_of_birth' | 'employee_updates/personal_change_place_of_birth' | 'employee_updates/termination' | 'employee_updates/worked_time' | 'finance/vendor' | 'finance/financial_document';
5257
+ syncable_type: 'compensations/compensation' | 'expenses/expense' | 'employee_updates/contract_change' | 'employee_updates/leave' | 'employee_updates/new_hire' | 'employee_updates/personal_change_id' | 'employee_updates/personal_change_name' | 'employee_updates/personal_change_irpf' | 'employee_updates/personal_change_bank' | 'employee_updates/personal_change_gender' | 'employee_updates/personal_change_health_insurance' | 'employee_updates/personal_change_address' | 'employee_updates/personal_change_residence' | 'employee_updates/personal_change_workplace' | 'employee_updates/personal_change_nationality' | 'employee_updates/personal_change_email' | 'employee_updates/personal_change_phone_number' | 'employee_updates/personal_change_permits_and_certificates' | 'employee_updates/personal_change_taxes_and_deductions' | 'employee_updates/personal_change_work_activity' | 'employee_updates/personal_change_birth_name' | 'employee_updates/personal_change_academic_title' | 'employee_updates/personal_change_country_of_birth' | 'employee_updates/personal_change_place_of_birth' | 'employee_updates/termination' | 'employee_updates/worked_time' | 'finance/vendor' | 'finance/financial_document' | 'employees/employee' | 'teams/team' | 'teams/membership' | 'finance/journal_entry' | 'procurement/purchase_order';
5258
5258
  };
5259
5259
  export type IntegrationsSyncableState = {
5260
5260
  /**
@@ -5299,7 +5299,7 @@ export type IntegrationsSyncableState = {
5299
5299
  /**
5300
5300
  * The type of synchronization this state represents, in "namespace/resource" form. Describes what is being synced independently of the resource_syncable_type that carries the id.
5301
5301
  */
5302
- sync_type: 'compensations/compensation' | 'expenses/expense' | 'employee_updates/contract_change' | 'employee_updates/leave' | 'employee_updates/new_hire' | 'employee_updates/personal_change_id' | 'employee_updates/personal_change_name' | 'employee_updates/personal_change_irpf' | 'employee_updates/personal_change_bank' | 'employee_updates/personal_change_gender' | 'employee_updates/personal_change_health_insurance' | 'employee_updates/personal_change_address' | 'employee_updates/personal_change_residence' | 'employee_updates/personal_change_workplace' | 'employee_updates/personal_change_nationality' | 'employee_updates/personal_change_email' | 'employee_updates/personal_change_phone_number' | 'employee_updates/personal_change_permits_and_certificates' | 'employee_updates/personal_change_taxes_and_deductions' | 'employee_updates/personal_change_work_activity' | 'employee_updates/personal_change_birth_name' | 'employee_updates/personal_change_academic_title' | 'employee_updates/personal_change_country_of_birth' | 'employee_updates/personal_change_place_of_birth' | 'employee_updates/termination' | 'employee_updates/worked_time' | 'finance/vendor' | 'finance/financial_document';
5302
+ sync_type: 'compensations/compensation' | 'expenses/expense' | 'employee_updates/contract_change' | 'employee_updates/leave' | 'employee_updates/new_hire' | 'employee_updates/personal_change_id' | 'employee_updates/personal_change_name' | 'employee_updates/personal_change_irpf' | 'employee_updates/personal_change_bank' | 'employee_updates/personal_change_gender' | 'employee_updates/personal_change_health_insurance' | 'employee_updates/personal_change_address' | 'employee_updates/personal_change_residence' | 'employee_updates/personal_change_workplace' | 'employee_updates/personal_change_nationality' | 'employee_updates/personal_change_email' | 'employee_updates/personal_change_phone_number' | 'employee_updates/personal_change_permits_and_certificates' | 'employee_updates/personal_change_taxes_and_deductions' | 'employee_updates/personal_change_work_activity' | 'employee_updates/personal_change_birth_name' | 'employee_updates/personal_change_academic_title' | 'employee_updates/personal_change_country_of_birth' | 'employee_updates/personal_change_place_of_birth' | 'employee_updates/termination' | 'employee_updates/worked_time' | 'finance/vendor' | 'finance/financial_document' | 'employees/employee' | 'teams/team' | 'teams/membership' | 'finance/journal_entry' | 'procurement/purchase_order';
5303
5303
  };
5304
5304
  export type IntegrationsSyncableSyncRun = {
5305
5305
  /**
@@ -8139,7 +8139,7 @@ export type TeamsMembership = {
8139
8139
  */
8140
8140
  parent_team_ids: Array<string>;
8141
8141
  /**
8142
- * Whether the employee is a direct member of the team (nested teams). Always present. `true` means direct member; `false` means the row exists only through inheritance from a sub-team; `null` means not computed for this read. Only computed on reads filtered by a single employee with `with_source_attribution` enabled — always `null` otherwise, including create, update and delete responses and companies without nested teams. `null` is also returned when directness could not be resolved for a transient reason, even with `with_source_attribution` enabled, so never treat `null` as `false` — retry the read instead.
8142
+ * Whether the employee is a direct member of the team (nested teams). Always present. `true` means direct member; `false` means the row exists only through inheritance from a sub-team; `null` means not computed for this read. Computed on reads filtered by a single `team_ids` value, and on reads filtered by a single employee with `with_source_attribution` enabled — always `null` otherwise, including create, update and delete responses and companies without nested teams. `null` is also returned when directness could not be resolved for a transient reason, so never treat `null` as `false` — retry the read instead.
8143
8143
  */
8144
8144
  direct?: boolean;
8145
8145
  };
@@ -17932,7 +17932,7 @@ export type PostApi20270101ResourcesCompensationsAdditionalCompensationsData = {
17932
17932
  */
17933
17933
  payroll_concept_id: string;
17934
17934
  /**
17935
- * Amount strategy discriminator
17935
+ * Amount strategy discriminator. A `contracts_per_worked_day_amount_strategy` compensation is paid monthly only.
17936
17936
  */
17937
17937
  amount_strategy_type: 'contracts_fixed_amount_strategy' | 'contracts_variable_amount_strategy' | 'contracts_per_worked_day_amount_strategy';
17938
17938
  /**
@@ -17959,7 +17959,7 @@ export type PostApi20270101ResourcesCompensationsAdditionalCompensationsData = {
17959
17959
  */
17960
17960
  description?: string;
17961
17961
  /**
17962
- * Recurrence label. One of `monthly`, `every_2_months`, `every_3_months`, `every_4_months`, `every_5_months`, `every_6_months`, `every_7_months`, `every_8_months`, `every_9_months`, `every_10_months`, `every_11_months`, `every_12_months`.
17962
+ * Recurrence label. One of `monthly`, `every_2_months`, `every_3_months`, `every_4_months`, `every_5_months`, `every_6_months`, `every_7_months`, `every_8_months`, `every_9_months`, `every_10_months`, `every_11_months`, `every_12_months`. When `amount_strategy_type = contracts_per_worked_day_amount_strategy`, it must be `monthly` and defaults to `monthly` when omitted.
17963
17963
  */
17964
17964
  recurrence?: 'monthly' | 'every_2_months' | 'every_3_months' | 'every_4_months' | 'every_5_months' | 'every_6_months' | 'every_7_months' | 'every_8_months' | 'every_9_months' | 'every_10_months' | 'every_11_months' | 'every_12_months';
17965
17965
  /**
@@ -18201,7 +18201,7 @@ export type PutApi20270101ResourcesCompensationsAdditionalCompensationsByIdData
18201
18201
  */
18202
18202
  description?: string;
18203
18203
  /**
18204
- * Recurrence label. Same enum as on create.
18204
+ * Recurrence label. Same enum as on create. Must be `monthly` for PerWorkedDay strategies, and defaults to `monthly` when neither the request nor the stored compensation has one. A PerWorkedDay compensation stored with another recurrence stays editable while the request leaves it out or sends it unchanged.
18205
18205
  */
18206
18206
  recurrence?: 'monthly' | 'every_2_months' | 'every_3_months' | 'every_4_months' | 'every_5_months' | 'every_6_months' | 'every_7_months' | 'every_8_months' | 'every_9_months' | 'every_10_months' | 'every_11_months' | 'every_12_months';
18207
18207
  /**
@@ -32861,6 +32861,10 @@ export type PostApi20270101ResourcesIntegrationsSyncRunOutputsData = {
32861
32861
  * Optional custom name for the uploaded file. When omitted, a standardized name is generated.
32862
32862
  */
32863
32863
  file_name: string;
32864
+ /**
32865
+ * Optional JSON array with the digest of the record behind each syncable sync run in the file, as synced, used to detect later changes to it. Only kept for integrations whose app computes the digest; each digest is at most 64 characters.
32866
+ */
32867
+ digests?: string;
32864
32868
  };
32865
32869
  path?: never;
32866
32870
  query?: never;
@@ -32937,7 +32941,11 @@ export type GetApi20270101ResourcesIntegrationsSyncableStatesData = {
32937
32941
  */
32938
32942
  'syncable_ids[]'?: Array<string>;
32939
32943
  /**
32940
- * The resource of the linked records, in "namespace/resource" form. Required when filtering by syncable_ids.
32944
+ * The type of synchronization to filter by, in "namespace/resource" form. Takes precedence over resource_syncable_type, which is ambiguous when several sync types share a resource (for example employees/employee).
32945
+ */
32946
+ sync_type?: 'compensations/compensation' | 'expenses/expense' | 'employee_updates/contract_change' | 'employee_updates/leave' | 'employee_updates/new_hire' | 'employee_updates/personal_change_id' | 'employee_updates/personal_change_name' | 'employee_updates/personal_change_irpf' | 'employee_updates/personal_change_bank' | 'employee_updates/personal_change_gender' | 'employee_updates/personal_change_health_insurance' | 'employee_updates/personal_change_address' | 'employee_updates/personal_change_residence' | 'employee_updates/personal_change_workplace' | 'employee_updates/personal_change_nationality' | 'employee_updates/personal_change_email' | 'employee_updates/personal_change_phone_number' | 'employee_updates/personal_change_permits_and_certificates' | 'employee_updates/personal_change_taxes_and_deductions' | 'employee_updates/personal_change_work_activity' | 'employee_updates/personal_change_birth_name' | 'employee_updates/personal_change_academic_title' | 'employee_updates/personal_change_country_of_birth' | 'employee_updates/personal_change_place_of_birth' | 'employee_updates/termination' | 'employee_updates/worked_time' | 'finance/vendor' | 'finance/financial_document' | 'employees/employee' | 'teams/team' | 'teams/membership' | 'finance/journal_entry' | 'procurement/purchase_order';
32947
+ /**
32948
+ * The resource of the linked records, in "namespace/resource" form. Required when filtering by syncable_ids unless sync_type is given.
32941
32949
  */
32942
32950
  resource_syncable_type?: string;
32943
32951
  /**
@@ -33238,6 +33246,10 @@ export type PutApi20270101ResourcesIntegrationsSyncableSyncRunsByIdData = {
33238
33246
  error_messages?: {
33239
33247
  [key: string]: unknown;
33240
33248
  };
33249
+ /**
33250
+ * Digest of the record as it was synced, used to detect later changes to it. Only kept for integrations whose app computes the digest; at most 64 characters.
33251
+ */
33252
+ payload_digest?: string;
33241
33253
  };
33242
33254
  path: {
33243
33255
  /**
@@ -33323,7 +33335,7 @@ export type PostApi20270101ResourcesIntegrationsSyncableSyncRunsBulkUpsertData =
33323
33335
  /**
33324
33336
  * The Factorial resource type this item maps to. Same values returned by GET /syncable_items.
33325
33337
  */
33326
- syncable_type: 'compensations/compensation' | 'expenses/expense' | 'employee_updates/contract_change' | 'employee_updates/leave' | 'employee_updates/new_hire' | 'employee_updates/personal_change_id' | 'employee_updates/personal_change_name' | 'employee_updates/personal_change_irpf' | 'employee_updates/personal_change_bank' | 'employee_updates/personal_change_gender' | 'employee_updates/personal_change_health_insurance' | 'employee_updates/personal_change_address' | 'employee_updates/personal_change_residence' | 'employee_updates/personal_change_workplace' | 'employee_updates/personal_change_nationality' | 'employee_updates/personal_change_email' | 'employee_updates/personal_change_phone_number' | 'employee_updates/personal_change_permits_and_certificates' | 'employee_updates/personal_change_taxes_and_deductions' | 'employee_updates/personal_change_work_activity' | 'employee_updates/personal_change_birth_name' | 'employee_updates/personal_change_academic_title' | 'employee_updates/personal_change_country_of_birth' | 'employee_updates/personal_change_place_of_birth' | 'employee_updates/termination' | 'employee_updates/worked_time' | 'finance/vendor' | 'finance/financial_document';
33338
+ syncable_type: 'compensations/compensation' | 'expenses/expense' | 'employee_updates/contract_change' | 'employee_updates/leave' | 'employee_updates/new_hire' | 'employee_updates/personal_change_id' | 'employee_updates/personal_change_name' | 'employee_updates/personal_change_irpf' | 'employee_updates/personal_change_bank' | 'employee_updates/personal_change_gender' | 'employee_updates/personal_change_health_insurance' | 'employee_updates/personal_change_address' | 'employee_updates/personal_change_residence' | 'employee_updates/personal_change_workplace' | 'employee_updates/personal_change_nationality' | 'employee_updates/personal_change_email' | 'employee_updates/personal_change_phone_number' | 'employee_updates/personal_change_permits_and_certificates' | 'employee_updates/personal_change_taxes_and_deductions' | 'employee_updates/personal_change_work_activity' | 'employee_updates/personal_change_birth_name' | 'employee_updates/personal_change_academic_title' | 'employee_updates/personal_change_country_of_birth' | 'employee_updates/personal_change_place_of_birth' | 'employee_updates/termination' | 'employee_updates/worked_time' | 'finance/vendor' | 'finance/financial_document' | 'employees/employee' | 'teams/team' | 'teams/membership' | 'finance/journal_entry' | 'procurement/purchase_order';
33327
33339
  /**
33328
33340
  * Outcome of processing the item
33329
33341
  */
@@ -51178,7 +51190,7 @@ export type GetApi20270101ResourcesTeamsMembershipsData = {
51178
51190
  */
51179
51191
  'employee_ids[]'?: Array<string>;
51180
51192
  /**
51181
- * Populate `direct`, `source_team_ids` and `parent_team_ids` on each returned membership (nested teams). Only honoured when filtering by a single `employee_ids` value without `team_ids` — the read that attributes one employee's own memberships, and the only one that resolves `direct`. Reads filtered by a single team already return `source_team_ids`/`parent_team_ids` without this flag (`direct` stays null there); bulk reads ignore it entirely. Unsupported filter combinations return `200` with empty attribution rather than an error. Attribution is resolved per employee and is significantly more expensive than a plain read: intended for per-profile lookups, not bulk synchronization.
51193
+ * Populate `direct`, `source_team_ids` and `parent_team_ids` on each returned membership (nested teams). Only honoured when filtering by a single `employee_ids` value without `team_ids` — the read that attributes one employee's own memberships. Reads filtered by a single team already return all three without this flag; bulk reads ignore it entirely. Unsupported filter combinations return `200` with empty attribution rather than an error. Attribution is resolved per employee and is significantly more expensive than a plain read: intended for per-profile lookups, not bulk synchronization.
51182
51194
  */
51183
51195
  with_source_attribution?: boolean;
51184
51196
  };