@factorialco/api-client 3.0.0-beta.2026100125 → 3.0.0-beta.2026100127

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.
@@ -1762,6 +1762,10 @@ export type ContractsContractVersion = {
1762
1762
  * the amount of money the employee earns in cents.
1763
1763
  */
1764
1764
  salary_amount?: number;
1765
+ /**
1766
+ * the currency of the salary amount, inherited from the governing legal entity.
1767
+ */
1768
+ salary_currency?: string;
1765
1769
  /**
1766
1770
  * the frequency of the salary payment.
1767
1771
  */
@@ -4077,7 +4081,7 @@ export type FinanceCategory = {
4077
4081
  */
4078
4082
  id: string;
4079
4083
  /**
4080
- * Custom label for the category
4084
+ * The category's display name — the one shown in the UI and the one a person will call it by. It is the company's own label when they renamed the category, otherwise the translated default name. Match on this, never on `identifier`, which is a stable internal key that need not resemble the name (`restaurants` is displayed as "Meals").
4081
4085
  */
4082
4086
  label: string;
4083
4087
  /**
@@ -4089,7 +4093,7 @@ export type FinanceCategory = {
4089
4093
  */
4090
4094
  parent_category_id?: string;
4091
4095
  /**
4092
- * System identifier for the category
4096
+ * Stable internal key for the category, for callers that hold one. NOT a display name and not derivable from one — `restaurants` is shown to everyone as "Meals" — so never present it to a user or match a user's wording against it; use `label` for both.
4093
4097
  */
4094
4098
  identifier: string;
4095
4099
  /**
@@ -4185,15 +4189,45 @@ export type FinanceContact = {
4185
4189
  phone_number?: string;
4186
4190
  };
4187
4191
  export type FinanceCostCenter = {
4192
+ /**
4193
+ * Factorial id of the cost center.
4194
+ */
4188
4195
  id: string;
4196
+ /**
4197
+ * Name of the cost center.
4198
+ */
4189
4199
  name: string;
4200
+ /**
4201
+ * Company id the cost center belongs to.
4202
+ */
4190
4203
  company_id: string;
4204
+ /**
4205
+ * Legal entity id the cost center belongs to.
4206
+ */
4191
4207
  legal_entity_id?: string;
4208
+ /**
4209
+ * Optional unique code of the cost center.
4210
+ */
4192
4211
  code?: string;
4212
+ /**
4213
+ * Optional free text describing the cost center.
4214
+ */
4193
4215
  description?: string;
4216
+ /**
4217
+ * Number of employees currently assigned to the cost center.
4218
+ */
4194
4219
  active_employees_count: number;
4220
+ /**
4221
+ * Number of employees ever assigned to the cost center.
4222
+ */
4195
4223
  historical_employees_count: number;
4224
+ /**
4225
+ * Whether the cost center is active or inactive.
4226
+ */
4196
4227
  status: string;
4228
+ /**
4229
+ * Date the cost center was deactivated, if inactive.
4230
+ */
4197
4231
  deactivation_date?: string;
4198
4232
  };
4199
4233
  export type FinanceCostCenterMembership = {
@@ -4224,35 +4258,35 @@ export type FinanceCostCenterMembership = {
4224
4258
  };
4225
4259
  export type FinanceFinancialDocument = {
4226
4260
  /**
4227
- * Factorial unique identifier.
4261
+ * Factorial unique identifier for the financial document.
4228
4262
  */
4229
4263
  id: string;
4230
4264
  /**
4231
- * Net amount in cents.
4265
+ * Sum of the line items before taxes, in cents. Use `total_amount_cents` for what is actually payable.
4232
4266
  */
4233
4267
  net_amount_cents?: number;
4234
4268
  /**
4235
- * Total amount in cents.
4269
+ * Total payable on the document, taxes included, in cents. This is the amount to branch on when a rule cares about how much is being spent.
4236
4270
  */
4237
4271
  total_amount_cents?: number;
4238
4272
  /**
4239
- * Document number.
4273
+ * Number the issuer printed on the document; for a purchase, the vendor's own invoice number. Not a Factorial identifier: on a purchase it is only unique per vendor, so the same number can legitimately appear on documents from two different vendors.
4240
4274
  */
4241
4275
  document_number?: string;
4242
4276
  /**
4243
- * Document currency.
4277
+ * ISO 4217 code of the currency the document is issued in, such as EUR or USD. Every amount on the document is expressed in it, so comparing amounts across documents without checking this is unsafe.
4244
4278
  */
4245
4279
  currency?: string;
4246
4280
  /**
4247
- * Current status.
4281
+ * Where the document stands on its way to being paid: `processing` while it is still being prepared, `review` while it awaits review (the value is `review`, never `pending`), `sent_to_pay` once it has been sent for payment, and `paid`. This is not an approval state: a document generated from an employee expense is created already `paid`, because the money left before Factorial ever saw it.
4248
4282
  */
4249
4283
  status: 'processing' | 'review' | 'sent_to_pay' | 'paid';
4250
4284
  /**
4251
- * Due date.
4285
+ * Date the payment falls due, as stated on the document.
4252
4286
  */
4253
4287
  due_date?: string;
4254
4288
  /**
4255
- * Document date.
4289
+ * Date the issuer put on the document. Distinct from `created_at`, which is when it reached Factorial; a document can arrive weeks after it was issued.
4256
4290
  */
4257
4291
  document_date?: string;
4258
4292
  /**
@@ -4293,11 +4327,11 @@ export type FinanceFinancialDocument = {
4293
4327
  }>;
4294
4328
  }>;
4295
4329
  /**
4296
- * Date when was fully reconciled.
4330
+ * When the document was fully matched against bank transactions. Null while any part of it remains unreconciled.
4297
4331
  */
4298
4332
  fully_reconciled_at?: string;
4299
4333
  /**
4300
- * Date when was recorded.
4334
+ * When the document was posted to accounting. Only possible once `validated_at` is set.
4301
4335
  */
4302
4336
  recorded_at?: string;
4303
4337
  /**
@@ -4305,15 +4339,15 @@ export type FinanceFinancialDocument = {
4305
4339
  */
4306
4340
  duplicate_financial_document_id?: string;
4307
4341
  /**
4308
- * Date when was validated.
4342
+ * When a person confirmed the document data is correct. Validation is what unlocks recording and payment; it is not an approval decision, and says nothing about whether the spend was authorised.
4309
4343
  */
4310
4344
  validated_at?: string;
4311
4345
  /**
4312
- * Factorial unique identifier for the user who validated the financial document.
4346
+ * Factorial unique identifier of the employee who validated the document.
4313
4347
  */
4314
4348
  validated_by_id?: string;
4315
4349
  /**
4316
- * Type of the financial document. Using "invoice" as default.
4350
+ * One of `invoice`, `receipt` or `credit_note`. A document generated from an expense is typed automatically and can flip between `receipt` and `invoice` when the employee edits the expense.
4317
4351
  */
4318
4352
  document_type: 'invoice' | 'receipt' | 'credit_note';
4319
4353
  /**
@@ -4321,7 +4355,7 @@ export type FinanceFinancialDocument = {
4321
4355
  */
4322
4356
  parent_financial_document_id?: string;
4323
4357
  /**
4324
- * Taxes total amount in cents.
4358
+ * Sum of every tax charged on the document, in cents.
4325
4359
  */
4326
4360
  taxes_total_amount_cents?: number;
4327
4361
  /**
@@ -7835,6 +7869,20 @@ export type TimeoffBlockedPeriodsPolicy = {
7835
7869
  */
7836
7870
  legal_entity_ids?: Array<string>;
7837
7871
  };
7872
+ export type TimeoffFrenchLeaveDayCount = {
7873
+ /**
7874
+ * Identifier of the leave this count belongs to
7875
+ */
7876
+ leave_id: string;
7877
+ /**
7878
+ * The counted quantity, expressed in the unit given by `unit`
7879
+ */
7880
+ amount: number;
7881
+ /**
7882
+ * Whether the amount is a number of days or of hours
7883
+ */
7884
+ unit: 'days' | 'hours';
7885
+ };
7838
7886
  export type TimeoffLeave = {
7839
7887
  /**
7840
7888
  * Identifier of the Leave
@@ -11269,10 +11317,29 @@ export type GetApi20261001ResourcesAttendanceWorkedTimesData = {
11269
11317
  body?: never;
11270
11318
  path?: never;
11271
11319
  query: {
11320
+ /**
11321
+ * Composite worked time id combining the employee_id and date, formatted as <employee_id>_<YYYY-MM-DD>.
11322
+ */
11323
+ 'ids[]'?: Array<string>;
11324
+ /**
11325
+ * Start of the date range to fetch worked times for (inclusive). Required together with end_on.
11326
+ */
11272
11327
  start_on?: string;
11328
+ /**
11329
+ * End of the date range to fetch worked times for (inclusive). Required together with start_on.
11330
+ */
11273
11331
  end_on?: string;
11332
+ /**
11333
+ * Employee IDs to filter the date-range query by. When omitted, all attendable employees are returned.
11334
+ */
11274
11335
  'employee_ids[]'?: Array<string>;
11336
+ /**
11337
+ * Whether to include the time range category on each worked time block.
11338
+ */
11275
11339
  include_time_range_category: boolean;
11340
+ /**
11341
+ * Whether to include employees excluded from attendance (attendable=false) in the result. Forced to true when filtering by a single employee, so their historical worked time is returned even if they are no longer attendable.
11342
+ */
11276
11343
  include_non_attendable_employees: boolean;
11277
11344
  };
11278
11345
  url: '/api/2026-10-01/resources/attendance/worked_times';
@@ -11287,6 +11354,24 @@ export type GetApi20261001ResourcesAttendanceWorkedTimesResponses = {
11287
11354
  };
11288
11355
  };
11289
11356
  export type GetApi20261001ResourcesAttendanceWorkedTimesResponse = GetApi20261001ResourcesAttendanceWorkedTimesResponses[keyof GetApi20261001ResourcesAttendanceWorkedTimesResponses];
11357
+ export type GetApi20261001ResourcesAttendanceWorkedTimesByIdData = {
11358
+ body?: never;
11359
+ path: {
11360
+ /**
11361
+ * Composite worked time id combining the employee_id and date, formatted as <employee_id>_<YYYY-MM-DD>.
11362
+ */
11363
+ id: string;
11364
+ };
11365
+ query?: never;
11366
+ url: '/api/2026-10-01/resources/attendance/worked_times/{id}';
11367
+ };
11368
+ export type GetApi20261001ResourcesAttendanceWorkedTimesByIdResponses = {
11369
+ /**
11370
+ * OK
11371
+ */
11372
+ 200: AttendanceWorkedTime;
11373
+ };
11374
+ export type GetApi20261001ResourcesAttendanceWorkedTimesByIdResponse = GetApi20261001ResourcesAttendanceWorkedTimesByIdResponses[keyof GetApi20261001ResourcesAttendanceWorkedTimesByIdResponses];
11290
11375
  export type GetApi20261001ResourcesBankingBankAccountsData = {
11291
11376
  body?: never;
11292
11377
  path?: never;
@@ -15842,6 +15927,9 @@ export type GetApi20261001ResourcesFinanceCostCentersData = {
15842
15927
  path?: never;
15843
15928
  query?: {
15844
15929
  'ids[]'?: Array<string>;
15930
+ /**
15931
+ * Company id to filter cost centers by.
15932
+ */
15845
15933
  company_id?: string;
15846
15934
  'legal_entity_ids[]'?: Array<string>;
15847
15935
  include_actives_on_date?: string;
@@ -15861,10 +15949,25 @@ export type GetApi20261001ResourcesFinanceCostCentersResponses = {
15861
15949
  export type GetApi20261001ResourcesFinanceCostCentersResponse = GetApi20261001ResourcesFinanceCostCentersResponses[keyof GetApi20261001ResourcesFinanceCostCentersResponses];
15862
15950
  export type PostApi20261001ResourcesFinanceCostCentersData = {
15863
15951
  body?: {
15952
+ /**
15953
+ * Name of the cost center.
15954
+ */
15864
15955
  name: string;
15956
+ /**
15957
+ * Company id the cost center belongs to.
15958
+ */
15865
15959
  company_id: string;
15960
+ /**
15961
+ * Legal entity id the cost center belongs to.
15962
+ */
15866
15963
  legal_entity_id?: string;
15964
+ /**
15965
+ * Optional unique code of the cost center.
15966
+ */
15867
15967
  code?: string;
15968
+ /**
15969
+ * Optional free text describing the cost center.
15970
+ */
15868
15971
  description?: string;
15869
15972
  };
15870
15973
  path?: never;
@@ -15910,11 +16013,26 @@ export type GetApi20261001ResourcesFinanceCostCentersByIdResponses = {
15910
16013
  export type GetApi20261001ResourcesFinanceCostCentersByIdResponse = GetApi20261001ResourcesFinanceCostCentersByIdResponses[keyof GetApi20261001ResourcesFinanceCostCentersByIdResponses];
15911
16014
  export type PostApi20261001ResourcesFinanceCostCentersEditData = {
15912
16015
  body?: {
16016
+ /**
16017
+ * Id of the cost center to edit.
16018
+ */
15913
16019
  id: string;
16020
+ /**
16021
+ * New name of the cost center.
16022
+ */
15914
16023
  name?: string;
16024
+ /**
16025
+ * New code of the cost center.
16026
+ */
15915
16027
  code?: string;
16028
+ /**
16029
+ * New description of the cost center.
16030
+ */
15916
16031
  description?: string;
15917
- company_id: string;
16032
+ /**
16033
+ * Deprecated and unused; the company is derived from the authenticated credentials.
16034
+ */
16035
+ company_id?: string;
15918
16036
  };
15919
16037
  path?: never;
15920
16038
  query?: never;
@@ -16817,6 +16935,10 @@ export type GetApi20261001ResourcesIntegrationsSyncRunsData = {
16817
16935
  body?: never;
16818
16936
  path?: never;
16819
16937
  query: {
16938
+ /**
16939
+ * identifier of sync run
16940
+ */
16941
+ 'ids[]'?: Array<string>;
16820
16942
  /**
16821
16943
  * UUID of the marketplace integration to filter sync runs by.
16822
16944
  */
@@ -16838,6 +16960,46 @@ export type GetApi20261001ResourcesIntegrationsSyncRunsResponses = {
16838
16960
  };
16839
16961
  };
16840
16962
  export type GetApi20261001ResourcesIntegrationsSyncRunsResponse = GetApi20261001ResourcesIntegrationsSyncRunsResponses[keyof GetApi20261001ResourcesIntegrationsSyncRunsResponses];
16963
+ export type PostApi20261001ResourcesIntegrationsSyncRunsData = {
16964
+ body?: {
16965
+ /**
16966
+ * Identifier of the company the sync run belongs to.
16967
+ */
16968
+ company_id: string;
16969
+ /**
16970
+ * UUID of the marketplace integration to create a sync run for.
16971
+ */
16972
+ marketplace_integration_uuid: string;
16973
+ };
16974
+ path?: never;
16975
+ query?: never;
16976
+ url: '/api/2026-10-01/resources/integrations/sync_runs';
16977
+ };
16978
+ export type PostApi20261001ResourcesIntegrationsSyncRunsResponses = {
16979
+ /**
16980
+ * CREATED
16981
+ */
16982
+ 201: IntegrationsSyncRun;
16983
+ };
16984
+ export type PostApi20261001ResourcesIntegrationsSyncRunsResponse = PostApi20261001ResourcesIntegrationsSyncRunsResponses[keyof PostApi20261001ResourcesIntegrationsSyncRunsResponses];
16985
+ export type GetApi20261001ResourcesIntegrationsSyncRunsByIdData = {
16986
+ body?: never;
16987
+ path: {
16988
+ /**
16989
+ * identifier of sync run
16990
+ */
16991
+ id: string;
16992
+ };
16993
+ query?: never;
16994
+ url: '/api/2026-10-01/resources/integrations/sync_runs/{id}';
16995
+ };
16996
+ export type GetApi20261001ResourcesIntegrationsSyncRunsByIdResponses = {
16997
+ /**
16998
+ * OK
16999
+ */
17000
+ 200: IntegrationsSyncRun;
17001
+ };
17002
+ export type GetApi20261001ResourcesIntegrationsSyncRunsByIdResponse = GetApi20261001ResourcesIntegrationsSyncRunsByIdResponses[keyof GetApi20261001ResourcesIntegrationsSyncRunsByIdResponses];
16841
17003
  export type PostApi20261001ResourcesIntegrationsSyncRunOutputsData = {
16842
17004
  body?: {
16843
17005
  /**
@@ -17033,7 +17195,7 @@ export type PostApi20261001ResourcesIntegrationsSyncableSyncRunsBulkUpsertData =
17033
17195
  /**
17034
17196
  * Outcome of processing the item
17035
17197
  */
17036
- status: 'success' | 'failed' | 'invalid';
17198
+ status: 'running' | 'success' | 'failed' | 'invalid';
17037
17199
  /**
17038
17200
  * The Factorial record this item resolved to (link). Only fills a missing link; re-linking to a different record is rejected.
17039
17201
  */
@@ -24155,6 +24317,43 @@ export type PutApi20261001ResourcesTimeoffBlockedPeriodsByIdResponses = {
24155
24317
  200: TimeoffBlockedPeriodsPolicy;
24156
24318
  };
24157
24319
  export type PutApi20261001ResourcesTimeoffBlockedPeriodsByIdResponse = PutApi20261001ResourcesTimeoffBlockedPeriodsByIdResponses[keyof PutApi20261001ResourcesTimeoffBlockedPeriodsByIdResponses];
24320
+ export type GetApi20261001ResourcesTimeoffFrenchLeaveDayCountsData = {
24321
+ body?: never;
24322
+ path?: never;
24323
+ query: {
24324
+ /**
24325
+ * Only return day counts for these leaves. Required unless `from` and `to` are sent
24326
+ */
24327
+ 'leave_ids[]'?: Array<string>;
24328
+ /**
24329
+ * Only return day counts for leaves belonging to these employees
24330
+ */
24331
+ 'employee_ids[]'?: Array<string>;
24332
+ /**
24333
+ * Start of the period the count is computed over (YYYY-MM-DD). Leaves are filtered to those overlapping the period, and a leave extending beyond it is counted only for the days inside. Must be sent together with `to`. Required unless `leave_ids` is sent.
24334
+ */
24335
+ from?: string;
24336
+ /**
24337
+ * End of the period the count is computed over (YYYY-MM-DD). Must be sent together with `from`. Required unless `leave_ids` is sent.
24338
+ */
24339
+ to?: string;
24340
+ /**
24341
+ * Include leaves that have been deleted
24342
+ */
24343
+ include_deleted: boolean;
24344
+ };
24345
+ url: '/api/2026-10-01/resources/timeoff/french_leave_day_counts';
24346
+ };
24347
+ export type GetApi20261001ResourcesTimeoffFrenchLeaveDayCountsResponses = {
24348
+ /**
24349
+ * OK
24350
+ */
24351
+ 200: {
24352
+ data?: Array<TimeoffFrenchLeaveDayCount>;
24353
+ meta?: PagedIndexMeta;
24354
+ };
24355
+ };
24356
+ export type GetApi20261001ResourcesTimeoffFrenchLeaveDayCountsResponse = GetApi20261001ResourcesTimeoffFrenchLeaveDayCountsResponses[keyof GetApi20261001ResourcesTimeoffFrenchLeaveDayCountsResponses];
24158
24357
  export type GetApi20261001ResourcesTimeoffLeavesData = {
24159
24358
  body?: never;
24160
24359
  path?: never;