@servicelabsco/slabs-access-manager 1.0.68 → 1.0.69

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.
Files changed (193) hide show
  1. package/dist/access/controllers/business.report.controller.js.map +1 -1
  2. package/dist/access/controllers/dashboard.report.controller.js +2 -1
  3. package/dist/access/controllers/dashboard.report.controller.js.map +1 -1
  4. package/dist/access/controllers/index.d.ts +1 -0
  5. package/dist/access/controllers/index.js +1 -0
  6. package/dist/access/controllers/index.js.map +1 -1
  7. package/dist/access/controllers/report.view.controller.d.ts +101 -0
  8. package/dist/access/controllers/report.view.controller.js +66 -0
  9. package/dist/access/controllers/report.view.controller.js.map +1 -0
  10. package/dist/access/controllers/whoami.controller.js +3 -2
  11. package/dist/access/controllers/whoami.controller.js.map +1 -1
  12. package/dist/access/dtos/index.d.ts +1 -0
  13. package/dist/access/dtos/index.js +1 -0
  14. package/dist/access/dtos/index.js.map +1 -1
  15. package/dist/access/dtos/report.view.query.dto.d.ts +23 -0
  16. package/dist/access/dtos/report.view.query.dto.js +56 -0
  17. package/dist/access/dtos/report.view.query.dto.js.map +1 -0
  18. package/dist/access/es6.classes.d.ts +24 -14
  19. package/dist/access/es6.classes.js +42 -25
  20. package/dist/access/es6.classes.js.map +1 -1
  21. package/dist/access/jobs/form.script.job.js +1 -1
  22. package/dist/access/libraries/index.d.ts +1 -0
  23. package/dist/access/libraries/index.js +1 -0
  24. package/dist/access/libraries/index.js.map +1 -1
  25. package/dist/access/libraries/process.form.script.list.js.map +1 -1
  26. package/dist/access/libraries/report.view.query.compiler.d.ts +163 -0
  27. package/dist/access/libraries/report.view.query.compiler.js +399 -0
  28. package/dist/access/libraries/report.view.query.compiler.js.map +1 -0
  29. package/dist/access/services/credential.resolve.service.js +18 -3
  30. package/dist/access/services/credential.resolve.service.js.map +1 -1
  31. package/dist/access/services/es6.jobs.service.d.ts +3 -3
  32. package/dist/access/services/es6.jobs.service.js +5 -5
  33. package/dist/access/services/es6.jobs.service.js.map +1 -1
  34. package/dist/access/services/index.d.ts +1 -0
  35. package/dist/access/services/index.js +1 -0
  36. package/dist/access/services/index.js.map +1 -1
  37. package/dist/access/services/oauth.as.service.js.map +1 -1
  38. package/dist/access/services/report.view.service.d.ts +111 -0
  39. package/dist/access/services/report.view.service.js +234 -0
  40. package/dist/access/services/report.view.service.js.map +1 -0
  41. package/dist/accessUtility/access.utility.module.js +2 -2
  42. package/dist/accessUtility/access.utility.module.js.map +1 -1
  43. package/dist/accessUtility/es6.classes.d.ts +1 -1
  44. package/dist/accessUtility/es6.classes.js +2 -2
  45. package/dist/accessUtility/es6.classes.js.map +1 -1
  46. package/dist/accessUtility/index.d.ts +1 -1
  47. package/dist/accessUtility/index.js +1 -1
  48. package/dist/accessUtility/index.js.map +1 -1
  49. package/dist/accessUtility/{types/bulk.upload.item.record.js → interfaces/bulk.upload.item.record.interface.js} +1 -1
  50. package/dist/accessUtility/interfaces/bulk.upload.item.record.interface.js.map +1 -0
  51. package/dist/accessUtility/interfaces/index.d.ts +1 -0
  52. package/dist/accessUtility/interfaces/index.js +18 -0
  53. package/dist/accessUtility/interfaces/index.js.map +1 -0
  54. package/dist/accessUtility/jobs/bulk.upload.column.match.job.js.map +1 -1
  55. package/dist/accessUtility/jobs/push.to.bulk.item.job.d.ts +1 -1
  56. package/dist/accessUtility/libraries/set.bulk.upload.log.file.js.map +1 -1
  57. package/dist/accessUtility/services/bulk.upload.item.store.d.ts +1 -1
  58. package/dist/accessUtility/services/bulk.upload.item.store.js.map +1 -1
  59. package/dist/app.module.js +2 -0
  60. package/dist/app.module.js.map +1 -1
  61. package/dist/config/entity.constants.d.ts +2 -2
  62. package/dist/config/entity.constants.js +2 -2
  63. package/dist/config/entity.constants.js.map +1 -1
  64. package/dist/config/mongo.config.d.ts +3 -0
  65. package/dist/config/mongo.config.js +16 -0
  66. package/dist/config/mongo.config.js.map +1 -0
  67. package/dist/config/source.hash.d.ts +1 -0
  68. package/dist/config/source.hash.js +1 -0
  69. package/dist/config/source.hash.js.map +1 -1
  70. package/dist/development/controllers/development.catalog.controller.d.ts +53 -0
  71. package/dist/development/controllers/development.catalog.controller.js +112 -0
  72. package/dist/development/controllers/development.catalog.controller.js.map +1 -0
  73. package/dist/development/controllers/index.d.ts +1 -0
  74. package/dist/development/controllers/index.js +1 -0
  75. package/dist/development/controllers/index.js.map +1 -1
  76. package/dist/development/development.module.js +2 -1
  77. package/dist/development/development.module.js.map +1 -1
  78. package/dist/development/dtos/column.catalog.attributes.dto.d.ts +10 -0
  79. package/dist/development/dtos/column.catalog.attributes.dto.js +58 -0
  80. package/dist/development/dtos/column.catalog.attributes.dto.js.map +1 -0
  81. package/dist/development/dtos/index.d.ts +2 -0
  82. package/dist/development/dtos/index.js +19 -0
  83. package/dist/development/dtos/index.js.map +1 -0
  84. package/dist/development/dtos/material.view.catalog.attributes.dto.d.ts +25 -0
  85. package/dist/development/dtos/material.view.catalog.attributes.dto.js +114 -0
  86. package/dist/development/dtos/material.view.catalog.attributes.dto.js.map +1 -0
  87. package/dist/development/es6.classes.d.ts +10 -3
  88. package/dist/development/es6.classes.js +10 -3
  89. package/dist/development/es6.classes.js.map +1 -1
  90. package/dist/development/gates/index.d.ts +1 -0
  91. package/dist/{accessUtility/types → development/gates}/index.js +1 -1
  92. package/dist/development/gates/index.js.map +1 -0
  93. package/dist/development/gates/reporting.catalog.gate.d.ts +8 -0
  94. package/dist/development/gates/reporting.catalog.gate.js +39 -0
  95. package/dist/development/gates/reporting.catalog.gate.js.map +1 -0
  96. package/dist/development/index.d.ts +2 -0
  97. package/dist/development/index.js +2 -0
  98. package/dist/development/index.js.map +1 -1
  99. package/dist/development/services/admin.report.view.service.d.ts +92 -0
  100. package/dist/development/services/admin.report.view.service.js +459 -0
  101. package/dist/development/services/admin.report.view.service.js.map +1 -0
  102. package/dist/development/services/index.d.ts +1 -0
  103. package/dist/development/services/index.js +1 -0
  104. package/dist/development/services/index.js.map +1 -1
  105. package/dist/main.js +1 -1
  106. package/dist/main.js.map +1 -1
  107. package/dist/mcp/admin/tools/admin.tool.registry.js +14 -0
  108. package/dist/mcp/admin/tools/admin.tool.registry.js.map +1 -1
  109. package/dist/mcp/admin/tools/catalog/admin.catalog.validate.tool.d.ts +16 -0
  110. package/dist/mcp/admin/tools/catalog/admin.catalog.validate.tool.js +22 -0
  111. package/dist/mcp/admin/tools/catalog/admin.catalog.validate.tool.js.map +1 -0
  112. package/dist/mcp/admin/tools/catalog/admin.column.describe.tool.d.ts +30 -0
  113. package/dist/mcp/admin/tools/catalog/admin.column.describe.tool.js +37 -0
  114. package/dist/mcp/admin/tools/catalog/admin.column.describe.tool.js.map +1 -0
  115. package/dist/mcp/admin/tools/catalog/admin.view.columns.sync.tool.d.ts +22 -0
  116. package/dist/mcp/admin/tools/catalog/admin.view.columns.sync.tool.js +31 -0
  117. package/dist/mcp/admin/tools/catalog/admin.view.columns.sync.tool.js.map +1 -0
  118. package/dist/mcp/admin/tools/catalog/admin.view.register.tool.d.ts +22 -0
  119. package/dist/mcp/admin/tools/catalog/admin.view.register.tool.js +28 -0
  120. package/dist/mcp/admin/tools/catalog/admin.view.register.tool.js.map +1 -0
  121. package/dist/mcp/admin/tools/catalog/admin.view.sample.tool.d.ts +21 -0
  122. package/dist/mcp/admin/tools/catalog/admin.view.sample.tool.js +32 -0
  123. package/dist/mcp/admin/tools/catalog/admin.view.sample.tool.js.map +1 -0
  124. package/dist/mcp/admin/tools/catalog/admin.view.update.tool.d.ts +22 -0
  125. package/dist/mcp/admin/tools/catalog/admin.view.update.tool.js +29 -0
  126. package/dist/mcp/admin/tools/catalog/admin.view.update.tool.js.map +1 -0
  127. package/dist/mcp/admin/tools/catalog/admin.views.list.tool.d.ts +10 -0
  128. package/dist/mcp/admin/tools/catalog/admin.views.list.tool.js +20 -0
  129. package/dist/mcp/admin/tools/catalog/admin.views.list.tool.js.map +1 -0
  130. package/dist/mcp/admin/tools/catalog/index.d.ts +7 -0
  131. package/dist/mcp/admin/tools/catalog/index.js +24 -0
  132. package/dist/mcp/admin/tools/catalog/index.js.map +1 -0
  133. package/dist/mcp/admin/tools/form_script/form.script.create.tool.js.map +1 -1
  134. package/dist/mcp/admin/tools/form_script/form.script.list.tool.js.map +1 -1
  135. package/dist/mcp/admin/tools/form_script/form.script.update.tool.js.map +1 -1
  136. package/dist/mcp/admin/tools/index.d.ts +1 -0
  137. package/dist/mcp/admin/tools/index.js +1 -0
  138. package/dist/mcp/admin/tools/index.js.map +1 -1
  139. package/dist/mcp/admin/tools/report/report.create.tool.js.map +1 -1
  140. package/dist/mcp/admin/tools/report/report.update.tool.js.map +1 -1
  141. package/dist/mcp/auth/mcp.idempotency.store.js +3 -1
  142. package/dist/mcp/auth/mcp.idempotency.store.js.map +1 -1
  143. package/dist/mcp/catalog/assert.valid.catalog.d.ts +3 -0
  144. package/dist/mcp/catalog/assert.valid.catalog.js +2 -0
  145. package/dist/mcp/catalog/assert.valid.catalog.js.map +1 -1
  146. package/dist/mcp/es6.classes.d.ts +54 -8
  147. package/dist/mcp/es6.classes.js +74 -12
  148. package/dist/mcp/es6.classes.js.map +1 -1
  149. package/dist/mcp/http/mcp.http.module.js +5 -2
  150. package/dist/mcp/http/mcp.http.module.js.map +1 -1
  151. package/dist/mcp/index.d.ts +2 -0
  152. package/dist/mcp/index.js +2 -0
  153. package/dist/mcp/index.js.map +1 -1
  154. package/dist/mcp/logging/index.d.ts +3 -0
  155. package/dist/mcp/logging/index.js +20 -0
  156. package/dist/mcp/logging/index.js.map +1 -0
  157. package/dist/mcp/logging/mcp.call.log.interceptor.d.ts +16 -0
  158. package/dist/mcp/logging/mcp.call.log.interceptor.js +140 -0
  159. package/dist/mcp/logging/mcp.call.log.interceptor.js.map +1 -0
  160. package/dist/mcp/logging/mcp.call.log.writer.d.ts +11 -0
  161. package/dist/mcp/logging/mcp.call.log.writer.js +62 -0
  162. package/dist/mcp/logging/mcp.call.log.writer.js.map +1 -0
  163. package/dist/mcp/logging/sanitize.mcp.call.log.d.ts +44 -0
  164. package/dist/mcp/logging/sanitize.mcp.call.log.js +112 -0
  165. package/dist/mcp/logging/sanitize.mcp.call.log.js.map +1 -0
  166. package/dist/mcp/mcp.module.d.ts +1 -1
  167. package/dist/mcp/mcp.module.js.map +1 -1
  168. package/dist/mcp/mentities/index.d.ts +1 -0
  169. package/dist/mcp/mentities/index.js +18 -0
  170. package/dist/mcp/mentities/index.js.map +1 -0
  171. package/dist/mcp/mentities/mcp.call.log.mentity.d.ts +17 -0
  172. package/dist/mcp/mentities/mcp.call.log.mentity.js +79 -0
  173. package/dist/mcp/mentities/mcp.call.log.mentity.js.map +1 -0
  174. package/dist/mcp/tools/index.d.ts +3 -0
  175. package/dist/mcp/tools/index.js +3 -0
  176. package/dist/mcp/tools/index.js.map +1 -1
  177. package/dist/mcp/tools/reports.run.tool.js.map +1 -1
  178. package/dist/mcp/tools/tool.registry.js +4 -21
  179. package/dist/mcp/tools/tool.registry.js.map +1 -1
  180. package/dist/mcp/tools/view.describe.tool.d.ts +17 -0
  181. package/dist/mcp/tools/view.describe.tool.js +23 -0
  182. package/dist/mcp/tools/view.describe.tool.js.map +1 -0
  183. package/dist/mcp/tools/view.query.tool.d.ts +75 -0
  184. package/dist/mcp/tools/view.query.tool.js +51 -0
  185. package/dist/mcp/tools/view.query.tool.js.map +1 -0
  186. package/dist/mcp/tools/views.list.tool.d.ts +10 -0
  187. package/dist/mcp/tools/views.list.tool.js +20 -0
  188. package/dist/mcp/tools/views.list.tool.js.map +1 -0
  189. package/package.json +2 -2
  190. package/dist/accessUtility/types/bulk.upload.item.record.js.map +0 -1
  191. package/dist/accessUtility/types/index.d.ts +0 -1
  192. package/dist/accessUtility/types/index.js.map +0 -1
  193. /package/dist/accessUtility/{types/bulk.upload.item.record.d.ts → interfaces/bulk.upload.item.record.interface.d.ts} +0 -0
@@ -0,0 +1,44 @@
1
+ export declare const MCP_LOG_BODY_CAP: number;
2
+ export declare const MCP_LOG_TTL_DAYS: number;
3
+ export type McpCaller = {
4
+ id?: number;
5
+ auth_attributes?: {
6
+ business_id?: number;
7
+ api_key_kind?: string;
8
+ client_id?: string;
9
+ };
10
+ };
11
+ export type SanitizedMcpCallLog = {
12
+ client_id: string | null;
13
+ user_id: number | null;
14
+ business_id: number | null;
15
+ kind: string;
16
+ request: unknown;
17
+ };
18
+ export declare function sanitizeMcpCallLog(input: {
19
+ headers?: Record<string, unknown>;
20
+ request?: unknown;
21
+ user?: McpCaller | null;
22
+ }): SanitizedMcpCallLog;
23
+ export declare function capResponseBody(body: unknown, cap?: number): {
24
+ body?: unknown;
25
+ truncated: boolean;
26
+ bytes: number;
27
+ };
28
+ export declare function hashCompiledSql(sql: string): string;
29
+ export declare function hottestQueryFamilies(rows: Array<{
30
+ sql_hash: string;
31
+ db_ms: number;
32
+ }>, limit?: number): Array<{
33
+ sql_hash: string;
34
+ count: number;
35
+ p95_db_ms: number;
36
+ }>;
37
+ export declare function extractExplainCost(plan: unknown): number | null;
38
+ export declare const SanitizeMcpCallLog: {
39
+ sanitizeMcpCallLog: typeof sanitizeMcpCallLog;
40
+ capResponseBody: typeof capResponseBody;
41
+ hashCompiledSql: typeof hashCompiledSql;
42
+ hottestQueryFamilies: typeof hottestQueryFamilies;
43
+ extractExplainCost: typeof extractExplainCost;
44
+ };
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SanitizeMcpCallLog = exports.MCP_LOG_TTL_DAYS = exports.MCP_LOG_BODY_CAP = void 0;
4
+ exports.sanitizeMcpCallLog = sanitizeMcpCallLog;
5
+ exports.capResponseBody = capResponseBody;
6
+ exports.hashCompiledSql = hashCompiledSql;
7
+ exports.hottestQueryFamilies = hottestQueryFamilies;
8
+ exports.extractExplainCost = extractExplainCost;
9
+ const crypto_1 = require("crypto");
10
+ const extract_client_credentials_1 = require("../../access/libraries/extract.client.credentials");
11
+ exports.MCP_LOG_BODY_CAP = Number(process.env.MCP_LOG_BODY_CAP) > 0 ? Number(process.env.MCP_LOG_BODY_CAP) : 32 * 1024;
12
+ exports.MCP_LOG_TTL_DAYS = Number(process.env.MCP_LOG_TTL_DAYS) > 0 ? Number(process.env.MCP_LOG_TTL_DAYS) : 90;
13
+ const SECRET_HEADER = /^(authorization|cookie|x-client-secret|x-development-key)$/i;
14
+ const SECRET_KEY = /(secret|password|token|authorization|cookie|api[_-]?key|client_secret|development[_-]?key)/i;
15
+ function sanitizeMcpCallLog(input) {
16
+ const user = input.user;
17
+ const fromBearer = clientIdFromHeaders(input.headers);
18
+ return {
19
+ client_id: user?.auth_attributes?.client_id || fromBearer || null,
20
+ user_id: user?.id ?? null,
21
+ business_id: user?.auth_attributes?.business_id ?? null,
22
+ kind: user?.auth_attributes?.api_key_kind === 'api'
23
+ ? 'api'
24
+ : user?.auth_attributes?.api_key_kind === 'user'
25
+ ? 'user'
26
+ : fromBearer
27
+ ? 'user'
28
+ : 'unknown',
29
+ request: redact(input.request),
30
+ };
31
+ }
32
+ function capResponseBody(body, cap = exports.MCP_LOG_BODY_CAP) {
33
+ if (body === undefined)
34
+ return { truncated: false, bytes: 0 };
35
+ const bytes = Buffer.byteLength(typeof body === 'string' ? body : JSON.stringify(body), 'utf8');
36
+ if (bytes > cap)
37
+ return { truncated: true, bytes };
38
+ return { body, truncated: false, bytes };
39
+ }
40
+ function hashCompiledSql(sql) {
41
+ const normalized = String(sql || '')
42
+ .replace(/\s+/g, ' ')
43
+ .trim();
44
+ return (0, crypto_1.createHash)('sha256').update(normalized).digest('hex');
45
+ }
46
+ function hottestQueryFamilies(rows, limit = 10) {
47
+ const groups = new Map();
48
+ for (const row of rows) {
49
+ const list = groups.get(row.sql_hash) || [];
50
+ list.push(row.db_ms);
51
+ groups.set(row.sql_hash, list);
52
+ }
53
+ return [...groups.entries()]
54
+ .map(([sql_hash, times]) => {
55
+ const sorted = [...times].sort((a, b) => a - b);
56
+ const p95 = sorted[Math.min(sorted.length - 1, Math.ceil(sorted.length * 0.95) - 1)] ?? 0;
57
+ return { sql_hash, count: times.length, p95_db_ms: p95 };
58
+ })
59
+ .sort((a, b) => b.p95_db_ms - a.p95_db_ms || b.count - a.count)
60
+ .slice(0, limit);
61
+ }
62
+ function extractExplainCost(plan) {
63
+ const root = unwrapExplain(plan);
64
+ const cost = root && typeof root === 'object' ? (root['Total Cost'] ?? root.TotalCost) : null;
65
+ const n = Number(cost);
66
+ return Number.isFinite(n) ? n : null;
67
+ }
68
+ function unwrapExplain(plan) {
69
+ if (!plan)
70
+ return null;
71
+ if (Array.isArray(plan))
72
+ return unwrapExplain(plan[0]);
73
+ if (typeof plan === 'object') {
74
+ const record = plan;
75
+ if (record.Plan)
76
+ return unwrapExplain(record.Plan);
77
+ if (record['QUERY PLAN'])
78
+ return unwrapExplain(record['QUERY PLAN']);
79
+ return record;
80
+ }
81
+ return null;
82
+ }
83
+ function clientIdFromHeaders(headers) {
84
+ if (!headers)
85
+ return null;
86
+ const fromHeader = headers['x-client-id'] ?? headers['X-Client-Id'];
87
+ if (fromHeader)
88
+ return String(fromHeader);
89
+ const creds = extract_client_credentials_1.ExtractClientCredentials.fromHeaders(headers);
90
+ return creds?.clientId || null;
91
+ }
92
+ function redact(value) {
93
+ if (Array.isArray(value))
94
+ return value.map(redact);
95
+ if (!value || typeof value !== 'object')
96
+ return value;
97
+ const out = {};
98
+ for (const [key, nested] of Object.entries(value)) {
99
+ if (SECRET_HEADER.test(key) || SECRET_KEY.test(key))
100
+ continue;
101
+ out[key] = redact(nested);
102
+ }
103
+ return out;
104
+ }
105
+ exports.SanitizeMcpCallLog = {
106
+ sanitizeMcpCallLog,
107
+ capResponseBody,
108
+ hashCompiledSql,
109
+ hottestQueryFamilies,
110
+ extractExplainCost,
111
+ };
112
+ //# sourceMappingURL=sanitize.mcp.call.log.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sanitize.mcp.call.log.js","sourceRoot":"","sources":["../../../src/mcp/logging/sanitize.mcp.call.log.ts"],"names":[],"mappings":";;;AAsBA,gD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,CAAC,GAAG,CAAC;YAAE,SAAS;QAC9D,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;IACD,OAAO,GAAG,CAAC;AACf,CAAC;AAMY,QAAA,kBAAkB,GAAG;IAC9B,kBAAkB;IAClB,eAAe;IACf,eAAe;IACf,oBAAoB;IACpB,kBAAkB;CACrB,CAAC"}
@@ -4,7 +4,7 @@ export declare class McpModule {
4
4
  static forRoot(options?: McpModuleOptions): DynamicModule;
5
5
  }
6
6
  export { assertValidCatalog } from './catalog/assert.valid.catalog';
7
- export { assertPublicMcpBootConfig, MCP_TOOL_REGISTRIES, getHostMcpRegistries, getMcpServerName, mcpToolNameMax, provisionMcpServer, setHostMcpRegistries } from './mcp.constants';
7
+ export { assertPublicMcpBootConfig, MCP_TOOL_REGISTRIES, getHostMcpRegistries, getMcpServerName, mcpToolNameMax, provisionMcpServer, setHostMcpRegistries, } from './mcp.constants';
8
8
  export type { McpModuleOptions, McpToolRegistryFactory } from './mcp.constants';
9
9
  export { ApToolRegistry } from './tools/ap.tool.registry';
10
10
  export { ArToolRegistry } from './tools/ar.tool.registry';
@@ -1 +1 @@
1
- {"version":3,"file":"mcp.module.js","sourceRoot":"","sources":["../../src/mcp/mcp.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAuD;AACvD,0EAAsE;AACtE,4DAAuD;AACvD,mDAAuE;AA0BhE,IAAM,SAAS,iBAAf,MAAM,SAAS;IAClB,MAAM,CAAC,OAAO,CAAC,UAA4B,EAAE;QACzC,IAAA,kCAAkB,EAAC,OAAO,CAAC,CAAC;QAC5B,OAAO;YACH,MAAM,EAAE,WAAS;YACjB,OAAO,EAAE,CAAC,+BAAa,EAAE,sCAAiB,CAAC;YAC3C,OAAO,EAAE,CAAC,+BAAa,EAAE,sCAAiB,CAAC;SAC9C,CAAC;IACN,CAAC;CACJ,CAAA;AATY,8BAAS;oBAAT,SAAS;IAJrB,IAAA,eAAM,EA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OAAA;AACzB,oHAAA,mBAAmB,OAAA;AACnB,qHAAA,oBAAoB,OAAA;AACpB,iHAAA,gBAAgB,OAAA;AAChB,+GAAA,cAAc,OAAA;AACd,mHAAA,kBAAkB,OAAA;AAClB,qHAAA,oBAAoB,OAAA;AAGxB,6DAA0D;AAAjD,kHAAA,cAAc,OAAA;AACvB,6DAA0D;AAAjD,kHAAA,cAAc,OAAA;AACvB,uDAAqD;AAA5C,6GAAA,YAAY,OAAA"}
@@ -0,0 +1 @@
1
+ export * from './mcp.call.log.mentity';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./mcp.call.log.mentity"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mcp/mentities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAsC"}
@@ -0,0 +1,17 @@
1
+ import { CommonMongoEntity } from '@servicelabsco/nestjs-utility-services';
2
+ export declare class McpCallLogMentity extends CommonMongoEntity {
3
+ surface: string;
4
+ server_name: string;
5
+ method: string;
6
+ tool: string;
7
+ path: string;
8
+ user_id: number;
9
+ business_id: number;
10
+ client_id: string;
11
+ kind: string;
12
+ request: any;
13
+ response: any;
14
+ timing_ms: any;
15
+ cost: any;
16
+ expire_at: Date;
17
+ }
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.McpCallLogMentity = void 0;
13
+ const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
14
+ const typeorm_1 = require("typeorm");
15
+ let McpCallLogMentity = class McpCallLogMentity extends nestjs_utility_services_1.CommonMongoEntity {
16
+ };
17
+ exports.McpCallLogMentity = McpCallLogMentity;
18
+ __decorate([
19
+ (0, typeorm_1.Column)(),
20
+ __metadata("design:type", String)
21
+ ], McpCallLogMentity.prototype, "surface", void 0);
22
+ __decorate([
23
+ (0, typeorm_1.Column)(),
24
+ __metadata("design:type", String)
25
+ ], McpCallLogMentity.prototype, "server_name", void 0);
26
+ __decorate([
27
+ (0, typeorm_1.Column)(),
28
+ __metadata("design:type", String)
29
+ ], McpCallLogMentity.prototype, "method", void 0);
30
+ __decorate([
31
+ (0, typeorm_1.Column)(),
32
+ __metadata("design:type", String)
33
+ ], McpCallLogMentity.prototype, "tool", void 0);
34
+ __decorate([
35
+ (0, typeorm_1.Column)(),
36
+ __metadata("design:type", String)
37
+ ], McpCallLogMentity.prototype, "path", void 0);
38
+ __decorate([
39
+ (0, typeorm_1.Column)(),
40
+ __metadata("design:type", Number)
41
+ ], McpCallLogMentity.prototype, "user_id", void 0);
42
+ __decorate([
43
+ (0, typeorm_1.Column)(),
44
+ __metadata("design:type", Number)
45
+ ], McpCallLogMentity.prototype, "business_id", void 0);
46
+ __decorate([
47
+ (0, typeorm_1.Column)(),
48
+ __metadata("design:type", String)
49
+ ], McpCallLogMentity.prototype, "client_id", void 0);
50
+ __decorate([
51
+ (0, typeorm_1.Column)(),
52
+ __metadata("design:type", String)
53
+ ], McpCallLogMentity.prototype, "kind", void 0);
54
+ __decorate([
55
+ (0, typeorm_1.Column)('json'),
56
+ __metadata("design:type", Object)
57
+ ], McpCallLogMentity.prototype, "request", void 0);
58
+ __decorate([
59
+ (0, typeorm_1.Column)('json'),
60
+ __metadata("design:type", Object)
61
+ ], McpCallLogMentity.prototype, "response", void 0);
62
+ __decorate([
63
+ (0, typeorm_1.Column)('json'),
64
+ __metadata("design:type", Object)
65
+ ], McpCallLogMentity.prototype, "timing_ms", void 0);
66
+ __decorate([
67
+ (0, typeorm_1.Column)('json'),
68
+ __metadata("design:type", Object)
69
+ ], McpCallLogMentity.prototype, "cost", void 0);
70
+ __decorate([
71
+ (0, typeorm_1.Column)(),
72
+ (0, typeorm_1.Index)(),
73
+ __metadata("design:type", Date)
74
+ ], McpCallLogMentity.prototype, "expire_at", void 0);
75
+ exports.McpCallLogMentity = McpCallLogMentity = __decorate([
76
+ (0, typeorm_1.Entity)('mcp_call_logs'),
77
+ (0, typeorm_1.Index)('mcp_call_logs_ttl', ['expire_at'])
78
+ ], McpCallLogMentity);
79
+ //# sourceMappingURL=mcp.call.log.mentity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp.call.log.mentity.js","sourceRoot":"","sources":["../../../src/mcp/mentities/mcp.call.log.mentity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oFAA2E;AAC3E,qCAAgD;AAQzC,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,2CAAiB;CA2CvD,CAAA;AA3CY,8CAAiB;AAE1B;IADC,IAAA,gBAAM,GAAE;;kDACO;AAGhB;IADC,IAAA,gBAAM,GAAE;;sDACW;AAGpB;IADC,IAAA,gBAAM,GAAE;;iDACM;AAGf;IADC,IAAA,gBAAM,GAAE;;+CACI;AAGb;IADC,IAAA,gBAAM,GAAE;;+CACI;AAGb;IADC,IAAA,gBAAM,GAAE;;kDACO;AAGhB;IADC,IAAA,gBAAM,GAAE;;sDACW;AAGpB;IADC,IAAA,gBAAM,GAAE;;oDACS;AAGlB;IADC,IAAA,gBAAM,GAAE;;+CACI;AAGb;IADC,IAAA,gBAAM,EAAC,MAAM,CAAC;;kDACF;AAGb;IADC,IAAA,gBAAM,EAAC,MAAM,CAAC;;mDACD;AAGd;IADC,IAAA,gBAAM,EAAC,MAAM,CAAC;;oDACA;AAGf;IADC,IAAA,gBAAM,EAAC,MAAM,CAAC;;+CACL;AAIV;IAFC,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,GAAE;8BACG,IAAI;oDAAC;4BA1CP,iBAAiB;IAF7B,IAAA,gBAAM,EAAC,eAAe,CAAC;IACvB,IAAA,eAAK,EAAC,mBAAmB,EAAE,CAAC,WAAW,CAAC,CAAC;GAC7B,iBAAiB,CA2C7B"}
@@ -10,4 +10,7 @@ export * from './reports.list.tool';
10
10
  export * from './reports.run.tool';
11
11
  export * from './save.listing.preference.tool';
12
12
  export * from './tool.registry';
13
+ export * from './view.describe.tool';
14
+ export * from './view.query.tool';
15
+ export * from './views.list.tool';
13
16
  export * from './whoami.tool';
@@ -26,5 +26,8 @@ __exportStar(require("./reports.list.tool"), exports);
26
26
  __exportStar(require("./reports.run.tool"), exports);
27
27
  __exportStar(require("./save.listing.preference.tool"), exports);
28
28
  __exportStar(require("./tool.registry"), exports);
29
+ __exportStar(require("./view.describe.tool"), exports);
30
+ __exportStar(require("./view.query.tool"), exports);
31
+ __exportStar(require("./views.list.tool"), exports);
29
32
  __exportStar(require("./whoami.tool"), exports);
30
33
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mcp/tools/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AAAA,qDAAmC;AAAA,kDAAgC;AAAA,mEAAiD;AAAA,0DAAwC;AAAA,uDAAqC;AAAA,uDAAqC;AAAA,6CAA2B;AAAA,sDAAoC;AAAA,qDAAmC;AAAA,iEAA+C;AAAA,kDAAgC;AAAA,gDAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mcp/tools/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AAAA,qDAAmC;AAAA,kDAAgC;AAAA,mEAAiD;AAAA,0DAAwC;AAAA,uDAAqC;AAAA,uDAAqC;AAAA,6CAA2B;AAAA,sDAAoC;AAAA,qDAAmC;AAAA,iEAA+C;AAAA,kDAAgC;AAAA,uDAAqC;AAAA,oDAAkC;AAAA,oDAAkC;AAAA,gDAA6B"}
@@ -1 +1 @@
1
- {"version":3,"file":"reports.run.tool.js","sourceRoot":"","sources":["../../../src/mcp/tools/reports.run.tool.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,yCAAqC;AAErC,MAAM,WAAW,GAAG;IAChB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,iEAAiE,CAAC;IAC5G,IAAI,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uEAAuE,CAAC;IACpI,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;IACnF,QAAQ,EAAE,OAAC,CAAC,MAAM,E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,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;IACnF,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC;IAC/E,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gEAAgE,CAAC;CACjH,CAAC;AAUF,MAAa,cAAe,SAAQ,kBAAwB;IAA5D;;QACa,SAAI,GAAG,aAAa,CAAC;QACrB,UAAK,GAAG,YAAY,CAAC;QACrB,gBAAW,GAChB,uLAAuL,CAAC;QACnL,gBAAW,GAAG,WAAW,CAAC;QAChB,aAAQ,GAAG,IAAI,CAAC;QAC1B,mBAAc,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAMjD,CAAC;IAJG,OAAO,CAAC,IAAqB;QACzB,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;QAC/B,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,kBAAkB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC/H,CAAC;CACJ;AAbD,wCAaC"}
@@ -1,33 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ToolRegistry = void 0;
4
- const ap_tool_registry_1 = require("./ap.tool.registry");
5
- const ar_tool_registry_1 = require("./ar.tool.registry");
6
- const delete_listing_preference_tool_1 = require("./delete.listing.preference.tool");
7
- const listing_describe_tool_1 = require("./listing.describe.tool");
8
- const listing_query_tool_1 = require("./listing.query.tool");
9
- const listings_list_tool_1 = require("./listings.list.tool");
10
- const reports_list_tool_1 = require("./reports.list.tool");
11
- const reports_run_tool_1 = require("./reports.run.tool");
12
- const save_listing_preference_tool_1 = require("./save.listing.preference.tool");
13
4
  const whoami_tool_1 = require("./whoami.tool");
5
+ const view_describe_tool_1 = require("./view.describe.tool");
6
+ const view_query_tool_1 = require("./view.query.tool");
7
+ const views_list_tool_1 = require("./views.list.tool");
14
8
  class ToolRegistry {
15
9
  constructor(client) {
16
10
  this.client = client;
17
11
  }
18
12
  tools() {
19
- return [
20
- new whoami_tool_1.WhoamiTool(this.client),
21
- new reports_list_tool_1.ReportsListTool(this.client),
22
- new reports_run_tool_1.ReportsRunTool(this.client),
23
- new listings_list_tool_1.ListingsListTool(this.client),
24
- new listing_describe_tool_1.ListingDescribeTool(this.client),
25
- new listing_query_tool_1.ListingQueryTool(this.client),
26
- new save_listing_preference_tool_1.SaveListingPreferenceTool(this.client),
27
- new delete_listing_preference_tool_1.DeleteListingPreferenceTool(this.client),
28
- ...new ap_tool_registry_1.ApToolRegistry(this.client).tools(),
29
- ...new ar_tool_registry_1.ArToolRegistry(this.client).tools(),
30
- ];
13
+ return [new whoami_tool_1.WhoamiTool(this.client), new views_list_tool_1.ViewsListTool(this.client), new view_describe_tool_1.ViewDescribeTool(this.client), new view_query_tool_1.ViewQueryTool(this.client)];
31
14
  }
32
15
  }
33
16
  exports.ToolRegistry = ToolRegistry;
@@ -1 +1 @@
1
- {"version":3,"file":"tool.registry.js","sourceRoot":"","sources":["../../../src/mcp/tools/tool.registry.ts"],"names":[],"mappings":";;;AAEA,yDAAoD;AACpD,yDAAoD;AACpD,qFAA+E;AAC/E,mEAA8D;AAC9D,6DAAwD;AACxD,6DAAwD;AACxD,2DAAsD;AACtD,yDAAoD;AACpD,iFAA2E;AAC3E,+CAA2C;AAM3C,MAAa,YAAY;IACrB,YAA6B,MAAsB;QAAtB,WAAM,GAAN,MAAM,CAAgB;IAAG,CAAC;IAEvD,KAAK;QACD,OAAO;YACH,IAAI,wBAAU,CAAC,IAAI,CAAC,MAAM,CAAC;YAC3B,IAAI,mCAAe,CAAC,IAAI,CAAC,MAAM,CAAC;YAChC,IAAI,iCAAc,CAAC,IAAI,CAAC,MAAM,CAAC;YAC/B,IAAI,qCAAgB,CAAC,IAAI,CAAC,MAAM,CAAC;YACjC,IAAI,2CAAmB,CAAC,IAAI,CAAC,MAAM,CAAC;YACpC,IAAI,qCAAgB,CAAC,IAAI,CAAC,MAAM,CAAC;YACjC,IAAI,wDAAyB,CAAC,IAAI,CAAC,MAAM,CAAC;YAC1C,IAAI,4DAA2B,CAAC,IAAI,CAAC,MAAM,CAAC;YAC5C,GAAG,IAAI,iCAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE;YAC1C,GAAG,IAAI,iCAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE;SAC7C,CAAC;IACN,CAAC;CACJ;AAjBD,oCAiBC"}
1
+ {"version":3,"file":"tool.registry.js","sourceRoot":"","sources":["../../../src/mcp/tools/tool.registry.ts"],"names":[],"mappings":";;;AAEA,+CAA2C;AAC3C,6DAAwD;AACxD,uDAAkD;AAClD,uDAAkD;AAOlD,MAAa,YAAY;IACrB,YAA6B,MAAsB;QAAtB,WAAM,GAAN,MAAM,CAAgB;IAAG,CAAC;IAEvD,KAAK;QACD,OAAO,CAAC,IAAI,wBAAU,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,+BAAa,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,qCAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,+BAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAC5I,CAAC;CACJ;AAND,oCAMC"}
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod';
2
+ import { McpToolResultInterface } from '../interfaces/mcp.tool.result.interface';
3
+ import { McpTool } from './mcp.tool';
4
+ type ViewDescribeInput = {
5
+ name: string;
6
+ };
7
+ export declare class ViewDescribeTool extends McpTool<ViewDescribeInput> {
8
+ readonly name = "view_describe";
9
+ readonly title = "Describe analytical view";
10
+ readonly description = "Full semantic schema of one analytical view: every column with its meaning (in Finnoto vocabulary), type, enum value labels, supported ops, the closed DSL grammar block (read it \u2014 do not guess operators), worked example_queries, and suggested visualizations. Call views_list first, then view_describe before writing a view_query. Column descriptions resolve domain traps; refreshed_at is freshness.";
11
+ readonly inputSchema: {
12
+ name: z.ZodString;
13
+ };
14
+ protected readonly readOnly = true;
15
+ execute(args: ViewDescribeInput): Promise<McpToolResultInterface>;
16
+ }
17
+ export {};
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ViewDescribeTool = void 0;
4
+ const zod_1 = require("zod");
5
+ const mcp_tool_1 = require("./mcp.tool");
6
+ const inputSchema = {
7
+ name: zod_1.z.string().min(2).max(40).describe('View name from views_list, e.g. "expenses".'),
8
+ };
9
+ class ViewDescribeTool extends mcp_tool_1.McpTool {
10
+ constructor() {
11
+ super(...arguments);
12
+ this.name = 'view_describe';
13
+ this.title = 'Describe analytical view';
14
+ this.description = 'Full semantic schema of one analytical view: every column with its meaning (in Finnoto vocabulary), type, enum value labels, supported ops, the closed DSL grammar block (read it — do not guess operators), worked example_queries, and suggested visualizations. Call views_list first, then view_describe before writing a view_query. Column descriptions resolve domain traps; refreshed_at is freshness.';
15
+ this.inputSchema = inputSchema;
16
+ this.readOnly = true;
17
+ }
18
+ execute(args) {
19
+ return this.run(() => this.client.request({ method: 'GET', path: `v1/b/report-views/${encodeURIComponent(args.name)}` }));
20
+ }
21
+ }
22
+ exports.ViewDescribeTool = ViewDescribeTool;
23
+ //# sourceMappingURL=view.describe.tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"view.describe.tool.js","sourceRoot":"","sources":["../../../src/mcp/tools/view.describe.tool.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,yCAAqC;AAErC,MAAM,WAAW,GAAG;IAChB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,6CAA6C,CAAC;CAC1F,CAAC;AAOF,MAAa,gBAAiB,SAAQ,kBAA0B;IAAhE;;QACa,SAAI,GAAG,eAAe,CAAC;QACvB,UAAK,GAAG,0BAA0B,CAAC;QACnC,gBAAW,GAChB,gZAAgZ,CAAC;QAC5Y,gBAAW,GAAG,WAAW,CAAC;QAChB,aAAQ,GAAG,IAAI,CAAC;IAKvC,CAAC;IAHG,OAAO,CAAC,IAAuB;QAC3B,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,qBAAqB,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAC9H,CAAC;CACJ;AAXD,4CAWC"}
@@ -0,0 +1,75 @@
1
+ import { z } from 'zod';
2
+ import { McpToolResultInterface } from '../interfaces/mcp.tool.result.interface';
3
+ import { McpTool } from './mcp.tool';
4
+ type ViewQueryInput = {
5
+ name: string;
6
+ columns?: string[];
7
+ filters?: Array<{
8
+ column: string;
9
+ op: string;
10
+ value?: unknown;
11
+ }>;
12
+ group_by?: Array<{
13
+ column: string;
14
+ bucket?: string;
15
+ }>;
16
+ aggregates?: Array<{
17
+ fn: string;
18
+ column?: string;
19
+ as?: string;
20
+ }>;
21
+ sort?: Array<{
22
+ by: string;
23
+ dir?: string;
24
+ }>;
25
+ limit?: number;
26
+ offset?: number;
27
+ };
28
+ export declare class ViewQueryTool extends McpTool<ViewQueryInput> {
29
+ readonly name = "view_query";
30
+ readonly title = "Query analytical view";
31
+ readonly description = "Run a structured analytical query against a view: filters, group-by (including month/quarter date buckets), and aggregates (sum, count, avg, min, max). Call views_list then view_describe (read the grammar block and example_queries) before querying. Use contains (bare string, not LIKE). Relative dates: @today / @today-30d \u2014 do not compute today yourself. Enum filters accept labels. Results include format hints and refreshed_at. Not for fetching individual records \u2014 use listing tools for that.";
32
+ readonly inputSchema: {
33
+ name: z.ZodString;
34
+ columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
35
+ filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
36
+ column: z.ZodString;
37
+ op: z.ZodString;
38
+ value: z.ZodOptional<z.ZodUnknown>;
39
+ }, z.core.$strip>>>;
40
+ group_by: z.ZodOptional<z.ZodArray<z.ZodObject<{
41
+ column: z.ZodString;
42
+ bucket: z.ZodOptional<z.ZodEnum<{
43
+ year: "year";
44
+ week: "week";
45
+ day: "day";
46
+ month: "month";
47
+ quarter: "quarter";
48
+ }>>;
49
+ }, z.core.$strip>>>;
50
+ aggregates: z.ZodOptional<z.ZodArray<z.ZodObject<{
51
+ fn: z.ZodEnum<{
52
+ count: "count";
53
+ max: "max";
54
+ min: "min";
55
+ sum: "sum";
56
+ avg: "avg";
57
+ count_distinct: "count_distinct";
58
+ }>;
59
+ column: z.ZodOptional<z.ZodString>;
60
+ as: z.ZodOptional<z.ZodString>;
61
+ }, z.core.$strip>>>;
62
+ sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
63
+ by: z.ZodString;
64
+ dir: z.ZodOptional<z.ZodEnum<{
65
+ asc: "asc";
66
+ desc: "desc";
67
+ }>>;
68
+ }, z.core.$strip>>>;
69
+ limit: z.ZodOptional<z.ZodNumber>;
70
+ offset: z.ZodOptional<z.ZodNumber>;
71
+ };
72
+ protected readonly readOnly = true;
73
+ execute(args: ViewQueryInput): Promise<McpToolResultInterface>;
74
+ }
75
+ export {};
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ViewQueryTool = void 0;
4
+ const zod_1 = require("zod");
5
+ const mcp_tool_1 = require("./mcp.tool");
6
+ const filterSchema = zod_1.z.object({
7
+ column: zod_1.z.string(),
8
+ op: zod_1.z
9
+ .string()
10
+ .describe('Closed grammar: eq, neq, in, not_in, gt, gte, lt, lte, between, contains, is_null, not_null. Date values may be @today or @today-30d.'),
11
+ value: zod_1.z.unknown().optional(),
12
+ });
13
+ const inputSchema = {
14
+ name: zod_1.z.string().min(2).max(40).describe('View name from views_list / view_describe.'),
15
+ columns: zod_1.z.array(zod_1.z.string()).optional().describe('Columns to return in listing mode. Omit when aggregating.'),
16
+ filters: zod_1.z.array(filterSchema).optional(),
17
+ group_by: zod_1.z
18
+ .array(zod_1.z.object({ column: zod_1.z.string(), bucket: zod_1.z.enum(['day', 'week', 'month', 'quarter', 'year']).optional() }))
19
+ .optional()
20
+ .describe('At most 3. bucket only on bucketable date columns.'),
21
+ aggregates: zod_1.z
22
+ .array(zod_1.z.object({
23
+ fn: zod_1.z.enum(['count', 'count_distinct', 'sum', 'avg', 'min', 'max']),
24
+ column: zod_1.z.string().optional(),
25
+ as: zod_1.z.string().optional(),
26
+ }))
27
+ .optional(),
28
+ sort: zod_1.z.array(zod_1.z.object({ by: zod_1.z.string(), dir: zod_1.z.enum(['asc', 'desc']).optional() })).optional(),
29
+ limit: zod_1.z.number().int().min(1).max(500).optional(),
30
+ offset: zod_1.z.number().int().min(0).max(10000).optional(),
31
+ };
32
+ class ViewQueryTool extends mcp_tool_1.McpTool {
33
+ constructor() {
34
+ super(...arguments);
35
+ this.name = 'view_query';
36
+ this.title = 'Query analytical view';
37
+ this.description = 'Run a structured analytical query against a view: filters, group-by (including month/quarter date buckets), and aggregates (sum, count, avg, min, max). Call views_list then view_describe (read the grammar block and example_queries) before querying. Use contains (bare string, not LIKE). Relative dates: @today / @today-30d — do not compute today yourself. Enum filters accept labels. Results include format hints and refreshed_at. Not for fetching individual records — use listing tools for that.';
38
+ this.inputSchema = inputSchema;
39
+ this.readOnly = true;
40
+ }
41
+ execute(args) {
42
+ const { name, ...body } = args;
43
+ return this.run(() => this.client.request({
44
+ method: 'POST',
45
+ path: `v1/b/report-views/${encodeURIComponent(name)}/query`,
46
+ body,
47
+ }));
48
+ }
49
+ }
50
+ exports.ViewQueryTool = ViewQueryTool;
51
+ //# sourceMappingURL=view.query.tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"view.query.tool.js","sourceRoot":"","sources":["../../../src/mcp/tools/view.query.tool.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,yCAAqC;AAErC,MAAM,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1B,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,EAAE,EAAE,OAAC;SACA,MAAM,EAAE;SACR,QAAQ,CACL,uIAAuI,CAC1I;IACL,KAAK,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAC;AAEH,MAAM,WAAW,GAAG;IAChB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,4CAA4C,CAAC;IACtF,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2DAA2D,CAAC;IAC7G,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,QAAQ,EAAE;IACzC,QAAQ,EAAE,OAAC;SACN,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;SAC/G,QAAQ,EAAE;SACV,QAAQ,CAAC,oDAAoD,CAAC;IACnE,UAAU,EAAE,OAAC;SACR,KAAK,CACF,OAAC,CAAC,MAAM,CAAC;QACL,EAAE,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,gBAAgB,EAAE,KAAK,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AAI;SACP,CAAC,CACL,CAAC;IACN,CAAC;CACJ;AAlBD,sCAkBC"}
@@ -0,0 +1,10 @@
1
+ import { McpToolResultInterface } from '../interfaces/mcp.tool.result.interface';
2
+ import { McpTool } from './mcp.tool';
3
+ export declare class ViewsListTool extends McpTool<Record<string, never>> {
4
+ readonly name = "views_list";
5
+ readonly title = "List analytical views";
6
+ readonly description = "Discover the analytical views available for answering aggregate and analytical questions about your business \u2014 expenses, purchase orders, and related domains. Returns each view's name, title, what it answers, and its data grain. This is the reporting layer: prefer it over listing tools whenever the question involves totals, breakdowns, comparisons, or trends. Follow with view_describe, then view_query.";
7
+ readonly inputSchema: {};
8
+ protected readonly readOnly = true;
9
+ execute(): Promise<McpToolResultInterface>;
10
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ViewsListTool = void 0;
4
+ const mcp_tool_1 = require("./mcp.tool");
5
+ const inputSchema = {};
6
+ class ViewsListTool extends mcp_tool_1.McpTool {
7
+ constructor() {
8
+ super(...arguments);
9
+ this.name = 'views_list';
10
+ this.title = 'List analytical views';
11
+ this.description = "Discover the analytical views available for answering aggregate and analytical questions about your business — expenses, purchase orders, and related domains. Returns each view's name, title, what it answers, and its data grain. This is the reporting layer: prefer it over listing tools whenever the question involves totals, breakdowns, comparisons, or trends. Follow with view_describe, then view_query.";
12
+ this.inputSchema = inputSchema;
13
+ this.readOnly = true;
14
+ }
15
+ execute() {
16
+ return this.run(() => this.client.request({ method: 'GET', path: 'v1/b/report-views' }));
17
+ }
18
+ }
19
+ exports.ViewsListTool = ViewsListTool;
20
+ //# sourceMappingURL=views.list.tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"views.list.tool.js","sourceRoot":"","sources":["../../../src/mcp/tools/views.list.tool.ts"],"names":[],"mappings":";;;AACA,yCAAqC;AAErC,MAAM,WAAW,GAAG,EAAE,CAAC;AAKvB,MAAa,aAAc,SAAQ,kBAA8B;IAAjE;;QACa,SAAI,GAAG,YAAY,CAAC;QACpB,UAAK,GAAG,uBAAuB,CAAC;QAChC,gBAAW,GAChB,uZAAuZ,CAAC;QACnZ,gBAAW,GAAG,WAAW,CAAC;QAChB,aAAQ,GAAG,IAAI,CAAC;IAKvC,CAAC;IAHG,OAAO;QACH,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,mBAAmB,EAAE,CAAC,CAAC,CAAC;IAC7F,CAAC;CACJ;AAXD,sCAWC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servicelabsco/slabs-access-manager",
3
- "version": "1.0.68",
3
+ "version": "1.0.69",
4
4
  "description": "Support for application level menus and dashboards",
5
5
  "author": "Hemant Kumar Sah <hemantanshu@gmail.com>",
6
6
  "license": "MIT",
@@ -49,7 +49,7 @@
49
49
  "csv-parser": "^3.0.0",
50
50
  "date-fns": "^4.1.0",
51
51
  "exceljs": "^4.4.0",
52
- "express-http-context": "^2.0.1",
52
+ "express-http-context2": "^1.0.0",
53
53
  "google-auth-library": "^10.6.1",
54
54
  "googleapis": "^171.4.0",
55
55
  "nestjs-command": "^3.1.5",
@@ -1 +0,0 @@
1
- {"version":3,"file":"bulk.upload.item.record.js","sourceRoot":"","sources":["../../../src/accessUtility/types/bulk.upload.item.record.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- export * from './bulk.upload.item.record';