@porulle/plugin-channel-connector 0.36.0 → 0.37.0

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.
package/dist/schema.js CHANGED
@@ -48,7 +48,7 @@ export const channelCatalogConflicts = pgTable("channel_catalog_conflicts", {
48
48
  id: uuid("id").defaultRandom().primaryKey(),
49
49
  organizationId: text("organization_id").notNull(),
50
50
  storeId: uuid("store_id").references(() => connectedStores.id, { onDelete: "cascade" }).notNull(),
51
- entityId: uuid("entity_id").notNull(),
51
+ entityId: uuid("entity_id").references(() => sellableEntities.id, { onDelete: "cascade" }).notNull(),
52
52
  fieldPath: text("field_path").notNull(),
53
53
  platformValue: jsonb("platform_value").$type().notNull(),
54
54
  storeValue: jsonb("store_value").$type().notNull(),
@@ -102,7 +102,7 @@ export const channelCatalogPushes = pgTable("channel_catalog_pushes", {
102
102
  id: uuid("id").defaultRandom().primaryKey(),
103
103
  organizationId: text("organization_id").notNull(),
104
104
  storeId: uuid("store_id").references(() => connectedStores.id, { onDelete: "cascade" }).notNull(),
105
- entityId: uuid("entity_id").notNull(),
105
+ entityId: uuid("entity_id").references(() => sellableEntities.id, { onDelete: "cascade" }).notNull(),
106
106
  payloadSnapshot: jsonb("payload_snapshot").$type(),
107
107
  state: text("state", { enum: ["pending", "exported", "confirmed", "failed", "abandoned"] })
108
108
  .notNull()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@porulle/plugin-channel-connector",
3
- "version": "0.36.0",
3
+ "version": "0.37.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -19,7 +19,7 @@
19
19
  "dependencies": {
20
20
  "@hono/zod-openapi": "^1.2.2",
21
21
  "hono": "^4.12.5",
22
- "@porulle/core": "0.36.0"
22
+ "@porulle/core": "0.37.0"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/node": "^24.5.2",
package/src/schema.ts CHANGED
@@ -78,7 +78,7 @@ export const channelCatalogConflicts = pgTable(
78
78
  id: uuid("id").defaultRandom().primaryKey(),
79
79
  organizationId: text("organization_id").notNull(),
80
80
  storeId: uuid("store_id").references(() => connectedStores.id, { onDelete: "cascade" }).notNull(),
81
- entityId: uuid("entity_id").notNull(),
81
+ entityId: uuid("entity_id").references(() => sellableEntities.id, { onDelete: "cascade" }).notNull(),
82
82
  fieldPath: text("field_path").notNull(),
83
83
  platformValue: jsonb("platform_value").$type<unknown>().notNull(),
84
84
  storeValue: jsonb("store_value").$type<unknown>().notNull(),
@@ -151,7 +151,7 @@ export const channelCatalogPushes = pgTable(
151
151
  id: uuid("id").defaultRandom().primaryKey(),
152
152
  organizationId: text("organization_id").notNull(),
153
153
  storeId: uuid("store_id").references(() => connectedStores.id, { onDelete: "cascade" }).notNull(),
154
- entityId: uuid("entity_id").notNull(),
154
+ entityId: uuid("entity_id").references(() => sellableEntities.id, { onDelete: "cascade" }).notNull(),
155
155
  payloadSnapshot: jsonb("payload_snapshot").$type<ChannelPushCatalogItem | null>(),
156
156
  state: text("state", { enum: ["pending", "exported", "confirmed", "failed", "abandoned"] })
157
157
  .notNull()