@promptowl/contextnest-community 1.8.0 → 1.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.
- package/CONFIGURATION.md +9 -0
- package/dist/chunk-3JTODC3Y.js +48 -0
- package/dist/{chunk-PJTAUVD7.js → chunk-BYS4HDME.js} +39 -53
- package/dist/{chunk-PLAHCDQG.js → chunk-DPHV6Q26.js} +253 -19
- package/dist/chunk-FRQJWGN3.js +8 -0
- package/dist/{chunk-XNGOO6RI.js → chunk-HRQWNRVI.js} +4 -2
- package/dist/chunk-TIO5XOFD.js +103 -0
- package/dist/chunk-VC3QNHHB.js +664 -0
- package/dist/chunk-XQ46F76G.js +16 -0
- package/dist/client-GI74NPIW.js +11 -0
- package/dist/email-R7DFS6E5.js +6 -0
- package/dist/grants-service-MDLRPMZR.js +21 -0
- package/dist/index.js +1862 -223
- package/dist/{migrations.postgres-VCG45LMK.js → migrations.postgres-ORSV7UFJ.js} +105 -1
- package/dist/{review-service-G5US3SMG.js → review-service-A3XFQTJH.js} +6 -4
- package/dist/{stewardship-service-ZXAMFTXO.js → stewardship-service-3KCVVXCW.js} +4 -2
- package/dist/{version-service-B3SDOJQE.js → version-service-6J4OWQL6.js} +3 -2
- package/dist/web3/assets/index-CHavHPIT.css +1 -0
- package/dist/web3/assets/index-DyvOBH92.js +934 -0
- package/dist/web3/index.html +2 -2
- package/package.json +14 -5
- package/dist/chunk-Z3Y46ZGU.js +0 -362
- package/dist/web3/assets/index-Den-5nzY.js +0 -904
- package/dist/web3/assets/index-Jfj-2MHm.css +0 -1
package/dist/web3/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>ContextNest</title>
|
|
7
7
|
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🪺</text></svg>" />
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-DyvOBH92.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CHavHPIT.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body class="bg-background text-foreground antialiased">
|
|
12
12
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptowl/contextnest-community",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "ContextNest Community Edition — self-hosted context governance server for AI workflows. Commercial software by Promptowl LLC.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -72,7 +72,8 @@
|
|
|
72
72
|
"bcryptjs": "^3.0.3",
|
|
73
73
|
"better-sqlite3": "^11.8.2",
|
|
74
74
|
"dotenv": "^16.6.1",
|
|
75
|
-
"hono": "
|
|
75
|
+
"hono": "4.12.25",
|
|
76
|
+
"nodemailer": "9.0.3",
|
|
76
77
|
"pg": "^8.13.1",
|
|
77
78
|
"uuid": "^14.0.0",
|
|
78
79
|
"zod": "^4.3.6"
|
|
@@ -104,6 +105,7 @@
|
|
|
104
105
|
"@tiptap/extension-details": "^3.23.2",
|
|
105
106
|
"@tiptap/extension-drag-handle-react": "^3.23.2",
|
|
106
107
|
"@tiptap/extension-highlight": "^3.23.2",
|
|
108
|
+
"@tiptap/extension-image": "3.23.2",
|
|
107
109
|
"@tiptap/extension-link": "^3.23.2",
|
|
108
110
|
"@tiptap/extension-node-range": "^3.23.2",
|
|
109
111
|
"@tiptap/extension-placeholder": "^3.23.2",
|
|
@@ -118,12 +120,13 @@
|
|
|
118
120
|
"@types/bcryptjs": "^3.0.0",
|
|
119
121
|
"@types/better-sqlite3": "^7.6.13",
|
|
120
122
|
"@types/d3-force": "^3.0.10",
|
|
123
|
+
"@types/nodemailer": "8.0.1",
|
|
121
124
|
"@types/pg": "^8.11.10",
|
|
122
125
|
"@types/react": "^18.3.0",
|
|
123
126
|
"@types/react-dom": "^18.3.0",
|
|
124
127
|
"@types/uuid": "^10.0.0",
|
|
125
128
|
"@vitejs/plugin-react": "^4.3.0",
|
|
126
|
-
"@vitest/coverage-v8": "
|
|
129
|
+
"@vitest/coverage-v8": "3.2.6",
|
|
127
130
|
"autoprefixer": "^10.4.20",
|
|
128
131
|
"class-variance-authority": "^0.7.0",
|
|
129
132
|
"clsx": "^2.1.1",
|
|
@@ -146,7 +149,13 @@
|
|
|
146
149
|
"tsup": "^8.4.0",
|
|
147
150
|
"tsx": "^4.19.4",
|
|
148
151
|
"typescript": "^5.7.3",
|
|
149
|
-
"vite": "
|
|
150
|
-
"vitest": "
|
|
152
|
+
"vite": "6.4.3",
|
|
153
|
+
"vitest": "3.2.6"
|
|
154
|
+
},
|
|
155
|
+
"overrides": {
|
|
156
|
+
"shell-quote": "1.8.4",
|
|
157
|
+
"qs": "6.15.2",
|
|
158
|
+
"@babel/core": "7.29.6",
|
|
159
|
+
"brace-expansion": "5.0.6"
|
|
151
160
|
}
|
|
152
161
|
}
|
package/dist/chunk-Z3Y46ZGU.js
DELETED
|
@@ -1,362 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createVersion,
|
|
3
|
-
setApprovedVersion
|
|
4
|
-
} from "./chunk-XNGOO6RI.js";
|
|
5
|
-
import {
|
|
6
|
-
buildTitleMap,
|
|
7
|
-
canUserApprove,
|
|
8
|
-
describeNode,
|
|
9
|
-
engineCache,
|
|
10
|
-
resolveStewardsForNode
|
|
11
|
-
} from "./chunk-PJTAUVD7.js";
|
|
12
|
-
import {
|
|
13
|
-
config,
|
|
14
|
-
getDb,
|
|
15
|
-
insertOrReplace,
|
|
16
|
-
nowExpr
|
|
17
|
-
} from "./chunk-PLAHCDQG.js";
|
|
18
|
-
|
|
19
|
-
// src/governance/review-service.ts
|
|
20
|
-
import { v4 as uuid } from "uuid";
|
|
21
|
-
|
|
22
|
-
// src/notify/slack.ts
|
|
23
|
-
var warnedOnce = false;
|
|
24
|
-
async function notifySlackForNest(nestId, message) {
|
|
25
|
-
if (!config.SLACK_WEBHOOK_URL) return;
|
|
26
|
-
let nestName = nestId;
|
|
27
|
-
try {
|
|
28
|
-
const row = await getDb().get("SELECT name FROM nests WHERE id = ?", [
|
|
29
|
-
nestId
|
|
30
|
-
]);
|
|
31
|
-
if (row?.name) nestName = row.name;
|
|
32
|
-
} catch {
|
|
33
|
-
}
|
|
34
|
-
return notifySlack(`*[${nestName}]* ${message}`);
|
|
35
|
-
}
|
|
36
|
-
function escapeMrkdwn(s) {
|
|
37
|
-
return s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
38
|
-
}
|
|
39
|
-
async function notifySlack(text) {
|
|
40
|
-
const url = config.SLACK_WEBHOOK_URL;
|
|
41
|
-
if (!url) return;
|
|
42
|
-
try {
|
|
43
|
-
const ctrl = new AbortController();
|
|
44
|
-
const timer = setTimeout(() => ctrl.abort(), 3e3);
|
|
45
|
-
try {
|
|
46
|
-
await fetch(url, {
|
|
47
|
-
method: "POST",
|
|
48
|
-
headers: { "Content-Type": "application/json" },
|
|
49
|
-
body: JSON.stringify({ text: escapeMrkdwn(text) }),
|
|
50
|
-
signal: ctrl.signal
|
|
51
|
-
});
|
|
52
|
-
} finally {
|
|
53
|
-
clearTimeout(timer);
|
|
54
|
-
}
|
|
55
|
-
} catch (err) {
|
|
56
|
-
if (!warnedOnce) {
|
|
57
|
-
warnedOnce = true;
|
|
58
|
-
console.warn(
|
|
59
|
-
"[slack] notification failed (suppressing further warnings):",
|
|
60
|
-
err instanceof Error ? err.message : err
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// src/governance/safe-publish.ts
|
|
67
|
-
import {
|
|
68
|
-
publishDocument,
|
|
69
|
-
serializeDocument
|
|
70
|
-
} from "@promptowl/contextnest-engine";
|
|
71
|
-
async function safePublishDocument(storage, docId, options) {
|
|
72
|
-
const node = await storage.readDocument(docId);
|
|
73
|
-
const cleanedFrontmatter = stripUndefinedDeep(node.frontmatter);
|
|
74
|
-
const cleanedNode = { ...node, frontmatter: cleanedFrontmatter };
|
|
75
|
-
await storage.writeDocument(docId, serializeDocument(cleanedNode));
|
|
76
|
-
return publishDocument(storage, docId, options);
|
|
77
|
-
}
|
|
78
|
-
function stripUndefinedDeep(value) {
|
|
79
|
-
if (Array.isArray(value)) {
|
|
80
|
-
return value.filter((v) => v !== void 0).map((v) => stripUndefinedDeep(v));
|
|
81
|
-
}
|
|
82
|
-
if (value && typeof value === "object") {
|
|
83
|
-
const out = {};
|
|
84
|
-
for (const [k, v] of Object.entries(value)) {
|
|
85
|
-
if (v === void 0) continue;
|
|
86
|
-
out[k] = stripUndefinedDeep(v);
|
|
87
|
-
}
|
|
88
|
-
return out;
|
|
89
|
-
}
|
|
90
|
-
return value;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// src/governance/review-service.ts
|
|
94
|
-
async function submitForReview(params) {
|
|
95
|
-
const db = getDb();
|
|
96
|
-
const existing = await db.get(
|
|
97
|
-
"SELECT id FROM review_requests WHERE nest_id = ? AND node_id = ? AND status = 'pending'",
|
|
98
|
-
[params.nestId, params.nodeId]
|
|
99
|
-
);
|
|
100
|
-
if (existing) {
|
|
101
|
-
throw new Error("A review is already pending for this node");
|
|
102
|
-
}
|
|
103
|
-
const id = uuid();
|
|
104
|
-
await db.run(
|
|
105
|
-
`INSERT INTO review_requests
|
|
106
|
-
(id, nest_id, node_id, version, requested_by, request_note, priority)
|
|
107
|
-
VALUES (?, ?, ?, ?, ?, ?, ?)`,
|
|
108
|
-
[
|
|
109
|
-
id,
|
|
110
|
-
params.nestId,
|
|
111
|
-
params.nodeId,
|
|
112
|
-
params.version,
|
|
113
|
-
params.requestedBy,
|
|
114
|
-
params.note || null,
|
|
115
|
-
params.priority || "normal"
|
|
116
|
-
]
|
|
117
|
-
);
|
|
118
|
-
await db.run(
|
|
119
|
-
"UPDATE node_versions SET status = 'pending_review' WHERE nest_id = ? AND node_id = ? AND version = ?",
|
|
120
|
-
[params.nestId, params.nodeId, params.version]
|
|
121
|
-
);
|
|
122
|
-
void notifySlackForNest(
|
|
123
|
-
params.nestId,
|
|
124
|
-
`:memo: Review requested on *${await describeNode(params.nestId, params.nodeId)}* (v${params.version}) by ${params.requestedBy}${params.note ? ` \u2014 "${params.note}"` : ""}`
|
|
125
|
-
);
|
|
126
|
-
return await getReviewRequest(id);
|
|
127
|
-
}
|
|
128
|
-
async function approve(params) {
|
|
129
|
-
const db = getDb();
|
|
130
|
-
const pending = await db.get(
|
|
131
|
-
"SELECT * FROM review_requests WHERE nest_id = ? AND node_id = ? AND status = 'pending' ORDER BY requested_at DESC LIMIT 1",
|
|
132
|
-
[params.nestId, params.nodeId]
|
|
133
|
-
);
|
|
134
|
-
if (!pending) {
|
|
135
|
-
throw new Error("No pending review for this node");
|
|
136
|
-
}
|
|
137
|
-
if (!params.override) {
|
|
138
|
-
const check = await canUserApprove(
|
|
139
|
-
params.nestId,
|
|
140
|
-
params.nodeId,
|
|
141
|
-
params.approvedBy
|
|
142
|
-
);
|
|
143
|
-
if (!check.allowed) {
|
|
144
|
-
throw new Error(check.reason);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
await db.run(
|
|
148
|
-
`UPDATE review_requests
|
|
149
|
-
SET status = 'approved', resolved_by = ?, resolved_at = ${nowExpr(db)},
|
|
150
|
-
resolution_note = ?, is_override = ?
|
|
151
|
-
WHERE id = ?`,
|
|
152
|
-
[params.approvedBy, params.note || null, params.override ? 1 : 0, pending.id]
|
|
153
|
-
);
|
|
154
|
-
await db.run(
|
|
155
|
-
"UPDATE node_versions SET status = 'published' WHERE nest_id = ? AND node_id = ? AND version = ?",
|
|
156
|
-
[params.nestId, params.nodeId, params.version]
|
|
157
|
-
);
|
|
158
|
-
await db.run(
|
|
159
|
-
insertOrReplace(
|
|
160
|
-
db,
|
|
161
|
-
`INSERT INTO approved_versions (nest_id, node_id, approved_version, approved_by)
|
|
162
|
-
VALUES (?, ?, ?, ?)`,
|
|
163
|
-
["nest_id", "node_id"],
|
|
164
|
-
`approved_version = excluded.approved_version, approved_by = excluded.approved_by, approved_at = ${nowExpr(db)}`
|
|
165
|
-
),
|
|
166
|
-
[params.nestId, params.nodeId, params.version, params.approvedBy]
|
|
167
|
-
);
|
|
168
|
-
try {
|
|
169
|
-
const { storage } = await engineCache.get(params.nestId);
|
|
170
|
-
const result = await safePublishDocument(storage, params.nodeId, {
|
|
171
|
-
editedBy: params.approvedBy,
|
|
172
|
-
note: params.note || `Approved review request ${pending.id}`
|
|
173
|
-
});
|
|
174
|
-
const engineVersion = result.versionEntry.version;
|
|
175
|
-
if (engineVersion !== params.version) {
|
|
176
|
-
const node = result.node;
|
|
177
|
-
const tags = node.frontmatter.tags || [];
|
|
178
|
-
await createVersion({
|
|
179
|
-
nestId: params.nestId,
|
|
180
|
-
nodeId: params.nodeId,
|
|
181
|
-
version: engineVersion,
|
|
182
|
-
content: node.body || "",
|
|
183
|
-
author: params.approvedBy,
|
|
184
|
-
status: "published",
|
|
185
|
-
tags,
|
|
186
|
-
changeNote: params.note || `Approved review request ${pending.id}`
|
|
187
|
-
});
|
|
188
|
-
await setApprovedVersion(
|
|
189
|
-
params.nestId,
|
|
190
|
-
params.nodeId,
|
|
191
|
-
engineVersion,
|
|
192
|
-
params.approvedBy
|
|
193
|
-
);
|
|
194
|
-
}
|
|
195
|
-
} catch (err) {
|
|
196
|
-
console.error(
|
|
197
|
-
`publishDocument failed for ${params.nestId}/${params.nodeId} on approve:`,
|
|
198
|
-
err
|
|
199
|
-
);
|
|
200
|
-
}
|
|
201
|
-
void notifySlackForNest(
|
|
202
|
-
params.nestId,
|
|
203
|
-
`:white_check_mark: *${await describeNode(params.nestId, params.nodeId)}* v${params.version} approved by ${params.approvedBy}`
|
|
204
|
-
);
|
|
205
|
-
return await getReviewRequest(pending.id);
|
|
206
|
-
}
|
|
207
|
-
async function reject(params) {
|
|
208
|
-
const db = getDb();
|
|
209
|
-
const pending = await db.get(
|
|
210
|
-
"SELECT * FROM review_requests WHERE nest_id = ? AND node_id = ? AND status = 'pending' ORDER BY requested_at DESC LIMIT 1",
|
|
211
|
-
[params.nestId, params.nodeId]
|
|
212
|
-
);
|
|
213
|
-
if (!pending) {
|
|
214
|
-
throw new Error("No pending review for this node");
|
|
215
|
-
}
|
|
216
|
-
const check = await canUserApprove(
|
|
217
|
-
params.nestId,
|
|
218
|
-
params.nodeId,
|
|
219
|
-
params.rejectedBy
|
|
220
|
-
);
|
|
221
|
-
if (!check.allowed) {
|
|
222
|
-
throw new Error(check.reason);
|
|
223
|
-
}
|
|
224
|
-
await db.run(
|
|
225
|
-
`UPDATE review_requests
|
|
226
|
-
SET status = 'rejected', resolved_by = ?, resolved_at = ${nowExpr(db)}, resolution_note = ?
|
|
227
|
-
WHERE id = ?`,
|
|
228
|
-
[params.rejectedBy, params.note, pending.id]
|
|
229
|
-
);
|
|
230
|
-
await db.run(
|
|
231
|
-
"UPDATE node_versions SET status = 'rejected' WHERE nest_id = ? AND node_id = ? AND version = ?",
|
|
232
|
-
[params.nestId, params.nodeId, params.version]
|
|
233
|
-
);
|
|
234
|
-
void notifySlackForNest(
|
|
235
|
-
params.nestId,
|
|
236
|
-
`:x: *${await describeNode(params.nestId, params.nodeId)}* v${params.version} rejected by ${params.rejectedBy} \u2014 "${params.note}"`
|
|
237
|
-
);
|
|
238
|
-
return await getReviewRequest(pending.id);
|
|
239
|
-
}
|
|
240
|
-
async function cancelReview(params) {
|
|
241
|
-
const db = getDb();
|
|
242
|
-
const pending = await db.get(
|
|
243
|
-
"SELECT * FROM review_requests WHERE nest_id = ? AND node_id = ? AND status = 'pending' ORDER BY requested_at DESC LIMIT 1",
|
|
244
|
-
[params.nestId, params.nodeId]
|
|
245
|
-
);
|
|
246
|
-
if (!pending) return null;
|
|
247
|
-
await db.run(
|
|
248
|
-
`UPDATE review_requests
|
|
249
|
-
SET status = 'cancelled', resolved_by = ?, resolved_at = ${nowExpr(db)}
|
|
250
|
-
WHERE id = ?`,
|
|
251
|
-
[params.cancelledBy, pending.id]
|
|
252
|
-
);
|
|
253
|
-
await db.run(
|
|
254
|
-
"UPDATE node_versions SET status = 'draft' WHERE nest_id = ? AND node_id = ? AND version = ?",
|
|
255
|
-
[params.nestId, params.nodeId, pending.version]
|
|
256
|
-
);
|
|
257
|
-
return await getReviewRequest(pending.id);
|
|
258
|
-
}
|
|
259
|
-
async function getReviewQueue(params) {
|
|
260
|
-
const db = getDb();
|
|
261
|
-
let whereClauses = [];
|
|
262
|
-
const args = [];
|
|
263
|
-
if (params.nestId) {
|
|
264
|
-
whereClauses.push("nest_id = ?");
|
|
265
|
-
args.push(params.nestId);
|
|
266
|
-
}
|
|
267
|
-
if (params.status) {
|
|
268
|
-
const statuses = Array.isArray(params.status) ? params.status : [params.status];
|
|
269
|
-
whereClauses.push(
|
|
270
|
-
`status IN (${statuses.map(() => "?").join(",")})`
|
|
271
|
-
);
|
|
272
|
-
args.push(...statuses);
|
|
273
|
-
}
|
|
274
|
-
const where = whereClauses.length > 0 ? `WHERE ${whereClauses.join(" AND ")}` : "";
|
|
275
|
-
const total = (await db.get(
|
|
276
|
-
`SELECT COUNT(*) as c FROM review_requests ${where}`,
|
|
277
|
-
args
|
|
278
|
-
)).c;
|
|
279
|
-
const limit = params.limit || 50;
|
|
280
|
-
const offset = params.offset || 0;
|
|
281
|
-
const rows = await db.all(
|
|
282
|
-
`SELECT * FROM review_requests ${where}
|
|
283
|
-
ORDER BY
|
|
284
|
-
CASE priority WHEN 'urgent' THEN 0 WHEN 'high' THEN 1 WHEN 'normal' THEN 2 ELSE 3 END,
|
|
285
|
-
requested_at DESC
|
|
286
|
-
LIMIT ? OFFSET ?`,
|
|
287
|
-
[...args, limit, offset]
|
|
288
|
-
);
|
|
289
|
-
let requests = rows.map(rowToReviewRequest);
|
|
290
|
-
if (params.stewardEmail) {
|
|
291
|
-
const filtered = [];
|
|
292
|
-
for (const r of requests) {
|
|
293
|
-
const stewards = await resolveStewardsForNode(r.nestId, r.nodeId);
|
|
294
|
-
if (stewards.some((s) => s.steward.userEmail === params.stewardEmail)) {
|
|
295
|
-
filtered.push(r);
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
requests = filtered;
|
|
299
|
-
}
|
|
300
|
-
const titleMapsByNest = /* @__PURE__ */ new Map();
|
|
301
|
-
const nestIds = new Set(requests.map((r) => r.nestId));
|
|
302
|
-
for (const nid of nestIds) {
|
|
303
|
-
titleMapsByNest.set(nid, await buildTitleMap(nid));
|
|
304
|
-
}
|
|
305
|
-
requests = requests.map((r) => ({
|
|
306
|
-
...r,
|
|
307
|
-
title: titleMapsByNest.get(r.nestId)?.get(r.nodeId)
|
|
308
|
-
}));
|
|
309
|
-
return { requests, total };
|
|
310
|
-
}
|
|
311
|
-
async function getReviewHistory(nestId, nodeId) {
|
|
312
|
-
const db = getDb();
|
|
313
|
-
const rows = await db.all(
|
|
314
|
-
"SELECT * FROM review_requests WHERE nest_id = ? AND node_id = ? ORDER BY requested_at DESC",
|
|
315
|
-
[nestId, nodeId]
|
|
316
|
-
);
|
|
317
|
-
return rows.map(rowToReviewRequest);
|
|
318
|
-
}
|
|
319
|
-
async function getPendingReview(nestId, nodeId) {
|
|
320
|
-
const db = getDb();
|
|
321
|
-
const row = await db.get(
|
|
322
|
-
"SELECT * FROM review_requests WHERE nest_id = ? AND node_id = ? AND status = 'pending' ORDER BY requested_at DESC LIMIT 1",
|
|
323
|
-
[nestId, nodeId]
|
|
324
|
-
);
|
|
325
|
-
return row ? rowToReviewRequest(row) : null;
|
|
326
|
-
}
|
|
327
|
-
async function getReviewRequest(id) {
|
|
328
|
-
const db = getDb();
|
|
329
|
-
const row = await db.get(
|
|
330
|
-
"SELECT * FROM review_requests WHERE id = ?",
|
|
331
|
-
[id]
|
|
332
|
-
);
|
|
333
|
-
return row ? rowToReviewRequest(row) : null;
|
|
334
|
-
}
|
|
335
|
-
function rowToReviewRequest(row) {
|
|
336
|
-
return {
|
|
337
|
-
id: row.id,
|
|
338
|
-
nestId: row.nest_id,
|
|
339
|
-
nodeId: row.node_id,
|
|
340
|
-
version: row.version,
|
|
341
|
-
requestedBy: row.requested_by,
|
|
342
|
-
requestedAt: row.requested_at,
|
|
343
|
-
requestNote: row.request_note || void 0,
|
|
344
|
-
status: row.status,
|
|
345
|
-
resolvedBy: row.resolved_by || void 0,
|
|
346
|
-
resolvedAt: row.resolved_at || void 0,
|
|
347
|
-
resolutionNote: row.resolution_note || void 0,
|
|
348
|
-
priority: row.priority
|
|
349
|
-
};
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
export {
|
|
353
|
-
safePublishDocument,
|
|
354
|
-
notifySlackForNest,
|
|
355
|
-
submitForReview,
|
|
356
|
-
approve,
|
|
357
|
-
reject,
|
|
358
|
-
cancelReview,
|
|
359
|
-
getReviewQueue,
|
|
360
|
-
getReviewHistory,
|
|
361
|
-
getPendingReview
|
|
362
|
-
};
|