validateMarker
Check whether a product status marker is free.
Description
Checks whether any product status already uses the given marker. Resolves to true if the marker is free (no status uses it) and false if a status already has it.
.validateMarker(
);
Parameters schema
Schema
marker(required): string
Marker of the product status.
example: "in_stock"
Examples
Minimal example
// 'sale' is already used by a status, so the marker is taken.
const response = await ProductStatuses.validateMarker('sale');
Example response
false