@pacp/spec 2.0.1 → 3.1.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/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;
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;
@@ -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 v2.0.1",
4
+ "title": "PACP v3.1.0",
5
5
  "oneOf": [
6
6
  {
7
7
  "$ref": "#/$defs/catalog_document"
@@ -314,8 +314,16 @@
314
314
  "type": "string"
315
315
  },
316
316
  "category": {
317
- "type": "string",
318
- "minLength": 1
317
+ "type": "array",
318
+ "items": {
319
+ "type": "array",
320
+ "items": {
321
+ "type": "string",
322
+ "minLength": 1
323
+ },
324
+ "minItems": 1
325
+ },
326
+ "description": "Categorias hierárquicas do produto. Cada item é um path da raiz à folha, ex.: [[\"Móveis\", \"Sofá\"], [\"Promoções\"]]."
319
327
  },
320
328
  "gtin": {
321
329
  "type": "string",
@@ -578,6 +586,12 @@
578
586
  },
579
587
  "value": {
580
588
  "$ref": "#/$defs/scalar_value"
589
+ },
590
+ "images": {
591
+ "type": "array",
592
+ "items": {
593
+ "$ref": "#/$defs/image"
594
+ }
581
595
  }
582
596
  }
583
597
  },
@@ -1145,6 +1159,15 @@
1145
1159
  "label": {
1146
1160
  "type": "string"
1147
1161
  },
1162
+ "alt": {
1163
+ "type": "string",
1164
+ "description": "Texto alternativo descritivo da imagem (acessibilidade)."
1165
+ },
1166
+ "position": {
1167
+ "type": "integer",
1168
+ "minimum": 0,
1169
+ "description": "Ordem explícita de exibição; quando presente, consumidores DEVEM ordenar por position crescente."
1170
+ },
1148
1171
  "type": {
1149
1172
  "type": "string",
1150
1173
  "enum": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pacp/spec",
3
- "version": "2.0.1",
3
+ "version": "3.1.0",
4
4
  "description": "PACP - Padrão Aberto de Catálogo e Precificação. Schema, profiles e validador para catálogos de produtos.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",