import * as z from "zod/v3"; import { OpenEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { Address, Address$Outbound } from "./address.js"; import { Currency } from "./currency.js"; import { CustomField, CustomField$Outbound } from "./customfield.js"; import { InvoiceLineItem, InvoiceLineItemInput, InvoiceLineItemInput$Outbound } from "./invoicelineitem.js"; import { LinkedCustomer } from "./linkedcustomer.js"; import { LinkedCustomerInput, LinkedCustomerInput$Outbound } from "./linkedcustomerinput.js"; import { LinkedTrackingCategory, LinkedTrackingCategory$Outbound } from "./linkedtrackingcategory.js"; import { PassThroughBody, PassThroughBody$Outbound } from "./passthroughbody.js"; /** * Sales order status, in order of precedence: `cancelled`; `closed` (the order is closed or completed, whether or not it was billed); `invoiced` (fully billed but not yet closed); `back_ordered`; `on_hold` (including credit hold); `draft` (including pending approval); `open` (every other active state, including partially shipped and partially invoiced); `other` for states that fit none of these. */ export declare const SalesOrderStatus: { readonly Draft: "draft"; readonly Open: "open"; readonly OnHold: "on_hold"; readonly BackOrdered: "back_ordered"; readonly Invoiced: "invoiced"; readonly Closed: "closed"; readonly Cancelled: "cancelled"; readonly Other: "other"; }; /** * Sales order status, in order of precedence: `cancelled`; `closed` (the order is closed or completed, whether or not it was billed); `invoiced` (fully billed but not yet closed); `back_ordered`; `on_hold` (including credit hold); `draft` (including pending approval); `open` (every other active state, including partially shipped and partially invoiced); `other` for states that fit none of these. */ export type SalesOrderStatus = OpenEnum; export type SalesOrder = { /** * A unique identifier for an object. */ id?: string | undefined; /** * The third-party API ID of original entity */ downstreamId?: string | null | undefined; /** * Sales order number, as assigned by the accounting system. */ number?: string | null | undefined; /** * The customer this entity is linked to. */ customer?: LinkedCustomer | null | undefined; /** * The unique identifier for the quote. */ quoteId?: string | null | undefined; /** * ID of the invoice created from this sales order. Populated when the accounting system records a single invoice on the order (see the connector gotchas); null when the order has not been invoiced, or when it was invoiced in parts and the system keeps no single link. */ invoiceId?: string | null | undefined; /** * The company ID the transaction belongs to */ companyId?: string | null | undefined; /** * The ID of the department */ departmentId?: string | null | undefined; /** * The ID of the location */ locationId?: string | null | undefined; /** * The unique identifier for the linked project. */ projectId?: string | undefined; /** * The ID of the subsidiary */ subsidiaryId?: string | null | undefined; /** * Date the sales order was placed - YYYY-MM-DD. */ orderDate?: Date | null | undefined; /** * The requested delivery date: the date the customer asked to receive the goods or services - YYYY-MM-DD. Promised ship dates and payment due dates are not mapped here. */ deliveryDate?: Date | null | undefined; /** * The order or transaction type of the sales order, as configured in the accounting system. On create, selects the type to create when the system supports several; omit to use the connection default. See the connector gotchas for the values each system accepts. */ orderType?: string | null | undefined; /** * Payment terms of the sales order. */ terms?: string | null | undefined; /** * The ID of the payment terms */ termsId?: string | null | undefined; /** * A PO Number uniquely identifies a purchase order and is generally defined by the buyer. The buyer will match the PO number in the invoice to the Purchase Order. */ poNumber?: string | null | undefined; /** * Optional reference identifier for the transaction. */ reference?: string | null | undefined; /** * Sales order status, in order of precedence: `cancelled`; `closed` (the order is closed or completed, whether or not it was billed); `invoiced` (fully billed but not yet closed); `back_ordered`; `on_hold` (including credit hold); `draft` (including pending approval); `open` (every other active state, including partially shipped and partially invoiced); `other` for states that fit none of these. */ status?: SalesOrderStatus | null | undefined; /** * Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). */ currency?: Currency | null | undefined; /** * Currency Exchange Rate at the time entity was recorded/generated. */ currencyRate?: number | null | undefined; /** * Amounts are including tax */ taxInclusive?: boolean | null | undefined; /** * Sub-total amount, normally before tax. */ subTotal?: number | null | undefined; /** * Total tax amount applied to this sales order. */ totalTax?: number | null | undefined; /** * Applicable tax id/code override if tax is not supplied on a line item basis. */ taxCode?: string | null | undefined; /** * Discount percentage applied to this sales order. */ discountPercentage?: number | null | undefined; /** * Discount amount applied to this sales order. */ discountAmount?: number | null | undefined; /** * Total amount of the sales order, including tax. */ total?: number | null | undefined; /** * Amount of the sales order not yet invoiced. Not the amount owed: see `balance` on the invoices created from the order for that. */ unbilledAmount?: number | null | undefined; /** * Shipping method or carrier code for the order. */ shippingMethod?: string | null | undefined; /** * Payment method used for the transaction, such as cash, credit card, bank transfer, or check */ paymentMethod?: string | null | undefined; /** * Message to the customer, shown on the sales order. */ customerMemo?: string | null | undefined; /** * Internal notes for the sales order, not shown to the customer. */ notes?: string | null | undefined; lineItems?: Array | undefined; billingAddress?: Address | undefined; shippingAddress?: Address | undefined; /** * A list of linked tracking categories. */ trackingCategories?: Array | null | undefined; /** * Optional sales order template */ templateId?: string | null | undefined; /** * URL link to a source document - shown as 'Go to [appName]' in the downstream app. */ sourceDocumentUrl?: string | null | undefined; /** * When custom mappings are configured on the resource, the result is included here. */ customMappings?: { [k: string]: any; } | null | undefined; customFields?: Array | undefined; /** * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. */ rowVersion?: string | null | undefined; /** * The user who last updated the object. */ updatedBy?: string | null | undefined; /** * The user who created the object. */ createdBy?: string | null | undefined; /** * The date and time when the object was last updated. */ updatedAt?: Date | null | undefined; /** * The date and time when the object was created. */ createdAt?: Date | null | undefined; /** * The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. */ passThrough?: Array | undefined; }; export type SalesOrderInput = { /** * Sales order number, as assigned by the accounting system. */ number?: string | null | undefined; /** * The customer this entity is linked to. */ customer?: LinkedCustomerInput | null | undefined; /** * The unique identifier for the quote. */ quoteId?: string | null | undefined; /** * The company ID the transaction belongs to */ companyId?: string | null | undefined; /** * The ID of the department */ departmentId?: string | null | undefined; /** * The ID of the location */ locationId?: string | null | undefined; /** * The unique identifier for the linked project. */ projectId?: string | undefined; /** * The ID of the subsidiary */ subsidiaryId?: string | null | undefined; /** * Date the sales order was placed - YYYY-MM-DD. */ orderDate?: Date | null | undefined; /** * The requested delivery date: the date the customer asked to receive the goods or services - YYYY-MM-DD. Promised ship dates and payment due dates are not mapped here. */ deliveryDate?: Date | null | undefined; /** * The order or transaction type of the sales order, as configured in the accounting system. On create, selects the type to create when the system supports several; omit to use the connection default. See the connector gotchas for the values each system accepts. */ orderType?: string | null | undefined; /** * Payment terms of the sales order. */ terms?: string | null | undefined; /** * The ID of the payment terms */ termsId?: string | null | undefined; /** * A PO Number uniquely identifies a purchase order and is generally defined by the buyer. The buyer will match the PO number in the invoice to the Purchase Order. */ poNumber?: string | null | undefined; /** * Optional reference identifier for the transaction. */ reference?: string | null | undefined; /** * Sales order status, in order of precedence: `cancelled`; `closed` (the order is closed or completed, whether or not it was billed); `invoiced` (fully billed but not yet closed); `back_ordered`; `on_hold` (including credit hold); `draft` (including pending approval); `open` (every other active state, including partially shipped and partially invoiced); `other` for states that fit none of these. */ status?: SalesOrderStatus | null | undefined; /** * Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). */ currency?: Currency | null | undefined; /** * Currency Exchange Rate at the time entity was recorded/generated. */ currencyRate?: number | null | undefined; /** * Amounts are including tax */ taxInclusive?: boolean | null | undefined; /** * Sub-total amount, normally before tax. */ subTotal?: number | null | undefined; /** * Total tax amount applied to this sales order. */ totalTax?: number | null | undefined; /** * Applicable tax id/code override if tax is not supplied on a line item basis. */ taxCode?: string | null | undefined; /** * Discount percentage applied to this sales order. */ discountPercentage?: number | null | undefined; /** * Discount amount applied to this sales order. */ discountAmount?: number | null | undefined; /** * Total amount of the sales order, including tax. */ total?: number | null | undefined; /** * Shipping method or carrier code for the order. */ shippingMethod?: string | null | undefined; /** * Payment method used for the transaction, such as cash, credit card, bank transfer, or check */ paymentMethod?: string | null | undefined; /** * Message to the customer, shown on the sales order. */ customerMemo?: string | null | undefined; /** * Internal notes for the sales order, not shown to the customer. */ notes?: string | null | undefined; lineItems?: Array | undefined; billingAddress?: Address | undefined; shippingAddress?: Address | undefined; /** * A list of linked tracking categories. */ trackingCategories?: Array | null | undefined; /** * Optional sales order template */ templateId?: string | null | undefined; /** * URL link to a source document - shown as 'Go to [appName]' in the downstream app. */ sourceDocumentUrl?: string | null | undefined; customFields?: Array | undefined; /** * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. */ rowVersion?: string | null | undefined; /** * The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. */ passThrough?: Array | undefined; }; /** @internal */ export declare const SalesOrderStatus$inboundSchema: z.ZodType; /** @internal */ export declare const SalesOrderStatus$outboundSchema: z.ZodType; /** @internal */ export declare const SalesOrder$inboundSchema: z.ZodType; export declare function salesOrderFromJSON(jsonString: string): SafeParseResult; /** @internal */ export type SalesOrderInput$Outbound = { number?: string | null | undefined; customer?: LinkedCustomerInput$Outbound | null | undefined; quote_id?: string | null | undefined; company_id?: string | null | undefined; department_id?: string | null | undefined; location_id?: string | null | undefined; project_id?: string | undefined; subsidiary_id?: string | null | undefined; order_date?: string | null | undefined; delivery_date?: string | null | undefined; order_type?: string | null | undefined; terms?: string | null | undefined; terms_id?: string | null | undefined; po_number?: string | null | undefined; reference?: string | null | undefined; status?: string | null | undefined; currency?: string | null | undefined; currency_rate?: number | null | undefined; tax_inclusive?: boolean | null | undefined; sub_total?: number | null | undefined; total_tax?: number | null | undefined; tax_code?: string | null | undefined; discount_percentage?: number | null | undefined; discount_amount?: number | null | undefined; total?: number | null | undefined; shipping_method?: string | null | undefined; payment_method?: string | null | undefined; customer_memo?: string | null | undefined; notes?: string | null | undefined; line_items?: Array | undefined; billing_address?: Address$Outbound | undefined; shipping_address?: Address$Outbound | undefined; tracking_categories?: Array | null | undefined; template_id?: string | null | undefined; source_document_url?: string | null | undefined; custom_fields?: Array | undefined; row_version?: string | null | undefined; pass_through?: Array | undefined; }; /** @internal */ export declare const SalesOrderInput$outboundSchema: z.ZodType; export declare function salesOrderInputToJSON(salesOrderInput: SalesOrderInput): string; //# sourceMappingURL=salesorder.d.ts.map