@fleetless/contracts 5.1.0 → 5.3.0-next.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/CHANGELOG.md +51 -0
- package/artifacts/constants.json +1 -1
- package/artifacts/openapi.json +288 -4
- package/artifacts/routes.json +96 -1
- package/artifacts/schema/audit-query.schema.json +6 -0
- package/artifacts/schema/cloud-cancel.schema.json +3 -0
- package/artifacts/schema/feedback-request.schema.json +34 -0
- package/artifacts/schema/feedback-response.schema.json +27 -0
- package/artifacts/schema/job-actor.schema.json +15 -1
- package/artifacts/schema/job-run-list-response.schema.json +15 -1
- package/artifacts/schema/job-run.schema.json +15 -1
- package/artifacts/schema/role-delete-query.schema.json +13 -0
- package/artifacts/schema/role-in-use-details.schema.json +28 -0
- package/artifacts/schema/role-list-response.schema.json +1 -1
- package/artifacts/schema/role-rename-request.schema.json +16 -0
- package/artifacts/schema/role.schema.json +1 -1
- package/dist/apps.d.ts +38 -2
- package/dist/apps.js +46 -3
- package/dist/audit.d.ts +1 -0
- package/dist/audit.js +13 -0
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +29 -0
- package/dist/feedback.d.ts +42 -0
- package/dist/feedback.js +35 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +3 -1
- package/dist/jobs.d.ts +3 -0
- package/dist/jobs.js +16 -0
- package/dist/protocol.d.ts +13 -1
- package/dist/protocol.js +13 -1
- package/dist/routes.js +40 -2
- package/package.json +1 -1
package/dist/routes.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
-
import { appListResponse, appDeletionSummary, createAppRequest, createServerKeyResponse, app as appSchema, role, roleListResponse, rolePermissions, serverKeyListResponse, updateAppRequest, } from './apps.js';
|
|
2
|
+
import { appListResponse, appDeletionSummary, createAppRequest, createServerKeyResponse, app as appSchema, role, roleListResponse, roleDeleteQuery, rolePermissions, roleRenameRequest, serverKeyListResponse, updateAppRequest, } from './apps.js';
|
|
3
3
|
import { alertListResponse, orgAlertsQuery, orgFiringAlertsResponse } from './alerts.js';
|
|
4
4
|
import { asset, assetListResponse, assetsClearResponse, assetSyncRequest, assetSyncResponse, assetSyncStatus, missingAssetQuery } from './assets.js';
|
|
5
5
|
import { auditListResponse, auditQuery } from './audit.js';
|
|
6
|
+
import { feedbackRequest, feedbackResponse } from './feedback.js';
|
|
6
7
|
import { CLIENT_OIDC_CALLBACK_PATH, clientAcceptInvitationRequest, clientIdentity, clientLoginRequest, clientLogoutRequest, clientMcpInteraction, clientMcpInteractionDecisionResponse, clientOidcCallbackQuery, clientOidcExchangeRequest, clientOidcStartQuery, clientPasswordResetConfirmRequest, clientPasswordResetRequest, clientProviderListQuery, clientProviderListResponse, clientRefreshRequest, clientRegisterRequest, clientResendVerificationRequest, clientVerifyEmailRequest, mcpConsentGrantListResponse, } from './client-auth.js';
|
|
7
8
|
import { clientRobotListResponse } from './client-robots.js';
|
|
8
9
|
import { appAuthConfig, appInvitation, appInvitationListResponse, appMailTemplate, appMailTemplateListResponse, appOidcProvider, appOidcProviderListResponse, appUser, appUserListResponse, createAppInvitationRequest, createAppOidcProviderRequest, createAppUserRequest, mailOutcome, mailTemplatePreviewRequest, mailTemplatePreviewResponse, patchAppOidcProviderRequest, patchAppUserRequest, putAppAuthMcpRequest, putAppAuthRegistrationRequest, putAppAuthUrlsRequest, putAppMailTemplateRequest, } from './app-users.js';
|
|
@@ -328,7 +329,7 @@ export const ROUTES = [
|
|
|
328
329
|
params: [{ name: 'id', description: 'The app\'s uuid, as returned by `POST /api/apps` or listed by `GET /api/apps`.' }],
|
|
329
330
|
query: null, request: null, response: role,
|
|
330
331
|
errors: [...DEVELOPER_GUARD, 'invalid_uuid', 'not_found', 'validation_error'], transport: 'http',
|
|
331
|
-
notes: 'The body is `{ "name": string }` — non-empty, trimmed, at most
|
|
332
|
+
notes: 'The body is `{ "name": string }` — non-empty, trimmed, at most 60 characters as on `role.name` — and is deliberately not a contract shape: contracts ' +
|
|
332
333
|
'define the `role` this answers with, not this one trivial request. **The answer is a bare `role`, not an envelope**, unlike the ' +
|
|
333
334
|
'listing beside it.',
|
|
334
335
|
},
|
|
@@ -381,6 +382,33 @@ export const ROUTES = [
|
|
|
381
382
|
'offered and consults nothing about any user\'s actual MCP entitlement. A robot the role grants nothing on still appears, with an empty ' +
|
|
382
383
|
'`exposures` — dropping it would read as "not attached", which is a different fact.',
|
|
383
384
|
},
|
|
385
|
+
{
|
|
386
|
+
method: 'PATCH', path: '/api/apps/:id/roles/:roleId', section: 'apps',
|
|
387
|
+
summary: 'Renames a role; its users keep it.',
|
|
388
|
+
audience: 'developer', auth: 'developer', rateLimited: false, ownerTier: false, status: 200,
|
|
389
|
+
params: [
|
|
390
|
+
{ name: 'id', description: 'The app\'s uuid, as returned by `POST /api/apps` or listed by `GET /api/apps`.' },
|
|
391
|
+
{ name: 'roleId', description: 'The role\'s uuid, from `GET /api/apps/:id/roles`; a role of another app answers `404`.' },
|
|
392
|
+
],
|
|
393
|
+
query: null, request: roleRenameRequest, response: role,
|
|
394
|
+
errors: [...DEVELOPER_GUARD, 'invalid_uuid', 'not_found', 'validation_error', 'role_name_taken'], transport: 'http',
|
|
395
|
+
notes: 'Names are unique per app, compared exactly as stored after trimming. Built-in roles can be renamed.',
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
method: 'DELETE', path: '/api/apps/:id/roles/:roleId', section: 'apps',
|
|
399
|
+
summary: 'Deletes a role, moving its users, pending invitations and default-role status to another role.',
|
|
400
|
+
audience: 'developer', auth: 'developer', rateLimited: false, ownerTier: false, status: 204,
|
|
401
|
+
params: [
|
|
402
|
+
{ name: 'id', description: 'The app\'s uuid, as returned by `POST /api/apps` or listed by `GET /api/apps`.' },
|
|
403
|
+
{ name: 'roleId', description: 'The role\'s uuid, from `GET /api/apps/:id/roles`; a role of another app answers `404`.' },
|
|
404
|
+
],
|
|
405
|
+
query: roleDeleteQuery, request: null, response: null,
|
|
406
|
+
errors: [...DEVELOPER_GUARD, 'invalid_uuid', 'not_found', 'validation_error', 'role_in_use', 'last_role'], transport: 'http',
|
|
407
|
+
notes: 'Without `move_to`, a role that app users or pending invitations hold, or that is the app\'s default, answers ' +
|
|
408
|
+
'`409 role_in_use` with `{ users, invitations, is_default }`. With `move_to` — another role of the same app, else ' +
|
|
409
|
+
'`400 validation_error` — one transaction moves `app_users.role_id`, pending invitations and `default_role_id`, then deletes ' +
|
|
410
|
+
'the role and its permissions. The app\'s only role answers `409 last_role`. Built-in roles can be deleted like any other.',
|
|
411
|
+
},
|
|
384
412
|
{
|
|
385
413
|
method: 'POST', path: '/api/apps/:id/server-keys', section: 'apps',
|
|
386
414
|
summary: 'Mints a server key for the app and returns the raw secret once.',
|
|
@@ -2417,6 +2445,16 @@ export const ROUTES = [
|
|
|
2417
2445
|
'platform will answer is owed a refusal, not a shorter answer they will mistake for the whole picture. `from_day <= to_day` is a ' +
|
|
2418
2446
|
'cross-field rule no JSON Schema can express and is enforced here. The window is echoed back.',
|
|
2419
2447
|
},
|
|
2448
|
+
{
|
|
2449
|
+
method: 'POST', path: '/api/feedback', section: 'org',
|
|
2450
|
+
summary: 'Sends a message from a developer to the people who build Fleetless.',
|
|
2451
|
+
audience: 'developer', auth: 'developer', rateLimited: true, ownerTier: false, status: 202,
|
|
2452
|
+
params: [], query: null, request: feedbackRequest, response: feedbackResponse,
|
|
2453
|
+
errors: [...DEVELOPER_GUARD, 'validation_error', 'rate_limited'], transport: 'http',
|
|
2454
|
+
notes: 'The message is stored before any mail is tried, so `202` means it is kept whatever `mail` says: `sent`, `failed`, or ' +
|
|
2455
|
+
'`not_configured` when this cloud has no feedback address. At most 10 messages per developer per hour; the 11th answers ' +
|
|
2456
|
+
'`429 rate_limited` with `retry_after_ms`. Replies come by mail, to the sender\'s address.',
|
|
2457
|
+
},
|
|
2420
2458
|
/* ------------------------------------------------- assets (robot upload) */
|
|
2421
2459
|
{
|
|
2422
2460
|
method: 'POST', path: '/api/bridge/assets', section: 'assets',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fleetless/contracts",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0-next.1",
|
|
4
4
|
"description": "Fleetless wire contracts: the bridge-cloud protocol, the REST API schemas and the error codes, as zod schemas with generated JSON Schema and OpenAPI artifacts.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Dehne Robotik GmbH",
|