Interface: PushProductsSupplier
Implement this interface for APIs that can provide products.
Methods
processPushProductsRequest
▸ processPushProductsRequest(request
): 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
}[]>
Handle the incoming request and transform it to a list of ProductPushContainerDto
Parameters
Name | Type | Description |
---|---|---|
request | Object | The raw http request |
request.body? | string | - |
request.headers? | Record <string , string > | - |
request.method? | string | - |
request.url? | string | - |
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
}[]>
Defined in
src/contracts/push-products/handler/push-products-supplier.ts:13
providePushedProducts
▸ providePushedProducts(products
): Promise
<{ body?
: string
; headers?
: Record
<string
, string
> ; statusCode?
: number
}>
Transform the pushed products to a valid http response.
Parameters
Name | Type | Description |
---|---|---|
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 pushed products |
Returns
Promise
<{ body?
: string
; headers?
: Record
<string
, string
> ; statusCode?
: number
}>
Defined in
src/contracts/push-products/handler/push-products-supplier.ts:20