@voyant-travel/reporting 0.1.0 → 0.2.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.
- package/dist/graph-registry.js +6 -2
- package/dist/service.d.ts +3 -3
- package/dist/voyant.js +7 -1
- package/openapi/admin/reporting.json +48 -14
- package/package.json +6 -6
package/dist/graph-registry.js
CHANGED
|
@@ -39,7 +39,9 @@ export async function createReportingRegistryFromGraph(input) {
|
|
|
39
39
|
execute: async (context, executionInput) => (await loadRuntime()).execute(context, executionInput),
|
|
40
40
|
};
|
|
41
41
|
});
|
|
42
|
-
const widgets = catalog.widgets
|
|
42
|
+
const widgets = catalog.widgets
|
|
43
|
+
.filter((widget) => widget.available)
|
|
44
|
+
.map((widget) => reportWidgetDefinitionSchema.parse({
|
|
43
45
|
id: widget.id,
|
|
44
46
|
version: widget.version,
|
|
45
47
|
label: widget.label,
|
|
@@ -62,7 +64,9 @@ export async function createReportingRegistryFromGraph(input) {
|
|
|
62
64
|
...(widget.minSize ? { minimumSize: widget.minSize } : {}),
|
|
63
65
|
...(widget.maxSize ? { maximumSize: widget.maxSize } : {}),
|
|
64
66
|
}));
|
|
65
|
-
const templates = catalog.templates
|
|
67
|
+
const templates = catalog.templates
|
|
68
|
+
.filter((template) => template.available)
|
|
69
|
+
.map((template) => reportTemplateDefinitionSchema.parse({
|
|
66
70
|
id: template.id,
|
|
67
71
|
version: template.version,
|
|
68
72
|
label: template.label,
|
package/dist/service.d.ts
CHANGED
|
@@ -392,8 +392,8 @@ export declare function createReportingService(registry: ReportingRegistry): {
|
|
|
392
392
|
remove(db: PostgresJsDatabase, id: string): Promise<boolean>;
|
|
393
393
|
createVersion(db: PostgresJsDatabase, reportDefinitionId: string, expectedRevision: number, actorId?: string): Promise<{
|
|
394
394
|
id: string;
|
|
395
|
-
description: string | null;
|
|
396
395
|
version: number;
|
|
396
|
+
description: string | null;
|
|
397
397
|
name: string;
|
|
398
398
|
createdByUserId: string | null;
|
|
399
399
|
createdAt: Date;
|
|
@@ -483,13 +483,13 @@ export declare function createReportingService(registry: ReportingRegistry): {
|
|
|
483
483
|
grantedScopes: readonly string[];
|
|
484
484
|
signal?: AbortSignal;
|
|
485
485
|
}): Promise<{
|
|
486
|
-
error: string | null;
|
|
487
486
|
output: ReportRunOutput | null;
|
|
488
|
-
id: string;
|
|
489
487
|
parameters: Record<string, string | number | boolean | (string | number | boolean | null)[] | null>;
|
|
488
|
+
id: string;
|
|
490
489
|
createdAt: Date;
|
|
491
490
|
reportVersionId: string;
|
|
492
491
|
status: "succeeded" | "failed" | "running";
|
|
492
|
+
error: string | null;
|
|
493
493
|
triggeredByUserId: string | null;
|
|
494
494
|
startedAt: Date;
|
|
495
495
|
completedAt: Date | null;
|
package/dist/voyant.js
CHANGED
|
@@ -111,6 +111,12 @@ export const reportingVoyantModule = defineModule({
|
|
|
111
111
|
},
|
|
112
112
|
admin: reportingVoyantAdmin,
|
|
113
113
|
lifecycle: { uninstall: { default: "retain-data", purge: "not-supported" } },
|
|
114
|
-
meta: {
|
|
114
|
+
meta: {
|
|
115
|
+
ownership: "package",
|
|
116
|
+
agentTools: {
|
|
117
|
+
posture: "not-applicable",
|
|
118
|
+
rationale: "Reporting is an interactive composition surface; source modules own agent-callable domain reads instead of exposing a generic query Tool.",
|
|
119
|
+
},
|
|
120
|
+
},
|
|
115
121
|
});
|
|
116
122
|
export default reportingVoyantModule;
|
|
@@ -121,7 +121,9 @@
|
|
|
121
121
|
"tags": ["Reporting"],
|
|
122
122
|
"requestBody": {
|
|
123
123
|
"required": true,
|
|
124
|
-
"content": {
|
|
124
|
+
"content": {
|
|
125
|
+
"application/json": { "schema": { "$ref": "#/components/schemas/QuerySourceInput" } }
|
|
126
|
+
}
|
|
125
127
|
},
|
|
126
128
|
"responses": {
|
|
127
129
|
"200": { "$ref": "#/components/responses/ReportingResponse" },
|
|
@@ -138,7 +140,9 @@
|
|
|
138
140
|
"tags": ["Reporting"],
|
|
139
141
|
"requestBody": {
|
|
140
142
|
"required": true,
|
|
141
|
-
"content": {
|
|
143
|
+
"content": {
|
|
144
|
+
"application/json": { "schema": { "$ref": "#/components/schemas/QueryPreviewInput" } }
|
|
145
|
+
}
|
|
142
146
|
},
|
|
143
147
|
"responses": {
|
|
144
148
|
"200": { "$ref": "#/components/responses/ReportingResponse" },
|
|
@@ -154,8 +158,16 @@
|
|
|
154
158
|
"description": "Requires reports:read.",
|
|
155
159
|
"tags": ["Reporting"],
|
|
156
160
|
"parameters": [
|
|
157
|
-
{
|
|
158
|
-
|
|
161
|
+
{
|
|
162
|
+
"name": "limit",
|
|
163
|
+
"in": "query",
|
|
164
|
+
"schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 25 }
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"name": "offset",
|
|
168
|
+
"in": "query",
|
|
169
|
+
"schema": { "type": "integer", "minimum": 0, "default": 0 }
|
|
170
|
+
}
|
|
159
171
|
],
|
|
160
172
|
"responses": {
|
|
161
173
|
"200": { "$ref": "#/components/responses/ReportingResponse" },
|
|
@@ -170,7 +182,9 @@
|
|
|
170
182
|
"tags": ["Reporting"],
|
|
171
183
|
"requestBody": {
|
|
172
184
|
"required": true,
|
|
173
|
-
"content": {
|
|
185
|
+
"content": {
|
|
186
|
+
"application/json": { "schema": { "$ref": "#/components/schemas/CreateReportInput" } }
|
|
187
|
+
}
|
|
174
188
|
},
|
|
175
189
|
"responses": {
|
|
176
190
|
"201": { "$ref": "#/components/responses/ReportingResponse" },
|
|
@@ -180,7 +194,9 @@
|
|
|
180
194
|
}
|
|
181
195
|
},
|
|
182
196
|
"/v1/admin/reporting/reports/{id}": {
|
|
183
|
-
"parameters": [
|
|
197
|
+
"parameters": [
|
|
198
|
+
{ "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }
|
|
199
|
+
],
|
|
184
200
|
"get": {
|
|
185
201
|
"operationId": "getReport",
|
|
186
202
|
"summary": "Get a saved report draft",
|
|
@@ -199,7 +215,9 @@
|
|
|
199
215
|
"tags": ["Reporting"],
|
|
200
216
|
"requestBody": {
|
|
201
217
|
"required": true,
|
|
202
|
-
"content": {
|
|
218
|
+
"content": {
|
|
219
|
+
"application/json": { "schema": { "$ref": "#/components/schemas/UpdateReportInput" } }
|
|
220
|
+
}
|
|
203
221
|
},
|
|
204
222
|
"responses": {
|
|
205
223
|
"200": { "$ref": "#/components/responses/ReportingResponse" },
|
|
@@ -223,7 +241,9 @@
|
|
|
223
241
|
}
|
|
224
242
|
},
|
|
225
243
|
"/v1/admin/reporting/templates/{id}/instantiate": {
|
|
226
|
-
"parameters": [
|
|
244
|
+
"parameters": [
|
|
245
|
+
{ "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }
|
|
246
|
+
],
|
|
227
247
|
"post": {
|
|
228
248
|
"operationId": "instantiateReportTemplate",
|
|
229
249
|
"summary": "Create an editable report from an available page template",
|
|
@@ -231,7 +251,11 @@
|
|
|
231
251
|
"tags": ["Reporting"],
|
|
232
252
|
"requestBody": {
|
|
233
253
|
"required": true,
|
|
234
|
-
"content": {
|
|
254
|
+
"content": {
|
|
255
|
+
"application/json": {
|
|
256
|
+
"schema": { "$ref": "#/components/schemas/InstantiateTemplateInput" }
|
|
257
|
+
}
|
|
258
|
+
}
|
|
235
259
|
},
|
|
236
260
|
"responses": {
|
|
237
261
|
"201": { "$ref": "#/components/responses/ReportingResponse" },
|
|
@@ -242,7 +266,9 @@
|
|
|
242
266
|
}
|
|
243
267
|
},
|
|
244
268
|
"/v1/admin/reporting/reports/{id}/versions": {
|
|
245
|
-
"parameters": [
|
|
269
|
+
"parameters": [
|
|
270
|
+
{ "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }
|
|
271
|
+
],
|
|
246
272
|
"post": {
|
|
247
273
|
"operationId": "publishReportVersion",
|
|
248
274
|
"summary": "Publish an immutable report snapshot",
|
|
@@ -250,7 +276,9 @@
|
|
|
250
276
|
"tags": ["Reporting"],
|
|
251
277
|
"requestBody": {
|
|
252
278
|
"required": true,
|
|
253
|
-
"content": {
|
|
279
|
+
"content": {
|
|
280
|
+
"application/json": { "schema": { "$ref": "#/components/schemas/PublishReportInput" } }
|
|
281
|
+
}
|
|
254
282
|
},
|
|
255
283
|
"responses": {
|
|
256
284
|
"201": { "$ref": "#/components/responses/ReportingResponse" },
|
|
@@ -262,7 +290,9 @@
|
|
|
262
290
|
}
|
|
263
291
|
},
|
|
264
292
|
"/v1/admin/reporting/versions/{id}/runs": {
|
|
265
|
-
"parameters": [
|
|
293
|
+
"parameters": [
|
|
294
|
+
{ "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }
|
|
295
|
+
],
|
|
266
296
|
"post": {
|
|
267
297
|
"operationId": "runReportVersion",
|
|
268
298
|
"summary": "Execute an immutable report version",
|
|
@@ -270,7 +300,9 @@
|
|
|
270
300
|
"tags": ["Reporting"],
|
|
271
301
|
"requestBody": {
|
|
272
302
|
"required": true,
|
|
273
|
-
"content": {
|
|
303
|
+
"content": {
|
|
304
|
+
"application/json": { "schema": { "$ref": "#/components/schemas/RunReportInput" } }
|
|
305
|
+
}
|
|
274
306
|
},
|
|
275
307
|
"responses": {
|
|
276
308
|
"201": { "$ref": "#/components/responses/ReportingResponse" },
|
|
@@ -281,7 +313,9 @@
|
|
|
281
313
|
}
|
|
282
314
|
},
|
|
283
315
|
"/v1/admin/reporting/runs/{id}": {
|
|
284
|
-
"parameters": [
|
|
316
|
+
"parameters": [
|
|
317
|
+
{ "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }
|
|
318
|
+
],
|
|
285
319
|
"get": {
|
|
286
320
|
"operationId": "getReportRun",
|
|
287
321
|
"summary": "Get persisted report results",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyant-travel/reporting",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Composable, domain-neutral reporting registry and persisted report lifecycle for Voyant.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
"drizzle-orm": "^0.45.2",
|
|
48
48
|
"hono": "^4.12.27",
|
|
49
49
|
"zod": "^4.4.3",
|
|
50
|
-
"@voyant-travel/core": "^0.
|
|
51
|
-
"@voyant-travel/
|
|
52
|
-
"@voyant-travel/
|
|
53
|
-
"@voyant-travel/
|
|
54
|
-
"@voyant-travel/
|
|
50
|
+
"@voyant-travel/core": "^0.130.0",
|
|
51
|
+
"@voyant-travel/db": "^0.115.0",
|
|
52
|
+
"@voyant-travel/hono": "^0.131.0",
|
|
53
|
+
"@voyant-travel/types": "^0.109.6",
|
|
54
|
+
"@voyant-travel/reporting-contracts": "^0.2.1"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"drizzle-kit": "^0.31.10",
|