@fleetless/contracts 14.0.0 → 15.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.
Files changed (119) hide show
  1. package/CHANGELOG.md +163 -0
  2. package/artifacts/openapi.json +19842 -11398
  3. package/artifacts/routes.json +1160 -39
  4. package/artifacts/schema/addon-catalogue-entry.schema.json +3 -1
  5. package/artifacts/schema/admin-plan-change-request.schema.json +26 -0
  6. package/artifacts/schema/app-deletion-summary.schema.json +15 -1
  7. package/artifacts/schema/asset-plan-limit-details.schema.json +3 -1
  8. package/artifacts/schema/cloud-config.schema.json +5 -5
  9. package/artifacts/schema/collection-actor.schema.json +35 -0
  10. package/artifacts/schema/collection-definitions-response.schema.json +612 -0
  11. package/artifacts/schema/collection-event.schema.json +216 -0
  12. package/artifacts/schema/collection-export-query.schema.json +56 -0
  13. package/artifacts/schema/collection-filter.schema.json +9 -0
  14. package/artifacts/schema/collection-import-preview.schema.json +143 -0
  15. package/artifacts/schema/collection-import-request.schema.json +105 -0
  16. package/artifacts/schema/collection-import-result.schema.json +38 -0
  17. package/artifacts/schema/collection-list-response.schema.json +119 -0
  18. package/artifacts/schema/collection-record-get-query.schema.json +12 -0
  19. package/artifacts/schema/collection-record-history-query.schema.json +35 -0
  20. package/artifacts/schema/collection-record-history-response.schema.json +389 -0
  21. package/artifacts/schema/collection-record-list-query.schema.json +67 -0
  22. package/artifacts/schema/collection-record-list-response.schema.json +212 -0
  23. package/artifacts/schema/collection-record-restore-request.schema.json +14 -0
  24. package/artifacts/schema/collection-record-write.schema.json +31 -0
  25. package/artifacts/schema/collection-record.schema.json +180 -0
  26. package/artifacts/schema/collection-revision.schema.json +295 -0
  27. package/artifacts/schema/collection-subscribe-error.schema.json +31 -0
  28. package/artifacts/schema/collection-subscribe.schema.json +48 -0
  29. package/artifacts/schema/collection-subscribed.schema.json +22 -0
  30. package/artifacts/schema/collection-summary.schema.json +92 -0
  31. package/artifacts/schema/collection-unsubscribe.schema.json +22 -0
  32. package/artifacts/schema/collections-access-change.schema.json +34 -0
  33. package/artifacts/schema/collections-document.schema.json +732 -0
  34. package/artifacts/schema/collections-draft-response.schema.json +845 -0
  35. package/artifacts/schema/collections-effect.schema.json +384 -0
  36. package/artifacts/schema/collections-issue.schema.json +36 -0
  37. package/artifacts/schema/collections-publish-request.schema.json +18 -0
  38. package/artifacts/schema/collections-publish-response.schema.json +450 -0
  39. package/artifacts/schema/collections-purge-preview.schema.json +60 -0
  40. package/artifacts/schema/collections-purge-request.schema.json +27 -0
  41. package/artifacts/schema/collections-purge-response.schema.json +30 -0
  42. package/artifacts/schema/collections-restore-preview-query.schema.json +20 -0
  43. package/artifacts/schema/collections-restore-preview.schema.json +581 -0
  44. package/artifacts/schema/collections-restore-request.schema.json +27 -0
  45. package/artifacts/schema/collections-restore-response.schema.json +455 -0
  46. package/artifacts/schema/collections-schema-preview.schema.json +519 -0
  47. package/artifacts/schema/collections-schema-published.schema.json +22 -0
  48. package/artifacts/schema/collections-version-response.schema.json +869 -0
  49. package/artifacts/schema/collections-version-summary.schema.json +139 -0
  50. package/artifacts/schema/collections-versions-response.schema.json +167 -0
  51. package/artifacts/schema/config-draft-response.schema.json +5 -5
  52. package/artifacts/schema/config-version-response.schema.json +5 -5
  53. package/artifacts/schema/confirmation-required-details.schema.json +13 -0
  54. package/artifacts/schema/dangling-reference.schema.json +7 -6
  55. package/artifacts/schema/datapoint-list-response.schema.json +2 -2
  56. package/artifacts/schema/effective-rights-response.schema.json +87 -1
  57. package/artifacts/schema/org-plan.schema.json +29 -1
  58. package/artifacts/schema/org-quota-usage-counts.schema.json +18 -0
  59. package/artifacts/schema/org-quota-usage.schema.json +47 -1
  60. package/artifacts/schema/org-quotas.schema.json +29 -1
  61. package/artifacts/schema/org-role-list-response.schema.json +8 -7
  62. package/artifacts/schema/org-role.schema.json +1 -1
  63. package/artifacts/schema/plan-catalogue-entry.schema.json +29 -1
  64. package/artifacts/schema/plan-change-decision-status-response.schema.json +29 -1
  65. package/artifacts/schema/plan-limit-details.schema.json +3 -1
  66. package/artifacts/schema/plan-limits.schema.json +29 -1
  67. package/artifacts/schema/plan-overrides.schema.json +26 -0
  68. package/artifacts/schema/put-collections-draft-request.schema.json +16 -0
  69. package/artifacts/schema/record-changed-details.schema.json +16 -0
  70. package/artifacts/schema/record-referenced-details.schema.json +35 -0
  71. package/artifacts/schema/reference-invalid-details.schema.json +25 -0
  72. package/artifacts/schema/reference-place.schema.json +7 -6
  73. package/artifacts/schema/required-missing-details.schema.json +19 -0
  74. package/artifacts/schema/robot-config-doc.schema.json +5 -5
  75. package/artifacts/schema/robot-deletion-summary.schema.json +33 -1
  76. package/artifacts/schema/role-collection-rights.schema.json +82 -0
  77. package/artifacts/schema/role-rename-preview.schema.json +7 -6
  78. package/dist/apps.d.ts +18 -2
  79. package/dist/apps.js +12 -2
  80. package/dist/audit.d.ts +32 -2
  81. package/dist/audit.js +40 -2
  82. package/dist/collections-issues.d.ts +67 -0
  83. package/dist/collections-issues.js +340 -0
  84. package/dist/collections-records.d.ts +562 -0
  85. package/dist/collections-records.js +525 -0
  86. package/dist/collections-rights.d.ts +17 -0
  87. package/dist/collections-rights.js +41 -0
  88. package/dist/collections-schema.d.ts +1064 -0
  89. package/dist/collections-schema.js +386 -0
  90. package/dist/collections-templates.d.ts +55 -0
  91. package/dist/collections-templates.js +137 -0
  92. package/dist/collections-transfer.d.ts +101 -0
  93. package/dist/collections-transfer.js +206 -0
  94. package/dist/collections-values.d.ts +67 -0
  95. package/dist/collections-values.js +284 -0
  96. package/dist/collections.d.ts +568 -0
  97. package/dist/collections.js +332 -0
  98. package/dist/config.d.ts +8 -8
  99. package/dist/config.js +13 -13
  100. package/dist/errors.d.ts +50 -1
  101. package/dist/errors.js +115 -0
  102. package/dist/index.d.ts +24 -8
  103. package/dist/index.js +13 -3
  104. package/dist/org-roles.d.ts +4 -0
  105. package/dist/org-roles.js +10 -9
  106. package/dist/plans.d.ts +19 -1
  107. package/dist/plans.js +21 -1
  108. package/dist/realtime.d.ts +166 -0
  109. package/dist/realtime.js +163 -0
  110. package/dist/rest.d.ts +28 -28
  111. package/dist/rest.js +39 -27
  112. package/dist/rights.d.ts +2 -2
  113. package/dist/rights.js +1 -1
  114. package/dist/routes.d.ts +1 -1
  115. package/dist/routes.js +495 -21
  116. package/package.json +1 -1
  117. package/artifacts/schema/put-robot-details-request.schema.json +0 -41
  118. package/artifacts/schema/put-robot-details-response.schema.json +0 -43
  119. package/artifacts/schema/robot-details-doc.schema.json +0 -33
package/dist/index.d.ts CHANGED
@@ -43,14 +43,14 @@ export { referencePlace, orgRole, danglingReference, orgRoleListResponse, create
43
43
  export type { ReferencePlace, OrgRole, DanglingReference, OrgRoleListResponse, CreateOrgRoleRequest, PatchOrgRoleRequest, RoleRenamePreview, RoleDefaultsResponse, PutRoleDefaultsRequest, } from './org-roles.js';
44
44
  export { rosGraphEntry, rosGraph, typeField, typeDefinition, parameterFieldsOf } from './introspection.js';
45
45
  export type { RosGraphEntry, RosGraph, TypeField, TypeDefinition } from './introspection.js';
46
- export { robot, patchRobotResponse, robotToken, createRobotRequest, createRobotResponse, robotTokenRotateResponse, jointStatePutRequest, jointStatePutResponse, exposureCounts, protocolStatusValue, robotListItem, robotListResponse, datapointValue, robotDetailResponse, configAuthor, configDraftResponse, putConfigDraftRequest, publishConfigResponse, configVersionsResponse, configVersionResponse, introspectionResponse, typesResponse, fetchTypesRequest, fetchTypesResponse, datapointDescriptor, datapointListResponse, robotDetailsDoc, putRobotDetailsResponse, putRobotDetailsRequest, invokeRequest, invokeResponse, cancelRequest, recoverHeldJobRequest, recoverHeldJobResponse, releaseLiveQuery, serviceCallResponse, invokeOrServiceResponse, publishRequest, jobResponse, robotJobsResponse, rateLimitDetails, exposure, exposureListResponse, SNAPSHOT_HEADERS, ASSET_UPLOAD_HEADERS, cameraDescriptor, cameraListResponse, liveSessionResponse, snapshotMetaResponse, historyQuery, historySamplesResponse, historyBucketsResponse, historyResponse, orgQuotas, orgQuotaUsage, orgQuotaUsageCounts, robotDeletionSummary, RESOURCE_HEALTH_STATES, resourceHealthState, resourceHealthListResponse, orgHealthQuery, robotDeleteQuery, patchRobotRequest, renameSlugRequest, renameSlugResponse, slugUsageResponse, } from './rest.js';
46
+ export { robot, patchRobotResponse, robotToken, createRobotRequest, createRobotResponse, robotTokenRotateResponse, jointStatePutRequest, jointStatePutResponse, exposureCounts, protocolStatusValue, robotListItem, robotListResponse, datapointValue, robotDetailResponse, configAuthor, configDraftResponse, putConfigDraftRequest, publishConfigResponse, configVersionsResponse, configVersionResponse, introspectionResponse, typesResponse, fetchTypesRequest, fetchTypesResponse, datapointDescriptor, datapointListResponse, invokeRequest, invokeResponse, cancelRequest, recoverHeldJobRequest, recoverHeldJobResponse, releaseLiveQuery, serviceCallResponse, invokeOrServiceResponse, publishRequest, jobResponse, robotJobsResponse, rateLimitDetails, exposure, exposureListResponse, SNAPSHOT_HEADERS, ASSET_UPLOAD_HEADERS, cameraDescriptor, cameraListResponse, liveSessionResponse, snapshotMetaResponse, historyQuery, historySamplesResponse, historyBucketsResponse, historyResponse, orgQuotas, orgQuotaUsage, orgQuotaUsageCounts, robotDeletionSummary, RESOURCE_HEALTH_STATES, resourceHealthState, resourceHealthListResponse, orgHealthQuery, robotDeleteQuery, patchRobotRequest, renameSlugRequest, renameSlugResponse, slugUsageResponse, } from './rest.js';
47
47
  export type { HistoryQuery, HistorySamplesResponse, HistoryResponse, HistoryBucketsResponse, OrgQuotas, OrgQuotaUsage, OrgQuotaUsageCounts, RobotDeletionSummary, ResourceHealthState, ResourceHealthListResponse, OrgHealthQuery, RobotDeleteQuery, PatchRobotRequest, RenameSlugRequest, RenameSlugResponse, SlugUsageResponse, } from './rest.js';
48
48
  export { LATENCY_BUCKET_MS, BRIDGE_LATENCY_RETENTION_DAYS, MAX_LATENCY_BUCKETS_PER_RESPONSE, latencyBucket, robotLatencySeries, orgLatencyQuery, orgLatencyResponse, USAGE_WINDOW_MAX_DAYS, usageMetric, usageDay, orgUsageQuery, usageRow, orgUsageResponse, } from './rest.js';
49
49
  export type { LatencyBucket, RobotLatencySeries, OrgLatencyResponse } from './rest.js';
50
50
  export type { UsageMetric, OrgUsageQuery, UsageRow, OrgUsageResponse } from './rest.js';
51
- export type { Robot, PatchRobotResponse, CreateRobotRequest, CreateRobotResponse, RobotTokenRotateResponse, JointStatePutRequest, JointStatePutResponse, ExposureCounts, ProtocolStatusValue, RobotListItem, RobotListResponse, DatapointValue, RobotDetailResponse, ConfigAuthor, ConfigDraftResponse, PutConfigDraftRequest, PublishConfigResponse, ConfigVersionsResponse, ConfigVersionResponse, IntrospectionResponse, TypesResponse, FetchTypesRequest, FetchTypesResponse, DatapointDescriptor, DatapointListResponse, RobotDetailsDoc, PutRobotDetailsResponse, PutRobotDetailsRequest, InvokeRequest, InvokeResponse, CancelRequest, RecoverHeldJobRequest, RecoverHeldJobResponse, ReleaseLiveQuery, ServiceCallResponse, InvokeOrServiceResponse, PublishRequest, JobResponse, RobotJobsResponse, RateLimitDetails, Exposure, ExposureListResponse, CameraDescriptor, CameraListResponse, LiveSessionResponse, SnapshotMetaResponse, } from './rest.js';
52
- 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';
53
- 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';
51
+ export type { Robot, PatchRobotResponse, CreateRobotRequest, CreateRobotResponse, RobotTokenRotateResponse, JointStatePutRequest, JointStatePutResponse, ExposureCounts, ProtocolStatusValue, RobotListItem, RobotListResponse, DatapointValue, RobotDetailResponse, ConfigAuthor, ConfigDraftResponse, PutConfigDraftRequest, PublishConfigResponse, ConfigVersionsResponse, ConfigVersionResponse, IntrospectionResponse, TypesResponse, FetchTypesRequest, FetchTypesResponse, DatapointDescriptor, DatapointListResponse, InvokeRequest, InvokeResponse, CancelRequest, RecoverHeldJobRequest, RecoverHeldJobResponse, ReleaseLiveQuery, ServiceCallResponse, InvokeOrServiceResponse, PublishRequest, JobResponse, RobotJobsResponse, RateLimitDetails, Exposure, ExposureListResponse, CameraDescriptor, CameraListResponse, LiveSessionResponse, SnapshotMetaResponse, } from './rest.js';
52
+ 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, collectionSubscribe, collectionSubscribed, collectionUnsubscribe, collectionEvent, collectionSubscribeError, collectionsSchemaPublished, } from './realtime.js';
53
+ 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, CollectionSubscribe, CollectionSubscribed, CollectionUnsubscribe, CollectionEvent, CollectionSubscribeError, CollectionsSchemaPublished, } from './realtime.js';
54
54
  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';
55
55
  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';
56
56
  export { FEEDBACK_KINDS, FEEDBACK_MESSAGE_MAX, feedbackKind, feedbackRequest, feedbackResponse } from './feedback.js';
@@ -71,12 +71,12 @@ export { APP_USER_DISPLAY_NAME_MAX, APP_URL_PLACEHOLDERS, MAIL_TEMPLATE_VARIABLE
71
71
  export type { AppUserStatus, AppUser, AppUserListResponse, CreateAppUserRequest, PatchAppUserRequest, CreateAppInvitationRequest, AppInvitation, PendingAppInvitation, AppInvitationListResponse, AppOidcProvider, AppOidcProviderListResponse, CreateAppOidcProviderRequest, PatchAppOidcProviderRequest, AppAuthConfig, AppSignInMethods, AppTwoFactorPolicy, AppHostedPages, HostedLogoShape, PutAppAuthRegistrationRequest, PutAppAuthSignInRequest, PutAppAuthUrlsRequest, PutAppAuthMcpRequest, PutAppAuthLookRequest, MailTemplateKind, AppMailTemplate, AppMailTemplateListResponse, PutAppMailTemplateRequest, MailTemplatePreviewRequest, MailTemplatePreviewResponse, MailTemplateProblemDetails, MailOutcome, } from './app-users.js';
72
72
  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';
73
73
  export type { AssetKind, Asset, UrdfCompleteness, AssetListResponse, AssetsClearResponse, MissingAssetQuery, AssetSyncRequest, AssetSyncResponse, AssetSyncState, AssetSyncStatus, AssetFailure, AssetFailureKind, AssetStoreRefusedDetails, AssetSyncBusyDetails, } from './assets.js';
74
- export { auditActor, auditEvent, auditQuery, auditListResponse, AUDIT_CSV_COLUMNS, AUDIT_RETENTION_DAYS } from './audit.js';
75
- export type { AuditActor, AuditEvent, AuditQuery, AuditListResponse } from './audit.js';
74
+ export { auditActor, auditEvent, auditQuery, auditListResponse, AUDIT_CSV_COLUMNS, AUDIT_RETENTION_DAYS, COLLECTION_AUDIT_ACTIONS } from './audit.js';
75
+ export type { AuditActor, AuditEvent, AuditQuery, AuditListResponse, CollectionAuditAction } from './audit.js';
76
76
  export { alertRowCondition, alertSeverity, alertState, datapointAlertRow, alertListResponse, orgFiringAlertsResponse, orgAlertsQuery, datapointDisplay, putDatapointDisplayRequest, } from './alerts.js';
77
77
  export type { AlertRowCondition, AlertSeverity, AlertState, DatapointAlertRow, AlertListResponse, OrgFiringAlertsResponse, OrgAlertsQuery, DatapointDisplay, PutDatapointDisplayRequest, } from './alerts.js';
78
- export { apiError, parameterViolation, parameterInvalidDetails, cancelRejectedDetails, invalidCodeDetails, ERROR_CODES, planLimitDetails, assetPlanLimitDetails, planRequiredDetails, orgLockedDetails, fileTooLargeDetails, paymentProviderUnavailableDetails, billingDocumentsUnavailableDetails, roleCycleDetails, } from './errors.js';
79
- export type { ApiError, ParameterViolation, ParameterInvalidDetails, CancelRejectedDetails, InvalidCodeDetails, ErrorCode, PlanLimitDetails, AssetPlanLimitDetails, PlanRequiredDetails, OrgLockedDetails, FileTooLargeDetails, PaymentProviderUnavailableDetails, BillingDocumentsUnavailableDetails, RoleCycleDetails, } from './errors.js';
78
+ export { apiError, parameterViolation, parameterInvalidDetails, cancelRejectedDetails, invalidCodeDetails, ERROR_CODES, planLimitDetails, assetPlanLimitDetails, planRequiredDetails, orgLockedDetails, fileTooLargeDetails, paymentProviderUnavailableDetails, billingDocumentsUnavailableDetails, confirmationRequiredDetails, recordReferencedDetails, recordChangedDetails, referenceInvalidDetails, requiredMissingDetails, roleCycleDetails, } from './errors.js';
79
+ export type { ApiError, ParameterViolation, ParameterInvalidDetails, CancelRejectedDetails, InvalidCodeDetails, ErrorCode, PlanLimitDetails, AssetPlanLimitDetails, PlanRequiredDetails, OrgLockedDetails, FileTooLargeDetails, PaymentProviderUnavailableDetails, BillingDocumentsUnavailableDetails, ConfirmationRequiredDetails, RecordReferencedDetails, RecordChangedDetails, ReferenceInvalidDetails, RequiredMissingDetails, RoleCycleDetails, } from './errors.js';
80
80
  export { oauthErrorCode, oauthError, oauthRedirectResponse, oauthCodeTokenRequest, oauthRefreshTokenRequest, oauthTokenRequest, oauthTokenResponse, redirectUri, codeChallengeMethod, oauthAuthorizeQuery, dynamicClientRegistrationRequest, MCP_DCR_MAX_REDIRECT_URIS, dynamicClientRegistrationResponse, authorizationServerMetadata, protectedResourceMetadata, } from './oauth.js';
81
81
  export type { OauthErrorCode, OauthError, OauthRedirectResponse, OauthCodeTokenRequest, OauthRefreshTokenRequest, OauthTokenRequest, OauthTokenResponse, RedirectUri, OauthAuthorizeQuery, DynamicClientRegistrationRequest, DynamicClientRegistrationResponse, AuthorizationServerMetadata, ProtectedResourceMetadata, } from './oauth.js';
82
82
  export { ROUTES, ROUTE_SECTIONS, IN_HANDLER_ROUTES, developerSignInRoutes } from './routes.js';
@@ -92,3 +92,19 @@ export { controllerRegisterAddress, controllerRegisterPrivacyContact, controller
92
92
  export type { ControllerRegisterWrite, ControllerRegisterOrgResponse } from './controller-register.js';
93
93
  export { purchaseBillingDetails, purchaseOperationKey, purchaseOperation, purchaseQuote, billingDecisionDisplayRequest, confirmationProof, billingDecisionAmounts, billingDecisionPeriod, billingDecisionSnapshot, billingDecisionDisplayResponse, planChangePrepareResponse, purchaseHoldReason, purchaseRefusalRule, purchaseIntent, purchaseIntentLookupQuery, purchaseIntentDraft, purchaseIntentPaymentStarted, purchaseIntentAcceptedWithoutPayment, purchaseIntentConfirmRequest, purchaseConflictDetails, invoicePayRequest, purchaseIntentResponse, vatDecision, viesPendingReason, } from './billing.js';
94
94
  export type { PurchaseBillingDetails, PurchaseOperation, PurchaseQuote, PurchaseIntent, PurchaseIntentDraft, PurchaseIntentPaymentStarted, PurchaseIntentAcceptedWithoutPayment, BillingDecisionDisplayRequest, ConfirmationProof, BillingDecisionAmounts, BillingDecisionPeriod, BillingDecisionSnapshot, BillingDecisionDisplayResponse, PlanChangePrepareResponse, PurchaseIntentLookupQuery, PurchaseIntentConfirmRequest, PurchaseConflictDetails, InvoicePayRequest, PurchaseIntentResponse, ViesVerdict, ViesPendingReason, } from './billing.js';
95
+ export { COLLECTIONS_FORMAT_VERSION, COLLECTION_RESERVED_KEYS, COLLECTION_LIMITS, collectionKey, collectionBinding, collectionFieldType, collectionField, collectionAccessValue, collectionAccess, collectionDefinition, collectionsDocument, } from './collections.js';
96
+ export type { CollectionKey, CollectionBinding, CollectionFieldType, CollectionField, CollectionAccessValue, CollectionAccess, CollectionDefinition, CollectionsDocument, } from './collections.js';
97
+ export { roleCollectionRights } from './collections-rights.js';
98
+ export type { RoleCollectionRights } from './collections-rights.js';
99
+ export { collectionJsonTemplateName, COLLECTION_JSON_TEMPLATES, parseDisplayTemplate } from './collections-templates.js';
100
+ export type { CollectionJsonTemplateName, DisplayPlaceholder, DisplayTemplateParse } from './collections-templates.js';
101
+ export { checkCollectionValue, normalizeCollectionValue } from './collections-values.js';
102
+ export type { CollectionValueProblem, CollectionValueOptions } from './collections-values.js';
103
+ export { collectionsIssue, collectionsDocumentIssues, collectionsAccessWarnings } from './collections-issues.js';
104
+ export type { CollectionsIssue, CollectionsDocumentIssuesOptions } from './collections-issues.js';
105
+ export { COLLECTION_FILTER_OPS, COLLECTION_FILTER_SYSTEM_KEYS, collectionActor, collectionRecord, collectionFilter, parseCollectionFilter, parseCollectionSort, collectionRecordListQuery, collectionRecordGetQuery, collectionRecordListResponse, collectionRecordWrite, collectionRevision, collectionRecordHistoryQuery, collectionRecordHistoryResponse, collectionRecordRestoreRequest, collectionSummary, collectionListResponse, collectionDefinitionsResponse, } from './collections-records.js';
106
+ export type { CollectionActor, CollectionRecord, CollectionFilter, CollectionFilterOp, CollectionFilterNode, CollectionFilterIssue, CollectionFilterParse, CollectionSortField, CollectionSortParse, CollectionRecordListQuery, CollectionRecordGetQuery, CollectionRecordListResponse, CollectionRecordWrite, CollectionRevision, CollectionRecordHistoryQuery, CollectionRecordHistoryResponse, CollectionRecordRestoreRequest, CollectionSummary, CollectionListResponse, CollectionDefinitionsResponse, } from './collections-records.js';
107
+ export { collectionsEffect, collectionsAccessChange, collectionsSchemaPreview, collectionsDraftResponse, putCollectionsDraftRequest, collectionsPublishRequest, collectionsPublishResponse, collectionsVersionSummary, collectionsVersionsResponse, collectionsVersionResponse, collectionsRestorePreview, collectionsRestorePreviewQuery, collectionsRestoreRequest, collectionsRestoreResponse, collectionsPurgeRequest, collectionsPurgePreview, collectionsPurgeResponse, } from './collections-schema.js';
108
+ export type { CollectionsEffect, CollectionsAccessChange, CollectionsSchemaPreview, CollectionsDraftResponse, PutCollectionsDraftRequest, CollectionsPublishRequest, CollectionsPublishResponse, CollectionsVersionSummary, CollectionsVersionsResponse, CollectionsVersionResponse, CollectionsRestorePreview, CollectionsRestorePreviewQuery, CollectionsRestoreRequest, CollectionsRestoreResponse, CollectionsPurgeRequest, CollectionsPurgePreview, CollectionsPurgeResponse, } from './collections-schema.js';
109
+ export { collectionImportRequest, collectionImportPreview, collectionImportResult, collectionExportQuery, } from './collections-transfer.js';
110
+ export type { CollectionImportRequest, CollectionImportPreview, CollectionImportResult, CollectionExportQuery, } from './collections-transfer.js';
package/dist/index.js CHANGED
@@ -34,7 +34,7 @@ export { ROLE_KEY_PATTERN, ROLE_KEY_RULE, roleKey, roleRef, ACCESS_KINDS, access
34
34
  /** Organization roles on the wire: the role list, create and change, the rename preview and the organization's defaults. See `org-roles.ts`. */
35
35
  export { referencePlace, orgRole, danglingReference, orgRoleListResponse, createOrgRoleRequest, patchOrgRoleRequest, roleRenamePreview, roleDefaultsResponse, putRoleDefaultsRequest, } from './org-roles.js';
36
36
  export { rosGraphEntry, rosGraph, typeField, typeDefinition, parameterFieldsOf } from './introspection.js';
37
- export { robot, patchRobotResponse, robotToken, createRobotRequest, createRobotResponse, robotTokenRotateResponse, jointStatePutRequest, jointStatePutResponse, exposureCounts, protocolStatusValue, robotListItem, robotListResponse, datapointValue, robotDetailResponse, configAuthor, configDraftResponse, putConfigDraftRequest, publishConfigResponse, configVersionsResponse, configVersionResponse, introspectionResponse, typesResponse, fetchTypesRequest, fetchTypesResponse, datapointDescriptor, datapointListResponse, robotDetailsDoc, putRobotDetailsResponse, putRobotDetailsRequest, invokeRequest, invokeResponse,
37
+ export { robot, patchRobotResponse, robotToken, createRobotRequest, createRobotResponse, robotTokenRotateResponse, jointStatePutRequest, jointStatePutResponse, exposureCounts, protocolStatusValue, robotListItem, robotListResponse, datapointValue, robotDetailResponse, configAuthor, configDraftResponse, putConfigDraftRequest, publishConfigResponse, configVersionsResponse, configVersionResponse, introspectionResponse, typesResponse, fetchTypesRequest, fetchTypesResponse, datapointDescriptor, datapointListResponse, invokeRequest, invokeResponse,
38
38
  // Addressing.
39
39
  cancelRequest, recoverHeldJobRequest, recoverHeldJobResponse, releaseLiveQuery, serviceCallResponse, invokeOrServiceResponse, publishRequest, jobResponse, robotJobsResponse, rateLimitDetails, exposure, exposureListResponse, SNAPSHOT_HEADERS, ASSET_UPLOAD_HEADERS, cameraDescriptor, cameraListResponse, liveSessionResponse, snapshotMetaResponse,
40
40
  // Retention, history, quotas.
@@ -42,7 +42,7 @@ historyQuery, historySamplesResponse, historyBucketsResponse, historyResponse, o
42
42
  // Robot rename, slug rename.
43
43
  patchRobotRequest, renameSlugRequest, renameSlugResponse, slugUsageResponse, } from './rest.js';
44
44
  export { LATENCY_BUCKET_MS, BRIDGE_LATENCY_RETENTION_DAYS, MAX_LATENCY_BUCKETS_PER_RESPONSE, latencyBucket, robotLatencySeries, orgLatencyQuery, orgLatencyResponse, USAGE_WINDOW_MAX_DAYS, usageMetric, usageDay, orgUsageQuery, usageRow, orgUsageResponse, } from './rest.js';
45
- 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';
45
+ 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, collectionSubscribe, collectionSubscribed, collectionUnsubscribe, collectionEvent, collectionSubscribeError, collectionsSchemaPublished, } from './realtime.js';
46
46
  export { password, org, patchOrgResponse, sessionTokens, refreshRequest,
47
47
  // 2026-09-04 — the public site (closed beta).
48
48
  WAITLIST_F1_TEXT_VERSION, waitlistRequest,
@@ -68,7 +68,7 @@ export { legalAcceptanceListQuery, legalAcceptanceVersionRow, legalAcceptanceLis
68
68
  // The per-app identity space.
69
69
  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, hostedLogoShape, 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';
70
70
  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';
71
- export { auditActor, auditEvent, auditQuery, auditListResponse, AUDIT_CSV_COLUMNS, AUDIT_RETENTION_DAYS } from './audit.js';
71
+ export { auditActor, auditEvent, auditQuery, auditListResponse, AUDIT_CSV_COLUMNS, AUDIT_RETENTION_DAYS, COLLECTION_AUDIT_ACTIONS } from './audit.js';
72
72
  export { alertRowCondition, alertSeverity, alertState, datapointAlertRow, alertListResponse, orgFiringAlertsResponse, orgAlertsQuery, datapointDisplay, putDatapointDisplayRequest, } from './alerts.js';
73
73
  export { apiError, parameterViolation, parameterInvalidDetails, cancelRejectedDetails, invalidCodeDetails, ERROR_CODES,
74
74
  // 2026-10-02 — plans (#103). The plan errors (I-3).
@@ -79,6 +79,8 @@ fileTooLargeDetails,
79
79
  paymentProviderUnavailableDetails,
80
80
  // 2026-10-19 — Lexware billing documents (fleetless/fleetless#544).
81
81
  billingDocumentsUnavailableDetails,
82
+ // 2026-11-04 — app collections.
83
+ confirmationRequiredDetails, recordReferencedDetails, recordChangedDetails, referenceInvalidDetails, requiredMissingDetails,
82
84
  // Organization roles.
83
85
  roleCycleDetails, } from './errors.js';
84
86
  export { oauthErrorCode, oauthError, oauthRedirectResponse, oauthCodeTokenRequest, oauthRefreshTokenRequest, oauthTokenRequest, oauthTokenResponse, redirectUri, codeChallengeMethod, oauthAuthorizeQuery, dynamicClientRegistrationRequest, MCP_DCR_MAX_REDIRECT_URIS, dynamicClientRegistrationResponse, authorizationServerMetadata, protectedResourceMetadata, } from './oauth.js';
@@ -100,3 +102,11 @@ billingDocumentKind, billingDocumentStatus, billingDocumentProfile, billingDocum
100
102
  billingIssuer, billingChargeInvoice, billingCharge, chargePayRequest, } from './billing.js';
101
103
  export { controllerRegisterAddress, controllerRegisterPrivacyContact, controllerRegisterRepresentative, controllerRegisterWrite, controllerRegisterOrgRecord, controllerRegisterOrgResponse } from './controller-register.js';
102
104
  export { purchaseBillingDetails, purchaseOperationKey, purchaseOperation, purchaseQuote, billingDecisionDisplayRequest, confirmationProof, billingDecisionAmounts, billingDecisionPeriod, billingDecisionSnapshot, billingDecisionDisplayResponse, planChangePrepareResponse, purchaseHoldReason, purchaseRefusalRule, purchaseIntent, purchaseIntentLookupQuery, purchaseIntentDraft, purchaseIntentPaymentStarted, purchaseIntentAcceptedWithoutPayment, purchaseIntentConfirmRequest, purchaseConflictDetails, invoicePayRequest, purchaseIntentResponse, vatDecision, viesPendingReason, } from './billing.js';
105
+ export { COLLECTIONS_FORMAT_VERSION, COLLECTION_RESERVED_KEYS, COLLECTION_LIMITS, collectionKey, collectionBinding, collectionFieldType, collectionField, collectionAccessValue, collectionAccess, collectionDefinition, collectionsDocument, } from './collections.js';
106
+ export { roleCollectionRights } from './collections-rights.js';
107
+ export { collectionJsonTemplateName, COLLECTION_JSON_TEMPLATES, parseDisplayTemplate } from './collections-templates.js';
108
+ export { checkCollectionValue, normalizeCollectionValue } from './collections-values.js';
109
+ export { collectionsIssue, collectionsDocumentIssues, collectionsAccessWarnings } from './collections-issues.js';
110
+ export { COLLECTION_FILTER_OPS, COLLECTION_FILTER_SYSTEM_KEYS, collectionActor, collectionRecord, collectionFilter, parseCollectionFilter, parseCollectionSort, collectionRecordListQuery, collectionRecordGetQuery, collectionRecordListResponse, collectionRecordWrite, collectionRevision, collectionRecordHistoryQuery, collectionRecordHistoryResponse, collectionRecordRestoreRequest, collectionSummary, collectionListResponse, collectionDefinitionsResponse, } from './collections-records.js';
111
+ export { collectionsEffect, collectionsAccessChange, collectionsSchemaPreview, collectionsDraftResponse, putCollectionsDraftRequest, collectionsPublishRequest, collectionsPublishResponse, collectionsVersionSummary, collectionsVersionsResponse, collectionsVersionResponse, collectionsRestorePreview, collectionsRestorePreviewQuery, collectionsRestoreRequest, collectionsRestoreResponse, collectionsPurgeRequest, collectionsPurgePreview, collectionsPurgeResponse, } from './collections-schema.js';
112
+ export { collectionImportRequest, collectionImportPreview, collectionImportResult, collectionExportQuery, } from './collections-transfer.js';
@@ -12,6 +12,7 @@ export declare const referencePlace: z.ZodObject<{
12
12
  org_default: "org_default";
13
13
  app_user: "app_user";
14
14
  config: "config";
15
+ collection_schema: "collection_schema";
15
16
  invitation: "invitation";
16
17
  app_default: "app_default";
17
18
  role_inherits: "role_inherits";
@@ -47,6 +48,7 @@ export declare const danglingReference: z.ZodObject<{
47
48
  org_default: "org_default";
48
49
  app_user: "app_user";
49
50
  config: "config";
51
+ collection_schema: "collection_schema";
50
52
  invitation: "invitation";
51
53
  app_default: "app_default";
52
54
  role_inherits: "role_inherits";
@@ -82,6 +84,7 @@ export declare const orgRoleListResponse: z.ZodObject<{
82
84
  org_default: "org_default";
83
85
  app_user: "app_user";
84
86
  config: "config";
87
+ collection_schema: "collection_schema";
85
88
  invitation: "invitation";
86
89
  app_default: "app_default";
87
90
  role_inherits: "role_inherits";
@@ -139,6 +142,7 @@ export declare const roleRenamePreview: z.ZodObject<{
139
142
  org_default: "org_default";
140
143
  app_user: "app_user";
141
144
  config: "config";
145
+ collection_schema: "collection_schema";
142
146
  invitation: "invitation";
143
147
  app_default: "app_default";
144
148
  role_inherits: "role_inherits";
package/dist/org-roles.js CHANGED
@@ -26,32 +26,33 @@ const roleName = z.string().trim().min(1).max(ROLE_NAME_MAX);
26
26
  * so a client renders a row without switching on `kind` to find a field.
27
27
  */
28
28
  export const referencePlace = z.object({
29
- kind: z.enum(['config', 'app_user', 'invitation', 'app_default', 'role_inherits', 'org_default']).meta({
30
- description: 'What writes the key: `config` is a `role` or `access` value in a robot\'s `fleetless.yaml`, `app_user` an app user who holds it, ' +
31
- '`invitation` an invitation that carries it, `app_default` an app\'s default role, `role_inherits` another role that inherits from it, ' +
32
- 'and `org_default` one of the organization\'s defaults.',
29
+ kind: z.enum(['config', 'collection_schema', 'app_user', 'invitation', 'app_default', 'role_inherits', 'org_default']).meta({
30
+ description: 'What writes the key: `config` is a `role` or `access` value in a robot\'s `fleetless.yaml`, `collection_schema` an `access` entry of a collection ' +
31
+ 'in an app\'s collections schema, `app_user` an app user who holds it, `invitation` an invitation that carries it, `app_default` an app\'s ' +
32
+ 'default role, `role_inherits` another role that inherits from it, and `org_default` one of the organization\'s defaults.',
33
33
  }),
34
34
  label: z.string().meta({
35
- description: 'What a person reads to find the place: the robot name (`config`), the e-mail address of the app user or of the invitee (`app_user`, `invitation`), the app name (`app_default`), the name of the inheriting role (`role_inherits`), or the access kind of an organization default (`org_default`).',
35
+ description: 'What a person reads to find the place: the robot name (`config`), the app name (`collection_schema`, `app_default`), the e-mail address of the app user or of the invitee (`app_user`, `invitation`), the name of the inheriting role (`role_inherits`), or the access kind of an organization default (`org_default`).',
36
36
  }),
37
37
  path: z.string().nullable().meta({
38
38
  description: 'Where the key is written. For `config`, the place in the YAML, such as `services.arm_home.role` or `access.rules[1].role`; for ' +
39
+ '`collection_schema`, the place in the collections schema, such as `collections.notes.access.update.own[1]`; for ' +
39
40
  '`role_inherits`, the key of the role that inherits from it, because display names are not unique; `null` for every other kind.',
40
41
  }),
41
42
  robot_id: z.uuid().nullable().meta({
42
43
  description: 'The robot whose document holds the key (`config`); `null` for every other kind.',
43
44
  }),
44
45
  app_id: z.uuid().nullable().meta({
45
- description: 'The app the user, invitation or default role belongs to (`app_user`, `invitation`, `app_default`); `null` for every other kind.',
46
+ description: 'The app the key belongs to: the app whose collections schema holds it (`collection_schema`), or the app of the user, invitation or default role (`app_user`, `invitation`, `app_default`); `null` for every other kind.',
46
47
  }),
47
48
  user_id: z.uuid().nullable().meta({
48
49
  description: 'The app user who holds the key (`app_user`); `null` for every other kind.',
49
50
  }),
50
51
  document: z.enum(['published', 'draft']).nullable().meta({
51
- description: 'Which version of the robot\'s document holds the key (`config`): the published one or the draft; `null` for every other kind.',
52
+ description: 'Which version of the document holds the key (`config`: the robot\'s configuration, `collection_schema`: the app\'s collections schema): the published one or the draft; `null` for every other kind.',
52
53
  }),
53
54
  new_version: z.number().int().positive().nullable().meta({
54
- description: 'For a published document, the version number a rename with `update_references` would give it, a copy that differs only in the key; ' +
55
+ description: 'For a published document (`config` or `collection_schema`), the version number a rename with `update_references` would give it, a copy that differs only in the key; ' +
55
56
  '`null` for a draft and for every place that is no document.',
56
57
  }),
57
58
  });
@@ -77,7 +78,7 @@ export const orgRole = z.object({
77
78
  description: 'Apps that use this role as their default role.',
78
79
  }),
79
80
  references: z.number().int().nonnegative().meta({
80
- description: 'Places in documents that name this role, such as a `role` in a robot\'s `fleetless.yaml`. A rename with `update_references` rewrites them.',
81
+ description: 'Places in documents that name this role, such as a `role` in a robot\'s `fleetless.yaml` or an `access` entry in an app\'s collections schema. A rename with `update_references` rewrites them.',
81
82
  }),
82
83
  });
83
84
  /** A key that is written somewhere and is no role, with every place that writes it. */
package/dist/plans.d.ts CHANGED
@@ -25,7 +25,9 @@ export declare const PLAN_ORDER: readonly PlanId[];
25
25
  * The limits a plan ties a number to. `history_days` and `audit_days` are
26
26
  * not refused against — they size a retention window, not a quota that an
27
27
  * action can exceed — but they share this vocabulary because they are read
28
- * off the same catalogue row.
28
+ * off the same catalogue row. `collection_records` and `collection_bytes`
29
+ * are counted over the org's app collections, across all its apps, and
30
+ * refuse only what a person or an app adds: no add-on raises them.
29
31
  */
30
32
  export declare const planLimitKey: z.ZodEnum<{
31
33
  apps: "apps";
@@ -36,6 +38,8 @@ export declare const planLimitKey: z.ZodEnum<{
36
38
  asset_bytes_per_robot: "asset_bytes_per_robot";
37
39
  history_days: "history_days";
38
40
  audit_days: "audit_days";
41
+ collection_records: "collection_records";
42
+ collection_bytes: "collection_bytes";
39
43
  }>;
40
44
  export type PlanLimitKey = z.infer<typeof planLimitKey>;
41
45
  export declare const planLimits: z.ZodObject<{
@@ -47,6 +51,8 @@ export declare const planLimits: z.ZodObject<{
47
51
  asset_bytes_per_robot: z.ZodNullable<z.ZodNumber>;
48
52
  history_days: z.ZodNullable<z.ZodNumber>;
49
53
  audit_days: z.ZodNullable<z.ZodNumber>;
54
+ collection_records: z.ZodNullable<z.ZodNumber>;
55
+ collection_bytes: z.ZodNullable<z.ZodNumber>;
50
56
  }, z.core.$strip>;
51
57
  export type PlanLimits = z.infer<typeof planLimits>;
52
58
  /**
@@ -106,6 +112,8 @@ export declare const planCatalogueEntry: z.ZodObject<{
106
112
  asset_bytes_per_robot: z.ZodNullable<z.ZodNumber>;
107
113
  history_days: z.ZodNullable<z.ZodNumber>;
108
114
  audit_days: z.ZodNullable<z.ZodNumber>;
115
+ collection_records: z.ZodNullable<z.ZodNumber>;
116
+ collection_bytes: z.ZodNullable<z.ZodNumber>;
109
117
  }, z.core.$strip>;
110
118
  features: z.ZodObject<{
111
119
  require_two_factor: z.ZodBoolean;
@@ -158,6 +166,8 @@ export declare const addonCatalogueEntry: z.ZodObject<{
158
166
  asset_bytes_per_robot: "asset_bytes_per_robot";
159
167
  history_days: "history_days";
160
168
  audit_days: "audit_days";
169
+ collection_records: "collection_records";
170
+ collection_bytes: "collection_bytes";
161
171
  }>;
162
172
  per_unit: z.ZodNumber;
163
173
  prices: z.ZodObject<{
@@ -360,6 +370,8 @@ export declare const orgPlan: z.ZodObject<{
360
370
  asset_bytes_per_robot: z.ZodNullable<z.ZodNumber>;
361
371
  history_days: z.ZodNullable<z.ZodNumber>;
362
372
  audit_days: z.ZodNullable<z.ZodNumber>;
373
+ collection_records: z.ZodNullable<z.ZodNumber>;
374
+ collection_bytes: z.ZodNullable<z.ZodNumber>;
363
375
  }, z.core.$strip>;
364
376
  features: z.ZodObject<{
365
377
  require_two_factor: z.ZodBoolean;
@@ -508,6 +520,8 @@ export declare const planChangeDecisionStatusResponse: z.ZodDiscriminatedUnion<[
508
520
  asset_bytes_per_robot: z.ZodNullable<z.ZodNumber>;
509
521
  history_days: z.ZodNullable<z.ZodNumber>;
510
522
  audit_days: z.ZodNullable<z.ZodNumber>;
523
+ collection_records: z.ZodNullable<z.ZodNumber>;
524
+ collection_bytes: z.ZodNullable<z.ZodNumber>;
511
525
  }, z.core.$strip>;
512
526
  features: z.ZodObject<{
513
527
  require_two_factor: z.ZodBoolean;
@@ -581,6 +595,8 @@ export declare const planOverrides: z.ZodObject<{
581
595
  asset_bytes_per_robot: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
582
596
  history_days: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
583
597
  audit_days: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
598
+ collection_records: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
599
+ collection_bytes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
584
600
  }, z.core.$strict>;
585
601
  export type PlanOverrides = z.infer<typeof planOverrides>;
586
602
  /**
@@ -616,6 +632,8 @@ export declare const adminPlanChangeRequest: z.ZodObject<{
616
632
  asset_bytes_per_robot: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
617
633
  history_days: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
618
634
  audit_days: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
635
+ collection_records: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
636
+ collection_bytes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
619
637
  }, z.core.$strict>>;
620
638
  currency: z.ZodOptional<z.ZodEnum<{
621
639
  eur: "eur";
package/dist/plans.js CHANGED
@@ -21,7 +21,9 @@ export const PLAN_ORDER = ['basic', 'plus', 'pro', 'enterprise'];
21
21
  * The limits a plan ties a number to. `history_days` and `audit_days` are
22
22
  * not refused against — they size a retention window, not a quota that an
23
23
  * action can exceed — but they share this vocabulary because they are read
24
- * off the same catalogue row.
24
+ * off the same catalogue row. `collection_records` and `collection_bytes`
25
+ * are counted over the org's app collections, across all its apps, and
26
+ * refuse only what a person or an app adds: no add-on raises them.
25
27
  */
26
28
  export const planLimitKey = z.enum([
27
29
  'seats',
@@ -32,6 +34,8 @@ export const planLimitKey = z.enum([
32
34
  'asset_bytes_per_robot',
33
35
  'history_days',
34
36
  'audit_days',
37
+ 'collection_records',
38
+ 'collection_bytes',
35
39
  ]);
36
40
  /** `null` = by contract (Enterprise) or unlimited; see `orgPlan.limits`. */
37
41
  const limit = z.number().int().positive().nullable();
@@ -48,6 +52,14 @@ export const planLimits = z.object({
48
52
  }),
49
53
  history_days: limit.meta({ description: 'Days the org\'s robot history is kept.' }),
50
54
  audit_days: limit.meta({ description: 'Days the org\'s audit log is kept.' }),
55
+ collection_records: limit.meta({
56
+ description: 'Records in the app collections of all the org\'s apps, together. Only current records count, deleted ones and the history do not. ' +
57
+ 'A write or an import that would add records past it is refused `409 plan_limit` naming this key; reads continue.',
58
+ }),
59
+ collection_bytes: limit.meta({
60
+ description: 'Bytes the current records of all the org\'s app collections occupy, as stored JSON (decimal: 1 GB = 1,000,000,000). The history is ' +
61
+ 'shown beside it and not limited. A write or an import that would add data past it is refused `409 plan_limit` naming this key; reads continue.',
62
+ }),
51
63
  });
52
64
  /**
53
65
  * What a plan unlocks beyond a number: `app_mcp` (the app's MCP server),
@@ -143,6 +155,8 @@ export const PLANS = {
143
155
  asset_bytes_per_robot: 1_000_000_000,
144
156
  history_days: 7,
145
157
  audit_days: 7,
158
+ collection_records: 25_000,
159
+ collection_bytes: 1_000_000_000,
146
160
  },
147
161
  features: {
148
162
  app_mcp: false,
@@ -168,6 +182,8 @@ export const PLANS = {
168
182
  asset_bytes_per_robot: 2_000_000_000,
169
183
  history_days: 30,
170
184
  audit_days: 30,
185
+ collection_records: 250_000,
186
+ collection_bytes: 10_000_000_000,
171
187
  },
172
188
  features: {
173
189
  app_mcp: true,
@@ -193,6 +209,8 @@ export const PLANS = {
193
209
  asset_bytes_per_robot: 3_000_000_000,
194
210
  history_days: 90,
195
211
  audit_days: 90,
212
+ collection_records: 1_000_000,
213
+ collection_bytes: 50_000_000_000,
196
214
  },
197
215
  features: {
198
216
  app_mcp: true,
@@ -218,6 +236,8 @@ export const PLANS = {
218
236
  asset_bytes_per_robot: null,
219
237
  history_days: null,
220
238
  audit_days: null,
239
+ collection_records: null,
240
+ collection_bytes: null,
221
241
  },
222
242
  features: {
223
243
  app_mcp: true,
@@ -488,3 +488,169 @@ export declare const orgEventDropped: z.ZodObject<{
488
488
  dropped: z.ZodNumber;
489
489
  }, z.core.$strict>;
490
490
  export type OrgEventDropped = z.infer<typeof orgEventDropped>;
491
+ /**
492
+ * Subscribe to the changes of one collection's records.
493
+ *
494
+ * **The cloud answers with `collection_subscribed` once the subscription is
495
+ * registered, and with `collection_subscribe_error` when it is refused. There
496
+ * is no first snapshot.** To show the records that exist, subscribe, wait for
497
+ * `collection_subscribed` and list then: from that frame on every change the
498
+ * subscription covers is delivered as an event, so none can fall between the
499
+ * list and the events. An event that arrives while the list is still being
500
+ * read may or may not be in its result; apply it to the result by `id` and
501
+ * `revision`. A subscription is registered afresh on every connection, so a
502
+ * client that reconnects and subscribes again gets a new `collection_subscribed`
503
+ * and lists again; changes made while it was disconnected are not replayed.
504
+ *
505
+ * The caller's rights are checked on every event, not only on subscribe: a
506
+ * record that the caller may no longer see, because its values changed, the
507
+ * role lost the right or the robot was detached, is announced once as
508
+ * `removed`, and one that comes into view as `entered`.
509
+ *
510
+ * **When a subscription is judged.** At the frame, with the role and status an
511
+ * app user has then and not as at `auth`: a user who was re-roled is answered
512
+ * for the new role (`collection_not_found` when it has no right on the
513
+ * collection, `forbidden` when it may not read it), and one who was blocked or
514
+ * removed is answered `forbidden` and stays unsubscribed. A frame sent before
515
+ * `auth` is answered with `collection_subscribe_error` and code `unauthorized`;
516
+ * the socket stays open. A socket holds at most 50 subscriptions.
517
+ */
518
+ export declare const collectionSubscribe: z.ZodObject<{
519
+ type: z.ZodLiteral<"collection_subscribe">;
520
+ request_id: z.ZodString;
521
+ app_id: z.ZodOptional<z.ZodUUID>;
522
+ collection: z.ZodString;
523
+ robot_id: z.ZodOptional<z.ZodUUID>;
524
+ filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
525
+ }, z.core.$strict>;
526
+ export type CollectionSubscribe = z.infer<typeof collectionSubscribe>;
527
+ /**
528
+ * A collection subscription is registered. Sent once for every
529
+ * `collection_subscribe` that is accepted, after the cloud has judged it (the
530
+ * collection exists, the caller may read it, the robot and the filter fit) and
531
+ * registered it, and before the first `collection_event` of that
532
+ * subscription: a client that lists the records now misses no change, because
533
+ * every change from this frame on reaches it as an event.
534
+ *
535
+ * The frame is sent again for every subscribe, so a client that reconnects and
536
+ * subscribes again receives it again. It does not say that anything exists or
537
+ * changed; it carries only the `request_id`.
538
+ */
539
+ export declare const collectionSubscribed: z.ZodObject<{
540
+ type: z.ZodLiteral<"collection_subscribed">;
541
+ request_id: z.ZodString;
542
+ }, z.core.$strict>;
543
+ export type CollectionSubscribed = z.infer<typeof collectionSubscribed>;
544
+ export declare const collectionUnsubscribe: z.ZodObject<{
545
+ type: z.ZodLiteral<"collection_unsubscribe">;
546
+ request_id: z.ZodString;
547
+ }, z.core.$strict>;
548
+ export type CollectionUnsubscribe = z.infer<typeof collectionUnsubscribe>;
549
+ /**
550
+ * One change to a record the subscriber can see. `record` is the whole record,
551
+ * up to 1 MB, in the shape the REST routes answer.
552
+ *
553
+ * **A client that cannot keep up is disconnected, not skipped.** A socket whose
554
+ * send buffer holds more than 8 MiB, or that has more than 2,000 collection
555
+ * changes waiting to be delivered (a bulk import into a big collection does
556
+ * that), is closed with code 1013 ("try again later"). The client reconnects,
557
+ * subscribes again and lists again.
558
+ */
559
+ export declare const collectionEvent: z.ZodObject<{
560
+ type: z.ZodLiteral<"collection_event">;
561
+ request_id: z.ZodString;
562
+ event: z.ZodEnum<{
563
+ deleted: "deleted";
564
+ created: "created";
565
+ updated: "updated";
566
+ removed: "removed";
567
+ entered: "entered";
568
+ }>;
569
+ id: z.ZodUUID;
570
+ record: z.ZodOptional<z.ZodObject<{
571
+ id: z.ZodUUID;
572
+ robot_id: z.ZodNullable<z.ZodUUID>;
573
+ created_at: z.ZodISODateTime;
574
+ created_by: z.ZodObject<{
575
+ kind: z.ZodEnum<{
576
+ developer: "developer";
577
+ fleetless: "fleetless";
578
+ server_key: "server_key";
579
+ app_user: "app_user";
580
+ }>;
581
+ id: z.ZodUUID;
582
+ label: z.ZodString;
583
+ }, z.core.$strip>;
584
+ updated_at: z.ZodISODateTime;
585
+ updated_by: z.ZodObject<{
586
+ kind: z.ZodEnum<{
587
+ developer: "developer";
588
+ fleetless: "fleetless";
589
+ server_key: "server_key";
590
+ app_user: "app_user";
591
+ }>;
592
+ id: z.ZodUUID;
593
+ label: z.ZodString;
594
+ }, z.core.$strip>;
595
+ revision: z.ZodNumber;
596
+ display: z.ZodString;
597
+ missing_required: z.ZodOptional<z.ZodArray<z.ZodString>>;
598
+ values: z.ZodRecord<z.ZodString, z.ZodUnknown>;
599
+ deleted_at: z.ZodOptional<z.ZodISODateTime>;
600
+ deleted_by: z.ZodOptional<z.ZodObject<{
601
+ kind: z.ZodEnum<{
602
+ developer: "developer";
603
+ fleetless: "fleetless";
604
+ server_key: "server_key";
605
+ app_user: "app_user";
606
+ }>;
607
+ id: z.ZodUUID;
608
+ label: z.ZodString;
609
+ }, z.core.$strip>>;
610
+ }, z.core.$strip>>;
611
+ }, z.core.$strict>;
612
+ export type CollectionEvent = z.infer<typeof collectionEvent>;
613
+ /**
614
+ * Refusal of a collection subscription, or the end of one. The codes are those
615
+ * of REST: `collection_not_found`, `forbidden`, `robot_not_attached` and
616
+ * `validation_error` when the subscribe is refused; `collection_removed`,
617
+ * `forbidden`, `robot_not_attached`, `validation_error` and `internal_error`
618
+ * when a running subscription ends:
619
+ *
620
+ * - `collection_removed`: a publish or restore removed its collection;
621
+ * - `forbidden`: the user was re-roled, blocked or removed, or the role lost the
622
+ * right to read the collection;
623
+ * - `robot_not_attached`: the robot the subscription follows was detached, or a
624
+ * robot with more than 5,000 records was detached (when a robot is attached
625
+ * or detached, at most 5,000 of its records are announced to a subscription,
626
+ * as `entered` or `removed`);
627
+ * - `validation_error`: its `filter` no longer fits the collection after a
628
+ * publish;
629
+ * - `internal_error`: it could not be judged again (the database or the rights
630
+ * check failed), or a robot coming or going could not be announced. The cloud
631
+ * ends the subscription rather than go on telling a caller what it may no
632
+ * longer see; subscribing again is the way back.
633
+ *
634
+ * `request_id` echoes what the client sent and is a plain string for the reason
635
+ * `subscribeError`'s ids are: the refusal must be constructible when the id
636
+ * itself was what was wrong.
637
+ */
638
+ export declare const collectionSubscribeError: z.ZodObject<{
639
+ type: z.ZodLiteral<"collection_subscribe_error">;
640
+ request_id: z.ZodString;
641
+ code: z.ZodString;
642
+ message: z.ZodString;
643
+ }, z.core.$strict>;
644
+ export type CollectionSubscribeError = z.infer<typeof collectionSubscribeError>;
645
+ /**
646
+ * Sent to every socket that holds a collection subscription in the app after a
647
+ * schema version was published or restored. Rights and collections may have
648
+ * changed, so a client that cached definitions reads them again. Subscriptions
649
+ * whose collection or right is gone end with their own
650
+ * `collection_subscribe_error`.
651
+ */
652
+ export declare const collectionsSchemaPublished: z.ZodObject<{
653
+ type: z.ZodLiteral<"collections_schema_published">;
654
+ version: z.ZodNumber;
655
+ }, z.core.$strict>;
656
+ export type CollectionsSchemaPublished = z.infer<typeof collectionsSchemaPublished>;