0.1.6•Updated a month ago
declare namespace Supply {
type Events = {
/**
* Event for adding an entry to the ledger.
*
* @param entry_values All values passed to the creation of the new entry
*/
'supply_created': [Supply.Supply<any>]
/**
* Event for adding an entry to the ledger.
*
* @param entry_values All values passed to the creation of the new entry
*/
'item_created': [Supply.Item.Unentered]
/**
* Event for adding an entry to the ledger.
*
* @param entry_values All values passed to the creation of the new entry
*/
'item_creation_failed': [reason: string, Supply.Item.Unentered]
/**
* Event for adding an entry to the ledger.
*
* @param entry_values All values passed to the creation of the new entry
*/
'item_allotted': [allotment: Supply.Allotment.Unentered]
/**
* Event for adding an entry to the ledger.
*
* @param reason Why this entry could not be created
*/
'item_allotment_failed': [reason: string, params: Supply.Allotment.Unentered]
/**
* Event for adding an entry to the ledger.
*
* @param entry_values All values passed to the creation of the new entry
*/
'item_reserved': [allotment: Supply.Allotment.Unentered]
/**
* Event for adding an entry to the ledger.
*
* @param allotment All values passed to the creation of the new entry
*/
'reservation_claimed': [allotment: Supply.Allotment.Unentered]
/**
* Event for adding an entry to the ledger.
*
* @param allotment All values passed to the creation of the new entry
*/
'reservation_claim_failed': [user_key: string, reason: string]
/**
* Event for adding an entry to the ledger.
*
* @param allotment All values passed to the creation of the new entry
*/
'reservation_deleted': [allotment: Supply.Allotment.Unentered]
/**
* Event for adding an entry to the ledger.
*
* @param allotment All values passed to the creation of the new entry
*/
'reservation_deletion_failed': [user_key: string, reason: string]
}
namespace Events {
type FailMethod = (reason?: string) => void
}
}