@factorialco/api-client 3.0.0-beta.2026100117 → 3.0.0-beta.2026100118
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.
- package/dist/cjs/generated/index.d.ts +2 -2
- package/dist/cjs/generated/index.d.ts.map +1 -1
- package/dist/cjs/generated/index.js +2 -1
- package/dist/cjs/generated/index.js.map +1 -1
- package/dist/cjs/generated/sdk.gen.d.ts +10 -2
- package/dist/cjs/generated/sdk.gen.d.ts.map +1 -1
- package/dist/cjs/generated/sdk.gen.js +22 -5
- package/dist/cjs/generated/sdk.gen.js.map +1 -1
- package/dist/cjs/generated/types.gen.d.ts +92 -5
- package/dist/cjs/generated/types.gen.d.ts.map +1 -1
- package/dist/cjs/sdk.d.ts +3 -1
- package/dist/cjs/sdk.d.ts.map +1 -1
- package/dist/cjs/sdk.js +2 -0
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/generated/index.d.ts +2 -2
- package/dist/esm/generated/index.d.ts.map +1 -1
- package/dist/esm/generated/index.js +1 -1
- package/dist/esm/generated/index.js.map +1 -1
- package/dist/esm/generated/sdk.gen.d.ts +10 -2
- package/dist/esm/generated/sdk.gen.d.ts.map +1 -1
- package/dist/esm/generated/sdk.gen.js +17 -1
- package/dist/esm/generated/sdk.gen.js.map +1 -1
- package/dist/esm/generated/types.gen.d.ts +92 -5
- package/dist/esm/generated/types.gen.d.ts.map +1 -1
- package/dist/esm/sdk.d.ts +3 -1
- package/dist/esm/sdk.d.ts.map +1 -1
- package/dist/esm/sdk.js +3 -1
- package/dist/esm/sdk.js.map +1 -1
- package/package.json +1 -1
|
@@ -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
|
/**
|
|
@@ -19729,13 +19745,11 @@ export type PostApi20261001ResourcesProcurementPurchaseOrdersData = {
|
|
|
19729
19745
|
*/
|
|
19730
19746
|
preferred_payment_method?: 'banktransfer' | 'cash' | 'virtualcard';
|
|
19731
19747
|
/**
|
|
19732
|
-
*
|
|
19748
|
+
* 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
19749
|
*/
|
|
19734
|
-
header_field_values?:
|
|
19735
|
-
[key: string]: unknown;
|
|
19736
|
-
};
|
|
19750
|
+
header_field_values?: Array<unknown>;
|
|
19737
19751
|
/**
|
|
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.
|
|
19752
|
+
* 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
19753
|
*/
|
|
19740
19754
|
line_items?: Array<unknown>;
|
|
19741
19755
|
};
|
|
@@ -19768,6 +19782,79 @@ export type GetApi20261001ResourcesProcurementPurchaseOrdersByIdResponses = {
|
|
|
19768
19782
|
200: ProcurementPurchaseOrder;
|
|
19769
19783
|
};
|
|
19770
19784
|
export type GetApi20261001ResourcesProcurementPurchaseOrdersByIdResponse = GetApi20261001ResourcesProcurementPurchaseOrdersByIdResponses[keyof GetApi20261001ResourcesProcurementPurchaseOrdersByIdResponses];
|
|
19785
|
+
export type PutApi20261001ResourcesProcurementPurchaseOrdersByIdData = {
|
|
19786
|
+
body?: {
|
|
19787
|
+
/**
|
|
19788
|
+
* Identifier of the purchase order to update.
|
|
19789
|
+
*/
|
|
19790
|
+
id: string;
|
|
19791
|
+
/**
|
|
19792
|
+
* Company identifier, as returned by the credentials endpoint (`/resources/api_public/credentials`).
|
|
19793
|
+
*/
|
|
19794
|
+
company_id: string;
|
|
19795
|
+
/**
|
|
19796
|
+
* Formatted purchase order number with prefix, as returned by the read endpoint — send back the value you read.
|
|
19797
|
+
*/
|
|
19798
|
+
formatted_po_number: string;
|
|
19799
|
+
/**
|
|
19800
|
+
* Description or notes about the purchase order.
|
|
19801
|
+
*/
|
|
19802
|
+
description: string;
|
|
19803
|
+
/**
|
|
19804
|
+
* Preferred payment method for this purchase order. Send null to clear it.
|
|
19805
|
+
*/
|
|
19806
|
+
preferred_payment_method?: 'banktransfer' | 'cash' | 'virtualcard';
|
|
19807
|
+
/**
|
|
19808
|
+
* 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.
|
|
19809
|
+
*/
|
|
19810
|
+
status?: 'draft' | 'pending' | 'ordered' | 'partial' | 'received' | 'closed';
|
|
19811
|
+
/**
|
|
19812
|
+
* Identifier of the legal entity that owns the purchase order. Must belong to the company.
|
|
19813
|
+
*/
|
|
19814
|
+
legal_entity_id: string;
|
|
19815
|
+
/**
|
|
19816
|
+
* 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.
|
|
19817
|
+
*/
|
|
19818
|
+
cost: {
|
|
19819
|
+
[key: string]: unknown;
|
|
19820
|
+
};
|
|
19821
|
+
/**
|
|
19822
|
+
* Identifier of the vendor (Finance contact) by internal Factorial id. Null clears the vendor on template-versioned purchase orders.
|
|
19823
|
+
*/
|
|
19824
|
+
vendor_id?: string;
|
|
19825
|
+
/**
|
|
19826
|
+
* Purchase order date. Omit or send null to keep the current one.
|
|
19827
|
+
*/
|
|
19828
|
+
date?: string;
|
|
19829
|
+
/**
|
|
19830
|
+
* 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).
|
|
19831
|
+
*/
|
|
19832
|
+
deadline?: string;
|
|
19833
|
+
/**
|
|
19834
|
+
* 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.
|
|
19835
|
+
*/
|
|
19836
|
+
header_field_values_by_key?: Array<unknown>;
|
|
19837
|
+
/**
|
|
19838
|
+
* 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.
|
|
19839
|
+
*/
|
|
19840
|
+
line_items_by_key?: Array<unknown>;
|
|
19841
|
+
};
|
|
19842
|
+
path: {
|
|
19843
|
+
/**
|
|
19844
|
+
* Identifier of the purchase order to update.
|
|
19845
|
+
*/
|
|
19846
|
+
id: string;
|
|
19847
|
+
};
|
|
19848
|
+
query?: never;
|
|
19849
|
+
url: '/api/2026-10-01/resources/procurement/purchase_orders/{id}';
|
|
19850
|
+
};
|
|
19851
|
+
export type PutApi20261001ResourcesProcurementPurchaseOrdersByIdResponses = {
|
|
19852
|
+
/**
|
|
19853
|
+
* OK
|
|
19854
|
+
*/
|
|
19855
|
+
200: ProcurementPurchaseOrder;
|
|
19856
|
+
};
|
|
19857
|
+
export type PutApi20261001ResourcesProcurementPurchaseOrdersByIdResponse = PutApi20261001ResourcesProcurementPurchaseOrdersByIdResponses[keyof PutApi20261001ResourcesProcurementPurchaseOrdersByIdResponses];
|
|
19771
19858
|
export type GetApi20261001ResourcesProcurementPurchaseRequestsData = {
|
|
19772
19859
|
body?: never;
|
|
19773
19860
|
path?: never;
|