@factorialco/api-client 4.0.0-beta.2027010108 → 4.0.0-beta.2027010110

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.
@@ -1160,11 +1160,11 @@ export type BankingCardPayment = {
1160
1160
  */
1161
1161
  card_id: string;
1162
1162
  /**
1163
- * The amount of the card payment.
1163
+ * The amount the card settled, in cents of `currency`, negative for a payment and positive for a refund. For a payment in another currency it is the converted amount, not what the merchant charged.
1164
1164
  */
1165
1165
  amount_cents: number;
1166
1166
  /**
1167
- * The currency of the card payment.
1167
+ * The currency the card settled the payment in, as an ISO 4217 code.
1168
1168
  */
1169
1169
  currency: string;
1170
1170
  /**
@@ -1172,11 +1172,11 @@ export type BankingCardPayment = {
1172
1172
  */
1173
1173
  merchant_name: string;
1174
1174
  /**
1175
- * The amount of the merchant.
1175
+ * The amount the merchant charged, in cents of `merchant_currency`, negative for a payment and positive for a refund. Its absolute value is what the receipt shows, while `amount_cents` is what the card settled.
1176
1176
  */
1177
1177
  merchant_amount_cents: number;
1178
1178
  /**
1179
- * The currency of the merchant.
1179
+ * The currency the merchant charged in, as an ISO 4217 code. It differs from `currency` when the card paid abroad.
1180
1180
  */
1181
1181
  merchant_currency: string;
1182
1182
  /**
@@ -1196,7 +1196,7 @@ export type BankingCardPayment = {
1196
1196
  */
1197
1197
  type: 'payment' | 'refund';
1198
1198
  /**
1199
- * The exchange rate of the card payment.
1199
+ * The rate the card used to convert `merchant_amount_cents` into `amount_cents`; 1.0 when both currencies are the same.
1200
1200
  */
1201
1201
  exchange_rate: number;
1202
1202
  /**
@@ -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
@@ -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;