@fleetless/contracts 8.2.0 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/artifacts/openapi.json +264 -2
- package/artifacts/routes.json +25 -0
- package/artifacts/schema/app-auth-config.schema.json +30 -0
- package/artifacts/schema/legal-acceptance-list-query.schema.json +26 -0
- package/artifacts/schema/legal-acceptance-list-response.schema.json +127 -0
- package/artifacts/schema/legal-acceptance-version-row.schema.json +101 -0
- package/artifacts/schema/legal-document-reference.schema.json +28 -0
- package/artifacts/schema/legal-text-references.schema.json +72 -0
- package/artifacts/schema/put-app-auth-urls-request.schema.json +31 -1
- package/artifacts/schema/waitlist-request.schema.json +9 -1
- package/dist/app-users.d.ts +12 -5
- package/dist/app-users.js +29 -6
- package/dist/identity.d.ts +5 -2
- package/dist/identity.js +10 -3
- package/dist/index.d.ts +5 -1
- package/dist/index.js +3 -1
- package/dist/legal-acceptances.d.ts +54 -0
- package/dist/legal-acceptances.js +22 -0
- package/dist/legal.d.ts +31 -0
- package/dist/legal.js +29 -0
- package/dist/routes.js +13 -0
- package/package.json +1 -1
package/dist/legal.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
/** HTTPS syntax only. The cloud checks resolved addresses, redirects and reachability. */
|
|
4
|
+
export const httpsLegalUrl = z.url().max(2048).regex(/^https:\/\/(?=[A-Za-z0-9.-]{1,253}(?::[0-9]{1,5})?(?:[/?#]|$))[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*(?::(?:[0-5]?[0-9]{1,4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?(?:[/?#]|$)/).refine((value) => {
|
|
5
|
+
try {
|
|
6
|
+
const url = new URL(value);
|
|
7
|
+
return url.protocol === 'https:' && !url.username && !url.password;
|
|
8
|
+
}
|
|
9
|
+
catch {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
}, { message: 'must be an absolute HTTPS URL without credentials' }).meta({ format: 'uri' });
|
|
13
|
+
/** A permanent link to exactly one dated version of a legal document. */
|
|
14
|
+
export const legalDocumentReference = z.object({
|
|
15
|
+
version: z.string().trim().min(1).max(80),
|
|
16
|
+
version_date: z.iso.date(),
|
|
17
|
+
url: httpsLegalUrl,
|
|
18
|
+
}).strict();
|
|
19
|
+
/** The DPA is null only in an acceptance context where it does not apply. */
|
|
20
|
+
export const legalTextReferences = z.object({
|
|
21
|
+
terms: legalDocumentReference,
|
|
22
|
+
dpa: legalDocumentReference.nullable(),
|
|
23
|
+
}).strict();
|
|
24
|
+
export const TERMS_VERSION = '1.0';
|
|
25
|
+
export const TERMS_VERSION_DATE = '2026-11-01';
|
|
26
|
+
export const TERMS_VERSION_URL = 'https://fleetless.dev/terms/v1.0/';
|
|
27
|
+
export const DPA_VERSION = '1.0';
|
|
28
|
+
export const DPA_VERSION_DATE = '2026-11-01';
|
|
29
|
+
export const DPA_VERSION_URL = 'https://fleetless.dev/dpa/v1.0/';
|
package/dist/routes.js
CHANGED
|
@@ -10,6 +10,7 @@ import { appAuthConfig, appInvitation, appInvitationListResponse, appMailTemplat
|
|
|
10
10
|
import { controllerRegisterOrgResponse, controllerRegisterWrite } from './controller-register.js';
|
|
11
11
|
import { acceptTeamInviteRequest, authMeResponse, createPasskeyRequest, createPasskeyResponse, createTeamInviteRequest, developerPasskey, developerTwoFactor, fleetlessUser, fleetlessUserListResponse, passwordChangeRequest, patchAuthMeRequest, patchFleetlessUserRequest, patchOrgRequest, patchOrgResponse, pendingTeamInviteListResponse, refreshRequest, sessionTokens, teamInvite, recoveryCodesResponse, renamePasskeyRequest, tierChangeRequest, totpConfirmRequest, totpConfirmResponse, twoFactorSetupResponse, waitlistRequest, webauthnOptionsResponse, } from './identity.js';
|
|
12
12
|
import { jobRunListResponse, jobRunQuery, jobRunSummary, jobRunSummaryQuery } from './jobs.js';
|
|
13
|
+
import { legalAcceptanceListQuery, legalAcceptanceListResponse } from './legal-acceptances.js';
|
|
13
14
|
import { MCP_APP_PATHS, mcpRobotDatasheet, mcpRolePreviewResponse } from './mcp.js';
|
|
14
15
|
import { authorizationServerMetadata, dynamicClientRegistrationRequest, dynamicClientRegistrationResponse, oauthAuthorizeQuery, oauthRedirectResponse, oauthTokenRequest, oauthTokenResponse, protectedResourceMetadata, } from './oauth.js';
|
|
15
16
|
import { adminPlanChangeRequest, orgPlan, planChangeRequest } from './plans.js';
|
|
@@ -464,6 +465,18 @@ export const ROUTES = [
|
|
|
464
465
|
'capped by its own global ceiling, above which the row is still written and the mail is skipped.',
|
|
465
466
|
},
|
|
466
467
|
/* ---------------------------------------------------------------- org */
|
|
468
|
+
{
|
|
469
|
+
method: 'GET', path: '/api/org/legal/acceptances', section: 'org',
|
|
470
|
+
summary: "Lists the calling organization's accepted legal document versions, newest first.",
|
|
471
|
+
audience: 'developer', auth: 'developer', rateLimited: false, ownerTier: true, status: 200,
|
|
472
|
+
params: [], query: legalAcceptanceListQuery, request: null, response: legalAcceptanceListResponse,
|
|
473
|
+
errors: [...DEVELOPER_GUARD, 'tier_required', 'support_forbidden', 'validation_error'], transport: 'http',
|
|
474
|
+
notes: 'A real Owner reads only the authenticated organization; Developer and support sessions cannot read it. ' +
|
|
475
|
+
'Rows carry stored Terms and applicable DPA references, never the current versions substituted for history. ' +
|
|
476
|
+
'The default page limit is 50, maximum 100. The opaque cursor is unpadded base64url of UTF-8 JSON ' +
|
|
477
|
+
'`[accepted_at,id]`, with a six-digit UTC timestamp and lowercase UUID; Cloud rejects noncanonical tokens. ' +
|
|
478
|
+
'Follow `next_cursor` until null. Equal timestamps sort by id descending; a new acceptance cannot displace older rows.',
|
|
479
|
+
},
|
|
467
480
|
{
|
|
468
481
|
method: 'GET', path: '/api/org/controller-register', section: 'org',
|
|
469
482
|
summary: "Reads the calling owner's customer-confirmed controller register details.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fleetless/contracts",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
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",
|