Releases: CrystallizeAPI/import-utilities
Releases · CrystallizeAPI/import-utilities
v1.12.0
Minor Changes
-
58a0768: The
AreaStatus.error
interface is updated with an optionalitem
field, which will be populated on the following events:-
CANNOT_HANDLE_ITEM,
-
CANNOT_HANDLE_ITEM_RELATION
-
CANNOT_HANDLE_PRODUCT
interface AreaError {
message: string
code:
| 'UPLOAD_FAILED'
| 'SHAPE_ID_MISSING'
| 'CANNOT_HANDLE_ITEM'
| 'CANNOT_HANDLE_PRODUCT'
| 'CANNOT_HANDLE_ITEM_RELATION'
| 'OTHER'
item?: JSONItem
}
Furthermore, the
EVENT.NAMES.ERROR
event is extended with the optional
areaUpdate
, which sometimes will be populated with extended information
from the area, if it exists.Usage:
bootstrapper.on( EVENT_NAMES.ERROR, ({ error, areaError, willRetry }: BootstrapperError) => { if (areaError) { console.log(JSON.stringify(areaError, null, 1)) } else { console.log(JSON.stringify(error, null, 1)) } if (!willRetry) { process.exit(1) } } )
-
v1.11.1
v1.11.0
Minor Changes
-
63949a4: New event listener:
EVENT_NAMES.ITEM_PUBLISHED
. Will be triggered
whenever an item is published with the payload:const payload: type ItemEventPayload = { id: string language: string name: string }
Usage:
bootstrapper.on(EVENT_NAMES.ITEM_PUBLISHED, (payload: ItemEventPayload) => { console.log('Item was published', payload) })