@spytecgps/nova-orm 1.4.177 → 1.4.179
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"),
|
|
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,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var _1684483704434AddLowerCaseIndex = require('../1684483704434-addLowerCaseIndex.js');
|
|
4
|
-
var _1684483705001UpdateSecurityUserViewsV1 = require('../1684483705001-updateSecurityUserViewsV1.js');
|
|
5
4
|
var _1684483705002UpdateSecurityUserViewsV2 = require('../1684483705002-updateSecurityUserViewsV2.js');
|
|
5
|
+
var _1684483705001UpdateSecurityUserViewsV1 = require('../1684483705001-updateSecurityUserViewsV1.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
exports.addLowerCaseIndex1684483704434 = _1684483704434AddLowerCaseIndex.addLowerCaseIndex1684483704434;
|
|
10
|
-
exports.updateSecurityUserViewsV11684483705001 = _1684483705001UpdateSecurityUserViewsV1.updateSecurityUserViewsV11684483705001;
|
|
11
10
|
exports.updateSecurityUserViewsV21684483705002 = _1684483705002UpdateSecurityUserViewsV2.updateSecurityUserViewsV21684483705002;
|
|
11
|
+
exports.updateSecurityUserViewsV11684483705001 = _1684483705001UpdateSecurityUserViewsV1.updateSecurityUserViewsV11684483705001;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Relation } from 'typeorm';
|
|
2
|
-
import { RetailAlertType } from './retailAlertType';
|
|
2
|
+
import { RetailAlertCategory, RetailAlertType } from './retailAlertType';
|
|
3
|
+
import { RetailAlertSeverity } from './retailClientAlertConfiguration';
|
|
3
4
|
export type RetailAlertStatus = 'new' | 'acknowledged' | 'resolved' | 'dismissed';
|
|
4
5
|
export declare class RetailAlert {
|
|
5
6
|
id: number;
|
|
@@ -7,13 +8,16 @@ export declare class RetailAlert {
|
|
|
7
8
|
clientId: number;
|
|
8
9
|
alertType?: Relation<RetailAlertType>;
|
|
9
10
|
value?: string | null;
|
|
11
|
+
message?: string;
|
|
10
12
|
createdAt: Date;
|
|
11
13
|
storeId: string;
|
|
12
14
|
zoneId?: string | null;
|
|
13
15
|
isNotification?: boolean | null;
|
|
14
16
|
retailClientAlertConfigurationId?: number | null;
|
|
17
|
+
severity: RetailAlertSeverity;
|
|
15
18
|
deleted: boolean | null;
|
|
16
19
|
status: RetailAlertStatus;
|
|
20
|
+
category: RetailAlertCategory;
|
|
17
21
|
acknowledgedAt?: Date | null;
|
|
18
22
|
resolvedAt?: Date | null;
|
|
19
23
|
}
|
|
@@ -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:
|
|
6
|
+
category: RetailAlertCategory;
|
|
6
7
|
icon?: string | null;
|
|
7
8
|
stage?: string | null;
|
|
8
9
|
createdAt: Date;
|
package/package.json
CHANGED
package/schema.sql
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
-- nova-orm-schema-checksum:
|
|
1
|
+
-- nova-orm-schema-checksum: e4c3800ecea14f7982c726ac50a3d86d
|
|
2
2
|
-- Nova ORM Schema Dump
|
|
3
|
-
-- Generated at: 2026-02-
|
|
3
|
+
-- Generated at: 2026-02-16T11:51:30.005Z
|
|
4
4
|
|
|
5
5
|
SET FOREIGN_KEY_CHECKS = 0;
|
|
6
6
|
|
|
@@ -2431,19 +2431,27 @@ CREATE TABLE `retailAlert` (
|
|
|
2431
2431
|
`alertTypeId` tinyint NOT NULL,
|
|
2432
2432
|
`clientId` int NOT NULL,
|
|
2433
2433
|
`value` varchar(5000) DEFAULT NULL,
|
|
2434
|
+
`message` varchar(1000) NOT NULL,
|
|
2434
2435
|
`createdAt` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
|
|
2435
2436
|
`storeId` binary(16) NOT NULL,
|
|
2436
2437
|
`zoneId` binary(16) DEFAULT NULL,
|
|
2437
2438
|
`isNotification` tinyint(1) DEFAULT NULL,
|
|
2438
2439
|
`retailClientAlertConfigurationId` int DEFAULT NULL,
|
|
2440
|
+
`severity` varchar(50) NOT NULL,
|
|
2439
2441
|
`deleted` tinyint(1) DEFAULT '0',
|
|
2440
2442
|
`status` varchar(50) DEFAULT 'new',
|
|
2443
|
+
`category` varchar(50) NOT NULL,
|
|
2441
2444
|
`acknowledgedAt` datetime DEFAULT NULL,
|
|
2442
2445
|
`resolvedAt` datetime DEFAULT NULL,
|
|
2443
2446
|
PRIMARY KEY (`id`),
|
|
2444
2447
|
KEY `ix_clientId_alertTypeId_createdAt` (`clientId`,`alertTypeId`,`createdAt`),
|
|
2448
|
+
KEY `ix_clientId_status_createdAt` (`clientId`,`status`,`createdAt`),
|
|
2449
|
+
KEY `ix_clientId_category_createdAt` (`clientId`,`category`,`createdAt`),
|
|
2450
|
+
KEY `ix_clientId_severity_createdAt` (`clientId`,`severity`,`createdAt`),
|
|
2445
2451
|
KEY `ix_clientId_zoneId_createdAt` (`clientId`,`zoneId`,`createdAt`),
|
|
2446
2452
|
KEY `ix_clientId_storeId_createdAt` (`clientId`,`storeId`,`createdAt`),
|
|
2453
|
+
KEY `ix_clientId_severity_status_createdAt` (`clientId`,`severity`,`status`,`createdAt`),
|
|
2454
|
+
KEY `ix_clientId_acknowledgedAt_createdAt` (`clientId`,`acknowledgedAt`,`createdAt`),
|
|
2447
2455
|
KEY `ix_clientId_createdAt` (`clientId`,`createdAt`)
|
|
2448
2456
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
2449
2457
|
|