@spytecgps/nova-orm 1.4.260 → 1.4.261

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);
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.261",
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: 7e1555056130d3320cb30f56f065be5d
2
2
  -- Nova ORM Schema Dump
3
- -- Generated at: 2026-06-17T11:51:33.168Z
3
+ -- Generated at: 2026-06-22T00:40:41.111Z
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`;