Macklin API paths that only respond to an authenticated session. Kept apart from ApiEndpoints so callers can tell which requests need credentials.
Type guard to validate if data matches the Macklin timestamp response structure. The timestamp endpoint returns the server's current Unix timestamp.
Validates if a response matches the Macklin API response format. All API responses must have a code, message, and data field.
Validates the unwrapped data payload of a successful MSDS search. request
strips the { code, message, data } envelope, so a success yields { url }
while error responses yield [], which fails the { url } shape — a positive
result therefore means an SDS URL is present.
Validates the data payload of the product info endpoint
(POST /api/product/info). Confirms item.chem_mw (the molecular weight) is
present so callers can safely read the chemistry fields.
Validates if a URL requires authentication. These endpoints require a valid user token in the X-User-Token header.
Validates if a URL is an authentication check endpoint. These endpoints are used to verify the user's authentication status and will return a specific error code (1005) if authentication fails.
Validates if data matches the Macklin search result format. Search results contain a list of products and a total count. The list property is generic to support different product types.
Validates if data matches the Macklin product details response format. Product details response contains a list of product details.
Validates if data matches the Macklin product details format. Product details contain comprehensive information about a specific product variant, including pricing, stock, and delivery information.
Type guard for TimestampStorage objects stored in local state.
Macklin API paths used by the supplier module, relative to its API host.