@spytecgps/nova-orm 1.4.260 → 1.4.262

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.
@@ -5,15 +5,21 @@
5
5
  * SUPERSEDES `acumaticaAmazonProduct`, generalizing it across marketplaces:
6
6
  * acumaticaAmazonProduct.asin -> identifier
7
7
  * acumaticaAmazonProduct.description -> name
8
- * (new) platform, isPrepaid, prepaidDurationMonths
8
+ * (new) platform, location, isPrepaid, prepaidDurationMonths
9
9
  * Both tables intentionally coexist during the migration; the old table and
10
10
  * its remaining consumers are retired in a later change.
11
+ *
12
+ * `platform` and `location` are normalized lowercase tokens. The same
13
+ * identifier can repeat across locations (e.g. an ASIN sold via Amazon FBA US
14
+ * and FBA CA), so uniqueness is scoped to (platform, identifier, location).
11
15
  */
12
- declare const platformArray: readonly ["Amazon", "Walmart", "eBay", "BestBuy"];
16
+ declare const platformArray: readonly ["amazon", "walmart", "ebay", "best_buy"];
13
17
  export type MarketplacePlatform = (typeof platformArray)[number];
14
18
  export declare class AcumaticaMarketplaceProduct {
15
19
  id: number;
16
20
  platform: MarketplacePlatform;
21
+ /** Normalized marketplace location/channel (e.g. fba_us, fba_ca, wfs, best_buy). */
22
+ location: string;
17
23
  sku: string;
18
24
  identifier: string;
19
25
  name: string | null;
@@ -1 +1 @@
1
- "use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm"),a=require("../utils/boolToNumberTransformer.js");exports.AcumaticaMarketplaceProduct=class AcumaticaMarketplaceProduct{id;platform;sku;identifier;name;reviewUrl;productUrl;isPrepaid;prepaidDurationMonths},e.__decorate([t.PrimaryGeneratedColumn({type:"bigint",name:"id"}),e.__metadata("design:type",Number)],exports.AcumaticaMarketplaceProduct.prototype,"id",void 0),e.__decorate([t.Column("enum",{name:"platform",enum:["Amazon","Walmart","eBay","BestBuy"]}),e.__metadata("design:type",String)],exports.AcumaticaMarketplaceProduct.prototype,"platform",void 0),e.__decorate([t.Column("varchar",{name:"sku",length:50}),e.__metadata("design:type",String)],exports.AcumaticaMarketplaceProduct.prototype,"sku",void 0),e.__decorate([t.Column("varchar",{name:"identifier",length:50}),e.__metadata("design:type",String)],exports.AcumaticaMarketplaceProduct.prototype,"identifier",void 0),e.__decorate([t.Column("varchar",{name:"name",nullable:!0,length:500}),e.__metadata("design:type",String)],exports.AcumaticaMarketplaceProduct.prototype,"name",void 0),e.__decorate([t.Column("varchar",{name:"reviewUrl",nullable:!0,length:1e3}),e.__metadata("design:type",String)],exports.AcumaticaMarketplaceProduct.prototype,"reviewUrl",void 0),e.__decorate([t.Column("varchar",{name:"productUrl",nullable:!0,length:1e3}),e.__metadata("design:type",String)],exports.AcumaticaMarketplaceProduct.prototype,"productUrl",void 0),e.__decorate([t.Column("tinyint",{name:"isPrepaid",width:1,default:()=>"'0'",transformer:new a.BoolToNumberTransformer}),e.__metadata("design:type",Boolean)],exports.AcumaticaMarketplaceProduct.prototype,"isPrepaid",void 0),e.__decorate([t.Column("int",{name:"prepaidDurationMonths",nullable:!0}),e.__metadata("design:type",Number)],exports.AcumaticaMarketplaceProduct.prototype,"prepaidDurationMonths",void 0),exports.AcumaticaMarketplaceProduct=e.__decorate([t.Index("uxAcumaticaMarketplaceProductPlatformIdentifier",["platform","identifier"],{unique:!0}),t.Entity("acumaticaMarketplaceProduct",{schema:"nova"})],exports.AcumaticaMarketplaceProduct);
1
+ "use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm"),a=require("../utils/boolToNumberTransformer.js");exports.AcumaticaMarketplaceProduct=class AcumaticaMarketplaceProduct{id;platform;location;sku;identifier;name;reviewUrl;productUrl;isPrepaid;prepaidDurationMonths},e.__decorate([t.PrimaryGeneratedColumn({type:"bigint",name:"id"}),e.__metadata("design:type",Number)],exports.AcumaticaMarketplaceProduct.prototype,"id",void 0),e.__decorate([t.Column("enum",{name:"platform",enum:["amazon","walmart","ebay","best_buy"]}),e.__metadata("design:type",String)],exports.AcumaticaMarketplaceProduct.prototype,"platform",void 0),e.__decorate([t.Column("varchar",{name:"location",length:50}),e.__metadata("design:type",String)],exports.AcumaticaMarketplaceProduct.prototype,"location",void 0),e.__decorate([t.Column("varchar",{name:"sku",length:50}),e.__metadata("design:type",String)],exports.AcumaticaMarketplaceProduct.prototype,"sku",void 0),e.__decorate([t.Column("varchar",{name:"identifier",length:50}),e.__metadata("design:type",String)],exports.AcumaticaMarketplaceProduct.prototype,"identifier",void 0),e.__decorate([t.Column("varchar",{name:"name",nullable:!0,length:500}),e.__metadata("design:type",String)],exports.AcumaticaMarketplaceProduct.prototype,"name",void 0),e.__decorate([t.Column("varchar",{name:"reviewUrl",nullable:!0,length:1e3}),e.__metadata("design:type",String)],exports.AcumaticaMarketplaceProduct.prototype,"reviewUrl",void 0),e.__decorate([t.Column("varchar",{name:"productUrl",nullable:!0,length:1e3}),e.__metadata("design:type",String)],exports.AcumaticaMarketplaceProduct.prototype,"productUrl",void 0),e.__decorate([t.Column("tinyint",{name:"isPrepaid",width:1,default:()=>"'0'",transformer:new a.BoolToNumberTransformer}),e.__metadata("design:type",Boolean)],exports.AcumaticaMarketplaceProduct.prototype,"isPrepaid",void 0),e.__decorate([t.Column("int",{name:"prepaidDurationMonths",nullable:!0}),e.__metadata("design:type",Number)],exports.AcumaticaMarketplaceProduct.prototype,"prepaidDurationMonths",void 0),exports.AcumaticaMarketplaceProduct=e.__decorate([t.Index("uxAcumaticaMarketplaceProductPlatformIdentifierLocation",["platform","identifier","location"],{unique:!0}),t.Entity("acumaticaMarketplaceProduct",{schema:"nova"})],exports.AcumaticaMarketplaceProduct);
@@ -9,6 +9,7 @@ export declare class CustomerAttribute {
9
9
  client: Relation<Client>;
10
10
  enterprise: boolean;
11
11
  maintenanceModule: boolean;
12
+ equipmentRental: boolean;
12
13
  billingMethod: BillingMethod | null;
13
14
  customerSegment: CustomerSegment | null;
14
15
  }
@@ -1 +1 @@
1
- "use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm"),r=require("../utils/boolToNumberTransformer.js"),o=require("./client.js");exports.CustomerAttribute=class CustomerAttribute{clientId;client;enterprise;maintenanceModule;billingMethod;customerSegment},e.__decorate([t.Column("int",{primary:!0,name:"clientId"}),e.__metadata("design:type",Number)],exports.CustomerAttribute.prototype,"clientId",void 0),e.__decorate([t.OneToOne((()=>o.Client),{createForeignKeyConstraints:!1,nullable:!1}),t.JoinColumn(),e.__metadata("design:type",Object)],exports.CustomerAttribute.prototype,"client",void 0),e.__decorate([t.Column("tinyint",{name:"enterprise",width:1,default:()=>"'0'",transformer:new r.BoolToNumberTransformer}),e.__metadata("design:type",Boolean)],exports.CustomerAttribute.prototype,"enterprise",void 0),e.__decorate([t.Column("tinyint",{name:"maintenanceModule",width:1,default:()=>"'0'",transformer:new r.BoolToNumberTransformer}),e.__metadata("design:type",Boolean)],exports.CustomerAttribute.prototype,"maintenanceModule",void 0),e.__decorate([t.Column("enum",{enum:["credit-card-hubspot","ach-hubspot","credit-card-braintree","ach-braintree","ach-wire","check","dib-sap"],name:"billingMethod",nullable:!0}),e.__metadata("design:type",String)],exports.CustomerAttribute.prototype,"billingMethod",void 0),e.__decorate([t.Column("enum",{enum:["whale","bass","guppy","guppy-self-serve"],name:"customerSegment",nullable:!0}),e.__metadata("design:type",String)],exports.CustomerAttribute.prototype,"customerSegment",void 0),exports.CustomerAttribute=e.__decorate([t.Entity("customerAttribute",{schema:"nova"})],exports.CustomerAttribute);
1
+ "use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm"),r=require("../utils/boolToNumberTransformer.js"),o=require("./client.js");exports.CustomerAttribute=class CustomerAttribute{clientId;client;enterprise;maintenanceModule;equipmentRental;billingMethod;customerSegment},e.__decorate([t.Column("int",{primary:!0,name:"clientId"}),e.__metadata("design:type",Number)],exports.CustomerAttribute.prototype,"clientId",void 0),e.__decorate([t.OneToOne((()=>o.Client),{createForeignKeyConstraints:!1,nullable:!1}),t.JoinColumn(),e.__metadata("design:type",Object)],exports.CustomerAttribute.prototype,"client",void 0),e.__decorate([t.Column("tinyint",{name:"enterprise",width:1,default:()=>"'0'",transformer:new r.BoolToNumberTransformer}),e.__metadata("design:type",Boolean)],exports.CustomerAttribute.prototype,"enterprise",void 0),e.__decorate([t.Column("tinyint",{name:"maintenanceModule",width:1,default:()=>"'0'",transformer:new r.BoolToNumberTransformer}),e.__metadata("design:type",Boolean)],exports.CustomerAttribute.prototype,"maintenanceModule",void 0),e.__decorate([t.Column("tinyint",{name:"equipmentRental",width:1,default:()=>"'0'",transformer:new r.BoolToNumberTransformer}),e.__metadata("design:type",Boolean)],exports.CustomerAttribute.prototype,"equipmentRental",void 0),e.__decorate([t.Column("enum",{enum:["credit-card-hubspot","ach-hubspot","credit-card-braintree","ach-braintree","ach-wire","check","dib-sap"],name:"billingMethod",nullable:!0}),e.__metadata("design:type",String)],exports.CustomerAttribute.prototype,"billingMethod",void 0),e.__decorate([t.Column("enum",{enum:["whale","bass","guppy","guppy-self-serve"],name:"customerSegment",nullable:!0}),e.__metadata("design:type",String)],exports.CustomerAttribute.prototype,"customerSegment",void 0),exports.CustomerAttribute=e.__decorate([t.Entity("customerAttribute",{schema:"nova"})],exports.CustomerAttribute);
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
3
  var _1684483704434AddLowerCaseIndex = require('../1684483704434-addLowerCaseIndex.js');
4
- var _1746434400000AddQuickSearchFulltextIndexes = require('../1746434400000-addQuickSearchFulltextIndexes.js');
5
- var _1684483705001UpdateSecurityUserViewsV1 = require('../1684483705001-updateSecurityUserViewsV1.js');
6
4
  var _1684483705002UpdateSecurityUserViewsV2 = require('../1684483705002-updateSecurityUserViewsV2.js');
5
+ var _1684483705001UpdateSecurityUserViewsV1 = require('../1684483705001-updateSecurityUserViewsV1.js');
6
+ var _1746434400000AddQuickSearchFulltextIndexes = require('../1746434400000-addQuickSearchFulltextIndexes.js');
7
7
 
8
8
 
9
9
 
10
10
  exports.addLowerCaseIndex1684483704434 = _1684483704434AddLowerCaseIndex.addLowerCaseIndex1684483704434;
11
- exports.addQuickSearchFulltextIndexes1746434400000 = _1746434400000AddQuickSearchFulltextIndexes.addQuickSearchFulltextIndexes1746434400000;
12
- exports.updateSecurityUserViewsV11684483705001 = _1684483705001UpdateSecurityUserViewsV1.updateSecurityUserViewsV11684483705001;
13
11
  exports.updateSecurityUserViewsV21684483705002 = _1684483705002UpdateSecurityUserViewsV2.updateSecurityUserViewsV21684483705002;
12
+ exports.updateSecurityUserViewsV11684483705001 = _1684483705001UpdateSecurityUserViewsV1.updateSecurityUserViewsV11684483705001;
13
+ exports.addQuickSearchFulltextIndexes1746434400000 = _1746434400000AddQuickSearchFulltextIndexes.addQuickSearchFulltextIndexes1746434400000;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spytecgps/nova-orm",
3
- "version": "1.4.260",
3
+ "version": "1.4.262",
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: d92a9addf4b445d0c1ac86347a4fe7d7
1
+ -- nova-orm-schema-checksum: b1e0a7f653794cddcf507455874fa181
2
2
  -- Nova ORM Schema Dump
3
- -- Generated at: 2026-06-17T11:51:33.168Z
3
+ -- Generated at: 2026-06-22T05:51:03.570Z
4
4
 
5
5
  SET FOREIGN_KEY_CHECKS = 0;
6
6
 
@@ -44,7 +44,8 @@ CREATE TABLE `acumaticaImeiIccidData` (
44
44
  DROP TABLE IF EXISTS `acumaticaMarketplaceProduct`;
45
45
  CREATE TABLE `acumaticaMarketplaceProduct` (
46
46
  `id` bigint NOT NULL AUTO_INCREMENT,
47
- `platform` enum('Amazon','Walmart','eBay','BestBuy') NOT NULL,
47
+ `platform` enum('amazon','walmart','ebay','best_buy') NOT NULL,
48
+ `location` varchar(50) NOT NULL,
48
49
  `sku` varchar(50) NOT NULL,
49
50
  `identifier` varchar(50) NOT NULL,
50
51
  `name` varchar(500) DEFAULT NULL,
@@ -53,7 +54,7 @@ CREATE TABLE `acumaticaMarketplaceProduct` (
53
54
  `isPrepaid` tinyint(1) NOT NULL DEFAULT '0',
54
55
  `prepaidDurationMonths` int DEFAULT NULL,
55
56
  PRIMARY KEY (`id`),
56
- UNIQUE KEY `uxAcumaticaMarketplaceProductPlatformIdentifier` (`platform`,`identifier`)
57
+ UNIQUE KEY `uxAcumaticaMarketplaceProductPlatformIdentifierLocation` (`platform`,`identifier`,`location`)
57
58
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
58
59
 
59
60
  DROP TABLE IF EXISTS `acumaticaOrderShipmentDetails`;
@@ -1377,6 +1378,7 @@ CREATE TABLE `customerAttribute` (
1377
1378
  `clientId` int NOT NULL,
1378
1379
  `enterprise` tinyint(1) NOT NULL DEFAULT '0',
1379
1380
  `maintenanceModule` tinyint(1) NOT NULL DEFAULT '0',
1381
+ `equipmentRental` tinyint(1) NOT NULL DEFAULT '0',
1380
1382
  `billingMethod` enum('credit-card-hubspot','ach-hubspot','credit-card-braintree','ach-braintree','ach-wire','check','dib-sap') DEFAULT NULL,
1381
1383
  `customerSegment` enum('whale','bass','guppy','guppy-self-serve') DEFAULT NULL,
1382
1384
  PRIMARY KEY (`clientId`)