@squiz/dxp-page-content-types 1.4.0 → 1.4.1

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.
@@ -0,0 +1,114 @@
1
+ /*!
2
+ * @license
3
+ * Copyright Squiz Australia Pty Ltd. All Rights Reserved.
4
+ */
5
+ /**
6
+ * The action that was performed.
7
+ */
8
+ export declare enum TVersionChangeSummaryAction {
9
+ ADD = "add",
10
+ EDIT = "edit",
11
+ DELETE = "delete",
12
+ MOVE = "move"
13
+ }
14
+ /**
15
+ * A message describing a change in the version history of a page.
16
+ */
17
+ export interface VersionChangeSummaryMessage {
18
+ /**
19
+ * The action that was performed.
20
+ * @type {TVersionChangeSummaryAction}
21
+ * @memberof VersionChangeSummaryMessage
22
+ */
23
+ action: TVersionChangeSummaryAction;
24
+ /**
25
+ * The value of the change.
26
+ * @type {string}
27
+ * @memberof VersionChangeSummaryMessage
28
+ */
29
+ value: string;
30
+ /**
31
+ * The metadata of the change.
32
+ * @type {{path?: string, componentId?: string, toPosition?: number, fromPosition?: number, position?: number, section?: string, nodeId?: string}}
33
+ * @memberof VersionChangeSummaryMessage
34
+ */
35
+ metadata: {
36
+ /**
37
+ * The path of the change.
38
+ * @type {string}
39
+ * @memberof VersionChangeSummaryMessage
40
+ */
41
+ path?: string;
42
+ /**
43
+ * The component id of the change.
44
+ * @type {string}
45
+ * @memberof VersionChangeSummaryMessage
46
+ */
47
+ componentId?: string;
48
+ /**
49
+ * The to position of the change.
50
+ * @type {number}
51
+ * @memberof VersionChangeSummaryMessage
52
+ * @format double
53
+ */
54
+ toPosition?: number;
55
+ /**
56
+ * The from position of the change.
57
+ * @type {number}
58
+ * @memberof VersionChangeSummaryMessage
59
+ * @format double
60
+ */
61
+ fromPosition?: number;
62
+ /**
63
+ * The position of the change.
64
+ * @type {number}
65
+ * @memberof VersionChangeSummaryMessage
66
+ * @format double
67
+ */
68
+ position?: number;
69
+ /**
70
+ * The section of the change.
71
+ * @type {string}
72
+ * @memberof VersionChangeSummaryMessage
73
+ */
74
+ section?: string;
75
+ /**
76
+ * The node id of the change.
77
+ * @type {string}
78
+ * @memberof VersionChangeSummaryMessage
79
+ */
80
+ nodeId?: string;
81
+ };
82
+ }
83
+ /**
84
+ * A summary of the changes in the version history of a page.
85
+ */
86
+ export interface VersionChangeSummary {
87
+ /**
88
+ * The messages describing the changes in the version history of a page.
89
+ * @type {VersionChangeSummaryMessage[]}
90
+ * @memberof VersionChangeSummary
91
+ */
92
+ messages: VersionChangeSummaryMessage[];
93
+ /**
94
+ * The versions that were compared to generate the summary.
95
+ * @type {{v2Id: string, v1Id: string}}
96
+ * @memberof VersionChangeSummary
97
+ */
98
+ comparedVersions: {
99
+ v2Id: string;
100
+ v1Id: string;
101
+ };
102
+ /**
103
+ * The format version of the summary.
104
+ * @type {string}
105
+ * @memberof VersionChangeSummary
106
+ */
107
+ formatVersion: string;
108
+ /**
109
+ * The users that were affected by the changes.
110
+ * @type {string[]}
111
+ * @memberof VersionChangeSummary
112
+ */
113
+ users: string[];
114
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /*!
3
+ * @license
4
+ * Copyright Squiz Australia Pty Ltd. All Rights Reserved.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.TVersionChangeSummaryAction = void 0;
8
+ /**
9
+ * The action that was performed.
10
+ */
11
+ var TVersionChangeSummaryAction;
12
+ (function (TVersionChangeSummaryAction) {
13
+ TVersionChangeSummaryAction["ADD"] = "add";
14
+ TVersionChangeSummaryAction["EDIT"] = "edit";
15
+ TVersionChangeSummaryAction["DELETE"] = "delete";
16
+ TVersionChangeSummaryAction["MOVE"] = "move";
17
+ })(TVersionChangeSummaryAction || (exports.TVersionChangeSummaryAction = TVersionChangeSummaryAction = {}));
18
+ //# sourceMappingURL=VersionChangeSummary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VersionChangeSummary.js","sourceRoot":"","sources":["../../src/VersionChangeSummary/VersionChangeSummary.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;GAEG;AACH,IAAY,2BAKX;AALD,WAAY,2BAA2B;IACrC,0CAAW,CAAA;IACX,4CAAa,CAAA;IACb,gDAAiB,CAAA;IACjB,4CAAa,CAAA;AACf,CAAC,EALW,2BAA2B,2CAA3B,2BAA2B,QAKtC"}
package/lib/index.d.ts CHANGED
@@ -4,3 +4,4 @@
4
4
  */
5
5
  export * from './Nodes/Nodes';
6
6
  export * from './PageContent/PageContent';
7
+ export * from './VersionChangeSummary/VersionChangeSummary';
package/lib/index.js CHANGED
@@ -20,4 +20,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
21
  __exportStar(require("./Nodes/Nodes"), exports);
22
22
  __exportStar(require("./PageContent/PageContent"), exports);
23
+ __exportStar(require("./VersionChangeSummary/VersionChangeSummary"), exports);
23
24
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;AAEH,gDAA8B;AAC9B,4DAA0C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;AAEH,gDAA8B;AAC9B,4DAA0C;AAC1C,8EAA4D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squiz/dxp-page-content-types",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "repository": {