hvp-shared 7.7.0 → 7.9.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.
@@ -18,13 +18,27 @@
18
18
  */
19
19
  export declare const AUDIENCE_ALL = "all";
20
20
  /**
21
- * High-level reason a document exists. The first axis of the 3-tier
22
- * classification (purpose → type → tags).
21
+ * High-level reason a document exists. First axis of the classification
22
+ * (purpose → type → tags). One purpose per audience:
23
+ *
24
+ * - `operational` — staff, day-to-day workflow
25
+ * - `reference` — staff, consultation / support material
26
+ * - `external` — public / clients (marketing, communication)
27
+ * - `archive` — historical records preserved deliberately
28
+ *
29
+ * Note: `resource` was the previous name of the catch-all bucket. It is
30
+ * deprecated in favor of two narrower purposes (`reference` + `external`)
31
+ * because mixing internal-staff and external-public content under one
32
+ * purpose led to incoherent search filtering. Kept in the enum for legacy
33
+ * data compatibility (migration script will not produce it for new docs).
23
34
  */
24
35
  export declare enum Purpose {
25
36
  operational = "operational",
26
- resource = "resource",
27
- archive = "archive"
37
+ reference = "reference",
38
+ external = "external",
39
+ archive = "archive",
40
+ /** @deprecated Use `reference` (internal staff) or `external` (clients/public) instead. */
41
+ resource = "resource"
28
42
  }
29
43
  export declare const PURPOSE_LABELS: Record<Purpose, string>;
30
44
  /**
@@ -46,7 +60,8 @@ export declare enum DocumentType {
46
60
  legal_document = "legal_document",
47
61
  brand_asset = "brand_asset",
48
62
  meeting_recording = "meeting_recording",
49
- historical = "historical"
63
+ historical = "historical",
64
+ marketing = "marketing"
50
65
  }
51
66
  export declare const DOCUMENT_TYPE_LABELS: Record<DocumentType, string>;
52
67
  /**
@@ -23,19 +23,35 @@ exports.EXTERNAL_LINK_PROVIDER_LABELS = exports.ExternalLinkProvider = exports.C
23
23
  exports.AUDIENCE_ALL = "all";
24
24
  // ─── Purpose ────────────────────────────────────────────────────────────────
25
25
  /**
26
- * High-level reason a document exists. The first axis of the 3-tier
27
- * classification (purpose → type → tags).
26
+ * High-level reason a document exists. First axis of the classification
27
+ * (purpose → type → tags). One purpose per audience:
28
+ *
29
+ * - `operational` — staff, day-to-day workflow
30
+ * - `reference` — staff, consultation / support material
31
+ * - `external` — public / clients (marketing, communication)
32
+ * - `archive` — historical records preserved deliberately
33
+ *
34
+ * Note: `resource` was the previous name of the catch-all bucket. It is
35
+ * deprecated in favor of two narrower purposes (`reference` + `external`)
36
+ * because mixing internal-staff and external-public content under one
37
+ * purpose led to incoherent search filtering. Kept in the enum for legacy
38
+ * data compatibility (migration script will not produce it for new docs).
28
39
  */
29
40
  var Purpose;
30
41
  (function (Purpose) {
31
42
  Purpose["operational"] = "operational";
32
- Purpose["resource"] = "resource";
43
+ Purpose["reference"] = "reference";
44
+ Purpose["external"] = "external";
33
45
  Purpose["archive"] = "archive";
46
+ /** @deprecated Use `reference` (internal staff) or `external` (clients/public) instead. */
47
+ Purpose["resource"] = "resource";
34
48
  })(Purpose || (exports.Purpose = Purpose = {}));
35
49
  exports.PURPOSE_LABELS = {
36
50
  [Purpose.operational]: "Operativo",
37
- [Purpose.resource]: "Recurso",
51
+ [Purpose.reference]: "Consulta",
52
+ [Purpose.external]: "Externo / comunicación pública",
38
53
  [Purpose.archive]: "Archivo",
54
+ [Purpose.resource]: "Recurso (deprecated)",
39
55
  };
40
56
  // ─── DocumentType ───────────────────────────────────────────────────────────
41
57
  /**
@@ -62,6 +78,8 @@ var DocumentType;
62
78
  // Archive
63
79
  DocumentType["meeting_recording"] = "meeting_recording";
64
80
  DocumentType["historical"] = "historical";
81
+ // Resource — communication / external content (added in 7.8.0)
82
+ DocumentType["marketing"] = "marketing";
65
83
  })(DocumentType || (exports.DocumentType = DocumentType = {}));
66
84
  exports.DOCUMENT_TYPE_LABELS = {
67
85
  [DocumentType.protocol]: "Protocolo",
@@ -76,6 +94,7 @@ exports.DOCUMENT_TYPE_LABELS = {
76
94
  [DocumentType.brand_asset]: "Activo de marca",
77
95
  [DocumentType.meeting_recording]: "Grabación de reunión",
78
96
  [DocumentType.historical]: "Histórico",
97
+ [DocumentType.marketing]: "Marketing y comunicación externa",
79
98
  };
80
99
  // ─── DocumentStatus ─────────────────────────────────────────────────────────
81
100
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hvp-shared",
3
- "version": "7.7.0",
3
+ "version": "7.9.0",
4
4
  "description": "Shared types and utilities for HVP backend and frontend",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",