Zum Hauptinhalt springen

Interface: PushProductsConsumer

Implement this interface for APIs that can receive products.

Methods

pushProducts

pushProducts(products): Promise<{ product?: { id?: string; variationParentId?: string; name?: string; description?: string; manufacturer?: string; netPrice?: { value?: number; divisor?: number; currencyCode?: string; }; grossPrice?: { value?: number; divisor?: number; currencyCode?: string; }; ... 7 more ...; attributeValues?: Record<...>; } = ZProductDto; sourceId?: string }[]>

Pushes the products to the external system and returns the list of pushed products.

Parameters

NameTypeDescription
products{ product?: { id?: string; variationParentId?: string; name?: string; description?: string; manufacturer?: string; netPrice?: { value?: number; divisor?: number; currencyCode?: string; }; grossPrice?: { value?: number; divisor?: number; currencyCode?: string; }; ... 7 more ...; attributeValues?: Record<...>; } = ZProductDto; sourceId?: string }[]The products to push

Returns

Promise<{ product?: { id?: string; variationParentId?: string; name?: string; description?: string; manufacturer?: string; netPrice?: { value?: number; divisor?: number; currencyCode?: string; }; grossPrice?: { value?: number; divisor?: number; currencyCode?: string; }; ... 7 more ...; attributeValues?: Record<...>; } = ZProductDto; sourceId?: string }[]>

Remarks

The sourceId of the container MUST NOT change

Defined in

src/contracts/push-products/handler/push-products-consumer.ts:16