@factorialco/api-client 3.0.0-beta.2026100117 → 3.0.0-beta.2026100119

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.
@@ -5983,6 +5983,10 @@ export type ProcurementPurchaseOrder = {
5983
5983
  * Date when the purchase order was created
5984
5984
  */
5985
5985
  date: string;
5986
+ /**
5987
+ * Deadline date for the purchase order delivery or completion. Writable through the update endpoint (omitted or null keeps it); readable here so the GET -> modify -> PUT roundtrip is complete.
5988
+ */
5989
+ deadline?: string;
5986
5990
  /**
5987
5991
  * Identifier of the vendor (contact) associated with this purchase order
5988
5992
  */
@@ -6003,10 +6007,22 @@ export type ProcurementPurchaseOrder = {
6003
6007
  * Formatted purchase order number with prefix (e.g., PO-00001)
6004
6008
  */
6005
6009
  formatted_po_number: string;
6010
+ /**
6011
+ * Preferred payment method for this purchase order
6012
+ */
6013
+ preferred_payment_method?: 'banktransfer' | 'cash' | 'virtualcard';
6006
6014
  /**
6007
6015
  * Identifier of the pinned PO template version this purchase order uses. Fetch that version (and its field definitions) to interpret the purchase order's header and line-item field keys. Null for legacy purchase orders created without a template.
6008
6016
  */
6009
6017
  po_template_version_id?: string;
6018
+ /**
6019
+ * Custom header field values, addressed by the field_key of the purchase order's PINNED template version, as an array of `{field_key, value}` pairs — exactly the shape the update endpoint accepts, so a GET -> modify -> PUT roundtrip works verbatim. Predefined fields (vendor, order_date, currency, due_date, payment_method, legal_entity) surface as top-level parameters instead, and computed or hidden values never appear (they are preserved server-side on update). Null for purchase orders without a template version.
6020
+ */
6021
+ header_field_values_by_key?: Array<unknown>;
6022
+ /**
6023
+ * Line items with their field values addressed by the field_key of the purchase order's PINNED template version — the same shape the update endpoint accepts: modify and send the whole set back. Rows are addressed by id (rows without an id are created, persisted rows missing from the set are deleted). Null for purchase orders without a template version.
6024
+ */
6025
+ line_items_by_key?: Array<unknown>;
6010
6026
  };
6011
6027
  export type ProcurementPurchaseRequest = {
6012
6028
  /**
@@ -10707,7 +10723,7 @@ export type GetApi20261001ResourcesBookkeepersManagementIncidencesData = {
10707
10723
  */
10708
10724
  ends_on?: string;
10709
10725
  /**
10710
- * A list of types. It can be any of the following address, bank, cost_center, contract, gender, hiring, id, irpf, legal_entity, manual_incidence, name, nationality, parental, phone_number, sick, tax_id, termination, workplace
10726
+ * A list of types. It can be any of the following address, bank, cost_center, contract, gender, health_insurance, hiring, id, irpf, legal_entity, manual_incidence, name, nationality, parental, permits_and_certificates, phone_number, sick, tax_id, taxes_and_deductions, termination, work_activity, workplace
10711
10727
  */
10712
10728
  'type[]'?: Array<string>;
10713
10729
  /**
@@ -15906,6 +15922,10 @@ export type GetApi20261001ResourcesIntegrationsSyncRunsData = {
15906
15922
  body?: never;
15907
15923
  path?: never;
15908
15924
  query: {
15925
+ /**
15926
+ * UUID of the marketplace integration to filter sync runs by.
15927
+ */
15928
+ marketplace_integration_uuid: string;
15909
15929
  /**
15910
15930
  * Filter sync runs by their creation timestamp (`created_at`), on or after this timestamp (inclusive).
15911
15931
  */
@@ -19729,13 +19749,11 @@ export type PostApi20261001ResourcesProcurementPurchaseOrdersData = {
19729
19749
  */
19730
19750
  preferred_payment_method?: 'banktransfer' | 'cash' | 'virtualcard';
19731
19751
  /**
19732
- * Map of field_key => value for the header fields of the ACTIVE purchase order template version. Only custom (non-predefined, non-computed) field keys are accepted; predefined fields (vendor, order_date, currency, due_date, payment_method, legal_entity) are populated from the corresponding top-level parameters. Reference fields (employee, cost_center, project, tax_rate, team) take the referenced internal id as the value.
19752
+ * Header field values of the ACTIVE purchase order template version, as an array of `{field_key, value}` pairs. Only custom (non-predefined, non-computed) field keys are accepted; predefined fields (vendor, order_date, currency, due_date, payment_method, legal_entity) are populated from the corresponding top-level parameters. Reference fields (employee, cost_center, project, tax_rate, team) take the referenced internal id as the value. If a field_key appears more than once, the last occurrence wins.
19733
19753
  */
19734
- header_field_values?: {
19735
- [key: string]: unknown;
19736
- };
19754
+ header_field_values?: Array<unknown>;
19737
19755
  /**
19738
- * Line items of the purchase order, each addressed by the line-item field keys of the ACTIVE template version (e.g. concept, quantity, unit_price, tax_rate). Computed keys (subtotal, tax_amount, total, discount_amount) are derived server-side and rejected as input.
19756
+ * Line items of the purchase order, each carrying its values as an array of `{field_key, value}` pairs addressed by the line-item field keys of the ACTIVE template version (e.g. concept, quantity, unit_price, tax_rate). Computed keys (subtotal, tax_amount, total, discount_amount) are derived server-side and rejected as input.
19739
19757
  */
19740
19758
  line_items?: Array<unknown>;
19741
19759
  };
@@ -19768,6 +19786,79 @@ export type GetApi20261001ResourcesProcurementPurchaseOrdersByIdResponses = {
19768
19786
  200: ProcurementPurchaseOrder;
19769
19787
  };
19770
19788
  export type GetApi20261001ResourcesProcurementPurchaseOrdersByIdResponse = GetApi20261001ResourcesProcurementPurchaseOrdersByIdResponses[keyof GetApi20261001ResourcesProcurementPurchaseOrdersByIdResponses];
19789
+ export type PutApi20261001ResourcesProcurementPurchaseOrdersByIdData = {
19790
+ body?: {
19791
+ /**
19792
+ * Identifier of the purchase order to update.
19793
+ */
19794
+ id: string;
19795
+ /**
19796
+ * Company identifier, as returned by the credentials endpoint (`/resources/api_public/credentials`).
19797
+ */
19798
+ company_id: string;
19799
+ /**
19800
+ * Formatted purchase order number with prefix, as returned by the read endpoint — send back the value you read.
19801
+ */
19802
+ formatted_po_number: string;
19803
+ /**
19804
+ * Description or notes about the purchase order.
19805
+ */
19806
+ description: string;
19807
+ /**
19808
+ * Preferred payment method for this purchase order. Send null to clear it.
19809
+ */
19810
+ preferred_payment_method?: 'banktransfer' | 'cash' | 'virtualcard';
19811
+ /**
19812
+ * Status of the purchase order. Omitted or null keeps the current status; send a new one to transition. Once closed, the purchase order becomes immutable.
19813
+ */
19814
+ status?: 'draft' | 'pending' | 'ordered' | 'partial' | 'received' | 'closed';
19815
+ /**
19816
+ * Identifier of the legal entity that owns the purchase order. Must belong to the company.
19817
+ */
19818
+ legal_entity_id: string;
19819
+ /**
19820
+ * Total cost of the purchase order, as returned by the read endpoint — send back what you read. The currency is applied as sent; on template-versioned purchase orders the amounts are owned by the line items and recomputed server-side.
19821
+ */
19822
+ cost: {
19823
+ [key: string]: unknown;
19824
+ };
19825
+ /**
19826
+ * Identifier of the vendor (Finance contact) by internal Factorial id. Null clears the vendor on template-versioned purchase orders.
19827
+ */
19828
+ vendor_id?: string;
19829
+ /**
19830
+ * Purchase order date. Omit or send null to keep the current one.
19831
+ */
19832
+ date?: string;
19833
+ /**
19834
+ * Deadline date for the purchase order delivery or completion. Omitted or null keeps the current deadline (clearing a deadline through this endpoint is not supported).
19835
+ */
19836
+ deadline?: string;
19837
+ /**
19838
+ * Header field values of the purchase order's template version, as an array of `{field_key, value}` pairs — the same shape the read returns. Replaced as sent: send the complete set; an empty array deletes all custom header values, and omitting the field leaves them untouched. Only custom field keys are accepted; predefined fields (vendor, order_date, currency, due_date, payment_method, legal_entity) come from the corresponding top-level parameters. Reference fields take the referenced id as the value. If a field_key appears more than once, the last occurrence wins.
19839
+ */
19840
+ header_field_values_by_key?: Array<unknown>;
19841
+ /**
19842
+ * Line items of the purchase order, replaced as sent — the same shape the read returns. Rows with an id update the matching line item, rows without an id create new ones, and persisted rows missing from the set are deleted. Send an empty array to remove all line items, or omit the field to leave them untouched. Values travel as `{field_key, value}` pairs; computed keys (subtotal, tax_amount, total, discount_amount) are derived server-side and rejected as input.
19843
+ */
19844
+ line_items_by_key?: Array<unknown>;
19845
+ };
19846
+ path: {
19847
+ /**
19848
+ * Identifier of the purchase order to update.
19849
+ */
19850
+ id: string;
19851
+ };
19852
+ query?: never;
19853
+ url: '/api/2026-10-01/resources/procurement/purchase_orders/{id}';
19854
+ };
19855
+ export type PutApi20261001ResourcesProcurementPurchaseOrdersByIdResponses = {
19856
+ /**
19857
+ * OK
19858
+ */
19859
+ 200: ProcurementPurchaseOrder;
19860
+ };
19861
+ export type PutApi20261001ResourcesProcurementPurchaseOrdersByIdResponse = PutApi20261001ResourcesProcurementPurchaseOrdersByIdResponses[keyof PutApi20261001ResourcesProcurementPurchaseOrdersByIdResponses];
19771
19862
  export type GetApi20261001ResourcesProcurementPurchaseRequestsData = {
19772
19863
  body?: never;
19773
19864
  path?: never;
@@ -20407,6 +20498,10 @@ export type PostApi20261001ResourcesProjectManagementProjectsData = {
20407
20498
  * Array of employee IDs who are project managers
20408
20499
  */
20409
20500
  project_managers?: Array<string>;
20501
+ /**
20502
+ * Array of employee IDs who are project viewers
20503
+ */
20504
+ project_viewers?: Array<string>;
20410
20505
  /**
20411
20506
  * Whether the project is billable to clients
20412
20507
  */
@@ -21716,6 +21811,10 @@ export type PostApi20261001ResourcesTasksTasksData = {
21716
21811
  * Employees assigned to the task, assignee_id references to access_id.
21717
21812
  */
21718
21813
  assignee_ids?: Array<string>;
21814
+ /**
21815
+ * employee that will be set as the author of the task. Only taken into account when authenticating with an API key, requests performed on behalf of a user always use that user as the author. When omitted, the task is authored by the first active employee of the company.
21816
+ */
21817
+ author_employee_id?: string;
21719
21818
  /**
21720
21819
  * status of the task (todo | in_progress | done | discarded).
21721
21820
  */
@@ -21829,6 +21928,10 @@ export type PostApi20261001ResourcesTasksTasksBulkCreateData = {
21829
21928
  * Employees assigned to the task, assignee_id references to access_id.
21830
21929
  */
21831
21930
  assignee_ids?: Array<string>;
21931
+ /**
21932
+ * employee that will be set as the author of the tasks. Only taken into account when authenticating with an API key, requests performed on behalf of a user always use that user as the author. When omitted, the tasks are authored by the first active employee of the company.
21933
+ */
21934
+ author_employee_id?: string;
21832
21935
  /**
21833
21936
  * status of the task (todo | in_progress | done | discarded).
21834
21937
  */