@spytecgps/nova-orm 1.4.171 → 1.4.172
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"),o=require("../types/enums.js"),n=require("../utils/boolToNumberTransformer.js");const i=[o.ChurnNotificationPriority.low,o.ChurnNotificationPriority.moderate,o.ChurnNotificationPriority.high,o.ChurnNotificationPriority.critical],a=[o.ChurnNotificationPhase.payment_failed,o.ChurnNotificationPhase.past_due,o.ChurnNotificationPhase.account_locked,o.ChurnNotificationPhase.prepaid_add_card,o.ChurnNotificationPhase.prepaid_ending_soon,o.ChurnNotificationPhase.add_backup_card];exports.ChurnNotification=class ChurnNotification{id;subscriptionId;customerId;clientId;billingInterval;priority;phase;paymentAttempt;isPaymentFailedPushSent;isPastDuePushSent;isAccountLockedPushSent;isPrepaidAddCardPushSent;isPrepaidEndingSoonPushSent;isAddBackupCardPushSent;resolved;daysInChurn;createdAt;updatedAt},e.__decorate([t.PrimaryGeneratedColumn({type:"int",name:"id",unsigned:!0}),e.__metadata("design:type",Number)],exports.ChurnNotification.prototype,"id",void 0),e.__decorate([t.Column("varchar",{name:"subscriptionId",nullable:!0,length:256}),e.__metadata("design:type",String)],exports.ChurnNotification.prototype,"subscriptionId",void 0),e.__decorate([t.Column("varchar",{name:"customerId",nullable:!0,length:255}),e.__metadata("design:type",String)],exports.ChurnNotification.prototype,"customerId",void 0),e.__decorate([t.Column("int",{name:"clientId",nullable:!0}),e.__metadata("design:type",Number)],exports.ChurnNotification.prototype,"clientId",void 0),e.__decorate([t.Column("int",{name:"billingInterval",nullable:!0}),e.__metadata("design:type",Number)],exports.ChurnNotification.prototype,"billingInterval",void 0),e.__decorate([t.Column("enum",{name:"priority",enum:i,nullable:!0}),e.__metadata("design:type",String)],exports.ChurnNotification.prototype,"priority",void 0),e.__decorate([t.Column("enum",{name:"phase",enum:a,nullable:!0}),e.__metadata("design:type",String)],exports.ChurnNotification.prototype,"phase",void 0),e.__decorate([t.Column("int",{name:"paymentAttempt",nullable:!0,default:()=>"'0'"}),e.__metadata("design:type",Number)],exports.ChurnNotification.prototype,"paymentAttempt",void 0),e.__decorate([t.Column("tinyint",{name:"isPaymentFailedPushSent",nullable:!0,width:1,default:()=>"'0'",transformer:new n.BoolToNumberTransformer}),e.__metadata("design:type",Boolean)],exports.ChurnNotification.prototype,"isPaymentFailedPushSent",void 0),e.__decorate([t.Column("tinyint",{name:"isPastDuePushSent",nullable:!0,width:1,default:()=>"'0'",transformer:new n.BoolToNumberTransformer}),e.__metadata("design:type",Boolean)],exports.ChurnNotification.prototype,"isPastDuePushSent",void 0),e.__decorate([t.Column("tinyint",{name:"isAccountLockedPushSent",nullable:!0,width:1,default:()=>"'0'",transformer:new n.BoolToNumberTransformer}),e.__metadata("design:type",Boolean)],exports.ChurnNotification.prototype,"isAccountLockedPushSent",void 0),e.__decorate([t.Column("tinyint",{name:"isPrepaidAddCardPushSent",nullable:!0,width:1,default:()=>"'0'",transformer:new n.BoolToNumberTransformer}),e.__metadata("design:type",Boolean)],exports.ChurnNotification.prototype,"isPrepaidAddCardPushSent",void 0),e.__decorate([t.Column("tinyint",{name:"isPrepaidEndingSoonPushSent",nullable:!0,width:1,default:()=>"'0'",transformer:new n.BoolToNumberTransformer}),e.__metadata("design:type",Boolean)],exports.ChurnNotification.prototype,"isPrepaidEndingSoonPushSent",void 0),e.__decorate([t.Column("tinyint",{name:"isAddBackupCardPushSent",nullable:!0,width:1,default:()=>"'0'",transformer:new n.BoolToNumberTransformer}),e.__metadata("design:type",Boolean)],exports.ChurnNotification.prototype,"isAddBackupCardPushSent",void 0),e.__decorate([t.Column("tinyint",{name:"resolved",width:1,default:()=>"'0'",transformer:new n.BoolToNumberTransformer}),e.__metadata("design:type",Boolean)],exports.ChurnNotification.prototype,"resolved",void 0),e.__decorate([t.Column("int",{name:"daysInChurn",nullable:!0,default:()=>"'0'"}),e.__metadata("design:type",Number)],exports.ChurnNotification.prototype,"daysInChurn",void 0),e.__decorate([t.Column("datetime",{name:"createdAt",nullable:!0}),e.__metadata("design:type",Date)],exports.ChurnNotification.prototype,"createdAt",void 0),e.__decorate([t.Column("datetime",{name:"updatedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.ChurnNotification.prototype,"updatedAt",void 0),exports.ChurnNotification=e.__decorate([t.Index("ixChurnNotificationSubscriptionId",["subscriptionId"]),t.Index("ixChurnNotificationCustomerId",["customerId"]),t.Index("ixChurnNotificationResolved",["resolved"]),t.Index("ixChurnNotificationClientIdResolved",["clientId","resolved"]),t.Index("ixChurnNotificationPhaseResolved",["phase","resolved"]),t.Entity("churnNotification",{schema:"nova"})],exports.ChurnNotification);
|
|
1
|
+
"use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm"),o=require("../types/enums.js"),n=require("../utils/boolToNumberTransformer.js");const i=[o.ChurnNotificationPriority.low,o.ChurnNotificationPriority.moderate,o.ChurnNotificationPriority.high,o.ChurnNotificationPriority.critical],a=[o.ChurnNotificationPhase.payment_failed,o.ChurnNotificationPhase.past_due,o.ChurnNotificationPhase.account_locked,o.ChurnNotificationPhase.prepaid_add_card,o.ChurnNotificationPhase.prepaid_ending_soon,o.ChurnNotificationPhase.add_backup_card];exports.ChurnNotification=class ChurnNotification{id;subscriptionId;customerId;clientId;billingInterval;priority;phase;paymentAttempt;isPaymentFailedPushSent;isPastDuePushSent;isAccountLockedPushSent;isPrepaidAddCardPushSent;isPrepaidEndingSoonPushSent;isAddBackupCardPushSent;resolved;daysInChurn;createdAt;updatedAt},e.__decorate([t.PrimaryGeneratedColumn({type:"int",name:"id",unsigned:!0}),e.__metadata("design:type",Number)],exports.ChurnNotification.prototype,"id",void 0),e.__decorate([t.Column("varchar",{name:"subscriptionId",nullable:!0,length:256}),e.__metadata("design:type",String)],exports.ChurnNotification.prototype,"subscriptionId",void 0),e.__decorate([t.Column("varchar",{name:"customerId",nullable:!0,length:255}),e.__metadata("design:type",String)],exports.ChurnNotification.prototype,"customerId",void 0),e.__decorate([t.Column("int",{name:"clientId",nullable:!0}),e.__metadata("design:type",Number)],exports.ChurnNotification.prototype,"clientId",void 0),e.__decorate([t.Column("int",{name:"billingInterval",nullable:!0}),e.__metadata("design:type",Number)],exports.ChurnNotification.prototype,"billingInterval",void 0),e.__decorate([t.Column("enum",{name:"priority",enum:i,nullable:!0}),e.__metadata("design:type",String)],exports.ChurnNotification.prototype,"priority",void 0),e.__decorate([t.Column("enum",{name:"phase",enum:a,nullable:!0}),e.__metadata("design:type",String)],exports.ChurnNotification.prototype,"phase",void 0),e.__decorate([t.Column("int",{name:"paymentAttempt",nullable:!0,default:()=>"'0'"}),e.__metadata("design:type",Number)],exports.ChurnNotification.prototype,"paymentAttempt",void 0),e.__decorate([t.Column("tinyint",{name:"isPaymentFailedPushSent",nullable:!0,width:1,default:()=>"'0'",transformer:new n.BoolToNumberTransformer}),e.__metadata("design:type",Boolean)],exports.ChurnNotification.prototype,"isPaymentFailedPushSent",void 0),e.__decorate([t.Column("tinyint",{name:"isPastDuePushSent",nullable:!0,width:1,default:()=>"'0'",transformer:new n.BoolToNumberTransformer}),e.__metadata("design:type",Boolean)],exports.ChurnNotification.prototype,"isPastDuePushSent",void 0),e.__decorate([t.Column("tinyint",{name:"isAccountLockedPushSent",nullable:!0,width:1,default:()=>"'0'",transformer:new n.BoolToNumberTransformer}),e.__metadata("design:type",Boolean)],exports.ChurnNotification.prototype,"isAccountLockedPushSent",void 0),e.__decorate([t.Column("tinyint",{name:"isPrepaidAddCardPushSent",nullable:!0,width:1,default:()=>"'0'",transformer:new n.BoolToNumberTransformer}),e.__metadata("design:type",Boolean)],exports.ChurnNotification.prototype,"isPrepaidAddCardPushSent",void 0),e.__decorate([t.Column("tinyint",{name:"isPrepaidEndingSoonPushSent",nullable:!0,width:1,default:()=>"'0'",transformer:new n.BoolToNumberTransformer}),e.__metadata("design:type",Boolean)],exports.ChurnNotification.prototype,"isPrepaidEndingSoonPushSent",void 0),e.__decorate([t.Column("tinyint",{name:"isAddBackupCardPushSent",nullable:!0,width:1,default:()=>"'0'",transformer:new n.BoolToNumberTransformer}),e.__metadata("design:type",Boolean)],exports.ChurnNotification.prototype,"isAddBackupCardPushSent",void 0),e.__decorate([t.Column("tinyint",{name:"resolved",width:1,default:()=>"'0'",transformer:new n.BoolToNumberTransformer}),e.__metadata("design:type",Boolean)],exports.ChurnNotification.prototype,"resolved",void 0),e.__decorate([t.Column("int",{name:"daysInChurn",nullable:!0,default:()=>"'0'"}),e.__metadata("design:type",Number)],exports.ChurnNotification.prototype,"daysInChurn",void 0),e.__decorate([t.Column("datetime",{name:"createdAt",nullable:!0}),e.__metadata("design:type",Date)],exports.ChurnNotification.prototype,"createdAt",void 0),e.__decorate([t.Column("datetime",{name:"updatedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.ChurnNotification.prototype,"updatedAt",void 0),exports.ChurnNotification=e.__decorate([t.Index("ixChurnNotificationSubscriptionId",["subscriptionId"]),t.Index("ixChurnNotificationCustomerId",["customerId"]),t.Index("ixChurnNotificationResolved",["resolved"]),t.Index("ixChurnNotificationClientIdResolved",["clientId","resolved"]),t.Index("ixChurnNotificationPhaseResolved",["phase","resolved"]),t.Index("ixuChurnNotificationSubscriptionIdPhase",["subscriptionId","phase"],{unique:!0}),t.Entity("churnNotification",{schema:"nova"})],exports.ChurnNotification);
|
package/package.json
CHANGED
package/schema.sql
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
-- nova-orm-schema-checksum:
|
|
1
|
+
-- nova-orm-schema-checksum: d502a1e2627b10060087f8ca9549281d
|
|
2
2
|
-- Nova ORM Schema Dump
|
|
3
|
-
-- Generated at: 2026-02-
|
|
3
|
+
-- Generated at: 2026-02-11T16:46:41.612Z
|
|
4
4
|
|
|
5
5
|
SET FOREIGN_KEY_CHECKS = 0;
|
|
6
6
|
|
|
@@ -936,6 +936,7 @@ CREATE TABLE `churnNotification` (
|
|
|
936
936
|
`createdAt` datetime DEFAULT NULL,
|
|
937
937
|
`updatedAt` datetime DEFAULT NULL,
|
|
938
938
|
PRIMARY KEY (`id`),
|
|
939
|
+
UNIQUE KEY `ixuChurnNotificationSubscriptionIdPhase` (`subscriptionId`,`phase`),
|
|
939
940
|
KEY `ixChurnNotificationPhaseResolved` (`phase`,`resolved`),
|
|
940
941
|
KEY `ixChurnNotificationClientIdResolved` (`clientId`,`resolved`),
|
|
941
942
|
KEY `ixChurnNotificationResolved` (`resolved`),
|