@factorialco/api-client 3.0.0-beta.2026100109 → 3.0.0-beta.2026100110

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.
@@ -5727,6 +5727,70 @@ export type PostsPost = {
5727
5727
  posts_group_id?: string;
5728
5728
  comments_count: number;
5729
5729
  };
5730
+ export type ProcurementPoFieldValue = {
5731
+ /**
5732
+ * The id of the field value
5733
+ */
5734
+ id: string;
5735
+ /**
5736
+ * Identifier of the company
5737
+ */
5738
+ company_id: string;
5739
+ /**
5740
+ * The purchase order this value belongs to
5741
+ */
5742
+ purchase_order_id: string;
5743
+ /**
5744
+ * The field definition this value corresponds to
5745
+ */
5746
+ field_definition_id: string;
5747
+ /**
5748
+ * The line item this value belongs to (null for header-level values)
5749
+ */
5750
+ line_item_id?: string;
5751
+ /**
5752
+ * The stored value as a string (type-cast based on field definition)
5753
+ */
5754
+ value?: string;
5755
+ /**
5756
+ * Human-readable display name for entity-type fields (resolved at read time)
5757
+ */
5758
+ display_value?: string;
5759
+ /**
5760
+ * When this field value was created
5761
+ */
5762
+ created_at: string;
5763
+ /**
5764
+ * When this field value was last updated
5765
+ */
5766
+ updated_at: string;
5767
+ };
5768
+ export type ProcurementPoLineItem = {
5769
+ /**
5770
+ * The id of the line item
5771
+ */
5772
+ id: string;
5773
+ /**
5774
+ * Identifier of the company
5775
+ */
5776
+ company_id: string;
5777
+ /**
5778
+ * The purchase order this line item belongs to
5779
+ */
5780
+ purchase_order_id: string;
5781
+ /**
5782
+ * The display position of the line item
5783
+ */
5784
+ position: number;
5785
+ /**
5786
+ * When this line item was created
5787
+ */
5788
+ created_at: string;
5789
+ /**
5790
+ * When this line item was last updated
5791
+ */
5792
+ updated_at: string;
5793
+ };
5730
5794
  export type ProcurementPoTemplate = {
5731
5795
  /**
5732
5796
  * The id of the PO template
@@ -5923,6 +5987,10 @@ export type ProcurementPurchaseOrder = {
5923
5987
  * Formatted purchase order number with prefix (e.g., PO-00001)
5924
5988
  */
5925
5989
  formatted_po_number: string;
5990
+ /**
5991
+ * 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.
5992
+ */
5993
+ po_template_version_id?: string;
5926
5994
  };
5927
5995
  export type ProcurementPurchaseRequest = {
5928
5996
  /**
@@ -11062,6 +11130,74 @@ export type GetApi20261001ResourcesCompensationsEmployeesCompensationsResponses
11062
11130
  };
11063
11131
  };
11064
11132
  export type GetApi20261001ResourcesCompensationsEmployeesCompensationsResponse = GetApi20261001ResourcesCompensationsEmployeesCompensationsResponses[keyof GetApi20261001ResourcesCompensationsEmployeesCompensationsResponses];
11133
+ export type PostApi20261001ResourcesCompensationsEmployeesCompensationsData = {
11134
+ body?: {
11135
+ /**
11136
+ * Parent payroll run id, refers to compensations/payroll_runs endpoint.
11137
+ */
11138
+ payroll_run_id: string;
11139
+ /**
11140
+ * Employee id (participant of the payroll run), refers to employees/employees endpoint.
11141
+ */
11142
+ employee_id: string;
11143
+ /**
11144
+ * Payroll concept id, refers to compensations/concepts endpoint.
11145
+ */
11146
+ concept_id: string;
11147
+ /**
11148
+ * Amount value (nullable; required when is_overwritten=true)
11149
+ */
11150
+ amount?: number;
11151
+ /**
11152
+ * When true, the provided `amount` becomes `amount_overwritten`
11153
+ */
11154
+ is_overwritten: boolean;
11155
+ /**
11156
+ * Amount strategy discriminator
11157
+ */
11158
+ strategy_type?: 'compensations_fixed_amount_strategy' | 'compensations_variable_amount_strategy' | 'compensations_per_worked_day_amount_strategy';
11159
+ /**
11160
+ * Unit symbol (e.g. `EUR`)
11161
+ */
11162
+ unit_symbol?: string;
11163
+ /**
11164
+ * Upper limit for variable strategy (ignored for fixed / per_worked_day)
11165
+ */
11166
+ upper_limit?: number;
11167
+ /**
11168
+ * Per-day rate (only used for per_worked_day strategy)
11169
+ */
11170
+ per_day_rate?: number;
11171
+ };
11172
+ path?: never;
11173
+ query?: never;
11174
+ url: '/api/2026-10-01/resources/compensations/employees_compensations';
11175
+ };
11176
+ export type PostApi20261001ResourcesCompensationsEmployeesCompensationsResponses = {
11177
+ /**
11178
+ * CREATED
11179
+ */
11180
+ 201: CompensationsEmployeesCompensation;
11181
+ };
11182
+ export type PostApi20261001ResourcesCompensationsEmployeesCompensationsResponse = PostApi20261001ResourcesCompensationsEmployeesCompensationsResponses[keyof PostApi20261001ResourcesCompensationsEmployeesCompensationsResponses];
11183
+ export type DeleteApi20261001ResourcesCompensationsEmployeesCompensationsByIdData = {
11184
+ body?: never;
11185
+ path: {
11186
+ /**
11187
+ * Employee compensation id to delete
11188
+ */
11189
+ id: string;
11190
+ };
11191
+ query?: never;
11192
+ url: '/api/2026-10-01/resources/compensations/employees_compensations/{id}';
11193
+ };
11194
+ export type DeleteApi20261001ResourcesCompensationsEmployeesCompensationsByIdResponses = {
11195
+ /**
11196
+ * OK
11197
+ */
11198
+ 200: CompensationsEmployeesCompensation;
11199
+ };
11200
+ export type DeleteApi20261001ResourcesCompensationsEmployeesCompensationsByIdResponse = DeleteApi20261001ResourcesCompensationsEmployeesCompensationsByIdResponses[keyof DeleteApi20261001ResourcesCompensationsEmployeesCompensationsByIdResponses];
11065
11201
  export type GetApi20261001ResourcesCompensationsEmployeesCompensationsByIdData = {
11066
11202
  body?: never;
11067
11203
  path: {
@@ -11080,6 +11216,54 @@ export type GetApi20261001ResourcesCompensationsEmployeesCompensationsByIdRespon
11080
11216
  200: CompensationsEmployeesCompensation;
11081
11217
  };
11082
11218
  export type GetApi20261001ResourcesCompensationsEmployeesCompensationsByIdResponse = GetApi20261001ResourcesCompensationsEmployeesCompensationsByIdResponses[keyof GetApi20261001ResourcesCompensationsEmployeesCompensationsByIdResponses];
11219
+ export type PutApi20261001ResourcesCompensationsEmployeesCompensationsByIdData = {
11220
+ body?: {
11221
+ /**
11222
+ * Employee compensation id
11223
+ */
11224
+ id: string;
11225
+ amount?: number;
11226
+ /**
11227
+ * Manual override of the strategy-computed amount; not allowed on fixed-strategy rows (422 `overwrite_not_applicable`)
11228
+ */
11229
+ amount_overwritten?: number;
11230
+ /**
11231
+ * When true, the provided `amount` becomes `amount_overwritten`
11232
+ */
11233
+ is_overwritten: boolean;
11234
+ /**
11235
+ * Amount strategy discriminator
11236
+ */
11237
+ strategy_type?: 'compensations_fixed_amount_strategy' | 'compensations_variable_amount_strategy' | 'compensations_per_worked_day_amount_strategy';
11238
+ /**
11239
+ * Unit symbol (e.g. `EUR`)
11240
+ */
11241
+ unit_symbol?: string;
11242
+ /**
11243
+ * Upper limit for variable-strategy compensations (nullable; ignored on fixed / per_worked_day strategies)
11244
+ */
11245
+ upper_limit?: number;
11246
+ /**
11247
+ * Per-day rate for per_worked_day strategies (nullable; ignored on fixed / variable strategies)
11248
+ */
11249
+ per_day_rate?: number;
11250
+ };
11251
+ path: {
11252
+ /**
11253
+ * Employee compensation id
11254
+ */
11255
+ id: string;
11256
+ };
11257
+ query?: never;
11258
+ url: '/api/2026-10-01/resources/compensations/employees_compensations/{id}';
11259
+ };
11260
+ export type PutApi20261001ResourcesCompensationsEmployeesCompensationsByIdResponses = {
11261
+ /**
11262
+ * OK
11263
+ */
11264
+ 200: CompensationsEmployeesCompensation;
11265
+ };
11266
+ export type PutApi20261001ResourcesCompensationsEmployeesCompensationsByIdResponse = PutApi20261001ResourcesCompensationsEmployeesCompensationsByIdResponses[keyof PutApi20261001ResourcesCompensationsEmployeesCompensationsByIdResponses];
11083
11267
  export type GetApi20261001ResourcesCompensationsPayrollResultsData = {
11084
11268
  body?: never;
11085
11269
  path?: never;
@@ -19022,6 +19206,100 @@ export type PutApi20261001ResourcesPostsPostsByIdResponses = {
19022
19206
  200: PostsPost;
19023
19207
  };
19024
19208
  export type PutApi20261001ResourcesPostsPostsByIdResponse = PutApi20261001ResourcesPostsPostsByIdResponses[keyof PutApi20261001ResourcesPostsPostsByIdResponses];
19209
+ export type GetApi20261001ResourcesProcurementPoFieldValuesData = {
19210
+ body?: never;
19211
+ path?: never;
19212
+ query?: {
19213
+ /**
19214
+ * An array of field value IDs to filter by.
19215
+ */
19216
+ 'ids[]'?: Array<string>;
19217
+ /**
19218
+ * An array of purchase order IDs to filter values for.
19219
+ */
19220
+ 'purchase_order_ids[]'?: Array<string>;
19221
+ /**
19222
+ * Restrict results to values belonging to these line items. Header-level values (not associated with any line item) are never returned when this is set. Mutually exclusive with `exclude_line_items=true` — combining both returns no results.
19223
+ */
19224
+ 'line_item_ids[]'?: Array<string>;
19225
+ /**
19226
+ * When true, excludes per-line values and returns only values not associated with any line item (i.e. header-level). Mutually exclusive with `line_item_ids`.
19227
+ */
19228
+ exclude_line_items?: boolean;
19229
+ };
19230
+ url: '/api/2026-10-01/resources/procurement/po_field_values';
19231
+ };
19232
+ export type GetApi20261001ResourcesProcurementPoFieldValuesResponses = {
19233
+ /**
19234
+ * OK
19235
+ */
19236
+ 200: {
19237
+ data?: Array<ProcurementPoFieldValue>;
19238
+ meta?: PagedIndexMeta;
19239
+ };
19240
+ };
19241
+ export type GetApi20261001ResourcesProcurementPoFieldValuesResponse = GetApi20261001ResourcesProcurementPoFieldValuesResponses[keyof GetApi20261001ResourcesProcurementPoFieldValuesResponses];
19242
+ export type GetApi20261001ResourcesProcurementPoFieldValuesByIdData = {
19243
+ body?: never;
19244
+ path: {
19245
+ /**
19246
+ * An array of field value IDs to filter by.
19247
+ */
19248
+ id: string;
19249
+ };
19250
+ query?: never;
19251
+ url: '/api/2026-10-01/resources/procurement/po_field_values/{id}';
19252
+ };
19253
+ export type GetApi20261001ResourcesProcurementPoFieldValuesByIdResponses = {
19254
+ /**
19255
+ * OK
19256
+ */
19257
+ 200: ProcurementPoFieldValue;
19258
+ };
19259
+ export type GetApi20261001ResourcesProcurementPoFieldValuesByIdResponse = GetApi20261001ResourcesProcurementPoFieldValuesByIdResponses[keyof GetApi20261001ResourcesProcurementPoFieldValuesByIdResponses];
19260
+ export type GetApi20261001ResourcesProcurementPoLineItemsData = {
19261
+ body?: never;
19262
+ path?: never;
19263
+ query?: {
19264
+ /**
19265
+ * An array of line item IDs to filter by.
19266
+ */
19267
+ 'ids[]'?: Array<string>;
19268
+ /**
19269
+ * An array of purchase order IDs to filter line items for.
19270
+ */
19271
+ 'purchase_order_ids[]'?: Array<string>;
19272
+ };
19273
+ url: '/api/2026-10-01/resources/procurement/po_line_items';
19274
+ };
19275
+ export type GetApi20261001ResourcesProcurementPoLineItemsResponses = {
19276
+ /**
19277
+ * OK
19278
+ */
19279
+ 200: {
19280
+ data?: Array<ProcurementPoLineItem>;
19281
+ meta?: PagedIndexMeta;
19282
+ };
19283
+ };
19284
+ export type GetApi20261001ResourcesProcurementPoLineItemsResponse = GetApi20261001ResourcesProcurementPoLineItemsResponses[keyof GetApi20261001ResourcesProcurementPoLineItemsResponses];
19285
+ export type GetApi20261001ResourcesProcurementPoLineItemsByIdData = {
19286
+ body?: never;
19287
+ path: {
19288
+ /**
19289
+ * An array of line item IDs to filter by.
19290
+ */
19291
+ id: string;
19292
+ };
19293
+ query?: never;
19294
+ url: '/api/2026-10-01/resources/procurement/po_line_items/{id}';
19295
+ };
19296
+ export type GetApi20261001ResourcesProcurementPoLineItemsByIdResponses = {
19297
+ /**
19298
+ * OK
19299
+ */
19300
+ 200: ProcurementPoLineItem;
19301
+ };
19302
+ export type GetApi20261001ResourcesProcurementPoLineItemsByIdResponse = GetApi20261001ResourcesProcurementPoLineItemsByIdResponses[keyof GetApi20261001ResourcesProcurementPoLineItemsByIdResponses];
19025
19303
  export type GetApi20261001ResourcesProcurementPoTemplatesData = {
19026
19304
  body?: never;
19027
19305
  path?: never;