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 { Currency } from "./currency.js"; import { DeprecatedLinkedTrackingCategory, DeprecatedLinkedTrackingCategory$Outbound } from "./deprecatedlinkedtrackingcategory.js"; import { LinkedLedgerAccount, LinkedLedgerAccount$Outbound } from "./linkedledgeraccount.js"; import { LinkedTaxRate } from "./linkedtaxrate.js"; import { LinkedTaxRateInput, LinkedTaxRateInput$Outbound } from "./linkedtaxrateinput.js"; import { LinkedTrackingCategory, LinkedTrackingCategory$Outbound } from "./linkedtrackingcategory.js"; import { PassThroughBody, PassThroughBody$Outbound } from "./passthroughbody.js"; /** * Item type */ export declare const InvoiceItemTypeType: { readonly Inventory: "inventory"; readonly NonInventory: "non_inventory"; readonly Service: "service"; readonly Description: "description"; readonly Other: "other"; }; /** * Item type */ export type InvoiceItemTypeType = OpenEnum; export type SalesDetails = { unitPrice?: number | null | undefined; /** * Description of the unit type the item is sold as, ie: kg, hour. */ unitOfMeasure?: string | null | undefined; /** * Amounts are including tax */ taxInclusive?: boolean | null | undefined; taxRate?: LinkedTaxRate | undefined; }; export type PurchaseDetails = { unitPrice?: number | null | undefined; /** * Description of the unit type the item is sold as, ie: kg, hour. */ unitOfMeasure?: string | null | undefined; /** * Amounts are including tax */ taxInclusive?: boolean | null | undefined; taxRate?: LinkedTaxRate | undefined; }; export type InvoiceItem = { /** * The ID of the item. */ id?: string | undefined; /** * Item name */ name?: string | null | undefined; /** * A short description of the item */ description?: string | null | undefined; /** * Display ID of the item */ displayId?: string | null | undefined; /** * User defined item code */ code?: string | null | undefined; /** * Item will be available on sales transactions */ sold?: boolean | null | undefined; /** * Item is available for purchase transactions */ purchased?: boolean | null | undefined; /** * Item is inventoried */ tracked?: boolean | null | undefined; /** * If true, transactions for this item are taxable */ taxable?: boolean | null | undefined; /** * The date of opening balance if inventory item is tracked - YYYY-MM-DD. */ inventoryDate?: Date | null | undefined; /** * Item type */ type?: InvoiceItemTypeType | null | undefined; salesDetails?: SalesDetails | undefined; purchaseDetails?: PurchaseDetails | undefined; quantity?: number | null | undefined; unitPrice?: number | 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; assetAccount?: LinkedLedgerAccount | null | undefined; incomeAccount?: LinkedLedgerAccount | null | undefined; expenseAccount?: LinkedLedgerAccount | null | undefined; /** * @deprecated field: This field is deprecated and may be removed in a future version.. */ trackingCategory?: DeprecatedLinkedTrackingCategory | null | undefined; /** * A list of linked tracking categories. */ trackingCategories?: Array | null | undefined; active?: boolean | null | undefined; /** * The ID of the department */ departmentId?: string | null | undefined; /** * The ID of the location */ locationId?: string | null | undefined; /** * The ID of the subsidiary */ subsidiaryId?: string | null | undefined; /** * ID of the category of the item */ categoryId?: string | null | undefined; /** * The ID of the tax schedule */ taxScheduleId?: string | null | undefined; /** * When custom mappings are configured on the resource, the result is included here. */ customMappings?: { [k: string]: any; } | null | 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 InvoiceItemSalesDetails = { unitPrice?: number | null | undefined; /** * Description of the unit type the item is sold as, ie: kg, hour. */ unitOfMeasure?: string | null | undefined; /** * Amounts are including tax */ taxInclusive?: boolean | null | undefined; taxRate?: LinkedTaxRateInput | undefined; }; export type InvoiceItemPurchaseDetails = { unitPrice?: number | null | undefined; /** * Description of the unit type the item is sold as, ie: kg, hour. */ unitOfMeasure?: string | null | undefined; /** * Amounts are including tax */ taxInclusive?: boolean | null | undefined; taxRate?: LinkedTaxRateInput | undefined; }; export type InvoiceItemInput = { /** * Item name */ name?: string | null | undefined; /** * A short description of the item */ description?: string | null | undefined; /** * Display ID of the item */ displayId?: string | null | undefined; /** * User defined item code */ code?: string | null | undefined; /** * Item will be available on sales transactions */ sold?: boolean | null | undefined; /** * Item is available for purchase transactions */ purchased?: boolean | null | undefined; /** * Item is inventoried */ tracked?: boolean | null | undefined; /** * If true, transactions for this item are taxable */ taxable?: boolean | null | undefined; /** * The date of opening balance if inventory item is tracked - YYYY-MM-DD. */ inventoryDate?: Date | null | undefined; /** * Item type */ type?: InvoiceItemTypeType | null | undefined; salesDetails?: InvoiceItemSalesDetails | undefined; purchaseDetails?: InvoiceItemPurchaseDetails | undefined; quantity?: number | null | undefined; unitPrice?: number | 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; assetAccount?: LinkedLedgerAccount | null | undefined; incomeAccount?: LinkedLedgerAccount | null | undefined; expenseAccount?: LinkedLedgerAccount | null | undefined; /** * @deprecated field: This field is deprecated and may be removed in a future version.. */ trackingCategory?: DeprecatedLinkedTrackingCategory | null | undefined; /** * A list of linked tracking categories. */ trackingCategories?: Array | null | undefined; active?: boolean | null | undefined; /** * The ID of the department */ departmentId?: string | null | undefined; /** * The ID of the location */ locationId?: string | null | undefined; /** * The ID of the subsidiary */ subsidiaryId?: string | null | undefined; /** * ID of the category of the item */ categoryId?: string | null | undefined; /** * The ID of the tax schedule */ taxScheduleId?: string | null | 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 InvoiceItemTypeType$inboundSchema: z.ZodType; /** @internal */ export declare const InvoiceItemTypeType$outboundSchema: z.ZodType; /** @internal */ export declare const SalesDetails$inboundSchema: z.ZodType; export declare function salesDetailsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const PurchaseDetails$inboundSchema: z.ZodType; export declare function purchaseDetailsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const InvoiceItem$inboundSchema: z.ZodType; export declare function invoiceItemFromJSON(jsonString: string): SafeParseResult; /** @internal */ export type InvoiceItemSalesDetails$Outbound = { unit_price?: number | null | undefined; unit_of_measure?: string | null | undefined; tax_inclusive?: boolean | null | undefined; tax_rate?: LinkedTaxRateInput$Outbound | undefined; }; /** @internal */ export declare const InvoiceItemSalesDetails$outboundSchema: z.ZodType; export declare function invoiceItemSalesDetailsToJSON(invoiceItemSalesDetails: InvoiceItemSalesDetails): string; /** @internal */ export type InvoiceItemPurchaseDetails$Outbound = { unit_price?: number | null | undefined; unit_of_measure?: string | null | undefined; tax_inclusive?: boolean | null | undefined; tax_rate?: LinkedTaxRateInput$Outbound | undefined; }; /** @internal */ export declare const InvoiceItemPurchaseDetails$outboundSchema: z.ZodType; export declare function invoiceItemPurchaseDetailsToJSON(invoiceItemPurchaseDetails: InvoiceItemPurchaseDetails): string; /** @internal */ export type InvoiceItemInput$Outbound = { name?: string | null | undefined; description?: string | null | undefined; display_id?: string | null | undefined; code?: string | null | undefined; sold?: boolean | null | undefined; purchased?: boolean | null | undefined; tracked?: boolean | null | undefined; taxable?: boolean | null | undefined; inventory_date?: string | null | undefined; type?: string | null | undefined; sales_details?: InvoiceItemSalesDetails$Outbound | undefined; purchase_details?: InvoiceItemPurchaseDetails$Outbound | undefined; quantity?: number | null | undefined; unit_price?: number | null | undefined; currency?: string | null | undefined; asset_account?: LinkedLedgerAccount$Outbound | null | undefined; income_account?: LinkedLedgerAccount$Outbound | null | undefined; expense_account?: LinkedLedgerAccount$Outbound | null | undefined; tracking_category?: DeprecatedLinkedTrackingCategory$Outbound | null | undefined; tracking_categories?: Array | null | undefined; active?: boolean | null | undefined; department_id?: string | null | undefined; location_id?: string | null | undefined; subsidiary_id?: string | null | undefined; category_id?: string | null | undefined; tax_schedule_id?: string | null | undefined; row_version?: string | null | undefined; pass_through?: Array | undefined; }; /** @internal */ export declare const InvoiceItemInput$outboundSchema: z.ZodType; export declare function invoiceItemInputToJSON(invoiceItemInput: InvoiceItemInput): string; //# sourceMappingURL=invoiceitem.d.ts.map