Datastar models for the Warehouse.ai-status-api.
npm install warehouse.ai-status-models --save
const datastar = require('datastar')({ /* connection config */ }).connect();
const models = require('warehouse.ai-status-models')(datastar);
// from datastar.define we get...
const Status = models.Status;
Status.findFirst({ ... }, function (err, data) { .... });
All schemas for the API documentation are written using
datastar
's notation.
Generic status information
Column | Type | Summary |
---|---|---|
pkg (pk) | text | Name of a package |
env (pk) | text | What enviroment is this build made for (dev, test, etc.) |
version (pk) | text | What version of a package does this status represent |
previous_version | text | The previous version number |
total | integer | Total progress as percentage |
error | boolean | Did the build error |
create_date | timestamp | Time of creation |
update_date | timestamp | Time of last update |
complete | boolean | Did the build complete |
Generic status information but just for he latest version for a given
pkg
and env
. Refer to the table above for details. The properties
error
and complete
do not exist on this table.
A detailed event for the various stages of a build process containing message
and optional details
properties as well as locale
and whether it is and
error or not.
Column | Type | Summary |
---|---|---|
pkg (pk) | text | Name of a package |
env (pk) | text | What enviroment is this build made for (dev, test, etc.) |
version (pk) | text | What version of a package does this status represent |
locale | text | Build locale |
error | boolean | Is the status event an error |
message | text | Status message |
details | text | Message details |
create_date | timestamp | Time of creation |
event_id | unqiue_timestamp | Unique id sortable by time |
A simple distributed counter model that is incremented when a locale
build
has completed in order to compute progress based on total amount of locales
.
Column | Type | Summary |
---|---|---|
pkg (pk) | text | Name of a package |
env (pk) | text | What enviroment is this build made for (dev, test, etc.) |
version (pk) | text | What version of a package does this status represent |
count | counter | Incrementable counter |
Running tests assumes you have java installed and a local cassandra installed and running for your given operating system. Once that is complete, just run:
npm test