@fleetless/contracts 8.1.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/dist/index.d.ts CHANGED
@@ -29,7 +29,7 @@ export type { UsageMetric, OrgUsageQuery, UsageRow, OrgUsageResponse } from './r
29
29
  export type { Robot, PatchRobotResponse, CreateRobotRequest, CreateRobotResponse, RobotTokenRotateResponse, JointStatePutRequest, JointStatePutResponse, ExposureCounts, ProtocolStatusValue, RobotListItem, RobotListResponse, DatapointValue, RobotDetailResponse, ConfigDraftResponse, PutConfigDraftRequest, PublishConfigResponse, ConfigVersionsResponse, ConfigVersionResponse, IntrospectionResponse, TypesResponse, FetchTypesRequest, FetchTypesResponse, DatapointDescriptor, DatapointListResponse, RobotDetailsDoc, PutRobotDetailsResponse, PutRobotDetailsRequest, InvokeRequest, InvokeResponse, CancelRequest, ReleaseLiveQuery, ServiceCallResponse, InvokeOrServiceResponse, PublishRequest, JobResponse, RobotJobsResponse, RateLimitDetails, Exposure, ExposureListResponse, CameraDescriptor, CameraListResponse, LiveSessionResponse, SnapshotMetaResponse, } from './rest.js';
30
30
  export { clientAuth, authOk, authError, clientInvoke, clientCancel, clientPublish, commandResult, errorFrame, clientSubscribe, clientUnsubscribe, subscribeError, datapointEvent, resourceHealthEvent, resourceHealthCleared, liveSessionEndReason, liveSessionEvent, ORG_EVENT_SAMPLE_INTERVAL_MS, ORG_EVENT_ORG_CEILING_PER_SECOND, ORG_EVENT_BUFFER_SIZE, ORG_EVENT_BUFFER_IDLE_MS, ORG_EVENT_DETAIL_MAX_BYTES, orgEventKind, orgEventSeverity, orgEvent, orgEventSubscribe, orgEventUnsubscribe, orgEventReplay, orgEventDropped, } from './realtime.js';
31
31
  export type { ClientAuth, AuthOk, AuthError, ClientInvoke, ClientCancel, ClientPublish, CommandResult, ErrorFrame, ClientSubscribe, ClientUnsubscribe, SubscribeError, DatapointEvent, ResourceHealthEvent, ResourceHealthCleared, LiveSessionEndReason, LiveSessionEvent, OrgEventKind, OrgEventSeverity, OrgEvent, OrgEventSubscribe, OrgEventUnsubscribe, OrgEventReplay, OrgEventDropped, } from './realtime.js';
32
- export { password, org, patchOrgResponse, sessionTokens, refreshRequest, waitlistRequest, USER_DISPLAY_NAME_MAX, orgAdminTier, fleetlessUser, fleetlessUserListResponse, createTeamInviteRequest, teamInvite, pendingTeamInvite, pendingTeamInviteListResponse, acceptTeamInviteRequest, patchFleetlessUserRequest, tierChangeRequest, mailStatus, tierRequiredDetails, passwordChangeRequest, idpIssuer, loginCode, totpCode, recoveryCode, recoveryCodesList, twoFactorSetupResponse, webauthnJson, webauthnOptionsResponse, developerPasskey, developerTwoFactor, createPasskeyRequest, createPasskeyResponse, renamePasskeyRequest, totpConfirmRequest, totpConfirmResponse, recoveryCodesResponse, authMeResponse, patchOrgRequest, patchAuthMeRequest, } from './identity.js';
32
+ export { password, org, patchOrgResponse, sessionTokens, refreshRequest, WAITLIST_F1_TEXT_VERSION, waitlistRequest, USER_DISPLAY_NAME_MAX, orgAdminTier, fleetlessUser, fleetlessUserListResponse, createTeamInviteRequest, teamInvite, pendingTeamInvite, pendingTeamInviteListResponse, acceptTeamInviteRequest, patchFleetlessUserRequest, tierChangeRequest, mailStatus, tierRequiredDetails, passwordChangeRequest, idpIssuer, loginCode, totpCode, recoveryCode, recoveryCodesList, twoFactorSetupResponse, webauthnJson, webauthnOptionsResponse, developerPasskey, developerTwoFactor, createPasskeyRequest, createPasskeyResponse, renamePasskeyRequest, totpConfirmRequest, totpConfirmResponse, recoveryCodesResponse, authMeResponse, patchOrgRequest, patchAuthMeRequest, } from './identity.js';
33
33
  export type { Org, PatchOrgResponse, SessionTokens, RefreshRequest, WaitlistRequest, OrgAdminTier, FleetlessUser, FleetlessUserListResponse, CreateTeamInviteRequest, TeamInvite, PendingTeamInvite, PendingTeamInviteListResponse, AcceptTeamInviteRequest, PatchFleetlessUserRequest, TierChangeRequest, MailStatus, TierRequiredDetails, PasswordChangeRequest, IdpIssuer, TwoFactorSetupResponse, WebauthnOptionsResponse, DeveloperPasskey, DeveloperTwoFactor, CreatePasskeyRequest, CreatePasskeyResponse, RenamePasskeyRequest, TotpConfirmRequest, TotpConfirmResponse, RecoveryCodesResponse, AuthMeResponse, PatchOrgRequest, PatchAuthMeRequest, } from './identity.js';
34
34
  export { FEEDBACK_KINDS, FEEDBACK_MESSAGE_MAX, feedbackKind, feedbackRequest, feedbackResponse } from './feedback.js';
35
35
  export type { FeedbackKind, FeedbackRequest, FeedbackResponse } from './feedback.js';
@@ -41,6 +41,10 @@ export { clientLoginRequest, clientRefreshRequest, clientLogoutRequest, clientRe
41
41
  export type { ClientLoginRequest, ClientRefreshRequest, ClientLogoutRequest, ClientRegisterRequest, ClientVerifyEmailRequest, ClientResendVerificationRequest, ClientPasswordResetRequest, ClientPasswordResetConfirmRequest, ClientAcceptInvitationRequest, ClientProviderListQuery, ClientProviderListResponse, ClientOidcStartQuery, ClientOidcCallbackQuery, ClientOidcExchangeRequest, ClientOidcErrorCode, ClientMcpInteraction, ClientMcpInteractionDecisionResponse, McpConsentGrant, McpConsentGrantListResponse, ClientIdentity, ClientLoginCodeRequest, ClientLoginCodeVerifyRequest, TwoFactorChallenge, ClientSignInResult, ClientTwoFactorVerifyRequest, ClientTwoFactorSetupRequest, ClientTwoFactorSetupConfirmRequest, ClientTwoFactorSetupConfirmResponse, ClientTwoFactorDisableRequest, } from './client-auth.js';
42
42
  export { clientRobotListItem, clientRobotListResponse } from './client-robots.js';
43
43
  export type { ClientRobotListItem, ClientRobotListResponse } from './client-robots.js';
44
+ export { httpsLegalUrl, legalDocumentReference, legalTextReferences, TERMS_VERSION, TERMS_VERSION_DATE, TERMS_VERSION_URL, DPA_VERSION, DPA_VERSION_DATE, DPA_VERSION_URL, } from './legal.js';
45
+ export type { LegalDocumentReference, LegalTextReferences } from './legal.js';
46
+ export { legalAcceptanceListQuery, legalAcceptanceVersionRow, legalAcceptanceListResponse } from './legal-acceptances.js';
47
+ export type { LegalAcceptanceListQuery, LegalAcceptanceVersionRow, LegalAcceptanceListResponse } from './legal-acceptances.js';
44
48
  export { APP_USER_DISPLAY_NAME_MAX, APP_URL_PLACEHOLDERS, MAIL_TEMPLATE_VARIABLES, DEFAULT_MAIL_TEMPLATES, providerSlug, appUserStatus, appUser, appUserListResponse, createAppUserRequest, patchAppUserRequest, createAppInvitationRequest, appInvitation, pendingAppInvitation, appInvitationListResponse, appOidcProvider, appOidcProviderListResponse, createAppOidcProviderRequest, patchAppOidcProviderRequest, appUrlTemplate, allowedOrigin, emailDomain, appAuthConfig, appSignInMethods, appTwoFactorPolicy, appHomeUrl, hostedAccent, HOSTED_LOGO_MAX_BYTES, HOSTED_LOGO_TYPES, appHostedPages, putAppAuthRegistrationRequest, putAppAuthSignInRequest, putAppAuthUrlsRequest, putAppAuthMcpRequest, putAppAuthLookRequest, mailTemplateKind, appMailTemplate, appMailTemplateListResponse, putAppMailTemplateRequest, mailTemplatePreviewRequest, mailTemplatePreviewResponse, mailTemplateProblemDetails, mailOutcome, } from './app-users.js';
45
49
  export type { AppUserStatus, AppUser, AppUserListResponse, CreateAppUserRequest, PatchAppUserRequest, CreateAppInvitationRequest, AppInvitation, PendingAppInvitation, AppInvitationListResponse, AppOidcProvider, AppOidcProviderListResponse, CreateAppOidcProviderRequest, PatchAppOidcProviderRequest, AppAuthConfig, AppSignInMethods, AppTwoFactorPolicy, AppHostedPages, PutAppAuthRegistrationRequest, PutAppAuthSignInRequest, PutAppAuthUrlsRequest, PutAppAuthMcpRequest, PutAppAuthLookRequest, MailTemplateKind, AppMailTemplate, AppMailTemplateListResponse, PutAppMailTemplateRequest, MailTemplatePreviewRequest, MailTemplatePreviewResponse, MailTemplateProblemDetails, MailOutcome, } from './app-users.js';
46
50
  export { assetKind, URDF_ASSET_NAME, asset, urdfCompleteness, assetListResponse, assetsClearResponse, missingAssetQuery, assetSyncRequest, assetSyncResponse, assetSyncState, assetSyncStatus, assetFailure, assetFailureKind, assetStoreRefusedDetails, assetSyncBusyDetails, ROBOT_ASSET_STORE_BYTES, ASSET_FILE_MAX_BYTES, } from './assets.js';
@@ -61,5 +65,7 @@ export { planCurrency, orgAddons, orgPlanUsage, planChangeKeep, planChangeReason
61
65
  export type { PlanCurrency, OrgAddons, OrgPlanUsage, PlanChangeKeep, PlanChangeReason, PendingPlanChange, OrgLock, OrgPlan, PlanChangeRequest, PlanOverrides, AdminPlanChangeRequest, } from './plans.js';
62
66
  export { countryCode, EU_COUNTRIES, SELLER_COUNTRY, DE_VAT_RATE_PERCENT, isEuCountry, currencyForCountry, payerKind, billingCycle, vatTreatment, payerRefusalRule, vatFor, viesCountry, normalizeVatId, periodNetCents, prorateCents, vatCents, chargeAmounts, DAY_MS, periodDays, remainingDays, changeNetCents, checkoutQuote, BILLING_RETRY_DAYS, BILLING_LOCK_DAY, billingAddress, billingDetails, checkoutRequest, checkoutResponse, checkoutStatus, vatIdStatus, vatIdCheckRequest, vatIdCheckResponse, billingChangeRequest, billingCancelRequest, billingDetailsUpdate, paymentMethodKind, paymentMethodChangeRequest, billingAccountStatus, paymentMethod, invoiceStatus, billingInvoice, billingAccount, billingView, billingChangeResponse, billingDocumentKind, billingDocumentStatus, billingDocumentProfile, billingDocumentFormat, billingDocument, billingDocumentList, billingDocumentFileRole, billingDocumentDetail, billingDocumentFileQuery, billingIssuer, billingChargeInvoice, billingCharge, chargePayRequest, } from './billing.js';
63
67
  export type { PayerKind, BillingCycle, VatTreatment, PayerRefusalRule, VatDecision, ChargeAmounts, BillingState, QuoteLine, CheckoutQuote, BillingAddress, BillingDetails, CheckoutRequest, CheckoutResponse, CheckoutStatus, VatIdStatus, VatIdCheckRequest, VatIdCheckResponse, BillingChangeRequest, BillingCancelRequest, BillingDetailsUpdate, PaymentMethodKind, PaymentMethodChangeRequest, BillingAccountStatus, PaymentMethod, InvoiceStatus, BillingInvoice, BillingAccount, BillingView, BillingChangeResponse, BillingDocumentKind, BillingDocumentStatus, BillingDocumentProfile, BillingDocumentFormat, BillingDocument, BillingDocumentList, BillingDocumentFileRole, BillingDocumentDetail, BillingDocumentFileQuery, BillingIssuer, BillingChargeInvoice, BillingCharge, ChargePayRequest, } from './billing.js';
68
+ export { controllerRegisterAddress, controllerRegisterPrivacyContact, controllerRegisterRepresentative, controllerRegisterWrite, controllerRegisterOrgRecord, controllerRegisterOrgResponse } from './controller-register.js';
69
+ export type { ControllerRegisterWrite, ControllerRegisterOrgResponse } from './controller-register.js';
64
70
  export { purchaseBillingDetails, purchaseOperationKey, purchaseOperation, purchaseQuote, purchaseHoldReason, purchaseRefusalRule, purchaseIntent, purchaseIntentLookupQuery, purchaseIntentConfirmRequest, purchaseConflictDetails, invoicePayRequest, purchaseIntentResponse, vatDecision, viesPendingReason, } from './billing.js';
65
71
  export type { PurchaseBillingDetails, PurchaseOperation, PurchaseQuote, PurchaseIntent, PurchaseIntentLookupQuery, PurchaseIntentConfirmRequest, PurchaseConflictDetails, InvoicePayRequest, PurchaseIntentResponse, ViesVerdict, ViesPendingReason, } from './billing.js';
package/dist/index.js CHANGED
@@ -31,7 +31,7 @@ export { LATENCY_BUCKET_MS, BRIDGE_LATENCY_RETENTION_DAYS, MAX_LATENCY_BUCKETS_P
31
31
  export { clientAuth, authOk, authError, clientInvoke, clientCancel, clientPublish, commandResult, errorFrame, clientSubscribe, clientUnsubscribe, subscribeError, datapointEvent, resourceHealthEvent, resourceHealthCleared, liveSessionEndReason, liveSessionEvent, ORG_EVENT_SAMPLE_INTERVAL_MS, ORG_EVENT_ORG_CEILING_PER_SECOND, ORG_EVENT_BUFFER_SIZE, ORG_EVENT_BUFFER_IDLE_MS, ORG_EVENT_DETAIL_MAX_BYTES, orgEventKind, orgEventSeverity, orgEvent, orgEventSubscribe, orgEventUnsubscribe, orgEventReplay, orgEventDropped, } from './realtime.js';
32
32
  export { password, org, patchOrgResponse, sessionTokens, refreshRequest,
33
33
  // 2026-09-04 — the public site (closed beta).
34
- waitlistRequest,
34
+ WAITLIST_F1_TEXT_VERSION, waitlistRequest,
35
35
  // The two identity spaces.
36
36
  USER_DISPLAY_NAME_MAX, orgAdminTier, fleetlessUser, fleetlessUserListResponse, createTeamInviteRequest, teamInvite, pendingTeamInvite, pendingTeamInviteListResponse, acceptTeamInviteRequest, patchFleetlessUserRequest, tierChangeRequest,
37
37
  // Identity.
@@ -49,6 +49,8 @@ export { supportSessionInfo, supportTokenRequest, supportTokenResponse, authMeSu
49
49
  export { appIdentifier, app, appListResponse, appDeletionSummary, createAppRequest, updateAppRequest, serverKeyToken, serverKey, serverKeyListResponse, createServerKeyResponse, role, roleListResponse, rolePermissions, roleRenameRequest, roleDeleteQuery, roleInUseDetails, } from './apps.js';
50
50
  export { clientLoginRequest, clientRefreshRequest, clientLogoutRequest, clientRegisterRequest, clientVerifyEmailRequest, clientResendVerificationRequest, clientPasswordResetRequest, clientPasswordResetConfirmRequest, clientAcceptInvitationRequest, CLIENT_OIDC_CALLBACK_PATH, clientProviderListQuery, clientProviderListResponse, clientOidcStartQuery, clientOidcCallbackQuery, clientOidcExchangeRequest, clientOidcErrorCode, clientMcpInteraction, clientMcpInteractionDecisionResponse, mcpConsentGrant, mcpConsentGrantListResponse, clientIdentity, clientLoginCodeRequest, clientLoginCodeVerifyRequest, twoFactorChallenge, clientSignInResult, clientTwoFactorVerifyRequest, clientTwoFactorSetupRequest, clientTwoFactorSetupConfirmRequest, clientTwoFactorSetupConfirmResponse, clientTwoFactorDisableRequest, } from './client-auth.js';
51
51
  export { clientRobotListItem, clientRobotListResponse } from './client-robots.js';
52
+ export { httpsLegalUrl, legalDocumentReference, legalTextReferences, TERMS_VERSION, TERMS_VERSION_DATE, TERMS_VERSION_URL, DPA_VERSION, DPA_VERSION_DATE, DPA_VERSION_URL, } from './legal.js';
53
+ export { legalAcceptanceListQuery, legalAcceptanceVersionRow, legalAcceptanceListResponse } from './legal-acceptances.js';
52
54
  // The per-app identity space.
53
55
  export { APP_USER_DISPLAY_NAME_MAX, APP_URL_PLACEHOLDERS, MAIL_TEMPLATE_VARIABLES, DEFAULT_MAIL_TEMPLATES, providerSlug, appUserStatus, appUser, appUserListResponse, createAppUserRequest, patchAppUserRequest, createAppInvitationRequest, appInvitation, pendingAppInvitation, appInvitationListResponse, appOidcProvider, appOidcProviderListResponse, createAppOidcProviderRequest, patchAppOidcProviderRequest, appUrlTemplate, allowedOrigin, emailDomain, appAuthConfig, appSignInMethods, appTwoFactorPolicy, appHomeUrl, hostedAccent, HOSTED_LOGO_MAX_BYTES, HOSTED_LOGO_TYPES, appHostedPages, putAppAuthRegistrationRequest, putAppAuthSignInRequest, putAppAuthUrlsRequest, putAppAuthMcpRequest, putAppAuthLookRequest, mailTemplateKind, appMailTemplate, appMailTemplateListResponse, putAppMailTemplateRequest, mailTemplatePreviewRequest, mailTemplatePreviewResponse, mailTemplateProblemDetails, mailOutcome, } from './app-users.js';
54
56
  export { assetKind, URDF_ASSET_NAME, asset, urdfCompleteness, assetListResponse, assetsClearResponse, missingAssetQuery, assetSyncRequest, assetSyncResponse, assetSyncState, assetSyncStatus, assetFailure, assetFailureKind, assetStoreRefusedDetails, assetSyncBusyDetails, ROBOT_ASSET_STORE_BYTES, ASSET_FILE_MAX_BYTES, } from './assets.js';
@@ -79,4 +81,5 @@ export { countryCode, EU_COUNTRIES, SELLER_COUNTRY, DE_VAT_RATE_PERCENT, isEuCou
79
81
  billingDocumentKind, billingDocumentStatus, billingDocumentProfile, billingDocumentFormat, billingDocument, billingDocumentList, billingDocumentFileRole, billingDocumentDetail, billingDocumentFileQuery,
80
82
  // 2026-10-19 — the Lexware issuer cutover (fleetless/fleetless#327).
81
83
  billingIssuer, billingChargeInvoice, billingCharge, chargePayRequest, } from './billing.js';
84
+ export { controllerRegisterAddress, controllerRegisterPrivacyContact, controllerRegisterRepresentative, controllerRegisterWrite, controllerRegisterOrgRecord, controllerRegisterOrgResponse } from './controller-register.js';
82
85
  export { purchaseBillingDetails, purchaseOperationKey, purchaseOperation, purchaseQuote, purchaseHoldReason, purchaseRefusalRule, purchaseIntent, purchaseIntentLookupQuery, purchaseIntentConfirmRequest, purchaseConflictDetails, invoicePayRequest, purchaseIntentResponse, vatDecision, viesPendingReason, } from './billing.js';
@@ -0,0 +1,54 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ import { z } from 'zod';
3
+ export declare const legalAcceptanceListQuery: z.ZodObject<{
4
+ limit: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
5
+ cursor: z.ZodOptional<z.ZodString>;
6
+ }, z.core.$strict>;
7
+ export type LegalAcceptanceListQuery = z.infer<typeof legalAcceptanceListQuery>;
8
+ export declare const legalAcceptanceVersionRow: z.ZodObject<{
9
+ id: z.ZodUUID;
10
+ context: z.ZodEnum<{
11
+ registration: "registration";
12
+ invitation: "invitation";
13
+ order: "order";
14
+ existing_org: "existing_org";
15
+ }>;
16
+ accepted_at: z.ZodISODateTime;
17
+ text_id: z.ZodString;
18
+ terms: z.ZodObject<{
19
+ version: z.ZodString;
20
+ version_date: z.ZodISODate;
21
+ url: z.ZodURL;
22
+ }, z.core.$strict>;
23
+ dpa: z.ZodNullable<z.ZodObject<{
24
+ version: z.ZodString;
25
+ version_date: z.ZodISODate;
26
+ url: z.ZodURL;
27
+ }, z.core.$strict>>;
28
+ }, z.core.$strict>;
29
+ export type LegalAcceptanceVersionRow = z.infer<typeof legalAcceptanceVersionRow>;
30
+ export declare const legalAcceptanceListResponse: z.ZodObject<{
31
+ acceptances: z.ZodArray<z.ZodObject<{
32
+ id: z.ZodUUID;
33
+ context: z.ZodEnum<{
34
+ registration: "registration";
35
+ invitation: "invitation";
36
+ order: "order";
37
+ existing_org: "existing_org";
38
+ }>;
39
+ accepted_at: z.ZodISODateTime;
40
+ text_id: z.ZodString;
41
+ terms: z.ZodObject<{
42
+ version: z.ZodString;
43
+ version_date: z.ZodISODate;
44
+ url: z.ZodURL;
45
+ }, z.core.$strict>;
46
+ dpa: z.ZodNullable<z.ZodObject<{
47
+ version: z.ZodString;
48
+ version_date: z.ZodISODate;
49
+ url: z.ZodURL;
50
+ }, z.core.$strict>>;
51
+ }, z.core.$strict>>;
52
+ next_cursor: z.ZodNullable<z.ZodString>;
53
+ }, z.core.$strict>;
54
+ export type LegalAcceptanceListResponse = z.infer<typeof legalAcceptanceListResponse>;
@@ -0,0 +1,22 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ import { z } from 'zod';
3
+ import { legalDocumentReference } from './legal.js';
4
+ /** The cloud decodes the canonical [accepted_at, id] token; this checks its wire syntax. */
5
+ const legalAcceptanceCursor = z.string().min(1).max(512).regex(/^[A-Za-z0-9_-]+$/);
6
+ export const legalAcceptanceListQuery = z.object({
7
+ limit: z.union([z.string().regex(/^(?:0{0,2}[1-9]|0?[1-9][0-9]|100)$/), z.number().int().min(1).max(100)])
8
+ .transform(Number).pipe(z.number().int().min(1).max(100)).optional(),
9
+ cursor: legalAcceptanceCursor.optional(),
10
+ }).strict();
11
+ export const legalAcceptanceVersionRow = z.object({
12
+ id: z.uuid(),
13
+ context: z.enum(['registration', 'invitation', 'order', 'existing_org']),
14
+ accepted_at: z.iso.datetime({ precision: 6 }),
15
+ text_id: z.string().min(1).max(80).regex(/\S/),
16
+ terms: legalDocumentReference,
17
+ dpa: legalDocumentReference.nullable(),
18
+ }).strict();
19
+ export const legalAcceptanceListResponse = z.object({
20
+ acceptances: z.array(legalAcceptanceVersionRow),
21
+ next_cursor: legalAcceptanceCursor.nullable(),
22
+ }).strict();
@@ -0,0 +1,31 @@
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 declare const httpsLegalUrl: z.ZodURL;
5
+ /** A permanent link to exactly one dated version of a legal document. */
6
+ export declare const legalDocumentReference: z.ZodObject<{
7
+ version: z.ZodString;
8
+ version_date: z.ZodISODate;
9
+ url: z.ZodURL;
10
+ }, z.core.$strict>;
11
+ export type LegalDocumentReference = z.infer<typeof legalDocumentReference>;
12
+ /** The DPA is null only in an acceptance context where it does not apply. */
13
+ export declare const legalTextReferences: z.ZodObject<{
14
+ terms: z.ZodObject<{
15
+ version: z.ZodString;
16
+ version_date: z.ZodISODate;
17
+ url: z.ZodURL;
18
+ }, z.core.$strict>;
19
+ dpa: z.ZodNullable<z.ZodObject<{
20
+ version: z.ZodString;
21
+ version_date: z.ZodISODate;
22
+ url: z.ZodURL;
23
+ }, z.core.$strict>>;
24
+ }, z.core.$strict>;
25
+ export type LegalTextReferences = z.infer<typeof legalTextReferences>;
26
+ export declare const TERMS_VERSION = "1.0";
27
+ export declare const TERMS_VERSION_DATE = "2026-11-01";
28
+ export declare const TERMS_VERSION_URL = "https://fleetless.dev/terms/v1.0/";
29
+ export declare const DPA_VERSION = "1.0";
30
+ export declare const DPA_VERSION_DATE = "2026-11-01";
31
+ export declare const DPA_VERSION_URL = "https://fleetless.dev/dpa/v1.0/";
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
@@ -7,8 +7,10 @@ import { feedbackRequest, feedbackResponse } from './feedback.js';
7
7
  import { CLIENT_OIDC_CALLBACK_PATH, clientAcceptInvitationRequest, clientIdentity, clientLoginCodeRequest, clientLoginCodeVerifyRequest, clientLoginRequest, clientLogoutRequest, clientMcpInteraction, clientMcpInteractionDecisionResponse, clientOidcCallbackQuery, clientOidcExchangeRequest, clientOidcStartQuery, clientPasswordResetConfirmRequest, clientPasswordResetRequest, clientProviderListQuery, clientProviderListResponse, clientRefreshRequest, clientRegisterRequest, clientResendVerificationRequest, clientSignInResult, clientTwoFactorDisableRequest, clientTwoFactorSetupConfirmRequest, clientTwoFactorSetupConfirmResponse, clientTwoFactorSetupRequest, clientTwoFactorVerifyRequest, clientVerifyEmailRequest, mcpConsentGrantListResponse, } from './client-auth.js';
8
8
  import { clientRobotListResponse } from './client-robots.js';
9
9
  import { appAuthConfig, appInvitation, appInvitationListResponse, appMailTemplate, appMailTemplateListResponse, appOidcProvider, appOidcProviderListResponse, appUser, appUserListResponse, createAppInvitationRequest, createAppOidcProviderRequest, createAppUserRequest, mailOutcome, mailTemplatePreviewRequest, mailTemplatePreviewResponse, patchAppOidcProviderRequest, patchAppUserRequest, putAppAuthLookRequest, putAppAuthMcpRequest, putAppAuthRegistrationRequest, putAppAuthSignInRequest, putAppAuthUrlsRequest, putAppMailTemplateRequest, } from './app-users.js';
10
+ import { controllerRegisterOrgResponse, controllerRegisterWrite } from './controller-register.js';
10
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';
11
12
  import { jobRunListResponse, jobRunQuery, jobRunSummary, jobRunSummaryQuery } from './jobs.js';
13
+ import { legalAcceptanceListQuery, legalAcceptanceListResponse } from './legal-acceptances.js';
12
14
  import { MCP_APP_PATHS, mcpRobotDatasheet, mcpRolePreviewResponse } from './mcp.js';
13
15
  import { authorizationServerMetadata, dynamicClientRegistrationRequest, dynamicClientRegistrationResponse, oauthAuthorizeQuery, oauthRedirectResponse, oauthTokenRequest, oauthTokenResponse, protectedResourceMetadata, } from './oauth.js';
14
16
  import { adminPlanChangeRequest, orgPlan, planChangeRequest } from './plans.js';
@@ -463,6 +465,36 @@ export const ROUTES = [
463
465
  'capped by its own global ceiling, above which the row is still written and the mail is skipped.',
464
466
  },
465
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
+ },
480
+ {
481
+ method: 'GET', path: '/api/org/controller-register', section: 'org',
482
+ summary: "Reads the calling owner's customer-confirmed controller register details.",
483
+ audience: 'developer', auth: 'developer', rateLimited: false, ownerTier: true, status: 200,
484
+ params: [], query: null, request: null, response: controllerRegisterOrgResponse,
485
+ errors: [...DEVELOPER_GUARD, 'tier_required'], transport: 'http',
486
+ notes: 'The authenticated org is the only source. Members and support sessions receive no register data. ' +
487
+ 'A missing detail record is null. Billing data never populates this response. Access is audited.',
488
+ },
489
+ {
490
+ method: 'PUT', path: '/api/org/controller-register', section: 'org',
491
+ summary: "Replaces the calling owner's confirmed controller register details.",
492
+ audience: 'developer', auth: 'developer', rateLimited: false, ownerTier: true, status: 200,
493
+ params: [], query: null, request: controllerRegisterWrite, response: controllerRegisterOrgResponse,
494
+ errors: [...DEVELOPER_GUARD, 'tier_required', 'validation_error'], transport: 'http',
495
+ notes: 'The authenticated org is the only target. Null contacts explicitly clear earlier values. ' +
496
+ 'The write is atomic and audited; billing data is never an implicit source. Support sessions cannot write.',
497
+ },
466
498
  {
467
499
  method: 'GET', path: '/api/audit', section: 'org',
468
500
  summary: "Reads the org's audit log, newest first, cursor-paged over the durable sequence number.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fleetless/contracts",
3
- "version": "8.1.0",
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",