@rothenbergt/backstage-plugin-roadmap-common 0.4.1 → 1.0.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 +8 -2
- package/dist/events/index.cjs.js +24 -0
- package/dist/events/index.cjs.js.map +1 -0
- package/dist/events/index.esm.js +13 -0
- package/dist/events/index.esm.js.map +1 -0
- package/dist/index.cjs.js +17 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +138 -13
- package/dist/index.esm.js +1 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/permissions/index.cjs.js.map +1 -1
- package/dist/permissions/index.esm.js.map +1 -1
- package/dist/types/index.cjs.js.map +1 -1
- package/dist/types/index.esm.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @rothenbergt/backstage-plugin-roadmap-common
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Shared types and constants for the [Backstage Roadmap Plugin](https://github.com/rothenbergt/backstage-roadmap-plugin). You normally don't install this package directly; it comes along as a dependency of the frontend and backend packages.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
It contains:
|
|
6
|
+
|
|
7
|
+
- **Types**: `Feature`, `Comment`, `FeatureStatus`, and the board configuration types. API fields are camelCase with ISO 8601 UTC timestamps.
|
|
8
|
+
- **Permissions**: `roadmapCreatePermission` (`roadmap.create`), `roadmapAdminPermission` (`roadmap.admin`), and the `roadmapPermissions` list for policy authors.
|
|
9
|
+
- **Events and signals constants**: the `roadmap` events topic, action names for every mutation, the `roadmap:board` signals channel, and the `RoadmapSignal` payload type, for anyone subscribing to roadmap changes from their own modules.
|
|
10
|
+
|
|
11
|
+
See the [main README](https://github.com/rothenbergt/backstage-roadmap-plugin#readme) for plugin setup, and each package's `report.api.md` for the exact public API.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const EVENTS_TOPIC_ROADMAP = "roadmap";
|
|
4
|
+
const EVENTS_ACTION_CREATE_FEATURE = "create_feature";
|
|
5
|
+
const EVENTS_ACTION_UPDATE_FEATURE = "update_feature";
|
|
6
|
+
const EVENTS_ACTION_DELETE_FEATURE = "delete_feature";
|
|
7
|
+
const EVENTS_ACTION_CHANGE_FEATURE_STATUS = "change_feature_status";
|
|
8
|
+
const EVENTS_ACTION_TOGGLE_VOTE = "toggle_vote";
|
|
9
|
+
const EVENTS_ACTION_CREATE_COMMENT = "create_comment";
|
|
10
|
+
const EVENTS_ACTION_DELETE_COMMENT = "delete_comment";
|
|
11
|
+
const EVENTS_ACTION_REORDER_BOARD = "reorder_board";
|
|
12
|
+
const SIGNALS_CHANNEL_ROADMAP = "roadmap:board";
|
|
13
|
+
|
|
14
|
+
exports.EVENTS_ACTION_CHANGE_FEATURE_STATUS = EVENTS_ACTION_CHANGE_FEATURE_STATUS;
|
|
15
|
+
exports.EVENTS_ACTION_CREATE_COMMENT = EVENTS_ACTION_CREATE_COMMENT;
|
|
16
|
+
exports.EVENTS_ACTION_CREATE_FEATURE = EVENTS_ACTION_CREATE_FEATURE;
|
|
17
|
+
exports.EVENTS_ACTION_DELETE_COMMENT = EVENTS_ACTION_DELETE_COMMENT;
|
|
18
|
+
exports.EVENTS_ACTION_DELETE_FEATURE = EVENTS_ACTION_DELETE_FEATURE;
|
|
19
|
+
exports.EVENTS_ACTION_REORDER_BOARD = EVENTS_ACTION_REORDER_BOARD;
|
|
20
|
+
exports.EVENTS_ACTION_TOGGLE_VOTE = EVENTS_ACTION_TOGGLE_VOTE;
|
|
21
|
+
exports.EVENTS_ACTION_UPDATE_FEATURE = EVENTS_ACTION_UPDATE_FEATURE;
|
|
22
|
+
exports.EVENTS_TOPIC_ROADMAP = EVENTS_TOPIC_ROADMAP;
|
|
23
|
+
exports.SIGNALS_CHANNEL_ROADMAP = SIGNALS_CHANNEL_ROADMAP;
|
|
24
|
+
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../src/events/index.ts"],"sourcesContent":["import { Feature } from '../types';\n\n/**\n * Events service topic for all roadmap events.\n *\n * @public\n */\nexport const EVENTS_TOPIC_ROADMAP = 'roadmap';\n\n/**\n * Actions attached to roadmap events (in event metadata).\n *\n * @public\n */\nexport const EVENTS_ACTION_CREATE_FEATURE = 'create_feature';\n/** @public */\nexport const EVENTS_ACTION_UPDATE_FEATURE = 'update_feature';\n/** @public */\nexport const EVENTS_ACTION_DELETE_FEATURE = 'delete_feature';\n/** @public */\nexport const EVENTS_ACTION_CHANGE_FEATURE_STATUS = 'change_feature_status';\n/** @public */\nexport const EVENTS_ACTION_TOGGLE_VOTE = 'toggle_vote';\n/** @public */\nexport const EVENTS_ACTION_CREATE_COMMENT = 'create_comment';\n/** @public */\nexport const EVENTS_ACTION_DELETE_COMMENT = 'delete_comment';\n/** @public */\nexport const EVENTS_ACTION_REORDER_BOARD = 'reorder_board';\n\n/**\n * Signals channel the roadmap backend broadcasts board updates on.\n *\n * @public\n */\nexport const SIGNALS_CHANNEL_ROADMAP = 'roadmap:board';\n\n/**\n * Kinds of live board updates carried by {@link RoadmapSignal}.\n *\n * @public\n */\nexport type RoadmapSignalKind =\n | 'feature_created'\n | 'feature_updated'\n | 'feature_deleted'\n | 'status_changed'\n | 'vote_changed'\n | 'comment_added'\n | 'comment_deleted'\n | 'board_reordered';\n\n/**\n * Signal broadcast on {@link SIGNALS_CHANNEL_ROADMAP} whenever the board\n * changes, so open boards can refresh live instead of waiting for a refetch.\n *\n * @public\n */\nexport type RoadmapSignal = {\n kind: RoadmapSignalKind;\n /** Present for feature-scoped updates. */\n featureId?: string;\n /** Present when the full feature is cheap to include (create/update/status). */\n feature?: Feature;\n};\n"],"names":[],"mappings":";;AAOO,MAAM,oBAAA,GAAuB;AAO7B,MAAM,4BAAA,GAA+B;AAErC,MAAM,4BAAA,GAA+B;AAErC,MAAM,4BAAA,GAA+B;AAErC,MAAM,mCAAA,GAAsC;AAE5C,MAAM,yBAAA,GAA4B;AAElC,MAAM,4BAAA,GAA+B;AAErC,MAAM,4BAAA,GAA+B;AAErC,MAAM,2BAAA,GAA8B;AAOpC,MAAM,uBAAA,GAA0B;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const EVENTS_TOPIC_ROADMAP = "roadmap";
|
|
2
|
+
const EVENTS_ACTION_CREATE_FEATURE = "create_feature";
|
|
3
|
+
const EVENTS_ACTION_UPDATE_FEATURE = "update_feature";
|
|
4
|
+
const EVENTS_ACTION_DELETE_FEATURE = "delete_feature";
|
|
5
|
+
const EVENTS_ACTION_CHANGE_FEATURE_STATUS = "change_feature_status";
|
|
6
|
+
const EVENTS_ACTION_TOGGLE_VOTE = "toggle_vote";
|
|
7
|
+
const EVENTS_ACTION_CREATE_COMMENT = "create_comment";
|
|
8
|
+
const EVENTS_ACTION_DELETE_COMMENT = "delete_comment";
|
|
9
|
+
const EVENTS_ACTION_REORDER_BOARD = "reorder_board";
|
|
10
|
+
const SIGNALS_CHANNEL_ROADMAP = "roadmap:board";
|
|
11
|
+
|
|
12
|
+
export { EVENTS_ACTION_CHANGE_FEATURE_STATUS, EVENTS_ACTION_CREATE_COMMENT, EVENTS_ACTION_CREATE_FEATURE, EVENTS_ACTION_DELETE_COMMENT, EVENTS_ACTION_DELETE_FEATURE, EVENTS_ACTION_REORDER_BOARD, EVENTS_ACTION_TOGGLE_VOTE, EVENTS_ACTION_UPDATE_FEATURE, EVENTS_TOPIC_ROADMAP, SIGNALS_CHANNEL_ROADMAP };
|
|
13
|
+
//# sourceMappingURL=index.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../../src/events/index.ts"],"sourcesContent":["import { Feature } from '../types';\n\n/**\n * Events service topic for all roadmap events.\n *\n * @public\n */\nexport const EVENTS_TOPIC_ROADMAP = 'roadmap';\n\n/**\n * Actions attached to roadmap events (in event metadata).\n *\n * @public\n */\nexport const EVENTS_ACTION_CREATE_FEATURE = 'create_feature';\n/** @public */\nexport const EVENTS_ACTION_UPDATE_FEATURE = 'update_feature';\n/** @public */\nexport const EVENTS_ACTION_DELETE_FEATURE = 'delete_feature';\n/** @public */\nexport const EVENTS_ACTION_CHANGE_FEATURE_STATUS = 'change_feature_status';\n/** @public */\nexport const EVENTS_ACTION_TOGGLE_VOTE = 'toggle_vote';\n/** @public */\nexport const EVENTS_ACTION_CREATE_COMMENT = 'create_comment';\n/** @public */\nexport const EVENTS_ACTION_DELETE_COMMENT = 'delete_comment';\n/** @public */\nexport const EVENTS_ACTION_REORDER_BOARD = 'reorder_board';\n\n/**\n * Signals channel the roadmap backend broadcasts board updates on.\n *\n * @public\n */\nexport const SIGNALS_CHANNEL_ROADMAP = 'roadmap:board';\n\n/**\n * Kinds of live board updates carried by {@link RoadmapSignal}.\n *\n * @public\n */\nexport type RoadmapSignalKind =\n | 'feature_created'\n | 'feature_updated'\n | 'feature_deleted'\n | 'status_changed'\n | 'vote_changed'\n | 'comment_added'\n | 'comment_deleted'\n | 'board_reordered';\n\n/**\n * Signal broadcast on {@link SIGNALS_CHANNEL_ROADMAP} whenever the board\n * changes, so open boards can refresh live instead of waiting for a refetch.\n *\n * @public\n */\nexport type RoadmapSignal = {\n kind: RoadmapSignalKind;\n /** Present for feature-scoped updates. */\n featureId?: string;\n /** Present when the full feature is cheap to include (create/update/status). */\n feature?: Feature;\n};\n"],"names":[],"mappings":"AAOO,MAAM,oBAAA,GAAuB;AAO7B,MAAM,4BAAA,GAA+B;AAErC,MAAM,4BAAA,GAA+B;AAErC,MAAM,4BAAA,GAA+B;AAErC,MAAM,mCAAA,GAAsC;AAE5C,MAAM,yBAAA,GAA4B;AAElC,MAAM,4BAAA,GAA+B;AAErC,MAAM,4BAAA,GAA+B;AAErC,MAAM,2BAAA,GAA8B;AAOpC,MAAM,uBAAA,GAA0B;;;;"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./types/index.cjs.js');
|
|
4
|
-
var index$
|
|
3
|
+
var index$1 = require('./types/index.cjs.js');
|
|
4
|
+
var index$2 = require('./permissions/index.cjs.js');
|
|
5
|
+
var index = require('./events/index.cjs.js');
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
|
|
8
|
-
exports.FeatureStatus = index.FeatureStatus;
|
|
9
|
-
exports.roadmapAdminPermission = index$
|
|
10
|
-
exports.roadmapCreatePermission = index$
|
|
11
|
-
exports.roadmapPermissions = index$
|
|
9
|
+
exports.FeatureStatus = index$1.FeatureStatus;
|
|
10
|
+
exports.roadmapAdminPermission = index$2.roadmapAdminPermission;
|
|
11
|
+
exports.roadmapCreatePermission = index$2.roadmapCreatePermission;
|
|
12
|
+
exports.roadmapPermissions = index$2.roadmapPermissions;
|
|
13
|
+
exports.EVENTS_ACTION_CHANGE_FEATURE_STATUS = index.EVENTS_ACTION_CHANGE_FEATURE_STATUS;
|
|
14
|
+
exports.EVENTS_ACTION_CREATE_COMMENT = index.EVENTS_ACTION_CREATE_COMMENT;
|
|
15
|
+
exports.EVENTS_ACTION_CREATE_FEATURE = index.EVENTS_ACTION_CREATE_FEATURE;
|
|
16
|
+
exports.EVENTS_ACTION_DELETE_COMMENT = index.EVENTS_ACTION_DELETE_COMMENT;
|
|
17
|
+
exports.EVENTS_ACTION_DELETE_FEATURE = index.EVENTS_ACTION_DELETE_FEATURE;
|
|
18
|
+
exports.EVENTS_ACTION_REORDER_BOARD = index.EVENTS_ACTION_REORDER_BOARD;
|
|
19
|
+
exports.EVENTS_ACTION_TOGGLE_VOTE = index.EVENTS_ACTION_TOGGLE_VOTE;
|
|
20
|
+
exports.EVENTS_ACTION_UPDATE_FEATURE = index.EVENTS_ACTION_UPDATE_FEATURE;
|
|
21
|
+
exports.EVENTS_TOPIC_ROADMAP = index.EVENTS_TOPIC_ROADMAP;
|
|
22
|
+
exports.SIGNALS_CHANNEL_ROADMAP = index.SIGNALS_CHANNEL_ROADMAP;
|
|
12
23
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/index.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import * as _backstage_plugin_permission_common from '@backstage/plugin-permission-common';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Lifecycle status of a roadmap feature.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
3
8
|
declare enum FeatureStatus {
|
|
4
9
|
Suggested = "Suggested",
|
|
5
10
|
Planned = "Planned",
|
|
@@ -7,55 +12,103 @@ declare enum FeatureStatus {
|
|
|
7
12
|
Completed = "Completed",
|
|
8
13
|
Declined = "Declined"
|
|
9
14
|
}
|
|
10
|
-
|
|
15
|
+
/**
|
|
16
|
+
* A roadmap feature as returned by the roadmap API.
|
|
17
|
+
*
|
|
18
|
+
* Type alias (not interface) so it satisfies JsonObject for events/signals.
|
|
19
|
+
*
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
type Feature = {
|
|
11
23
|
id: string;
|
|
12
24
|
title: string;
|
|
13
25
|
description: string;
|
|
14
26
|
status: FeatureStatus;
|
|
15
27
|
votes: number;
|
|
16
28
|
author: string;
|
|
17
|
-
|
|
18
|
-
|
|
29
|
+
/** ISO 8601 UTC timestamp. */
|
|
30
|
+
createdAt: string;
|
|
31
|
+
/** ISO 8601 UTC timestamp. */
|
|
32
|
+
updatedAt: string;
|
|
19
33
|
/** Sort order within status (database datasource). */
|
|
20
|
-
|
|
21
|
-
}
|
|
34
|
+
boardPosition?: number;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Payload for suggesting a new feature.
|
|
38
|
+
*
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
22
41
|
interface NewFeature {
|
|
23
42
|
title: string;
|
|
24
43
|
description: string;
|
|
25
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* A comment on a roadmap feature.
|
|
47
|
+
*
|
|
48
|
+
* @public
|
|
49
|
+
*/
|
|
26
50
|
interface Comment {
|
|
27
51
|
id: string;
|
|
28
52
|
author: string;
|
|
29
53
|
featureId: string;
|
|
30
54
|
text: string;
|
|
31
|
-
|
|
32
|
-
|
|
55
|
+
/** ISO 8601 UTC timestamp. */
|
|
56
|
+
createdAt: string;
|
|
57
|
+
/** ISO 8601 UTC timestamp. */
|
|
58
|
+
updatedAt: string;
|
|
33
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Payload for adding a comment to a feature.
|
|
62
|
+
*
|
|
63
|
+
* @public
|
|
64
|
+
*/
|
|
34
65
|
interface NewComment {
|
|
35
66
|
text: string;
|
|
36
67
|
featureId: string;
|
|
37
68
|
author?: string;
|
|
38
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* A board column with the features it contains.
|
|
72
|
+
*
|
|
73
|
+
* @public
|
|
74
|
+
*/
|
|
39
75
|
interface Column {
|
|
40
76
|
title: string;
|
|
41
77
|
features: Feature[];
|
|
42
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* Result of toggling a vote on a feature.
|
|
81
|
+
*
|
|
82
|
+
* @public
|
|
83
|
+
*/
|
|
43
84
|
interface VoteResponse {
|
|
44
85
|
voteAdded: boolean;
|
|
45
86
|
voteCount: number;
|
|
46
87
|
}
|
|
47
|
-
/**
|
|
88
|
+
/**
|
|
89
|
+
* Which timestamp drives retention for a column.
|
|
90
|
+
*
|
|
91
|
+
* @public
|
|
92
|
+
*/
|
|
48
93
|
type RoadmapRetentionAnchor = 'created' | 'updated';
|
|
49
|
-
/**
|
|
94
|
+
/**
|
|
95
|
+
* One column entry after defaults are merged (used by API + UI).
|
|
96
|
+
*
|
|
97
|
+
* @public
|
|
98
|
+
*/
|
|
50
99
|
interface RoadmapBoardColumnResolved {
|
|
51
100
|
status: FeatureStatus;
|
|
52
101
|
title: string;
|
|
53
102
|
visible: boolean;
|
|
54
|
-
/** When set (
|
|
103
|
+
/** When set (positive), items older than this many days are hidden from the default list (database only). */
|
|
55
104
|
retentionDays?: number;
|
|
56
105
|
retentionAnchor: RoadmapRetentionAnchor;
|
|
57
106
|
}
|
|
58
|
-
/**
|
|
107
|
+
/**
|
|
108
|
+
* Capabilities exposed to the frontend (GitLab = read-only extensions off).
|
|
109
|
+
*
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
59
112
|
interface RoadmapUiCapabilities {
|
|
60
113
|
retentionFiltering: boolean;
|
|
61
114
|
includeBeyondRetentionQuery: boolean;
|
|
@@ -65,14 +118,86 @@ interface RoadmapUiCapabilities {
|
|
|
65
118
|
creatorEditDeleteSuggested: boolean;
|
|
66
119
|
adminReorder: boolean;
|
|
67
120
|
}
|
|
68
|
-
/**
|
|
121
|
+
/**
|
|
122
|
+
* Response for GET /features/board-config.
|
|
123
|
+
*
|
|
124
|
+
* @public
|
|
125
|
+
*/
|
|
69
126
|
interface RoadmapBoardConfigResponse {
|
|
70
127
|
columns: RoadmapBoardColumnResolved[];
|
|
71
128
|
capabilities: RoadmapUiCapabilities;
|
|
72
129
|
}
|
|
73
130
|
|
|
131
|
+
/**
|
|
132
|
+
* Grants roadmap admin actions: changing status, editing and deleting
|
|
133
|
+
* features and comments, and reordering the board.
|
|
134
|
+
*
|
|
135
|
+
* @public
|
|
136
|
+
*/
|
|
74
137
|
declare const roadmapAdminPermission: _backstage_plugin_permission_common.BasicPermission;
|
|
138
|
+
/**
|
|
139
|
+
* Grants suggesting new features on the roadmap.
|
|
140
|
+
*
|
|
141
|
+
* @public
|
|
142
|
+
*/
|
|
75
143
|
declare const roadmapCreatePermission: _backstage_plugin_permission_common.BasicPermission;
|
|
144
|
+
/**
|
|
145
|
+
* All permissions defined by the roadmap plugin.
|
|
146
|
+
*
|
|
147
|
+
* @public
|
|
148
|
+
*/
|
|
76
149
|
declare const roadmapPermissions: _backstage_plugin_permission_common.BasicPermission[];
|
|
77
150
|
|
|
78
|
-
|
|
151
|
+
/**
|
|
152
|
+
* Events service topic for all roadmap events.
|
|
153
|
+
*
|
|
154
|
+
* @public
|
|
155
|
+
*/
|
|
156
|
+
declare const EVENTS_TOPIC_ROADMAP = "roadmap";
|
|
157
|
+
/**
|
|
158
|
+
* Actions attached to roadmap events (in event metadata).
|
|
159
|
+
*
|
|
160
|
+
* @public
|
|
161
|
+
*/
|
|
162
|
+
declare const EVENTS_ACTION_CREATE_FEATURE = "create_feature";
|
|
163
|
+
/** @public */
|
|
164
|
+
declare const EVENTS_ACTION_UPDATE_FEATURE = "update_feature";
|
|
165
|
+
/** @public */
|
|
166
|
+
declare const EVENTS_ACTION_DELETE_FEATURE = "delete_feature";
|
|
167
|
+
/** @public */
|
|
168
|
+
declare const EVENTS_ACTION_CHANGE_FEATURE_STATUS = "change_feature_status";
|
|
169
|
+
/** @public */
|
|
170
|
+
declare const EVENTS_ACTION_TOGGLE_VOTE = "toggle_vote";
|
|
171
|
+
/** @public */
|
|
172
|
+
declare const EVENTS_ACTION_CREATE_COMMENT = "create_comment";
|
|
173
|
+
/** @public */
|
|
174
|
+
declare const EVENTS_ACTION_DELETE_COMMENT = "delete_comment";
|
|
175
|
+
/** @public */
|
|
176
|
+
declare const EVENTS_ACTION_REORDER_BOARD = "reorder_board";
|
|
177
|
+
/**
|
|
178
|
+
* Signals channel the roadmap backend broadcasts board updates on.
|
|
179
|
+
*
|
|
180
|
+
* @public
|
|
181
|
+
*/
|
|
182
|
+
declare const SIGNALS_CHANNEL_ROADMAP = "roadmap:board";
|
|
183
|
+
/**
|
|
184
|
+
* Kinds of live board updates carried by {@link RoadmapSignal}.
|
|
185
|
+
*
|
|
186
|
+
* @public
|
|
187
|
+
*/
|
|
188
|
+
type RoadmapSignalKind = 'feature_created' | 'feature_updated' | 'feature_deleted' | 'status_changed' | 'vote_changed' | 'comment_added' | 'comment_deleted' | 'board_reordered';
|
|
189
|
+
/**
|
|
190
|
+
* Signal broadcast on {@link SIGNALS_CHANNEL_ROADMAP} whenever the board
|
|
191
|
+
* changes, so open boards can refresh live instead of waiting for a refetch.
|
|
192
|
+
*
|
|
193
|
+
* @public
|
|
194
|
+
*/
|
|
195
|
+
type RoadmapSignal = {
|
|
196
|
+
kind: RoadmapSignalKind;
|
|
197
|
+
/** Present for feature-scoped updates. */
|
|
198
|
+
featureId?: string;
|
|
199
|
+
/** Present when the full feature is cheap to include (create/update/status). */
|
|
200
|
+
feature?: Feature;
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
export { type Column, type Comment, EVENTS_ACTION_CHANGE_FEATURE_STATUS, EVENTS_ACTION_CREATE_COMMENT, EVENTS_ACTION_CREATE_FEATURE, EVENTS_ACTION_DELETE_COMMENT, EVENTS_ACTION_DELETE_FEATURE, EVENTS_ACTION_REORDER_BOARD, EVENTS_ACTION_TOGGLE_VOTE, EVENTS_ACTION_UPDATE_FEATURE, EVENTS_TOPIC_ROADMAP, type Feature, FeatureStatus, type NewComment, type NewFeature, type RoadmapBoardColumnResolved, type RoadmapBoardConfigResponse, type RoadmapRetentionAnchor, type RoadmapSignal, type RoadmapSignalKind, type RoadmapUiCapabilities, SIGNALS_CHANNEL_ROADMAP, type VoteResponse, roadmapAdminPermission, roadmapCreatePermission, roadmapPermissions };
|
package/dist/index.esm.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { FeatureStatus } from './types/index.esm.js';
|
|
2
2
|
export { roadmapAdminPermission, roadmapCreatePermission, roadmapPermissions } from './permissions/index.esm.js';
|
|
3
|
+
export { EVENTS_ACTION_CHANGE_FEATURE_STATUS, EVENTS_ACTION_CREATE_COMMENT, EVENTS_ACTION_CREATE_FEATURE, EVENTS_ACTION_DELETE_COMMENT, EVENTS_ACTION_DELETE_FEATURE, EVENTS_ACTION_REORDER_BOARD, EVENTS_ACTION_TOGGLE_VOTE, EVENTS_ACTION_UPDATE_FEATURE, EVENTS_TOPIC_ROADMAP, SIGNALS_CHANNEL_ROADMAP } from './events/index.esm.js';
|
|
3
4
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../../src/permissions/index.ts"],"sourcesContent":["import { createPermission } from '@backstage/plugin-permission-common';\n\nexport const roadmapAdminPermission = createPermission({\n name: 'roadmap.admin',\n attributes: { action: 'update' },\n});\n\nexport const roadmapCreatePermission = createPermission({\n name: 'roadmap.create',\n attributes: { action: 'create' },\n});\n\nexport const roadmapPermissions = [\n roadmapAdminPermission,\n roadmapCreatePermission,\n];\n"],"names":["createPermission"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../src/permissions/index.ts"],"sourcesContent":["import { createPermission } from '@backstage/plugin-permission-common';\n\n/**\n * Grants roadmap admin actions: changing status, editing and deleting\n * features and comments, and reordering the board.\n *\n * @public\n */\nexport const roadmapAdminPermission = createPermission({\n name: 'roadmap.admin',\n attributes: { action: 'update' },\n});\n\n/**\n * Grants suggesting new features on the roadmap.\n *\n * @public\n */\nexport const roadmapCreatePermission = createPermission({\n name: 'roadmap.create',\n attributes: { action: 'create' },\n});\n\n/**\n * All permissions defined by the roadmap plugin.\n *\n * @public\n */\nexport const roadmapPermissions = [\n roadmapAdminPermission,\n roadmapCreatePermission,\n];\n"],"names":["createPermission"],"mappings":";;;;AAQO,MAAM,yBAAyBA,uCAAA,CAAiB;AAAA,EACrD,IAAA,EAAM,eAAA;AAAA,EACN,UAAA,EAAY,EAAE,MAAA,EAAQ,QAAA;AACxB,CAAC;AAOM,MAAM,0BAA0BA,uCAAA,CAAiB;AAAA,EACtD,IAAA,EAAM,gBAAA;AAAA,EACN,UAAA,EAAY,EAAE,MAAA,EAAQ,QAAA;AACxB,CAAC;AAOM,MAAM,kBAAA,GAAqB;AAAA,EAChC,sBAAA;AAAA,EACA;AACF;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../../src/permissions/index.ts"],"sourcesContent":["import { createPermission } from '@backstage/plugin-permission-common';\n\nexport const roadmapAdminPermission = createPermission({\n name: 'roadmap.admin',\n attributes: { action: 'update' },\n});\n\nexport const roadmapCreatePermission = createPermission({\n name: 'roadmap.create',\n attributes: { action: 'create' },\n});\n\nexport const roadmapPermissions = [\n roadmapAdminPermission,\n roadmapCreatePermission,\n];\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../../src/permissions/index.ts"],"sourcesContent":["import { createPermission } from '@backstage/plugin-permission-common';\n\n/**\n * Grants roadmap admin actions: changing status, editing and deleting\n * features and comments, and reordering the board.\n *\n * @public\n */\nexport const roadmapAdminPermission = createPermission({\n name: 'roadmap.admin',\n attributes: { action: 'update' },\n});\n\n/**\n * Grants suggesting new features on the roadmap.\n *\n * @public\n */\nexport const roadmapCreatePermission = createPermission({\n name: 'roadmap.create',\n attributes: { action: 'create' },\n});\n\n/**\n * All permissions defined by the roadmap plugin.\n *\n * @public\n */\nexport const roadmapPermissions = [\n roadmapAdminPermission,\n roadmapCreatePermission,\n];\n"],"names":[],"mappings":";;AAQO,MAAM,yBAAyB,gBAAA,CAAiB;AAAA,EACrD,IAAA,EAAM,eAAA;AAAA,EACN,UAAA,EAAY,EAAE,MAAA,EAAQ,QAAA;AACxB,CAAC;AAOM,MAAM,0BAA0B,gBAAA,CAAiB;AAAA,EACtD,IAAA,EAAM,gBAAA;AAAA,EACN,UAAA,EAAY,EAAE,MAAA,EAAQ,QAAA;AACxB,CAAC;AAOM,MAAM,kBAAA,GAAqB;AAAA,EAChC,sBAAA;AAAA,EACA;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../../src/types/index.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../src/types/index.ts"],"sourcesContent":["/**\n * Lifecycle status of a roadmap feature.\n *\n * @public\n */\nexport enum FeatureStatus {\n Suggested = 'Suggested',\n Planned = 'Planned',\n InProgress = 'In Progress',\n Completed = 'Completed',\n Declined = 'Declined',\n}\n\n/**\n * A roadmap feature as returned by the roadmap API.\n *\n * Type alias (not interface) so it satisfies JsonObject for events/signals.\n *\n * @public\n */\nexport type Feature = {\n id: string;\n title: string;\n description: string;\n status: FeatureStatus;\n votes: number;\n author: string;\n /** ISO 8601 UTC timestamp. */\n createdAt: string;\n /** ISO 8601 UTC timestamp. */\n updatedAt: string;\n /** Sort order within status (database datasource). */\n boardPosition?: number;\n};\n\n/**\n * Payload for suggesting a new feature.\n *\n * @public\n */\nexport interface NewFeature {\n title: string;\n description: string;\n}\n\n/**\n * A comment on a roadmap feature.\n *\n * @public\n */\nexport interface Comment {\n id: string;\n author: string;\n featureId: string;\n text: string;\n /** ISO 8601 UTC timestamp. */\n createdAt: string;\n /** ISO 8601 UTC timestamp. */\n updatedAt: string;\n}\n\n/**\n * Payload for adding a comment to a feature.\n *\n * @public\n */\nexport interface NewComment {\n text: string;\n featureId: string;\n author?: string;\n}\n\n/**\n * A board column with the features it contains.\n *\n * @public\n */\nexport interface Column {\n title: string;\n features: Feature[];\n}\n\n/**\n * Result of toggling a vote on a feature.\n *\n * @public\n */\nexport interface VoteResponse {\n voteAdded: boolean;\n voteCount: number;\n}\n\n/**\n * Which timestamp drives retention for a column.\n *\n * @public\n */\nexport type RoadmapRetentionAnchor = 'created' | 'updated';\n\n/**\n * One column entry after defaults are merged (used by API + UI).\n *\n * @public\n */\nexport interface RoadmapBoardColumnResolved {\n status: FeatureStatus;\n title: string;\n visible: boolean;\n /** When set (positive), items older than this many days are hidden from the default list (database only). */\n retentionDays?: number;\n retentionAnchor: RoadmapRetentionAnchor;\n}\n\n/**\n * Capabilities exposed to the frontend (GitLab = read-only extensions off).\n *\n * @public\n */\nexport interface RoadmapUiCapabilities {\n retentionFiltering: boolean;\n includeBeyondRetentionQuery: boolean;\n adminEditTitleDescription: boolean;\n adminDeleteFeature: boolean;\n adminDeleteComment: boolean;\n creatorEditDeleteSuggested: boolean;\n adminReorder: boolean;\n}\n\n/**\n * Response for GET /features/board-config.\n *\n * @public\n */\nexport interface RoadmapBoardConfigResponse {\n columns: RoadmapBoardColumnResolved[];\n capabilities: RoadmapUiCapabilities;\n}\n"],"names":["FeatureStatus"],"mappings":";;AAKO,IAAK,aAAA,qBAAAA,cAAAA,KAAL;AACL,EAAAA,eAAA,WAAA,CAAA,GAAY,WAAA;AACZ,EAAAA,eAAA,SAAA,CAAA,GAAU,SAAA;AACV,EAAAA,eAAA,YAAA,CAAA,GAAa,aAAA;AACb,EAAAA,eAAA,WAAA,CAAA,GAAY,WAAA;AACZ,EAAAA,eAAA,UAAA,CAAA,GAAW,UAAA;AALD,EAAA,OAAAA,cAAAA;AAAA,CAAA,EAAA,aAAA,IAAA,EAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../../src/types/index.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../../src/types/index.ts"],"sourcesContent":["/**\n * Lifecycle status of a roadmap feature.\n *\n * @public\n */\nexport enum FeatureStatus {\n Suggested = 'Suggested',\n Planned = 'Planned',\n InProgress = 'In Progress',\n Completed = 'Completed',\n Declined = 'Declined',\n}\n\n/**\n * A roadmap feature as returned by the roadmap API.\n *\n * Type alias (not interface) so it satisfies JsonObject for events/signals.\n *\n * @public\n */\nexport type Feature = {\n id: string;\n title: string;\n description: string;\n status: FeatureStatus;\n votes: number;\n author: string;\n /** ISO 8601 UTC timestamp. */\n createdAt: string;\n /** ISO 8601 UTC timestamp. */\n updatedAt: string;\n /** Sort order within status (database datasource). */\n boardPosition?: number;\n};\n\n/**\n * Payload for suggesting a new feature.\n *\n * @public\n */\nexport interface NewFeature {\n title: string;\n description: string;\n}\n\n/**\n * A comment on a roadmap feature.\n *\n * @public\n */\nexport interface Comment {\n id: string;\n author: string;\n featureId: string;\n text: string;\n /** ISO 8601 UTC timestamp. */\n createdAt: string;\n /** ISO 8601 UTC timestamp. */\n updatedAt: string;\n}\n\n/**\n * Payload for adding a comment to a feature.\n *\n * @public\n */\nexport interface NewComment {\n text: string;\n featureId: string;\n author?: string;\n}\n\n/**\n * A board column with the features it contains.\n *\n * @public\n */\nexport interface Column {\n title: string;\n features: Feature[];\n}\n\n/**\n * Result of toggling a vote on a feature.\n *\n * @public\n */\nexport interface VoteResponse {\n voteAdded: boolean;\n voteCount: number;\n}\n\n/**\n * Which timestamp drives retention for a column.\n *\n * @public\n */\nexport type RoadmapRetentionAnchor = 'created' | 'updated';\n\n/**\n * One column entry after defaults are merged (used by API + UI).\n *\n * @public\n */\nexport interface RoadmapBoardColumnResolved {\n status: FeatureStatus;\n title: string;\n visible: boolean;\n /** When set (positive), items older than this many days are hidden from the default list (database only). */\n retentionDays?: number;\n retentionAnchor: RoadmapRetentionAnchor;\n}\n\n/**\n * Capabilities exposed to the frontend (GitLab = read-only extensions off).\n *\n * @public\n */\nexport interface RoadmapUiCapabilities {\n retentionFiltering: boolean;\n includeBeyondRetentionQuery: boolean;\n adminEditTitleDescription: boolean;\n adminDeleteFeature: boolean;\n adminDeleteComment: boolean;\n creatorEditDeleteSuggested: boolean;\n adminReorder: boolean;\n}\n\n/**\n * Response for GET /features/board-config.\n *\n * @public\n */\nexport interface RoadmapBoardConfigResponse {\n columns: RoadmapBoardColumnResolved[];\n capabilities: RoadmapUiCapabilities;\n}\n"],"names":["FeatureStatus"],"mappings":"AAKO,IAAK,aAAA,qBAAAA,cAAAA,KAAL;AACL,EAAAA,eAAA,WAAA,CAAA,GAAY,WAAA;AACZ,EAAAA,eAAA,SAAA,CAAA,GAAU,SAAA;AACV,EAAAA,eAAA,YAAA,CAAA,GAAa,aAAA;AACb,EAAAA,eAAA,WAAA,CAAA,GAAY,WAAA;AACZ,EAAAA,eAAA,UAAA,CAAA,GAAW,UAAA;AALD,EAAA,OAAAA,cAAAA;AAAA,CAAA,EAAA,aAAA,IAAA,EAAA;;;;"}
|
package/package.json
CHANGED