@pacp/spec 3.0.0 → 3.3.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/README.md +2 -0
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/pacp.schema.json +33 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -89,6 +89,8 @@ const product: Product = {
|
|
|
89
89
|
sku: 'MES-001',
|
|
90
90
|
manufacturer: 'Moveis Artisan',
|
|
91
91
|
brand: 'Artisan Home',
|
|
92
|
+
category: [['Móveis', 'Mesas']],
|
|
93
|
+
collections: ['linha_artisan', 'lancamento_2026'],
|
|
92
94
|
base_price: 2500,
|
|
93
95
|
weight: { value: 45, unit: 'kg' },
|
|
94
96
|
dimensions: { width: 160, height: 78, depth: 90, unit: 'cm' },
|
package/dist/index.d.cts
CHANGED
|
@@ -5,6 +5,8 @@ type ImageType = "MAIN" | "DETAIL" | "AMBIANCE" | "TECHNICAL" | "OTHER";
|
|
|
5
5
|
interface Image {
|
|
6
6
|
url: string;
|
|
7
7
|
label?: string;
|
|
8
|
+
alt?: string;
|
|
9
|
+
position?: number;
|
|
8
10
|
type?: ImageType;
|
|
9
11
|
}
|
|
10
12
|
interface Measure {
|
|
@@ -31,6 +33,7 @@ interface Option {
|
|
|
31
33
|
attribute_id: string;
|
|
32
34
|
value: ScalarValue;
|
|
33
35
|
label?: string;
|
|
36
|
+
images?: Image[];
|
|
34
37
|
}
|
|
35
38
|
interface LotPolicy {
|
|
36
39
|
required: boolean;
|
|
@@ -48,16 +51,18 @@ interface SalesUnit {
|
|
|
48
51
|
interface Product {
|
|
49
52
|
id: string;
|
|
50
53
|
name?: string;
|
|
54
|
+
visibility?: "PUBLIC" | "INTERNAL";
|
|
51
55
|
sku?: string;
|
|
52
56
|
manufacturer?: string;
|
|
53
57
|
brand?: string;
|
|
54
58
|
description?: string;
|
|
55
|
-
category?: string;
|
|
59
|
+
category?: string[][];
|
|
56
60
|
gtin?: string;
|
|
57
61
|
base_price?: number;
|
|
58
62
|
unit?: string;
|
|
59
63
|
images?: Image[];
|
|
60
64
|
tags?: string[];
|
|
65
|
+
collections?: string[];
|
|
61
66
|
weight?: Measure;
|
|
62
67
|
dimensions?: PhysicalDimensions;
|
|
63
68
|
lot_policy?: LotPolicy;
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ type ImageType = "MAIN" | "DETAIL" | "AMBIANCE" | "TECHNICAL" | "OTHER";
|
|
|
5
5
|
interface Image {
|
|
6
6
|
url: string;
|
|
7
7
|
label?: string;
|
|
8
|
+
alt?: string;
|
|
9
|
+
position?: number;
|
|
8
10
|
type?: ImageType;
|
|
9
11
|
}
|
|
10
12
|
interface Measure {
|
|
@@ -31,6 +33,7 @@ interface Option {
|
|
|
31
33
|
attribute_id: string;
|
|
32
34
|
value: ScalarValue;
|
|
33
35
|
label?: string;
|
|
36
|
+
images?: Image[];
|
|
34
37
|
}
|
|
35
38
|
interface LotPolicy {
|
|
36
39
|
required: boolean;
|
|
@@ -48,16 +51,18 @@ interface SalesUnit {
|
|
|
48
51
|
interface Product {
|
|
49
52
|
id: string;
|
|
50
53
|
name?: string;
|
|
54
|
+
visibility?: "PUBLIC" | "INTERNAL";
|
|
51
55
|
sku?: string;
|
|
52
56
|
manufacturer?: string;
|
|
53
57
|
brand?: string;
|
|
54
58
|
description?: string;
|
|
55
|
-
category?: string;
|
|
59
|
+
category?: string[][];
|
|
56
60
|
gtin?: string;
|
|
57
61
|
base_price?: number;
|
|
58
62
|
unit?: string;
|
|
59
63
|
images?: Image[];
|
|
60
64
|
tags?: string[];
|
|
65
|
+
collections?: string[];
|
|
61
66
|
weight?: Measure;
|
|
62
67
|
dimensions?: PhysicalDimensions;
|
|
63
68
|
lot_policy?: LotPolicy;
|
package/dist/pacp.schema.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://cdn.jsdelivr.net/npm/@pacp/spec@latest/dist/pacp.schema.json",
|
|
4
|
-
"title": "PACP v3.
|
|
4
|
+
"title": "PACP v3.3.0",
|
|
5
5
|
"oneOf": [
|
|
6
6
|
{
|
|
7
7
|
"$ref": "#/$defs/catalog_document"
|
|
@@ -298,6 +298,14 @@
|
|
|
298
298
|
"name": {
|
|
299
299
|
"type": "string"
|
|
300
300
|
},
|
|
301
|
+
"visibility": {
|
|
302
|
+
"type": "string",
|
|
303
|
+
"enum": [
|
|
304
|
+
"PUBLIC",
|
|
305
|
+
"INTERNAL"
|
|
306
|
+
],
|
|
307
|
+
"default": "PUBLIC"
|
|
308
|
+
},
|
|
301
309
|
"sku": {
|
|
302
310
|
"type": "string",
|
|
303
311
|
"minLength": 1
|
|
@@ -349,6 +357,15 @@
|
|
|
349
357
|
"minLength": 1
|
|
350
358
|
}
|
|
351
359
|
},
|
|
360
|
+
"collections": {
|
|
361
|
+
"type": "array",
|
|
362
|
+
"uniqueItems": true,
|
|
363
|
+
"items": {
|
|
364
|
+
"type": "string",
|
|
365
|
+
"minLength": 1
|
|
366
|
+
},
|
|
367
|
+
"description": "Identificadores de coleções às quais o produto pertence (ex.: \"verao_2026\", \"linha_premium\"). Cada item é um ID estável, único por catálogo, com semântica de agrupamento curatorial/sazonal."
|
|
368
|
+
},
|
|
352
369
|
"weight": {
|
|
353
370
|
"$ref": "#/$defs/measure"
|
|
354
371
|
},
|
|
@@ -586,6 +603,12 @@
|
|
|
586
603
|
},
|
|
587
604
|
"value": {
|
|
588
605
|
"$ref": "#/$defs/scalar_value"
|
|
606
|
+
},
|
|
607
|
+
"images": {
|
|
608
|
+
"type": "array",
|
|
609
|
+
"items": {
|
|
610
|
+
"$ref": "#/$defs/image"
|
|
611
|
+
}
|
|
589
612
|
}
|
|
590
613
|
}
|
|
591
614
|
},
|
|
@@ -1153,6 +1176,15 @@
|
|
|
1153
1176
|
"label": {
|
|
1154
1177
|
"type": "string"
|
|
1155
1178
|
},
|
|
1179
|
+
"alt": {
|
|
1180
|
+
"type": "string",
|
|
1181
|
+
"description": "Texto alternativo descritivo da imagem (acessibilidade)."
|
|
1182
|
+
},
|
|
1183
|
+
"position": {
|
|
1184
|
+
"type": "integer",
|
|
1185
|
+
"minimum": 0,
|
|
1186
|
+
"description": "Ordem explícita de exibição; quando presente, consumidores DEVEM ordenar por position crescente."
|
|
1187
|
+
},
|
|
1156
1188
|
"type": {
|
|
1157
1189
|
"type": "string",
|
|
1158
1190
|
"enum": [
|
package/package.json
CHANGED