diff --git a/forge/ee/lib/index.js b/forge/ee/lib/index.js index dff8995d87..e1a3e9241b 100644 --- a/forge/ee/lib/index.js +++ b/forge/ee/lib/index.js @@ -1,66 +1,95 @@ const fp = require('fastify-plugin') +// common features across all higher tier (enterpise, hub, edge, fleet) +async function commonFeatures (app, opts) { + app.decorate('sso', await require('./sso').init(app)) + await require('./teamBroker').init(app) + // Set the MFA Feature Flag + app.config.features.register('mfa', true, true) + // Set the Project History timeline Feature Flag + app.config.features.register('projectHistory', true, true) + // Set the Bill of Materials Feature Flag + app.config.features.register('bom', true, true) + if (app.config.npmRegistry?.enabled) { + // Set npm Feature Flag + app.config.features.register('npm', true, true) + } + if (app.config.tables?.enabled) { + app.decorate('tables', await require('./tables').init(app)) + } + app.config.features.register('certifiedNodes', true, true) + app.config.features.register('ffNodes', true, true) + // Application level RBAC + app.config.features.register('rbacApplication', true, true) + require('./autoUpdateStacks').init(app) + + // Expert + await app.register(require('./expert')) + + // Set the AI Features Flag (global gate for all AI features) + const isAiEnabled = !!(app.config?.ai?.enabled ?? true) + app.config.features.register('ai', isAiEnabled, true) + + // Set the Generate Snapshot Description Feature Flag + const isAssistantConfigured = isAiEnabled && app.config.assistant?.enabled === true && !!app.config.assistant?.service?.url + app.config.features.register('generatedSnapshotDescription', isAssistantConfigured, true) + + // Set the assistant inline completions Feature Flag + app.config.features.register('assistantInlineCompletions', isAssistantConfigured, true) + + // Set the expert platform automation Feature Flag (MCP platform tools server) + app.config.features.register('expertPlatformAutomation', isAiEnabled && (app.config?.expert?.enabled ?? false), true) + + // Set the expert assistant Feature Flag + app.config.features.register('expertAssistant', isAiEnabled && (app.config?.expert?.enabled ?? false), true) + + // Set the Expert Insights flag + const isInsightsEnabled = isAiEnabled && + !!app.config?.expert?.enabled && + (Object.prototype.hasOwnProperty.call(app.config?.expert ?? {}, 'insights') ? !!app.config?.expert?.insights?.enabled : true) + + app.config.features.register('expertInsights', isInsightsEnabled ?? false, true) +} + module.exports = fp(async function (app, opts) { if (app.config.billing) { app.decorate('billing', await require('./billing').init(app)) } + // common features for all license levels (inc Pro) require('./projectComms').init(app) require('./deviceEditor').init(app) require('./alerts').init(app) if (app.license.get('tier') === 'enterprise') { + await commonFeatures(app, opts) + // HA require('./ha').init(app) + // Protected Instances require('./protectedInstance').init(app) + // Git Opps + app.decorate('gitops', await require('./gitops').init(app)) require('./customHostnames').init(app) - app.decorate('sso', await require('./sso').init(app)) - await require('./teamBroker').init(app) + + // Set the Device Groups Feature Flag + app.config.features.register('deviceGroups', true, true) + } else if (app.license.get('tier') === 'hub') { + await commonFeatures(app, opts) + // HA + require('./ha').init(app) + // Protected Instances + require('./protectedInstance').init(app) + // Git Opps app.decorate('gitops', await require('./gitops').init(app)) - // Set the MFA Feature Flag - app.config.features.register('mfa', true, true) + } else if (app.license.get('tier') === 'edge') { + await commonFeatures(app, opts) + // Set the Device Groups Feature Flag + app.config.features.register('deviceGroups', true, true) + } else if (app.license.get('tier') === 'fleet') { + await commonFeatures(app, opts) // Set the Device Groups Feature Flag app.config.features.register('deviceGroups', true, true) - // Set the Project History timeline Feature Flag - app.config.features.register('projectHistory', true, true) - // Set the Bill of Materials Feature Flag - app.config.features.register('bom', true, true) - if (app.config.npmRegistry?.enabled) { - // Set npm Feature Flag - app.config.features.register('npm', true, true) - } - if (app.config.tables?.enabled) { - app.decorate('tables', await require('./tables').init(app)) - } - app.config.features.register('certifiedNodes', true, true) - app.config.features.register('ffNodes', true, true) - app.config.features.register('rbacApplication', true, true) - require('./autoUpdateStacks').init(app) - - // Expert - await app.register(require('./expert')) - - // Set the AI Features Flag (global gate for all AI features) - const isAiEnabled = !!(app.config?.ai?.enabled ?? true) - app.config.features.register('ai', isAiEnabled, true) - - // Set the Generate Snapshot Description Feature Flag - const isAssistantConfigured = isAiEnabled && app.config.assistant?.enabled === true && !!app.config.assistant?.service?.url - app.config.features.register('generatedSnapshotDescription', isAssistantConfigured, true) - - // Set the assistant inline completions Feature Flag - app.config.features.register('assistantInlineCompletions', isAssistantConfigured, true) - - // Set the expert platform automation Feature Flag (MCP platform tools server) - app.config.features.register('expertPlatformAutomation', isAiEnabled && (app.config?.expert?.enabled ?? false), true) - - // Set the expert assistant Feature Flag - app.config.features.register('expertAssistant', isAiEnabled && (app.config?.expert?.enabled ?? false), true) - - // Set the Expert Insights flag - const isInsightsEnabled = isAiEnabled && - !!app.config?.expert?.enabled && - (Object.prototype.hasOwnProperty.call(app.config?.expert ?? {}, 'insights') ? !!app.config?.expert?.insights?.enabled : true) - - app.config.features.register('expertInsights', isInsightsEnabled ?? false, true) + } else { + // old "Pro" license } // Set the Team Library Feature Flag diff --git a/forge/ee/routes/index.js b/forge/ee/routes/index.js index 14ef4c5b03..59d39840ee 100644 --- a/forge/ee/routes/index.js +++ b/forge/ee/routes/index.js @@ -4,11 +4,35 @@ * @namespace api * @memberof forge.ee */ + +// common features across all higher tier (enterpise, hub, edge, fleet) +async function commonFeatures (app) { + await app.register(require('./expert'), { prefix: '/api/v1/expert', logLevel: app.config.logging.http }) + await app.register(require('./mcp'), { logLevel: app.config.logging.http }) + await app.register(require('./teamBroker'), { prefix: '/api/v1/teams/:teamId/broker', logLevel: app.config.logging.http }) + await app.register(require('./teamBroker/3rdPartyBroker'), { prefix: '/api/v1/teams/:teamId/brokers', logLevel: app.config.logging.http }) + if (app.config.npmRegistry?.enabled) { + await app.register(require('./catalogues'), { prefix: '/api/v1/teams/:teamId', logLevel: app.config.logging.http }) + } + await app.register(require('./mfa'), { prefix: '/api/v1', logLevel: app.config.logging.http }) + if (app.config.tables?.enabled) { + await app.register(require('./tables'), { prefix: '/api/v1/teams/:teamId/databases', logLevel: app.config.logging.http }) + } + await app.register(require('./resource'), { prefix: '/api/v1/projects/:instanceId/resources', logLevel: app.config.logging.http }) + await app.register(require('./autoUpdateStacks'), { prefix: '/api/v1/projects/:projectId/autoUpdateStack', logLevel: app.config.logging.http }) + await app.register(require('./httpTokens'), { prefix: '/api/v1', logLevel: app.config.logging.http }) + await app.register(require('./customHostnames'), { prefix: '/api/v1/projects/:projectId/customHostname', logLevel: app.config.logging.http }) + await app.register(require('./staticAssets'), { prefix: '/api/v1/projects/:projectId/files', logLevel: app.config.logging.http }) + await app.register(require('./projectHistory'), { prefix: '/api/v1/projects/:instanceId/history', logLevel: app.config.logging.http }) + await app.register(require('./deviceHistory'), { prefix: '/api/v1/devices/:deviceId/history', logLevel: app.config.logging.http }) +} + module.exports = async function (app) { app.addHook('preHandler', app.verifySession) if (app.config.billing) { await app.register(require('./billing'), { prefix: '/ee/billing', logLevel: app.config.logging.http }) } + // Features provied to any license level (inc pro) await app.register(require('./sharedLibrary'), { logLevel: app.config.logging.http }) await app.register(require('./pipeline'), { prefix: '/api/v1', logLevel: app.config.logging.http }) await app.register(require('./pipeline/teamPipelines.js'), { prefix: '/api/v1/teams/:teamId/pipelines', logLevel: app.config.logging.http }) @@ -18,31 +42,41 @@ module.exports = async function (app) { await app.register(require('./flowBlueprints'), { prefix: '/api/v1/flow-blueprints', logLevel: app.config.logging.http }) + let enableSSO = false + if (app.license.get('tier') === 'enterprise') { + await commonFeatures(app) await app.register(require('./applicationDeviceGroups'), { prefix: '/api/v1/applications/:applicationId/device-groups', logLevel: app.config.logging.http }) await app.register(require('./teamDeviceGroups'), { prefix: '/api/v1/teams/:teamId/device-groups', logLevel: app.config.logging.http }) await app.register(require('./ha'), { prefix: '/api/v1/projects/:projectId/ha', logLevel: app.config.logging.http }) await app.register(require('./protectedInstance'), { prefix: '/api/v1/projects/:projectId/protectInstance', logLevel: app.config.logging.http }) - await app.register(require('./mfa'), { prefix: '/api/v1', logLevel: app.config.logging.http }) - await app.register(require('./httpTokens'), { prefix: '/api/v1', logLevel: app.config.logging.http }) - await app.register(require('./customHostnames'), { prefix: '/api/v1/projects/:projectId/customHostname', logLevel: app.config.logging.http }) - await app.register(require('./staticAssets'), { prefix: '/api/v1/projects/:projectId/files', logLevel: app.config.logging.http }) - await app.register(require('./projectHistory'), { prefix: '/api/v1/projects/:instanceId/history', logLevel: app.config.logging.http }) - await app.register(require('./deviceHistory'), { prefix: '/api/v1/devices/:deviceId/history', logLevel: app.config.logging.http }) - await app.register(require('./teamBroker'), { prefix: '/api/v1/teams/:teamId/broker', logLevel: app.config.logging.http }) - await app.register(require('./teamBroker/3rdPartyBroker'), { prefix: '/api/v1/teams/:teamId/brokers', logLevel: app.config.logging.http }) - if (app.config.npmRegistry?.enabled) { - await app.register(require('./catalogues'), { prefix: '/api/v1/teams/:teamId', logLevel: app.config.logging.http }) - } await app.register(require('./gitops'), { prefix: '/api/v1/teams/:teamId/git', logLevel: app.config.logging.http }) - await app.register(require('./resource'), { prefix: '/api/v1/projects/:instanceId/resources', logLevel: app.config.logging.http }) - if (app.config.tables?.enabled) { - await app.register(require('./tables'), { prefix: '/api/v1/teams/:teamId/databases', logLevel: app.config.logging.http }) - } - await app.register(require('./mcp'), { logLevel: app.config.logging.http }) - await app.register(require('./autoUpdateStacks'), { prefix: '/api/v1/projects/:projectId/autoUpdateStack', logLevel: app.config.logging.http }) - await app.register(require('./expert'), { prefix: '/api/v1/expert', logLevel: app.config.logging.http }) + enableSSO = true + } else if (app.license.get('tier') === 'hub') { + await commonFeatures(app) + await app.register(require('./gitops'), { prefix: '/api/v1/teams/:teamId/git', logLevel: app.config.logging.http }) + await app.register(require('./ha'), { prefix: '/api/v1/projects/:projectId/ha', logLevel: app.config.logging.http }) + await app.register(require('./protectedInstance'), { prefix: '/api/v1/projects/:projectId/protectInstance', logLevel: app.config.logging.http }) + + enableSSO = true + } else if (app.license.get('tier') === 'edge') { + await commonFeatures(app) + await app.register(require('./applicationDeviceGroups'), { prefix: '/api/v1/applications/:applicationId/device-groups', logLevel: app.config.logging.http }) + await app.register(require('./teamDeviceGroups'), { prefix: '/api/v1/teams/:teamId/device-groups', logLevel: app.config.logging.http }) + + enableSSO = true + } else if (app.license.get('tier') === 'fleet') { + await commonFeatures(app) + await app.register(require('./applicationDeviceGroups'), { prefix: '/api/v1/applications/:applicationId/device-groups', logLevel: app.config.logging.http }) + await app.register(require('./teamDeviceGroups'), { prefix: '/api/v1/teams/:teamId/device-groups', logLevel: app.config.logging.http }) + + enableSSO = true + } else { + // old Pro license + } + + if (enableSSO) { // Important: keep SSO last to avoid its error handling polluting other routes. await app.register(require('./sso'), { logLevel: app.config.logging.http }) } diff --git a/forge/licensing/license-generator.js b/forge/licensing/license-generator.js index fdd69dd655..904b7dd67e 100644 --- a/forge/licensing/license-generator.js +++ b/forge/licensing/license-generator.js @@ -54,7 +54,7 @@ const { v4: uuidv4 } = require('uuid') replace: '*' }) - const licenseTier = await promptly.choose('License tier (teams*, enterprise): ', ['teams', 'enterprise'], { default: 'teams', trim: true }) + const licenseTier = await promptly.choose('License tier (teams, enterprise, hub*, edge, fleet): ', ['teams', 'enterprise', 'hub', 'edge', 'fleet'], { default: 'hub', trim: true }) const licenseHolder = await promptly.prompt('License holder name: ') diff --git a/frontend/src/types/generated.ts b/frontend/src/types/generated.ts index b69f03e60b..a63dbffabe 100644 --- a/frontend/src/types/generated.ts +++ b/frontend/src/types/generated.ts @@ -8041,28 +8041,19 @@ export interface paths { patch?: never; trace?: never; }; - "/api/v1/applications/{applicationId}/device-groups/": { + "/api/v1/teams/{teamId}/mcp/": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** Get a list of device groups in an application */ get: { parameters: { - query?: { - query?: string; - cursor?: string; - limit?: number; - page?: number; - sort?: string; - dir?: "asc" | "desc"; - order?: "asc" | "desc"; - }; + query?: never; header?: never; path: { - applicationId: string; + teamId: string; }; cookie?: never; }; @@ -8075,14 +8066,13 @@ export interface paths { }; content: { "application/json": { - meta?: components["schemas"]["PaginationMeta"]; count?: number; - groups?: components["schemas"]["DeviceGroupSummary"][]; + servers?: components["schemas"]["MCPRegistrationSummaryList"]; }; }; }; /** @description Default Response */ - "4XX": { + 500: { headers: { [name: string]: unknown; }; @@ -8090,37 +8080,6 @@ export interface paths { "application/json": components["schemas"]["APIError"]; }; }; - }; - }; - put?: never; - /** Add a new Device Group to an Application */ - post: { - parameters: { - query?: never; - header?: never; - path: { - applicationId: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - name: string; - description?: string; - }; - }; - }; - responses: { - /** @description Default Response */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["DeviceGroupSummary"]; - }; - }; /** @description Default Response */ "4XX": { headers: { @@ -8132,60 +8091,32 @@ export interface paths { }; }; }; + put?: never; + post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; - "/api/v1/applications/{applicationId}/device-groups/{groupId}": { + "/api/v1/teams/{teamId}/mcp/{type}/{typeId}/{nodeId}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** Get a specific Device Group */ - get: { - parameters: { - query?: never; - header?: never; - path: { - applicationId: string; - groupId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["DeviceGroup"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - /** Update a Device Group */ - put: { + get?: never; + put?: never; + post: { parameters: { query?: never; header?: never; path: { - applicationId: string; - groupId: string; + teamId: string; + type: string; + typeId: string; + nodeId: string; }; cookie?: never; }; @@ -8193,8 +8124,11 @@ export interface paths { content: { "application/json": { name?: string; + endpointRoute?: string; + protocol?: string; + title?: string; + version?: string; description?: string; - targetSnapshotId?: string | null; }; }; }; @@ -8209,7 +8143,7 @@ export interface paths { }; }; /** @description Default Response */ - "4XX": { + 500: { headers: { [name: string]: unknown; }; @@ -8217,31 +8151,6 @@ export interface paths { "application/json": components["schemas"]["APIError"]; }; }; - }; - }; - post?: never; - /** Delete a Device Group */ - delete: { - parameters: { - query?: never; - header?: never; - path: { - applicationId: string; - groupId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": Record; - }; - }; /** @description Default Response */ "4XX": { headers: { @@ -8253,28 +8162,19 @@ export interface paths { }; }; }; - options?: never; - head?: never; - /** Update Device Group membership */ - patch: { + delete: { parameters: { query?: never; header?: never; path: { - applicationId: string; - groupId: string; + teamId: string; + type: string; + typeId: string; + nodeId: string; }; cookie?: never; }; - requestBody: { - content: { - "application/json": { - add?: string[]; - remove?: string[]; - set?: string[]; - }; - }; - }; + requestBody?: never; responses: { /** @description Default Response */ 200: { @@ -8286,58 +8186,7 @@ export interface paths { }; }; /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - trace?: never; - }; - "/api/v1/applications/{applicationId}/device-groups/{groupId}/settings": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Update a Device Group Settings */ - put: { - parameters: { - query?: never; - header?: never; - path: { - applicationId: string; - groupId: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - env?: { - [key: string]: unknown; - }[]; - }; - }; - }; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIStatus"]; - }; - }; - /** @description Default Response */ - "4XX": { + 500: { headers: { [name: string]: unknown; }; @@ -8345,171 +8194,14 @@ export interface paths { "application/json": components["schemas"]["APIError"]; }; }; - }; - }; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/teams/{teamId}/device-groups/": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get a list of device groups in an application */ - get: { - parameters: { - query?: { - query?: string; - cursor?: string; - limit?: number; - page?: number; - sort?: string; - dir?: "asc" | "desc"; - order?: "asc" | "desc"; - }; - header?: never; - path: { - applicationId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - meta?: components["schemas"]["PaginationMeta"]; - count?: number; - groups?: components["schemas"]["DeviceGroupSummary"][]; - }; - }; - }; /** @description Default Response */ "4XX": { headers: { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/projects/{projectId}/files/_/{path}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** List files stored in the instance */ - get: { - parameters: { - query?: never; - header?: never; - path: { - instanceId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - /** Update file properties in the instance */ - put: { - parameters: { - query?: never; - header?: never; - path: { - instanceId: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - path?: string; - share?: { - [key: string]: unknown; - }; - }; - }; - }; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - /** Upload a file to the instance/Create directory */ - post: { - parameters: { - query?: never; - header?: never; - path: { - instanceId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - /** Delete a file in the instance */ - delete: { - parameters: { - query?: never; - header?: never; - path: { - instanceId: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Default Response */ - 200: { - headers: { - [name: string]: unknown; + "application/json": components["schemas"]["APIError"]; }; - content?: never; }; }; }; @@ -9435,24 +9127,283 @@ export interface paths { patch?: never; trace?: never; }; - "/api/v1/projects/{instanceId}/resources/": { + "/api/v1/teams/{teamId}/databases/": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path: { + teamId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["DatabaseCredentials"][]; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + put?: never; + post: { + parameters: { + query?: never; + header?: never; + path: { + teamId: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the database */ + name?: string; + }; + }; + }; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["DatabaseCredentials"]; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/teams/{teamId}/databases/{databaseId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: { + parameters: { + query?: never; + header?: never; + path: { + databaseId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["DatabaseCredentials"]; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + put?: never; + post?: never; + delete: { + parameters: { + query?: never; + header?: never; + path: { + databaseId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/teams/{teamId}/databases/{databaseId}/tables": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** Returns resource usage history for an Instance */ - get: { + get: { + parameters: { + query?: { + query?: string; + cursor?: string; + limit?: number; + page?: number; + sort?: string; + dir?: "asc" | "desc"; + order?: "asc" | "desc"; + }; + header?: never; + path: { + databaseId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + count?: number; + tables?: { + name?: string; + schema?: string; + }[]; + meta?: { + [key: string]: unknown; + }; + }; + }; + }; + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + /** @description Default Response */ + "4XX": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIError"]; + }; + }; + }; + }; + put?: never; + post: { parameters: { query?: never; header?: never; path: { - instanceId: string; + databaseId: string; }; cookie?: never; }; - requestBody?: never; + requestBody: { + content: { + "application/json": { + name?: string; + columns?: components["schemas"]["DatabaseTable"]; + }; + }; + }; responses: { /** @description Default Response */ 200: { @@ -9460,18 +9411,7 @@ export interface paths { [name: string]: unknown; }; content: { - "application/json": { - meta?: components["schemas"]["PaginationMeta"]; - resources?: { - src?: string; - ps?: number; - cpu?: number; - hs?: number; - hu?: number; - ts?: number; - }[]; - count?: number; - }; + "application/json": components["schemas"]["DatabaseTable"]; }; }; /** @description Default Response */ @@ -9494,15 +9434,13 @@ export interface paths { }; }; }; - put?: never; - post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; - "/api/v1/teams/{teamId}/databases/": { + "/api/v1/teams/{teamId}/databases/{databaseId}/tables/{tableName}/{schemaName}?": { parameters: { query?: never; header?: never; @@ -9514,7 +9452,9 @@ export interface paths { query?: never; header?: never; path: { - teamId: string; + databaseId: string; + tableName: string; + schemaName: string; }; cookie?: never; }; @@ -9526,7 +9466,7 @@ export interface paths { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["DatabaseCredentials"][]; + "application/json": components["schemas"]["DatabaseTable"]; }; }; /** @description Default Response */ @@ -9550,23 +9490,19 @@ export interface paths { }; }; put?: never; - post: { + post?: never; + delete: { parameters: { query?: never; header?: never; path: { - teamId: string; + databaseId: string; + tableName: string; + schemaName: string; }; cookie?: never; }; - requestBody: { - content: { - "application/json": { - /** @description Name of the database */ - name?: string; - }; - }; - }; + requestBody?: never; responses: { /** @description Default Response */ 200: { @@ -9574,7 +9510,7 @@ export interface paths { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["DatabaseCredentials"]; + "application/json": components["schemas"]["DatabaseTable"]; }; }; /** @description Default Response */ @@ -9597,13 +9533,12 @@ export interface paths { }; }; }; - delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; - "/api/v1/teams/{teamId}/databases/{databaseId}": { + "/api/v1/teams/{teamId}/databases/{databaseId}/tables/{tableName}/data/{schemaName}?": { parameters: { query?: never; header?: never; @@ -9612,10 +9547,20 @@ export interface paths { }; get: { parameters: { - query?: never; + query?: { + query?: string; + cursor?: string; + limit?: number; + page?: number; + sort?: string; + dir?: "asc" | "desc"; + order?: "asc" | "desc"; + }; header?: never; path: { databaseId: string; + tableName: string; + schemaName: string; }; cookie?: never; }; @@ -9627,7 +9572,15 @@ export interface paths { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["DatabaseCredentials"]; + "application/json": { + count?: number; + rows?: { + [key: string]: unknown; + }[]; + meta?: { + [key: string]: unknown; + }; + }; }; }; /** @description Default Response */ @@ -9652,12 +9605,26 @@ export interface paths { }; put?: never; post?: never; - delete: { + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/projects/{instanceId}/resources/": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Returns resource usage history for an Instance */ + get: { parameters: { query?: never; header?: never; path: { - databaseId: string; + instanceId: string; }; cookie?: never; }; @@ -9669,7 +9636,18 @@ export interface paths { [name: string]: unknown; }; content: { - "application/json": unknown; + "application/json": { + meta?: components["schemas"]["PaginationMeta"]; + resources?: { + src?: string; + ps?: number; + cpu?: number; + hs?: number; + hu?: number; + ts?: number; + }[]; + count?: number; + }; }; }; /** @description Default Response */ @@ -9692,32 +9670,28 @@ export interface paths { }; }; }; + put?: never; + post?: never; + delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; - "/api/v1/teams/{teamId}/databases/{databaseId}/tables": { + "/api/v1/projects/{projectId}/autoUpdateStack/": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; + /** Returns when a Instance allowed to be restarted */ get: { parameters: { - query?: { - query?: string; - cursor?: string; - limit?: number; - page?: number; - sort?: string; - dir?: "asc" | "desc"; - order?: "asc" | "desc"; - }; + query?: never; header?: never; path: { - databaseId: string; + projectId: string; }; cookie?: never; }; @@ -9730,24 +9704,10 @@ export interface paths { }; content: { "application/json": { - count?: number; - tables?: { - name?: string; - schema?: string; - }[]; - meta?: { - [key: string]: unknown; - }; - }; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; + hour?: number; + day?: number; + restart?: boolean; + }[]; }; }; /** @description Default Response */ @@ -9761,21 +9721,24 @@ export interface paths { }; }; }; - put?: never; - post: { + /** Sets when an Instance can be restarted */ + put: { parameters: { query?: never; header?: never; path: { - databaseId: string; + projectId: string; }; cookie?: never; }; requestBody: { content: { "application/json": { - name?: string; - columns?: components["schemas"]["DatabaseTable"]; + schedule?: { + hour?: number; + day?: number; + restart?: boolean; + }[]; }; }; }; @@ -9786,11 +9749,15 @@ export interface paths { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["DatabaseTable"]; + "application/json": { + hour?: number; + day?: number; + restart?: boolean; + }[]; }; }; /** @description Default Response */ - 500: { + "4XX": { headers: { [name: string]: unknown; }; @@ -9798,6 +9765,30 @@ export interface paths { "application/json": components["schemas"]["APIError"]; }; }; + }; + }; + post?: never; + /** Clears when an Instance can be restarted */ + delete: { + parameters: { + query?: never; + header?: never; + path: { + projectId: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; /** @description Default Response */ "4XX": { headers: { @@ -9809,27 +9800,25 @@ export interface paths { }; }; }; - delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; - "/api/v1/teams/{teamId}/databases/{databaseId}/tables/{tableName}/{schemaName}?": { + "/api/v1/projects/{projectId}/files/_/{path}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; + /** List files stored in the instance */ get: { parameters: { query?: never; header?: never; path: { - databaseId: string; - tableName: string; - schemaName: string; + instanceId: string; }; cookie?: never; }; @@ -9840,40 +9829,68 @@ export interface paths { headers: { [name: string]: unknown; }; - content: { - "application/json": components["schemas"]["DatabaseTable"]; + content?: never; + }; + }; + }; + /** Update file properties in the instance */ + put: { + parameters: { + query?: never; + header?: never; + path: { + instanceId: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + path?: string; + share?: { + [key: string]: unknown; + }; }; }; + }; + responses: { /** @description Default Response */ - 500: { + 200: { headers: { [name: string]: unknown; }; - content: { - "application/json": components["schemas"]["APIError"]; - }; + content?: never; + }; + }; + }; + /** Upload a file to the instance/Create directory */ + post: { + parameters: { + query?: never; + header?: never; + path: { + instanceId: string; }; + cookie?: never; + }; + requestBody?: never; + responses: { /** @description Default Response */ - "4XX": { + 200: { headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; + [name: string]: unknown; }; + content?: never; }; }; }; - put?: never; - post?: never; + /** Delete a file in the instance */ delete: { parameters: { query?: never; header?: never; path: { - databaseId: string; - tableName: string; - schemaName: string; + instanceId: string; }; cookie?: never; }; @@ -9884,27 +9901,7 @@ export interface paths { headers: { [name: string]: unknown; }; - content: { - "application/json": components["schemas"]["DatabaseTable"]; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ - "4XX": { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; + content?: never; }; }; }; @@ -9913,13 +9910,14 @@ export interface paths { patch?: never; trace?: never; }; - "/api/v1/teams/{teamId}/databases/{databaseId}/tables/{tableName}/data/{schemaName}?": { + "/api/v1/applications/{applicationId}/device-groups/": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; + /** Get a list of device groups in an application */ get: { parameters: { query?: { @@ -9933,9 +9931,7 @@ export interface paths { }; header?: never; path: { - databaseId: string; - tableName: string; - schemaName: string; + applicationId: string; }; cookie?: never; }; @@ -9948,18 +9944,14 @@ export interface paths { }; content: { "application/json": { + meta?: components["schemas"]["PaginationMeta"]; count?: number; - rows?: { - [key: string]: unknown; - }[]; - meta?: { - [key: string]: unknown; - }; + groups?: components["schemas"]["DeviceGroupSummary"][]; }; }; }; /** @description Default Response */ - 500: { + "4XX": { headers: { [name: string]: unknown; }; @@ -9967,6 +9959,37 @@ export interface paths { "application/json": components["schemas"]["APIError"]; }; }; + }; + }; + put?: never; + /** Add a new Device Group to an Application */ + post: { + parameters: { + query?: never; + header?: never; + path: { + applicationId: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + name: string; + description?: string; + }; + }; + }; + responses: { + /** @description Default Response */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["DeviceGroupSummary"]; + }; + }; /** @description Default Response */ "4XX": { headers: { @@ -9978,27 +10001,27 @@ export interface paths { }; }; }; - put?: never; - post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; - "/api/v1/teams/{teamId}/mcp/": { + "/api/v1/applications/{applicationId}/device-groups/{groupId}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; + /** Get a specific Device Group */ get: { parameters: { query?: never; header?: never; path: { - teamId: string; + applicationId: string; + groupId: string; }; cookie?: never; }; @@ -10010,19 +10033,7 @@ export interface paths { [name: string]: unknown; }; content: { - "application/json": { - count?: number; - servers?: components["schemas"]["MCPRegistrationSummaryList"]; - }; - }; - }; - /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; + "application/json": components["schemas"]["DeviceGroup"]; }; }; /** @description Default Response */ @@ -10036,32 +10047,14 @@ export interface paths { }; }; }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/teams/{teamId}/mcp/{type}/{typeId}/{nodeId}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: { + /** Update a Device Group */ + put: { parameters: { query?: never; header?: never; path: { - teamId: string; - type: string; - typeId: string; - nodeId: string; + applicationId: string; + groupId: string; }; cookie?: never; }; @@ -10069,11 +10062,8 @@ export interface paths { content: { "application/json": { name?: string; - endpointRoute?: string; - protocol?: string; - title?: string; - version?: string; description?: string; + targetSnapshotId?: string | null; }; }; }; @@ -10088,15 +10078,6 @@ export interface paths { }; }; /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ "4XX": { headers: { [name: string]: unknown; @@ -10107,15 +10088,15 @@ export interface paths { }; }; }; + post?: never; + /** Delete a Device Group */ delete: { parameters: { query?: never; header?: never; path: { - teamId: string; - type: string; - typeId: string; - nodeId: string; + applicationId: string; + groupId: string; }; cookie?: never; }; @@ -10131,15 +10112,6 @@ export interface paths { }; }; /** @description Default Response */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["APIError"]; - }; - }; - /** @description Default Response */ "4XX": { headers: { [name: string]: unknown; @@ -10152,27 +10124,26 @@ export interface paths { }; options?: never; head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/projects/{projectId}/autoUpdateStack/": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Returns when a Instance allowed to be restarted */ - get: { + /** Update Device Group membership */ + patch: { parameters: { query?: never; header?: never; path: { - projectId: string; + applicationId: string; + groupId: string; }; cookie?: never; }; - requestBody?: never; + requestBody: { + content: { + "application/json": { + add?: string[]; + remove?: string[]; + set?: string[]; + }; + }; + }; responses: { /** @description Default Response */ 200: { @@ -10180,11 +10151,7 @@ export interface paths { [name: string]: unknown; }; content: { - "application/json": { - hour?: number; - day?: number; - restart?: boolean; - }[]; + "application/json": Record; }; }; /** @description Default Response */ @@ -10198,23 +10165,32 @@ export interface paths { }; }; }; - /** Sets when an Instance can be restarted */ + trace?: never; + }; + "/api/v1/applications/{applicationId}/device-groups/{groupId}/settings": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Update a Device Group Settings */ put: { parameters: { query?: never; header?: never; path: { - projectId: string; + applicationId: string; + groupId: string; }; cookie?: never; }; requestBody: { content: { "application/json": { - schedule?: { - hour?: number; - day?: number; - restart?: boolean; + env?: { + [key: string]: unknown; }[]; }; }; @@ -10226,11 +10202,7 @@ export interface paths { [name: string]: unknown; }; content: { - "application/json": { - hour?: number; - day?: number; - restart?: boolean; - }[]; + "application/json": components["schemas"]["APIStatus"]; }; }; /** @description Default Response */ @@ -10245,13 +10217,34 @@ export interface paths { }; }; post?: never; - /** Clears when an Instance can be restarted */ - delete: { + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/teams/{teamId}/device-groups/": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get a list of device groups in an application */ + get: { parameters: { - query?: never; + query?: { + query?: string; + cursor?: string; + limit?: number; + page?: number; + sort?: string; + dir?: "asc" | "desc"; + order?: "asc" | "desc"; + }; header?: never; path: { - projectId: string; + applicationId: string; }; cookie?: never; }; @@ -10263,7 +10256,11 @@ export interface paths { [name: string]: unknown; }; content: { - "application/json": unknown; + "application/json": { + meta?: components["schemas"]["PaginationMeta"]; + count?: number; + groups?: components["schemas"]["DeviceGroupSummary"][]; + }; }; }; /** @description Default Response */ @@ -10277,6 +10274,9 @@ export interface paths { }; }; }; + put?: never; + post?: never; + delete?: never; options?: never; head?: never; patch?: never;