@cyberismo/assets 0.0.21 → 0.0.23

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/schemas.d.ts CHANGED
@@ -45,6 +45,11 @@ export declare const schemas: ({
45
45
  format: string;
46
46
  description: string;
47
47
  };
48
+ createdAt: {
49
+ type: string;
50
+ format: string;
51
+ description: string;
52
+ };
48
53
  labels: {
49
54
  type: string;
50
55
  description: string;
@@ -78,6 +83,40 @@ export declare const schemas: ({
78
83
  additionalProperties: boolean;
79
84
  };
80
85
  };
86
+ externalLinks: {
87
+ type: string;
88
+ description: string;
89
+ items: {
90
+ type: string;
91
+ properties: {
92
+ connector: {
93
+ type: string;
94
+ minLength: number;
95
+ description: string;
96
+ };
97
+ externalItemKey: {
98
+ type: string;
99
+ minLength: number;
100
+ description: string;
101
+ };
102
+ linkType: {
103
+ description: string;
104
+ type: string;
105
+ };
106
+ linkDescription: {
107
+ type: string;
108
+ description: string;
109
+ };
110
+ direction: {
111
+ type: string;
112
+ enum: string[];
113
+ description: string;
114
+ };
115
+ };
116
+ required: string[];
117
+ additionalProperties: boolean;
118
+ };
119
+ };
81
120
  templateCardKey: {
82
121
  type: string;
83
122
  description: string;
@@ -49,6 +49,15 @@ header:
49
49
  left:
50
50
  content: image:img/cyberismo-logo.png[pdfwidth=12%]
51
51
 
52
+ ulist:
53
+ marker:
54
+ checked:
55
+ content: "\uf14a"
56
+ font-family: far
57
+ unchecked:
58
+ content: "\uf0c8"
59
+ font-family: far
60
+
52
61
  footer:
53
62
  columns: =100%
54
63
  recto: &shared_footer
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyberismo/assets",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "description": "This package contains static resources",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -19,9 +19,15 @@ templateCard(C) :- card(C), field(C, "container", "template").
19
19
  dataType(Card, "lastUpdated", "dateTime") :-
20
20
  field(Card, "lastUpdated", _).
21
21
 
22
+ dataType(Card, "createdAt", "dateTime") :-
23
+ field(Card, "createdAt", _).
24
+
22
25
  dataType(Connector, "lastSynchronised", "dateTime") :-
23
26
  field(Connector, "lastSynchronised", _).
24
27
 
28
+ dataType(Card, "progress", "integer") :-
29
+ field(Card, "progress", _).
30
+
25
31
  % add workflow state category as a calculated field for Cards
26
32
  field(Card, "workflowStateCategory", Category) :-
27
33
  card(Card),
@@ -101,22 +101,73 @@ resultField((Source, Destination, LinkType, LinkDescription, Direction), "linkSo
101
101
  childResult(_, (Source, Destination, LinkType, LinkDescription, Direction), "links"),
102
102
  calculatedLink(Source, Destination, LinkType, LinkDescription).
103
103
 
104
- % links: title
104
+ % links: title - for card destinations
105
105
  resultField((Card, Destination, LinkType, LinkDescription, Direction), "title", Title, "shortText") :-
106
106
  childResult(Card, (Card, Destination, LinkType, LinkDescription, Direction), "links"),
107
- field(Destination, "title", Title).
107
+ field(Destination, "title", Title),
108
+ card(Destination).
108
109
 
110
+ % links: title - for external item destinations (from externalItem facts)
111
+ resultField((Card, (Connector, ItemKey), LinkType, LinkDescription, Direction), "title", Title, "shortText") :-
112
+ childResult(Card, (Card, (Connector, ItemKey), LinkType, LinkDescription, Direction), "links"),
113
+ field((Connector, ItemKey), "title", Title).
114
+
115
+ % links: title - for external item destinations (fallback to key if no title fact)
116
+ resultField((Card, (Connector, ItemKey), LinkType, LinkDescription, Direction), "title", ItemKey, "shortText") :-
117
+ childResult(Card, (Card, (Connector, ItemKey), LinkType, LinkDescription, Direction), "links"),
118
+ not field((Connector, ItemKey), "title", _).
119
+
120
+ % links: title - for card sources (inbound)
109
121
  resultField((Source, Card, LinkType, LinkDescription, Direction), "title", Title, "shortText") :-
110
122
  childResult(Card, (Source, Card, LinkType, LinkDescription, Direction), "links"),
111
- field(Source, "title", Title).
123
+ field(Source, "title", Title),
124
+ card(Source).
125
+
126
+ % links: title - for external item sources (inbound, from externalItem facts)
127
+ resultField(((Connector, ItemKey), Card, LinkType, LinkDescription, Direction), "title", Title, "shortText") :-
128
+ childResult(Card, ((Connector, ItemKey), Card, LinkType, LinkDescription, Direction), "links"),
129
+ field((Connector, ItemKey), "title", Title).
112
130
 
113
- % links: key
131
+ % links: title - for external item sources (inbound, fallback to key if no title fact)
132
+ resultField(((Connector, ItemKey), Card, LinkType, LinkDescription, Direction), "title", ItemKey, "shortText") :-
133
+ childResult(Card, ((Connector, ItemKey), Card, LinkType, LinkDescription, Direction), "links"),
134
+ not field((Connector, ItemKey), "title", _).
135
+
136
+ % links: key - for card destinations
114
137
  resultField((Card, Destination, LinkType, LinkDescription, Direction), "key", Destination, "shortText") :-
115
- childResult(Card, (Card, Destination, LinkType, LinkDescription, Direction), "links").
138
+ childResult(Card, (Card, Destination, LinkType, LinkDescription, Direction), "links"),
139
+ card(Destination).
140
+
141
+ % links: key - for external item destinations
142
+ resultField((Card, (Connector, ItemKey), LinkType, LinkDescription, Direction), "key", ItemKey, "shortText") :-
143
+ childResult(Card, (Card, (Connector, ItemKey), LinkType, LinkDescription, Direction), "links").
116
144
 
145
+ % links: key - for card sources (inbound)
117
146
  resultField((Source, Card, LinkType, LinkDescription, Direction), "key", Source, "shortText") :-
118
147
  childResult(Card, (Source, Card, LinkType, LinkDescription, Direction), "links"),
119
- field(Source, "title", Title).
148
+ card(Source).
149
+
150
+ % links: key - for external item sources (inbound)
151
+ resultField(((Connector, ItemKey), Card, LinkType, LinkDescription, Direction), "key", ItemKey, "shortText") :-
152
+ childResult(Card, ((Connector, ItemKey), Card, LinkType, LinkDescription, Direction), "links").
153
+
154
+ % links: connector - for external item destinations
155
+ resultField((Card, (Connector, ItemKey), LinkType, LinkDescription, Direction), "connector", Connector, "shortText") :-
156
+ childResult(Card, (Card, (Connector, ItemKey), LinkType, LinkDescription, Direction), "links").
157
+
158
+ % links: connector - for external item sources (inbound)
159
+ resultField(((Connector, ItemKey), Card, LinkType, LinkDescription, Direction), "connector", Connector, "shortText") :-
160
+ childResult(Card, ((Connector, ItemKey), Card, LinkType, LinkDescription, Direction), "links").
161
+
162
+ % links: url - for external item destinations (only if url fact exists)
163
+ resultField((Card, (Connector, ItemKey), LinkType, LinkDescription, Direction), "url", Url, "shortText") :-
164
+ childResult(Card, (Card, (Connector, ItemKey), LinkType, LinkDescription, Direction), "links"),
165
+ field((Connector, ItemKey), "url", Url).
166
+
167
+ % links: url - for external item sources (inbound, only if url fact exists)
168
+ resultField(((Connector, ItemKey), Card, LinkType, LinkDescription, Direction), "url", Url, "shortText") :-
169
+ childResult(Card, ((Connector, ItemKey), Card, LinkType, LinkDescription, Direction), "links"),
170
+ field((Connector, ItemKey), "url", Url).
120
171
 
121
172
 
122
173
  % notifications
@@ -96,6 +96,7 @@ select(1, "results", "cardTypeDisplayName").
96
96
  select(1, "results", "title").
97
97
  select(1, "results", "key").
98
98
  select(1, "results", "lastUpdated").
99
+ select(1, "results", "createdAt").
99
100
  select(1, "results", "workflowState").
100
101
  select(1, "results", "policyChecks").
101
102
  select(1, "results", "links").
@@ -0,0 +1,11 @@
1
+ % Connectors
2
+ result(Name) :- connector(Name).
3
+ resultField(Name, "type", "connector", "shortText") :- connector(Name).
4
+ resultField(Name, "displayName", Value, "shortText") :- connector(Name), field(Name, "displayName", Value).
5
+
6
+ % External items
7
+ result((Connector, Key)) :- externalItem((Connector, Key)).
8
+ resultField((Connector, Key), "type", "item", "shortText") :- externalItem((Connector, Key)).
9
+ resultField((Connector, Key), "connector", Connector, "shortText") :- externalItem((Connector, Key)).
10
+ resultField((Connector, Key), "itemKey", Key, "shortText") :- externalItem((Connector, Key)).
11
+ resultField((Connector, Key), "title", Value, "shortText") :- externalItem((Connector, Key)), field((Connector, Key), "title", Value).
@@ -23,6 +23,9 @@ toc::[]
23
23
  | Card key | {{this.key}}
24
24
  | Card type | {{#if this.cardTypeDisplayName}}{{this.cardTypeDisplayName}}{{else}}{{this.cardType}}{{/if}}
25
25
  | Last modified | {{this.lastUpdated}}
26
+ {{#if this.createdAt}}
27
+ | Created at | {{this.createdAt}}
28
+ {{/if}}
26
29
  {{#if this.labels}}
27
30
  | Labels | {{#each this.labels}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}
28
31
  {{/if}}
@@ -38,7 +41,7 @@ toc::[]
38
41
  [cols="1,4",frame=none,grid=none]
39
42
  |===
40
43
  {{#each this.links}}
41
- | {{displayName}} | xref:{{this.key}}[{{this.title}}]{{#if this.linkDescription}} - {{this.linkDescription}}{{/if}}
44
+ | {{displayName}} | {{#if this.url}}{{this.url}}[{{this.title}}]{{else}}xref:{{this.key}}[{{this.title}}]{{/if}}{{#if this.linkDescription}} - {{this.linkDescription}}{{/if}}
42
45
  {{/each}}
43
46
  |===
44
47
  {empty} +
@@ -131,6 +131,7 @@ select(1, "cardType").
131
131
  select(1, "cardTypeDisplayName").
132
132
  select(1, "key").
133
133
  select(1, "lastUpdated").
134
+ select(1, "createdAt").
134
135
  select(1, "links").
135
136
  select(1, "notifications").
136
137
  select(1, "policyChecks").
package/src/index.ts CHANGED
@@ -8,6 +8,7 @@ import commonUtils from './calculations/common/utils.lp';
8
8
  import queriesCard from './calculations/queries/card.lp';
9
9
  import queriesOnCreation from './calculations/queries/onCreation.lp';
10
10
  import queriesOnTransition from './calculations/queries/onTransition.lp';
11
+ import queriesConnectors from './calculations/queries/connectors.lp';
11
12
  import queriesTree from './calculations/queries/tree.lp';
12
13
  import testModel from './calculations/test/model.lp';
13
14
 
@@ -34,6 +35,7 @@ export const lpFiles = {
34
35
  },
35
36
  queries: {
36
37
  card: queriesCard,
38
+ connectors: queriesConnectors,
37
39
  onCreation: queriesOnCreation,
38
40
  onTransition: queriesOnTransition,
39
41
  tree: queriesTree,
@@ -32,6 +32,11 @@
32
32
  "format": "date-time",
33
33
  "description": "The date and time of the last update of the card"
34
34
  },
35
+ "createdAt": {
36
+ "type": "string",
37
+ "format": "date-time",
38
+ "description": "The date and time when the card was created"
39
+ },
35
40
  "labels": {
36
41
  "type": "array",
37
42
  "description": "Labels or tags that can be used for organising cards",
@@ -65,6 +70,40 @@
65
70
  "additionalProperties": false
66
71
  }
67
72
  },
73
+ "externalLinks": {
74
+ "type": "array",
75
+ "description": "links from this card to external items in connected systems",
76
+ "items": {
77
+ "type": "object",
78
+ "properties": {
79
+ "connector": {
80
+ "type": "string",
81
+ "minLength": 1,
82
+ "description": "The name of the connector (e.g., 'jira')"
83
+ },
84
+ "externalItemKey": {
85
+ "type": "string",
86
+ "minLength": 1,
87
+ "description": "The key of the external item (e.g., 'PROJECT-1032')"
88
+ },
89
+ "linkType": {
90
+ "description": "The name of the link type. For example, 'base/linkTypes/causes'",
91
+ "type": "string"
92
+ },
93
+ "linkDescription": {
94
+ "type": "string",
95
+ "description": "A description of the link"
96
+ },
97
+ "direction": {
98
+ "type": "string",
99
+ "enum": ["outbound", "inbound"],
100
+ "description": "Direction of the link: outbound = card links to external, inbound = external links to card"
101
+ }
102
+ },
103
+ "required": ["connector", "externalItemKey", "linkType", "direction"],
104
+ "additionalProperties": false
105
+ }
106
+ },
68
107
  "templateCardKey": {
69
108
  "type": "string",
70
109
  "description": "Card key from which this card has been instantiated"
@@ -40,6 +40,11 @@
40
40
  }
41
41
  }
42
42
  },
43
+ "version": {
44
+ "type": "string",
45
+ "description": "Project version (semver)",
46
+ "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$"
47
+ },
43
48
  "modules": {
44
49
  "description": "List of modules that have been included in the project",
45
50
  "type": "array",
@@ -20,6 +20,10 @@
20
20
  "calculation": {
21
21
  "description": "The logic programming content for this calculation",
22
22
  "type": "string"
23
+ },
24
+ "category": {
25
+ "description": "The category of the calculation. For example, 'ReportData'.",
26
+ "type": "string"
23
27
  }
24
28
  },
25
29
  "required": ["name"],
@@ -3,6 +3,10 @@
3
3
  "additionalProperties": false,
4
4
  "description": "Card type defines the workflow and optional additional fields for the cards.",
5
5
  "properties": {
6
+ "category": {
7
+ "description": "The category of the card type. For example, 'Documentation'.",
8
+ "type": "string"
9
+ },
6
10
  "name": {
7
11
  "description": "The name of the card type",
8
12
  "type": "string",
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "$id": "fieldTypeSchema",
3
3
  "additionalProperties": false,
4
- "description": "Field type defines the workflow and optional additional fields for the cards.",
4
+ "description": "Field type defines one field for a card type",
5
5
  "properties": {
6
+ "category": {
7
+ "description": "The category of the field type. For example, 'UserData'.",
8
+ "type": "string"
9
+ },
6
10
  "name": {
7
11
  "type": "string",
8
12
  "description": "The technical name by which the field is referred to in JSON files.",
@@ -3,6 +3,10 @@
3
3
  "additionalProperties": false,
4
4
  "description": "Link types defined different ways to link cards together.",
5
5
  "properties": {
6
+ "category": {
7
+ "description": "The category of the link type. For example, 'Connection'.",
8
+ "type": "string"
9
+ },
6
10
  "description": {
7
11
  "description": "A description that describes the link type",
8
12
  "type": "string"
@@ -39,6 +43,13 @@
39
43
  "type": "string"
40
44
  }
41
45
  },
46
+ "destinationConnectors": {
47
+ "type": "array",
48
+ "description": "The connectors that can be the target of this link type for external links.",
49
+ "items": {
50
+ "type": "string"
51
+ }
52
+ },
42
53
  "enableLinkDescription": {
43
54
  "type": "boolean",
44
55
  "description": "If true, the user can add a description to the link."
@@ -18,11 +18,11 @@
18
18
  "type": "string"
19
19
  },
20
20
  "category": {
21
- "description": "The category of the report. For example, 'Architecture'.",
21
+ "description": "The category of the report. For example, 'KeyPerformanceIndicator'.",
22
22
  "type": "string"
23
23
  }
24
24
  },
25
- "required": ["name", "displayName", "category"],
25
+ "required": ["name", "displayName"],
26
26
  "title": "Report",
27
27
  "type": "object"
28
28
  }
@@ -3,6 +3,10 @@
3
3
  "additionalProperties": false,
4
4
  "description": "A state machine for the workflow of cards",
5
5
  "properties": {
6
+ "category": {
7
+ "description": "The category of the workflow. For example, 'Review'.",
8
+ "type": "string"
9
+ },
6
10
  "description": {
7
11
  "description": "A description that describes the workflow",
8
12
  "type": "string"
@@ -1,3 +1,3 @@
1
1
  {
2
- "schemaVersion": 2
2
+ "schemaVersion": 3
3
3
  }
@@ -49,6 +49,15 @@ header:
49
49
  left:
50
50
  content: image:img/cyberismo-logo.png[pdfwidth=12%]
51
51
 
52
+ ulist:
53
+ marker:
54
+ checked:
55
+ content: "\uf14a"
56
+ font-family: far
57
+ unchecked:
58
+ content: "\uf0c8"
59
+ font-family: far
60
+
52
61
  footer:
53
62
  columns: =100%
54
63
  recto: &shared_footer