/** * WooCommerce Node - Version 1 * Discriminator: resource=product, operation=create */ interface Credentials { wooCommerceApi: CredentialReference; } /** Create a customer */ export type WooCommerceV1ProductCreateParams = { resource: 'product'; operation: 'create'; /** * Product name */ name?: string | Expression | PlaceholderValue; /** * Additional Fields * @default {} */ additionalFields?: { /** If managing stock, this controls if backorders are allowed * @default no */ backorders?: 'no' | 'notify' | 'yes' | Expression; /** Product external button text. Only for external products. */ buttonText?: string | Expression | PlaceholderValue; /** Catalog Visibility * @default visible */ catalogVisibility?: 'catalog' | 'hidden' | 'search' | 'visible' | Expression; /** List of categories. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>. * @default [] */ categories?: string[]; /** List of cross-sell products IDs. Multiple can be added separated by ,. */ crossSellIds?: string | Expression | PlaceholderValue; /** Start date of sale price, in the site's timezone */ dateOnSaleFrom?: string | Expression; /** Ennd date of sale price, in the site's timezone */ dateOnSaleTo?: string | Expression; /** Product description */ description?: string | Expression | PlaceholderValue; /** Whether the product is downloadable * @default false */ downloadable?: boolean | Expression; /** Product external URL. Only for external products. */ externalUrl?: string | Expression | PlaceholderValue; /** Whether the product is featured * @default false */ featured?: boolean | Expression; /** Stock management at product level * @default false */ manageStock?: boolean | Expression; /** Menu order, used to custom sort products * @default 1 */ menuOrder?: number | Expression; /** Product parent ID */ parentId?: string | Expression | PlaceholderValue; /** Optional note to send the customer after purchase */ purchaseNote?: string | Expression | PlaceholderValue; /** Product regular price */ regularPrice?: string | Expression | PlaceholderValue; /** Whether to allow reviews * @default true */ reviewsAllowed?: boolean | Expression; /** Product sale price */ salePrice?: string | Expression | PlaceholderValue; /** Shipping class slug */ shippingClass?: string | Expression | PlaceholderValue; /** Product short description */ shortDescription?: string | Expression | PlaceholderValue; /** Unique identifier */ sku?: string | Expression | PlaceholderValue; /** Product slug */ slug?: string | Expression | PlaceholderValue; /** Whether to allow one item to be bought in a single order * @default false */ soldIndividually?: boolean | Expression; /** A named status for the product * @default publish */ status?: 'draft' | 'pending' | 'private' | 'publish' | Expression; /** Stock Quantity * @default 1 */ stockQuantity?: number | Expression; /** Controls the stock status of the product * @default instock */ stockStatus?: 'instock' | 'outofstock' | 'onbackorder' | Expression; /** List of tags. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>. * @default [] */ tags?: string[]; /** Tax Class */ taxClass?: string | Expression | PlaceholderValue; /** Tax Status * @default taxable */ taxStatus?: 'taxable' | 'shipping' | 'none' | Expression; /** Product type * @default simple */ type?: 'simple' | 'grouped' | 'external' | 'variable' | Expression; /** List of up-sell products IDs. Multiple can be added separated by ,. */ upsellIds?: string | Expression | PlaceholderValue; /** Whether the product is virtual * @default false */ virtual?: boolean | Expression; /** Product weight */ weight?: string | Expression | PlaceholderValue; }; /** * Product dimensions * @default {} */ dimensionsUi?: { /** Dimension */ dimensionsValues?: { /** Product height */ height?: string | Expression | PlaceholderValue; /** Product length */ length?: string | Expression | PlaceholderValue; /** Product width */ width?: string | Expression | PlaceholderValue; }; }; /** * Product Image * @default {} */ imagesUi?: { /** Image */ imagesValues?: Array<{ /** Image alternative text */ alt?: string | Expression | PlaceholderValue; /** Image URL */ src?: string | Expression | PlaceholderValue; /** Image name */ name?: string | Expression | PlaceholderValue; }>; }; /** * Meta data * @default {} */ metadataUi?: { /** Metadata */ metadataValues?: Array<{ /** Name of the metadata key to add */ key?: string | Expression | PlaceholderValue; /** Value to set for the metadata key */ value?: string | Expression | PlaceholderValue; }>; }; }; export type WooCommerceV1ProductCreateOutput = { _links?: { collection?: Array<{ href?: string; }>; self?: Array<{ href?: string; }>; }; average_rating?: string; backordered?: boolean; backorders?: string; backorders_allowed?: boolean; button_text?: string; catalog_visibility?: string; categories?: Array<{ id?: number; name?: string; slug?: string; }>; date_created?: string; date_created_gmt?: string; date_modified?: string; date_modified_gmt?: string; date_on_sale_from?: null; date_on_sale_from_gmt?: null; date_on_sale_to?: null; date_on_sale_to_gmt?: null; description?: string; dimensions?: { height?: string; length?: string; width?: string; }; download_expiry?: number; download_limit?: number; downloadable?: boolean; external_url?: string; featured?: boolean; generated_slug?: string; global_unique_id?: string; has_options?: boolean; id?: number; images?: Array<{ alt?: string; date_created?: string; date_created_gmt?: string; date_modified?: string; date_modified_gmt?: string; id?: number; name?: string; src?: string; }>; manage_stock?: boolean; menu_order?: number; meta_data?: Array<{ id?: number; key?: string; }>; name?: string; on_sale?: boolean; parent_id?: number; permalink?: string; permalink_template?: string; post_password?: string; price?: string; price_html?: string; purchasable?: boolean; purchase_note?: string; rating_count?: number; regular_price?: string; related_ids?: Array; reviews_allowed?: boolean; sale_price?: string; shipping_class?: string; shipping_class_id?: number; shipping_required?: boolean; shipping_taxable?: boolean; short_description?: string; sku?: string; slug?: string; sold_individually?: boolean; status?: string; stock_status?: string; tags?: Array<{ id?: number; name?: string; slug?: string; }>; tax_class?: string; tax_status?: string; total_sales?: number; type?: string; virtual?: boolean; weight?: string; }; export type WooCommerceV1ProductCreateNode = { type: 'n8n-nodes-base.wooCommerce'; version: 1; credentials?: Credentials; config: NodeConfig; output?: Items; };