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

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.
@@ -2758,6 +2758,24 @@ export type ContractsTaxonomy = {
2758
2758
  default: boolean;
2759
2759
  legal_entity_id: string;
2760
2760
  };
2761
+ export type CostCentersResourceDistribution = {
2762
+ /**
2763
+ * Type of the record the row belongs to, as passed in the request
2764
+ */
2765
+ resource_type: string;
2766
+ /**
2767
+ * ID of the record the row belongs to. For an expense, this is its `expenses_expensable_id`.
2768
+ */
2769
+ resource_id: string;
2770
+ /**
2771
+ * ID of the cost center this share of the cost is charged to
2772
+ */
2773
+ cost_center_id: string;
2774
+ /**
2775
+ * The cost center's share of the record's cost, as a fraction between 0 and 1, so 0.6 means 60%. The shares of a record normally add up to 1.
2776
+ */
2777
+ percentage: number;
2778
+ };
2761
2779
  export type CustomFieldsField = {
2762
2780
  /**
2763
2781
  * Field identifier
@@ -5168,7 +5186,7 @@ export type IntegrationsSyncableItem = {
5168
5186
  /**
5169
5187
  * Type of the syncable item
5170
5188
  */
5171
- 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';
5189
+ 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';
5172
5190
  };
5173
5191
  export type IntegrationsSyncableState = {
5174
5192
  /**
@@ -5213,7 +5231,7 @@ export type IntegrationsSyncableState = {
5213
5231
  /**
5214
5232
  * 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.
5215
5233
  */
5216
- 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';
5234
+ 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';
5217
5235
  };
5218
5236
  export type IntegrationsSyncableSyncRun = {
5219
5237
  /**
@@ -8164,6 +8182,10 @@ export type TimeoffAllowance = {
8164
8182
  * An array of leave type ids associated with that allowance
8165
8183
  */
8166
8184
  leave_type_ids: Array<string>;
8185
+ /**
8186
+ * How far the counter is allowed to go negative when negative_counter_type is negative_counter_enabled. "no_limit" allows any negative balance; "limit_negative_counter" only allows a negative the next cycle can cover. Always set when negative counters are enabled; null when they are disabled.
8187
+ */
8188
+ limit_negative_counter_type?: 'no_limit' | 'limit_negative_counter';
8167
8189
  /**
8168
8190
  * Maximum the allowance can reach on accrued
8169
8191
  */
@@ -22988,6 +23010,82 @@ export type GetApi20270101ResourcesContractsTaxonomiesByIdResponses = {
22988
23010
  200: ContractsTaxonomy;
22989
23011
  };
22990
23012
  export type GetApi20270101ResourcesContractsTaxonomiesByIdResponse = GetApi20270101ResourcesContractsTaxonomiesByIdResponses[keyof GetApi20270101ResourcesContractsTaxonomiesByIdResponses];
23013
+ export type GetApi20270101ResourcesCostCentersResourceDistributionsData = {
23014
+ body?: never;
23015
+ path?: never;
23016
+ query: {
23017
+ /**
23018
+ * Type of the records to read the split of. Supported values: `expenses/expensable` (expenses, mileages and per diems).
23019
+ */
23020
+ resource_type: string;
23021
+ /**
23022
+ * IDs of the records to read the split of, at most 100 per request. For expenses, mileages and per diems, pass their `expenses_expensable_id`.
23023
+ */
23024
+ 'resource_ids[]': Array<string>;
23025
+ };
23026
+ url: '/api/2027-01-01/resources/cost_centers/resource_distributions';
23027
+ };
23028
+ export type GetApi20270101ResourcesCostCentersResourceDistributionsErrors = {
23029
+ /**
23030
+ * Bad Request (malformed_request)
23031
+ */
23032
+ 400: ErrorResponse;
23033
+ /**
23034
+ * Unauthorized (unauthorized)
23035
+ */
23036
+ 401: ErrorResponse;
23037
+ /**
23038
+ * Payment Required (payment_required)
23039
+ */
23040
+ 402: ErrorResponse;
23041
+ /**
23042
+ * Forbidden (forbidden)
23043
+ */
23044
+ 403: ErrorResponse;
23045
+ /**
23046
+ * Not Found (missing_resource)
23047
+ */
23048
+ 404: ErrorResponse;
23049
+ /**
23050
+ * Conflict (invalid_state)
23051
+ */
23052
+ 409: ErrorResponse;
23053
+ /**
23054
+ * Gone
23055
+ */
23056
+ 410: ErrorResponse;
23057
+ /**
23058
+ * Unprocessable Entity (default, validation_failed)
23059
+ */
23060
+ 422: ErrorResponse;
23061
+ /**
23062
+ * Precondition Required
23063
+ */
23064
+ 428: ErrorResponse;
23065
+ /**
23066
+ * Internal Server Error
23067
+ */
23068
+ 500: ErrorResponse;
23069
+ /**
23070
+ * Bad Gateway (malformed_resource)
23071
+ */
23072
+ 502: ErrorResponse;
23073
+ /**
23074
+ * Gateway Timeout (service_unreachable)
23075
+ */
23076
+ 504: ErrorResponse;
23077
+ };
23078
+ export type GetApi20270101ResourcesCostCentersResourceDistributionsError = GetApi20270101ResourcesCostCentersResourceDistributionsErrors[keyof GetApi20270101ResourcesCostCentersResourceDistributionsErrors];
23079
+ export type GetApi20270101ResourcesCostCentersResourceDistributionsResponses = {
23080
+ /**
23081
+ * OK
23082
+ */
23083
+ 200: {
23084
+ data?: Array<CostCentersResourceDistribution>;
23085
+ meta?: PagedIndexMeta;
23086
+ };
23087
+ };
23088
+ export type GetApi20270101ResourcesCostCentersResourceDistributionsResponse = GetApi20270101ResourcesCostCentersResourceDistributionsResponses[keyof GetApi20270101ResourcesCostCentersResourceDistributionsResponses];
22991
23089
  export type GetApi20270101ResourcesCustomFieldsFieldsData = {
22992
23090
  body?: never;
22993
23091
  path?: never;
@@ -32846,7 +32944,7 @@ export type PostApi20270101ResourcesIntegrationsSyncableSyncRunsBulkUpsertData =
32846
32944
  /**
32847
32945
  * The Factorial resource type this item maps to. Same values returned by GET /syncable_items.
32848
32946
  */
32849
- 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';
32947
+ 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';
32850
32948
  /**
32851
32949
  * Outcome of processing the item
32852
32950
  */
@@ -47401,14 +47499,14 @@ export type GetApi20270101ResourcesProjectManagementRatesData = {
47401
47499
  * If true, retrieve only rates that are not linked to a quote.
47402
47500
  */
47403
47501
  without_quote?: boolean;
47404
- /**
47405
- * Filter rates by record type
47406
- */
47407
- record_type?: string;
47408
47502
  /**
47409
47503
  * Filter rates by reference rate IDs
47410
47504
  */
47411
47505
  'reference_rate_ids[]'?: Array<string>;
47506
+ /**
47507
+ * Filter rates by record type
47508
+ */
47509
+ record_type?: string;
47412
47510
  };
47413
47511
  url: '/api/2027-01-01/resources/project_management/rates';
47414
47512
  };