@spytecgps/nova-orm 1.4.178 → 1.4.180

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"),o=require("./retailAlertType.js");exports.RetailAlert=class RetailAlert{id;alertTypeId;clientId;alertType;value;message;createdAt;storeId;zoneId;isNotification;retailClientAlertConfigurationId;severity;deleted;status;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((()=>o.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("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_storeId_createdAt",["clientId","storeId","createdAt"],{}),t.Index("ix_clientId_zoneId_createdAt",["clientId","zoneId","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,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var _1684483704434AddLowerCaseIndex = require('../1684483704434-addLowerCaseIndex.js');
4
3
  var _1684483705001UpdateSecurityUserViewsV1 = require('../1684483705001-updateSecurityUserViewsV1.js');
4
+ var _1684483704434AddLowerCaseIndex = require('../1684483704434-addLowerCaseIndex.js');
5
5
  var _1684483705002UpdateSecurityUserViewsV2 = require('../1684483705002-updateSecurityUserViewsV2.js');
6
6
 
7
7
 
8
8
 
9
- exports.addLowerCaseIndex1684483704434 = _1684483704434AddLowerCaseIndex.addLowerCaseIndex1684483704434;
10
9
  exports.updateSecurityUserViewsV11684483705001 = _1684483705001UpdateSecurityUserViewsV1.updateSecurityUserViewsV11684483705001;
10
+ exports.addLowerCaseIndex1684483704434 = _1684483704434AddLowerCaseIndex.addLowerCaseIndex1684483704434;
11
11
  exports.updateSecurityUserViewsV21684483705002 = _1684483705002UpdateSecurityUserViewsV2.updateSecurityUserViewsV21684483705002;
@@ -1,6 +1,10 @@
1
1
  import { Relation } from 'typeorm';
2
- import { RetailAlertType } from './retailAlertType';
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;
@@ -17,6 +21,13 @@ export declare class RetailAlert {
17
21
  severity: RetailAlertSeverity;
18
22
  deleted: boolean | null;
19
23
  status: RetailAlertStatus;
24
+ category: RetailAlertCategory;
25
+ bleTagId?: string | null;
26
+ productId?: string | null;
20
27
  acknowledgedAt?: Date | null;
21
28
  resolvedAt?: Date | null;
29
+ bleTag?: RetailBleTag;
30
+ retailProduct?: RetailProduct;
31
+ retailStore?: RetailStore;
32
+ retailZone?: RetailZone;
22
33
  }
@@ -1,8 +1,9 @@
1
+ export type RetailAlertCategory = 'Loss Prevention' | 'Operations' | 'System Health' | 'Merchandising';
1
2
  export declare class RetailAlertType {
2
3
  id: number;
3
4
  name: string;
4
5
  description: string;
5
- category: string;
6
+ category: RetailAlertCategory;
6
7
  icon?: string | null;
7
8
  stage?: string | null;
8
9
  createdAt: Date;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spytecgps/nova-orm",
3
- "version": "1.4.178",
3
+ "version": "1.4.180",
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: 2e67a34b008fc25d3b5f6b4f1eea5262
1
+ -- nova-orm-schema-checksum: 3b8f6e60f7116243f1af0a99b31620ab
2
2
  -- Nova ORM Schema Dump
3
- -- Generated at: 2026-02-16T11:23:28.835Z
3
+ -- Generated at: 2026-02-16T13:13:02.180Z
4
4
 
5
5
  SET FOREIGN_KEY_CHECKS = 0;
6
6
 
@@ -2440,12 +2440,20 @@ CREATE TABLE `retailAlert` (
2440
2440
  `severity` varchar(50) NOT NULL,
2441
2441
  `deleted` tinyint(1) DEFAULT '0',
2442
2442
  `status` varchar(50) DEFAULT 'new',
2443
+ `category` varchar(50) NOT NULL,
2444
+ `bleTagId` binary(16) DEFAULT NULL,
2445
+ `productId` binary(16) DEFAULT NULL,
2443
2446
  `acknowledgedAt` datetime DEFAULT NULL,
2444
2447
  `resolvedAt` datetime DEFAULT NULL,
2445
2448
  PRIMARY KEY (`id`),
2446
2449
  KEY `ix_clientId_alertTypeId_createdAt` (`clientId`,`alertTypeId`,`createdAt`),
2450
+ KEY `ix_clientId_status_createdAt` (`clientId`,`status`,`createdAt`),
2451
+ KEY `ix_clientId_category_createdAt` (`clientId`,`category`,`createdAt`),
2452
+ KEY `ix_clientId_severity_createdAt` (`clientId`,`severity`,`createdAt`),
2447
2453
  KEY `ix_clientId_zoneId_createdAt` (`clientId`,`zoneId`,`createdAt`),
2448
2454
  KEY `ix_clientId_storeId_createdAt` (`clientId`,`storeId`,`createdAt`),
2455
+ KEY `ix_clientId_severity_status_createdAt` (`clientId`,`severity`,`status`,`createdAt`),
2456
+ KEY `ix_clientId_acknowledgedAt_createdAt` (`clientId`,`acknowledgedAt`,`createdAt`),
2449
2457
  KEY `ix_clientId_createdAt` (`clientId`,`createdAt`)
2450
2458
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
2451
2459