@endora-commerce/mod-catalog 0.101.1 → 0.102.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/docs/catalog/attachments.md +1 -1
- package/docs/catalog/attribute-sets.md +2 -1
- package/docs/catalog/attributes.md +6 -4
- package/docs/catalog/packaging-units.md +6 -3
- package/docs/catalog/per-channel-per-language-overrides.md +1 -1
- package/docs/catalog/product-links.md +1 -1
- package/docs/catalog.md +5 -3
- package/package.json +9 -9
|
@@ -13,7 +13,7 @@ when an attachment is deleted.
|
|
|
13
13
|
## Attachment Types
|
|
14
14
|
|
|
15
15
|
The `attachment_types` dictionary categorizes attachments. Migration
|
|
16
|
-
|
|
16
|
+
`20260429T112543_catalog_product_attachments.ts` seeds four standard rows with deterministic UUIDs so seeds and
|
|
17
17
|
tests can reference them stably:
|
|
18
18
|
|
|
19
19
|
- `certificate` — Certificate / Certyfikat
|
|
@@ -52,7 +52,8 @@ theme renders the localized set name as a small subheading.
|
|
|
52
52
|
|
|
53
53
|
`attribute_sets` (id, code unique, name jsonb, is_system bool) +
|
|
54
54
|
`attribute_set_attributes` (composite PK on (set_id, attribute_id)).
|
|
55
|
-
The system Default row is seeded by migration
|
|
55
|
+
The system Default row is seeded by migration
|
|
56
|
+
`20260429T064146_catalog_attribute_sets_init.ts` with deterministic
|
|
56
57
|
UUID `defa0017-0000-4000-8000-000000000000` so seeds and tests can
|
|
57
58
|
reference it stably.
|
|
58
59
|
|
|
@@ -157,7 +157,7 @@ assigned Attribute Set.
|
|
|
157
157
|
|
|
158
158
|
## Storage
|
|
159
159
|
|
|
160
|
-
Since migration `
|
|
160
|
+
Since migration `20260723T230401_catalog_attributes_on_custom_fields.ts` an attribute is split between the
|
|
161
161
|
generic Custom Fields layer that the `custom_fields` module owns and
|
|
162
162
|
a catalog-owned extension row. The API shape above is unchanged — the
|
|
163
163
|
admin surface composes the two back into the legacy form.
|
|
@@ -177,8 +177,9 @@ admin surface composes the two back into the legacy form.
|
|
|
177
177
|
|
|
178
178
|
- Option rows keyed UNIQUE `(definition_id, value)` with per-locale
|
|
179
179
|
`label`, `label_default`, `is_default`, `sort_order`. The
|
|
180
|
-
catalog-owned `attribute_options` table (migration
|
|
181
|
-
|
|
180
|
+
catalog-owned `attribute_options` table (migration
|
|
181
|
+
`20260505T060113_catalog_attribute_options_and_flags.ts`) was dropped by
|
|
182
|
+
migration `20260723T230401_catalog_attributes_on_custom_fields.ts` after its rows moved here.
|
|
182
183
|
|
|
183
184
|
`product_attributes` (owned by `catalog`) — the 1:1 **extension**:
|
|
184
185
|
|
|
@@ -194,7 +195,8 @@ admin surface composes the two back into the legacy form.
|
|
|
194
195
|
(`pill` = legacy `enum`, `dropdown` = legacy `select`) and
|
|
195
196
|
`numeric_kind varchar(8) NULL` (`number` | `price`).
|
|
196
197
|
- The duplicated definition columns (`key`, `label`, `label_default`,
|
|
197
|
-
`value_type`, `is_required`) were dropped by migration
|
|
198
|
+
`value_type`, `is_required`) were dropped by migration
|
|
199
|
+
`20260723T230401_catalog_attributes_on_custom_fields.ts` — the
|
|
198
200
|
definition row is the single source of truth for them.
|
|
199
201
|
|
|
200
202
|
`products.attribute_values jsonb` carries the per-product map keyed by
|
|
@@ -60,8 +60,11 @@ count.
|
|
|
60
60
|
|
|
61
61
|
## Schema
|
|
62
62
|
|
|
63
|
-
Table `product_packaging_units` (migration
|
|
63
|
+
Table `product_packaging_units` (migration
|
|
64
|
+
`20260611T140412_catalog_product_packaging_units.ts`): `id`, `product_id`
|
|
64
65
|
(FK → `products`, cascade delete), `name`, `base_quantity`
|
|
65
66
|
(`CHECK >= 1`), `position`, `is_default`, timestamps; `UNIQUE (product_id,
|
|
66
|
-
name)`. Additive snapshot columns
|
|
67
|
-
`
|
|
67
|
+
name)`. Additive snapshot columns, each added by its owning module:
|
|
68
|
+
`cart_items` (`20260611T140413_carts_cart_item_packaging.ts`), `order_items`
|
|
69
|
+
(`20260611T140414_orders_order_item_packaging.ts`), `quote_request_items`
|
|
70
|
+
(`20260611T140415_quote_requests_qr_item_packaging.ts`).
|
|
@@ -205,7 +205,7 @@ explains that overrides only apply per-channel.
|
|
|
205
205
|
|
|
206
206
|
## Migration
|
|
207
207
|
|
|
208
|
-
One migration `
|
|
208
|
+
One migration `20260611T140346_catalog_product_value_overrides_init.ts` ships everything:
|
|
209
209
|
|
|
210
210
|
- adds `channel_scoped` + `language_scoped` boolean columns to
|
|
211
211
|
`product_attributes` (default `false`);
|
|
@@ -13,7 +13,7 @@ PDP and cart. Three kinds:
|
|
|
13
13
|
|
|
14
14
|
## DB-level guarantees
|
|
15
15
|
|
|
16
|
-
Migration
|
|
16
|
+
Migration `20260429T123726_catalog_product_links.ts` ships three constraints that make incorrect link data
|
|
17
17
|
impossible:
|
|
18
18
|
|
|
19
19
|
- `UNIQUE (source_product_id, target_product_id, kind)` — same pair can
|
package/docs/catalog.md
CHANGED
|
@@ -118,8 +118,10 @@ Select-style attribute types (`select`, `enum`, `multiselect`) carry an
|
|
|
118
118
|
ordered option list — each row keyed by `(definition, value)` with
|
|
119
119
|
per-locale label + fallback + sort order + default flag. The legacy
|
|
120
120
|
`enum_values: string[]` JSONB column on `product_attributes` was
|
|
121
|
-
decommissioned by migration
|
|
122
|
-
`
|
|
121
|
+
decommissioned by migration
|
|
122
|
+
`20260505T060113_catalog_attribute_options_and_flags.ts` (into the catalog-owned
|
|
123
|
+
`attribute_options` table), and migration
|
|
124
|
+
`20260723T230401_catalog_attributes_on_custom_fields.ts` moved the
|
|
123
125
|
rows into the generic `custom_field_options` table. Existing readers
|
|
124
126
|
project the option list back into the legacy form for backward
|
|
125
127
|
compatibility at the API boundary.
|
|
@@ -184,7 +186,7 @@ and ownership model is different:
|
|
|
184
186
|
`custom_fields`. The generic Custom Fields admin surface lists
|
|
185
187
|
product definitions read-only and refuses mutations with
|
|
186
188
|
`409 host_managed`.
|
|
187
|
-
- **Migration `
|
|
189
|
+
- **Migration `20260723T230401_catalog_attributes_on_custom_fields.ts`** performed the
|
|
188
190
|
one-time convergence in a single transaction: backfilled one
|
|
189
191
|
definition per legacy attribute (key, labels, mapped value type,
|
|
190
192
|
required, deterministic sort order), moved `attribute_options` rows
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@endora-commerce/mod-catalog",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.102.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "Products, variants, categories, attributes, attribute sets, gallery, attachments, links, and bundles.",
|
|
@@ -61,10 +61,10 @@
|
|
|
61
61
|
"react": "^19",
|
|
62
62
|
"react-router-dom": "^7",
|
|
63
63
|
"zod": "^4",
|
|
64
|
-
"@endora-commerce/admin-kit": "0.
|
|
65
|
-
"@endora-commerce/contracts": "0.
|
|
66
|
-
"@endora-commerce/mod-custom-fields": "0.
|
|
67
|
-
"@endora-commerce/platform": "0.
|
|
64
|
+
"@endora-commerce/admin-kit": "0.102.0",
|
|
65
|
+
"@endora-commerce/contracts": "0.102.0",
|
|
66
|
+
"@endora-commerce/mod-custom-fields": "0.102.0",
|
|
67
|
+
"@endora-commerce/platform": "0.102.0"
|
|
68
68
|
},
|
|
69
69
|
"peerDependenciesMeta": {
|
|
70
70
|
"@endora-commerce/admin-kit": {
|
|
@@ -95,10 +95,10 @@
|
|
|
95
95
|
"typescript": "^5.9.3",
|
|
96
96
|
"vitest": "^4.1.11",
|
|
97
97
|
"zod": "^4.2.0",
|
|
98
|
-
"@endora-commerce/admin-kit": "0.
|
|
99
|
-
"@endora-commerce/contracts": "0.
|
|
100
|
-
"@endora-commerce/mod-custom-fields": "0.
|
|
101
|
-
"@endora-commerce/platform": "0.
|
|
98
|
+
"@endora-commerce/admin-kit": "0.102.0",
|
|
99
|
+
"@endora-commerce/contracts": "0.102.0",
|
|
100
|
+
"@endora-commerce/mod-custom-fields": "0.102.0",
|
|
101
|
+
"@endora-commerce/platform": "0.102.0"
|
|
102
102
|
},
|
|
103
103
|
"scripts": {
|
|
104
104
|
"build": "tsc -p tsconfig.build.json && tsc -p tsconfig.ui.json",
|