@factorialco/api-client 3.0.0-beta.2026100106 → 3.0.0-beta.2026100107
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 +15 -8
- package/dist/cjs/generated/index.js.map +1 -1
- package/dist/cjs/generated/sdk.gen.d.ts +47 -1
- package/dist/cjs/generated/sdk.gen.d.ts.map +1 -1
- package/dist/cjs/generated/sdk.gen.js +94 -8
- package/dist/cjs/generated/sdk.gen.js.map +1 -1
- package/dist/cjs/generated/types.gen.d.ts +357 -8
- package/dist/cjs/generated/types.gen.d.ts.map +1 -1
- package/dist/cjs/sdk.d.ts +81 -1
- package/dist/cjs/sdk.d.ts.map +1 -1
- package/dist/cjs/sdk.js +91 -2
- 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 +47 -1
- package/dist/esm/generated/sdk.gen.d.ts.map +1 -1
- package/dist/esm/generated/sdk.gen.js +79 -0
- package/dist/esm/generated/sdk.gen.js.map +1 -1
- package/dist/esm/generated/types.gen.d.ts +357 -8
- package/dist/esm/generated/types.gen.d.ts.map +1 -1
- package/dist/esm/sdk.d.ts +81 -1
- package/dist/esm/sdk.d.ts.map +1 -1
- package/dist/esm/sdk.js +87 -1
- package/dist/esm/sdk.js.map +1 -1
- package/package.json +1 -1
|
@@ -5499,6 +5499,155 @@ export type PostsPost = {
|
|
|
5499
5499
|
posts_group_id?: string;
|
|
5500
5500
|
comments_count: number;
|
|
5501
5501
|
};
|
|
5502
|
+
export type ProcurementPoTemplate = {
|
|
5503
|
+
/**
|
|
5504
|
+
* The id of the PO template
|
|
5505
|
+
*/
|
|
5506
|
+
id: string;
|
|
5507
|
+
/**
|
|
5508
|
+
* Identifier of the company that owns this template
|
|
5509
|
+
*/
|
|
5510
|
+
company_id: string;
|
|
5511
|
+
/**
|
|
5512
|
+
* Name of the PO template
|
|
5513
|
+
*/
|
|
5514
|
+
name: string;
|
|
5515
|
+
/**
|
|
5516
|
+
* Employee ID who created this template (null for system templates)
|
|
5517
|
+
*/
|
|
5518
|
+
created_by_id?: string;
|
|
5519
|
+
/**
|
|
5520
|
+
* Time the PO template was created
|
|
5521
|
+
*/
|
|
5522
|
+
created_at: string;
|
|
5523
|
+
/**
|
|
5524
|
+
* Time the PO template was last updated
|
|
5525
|
+
*/
|
|
5526
|
+
updated_at: string;
|
|
5527
|
+
};
|
|
5528
|
+
export type ProcurementPoTemplateFieldDefinition = {
|
|
5529
|
+
/**
|
|
5530
|
+
* The id of the field definition
|
|
5531
|
+
*/
|
|
5532
|
+
id: string;
|
|
5533
|
+
/**
|
|
5534
|
+
* The PO template version this field belongs to
|
|
5535
|
+
*/
|
|
5536
|
+
po_template_version_id: string;
|
|
5537
|
+
/**
|
|
5538
|
+
* Identifier of the company
|
|
5539
|
+
*/
|
|
5540
|
+
company_id: string;
|
|
5541
|
+
/**
|
|
5542
|
+
* Section this field belongs to (general_information, vendor_contact, notes_and_delivery, line_item_columns)
|
|
5543
|
+
*/
|
|
5544
|
+
section_type: string;
|
|
5545
|
+
/**
|
|
5546
|
+
* Display label for the field
|
|
5547
|
+
*/
|
|
5548
|
+
label: string;
|
|
5549
|
+
/**
|
|
5550
|
+
* Data type of the field, driving how its value must be supplied when creating a purchase order. Scalar types: "text", "long_text", "number", "money", "percentage", "date", "boolean". "select" is a closed list — the value must be one of the strings in the "options" array. Reference types point to another Factorial value. Most are supplied as the referenced record's id, resolved via the existing public master-data endpoints: "vendor" -> a Finance vendor/contact, "employee" -> an employee, "team" -> a team, "cost_center" -> a cost center, "project" -> a project, "legal_entity" -> a legal entity, "tax_rate" -> a tax rate. Two are supplied as codes rather than ids: "payment_method" -> a payment-method enum value, and "currency" -> an ISO 4217 currency code.
|
|
5551
|
+
*
|
|
5552
|
+
*/
|
|
5553
|
+
field_type: string;
|
|
5554
|
+
/**
|
|
5555
|
+
* Stable machine key identifying the field within its version, unique per version. This is the key used to supply the field's value when creating or updating a purchase order via the API. May be null only for legacy rows created before the key became mandatory.
|
|
5556
|
+
*
|
|
5557
|
+
*/
|
|
5558
|
+
field_key?: string;
|
|
5559
|
+
/**
|
|
5560
|
+
* Whether this is a system-predefined field
|
|
5561
|
+
*/
|
|
5562
|
+
predefined: boolean;
|
|
5563
|
+
/**
|
|
5564
|
+
* Whether this field is visible in the PO form
|
|
5565
|
+
*/
|
|
5566
|
+
visible: boolean;
|
|
5567
|
+
/**
|
|
5568
|
+
* Whether this field is required when filling out a PO
|
|
5569
|
+
*/
|
|
5570
|
+
required: boolean;
|
|
5571
|
+
/**
|
|
5572
|
+
* Sort order within the section (0-based)
|
|
5573
|
+
*/
|
|
5574
|
+
position: number;
|
|
5575
|
+
/**
|
|
5576
|
+
* Whether this field is auto-calculated
|
|
5577
|
+
*/
|
|
5578
|
+
computed: boolean;
|
|
5579
|
+
/**
|
|
5580
|
+
* Whether this field's mandatory flag is locked (cannot be toggled by admins)
|
|
5581
|
+
*/
|
|
5582
|
+
locked: boolean;
|
|
5583
|
+
/**
|
|
5584
|
+
* Whether this field appears in the PDF export
|
|
5585
|
+
*/
|
|
5586
|
+
visible_in_pdf: boolean;
|
|
5587
|
+
/**
|
|
5588
|
+
* Closed list of allowed values for a "select" field_type (array of strings). Null for every other field_type. When present, a purchase order value for this field must be one of these strings.
|
|
5589
|
+
*
|
|
5590
|
+
*/
|
|
5591
|
+
options?: Array<string>;
|
|
5592
|
+
/**
|
|
5593
|
+
* Default value for this field
|
|
5594
|
+
*/
|
|
5595
|
+
default_value?: string;
|
|
5596
|
+
/**
|
|
5597
|
+
* When this field definition was created
|
|
5598
|
+
*/
|
|
5599
|
+
created_at: string;
|
|
5600
|
+
/**
|
|
5601
|
+
* When this field definition was last updated
|
|
5602
|
+
*/
|
|
5603
|
+
updated_at: string;
|
|
5604
|
+
};
|
|
5605
|
+
export type ProcurementPoTemplateVersion = {
|
|
5606
|
+
/**
|
|
5607
|
+
* The id of the PO template version
|
|
5608
|
+
*/
|
|
5609
|
+
id: string;
|
|
5610
|
+
/**
|
|
5611
|
+
* The PO template this version belongs to
|
|
5612
|
+
*/
|
|
5613
|
+
po_template_id: string;
|
|
5614
|
+
/**
|
|
5615
|
+
* Identifier of the company that owns this version
|
|
5616
|
+
*/
|
|
5617
|
+
company_id: string;
|
|
5618
|
+
/**
|
|
5619
|
+
* The sequential version number
|
|
5620
|
+
*/
|
|
5621
|
+
version_number: number;
|
|
5622
|
+
/**
|
|
5623
|
+
* The version this was forked from (null for original)
|
|
5624
|
+
*/
|
|
5625
|
+
based_on_version_id?: string;
|
|
5626
|
+
/**
|
|
5627
|
+
* Version status (draft, active, archived)
|
|
5628
|
+
*/
|
|
5629
|
+
status: string;
|
|
5630
|
+
/**
|
|
5631
|
+
* Employee ID who created this version
|
|
5632
|
+
*/
|
|
5633
|
+
created_by_id?: string;
|
|
5634
|
+
/**
|
|
5635
|
+
* Employee ID who published this version (null if not published)
|
|
5636
|
+
*/
|
|
5637
|
+
published_by_id?: string;
|
|
5638
|
+
/**
|
|
5639
|
+
* When this version was published (null if not published)
|
|
5640
|
+
*/
|
|
5641
|
+
published_at?: string;
|
|
5642
|
+
/**
|
|
5643
|
+
* When this version was created
|
|
5644
|
+
*/
|
|
5645
|
+
created_at: string;
|
|
5646
|
+
/**
|
|
5647
|
+
* When this version was last updated
|
|
5648
|
+
*/
|
|
5649
|
+
updated_at: string;
|
|
5650
|
+
};
|
|
5502
5651
|
export type ProcurementPurchaseOrder = {
|
|
5503
5652
|
/**
|
|
5504
5653
|
* Unique identifier of the purchase order
|
|
@@ -14203,6 +14352,76 @@ export type GetApi20261001ResourcesFinanceFinancialDocumentsResponses = {
|
|
|
14203
14352
|
};
|
|
14204
14353
|
};
|
|
14205
14354
|
export type GetApi20261001ResourcesFinanceFinancialDocumentsResponse = GetApi20261001ResourcesFinanceFinancialDocumentsResponses[keyof GetApi20261001ResourcesFinanceFinancialDocumentsResponses];
|
|
14355
|
+
export type PostApi20261001ResourcesFinanceFinancialDocumentsData = {
|
|
14356
|
+
body?: {
|
|
14357
|
+
/**
|
|
14358
|
+
* Company identifier, refers to /api/me endpoint.
|
|
14359
|
+
*/
|
|
14360
|
+
company_id: string;
|
|
14361
|
+
/**
|
|
14362
|
+
* Type of the financial document. One of `invoice`, `credit_note`, `receipt`.
|
|
14363
|
+
*/
|
|
14364
|
+
document_type: 'invoice' | 'credit_note' | 'receipt';
|
|
14365
|
+
/**
|
|
14366
|
+
* Vendor identifier (Finance contact).
|
|
14367
|
+
*/
|
|
14368
|
+
vendor_id?: string;
|
|
14369
|
+
/**
|
|
14370
|
+
* Legal entity identifier of the financial document.
|
|
14371
|
+
*/
|
|
14372
|
+
legal_entity_id?: string;
|
|
14373
|
+
/**
|
|
14374
|
+
* Document number. Must be unique per vendor for purchases; a duplicate returns a 422 with a machine-readable invoice_number error.
|
|
14375
|
+
*/
|
|
14376
|
+
invoice_number?: string;
|
|
14377
|
+
/**
|
|
14378
|
+
* Document date.
|
|
14379
|
+
*/
|
|
14380
|
+
invoice_date?: string;
|
|
14381
|
+
/**
|
|
14382
|
+
* Due date.
|
|
14383
|
+
*/
|
|
14384
|
+
due_date?: string;
|
|
14385
|
+
/**
|
|
14386
|
+
* Document currency (ISO 4217).
|
|
14387
|
+
*/
|
|
14388
|
+
currency?: string;
|
|
14389
|
+
/**
|
|
14390
|
+
* Total amount in cents. Ignored when line_items are provided, since the line items own the totals.
|
|
14391
|
+
*/
|
|
14392
|
+
total_amount_cents?: number;
|
|
14393
|
+
/**
|
|
14394
|
+
* Free-text internal notes about the financial document.
|
|
14395
|
+
*/
|
|
14396
|
+
additional_information?: string;
|
|
14397
|
+
/**
|
|
14398
|
+
* For credit notes, the referenced original document by internal id (exposed as parent_financial_document_id to match the read contract). Provide this or original_invoice_number.
|
|
14399
|
+
*/
|
|
14400
|
+
parent_financial_document_id?: string;
|
|
14401
|
+
/**
|
|
14402
|
+
* For credit notes, the referenced original document by invoice number (resolved together with the vendor).
|
|
14403
|
+
*/
|
|
14404
|
+
original_invoice_number?: string;
|
|
14405
|
+
/**
|
|
14406
|
+
* Purchase-invoice line items. When present they own the document totals.
|
|
14407
|
+
*/
|
|
14408
|
+
'line_items[]'?: Array<unknown>;
|
|
14409
|
+
/**
|
|
14410
|
+
* The document file to upload, the binary file. Required for purchase documents.
|
|
14411
|
+
*/
|
|
14412
|
+
file: Blob | File;
|
|
14413
|
+
};
|
|
14414
|
+
path?: never;
|
|
14415
|
+
query?: never;
|
|
14416
|
+
url: '/api/2026-10-01/resources/finance/financial_documents';
|
|
14417
|
+
};
|
|
14418
|
+
export type PostApi20261001ResourcesFinanceFinancialDocumentsResponses = {
|
|
14419
|
+
/**
|
|
14420
|
+
* CREATED
|
|
14421
|
+
*/
|
|
14422
|
+
201: FinanceFinancialDocument;
|
|
14423
|
+
};
|
|
14424
|
+
export type PostApi20261001ResourcesFinanceFinancialDocumentsResponse = PostApi20261001ResourcesFinanceFinancialDocumentsResponses[keyof PostApi20261001ResourcesFinanceFinancialDocumentsResponses];
|
|
14206
14425
|
export type GetApi20261001ResourcesFinanceFinancialDocumentsByIdData = {
|
|
14207
14426
|
body?: never;
|
|
14208
14427
|
path: {
|
|
@@ -14782,14 +15001,6 @@ export type GetApi20261001ResourcesIntegrationsSyncRunsData = {
|
|
|
14782
15001
|
body?: never;
|
|
14783
15002
|
path?: never;
|
|
14784
15003
|
query: {
|
|
14785
|
-
/**
|
|
14786
|
-
* Identifier of the company
|
|
14787
|
-
*/
|
|
14788
|
-
company_id: string;
|
|
14789
|
-
/**
|
|
14790
|
-
* UUIDs of the marketplace integrations to filter by
|
|
14791
|
-
*/
|
|
14792
|
-
'integration_uuids[]': Array<string>;
|
|
14793
15004
|
/**
|
|
14794
15005
|
* Filter sync runs by their creation timestamp (`created_at`), on or after this timestamp (inclusive).
|
|
14795
15006
|
*/
|
|
@@ -18197,6 +18408,144 @@ export type PutApi20261001ResourcesPostsPostsByIdResponses = {
|
|
|
18197
18408
|
200: PostsPost;
|
|
18198
18409
|
};
|
|
18199
18410
|
export type PutApi20261001ResourcesPostsPostsByIdResponse = PutApi20261001ResourcesPostsPostsByIdResponses[keyof PutApi20261001ResourcesPostsPostsByIdResponses];
|
|
18411
|
+
export type GetApi20261001ResourcesProcurementPoTemplatesData = {
|
|
18412
|
+
body?: never;
|
|
18413
|
+
path?: never;
|
|
18414
|
+
query?: {
|
|
18415
|
+
/**
|
|
18416
|
+
* An array of PO template IDs to filter by.
|
|
18417
|
+
*/
|
|
18418
|
+
'ids[]'?: Array<string>;
|
|
18419
|
+
};
|
|
18420
|
+
url: '/api/2026-10-01/resources/procurement/po_templates';
|
|
18421
|
+
};
|
|
18422
|
+
export type GetApi20261001ResourcesProcurementPoTemplatesResponses = {
|
|
18423
|
+
/**
|
|
18424
|
+
* OK
|
|
18425
|
+
*/
|
|
18426
|
+
200: {
|
|
18427
|
+
data?: Array<ProcurementPoTemplate>;
|
|
18428
|
+
meta?: PagedIndexMeta;
|
|
18429
|
+
};
|
|
18430
|
+
};
|
|
18431
|
+
export type GetApi20261001ResourcesProcurementPoTemplatesResponse = GetApi20261001ResourcesProcurementPoTemplatesResponses[keyof GetApi20261001ResourcesProcurementPoTemplatesResponses];
|
|
18432
|
+
export type GetApi20261001ResourcesProcurementPoTemplatesByIdData = {
|
|
18433
|
+
body?: never;
|
|
18434
|
+
path: {
|
|
18435
|
+
/**
|
|
18436
|
+
* An array of PO template IDs to filter by.
|
|
18437
|
+
*/
|
|
18438
|
+
id: string;
|
|
18439
|
+
};
|
|
18440
|
+
query?: never;
|
|
18441
|
+
url: '/api/2026-10-01/resources/procurement/po_templates/{id}';
|
|
18442
|
+
};
|
|
18443
|
+
export type GetApi20261001ResourcesProcurementPoTemplatesByIdResponses = {
|
|
18444
|
+
/**
|
|
18445
|
+
* OK
|
|
18446
|
+
*/
|
|
18447
|
+
200: ProcurementPoTemplate;
|
|
18448
|
+
};
|
|
18449
|
+
export type GetApi20261001ResourcesProcurementPoTemplatesByIdResponse = GetApi20261001ResourcesProcurementPoTemplatesByIdResponses[keyof GetApi20261001ResourcesProcurementPoTemplatesByIdResponses];
|
|
18450
|
+
export type GetApi20261001ResourcesProcurementPoTemplateFieldDefinitionsData = {
|
|
18451
|
+
body?: never;
|
|
18452
|
+
path?: never;
|
|
18453
|
+
query?: {
|
|
18454
|
+
/**
|
|
18455
|
+
* An array of field definition IDs to filter by.
|
|
18456
|
+
*/
|
|
18457
|
+
'ids[]'?: Array<string>;
|
|
18458
|
+
/**
|
|
18459
|
+
* An array of PO template version IDs to filter fields for. This is the primary way to introspect a version's schema: pass the id of the active version (or a historical one) to obtain all its fields.
|
|
18460
|
+
*
|
|
18461
|
+
*/
|
|
18462
|
+
'po_template_version_ids[]'?: Array<string>;
|
|
18463
|
+
/**
|
|
18464
|
+
* Filter by section type. "general_information", "vendor_contact" and "notes_and_delivery" are header-level (one value per PO); "line_item_columns" describes the per-line-item columns.
|
|
18465
|
+
*
|
|
18466
|
+
*/
|
|
18467
|
+
'section_type[]'?: 'general_information' | 'vendor_contact' | 'notes_and_delivery' | 'line_item_columns';
|
|
18468
|
+
};
|
|
18469
|
+
url: '/api/2026-10-01/resources/procurement/po_template_field_definitions';
|
|
18470
|
+
};
|
|
18471
|
+
export type GetApi20261001ResourcesProcurementPoTemplateFieldDefinitionsResponses = {
|
|
18472
|
+
/**
|
|
18473
|
+
* OK
|
|
18474
|
+
*/
|
|
18475
|
+
200: {
|
|
18476
|
+
data?: Array<ProcurementPoTemplateFieldDefinition>;
|
|
18477
|
+
meta?: PagedIndexMeta;
|
|
18478
|
+
};
|
|
18479
|
+
};
|
|
18480
|
+
export type GetApi20261001ResourcesProcurementPoTemplateFieldDefinitionsResponse = GetApi20261001ResourcesProcurementPoTemplateFieldDefinitionsResponses[keyof GetApi20261001ResourcesProcurementPoTemplateFieldDefinitionsResponses];
|
|
18481
|
+
export type GetApi20261001ResourcesProcurementPoTemplateFieldDefinitionsByIdData = {
|
|
18482
|
+
body?: never;
|
|
18483
|
+
path: {
|
|
18484
|
+
/**
|
|
18485
|
+
* An array of field definition IDs to filter by.
|
|
18486
|
+
*/
|
|
18487
|
+
id: string;
|
|
18488
|
+
};
|
|
18489
|
+
query?: never;
|
|
18490
|
+
url: '/api/2026-10-01/resources/procurement/po_template_field_definitions/{id}';
|
|
18491
|
+
};
|
|
18492
|
+
export type GetApi20261001ResourcesProcurementPoTemplateFieldDefinitionsByIdResponses = {
|
|
18493
|
+
/**
|
|
18494
|
+
* OK
|
|
18495
|
+
*/
|
|
18496
|
+
200: ProcurementPoTemplateFieldDefinition;
|
|
18497
|
+
};
|
|
18498
|
+
export type GetApi20261001ResourcesProcurementPoTemplateFieldDefinitionsByIdResponse = GetApi20261001ResourcesProcurementPoTemplateFieldDefinitionsByIdResponses[keyof GetApi20261001ResourcesProcurementPoTemplateFieldDefinitionsByIdResponses];
|
|
18499
|
+
export type GetApi20261001ResourcesProcurementPoTemplateVersionsData = {
|
|
18500
|
+
body?: never;
|
|
18501
|
+
path?: never;
|
|
18502
|
+
query?: {
|
|
18503
|
+
/**
|
|
18504
|
+
* An array of PO template version IDs to filter by. Use the po_template_version_id pinned on a purchase order to retrieve the exact (possibly historical, non-active) schema it was created with.
|
|
18505
|
+
*
|
|
18506
|
+
*/
|
|
18507
|
+
'ids[]'?: Array<string>;
|
|
18508
|
+
/**
|
|
18509
|
+
* An array of PO template IDs to filter versions for.
|
|
18510
|
+
*/
|
|
18511
|
+
'po_template_ids[]'?: Array<string>;
|
|
18512
|
+
/**
|
|
18513
|
+
* Filter by version status. Use "active" to retrieve the single currently-active version of each template (the schema new POs are created against). Other values: "draft", "archived".
|
|
18514
|
+
*
|
|
18515
|
+
*/
|
|
18516
|
+
'status[]'?: 'draft' | 'active' | 'archived';
|
|
18517
|
+
};
|
|
18518
|
+
url: '/api/2026-10-01/resources/procurement/po_template_versions';
|
|
18519
|
+
};
|
|
18520
|
+
export type GetApi20261001ResourcesProcurementPoTemplateVersionsResponses = {
|
|
18521
|
+
/**
|
|
18522
|
+
* OK
|
|
18523
|
+
*/
|
|
18524
|
+
200: {
|
|
18525
|
+
data?: Array<ProcurementPoTemplateVersion>;
|
|
18526
|
+
meta?: PagedIndexMeta;
|
|
18527
|
+
};
|
|
18528
|
+
};
|
|
18529
|
+
export type GetApi20261001ResourcesProcurementPoTemplateVersionsResponse = GetApi20261001ResourcesProcurementPoTemplateVersionsResponses[keyof GetApi20261001ResourcesProcurementPoTemplateVersionsResponses];
|
|
18530
|
+
export type GetApi20261001ResourcesProcurementPoTemplateVersionsByIdData = {
|
|
18531
|
+
body?: never;
|
|
18532
|
+
path: {
|
|
18533
|
+
/**
|
|
18534
|
+
* An array of PO template version IDs to filter by. Use the po_template_version_id pinned on a purchase order to retrieve the exact (possibly historical, non-active) schema it was created with.
|
|
18535
|
+
*
|
|
18536
|
+
*/
|
|
18537
|
+
id: string;
|
|
18538
|
+
};
|
|
18539
|
+
query?: never;
|
|
18540
|
+
url: '/api/2026-10-01/resources/procurement/po_template_versions/{id}';
|
|
18541
|
+
};
|
|
18542
|
+
export type GetApi20261001ResourcesProcurementPoTemplateVersionsByIdResponses = {
|
|
18543
|
+
/**
|
|
18544
|
+
* OK
|
|
18545
|
+
*/
|
|
18546
|
+
200: ProcurementPoTemplateVersion;
|
|
18547
|
+
};
|
|
18548
|
+
export type GetApi20261001ResourcesProcurementPoTemplateVersionsByIdResponse = GetApi20261001ResourcesProcurementPoTemplateVersionsByIdResponses[keyof GetApi20261001ResourcesProcurementPoTemplateVersionsByIdResponses];
|
|
18200
18549
|
export type GetApi20261001ResourcesProcurementPurchaseOrdersData = {
|
|
18201
18550
|
body?: never;
|
|
18202
18551
|
path?: never;
|