import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { RFCDate } from "../../types/rfcdate.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { CustomMappings, CustomMappings$Outbound } from "./custommappings.js"; import { DeprecatedLinkedTrackingCategory, DeprecatedLinkedTrackingCategory$Outbound } from "./deprecatedlinkedtrackingcategory.js"; import { LinkedLedgerAccount, LinkedLedgerAccount$Outbound } from "./linkedledgeraccount.js"; import { LinkedLedgerAccountInput, LinkedLedgerAccountInput$Outbound } from "./linkedledgeraccountinput.js"; import { LinkedTaxRate, LinkedTaxRate$Outbound } 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 InvoiceItemType: { readonly Inventory: "inventory"; readonly Service: "service"; readonly Other: "other"; }; /** * Item type */ export type InvoiceItemType = ClosedEnum; 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; /** * 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?: RFCDate | null | undefined; /** * Item type */ type?: InvoiceItemType | null | undefined; salesDetails?: SalesDetails | undefined; purchaseDetails?: PurchaseDetails | undefined; quantity?: number | null | undefined; unitPrice?: number | null | undefined; assetAccount?: LinkedLedgerAccount | null | undefined; incomeAccount?: LinkedLedgerAccount | null | undefined; expenseAccount?: LinkedLedgerAccount | null | undefined; /** * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ trackingCategory?: DeprecatedLinkedTrackingCategory | null | undefined; /** * A list of linked tracking categories. */ trackingCategories?: Array | null | undefined; active?: boolean | null | undefined; /** * When custom mappings are configured on the resource, the result is included here. */ customMappings?: CustomMappings | 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; /** * 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?: RFCDate | null | undefined; /** * Item type */ type?: InvoiceItemType | null | undefined; salesDetails?: InvoiceItemSalesDetails | undefined; purchaseDetails?: InvoiceItemPurchaseDetails | undefined; quantity?: number | null | undefined; unitPrice?: number | null | undefined; assetAccount?: LinkedLedgerAccountInput | null | undefined; incomeAccount?: LinkedLedgerAccountInput | null | undefined; expenseAccount?: LinkedLedgerAccountInput | null | undefined; /** * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ trackingCategory?: DeprecatedLinkedTrackingCategory | null | undefined; /** * A list of linked tracking categories. */ trackingCategories?: Array | null | undefined; active?: boolean | 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 InvoiceItemType$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const InvoiceItemType$outboundSchema: z.ZodNativeEnum; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace InvoiceItemType$ { /** @deprecated use `InvoiceItemType$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum<{ readonly Inventory: "inventory"; readonly Service: "service"; readonly Other: "other"; }>; /** @deprecated use `InvoiceItemType$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum<{ readonly Inventory: "inventory"; readonly Service: "service"; readonly Other: "other"; }>; } /** @internal */ export declare const SalesDetails$inboundSchema: z.ZodType; /** @internal */ export type SalesDetails$Outbound = { unit_price?: number | null | undefined; unit_of_measure?: string | null | undefined; tax_inclusive?: boolean | null | undefined; tax_rate?: LinkedTaxRate$Outbound | undefined; }; /** @internal */ export declare const SalesDetails$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace SalesDetails$ { /** @deprecated use `SalesDetails$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `SalesDetails$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `SalesDetails$Outbound` instead. */ type Outbound = SalesDetails$Outbound; } export declare function salesDetailsToJSON(salesDetails: SalesDetails): string; export declare function salesDetailsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const PurchaseDetails$inboundSchema: z.ZodType; /** @internal */ export type PurchaseDetails$Outbound = { unit_price?: number | null | undefined; unit_of_measure?: string | null | undefined; tax_inclusive?: boolean | null | undefined; tax_rate?: LinkedTaxRate$Outbound | undefined; }; /** @internal */ export declare const PurchaseDetails$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace PurchaseDetails$ { /** @deprecated use `PurchaseDetails$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `PurchaseDetails$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `PurchaseDetails$Outbound` instead. */ type Outbound = PurchaseDetails$Outbound; } export declare function purchaseDetailsToJSON(purchaseDetails: PurchaseDetails): string; export declare function purchaseDetailsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const InvoiceItem$inboundSchema: z.ZodType; /** @internal */ export type InvoiceItem$Outbound = { id?: string | undefined; name?: string | null | undefined; description?: 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?: SalesDetails$Outbound | undefined; purchase_details?: PurchaseDetails$Outbound | undefined; quantity?: number | null | undefined; unit_price?: number | 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; custom_mappings?: CustomMappings$Outbound | null | undefined; row_version?: string | null | undefined; updated_by?: string | null | undefined; created_by?: string | null | undefined; updated_at?: string | null | undefined; created_at?: string | null | undefined; pass_through?: Array | undefined; }; /** @internal */ export declare const InvoiceItem$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace InvoiceItem$ { /** @deprecated use `InvoiceItem$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `InvoiceItem$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `InvoiceItem$Outbound` instead. */ type Outbound = InvoiceItem$Outbound; } export declare function invoiceItemToJSON(invoiceItem: InvoiceItem): string; export declare function invoiceItemFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const InvoiceItemSalesDetails$inboundSchema: z.ZodType; /** @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; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace InvoiceItemSalesDetails$ { /** @deprecated use `InvoiceItemSalesDetails$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `InvoiceItemSalesDetails$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `InvoiceItemSalesDetails$Outbound` instead. */ type Outbound = InvoiceItemSalesDetails$Outbound; } export declare function invoiceItemSalesDetailsToJSON(invoiceItemSalesDetails: InvoiceItemSalesDetails): string; export declare function invoiceItemSalesDetailsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const InvoiceItemPurchaseDetails$inboundSchema: z.ZodType; /** @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; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace InvoiceItemPurchaseDetails$ { /** @deprecated use `InvoiceItemPurchaseDetails$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `InvoiceItemPurchaseDetails$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `InvoiceItemPurchaseDetails$Outbound` instead. */ type Outbound = InvoiceItemPurchaseDetails$Outbound; } export declare function invoiceItemPurchaseDetailsToJSON(invoiceItemPurchaseDetails: InvoiceItemPurchaseDetails): string; export declare function invoiceItemPurchaseDetailsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const InvoiceItemInput$inboundSchema: z.ZodType; /** @internal */ export type InvoiceItemInput$Outbound = { name?: string | null | undefined; description?: 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; asset_account?: LinkedLedgerAccountInput$Outbound | null | undefined; income_account?: LinkedLedgerAccountInput$Outbound | null | undefined; expense_account?: LinkedLedgerAccountInput$Outbound | null | undefined; tracking_category?: DeprecatedLinkedTrackingCategory$Outbound | null | undefined; tracking_categories?: Array | null | undefined; active?: boolean | null | undefined; row_version?: string | null | undefined; pass_through?: Array | undefined; }; /** @internal */ export declare const InvoiceItemInput$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace InvoiceItemInput$ { /** @deprecated use `InvoiceItemInput$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `InvoiceItemInput$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `InvoiceItemInput$Outbound` instead. */ type Outbound = InvoiceItemInput$Outbound; } export declare function invoiceItemInputToJSON(invoiceItemInput: InvoiceItemInput): string; export declare function invoiceItemInputFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=invoiceitem.d.ts.map