@spytecgps/nova-orm 1.4.179 → 1.4.181

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm"),a=require("../utils/boolToNumberTransformer.js"),r=require("../utils/uuidTransformer.js"),d=require("./retailAlertType.js");exports.RetailAlert=class RetailAlert{id;alertTypeId;clientId;alertType;value;message;createdAt;storeId;zoneId;isNotification;retailClientAlertConfigurationId;severity;deleted;status;category;acknowledgedAt;resolvedAt},e.__decorate([t.PrimaryGeneratedColumn({type:"bigint",name:"id"}),e.__metadata("design:type",Number)],exports.RetailAlert.prototype,"id",void 0),e.__decorate([t.Column("tinyint",{name:"alertTypeId"}),e.__metadata("design:type",Number)],exports.RetailAlert.prototype,"alertTypeId",void 0),e.__decorate([t.Column("int",{name:"clientId"}),e.__metadata("design:type",Number)],exports.RetailAlert.prototype,"clientId",void 0),e.__decorate([t.OneToOne((()=>d.RetailAlertType),{createForeignKeyConstraints:!1}),t.JoinColumn({name:"alertTypeId",referencedColumnName:"id"}),e.__metadata("design:type",Object)],exports.RetailAlert.prototype,"alertType",void 0),e.__decorate([t.Column("varchar",{name:"value",nullable:!0,length:5e3}),e.__metadata("design:type",String)],exports.RetailAlert.prototype,"value",void 0),e.__decorate([t.Column("varchar",{name:"message",length:1e3}),e.__metadata("design:type",String)],exports.RetailAlert.prototype,"message",void 0),e.__decorate([t.CreateDateColumn({name:"createdAt"}),e.__metadata("design:type",Date)],exports.RetailAlert.prototype,"createdAt",void 0),e.__decorate([t.Column("binary",{name:"storeId",length:16,transformer:r.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailAlert.prototype,"storeId",void 0),e.__decorate([t.Column("binary",{name:"zoneId",length:16,transformer:r.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailAlert.prototype,"zoneId",void 0),e.__decorate([t.Column("tinyint",{name:"isNotification",nullable:!0,width:1}),e.__metadata("design:type",Boolean)],exports.RetailAlert.prototype,"isNotification",void 0),e.__decorate([t.Column("int",{name:"retailClientAlertConfigurationId",nullable:!0}),e.__metadata("design:type",Number)],exports.RetailAlert.prototype,"retailClientAlertConfigurationId",void 0),e.__decorate([t.Column("varchar",{name:"severity",length:50}),e.__metadata("design:type",String)],exports.RetailAlert.prototype,"severity",void 0),e.__decorate([t.Column("tinyint",{name:"deleted",nullable:!0,width:1,transformer:new a.BoolToNumberTransformer,default:()=>"'0'"}),e.__metadata("design:type",Boolean)],exports.RetailAlert.prototype,"deleted",void 0),e.__decorate([t.Column("varchar",{name:"status",nullable:!0,length:50,default:()=>"'new'"}),e.__metadata("design:type",String)],exports.RetailAlert.prototype,"status",void 0),e.__decorate([t.Column("varchar",{name:"category",length:50}),e.__metadata("design:type",String)],exports.RetailAlert.prototype,"category",void 0),e.__decorate([t.Column("datetime",{name:"acknowledgedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.RetailAlert.prototype,"acknowledgedAt",void 0),e.__decorate([t.Column("datetime",{name:"resolvedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.RetailAlert.prototype,"resolvedAt",void 0),exports.RetailAlert=e.__decorate([t.Index("ix_clientId_createdAt",["clientId","createdAt"],{}),t.Index("ix_clientId_acknowledgedAt_createdAt",["clientId","acknowledgedAt","createdAt"],{}),t.Index("ix_clientId_severity_status_createdAt",["clientId","severity","status","createdAt"],{}),t.Index("ix_clientId_storeId_createdAt",["clientId","storeId","createdAt"],{}),t.Index("ix_clientId_zoneId_createdAt",["clientId","zoneId","createdAt"],{}),t.Index("ix_clientId_severity_createdAt",["clientId","severity","createdAt"],{}),t.Index("ix_clientId_category_createdAt",["clientId","category","createdAt"],{}),t.Index("ix_clientId_status_createdAt",["clientId","status","createdAt"],{}),t.Index("ix_clientId_alertTypeId_createdAt",["clientId","alertTypeId","createdAt"],{}),t.Entity("retailAlert",{schema:"nova"})],exports.RetailAlert);
1
+ "use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm"),a=require("../utils/boolToNumberTransformer.js"),r=require("../utils/uuidTransformer.js"),d=require("./retailAlertType.js");exports.RetailAlert=class RetailAlert{id;alertTypeId;clientId;alertType;value;message;createdAt;storeId;zoneId;isNotification;retailClientAlertConfigurationId;severity;deleted;status;category;bleTagId;productId;acknowledgedAt;resolvedAt;bleTag;retailProduct;retailStore;retailZone},e.__decorate([t.PrimaryGeneratedColumn({type:"bigint",name:"id"}),e.__metadata("design:type",Number)],exports.RetailAlert.prototype,"id",void 0),e.__decorate([t.Column("tinyint",{name:"alertTypeId"}),e.__metadata("design:type",Number)],exports.RetailAlert.prototype,"alertTypeId",void 0),e.__decorate([t.Column("int",{name:"clientId"}),e.__metadata("design:type",Number)],exports.RetailAlert.prototype,"clientId",void 0),e.__decorate([t.OneToOne((()=>d.RetailAlertType),{createForeignKeyConstraints:!1}),t.JoinColumn({name:"alertTypeId",referencedColumnName:"id"}),e.__metadata("design:type",Object)],exports.RetailAlert.prototype,"alertType",void 0),e.__decorate([t.Column("varchar",{name:"value",nullable:!0,length:5e3}),e.__metadata("design:type",String)],exports.RetailAlert.prototype,"value",void 0),e.__decorate([t.Column("varchar",{name:"message",length:1e3}),e.__metadata("design:type",String)],exports.RetailAlert.prototype,"message",void 0),e.__decorate([t.CreateDateColumn({name:"createdAt"}),e.__metadata("design:type",Date)],exports.RetailAlert.prototype,"createdAt",void 0),e.__decorate([t.Column("binary",{name:"storeId",length:16,transformer:r.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailAlert.prototype,"storeId",void 0),e.__decorate([t.Column("binary",{name:"zoneId",length:16,transformer:r.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailAlert.prototype,"zoneId",void 0),e.__decorate([t.Column("tinyint",{name:"isNotification",nullable:!0,width:1}),e.__metadata("design:type",Boolean)],exports.RetailAlert.prototype,"isNotification",void 0),e.__decorate([t.Column("int",{name:"retailClientAlertConfigurationId",nullable:!0}),e.__metadata("design:type",Number)],exports.RetailAlert.prototype,"retailClientAlertConfigurationId",void 0),e.__decorate([t.Column("varchar",{name:"severity",length:50}),e.__metadata("design:type",String)],exports.RetailAlert.prototype,"severity",void 0),e.__decorate([t.Column("tinyint",{name:"deleted",nullable:!0,width:1,transformer:new a.BoolToNumberTransformer,default:()=>"'0'"}),e.__metadata("design:type",Boolean)],exports.RetailAlert.prototype,"deleted",void 0),e.__decorate([t.Column("varchar",{name:"status",nullable:!0,length:50,default:()=>"'new'"}),e.__metadata("design:type",String)],exports.RetailAlert.prototype,"status",void 0),e.__decorate([t.Column("varchar",{name:"category",length:50}),e.__metadata("design:type",String)],exports.RetailAlert.prototype,"category",void 0),e.__decorate([t.Column("binary",{name:"bleTagId",length:16,transformer:r.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailAlert.prototype,"bleTagId",void 0),e.__decorate([t.Column("binary",{name:"productId",length:16,transformer:r.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailAlert.prototype,"productId",void 0),e.__decorate([t.Column("datetime",{name:"acknowledgedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.RetailAlert.prototype,"acknowledgedAt",void 0),e.__decorate([t.Column("datetime",{name:"resolvedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.RetailAlert.prototype,"resolvedAt",void 0),exports.RetailAlert=e.__decorate([t.Index("ix_clientId_createdAt",["clientId","createdAt"],{}),t.Index("ix_clientId_acknowledgedAt_createdAt",["clientId","acknowledgedAt","createdAt"],{}),t.Index("ix_clientId_severity_status_createdAt",["clientId","severity","status","createdAt"],{}),t.Index("ix_clientId_storeId_createdAt",["clientId","storeId","createdAt"],{}),t.Index("ix_clientId_zoneId_createdAt",["clientId","zoneId","createdAt"],{}),t.Index("ix_clientId_severity_createdAt",["clientId","severity","createdAt"],{}),t.Index("ix_clientId_category_createdAt",["clientId","category","createdAt"],{}),t.Index("ix_clientId_status_createdAt",["clientId","status","createdAt"],{}),t.Index("ix_clientId_alertTypeId_createdAt",["clientId","alertTypeId","createdAt"],{}),t.Entity("retailAlert",{schema:"nova"})],exports.RetailAlert);
@@ -1 +1 @@
1
- "use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm"),a=require("../utils/uuidTransformer.js");exports.RetailIncident=class RetailIncident{id;clientId;storeId;itemId;type;status;severity;description;estimatedLoss;zoneId;detectedAt;resolvedAt;resolvedBy;resolutionNotes;createdAt;updatedAt;retailStore;retailItem;retailZone},e.__decorate([t.PrimaryColumn("binary",{name:"id",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"id",void 0),e.__decorate([t.Column("int",{name:"clientId"}),e.__metadata("design:type",Number)],exports.RetailIncident.prototype,"clientId",void 0),e.__decorate([t.Column("binary",{name:"storeId",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"storeId",void 0),e.__decorate([t.Column("binary",{name:"itemId",length:16,transformer:a.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"itemId",void 0),e.__decorate([t.Column("varchar",{name:"type",length:20}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"type",void 0),e.__decorate([t.Column("varchar",{name:"status",length:20}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"status",void 0),e.__decorate([t.Column("varchar",{name:"severity",length:20}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"severity",void 0),e.__decorate([t.Column("varchar",{name:"description",length:255}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"description",void 0),e.__decorate([t.Column("decimal",{name:"estimatedLoss",precision:19,scale:4,nullable:!0}),e.__metadata("design:type",Number)],exports.RetailIncident.prototype,"estimatedLoss",void 0),e.__decorate([t.Column("binary",{name:"zoneId",length:16,transformer:a.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"zoneId",void 0),e.__decorate([t.Column("datetime",{name:"detectedAt"}),e.__metadata("design:type",Date)],exports.RetailIncident.prototype,"detectedAt",void 0),e.__decorate([t.Column("datetime",{name:"resolvedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.RetailIncident.prototype,"resolvedAt",void 0),e.__decorate([t.Column("varchar",{name:"resolvedBy",length:50,nullable:!0}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"resolvedBy",void 0),e.__decorate([t.Column("varchar",{name:"resolution",length:255,nullable:!0}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"resolutionNotes",void 0),e.__decorate([t.CreateDateColumn({name:"createdAt"}),e.__metadata("design:type",Date)],exports.RetailIncident.prototype,"createdAt",void 0),e.__decorate([t.UpdateDateColumn({name:"updatedAt"}),e.__metadata("design:type",Date)],exports.RetailIncident.prototype,"updatedAt",void 0),exports.RetailIncident=e.__decorate([t.Index("ix_clientId_storeId_detectedAt_type",["clientId","storeId","detectedAt","type"],{}),t.Index("ix_clientId_detectedAt_type",["clientId","detectedAt","type"],{}),t.Entity("retailIncident",{schema:"nova"})],exports.RetailIncident);
1
+ "use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm"),a=require("../utils/uuidTransformer.js");exports.RetailIncident=class RetailIncident{id;clientId;storeId;itemId;type;status;severity;description;estimatedLoss;zoneId;detectedAt;resolvedAt;resolvedBy;resolutionNotes;createdAt;updatedAt;retailStore;retailItem;retailZone},e.__decorate([t.PrimaryColumn("binary",{name:"id",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"id",void 0),e.__decorate([t.Column("int",{name:"clientId"}),e.__metadata("design:type",Number)],exports.RetailIncident.prototype,"clientId",void 0),e.__decorate([t.Column("binary",{name:"storeId",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"storeId",void 0),e.__decorate([t.Column("binary",{name:"itemId",length:16,transformer:a.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"itemId",void 0),e.__decorate([t.Column("varchar",{name:"type",length:20}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"type",void 0),e.__decorate([t.Column("varchar",{name:"status",length:20}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"status",void 0),e.__decorate([t.Column("varchar",{name:"severity",length:20}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"severity",void 0),e.__decorate([t.Column("varchar",{name:"description",length:255}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"description",void 0),e.__decorate([t.Column("decimal",{name:"estimatedLoss",precision:19,scale:4,nullable:!0}),e.__metadata("design:type",Number)],exports.RetailIncident.prototype,"estimatedLoss",void 0),e.__decorate([t.Column("binary",{name:"zoneId",length:16,transformer:a.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"zoneId",void 0),e.__decorate([t.Column("datetime",{name:"detectedAt"}),e.__metadata("design:type",Date)],exports.RetailIncident.prototype,"detectedAt",void 0),e.__decorate([t.Column("datetime",{name:"resolvedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.RetailIncident.prototype,"resolvedAt",void 0),e.__decorate([t.Column("varchar",{name:"resolvedBy",length:50,nullable:!0}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"resolvedBy",void 0),e.__decorate([t.Column("varchar",{name:"resolution",length:255,nullable:!0}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"resolutionNotes",void 0),e.__decorate([t.CreateDateColumn({name:"createdAt"}),e.__metadata("design:type",Date)],exports.RetailIncident.prototype,"createdAt",void 0),e.__decorate([t.UpdateDateColumn({name:"updatedAt"}),e.__metadata("design:type",Date)],exports.RetailIncident.prototype,"updatedAt",void 0),exports.RetailIncident=e.__decorate([t.Index("ix_clientId_storeId_detectedAt_type_estimatedLoss",["clientId","storeId","detectedAt","type","estimatedLoss"],{}),t.Index("ix_clientId_detectedAt_type_estimatedLoss",["clientId","detectedAt","type","estimatedLoss"],{}),t.Entity("retailIncident",{schema:"nova"})],exports.RetailIncident);
@@ -1 +1 @@
1
- "use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm"),r=require("../utils/uuidTransformer.js");exports.RetailItem=class RetailItem{id;bleTagId;productId;storeId;homeZoneId;currentZoneId;status;batteryLevel;lastMovedAt;enteredCurrentZoneAt;receivedAt;soldAt;createdAt;updatedAt;retailProduct;retailStore;retailZone;bleTag},e.__decorate([t.PrimaryColumn("binary",{name:"id",length:16,transformer:r.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItem.prototype,"id",void 0),e.__decorate([t.Column("binary",{name:"bleTagId",length:16,transformer:r.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItem.prototype,"bleTagId",void 0),e.__decorate([t.Column("binary",{name:"productId",length:16,transformer:r.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItem.prototype,"productId",void 0),e.__decorate([t.Column("binary",{name:"storeId",length:16,transformer:r.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItem.prototype,"storeId",void 0),e.__decorate([t.Column("binary",{name:"homeZoneId",length:16,transformer:r.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItem.prototype,"homeZoneId",void 0),e.__decorate([t.Column("binary",{name:"currentZoneId",length:16,transformer:r.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailItem.prototype,"currentZoneId",void 0),e.__decorate([t.Column("varchar",{name:"status",length:20}),e.__metadata("design:type",String)],exports.RetailItem.prototype,"status",void 0),e.__decorate([t.Column("smallint",{name:"batteryLevel",nullable:!0}),e.__metadata("design:type",Number)],exports.RetailItem.prototype,"batteryLevel",void 0),e.__decorate([t.Column("datetime",{name:"lastMovedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.RetailItem.prototype,"lastMovedAt",void 0),e.__decorate([t.Column("datetime",{name:"enteredCurrentZoneAt",nullable:!0}),e.__metadata("design:type",Date)],exports.RetailItem.prototype,"enteredCurrentZoneAt",void 0),e.__decorate([t.Column("datetime",{name:"receivedAt"}),e.__metadata("design:type",Date)],exports.RetailItem.prototype,"receivedAt",void 0),e.__decorate([t.Column("datetime",{name:"soldAt",nullable:!0}),e.__metadata("design:type",Date)],exports.RetailItem.prototype,"soldAt",void 0),e.__decorate([t.CreateDateColumn({name:"createdAt"}),e.__metadata("design:type",Date)],exports.RetailItem.prototype,"createdAt",void 0),e.__decorate([t.UpdateDateColumn({name:"updatedAt"}),e.__metadata("design:type",Date)],exports.RetailItem.prototype,"updatedAt",void 0),exports.RetailItem=e.__decorate([t.Index("ix_bleTagId_productId",["bleTagId","productId"],{unique:!0}),t.Index("ix_storeId_currentZoneId",["storeId","currentZoneId"],{}),t.Index("ix_productId_storeId",["productId","storeId"],{}),t.Entity("retailItem",{schema:"nova"})],exports.RetailItem);
1
+ "use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm"),r=require("../utils/uuidTransformer.js");exports.RetailItem=class RetailItem{id;bleTagId;productId;storeId;homeZoneId;currentZoneId;status;batteryLevel;lastMovedAt;enteredCurrentZoneAt;receivedAt;soldAt;createdAt;updatedAt;retailProduct;retailStore;retailZone;bleTag},e.__decorate([t.PrimaryColumn("binary",{name:"id",length:16,transformer:r.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItem.prototype,"id",void 0),e.__decorate([t.Column("binary",{name:"bleTagId",length:16,transformer:r.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItem.prototype,"bleTagId",void 0),e.__decorate([t.Column("binary",{name:"productId",length:16,transformer:r.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItem.prototype,"productId",void 0),e.__decorate([t.Column("binary",{name:"storeId",length:16,transformer:r.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItem.prototype,"storeId",void 0),e.__decorate([t.Column("binary",{name:"homeZoneId",length:16,transformer:r.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItem.prototype,"homeZoneId",void 0),e.__decorate([t.Column("binary",{name:"currentZoneId",length:16,transformer:r.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailItem.prototype,"currentZoneId",void 0),e.__decorate([t.Column("varchar",{name:"status",length:20}),e.__metadata("design:type",String)],exports.RetailItem.prototype,"status",void 0),e.__decorate([t.Column("smallint",{name:"batteryLevel",nullable:!0}),e.__metadata("design:type",Number)],exports.RetailItem.prototype,"batteryLevel",void 0),e.__decorate([t.Column("datetime",{name:"lastMovedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.RetailItem.prototype,"lastMovedAt",void 0),e.__decorate([t.Column("datetime",{name:"enteredCurrentZoneAt",nullable:!0}),e.__metadata("design:type",Date)],exports.RetailItem.prototype,"enteredCurrentZoneAt",void 0),e.__decorate([t.Column("datetime",{name:"receivedAt"}),e.__metadata("design:type",Date)],exports.RetailItem.prototype,"receivedAt",void 0),e.__decorate([t.Column("datetime",{name:"soldAt",nullable:!0}),e.__metadata("design:type",Date)],exports.RetailItem.prototype,"soldAt",void 0),e.__decorate([t.CreateDateColumn({name:"createdAt"}),e.__metadata("design:type",Date)],exports.RetailItem.prototype,"createdAt",void 0),e.__decorate([t.UpdateDateColumn({name:"updatedAt"}),e.__metadata("design:type",Date)],exports.RetailItem.prototype,"updatedAt",void 0),exports.RetailItem=e.__decorate([t.Index("ix_bleTagId_productId",["bleTagId","productId"],{unique:!0}),t.Index("ix_storeId_currentZoneId",["storeId","currentZoneId"],{}),t.Index("ix_productId_storeId_receivedAt",["productId","storeId","receivedAt"],{}),t.Index("ix_productId_receivedAt",["productId","receivedAt"],{}),t.Entity("retailItem",{schema:"nova"})],exports.RetailItem);
@@ -1 +1 @@
1
- "use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm"),a=require("../utils/uuidTransformer.js");exports.RetailItemEvent=class RetailItemEvent{id;itemId;bleTagId;storeId;eventType;zoneId;zoneCategory;gatewayId;metadata;timestamp;duration},e.__decorate([t.PrimaryColumn("binary",{name:"id",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"id",void 0),e.__decorate([t.Column("binary",{name:"itemId",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"itemId",void 0),e.__decorate([t.Column("binary",{name:"bleTagId",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"bleTagId",void 0),e.__decorate([t.Column("binary",{name:"storeId",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"storeId",void 0),e.__decorate([t.Column("varchar",{name:"eventType",length:20}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"eventType",void 0),e.__decorate([t.Column("binary",{name:"zoneId",length:16,transformer:a.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"zoneId",void 0),e.__decorate([t.Column("varchar",{name:"zoneCategory",length:50,nullable:!0}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"zoneCategory",void 0),e.__decorate([t.Column("binary",{name:"gatewayId",length:16,transformer:a.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"gatewayId",void 0),e.__decorate([t.Column("json",{name:"metadata",nullable:!0}),e.__metadata("design:type",Object)],exports.RetailItemEvent.prototype,"metadata",void 0),e.__decorate([t.Column("datetime",{name:"timestamp"}),e.__metadata("design:type",Date)],exports.RetailItemEvent.prototype,"timestamp",void 0),e.__decorate([t.Column("int",{name:"duration",nullable:!0}),e.__metadata("design:type",Number)],exports.RetailItemEvent.prototype,"duration",void 0),exports.RetailItemEvent=e.__decorate([t.Index("ix_storeId_eventType_timestamp",["storeId","eventType","timestamp"],{}),t.Index("ix_storeId_eventType_zoneCategory_timestamp",["storeId","eventType","zoneCategory","timestamp"],{}),t.Index("ix_storeId_itemId_eventType_timestamp",["storeId","itemId","eventType","timestamp"],{}),t.Index("ix_itemId_eventType_zoneCategory_timestamp",["itemId","eventType","zoneCategory","timestamp"],{}),t.Index("ix_itemId_eventType_timestamp_storeId",["itemId","eventType","timestamp","storeId"],{}),t.Index("ix_bleTagId",["bleTagId"],{}),t.Entity("retailItemEvent",{schema:"nova"})],exports.RetailItemEvent);
1
+ "use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm"),a=require("../utils/uuidTransformer.js");exports.RetailItemEvent=class RetailItemEvent{id;itemId;bleTagId;productId;storeId;eventType;zoneId;zoneCategory;gatewayId;metadata;timestamp;duration},e.__decorate([t.PrimaryColumn("binary",{name:"id",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"id",void 0),e.__decorate([t.Column("binary",{name:"itemId",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"itemId",void 0),e.__decorate([t.Column("binary",{name:"bleTagId",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"bleTagId",void 0),e.__decorate([t.Column("binary",{name:"productId",length:16,transformer:a.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"productId",void 0),e.__decorate([t.Column("binary",{name:"storeId",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"storeId",void 0),e.__decorate([t.Column("varchar",{name:"eventType",length:20}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"eventType",void 0),e.__decorate([t.Column("binary",{name:"zoneId",length:16,transformer:a.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"zoneId",void 0),e.__decorate([t.Column("varchar",{name:"zoneCategory",length:50,nullable:!0}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"zoneCategory",void 0),e.__decorate([t.Column("binary",{name:"gatewayId",length:16,transformer:a.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"gatewayId",void 0),e.__decorate([t.Column("json",{name:"metadata",nullable:!0}),e.__metadata("design:type",Object)],exports.RetailItemEvent.prototype,"metadata",void 0),e.__decorate([t.Column("datetime",{name:"timestamp"}),e.__metadata("design:type",Date)],exports.RetailItemEvent.prototype,"timestamp",void 0),e.__decorate([t.Column("int",{name:"duration",nullable:!0}),e.__metadata("design:type",Number)],exports.RetailItemEvent.prototype,"duration",void 0),exports.RetailItemEvent=e.__decorate([t.Index("ix_storeId_eventType_timestamp",["storeId","eventType","timestamp"],{}),t.Index("ix_storeId_eventType_zoneCategory_timestamp",["storeId","eventType","zoneCategory","timestamp"],{}),t.Index("ix_storeId_itemId_eventType_timestamp",["storeId","itemId","eventType","timestamp"],{}),t.Index("ix_itemId_eventType_zoneCategory_timestamp",["itemId","eventType","zoneCategory","timestamp"],{}),t.Index("ix_itemId_eventType_timestamp_storeId",["itemId","eventType","timestamp","storeId"],{}),t.Index("ix_bleTagId",["bleTagId"],{}),t.Entity("retailItemEvent",{schema:"nova"})],exports.RetailItemEvent);
@@ -1 +1 @@
1
- "use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm"),a=require("../utils/uuidTransformer.js");exports.RetailProduct=class RetailProduct{id;clientId;upc;sku;name;brand;category;defaultZoneId;price;imageUrl;attributes;createdAt;updatedAt},e.__decorate([t.PrimaryColumn("binary",{name:"id",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"id",void 0),e.__decorate([t.Column("int",{name:"clientId"}),e.__metadata("design:type",Number)],exports.RetailProduct.prototype,"clientId",void 0),e.__decorate([t.Column("varchar",{name:"upc",length:12}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"upc",void 0),e.__decorate([t.Column("varchar",{name:"sku",length:50}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"sku",void 0),e.__decorate([t.Column("varchar",{name:"name",length:100}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"name",void 0),e.__decorate([t.Column("varchar",{name:"brand",length:50}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"brand",void 0),e.__decorate([t.Column("varchar",{name:"category",length:50}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"category",void 0),e.__decorate([t.Column("binary",{name:"defaultZoneId",length:16,transformer:a.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"defaultZoneId",void 0),e.__decorate([t.Column("decimal",{name:"price",precision:19,scale:4}),e.__metadata("design:type",Number)],exports.RetailProduct.prototype,"price",void 0),e.__decorate([t.Column("varchar",{name:"imageUrl",length:255,nullable:!0}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"imageUrl",void 0),e.__decorate([t.Column("json",{name:"attributes",nullable:!0}),e.__metadata("design:type",Object)],exports.RetailProduct.prototype,"attributes",void 0),e.__decorate([t.CreateDateColumn({name:"createdAt"}),e.__metadata("design:type",Date)],exports.RetailProduct.prototype,"createdAt",void 0),e.__decorate([t.UpdateDateColumn({name:"updatedAt"}),e.__metadata("design:type",Date)],exports.RetailProduct.prototype,"updatedAt",void 0),exports.RetailProduct=e.__decorate([t.Index("ix_clientId_upc",["clientId","upc"],{unique:!0}),t.Index("ix_clientId_brand_category",["clientId","brand","category"],{}),t.Entity("retailProduct",{schema:"nova"})],exports.RetailProduct);
1
+ "use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm"),a=require("../utils/uuidTransformer.js");exports.RetailProduct=class RetailProduct{id;clientId;upc;sku;name;brand;category;defaultZoneId;price;imageUrl;attributes;createdAt;updatedAt},e.__decorate([t.PrimaryColumn("binary",{name:"id",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"id",void 0),e.__decorate([t.Column("int",{name:"clientId"}),e.__metadata("design:type",Number)],exports.RetailProduct.prototype,"clientId",void 0),e.__decorate([t.Column("varchar",{name:"upc",length:12}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"upc",void 0),e.__decorate([t.Column("varchar",{name:"sku",length:50}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"sku",void 0),e.__decorate([t.Column("varchar",{name:"name",length:100}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"name",void 0),e.__decorate([t.Column("varchar",{name:"brand",length:50}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"brand",void 0),e.__decorate([t.Column("varchar",{name:"category",length:50}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"category",void 0),e.__decorate([t.Column("binary",{name:"defaultZoneId",length:16,transformer:a.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"defaultZoneId",void 0),e.__decorate([t.Column("decimal",{name:"price",precision:19,scale:4}),e.__metadata("design:type",Number)],exports.RetailProduct.prototype,"price",void 0),e.__decorate([t.Column("varchar",{name:"imageUrl",length:255,nullable:!0}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"imageUrl",void 0),e.__decorate([t.Column("json",{name:"attributes",nullable:!0}),e.__metadata("design:type",Object)],exports.RetailProduct.prototype,"attributes",void 0),e.__decorate([t.CreateDateColumn({name:"createdAt"}),e.__metadata("design:type",Date)],exports.RetailProduct.prototype,"createdAt",void 0),e.__decorate([t.UpdateDateColumn({name:"updatedAt"}),e.__metadata("design:type",Date)],exports.RetailProduct.prototype,"updatedAt",void 0),exports.RetailProduct=e.__decorate([t.Index("ix_category",["category"],{}),t.Index("ix_clientId_upc",["clientId","upc"],{unique:!0}),t.Index("ix_clientId_brand_category",["clientId","brand","category"],{}),t.Entity("retailProduct",{schema:"nova"})],exports.RetailProduct);
@@ -1,6 +1,10 @@
1
1
  import { Relation } from 'typeorm';
2
2
  import { RetailAlertCategory, RetailAlertType } from './retailAlertType';
3
+ import { RetailBleTag } from './retailBleTag';
3
4
  import { RetailAlertSeverity } from './retailClientAlertConfiguration';
5
+ import { RetailProduct } from './retailProduct';
6
+ import { RetailStore } from './retailStore';
7
+ import { RetailZone } from './retailZone';
4
8
  export type RetailAlertStatus = 'new' | 'acknowledged' | 'resolved' | 'dismissed';
5
9
  export declare class RetailAlert {
6
10
  id: number;
@@ -18,6 +22,12 @@ export declare class RetailAlert {
18
22
  deleted: boolean | null;
19
23
  status: RetailAlertStatus;
20
24
  category: RetailAlertCategory;
25
+ bleTagId?: string | null;
26
+ productId?: string | null;
21
27
  acknowledgedAt?: Date | null;
22
28
  resolvedAt?: Date | null;
29
+ bleTag?: RetailBleTag;
30
+ retailProduct?: RetailProduct;
31
+ retailStore?: RetailStore;
32
+ retailZone?: RetailZone;
23
33
  }
@@ -4,6 +4,7 @@ export declare class RetailItemEvent {
4
4
  id: string;
5
5
  itemId: string;
6
6
  bleTagId: string;
7
+ productId?: string | null;
7
8
  storeId: string;
8
9
  eventType: RetailItemEventType;
9
10
  zoneId?: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spytecgps/nova-orm",
3
- "version": "1.4.179",
3
+ "version": "1.4.181",
4
4
  "description": "ORM with PlanetScale",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
package/schema.sql CHANGED
@@ -1,6 +1,6 @@
1
- -- nova-orm-schema-checksum: e4c3800ecea14f7982c726ac50a3d86d
1
+ -- nova-orm-schema-checksum: ec0ac0e90c9008809656fb545f77c04c
2
2
  -- Nova ORM Schema Dump
3
- -- Generated at: 2026-02-16T11:51:30.005Z
3
+ -- Generated at: 2026-02-17T17:45:06.881Z
4
4
 
5
5
  SET FOREIGN_KEY_CHECKS = 0;
6
6
 
@@ -2441,6 +2441,8 @@ CREATE TABLE `retailAlert` (
2441
2441
  `deleted` tinyint(1) DEFAULT '0',
2442
2442
  `status` varchar(50) DEFAULT 'new',
2443
2443
  `category` varchar(50) NOT NULL,
2444
+ `bleTagId` binary(16) DEFAULT NULL,
2445
+ `productId` binary(16) DEFAULT NULL,
2444
2446
  `acknowledgedAt` datetime DEFAULT NULL,
2445
2447
  `resolvedAt` datetime DEFAULT NULL,
2446
2448
  PRIMARY KEY (`id`),
@@ -2574,8 +2576,8 @@ CREATE TABLE `retailIncident` (
2574
2576
  `createdAt` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
2575
2577
  `updatedAt` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
2576
2578
  PRIMARY KEY (`id`),
2577
- KEY `ix_clientId_detectedAt_type` (`clientId`,`detectedAt`,`type`),
2578
- KEY `ix_clientId_storeId_detectedAt_type` (`clientId`,`storeId`,`detectedAt`,`type`)
2579
+ KEY `ix_clientId_detectedAt_type_estimatedLoss` (`clientId`,`detectedAt`,`type`,`estimatedLoss`),
2580
+ KEY `ix_clientId_storeId_detectedAt_type_estimatedLoss` (`clientId`,`storeId`,`detectedAt`,`type`,`estimatedLoss`)
2579
2581
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
2580
2582
 
2581
2583
  DROP TABLE IF EXISTS `retailItem`;
@@ -2596,7 +2598,8 @@ CREATE TABLE `retailItem` (
2596
2598
  `updatedAt` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
2597
2599
  PRIMARY KEY (`id`),
2598
2600
  UNIQUE KEY `ix_bleTagId_productId` (`bleTagId`,`productId`),
2599
- KEY `ix_productId_storeId` (`productId`,`storeId`),
2601
+ KEY `ix_productId_receivedAt` (`productId`,`receivedAt`),
2602
+ KEY `ix_productId_storeId_receivedAt` (`productId`,`storeId`,`receivedAt`),
2600
2603
  KEY `ix_storeId_currentZoneId` (`storeId`,`currentZoneId`)
2601
2604
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
2602
2605
 
@@ -2605,6 +2608,7 @@ CREATE TABLE `retailItemEvent` (
2605
2608
  `id` binary(16) NOT NULL,
2606
2609
  `itemId` binary(16) NOT NULL,
2607
2610
  `bleTagId` binary(16) NOT NULL,
2611
+ `productId` binary(16) DEFAULT NULL,
2608
2612
  `storeId` binary(16) NOT NULL,
2609
2613
  `eventType` varchar(20) NOT NULL,
2610
2614
  `zoneId` binary(16) DEFAULT NULL,
@@ -2639,7 +2643,8 @@ CREATE TABLE `retailProduct` (
2639
2643
  `updatedAt` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
2640
2644
  PRIMARY KEY (`id`),
2641
2645
  UNIQUE KEY `ix_clientId_upc` (`clientId`,`upc`),
2642
- KEY `ix_clientId_brand_category` (`clientId`,`brand`,`category`)
2646
+ KEY `ix_clientId_brand_category` (`clientId`,`brand`,`category`),
2647
+ KEY `ix_category` (`category`)
2643
2648
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
2644
2649
 
2645
2650
  DROP TABLE IF EXISTS `retailStore`;