@eloxiv/contracts 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +6 -2
- package/dist/Agent.d.ts +792 -0
- package/dist/Agent.d.ts.map +1 -0
- package/dist/Agent.js +610 -0
- package/dist/Agent.js.map +1 -0
- package/dist/Analytics.d.ts +46 -0
- package/dist/Analytics.d.ts.map +1 -0
- package/dist/Analytics.js +89 -0
- package/dist/Analytics.js.map +1 -0
- package/dist/Approval.d.ts +70 -0
- package/dist/Approval.d.ts.map +1 -0
- package/dist/Approval.js +127 -0
- package/dist/Approval.js.map +1 -0
- package/dist/Catalog.d.ts +238 -0
- package/dist/Catalog.d.ts.map +1 -0
- package/dist/Catalog.js +169 -0
- package/dist/Catalog.js.map +1 -0
- package/dist/Checklist.d.ts +99 -0
- package/dist/Checklist.d.ts.map +1 -0
- package/dist/Checklist.js +105 -0
- package/dist/Checklist.js.map +1 -0
- package/dist/Data.d.ts +107 -0
- package/dist/Data.d.ts.map +1 -0
- package/dist/Data.js +93 -0
- package/dist/Data.js.map +1 -0
- package/dist/Devices.d.ts +857 -0
- package/dist/Devices.d.ts.map +1 -0
- package/dist/Devices.js +590 -0
- package/dist/Devices.js.map +1 -0
- package/dist/Durable.d.ts +406 -0
- package/dist/Durable.d.ts.map +1 -0
- package/dist/Durable.js +203 -0
- package/dist/Durable.js.map +1 -0
- package/dist/Errors.d.ts +95 -0
- package/dist/Errors.d.ts.map +1 -0
- package/dist/Errors.js +72 -0
- package/dist/Errors.js.map +1 -0
- package/dist/JsonSchema.d.ts +355 -0
- package/dist/JsonSchema.d.ts.map +1 -0
- package/dist/JsonSchema.js +151 -0
- package/dist/JsonSchema.js.map +1 -0
- package/dist/Manifest.d.ts +353 -0
- package/dist/Manifest.d.ts.map +1 -0
- package/dist/Manifest.js +894 -0
- package/dist/Manifest.js.map +1 -0
- package/dist/Module.d.ts +447 -0
- package/dist/Module.d.ts.map +1 -0
- package/dist/Module.js +221 -0
- package/dist/Module.js.map +1 -0
- package/dist/Optimistic.d.ts +192 -0
- package/dist/Optimistic.d.ts.map +1 -0
- package/dist/Optimistic.js +319 -0
- package/dist/Optimistic.js.map +1 -0
- package/dist/Projection.d.ts +163 -0
- package/dist/Projection.d.ts.map +1 -0
- package/dist/Projection.js +158 -0
- package/dist/Projection.js.map +1 -0
- package/dist/Proposals.d.ts +103 -0
- package/dist/Proposals.d.ts.map +1 -0
- package/dist/Proposals.js +72 -0
- package/dist/Proposals.js.map +1 -0
- package/dist/Receipt.d.ts +243 -0
- package/dist/Receipt.d.ts.map +1 -0
- package/dist/Receipt.js +108 -0
- package/dist/Receipt.js.map +1 -0
- package/dist/Records.d.ts +297 -0
- package/dist/Records.d.ts.map +1 -0
- package/dist/Records.js +171 -0
- package/dist/Records.js.map +1 -0
- package/dist/Render.d.ts +207 -0
- package/dist/Render.d.ts.map +1 -0
- package/dist/Render.js +502 -0
- package/dist/Render.js.map +1 -0
- package/dist/Rpc.d.ts +115 -0
- package/dist/Rpc.d.ts.map +1 -0
- package/dist/Rpc.js +68 -0
- package/dist/Rpc.js.map +1 -0
- package/dist/SearchLanguages.d.ts +4 -0
- package/dist/SearchLanguages.d.ts.map +1 -0
- package/dist/SearchLanguages.js +33 -0
- package/dist/SearchLanguages.js.map +1 -0
- package/dist/Service.d.ts +59 -0
- package/dist/Service.d.ts.map +1 -0
- package/dist/Service.js +38 -0
- package/dist/Service.js.map +1 -0
- package/dist/Versions.d.ts +9 -0
- package/dist/Versions.d.ts.map +1 -0
- package/dist/Versions.js +78 -0
- package/dist/Versions.js.map +1 -0
- package/dist/contracts/ActionConsent.d.ts +189 -0
- package/dist/contracts/ActionConsent.d.ts.map +1 -0
- package/dist/contracts/ActionConsent.js +129 -0
- package/dist/contracts/ActionConsent.js.map +1 -0
- package/dist/contracts/ActionRegistry.d.ts +149 -0
- package/dist/contracts/ActionRegistry.d.ts.map +1 -0
- package/dist/contracts/ActionRegistry.js +37 -0
- package/dist/contracts/ActionRegistry.js.map +1 -0
- package/dist/contracts/Actor.d.ts +129 -0
- package/dist/contracts/Actor.d.ts.map +1 -0
- package/dist/contracts/Actor.js +47 -0
- package/dist/contracts/Actor.js.map +1 -0
- package/dist/contracts/AgentResources.d.ts +248 -0
- package/dist/contracts/AgentResources.d.ts.map +1 -0
- package/dist/contracts/AgentResources.js +158 -0
- package/dist/contracts/AgentResources.js.map +1 -0
- package/dist/contracts/AgentRuntime.d.ts +453 -0
- package/dist/contracts/AgentRuntime.d.ts.map +1 -0
- package/dist/contracts/AgentRuntime.js +117 -0
- package/dist/contracts/AgentRuntime.js.map +1 -0
- package/dist/contracts/Approvals.d.ts +303 -0
- package/dist/contracts/Approvals.d.ts.map +1 -0
- package/dist/contracts/Approvals.js +117 -0
- package/dist/contracts/Approvals.js.map +1 -0
- package/dist/contracts/Audit.d.ts +510 -0
- package/dist/contracts/Audit.d.ts.map +1 -0
- package/dist/contracts/Audit.js +139 -0
- package/dist/contracts/Audit.js.map +1 -0
- package/dist/contracts/CalendarProvider.d.ts +572 -0
- package/dist/contracts/CalendarProvider.d.ts.map +1 -0
- package/dist/contracts/CalendarProvider.js +203 -0
- package/dist/contracts/CalendarProvider.js.map +1 -0
- package/dist/contracts/Capability.d.ts +197 -0
- package/dist/contracts/Capability.d.ts.map +1 -0
- package/dist/contracts/Capability.js +189 -0
- package/dist/contracts/Capability.js.map +1 -0
- package/dist/contracts/ClientSDK.d.ts +250 -0
- package/dist/contracts/ClientSDK.d.ts.map +1 -0
- package/dist/contracts/ClientSDK.js +184 -0
- package/dist/contracts/ClientSDK.js.map +1 -0
- package/dist/contracts/CollabDocument.d.ts +781 -0
- package/dist/contracts/CollabDocument.d.ts.map +1 -0
- package/dist/contracts/CollabDocument.js +364 -0
- package/dist/contracts/CollabDocument.js.map +1 -0
- package/dist/contracts/Command.d.ts +183 -0
- package/dist/contracts/Command.d.ts.map +1 -0
- package/dist/contracts/Command.js +66 -0
- package/dist/contracts/Command.js.map +1 -0
- package/dist/contracts/Connections.d.ts +612 -0
- package/dist/contracts/Connections.d.ts.map +1 -0
- package/dist/contracts/Connections.js +323 -0
- package/dist/contracts/Connections.js.map +1 -0
- package/dist/contracts/ContextAccounting.d.ts +79 -0
- package/dist/contracts/ContextAccounting.d.ts.map +1 -0
- package/dist/contracts/ContextAccounting.js +32 -0
- package/dist/contracts/ContextAccounting.js.map +1 -0
- package/dist/contracts/Daemon.d.ts +486 -0
- package/dist/contracts/Daemon.d.ts.map +1 -0
- package/dist/contracts/Daemon.js +192 -0
- package/dist/contracts/Daemon.js.map +1 -0
- package/dist/contracts/DbTx.d.ts +149 -0
- package/dist/contracts/DbTx.d.ts.map +1 -0
- package/dist/contracts/DbTx.js +94 -0
- package/dist/contracts/DbTx.js.map +1 -0
- package/dist/contracts/Delegation.d.ts +121 -0
- package/dist/contracts/Delegation.d.ts.map +1 -0
- package/dist/contracts/Delegation.js +76 -0
- package/dist/contracts/Delegation.js.map +1 -0
- package/dist/contracts/DeviceControl.d.ts +293 -0
- package/dist/contracts/DeviceControl.d.ts.map +1 -0
- package/dist/contracts/DeviceControl.js +107 -0
- package/dist/contracts/DeviceControl.js.map +1 -0
- package/dist/contracts/Directory.d.ts +492 -0
- package/dist/contracts/Directory.d.ts.map +1 -0
- package/dist/contracts/Directory.js +225 -0
- package/dist/contracts/Directory.js.map +1 -0
- package/dist/contracts/DirectoryProvider.d.ts +214 -0
- package/dist/contracts/DirectoryProvider.d.ts.map +1 -0
- package/dist/contracts/DirectoryProvider.js +73 -0
- package/dist/contracts/DirectoryProvider.js.map +1 -0
- package/dist/contracts/DocumentSource.d.ts +190 -0
- package/dist/contracts/DocumentSource.d.ts.map +1 -0
- package/dist/contracts/DocumentSource.js +64 -0
- package/dist/contracts/DocumentSource.js.map +1 -0
- package/dist/contracts/Files.d.ts +762 -0
- package/dist/contracts/Files.d.ts.map +1 -0
- package/dist/contracts/Files.js +339 -0
- package/dist/contracts/Files.js.map +1 -0
- package/dist/contracts/Flags.d.ts +265 -0
- package/dist/contracts/Flags.d.ts.map +1 -0
- package/dist/contracts/Flags.js +197 -0
- package/dist/contracts/Flags.js.map +1 -0
- package/dist/contracts/Host.d.ts +320 -0
- package/dist/contracts/Host.d.ts.map +1 -0
- package/dist/contracts/Host.js +224 -0
- package/dist/contracts/Host.js.map +1 -0
- package/dist/contracts/HttpApi.d.ts +102 -0
- package/dist/contracts/HttpApi.d.ts.map +1 -0
- package/dist/contracts/HttpApi.js +89 -0
- package/dist/contracts/HttpApi.js.map +1 -0
- package/dist/contracts/Ingestion.d.ts +522 -0
- package/dist/contracts/Ingestion.d.ts.map +1 -0
- package/dist/contracts/Ingestion.js +275 -0
- package/dist/contracts/Ingestion.js.map +1 -0
- package/dist/contracts/Ingress.d.ts +132 -0
- package/dist/contracts/Ingress.d.ts.map +1 -0
- package/dist/contracts/Ingress.js +102 -0
- package/dist/contracts/Ingress.js.map +1 -0
- package/dist/contracts/Invocation.d.ts +361 -0
- package/dist/contracts/Invocation.d.ts.map +1 -0
- package/dist/contracts/Invocation.js +104 -0
- package/dist/contracts/Invocation.js.map +1 -0
- package/dist/contracts/LocalClient.d.ts +888 -0
- package/dist/contracts/LocalClient.d.ts.map +1 -0
- package/dist/contracts/LocalClient.js +429 -0
- package/dist/contracts/LocalClient.js.map +1 -0
- package/dist/contracts/Locale.d.ts +162 -0
- package/dist/contracts/Locale.d.ts.map +1 -0
- package/dist/contracts/Locale.js +123 -0
- package/dist/contracts/Locale.js.map +1 -0
- package/dist/contracts/MachineIdentity.d.ts +434 -0
- package/dist/contracts/MachineIdentity.d.ts.map +1 -0
- package/dist/contracts/MachineIdentity.js +223 -0
- package/dist/contracts/MachineIdentity.js.map +1 -0
- package/dist/contracts/MailProvider.d.ts +791 -0
- package/dist/contracts/MailProvider.d.ts.map +1 -0
- package/dist/contracts/MailProvider.js +237 -0
- package/dist/contracts/MailProvider.js.map +1 -0
- package/dist/contracts/Memory.d.ts +62 -0
- package/dist/contracts/Memory.d.ts.map +1 -0
- package/dist/contracts/Memory.js +43 -0
- package/dist/contracts/Memory.js.map +1 -0
- package/dist/contracts/Messaging.d.ts +154 -0
- package/dist/contracts/Messaging.d.ts.map +1 -0
- package/dist/contracts/Messaging.js +97 -0
- package/dist/contracts/Messaging.js.map +1 -0
- package/dist/contracts/Metering.d.ts +334 -0
- package/dist/contracts/Metering.d.ts.map +1 -0
- package/dist/contracts/Metering.js +202 -0
- package/dist/contracts/Metering.js.map +1 -0
- package/dist/contracts/ModelProvider.d.ts +142 -0
- package/dist/contracts/ModelProvider.d.ts.map +1 -0
- package/dist/contracts/ModelProvider.js +72 -0
- package/dist/contracts/ModelProvider.js.map +1 -0
- package/dist/contracts/ModuleManifest.d.ts +2519 -0
- package/dist/contracts/ModuleManifest.d.ts.map +1 -0
- package/dist/contracts/ModuleManifest.js +272 -0
- package/dist/contracts/ModuleManifest.js.map +1 -0
- package/dist/contracts/NotificationChannel.d.ts +378 -0
- package/dist/contracts/NotificationChannel.d.ts.map +1 -0
- package/dist/contracts/NotificationChannel.js +136 -0
- package/dist/contracts/NotificationChannel.js.map +1 -0
- package/dist/contracts/Notifications.d.ts +417 -0
- package/dist/contracts/Notifications.d.ts.map +1 -0
- package/dist/contracts/Notifications.js +267 -0
- package/dist/contracts/Notifications.js.map +1 -0
- package/dist/contracts/Outbox.d.ts +469 -0
- package/dist/contracts/Outbox.d.ts.map +1 -0
- package/dist/contracts/Outbox.js +215 -0
- package/dist/contracts/Outbox.js.map +1 -0
- package/dist/contracts/Privacy.d.ts +1029 -0
- package/dist/contracts/Privacy.d.ts.map +1 -0
- package/dist/contracts/Privacy.js +437 -0
- package/dist/contracts/Privacy.js.map +1 -0
- package/dist/contracts/Progress.d.ts +305 -0
- package/dist/contracts/Progress.d.ts.map +1 -0
- package/dist/contracts/Progress.js +174 -0
- package/dist/contracts/Progress.js.map +1 -0
- package/dist/contracts/QuerySurface.d.ts +231 -0
- package/dist/contracts/QuerySurface.d.ts.map +1 -0
- package/dist/contracts/QuerySurface.js +113 -0
- package/dist/contracts/QuerySurface.js.map +1 -0
- package/dist/contracts/Readiness.d.ts +105 -0
- package/dist/contracts/Readiness.d.ts.map +1 -0
- package/dist/contracts/Readiness.js +57 -0
- package/dist/contracts/Readiness.js.map +1 -0
- package/dist/contracts/Release.d.ts +295 -0
- package/dist/contracts/Release.d.ts.map +1 -0
- package/dist/contracts/Release.js +175 -0
- package/dist/contracts/Release.js.map +1 -0
- package/dist/contracts/ResultRendering.d.ts +533 -0
- package/dist/contracts/ResultRendering.d.ts.map +1 -0
- package/dist/contracts/ResultRendering.js +59 -0
- package/dist/contracts/ResultRendering.js.map +1 -0
- package/dist/contracts/Sandbox.d.ts +1164 -0
- package/dist/contracts/Sandbox.d.ts.map +1 -0
- package/dist/contracts/Sandbox.js +550 -0
- package/dist/contracts/Sandbox.js.map +1 -0
- package/dist/contracts/Scheduler.d.ts +814 -0
- package/dist/contracts/Scheduler.d.ts.map +1 -0
- package/dist/contracts/Scheduler.js +202 -0
- package/dist/contracts/Scheduler.js.map +1 -0
- package/dist/contracts/ScreenContext.d.ts +514 -0
- package/dist/contracts/ScreenContext.d.ts.map +1 -0
- package/dist/contracts/ScreenContext.js +272 -0
- package/dist/contracts/ScreenContext.js.map +1 -0
- package/dist/contracts/Search.d.ts +308 -0
- package/dist/contracts/Search.d.ts.map +1 -0
- package/dist/contracts/Search.js +107 -0
- package/dist/contracts/Search.js.map +1 -0
- package/dist/contracts/Secrets.d.ts +483 -0
- package/dist/contracts/Secrets.d.ts.map +1 -0
- package/dist/contracts/Secrets.js +136 -0
- package/dist/contracts/Secrets.js.map +1 -0
- package/dist/contracts/Settings.d.ts +221 -0
- package/dist/contracts/Settings.d.ts.map +1 -0
- package/dist/contracts/Settings.js +163 -0
- package/dist/contracts/Settings.js.map +1 -0
- package/dist/contracts/Sharing.d.ts +319 -0
- package/dist/contracts/Sharing.d.ts.map +1 -0
- package/dist/contracts/Sharing.js +172 -0
- package/dist/contracts/Sharing.js.map +1 -0
- package/dist/contracts/Slot.d.ts +162 -0
- package/dist/contracts/Slot.d.ts.map +1 -0
- package/dist/contracts/Slot.js +56 -0
- package/dist/contracts/Slot.js.map +1 -0
- package/dist/contracts/Space.d.ts +256 -0
- package/dist/contracts/Space.d.ts.map +1 -0
- package/dist/contracts/Space.js +133 -0
- package/dist/contracts/Space.js.map +1 -0
- package/dist/contracts/StorageAdapter.d.ts +124 -0
- package/dist/contracts/StorageAdapter.d.ts.map +1 -0
- package/dist/contracts/StorageAdapter.js +96 -0
- package/dist/contracts/StorageAdapter.js.map +1 -0
- package/dist/contracts/StorageBackend.d.ts +310 -0
- package/dist/contracts/StorageBackend.d.ts.map +1 -0
- package/dist/contracts/StorageBackend.js +196 -0
- package/dist/contracts/StorageBackend.js.map +1 -0
- package/dist/contracts/Sync.d.ts +286 -0
- package/dist/contracts/Sync.d.ts.map +1 -0
- package/dist/contracts/Sync.js +157 -0
- package/dist/contracts/Sync.js.map +1 -0
- package/dist/contracts/Telemetry.d.ts +183 -0
- package/dist/contracts/Telemetry.d.ts.map +1 -0
- package/dist/contracts/Telemetry.js +153 -0
- package/dist/contracts/Telemetry.js.map +1 -0
- package/dist/contracts/ThemeTokens.d.ts +212 -0
- package/dist/contracts/ThemeTokens.d.ts.map +1 -0
- package/dist/contracts/ThemeTokens.js +111 -0
- package/dist/contracts/ThemeTokens.js.map +1 -0
- package/dist/contracts/ToolSource.d.ts +135 -0
- package/dist/contracts/ToolSource.d.ts.map +1 -0
- package/dist/contracts/ToolSource.js +81 -0
- package/dist/contracts/ToolSource.js.map +1 -0
- package/dist/contracts/Versioning.d.ts +363 -0
- package/dist/contracts/Versioning.d.ts.map +1 -0
- package/dist/contracts/Versioning.js +201 -0
- package/dist/contracts/Versioning.js.map +1 -0
- package/dist/contracts/View.d.ts +232 -0
- package/dist/contracts/View.d.ts.map +1 -0
- package/dist/contracts/View.js +102 -0
- package/dist/contracts/View.js.map +1 -0
- package/dist/contracts/WorkItems.d.ts +242 -0
- package/dist/contracts/WorkItems.d.ts.map +1 -0
- package/dist/contracts/WorkItems.js +126 -0
- package/dist/contracts/WorkItems.js.map +1 -0
- package/dist/contracts/Workflow.d.ts +191 -0
- package/dist/contracts/Workflow.d.ts.map +1 -0
- package/dist/contracts/Workflow.js +63 -0
- package/dist/contracts/Workflow.js.map +1 -0
- package/dist/contracts/index.d.ts +75 -0
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/contracts/index.js +196 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/devices/module.d.ts +3777 -0
- package/dist/devices/module.d.ts.map +1 -0
- package/dist/devices/module.js +179 -0
- package/dist/devices/module.js.map +1 -0
- package/dist/drizzle/Entity.d.ts +148 -0
- package/dist/drizzle/Entity.d.ts.map +1 -0
- package/dist/drizzle/Entity.js +396 -0
- package/dist/drizzle/Entity.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/package.json +48 -3
- package/schema/Actor.json +46 -0
- package/schema/AuditRecord.json +403 -0
- package/schema/DaemonHealth.json +29 -0
- package/schema/InvocationError.json +257 -0
- package/schema/InvocationReceipt.json +253 -0
- package/schema/Lockfile.json +129 -0
- package/schema/OutboxEvent.json +36 -0
- package/schema/PairingConfirm.json +33 -0
- package/schema/PairingResult.json +18 -0
- package/schema/PairingStart.json +18 -0
- package/schema/ProvenanceEntry.json +110 -0
- package/schema/ReplayEnvelope.json +269 -0
- package/schema/Surface.json +17 -0
- package/schema/codegen/LocalClient.json +1298 -0
- package/schema/codegen/Sandbox.json +320 -0
- package/schema/contracts/ActionConsent.json +1930 -0
- package/schema/contracts/ActionRegistry.json +722 -0
- package/schema/contracts/Actor.json +451 -0
- package/schema/contracts/AgentResources.json +1400 -0
- package/schema/contracts/AgentRuntime.json +4017 -0
- package/schema/contracts/Approvals.json +2916 -0
- package/schema/contracts/Audit.json +3268 -0
- package/schema/contracts/CalendarProvider.json +5557 -0
- package/schema/contracts/ClientSDK.json +1400 -0
- package/schema/contracts/CollabDocument.json +4012 -0
- package/schema/contracts/Command.json +616 -0
- package/schema/contracts/Connections.json +6687 -0
- package/schema/contracts/ContextAccounting.json +685 -0
- package/schema/contracts/Daemon.json +4555 -0
- package/schema/contracts/DbTx.json +321 -0
- package/schema/contracts/Delegation.json +949 -0
- package/schema/contracts/DeviceControl.json +2626 -0
- package/schema/contracts/Directory.json +5168 -0
- package/schema/contracts/DirectoryProvider.json +2090 -0
- package/schema/contracts/DocumentSource.json +2044 -0
- package/schema/contracts/Files.json +4122 -0
- package/schema/contracts/Flags.json +1202 -0
- package/schema/contracts/Host.json +1769 -0
- package/schema/contracts/HttpApi.json +1615 -0
- package/schema/contracts/Ingestion.json +3211 -0
- package/schema/contracts/Ingress.json +819 -0
- package/schema/contracts/Invocation.json +2044 -0
- package/schema/contracts/LocalClient.json +6657 -0
- package/schema/contracts/Locale.json +654 -0
- package/schema/contracts/MachineIdentity.json +2303 -0
- package/schema/contracts/MailProvider.json +6663 -0
- package/schema/contracts/Memory.json +579 -0
- package/schema/contracts/Messaging.json +1764 -0
- package/schema/contracts/Metering.json +3060 -0
- package/schema/contracts/ModelProvider.json +1127 -0
- package/schema/contracts/ModuleManifest.json +9449 -0
- package/schema/contracts/NotificationChannel.json +986 -0
- package/schema/contracts/Notifications.json +4280 -0
- package/schema/contracts/Outbox.json +1451 -0
- package/schema/contracts/Privacy.json +4354 -0
- package/schema/contracts/Progress.json +1524 -0
- package/schema/contracts/QuerySurface.json +661 -0
- package/schema/contracts/Readiness.json +209 -0
- package/schema/contracts/Release.json +805 -0
- package/schema/contracts/ResultRendering.json +2859 -0
- package/schema/contracts/Sandbox.json +2286 -0
- package/schema/contracts/Scheduler.json +6138 -0
- package/schema/contracts/ScreenContext.json +1238 -0
- package/schema/contracts/Search.json +1058 -0
- package/schema/contracts/Secrets.json +2444 -0
- package/schema/contracts/Settings.json +654 -0
- package/schema/contracts/Sharing.json +2854 -0
- package/schema/contracts/Slot.json +537 -0
- package/schema/contracts/Space.json +892 -0
- package/schema/contracts/StorageAdapter.json +623 -0
- package/schema/contracts/StorageBackend.json +2421 -0
- package/schema/contracts/Sync.json +894 -0
- package/schema/contracts/Telemetry.json +696 -0
- package/schema/contracts/ThemeTokens.json +547 -0
- package/schema/contracts/ToolSource.json +1333 -0
- package/schema/contracts/Versioning.json +1481 -0
- package/schema/contracts/View.json +750 -0
- package/schema/contracts/WorkItems.json +1731 -0
- package/schema/contracts/Workflow.json +1242 -0
- package/src/Agent.ts +758 -0
- package/src/Analytics.ts +110 -0
- package/src/Approval.ts +131 -0
- package/src/Catalog.ts +192 -0
- package/src/Checklist.ts +162 -0
- package/src/Data.ts +109 -0
- package/src/Devices.ts +721 -0
- package/src/Durable.ts +240 -0
- package/src/Errors.ts +111 -0
- package/src/JsonSchema.ts +166 -0
- package/src/Manifest.ts +1147 -0
- package/src/Module.ts +640 -0
- package/src/Optimistic.ts +332 -0
- package/src/Projection.ts +207 -0
- package/src/Proposals.ts +89 -0
- package/src/Receipt.ts +125 -0
- package/src/Records.ts +197 -0
- package/src/Render.ts +515 -0
- package/src/Rpc.ts +113 -0
- package/src/SearchLanguages.ts +33 -0
- package/src/Service.ts +102 -0
- package/src/Versions.ts +69 -0
- package/src/contracts/ActionConsent.ts +150 -0
- package/src/contracts/ActionRegistry.ts +39 -0
- package/src/contracts/Actor.ts +53 -0
- package/src/contracts/AgentResources.ts +167 -0
- package/src/contracts/AgentRuntime.ts +154 -0
- package/src/contracts/Approvals.ts +133 -0
- package/src/contracts/Audit.ts +160 -0
- package/src/contracts/CalendarProvider.ts +241 -0
- package/src/contracts/Capability.ts +246 -0
- package/src/contracts/ClientSDK.ts +199 -0
- package/src/contracts/CollabDocument.ts +420 -0
- package/src/contracts/Command.ts +74 -0
- package/src/contracts/Connections.ts +360 -0
- package/src/contracts/ContextAccounting.ts +35 -0
- package/src/contracts/Daemon.ts +247 -0
- package/src/contracts/DbTx.ts +110 -0
- package/src/contracts/Delegation.ts +91 -0
- package/src/contracts/DeviceControl.ts +143 -0
- package/src/contracts/Directory.ts +384 -0
- package/src/contracts/DirectoryProvider.ts +82 -0
- package/src/contracts/DocumentSource.ts +71 -0
- package/src/contracts/Files.ts +395 -0
- package/src/contracts/Flags.ts +241 -0
- package/src/contracts/Host.ts +245 -0
- package/src/contracts/HttpApi.ts +100 -0
- package/src/contracts/Ingestion.ts +315 -0
- package/src/contracts/Ingress.ts +132 -0
- package/src/contracts/Invocation.ts +122 -0
- package/src/contracts/LocalClient.ts +620 -0
- package/src/contracts/Locale.ts +133 -0
- package/src/contracts/MachineIdentity.ts +305 -0
- package/src/contracts/MailProvider.ts +272 -0
- package/src/contracts/Memory.ts +47 -0
- package/src/contracts/Messaging.ts +108 -0
- package/src/contracts/Metering.ts +231 -0
- package/src/contracts/ModelProvider.ts +87 -0
- package/src/contracts/ModuleManifest.ts +310 -0
- package/src/contracts/NotificationChannel.ts +158 -0
- package/src/contracts/Notifications.ts +309 -0
- package/src/contracts/Outbox.ts +246 -0
- package/src/contracts/Privacy.ts +502 -0
- package/src/contracts/Progress.ts +196 -0
- package/src/contracts/QuerySurface.ts +134 -0
- package/src/contracts/Readiness.ts +67 -0
- package/src/contracts/Release.ts +199 -0
- package/src/contracts/ResultRendering.ts +65 -0
- package/src/contracts/Sandbox.ts +648 -0
- package/src/contracts/Scheduler.ts +237 -0
- package/src/contracts/ScreenContext.ts +316 -0
- package/src/contracts/Search.ts +126 -0
- package/src/contracts/Secrets.ts +162 -0
- package/src/contracts/Settings.ts +207 -0
- package/src/contracts/Sharing.ts +205 -0
- package/src/contracts/Slot.ts +61 -0
- package/src/contracts/Space.ts +157 -0
- package/src/contracts/StorageAdapter.ts +104 -0
- package/src/contracts/StorageBackend.ts +220 -0
- package/src/contracts/Sync.ts +180 -0
- package/src/contracts/Telemetry.ts +177 -0
- package/src/contracts/ThemeTokens.ts +136 -0
- package/src/contracts/ToolSource.ts +94 -0
- package/src/contracts/Versioning.ts +237 -0
- package/src/contracts/View.ts +116 -0
- package/src/contracts/WorkItems.ts +144 -0
- package/src/contracts/Workflow.ts +67 -0
- package/src/contracts/index.ts +205 -0
- package/src/devices/module.ts +201 -0
- package/src/drizzle/Entity.ts +524 -0
- package/src/index.ts +19 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slot (a shell contract): the extension points modules declare (`slots`) and the contributions other modules
|
|
3
|
+
* make to them (`contributions`: one of the app's views or commands), resolved across every installed module
|
|
4
|
+
* into one deterministic order. A slot accepts either views or commands; the manifest check refuses a
|
|
5
|
+
* contribution of the other kind, to a slot that does not exist, or of a target that does not exist.
|
|
6
|
+
* Documented in docs/contracts/slot.md; conformance kit `@eloxiv/testing/conformance/Slot`; implemented by
|
|
7
|
+
* `@eloxiv/shell-core` (`shellRegistry`).
|
|
8
|
+
*/
|
|
9
|
+
import { Schema } from "effect";
|
|
10
|
+
export declare const SlotDescriptor: Schema.Struct<{
|
|
11
|
+
/** Namespaced by the module that exposes it, e.g. `home.launcher`. */
|
|
12
|
+
readonly id: Schema.String;
|
|
13
|
+
readonly module: Schema.String;
|
|
14
|
+
readonly description: Schema.String;
|
|
15
|
+
readonly accepts: Schema.Literals<readonly ["view", "command"]>;
|
|
16
|
+
}>;
|
|
17
|
+
export type SlotDescriptor = typeof SlotDescriptor.Type;
|
|
18
|
+
/** One resolved contribution: who contributed it, its order, and the view or palette entry it names. */
|
|
19
|
+
export declare const SlotEntry: Schema.Struct<{
|
|
20
|
+
readonly contribution: Schema.String;
|
|
21
|
+
readonly module: Schema.String;
|
|
22
|
+
readonly order: Schema.optionalKey<Schema.Number>;
|
|
23
|
+
readonly target: Schema.Union<readonly [Schema.Struct<{
|
|
24
|
+
readonly view: Schema.Struct<{
|
|
25
|
+
readonly id: Schema.String;
|
|
26
|
+
readonly module: Schema.String;
|
|
27
|
+
readonly title: Schema.String;
|
|
28
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
29
|
+
readonly route: Schema.String;
|
|
30
|
+
readonly shows: Schema.Union<readonly [Schema.Struct<{
|
|
31
|
+
readonly entity: Schema.String;
|
|
32
|
+
}>, Schema.Struct<{
|
|
33
|
+
readonly queryView: Schema.String;
|
|
34
|
+
}>]>;
|
|
35
|
+
}>;
|
|
36
|
+
}>, Schema.Struct<{
|
|
37
|
+
readonly command: Schema.Struct<{
|
|
38
|
+
readonly id: Schema.String;
|
|
39
|
+
readonly module: Schema.String;
|
|
40
|
+
readonly title: Schema.String;
|
|
41
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
42
|
+
readonly keywords: Schema.$Array<Schema.String>;
|
|
43
|
+
readonly run: Schema.Union<readonly [Schema.Struct<{
|
|
44
|
+
readonly kind: Schema.Literal<"action">;
|
|
45
|
+
readonly action: Schema.String;
|
|
46
|
+
}>, Schema.Struct<{
|
|
47
|
+
readonly kind: Schema.Literal<"view">;
|
|
48
|
+
readonly view: Schema.String;
|
|
49
|
+
readonly route: Schema.String;
|
|
50
|
+
}>]>;
|
|
51
|
+
}>;
|
|
52
|
+
}>]>;
|
|
53
|
+
}>;
|
|
54
|
+
export type SlotEntry = typeof SlotEntry.Type;
|
|
55
|
+
declare const UnknownSlot_base: Schema.Class<UnknownSlot, Schema.TaggedStruct<"UnknownSlot", {
|
|
56
|
+
readonly message: Schema.String;
|
|
57
|
+
readonly slot: Schema.String;
|
|
58
|
+
}>, import("effect/Cause").YieldableError>;
|
|
59
|
+
export declare class UnknownSlot extends UnknownSlot_base {
|
|
60
|
+
}
|
|
61
|
+
export declare const SlotContract: import("../Service.ts").ServiceContract<"Slot", {
|
|
62
|
+
readonly list: {
|
|
63
|
+
readonly description: "Every slot, in module installation order, then by id.";
|
|
64
|
+
readonly input: Schema.Struct<{}>;
|
|
65
|
+
readonly output: Schema.$Array<Schema.Struct<{
|
|
66
|
+
/** Namespaced by the module that exposes it, e.g. `home.launcher`. */
|
|
67
|
+
readonly id: Schema.String;
|
|
68
|
+
readonly module: Schema.String;
|
|
69
|
+
readonly description: Schema.String;
|
|
70
|
+
readonly accepts: Schema.Literals<readonly ["view", "command"]>;
|
|
71
|
+
}>>;
|
|
72
|
+
readonly errors: Schema.Never;
|
|
73
|
+
};
|
|
74
|
+
readonly resolve: {
|
|
75
|
+
readonly description: "A slot's contributions from every installed module, resolved and in order.";
|
|
76
|
+
readonly input: Schema.Struct<{
|
|
77
|
+
readonly slot: Schema.String;
|
|
78
|
+
}>;
|
|
79
|
+
readonly output: Schema.$Array<Schema.Struct<{
|
|
80
|
+
readonly contribution: Schema.String;
|
|
81
|
+
readonly module: Schema.String;
|
|
82
|
+
readonly order: Schema.optionalKey<Schema.Number>;
|
|
83
|
+
readonly target: Schema.Union<readonly [Schema.Struct<{
|
|
84
|
+
readonly view: Schema.Struct<{
|
|
85
|
+
readonly id: Schema.String;
|
|
86
|
+
readonly module: Schema.String;
|
|
87
|
+
readonly title: Schema.String;
|
|
88
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
89
|
+
readonly route: Schema.String;
|
|
90
|
+
readonly shows: Schema.Union<readonly [Schema.Struct<{
|
|
91
|
+
readonly entity: Schema.String;
|
|
92
|
+
}>, Schema.Struct<{
|
|
93
|
+
readonly queryView: Schema.String;
|
|
94
|
+
}>]>;
|
|
95
|
+
}>;
|
|
96
|
+
}>, Schema.Struct<{
|
|
97
|
+
readonly command: Schema.Struct<{
|
|
98
|
+
readonly id: Schema.String;
|
|
99
|
+
readonly module: Schema.String;
|
|
100
|
+
readonly title: Schema.String;
|
|
101
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
102
|
+
readonly keywords: Schema.$Array<Schema.String>;
|
|
103
|
+
readonly run: Schema.Union<readonly [Schema.Struct<{
|
|
104
|
+
readonly kind: Schema.Literal<"action">;
|
|
105
|
+
readonly action: Schema.String;
|
|
106
|
+
}>, Schema.Struct<{
|
|
107
|
+
readonly kind: Schema.Literal<"view">;
|
|
108
|
+
readonly view: Schema.String;
|
|
109
|
+
readonly route: Schema.String;
|
|
110
|
+
}>]>;
|
|
111
|
+
}>;
|
|
112
|
+
}>]>;
|
|
113
|
+
}>>;
|
|
114
|
+
readonly errors: typeof UnknownSlot;
|
|
115
|
+
};
|
|
116
|
+
}, {
|
|
117
|
+
readonly SlotDescriptor: Schema.Struct<{
|
|
118
|
+
/** Namespaced by the module that exposes it, e.g. `home.launcher`. */
|
|
119
|
+
readonly id: Schema.String;
|
|
120
|
+
readonly module: Schema.String;
|
|
121
|
+
readonly description: Schema.String;
|
|
122
|
+
readonly accepts: Schema.Literals<readonly ["view", "command"]>;
|
|
123
|
+
}>;
|
|
124
|
+
readonly SlotEntry: Schema.Struct<{
|
|
125
|
+
readonly contribution: Schema.String;
|
|
126
|
+
readonly module: Schema.String;
|
|
127
|
+
readonly order: Schema.optionalKey<Schema.Number>;
|
|
128
|
+
readonly target: Schema.Union<readonly [Schema.Struct<{
|
|
129
|
+
readonly view: Schema.Struct<{
|
|
130
|
+
readonly id: Schema.String;
|
|
131
|
+
readonly module: Schema.String;
|
|
132
|
+
readonly title: Schema.String;
|
|
133
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
134
|
+
readonly route: Schema.String;
|
|
135
|
+
readonly shows: Schema.Union<readonly [Schema.Struct<{
|
|
136
|
+
readonly entity: Schema.String;
|
|
137
|
+
}>, Schema.Struct<{
|
|
138
|
+
readonly queryView: Schema.String;
|
|
139
|
+
}>]>;
|
|
140
|
+
}>;
|
|
141
|
+
}>, Schema.Struct<{
|
|
142
|
+
readonly command: Schema.Struct<{
|
|
143
|
+
readonly id: Schema.String;
|
|
144
|
+
readonly module: Schema.String;
|
|
145
|
+
readonly title: Schema.String;
|
|
146
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
147
|
+
readonly keywords: Schema.$Array<Schema.String>;
|
|
148
|
+
readonly run: Schema.Union<readonly [Schema.Struct<{
|
|
149
|
+
readonly kind: Schema.Literal<"action">;
|
|
150
|
+
readonly action: Schema.String;
|
|
151
|
+
}>, Schema.Struct<{
|
|
152
|
+
readonly kind: Schema.Literal<"view">;
|
|
153
|
+
readonly view: Schema.String;
|
|
154
|
+
readonly route: Schema.String;
|
|
155
|
+
}>]>;
|
|
156
|
+
}>;
|
|
157
|
+
}>]>;
|
|
158
|
+
}>;
|
|
159
|
+
readonly UnknownSlot: typeof UnknownSlot;
|
|
160
|
+
}>;
|
|
161
|
+
export {};
|
|
162
|
+
//# sourceMappingURL=Slot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Slot.d.ts","sourceRoot":"","sources":["../../src/contracts/Slot.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAK/B,eAAO,MAAM,cAAc;IACzB,sEAAsE;;;;;EAKtE,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC,IAAI,CAAA;AAEvD,wGAAwG;AACxG,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKpB,CAAA;AACF,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,IAAI,CAAA;;;;;AAE7C,qBAAa,WAAY,SAAQ,gBAG/B;CAAG;AAEL,eAAO,MAAM,YAAY;;;;;YAtBvB,sEAAsE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAAtE,sEAAsE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8CtE,CAAA"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slot (a shell contract): the extension points modules declare (`slots`) and the contributions other modules
|
|
3
|
+
* make to them (`contributions`: one of the app's views or commands), resolved across every installed module
|
|
4
|
+
* into one deterministic order. A slot accepts either views or commands; the manifest check refuses a
|
|
5
|
+
* contribution of the other kind, to a slot that does not exist, or of a target that does not exist.
|
|
6
|
+
* Documented in docs/contracts/slot.md; conformance kit `@eloxiv/testing/conformance/Slot`; implemented by
|
|
7
|
+
* `@eloxiv/shell-core` (`shellRegistry`).
|
|
8
|
+
*/
|
|
9
|
+
import { Schema } from "effect";
|
|
10
|
+
import { defineServiceContract } from "../Service.js";
|
|
11
|
+
import { PaletteEntry } from "./Command.js";
|
|
12
|
+
import { ViewDescriptor } from "./View.js";
|
|
13
|
+
export const SlotDescriptor = Schema.Struct({
|
|
14
|
+
/** Namespaced by the module that exposes it, e.g. `home.launcher`. */
|
|
15
|
+
id: Schema.String,
|
|
16
|
+
module: Schema.String,
|
|
17
|
+
description: Schema.String,
|
|
18
|
+
accepts: Schema.Literals(["view", "command"]),
|
|
19
|
+
});
|
|
20
|
+
/** One resolved contribution: who contributed it, its order, and the view or palette entry it names. */
|
|
21
|
+
export const SlotEntry = Schema.Struct({
|
|
22
|
+
contribution: Schema.String,
|
|
23
|
+
module: Schema.String,
|
|
24
|
+
order: Schema.optionalKey(Schema.Number),
|
|
25
|
+
target: Schema.Union([Schema.Struct({ view: ViewDescriptor }), Schema.Struct({ command: PaletteEntry })]),
|
|
26
|
+
});
|
|
27
|
+
export class UnknownSlot extends Schema.TaggedError()("UnknownSlot", {
|
|
28
|
+
message: Schema.String,
|
|
29
|
+
slot: Schema.String,
|
|
30
|
+
}) {
|
|
31
|
+
}
|
|
32
|
+
export const SlotContract = defineServiceContract({
|
|
33
|
+
name: "Slot",
|
|
34
|
+
kind: "shell",
|
|
35
|
+
version: "1.0.0",
|
|
36
|
+
description: "The extension points every installed module declares, and each one's contributions from any module, " +
|
|
37
|
+
"resolved to the view or palette entry they name and ordered deterministically: by `order` ascending (an " +
|
|
38
|
+
"entry without one after every entry with one), then by the contributing module's installation order, then " +
|
|
39
|
+
"by contribution id.",
|
|
40
|
+
operations: {
|
|
41
|
+
list: {
|
|
42
|
+
description: "Every slot, in module installation order, then by id.",
|
|
43
|
+
input: Schema.Struct({}),
|
|
44
|
+
output: Schema.Array(SlotDescriptor),
|
|
45
|
+
errors: Schema.Never,
|
|
46
|
+
},
|
|
47
|
+
resolve: {
|
|
48
|
+
description: "A slot's contributions from every installed module, resolved and in order.",
|
|
49
|
+
input: Schema.Struct({ slot: Schema.String }),
|
|
50
|
+
output: Schema.Array(SlotEntry),
|
|
51
|
+
errors: UnknownSlot,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
types: { SlotDescriptor, SlotEntry, UnknownSlot },
|
|
55
|
+
});
|
|
56
|
+
//# sourceMappingURL=Slot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Slot.js","sourceRoot":"","sources":["../../src/contracts/Slot.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAE1C,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC;IAC1C,sEAAsE;IACtE,EAAE,EAAE,MAAM,CAAC,MAAM;IACjB,MAAM,EAAE,MAAM,CAAC,MAAM;IACrB,WAAW,EAAE,MAAM,CAAC,MAAM;IAC1B,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CAC9C,CAAC,CAAA;AAGF,wGAAwG;AACxG,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC;IACrC,YAAY,EAAE,MAAM,CAAC,MAAM;IAC3B,MAAM,EAAE,MAAM,CAAC,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC;IACxC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC;CAC1G,CAAC,CAAA;AAGF,MAAM,OAAO,WAAY,SAAQ,MAAM,CAAC,WAAW,EAAe,CAAC,aAAa,EAAE;IAChF,OAAO,EAAE,MAAM,CAAC,MAAM;IACtB,IAAI,EAAE,MAAM,CAAC,MAAM;CACpB,CAAC;CAAG;AAEL,MAAM,CAAC,MAAM,YAAY,GAAG,qBAAqB,CAAC;IAChD,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,OAAO;IACb,OAAO,EAAE,OAAO;IAChB,WAAW,EACT,sGAAsG;QACtG,0GAA0G;QAC1G,4GAA4G;QAC5G,qBAAqB;IACvB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,WAAW,EAAE,uDAAuD;YACpE,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;YACxB,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC;YACpC,MAAM,EAAE,MAAM,CAAC,KAAK;SACrB;QACD,OAAO,EAAE;YACP,WAAW,EAAE,4EAA4E;YACzF,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC;YAC7C,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC;YAC/B,MAAM,EAAE,WAAW;SACpB;KACF;IACD,KAAK,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE,WAAW,EAAE;CAClD,CAAC,CAAA"}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Space (a shell contract): curated entry points over several modules' views. The organisation defines its
|
|
3
|
+
* spaces as data, its roles grant them, and each person personalises within the ones granted to them (pin,
|
|
4
|
+
* hide, reorder spaces; hide and reorder a space's entries; never add an entry the space does not have).
|
|
5
|
+
*
|
|
6
|
+
* Spaces live in the kernel-provided `spaces` module, synced through policy: a member's replica holds exactly
|
|
7
|
+
* the spaces granted to everyone in the organisation they act in or to a role they hold there (live: losing the
|
|
8
|
+
* role takes the space off the replica), and their own preferences, never anyone else's. Documented in
|
|
9
|
+
* docs/contracts/space.md; conformance kit `@eloxiv/testing/conformance/Space`; implemented by the kernel's
|
|
10
|
+
* `spacesModule` and `@eloxiv/shell-core` (`resolveSpaces`).
|
|
11
|
+
*/
|
|
12
|
+
import { Schema } from "effect";
|
|
13
|
+
import { Forbidden, InvalidInput, Unauthenticated } from "../Errors.ts";
|
|
14
|
+
/** The kernel's `spaces` module's actions. */
|
|
15
|
+
export declare const SPACES_ACTIONS: {
|
|
16
|
+
readonly define: "spaces.define";
|
|
17
|
+
readonly remove: "spaces.remove";
|
|
18
|
+
readonly personalise: "spaces.personalise";
|
|
19
|
+
readonly reset: "spaces.reset";
|
|
20
|
+
};
|
|
21
|
+
/** The permission that lets a member define and remove their organisation's spaces. */
|
|
22
|
+
export declare const SPACES_MANAGE_PERMISSION = "eloxiv.spaces.manage";
|
|
23
|
+
/**
|
|
24
|
+
* The audience value the kernel stores for a space granted to every member of the organisation. It is not a role
|
|
25
|
+
* id (role ids are the Directory's, `^[a-z0-9][a-z0-9_-]{0,62}$`), so no role can stand for it: everyone is said only
|
|
26
|
+
* as `{ everyone: true }`.
|
|
27
|
+
*/
|
|
28
|
+
export declare const EVERYONE = "*";
|
|
29
|
+
export declare const SpaceId: Schema.String;
|
|
30
|
+
/** One entry point of a space: a view of an installed module, by id. */
|
|
31
|
+
export declare const SpaceEntry: Schema.Struct<{
|
|
32
|
+
readonly view: Schema.String;
|
|
33
|
+
}>;
|
|
34
|
+
export type SpaceEntry = typeof SpaceEntry.Type;
|
|
35
|
+
/**
|
|
36
|
+
* Who a space is granted to: every member of the organisation (`{ everyone: true }`, the only way to say it), or
|
|
37
|
+
* the members holding one of these roles (Directory role ids; a wildcard such as `*` is refused).
|
|
38
|
+
*/
|
|
39
|
+
export declare const SpaceAudience: Schema.Union<readonly [Schema.Struct<{
|
|
40
|
+
readonly everyone: Schema.Literal<true>;
|
|
41
|
+
}>, Schema.Struct<{
|
|
42
|
+
readonly roles: Schema.$Array<Schema.String>;
|
|
43
|
+
}>]>;
|
|
44
|
+
export type SpaceAudience = typeof SpaceAudience.Type;
|
|
45
|
+
/** A space as its organisation defines it (`spaces.define` replaces the whole definition). */
|
|
46
|
+
export declare const SpaceDefinition: Schema.Struct<{
|
|
47
|
+
readonly id: Schema.String;
|
|
48
|
+
readonly title: Schema.String;
|
|
49
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
50
|
+
/** An icon name the shell's icon set understands (opaque to the kernel). */
|
|
51
|
+
readonly icon: Schema.optionalKey<Schema.String>;
|
|
52
|
+
readonly entries: Schema.$Array<Schema.Struct<{
|
|
53
|
+
readonly view: Schema.String;
|
|
54
|
+
}>>;
|
|
55
|
+
readonly audience: Schema.Union<readonly [Schema.Struct<{
|
|
56
|
+
readonly everyone: Schema.Literal<true>;
|
|
57
|
+
}>, Schema.Struct<{
|
|
58
|
+
readonly roles: Schema.$Array<Schema.String>;
|
|
59
|
+
}>]>;
|
|
60
|
+
/** The organisation's default order (ascending). */
|
|
61
|
+
readonly position: Schema.optionalKey<Schema.Number>;
|
|
62
|
+
}>;
|
|
63
|
+
export type SpaceDefinition = typeof SpaceDefinition.Type;
|
|
64
|
+
/**
|
|
65
|
+
* One person's personalisation of one space granted to them. Every field is optional; `spaces.personalise`
|
|
66
|
+
* replaces the person's preferences for the space with these. `entryOrder` and `hiddenEntries` name the space's
|
|
67
|
+
* own entries (by view id); entries the space does not have are ignored, so a person can never add one.
|
|
68
|
+
*/
|
|
69
|
+
export declare const SpacePreference: Schema.Struct<{
|
|
70
|
+
readonly space: Schema.String;
|
|
71
|
+
readonly pinned: Schema.optionalKey<Schema.Boolean>;
|
|
72
|
+
readonly hidden: Schema.optionalKey<Schema.Boolean>;
|
|
73
|
+
readonly position: Schema.optionalKey<Schema.Number>;
|
|
74
|
+
readonly entryOrder: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
75
|
+
readonly hiddenEntries: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
76
|
+
}>;
|
|
77
|
+
export type SpacePreference = typeof SpacePreference.Type;
|
|
78
|
+
/**
|
|
79
|
+
* A space as one person sees it: granted to them, its entries resolved to installed views (an entry naming a
|
|
80
|
+
* view no installed module declares is dropped) in their order with their hidden entries left out, and their
|
|
81
|
+
* pin and position applied. Spaces they hid are left out of `mine` unless asked for.
|
|
82
|
+
*/
|
|
83
|
+
export declare const ResolvedSpace: Schema.Struct<{
|
|
84
|
+
readonly id: Schema.String;
|
|
85
|
+
readonly title: Schema.String;
|
|
86
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
87
|
+
readonly icon: Schema.optionalKey<Schema.String>;
|
|
88
|
+
readonly pinned: Schema.Boolean;
|
|
89
|
+
readonly hidden: Schema.Boolean;
|
|
90
|
+
readonly position: Schema.Number;
|
|
91
|
+
readonly entries: Schema.$Array<Schema.Struct<{
|
|
92
|
+
readonly id: Schema.String;
|
|
93
|
+
readonly module: Schema.String;
|
|
94
|
+
readonly title: Schema.String;
|
|
95
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
96
|
+
readonly route: Schema.String;
|
|
97
|
+
readonly shows: Schema.Union<readonly [Schema.Struct<{
|
|
98
|
+
readonly entity: Schema.String;
|
|
99
|
+
}>, Schema.Struct<{
|
|
100
|
+
readonly queryView: Schema.String;
|
|
101
|
+
}>]>;
|
|
102
|
+
}>>;
|
|
103
|
+
}>;
|
|
104
|
+
export type ResolvedSpace = typeof ResolvedSpace.Type;
|
|
105
|
+
export declare const SpaceRef: Schema.Struct<{
|
|
106
|
+
readonly id: Schema.String;
|
|
107
|
+
}>;
|
|
108
|
+
export type SpaceRef = typeof SpaceRef.Type;
|
|
109
|
+
export declare const SpaceContract: import("../Service.ts").ServiceContract<"Space", {
|
|
110
|
+
readonly define: {
|
|
111
|
+
description: string;
|
|
112
|
+
input: Schema.Struct<{
|
|
113
|
+
readonly id: Schema.String;
|
|
114
|
+
readonly title: Schema.String;
|
|
115
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
116
|
+
/** An icon name the shell's icon set understands (opaque to the kernel). */
|
|
117
|
+
readonly icon: Schema.optionalKey<Schema.String>;
|
|
118
|
+
readonly entries: Schema.$Array<Schema.Struct<{
|
|
119
|
+
readonly view: Schema.String;
|
|
120
|
+
}>>;
|
|
121
|
+
readonly audience: Schema.Union<readonly [Schema.Struct<{
|
|
122
|
+
readonly everyone: Schema.Literal<true>;
|
|
123
|
+
}>, Schema.Struct<{
|
|
124
|
+
readonly roles: Schema.$Array<Schema.String>;
|
|
125
|
+
}>]>;
|
|
126
|
+
/** The organisation's default order (ascending). */
|
|
127
|
+
readonly position: Schema.optionalKey<Schema.Number>;
|
|
128
|
+
}>;
|
|
129
|
+
output: Schema.Struct<{
|
|
130
|
+
readonly id: Schema.String;
|
|
131
|
+
}>;
|
|
132
|
+
errors: Schema.Union<readonly [typeof Unauthenticated, typeof Forbidden, typeof InvalidInput]>;
|
|
133
|
+
};
|
|
134
|
+
readonly remove: {
|
|
135
|
+
readonly description: "Withdraw one of the organisation's spaces from everyone (action spaces.remove; administrators).";
|
|
136
|
+
readonly input: Schema.Struct<{
|
|
137
|
+
readonly id: Schema.String;
|
|
138
|
+
}>;
|
|
139
|
+
readonly output: Schema.Struct<{
|
|
140
|
+
readonly id: Schema.String;
|
|
141
|
+
}>;
|
|
142
|
+
readonly errors: Schema.Union<readonly [typeof Unauthenticated, typeof Forbidden]>;
|
|
143
|
+
};
|
|
144
|
+
readonly personalise: {
|
|
145
|
+
description: string;
|
|
146
|
+
input: Schema.Struct<{
|
|
147
|
+
readonly space: Schema.String;
|
|
148
|
+
readonly pinned: Schema.optionalKey<Schema.Boolean>;
|
|
149
|
+
readonly hidden: Schema.optionalKey<Schema.Boolean>;
|
|
150
|
+
readonly position: Schema.optionalKey<Schema.Number>;
|
|
151
|
+
readonly entryOrder: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
152
|
+
readonly hiddenEntries: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
153
|
+
}>;
|
|
154
|
+
output: Schema.Struct<{
|
|
155
|
+
readonly id: Schema.String;
|
|
156
|
+
}>;
|
|
157
|
+
errors: Schema.Union<readonly [typeof Unauthenticated, typeof Forbidden, typeof InvalidInput]>;
|
|
158
|
+
};
|
|
159
|
+
readonly reset: {
|
|
160
|
+
readonly description: "Drop your preferences for a space, back to the organisation's definition (action spaces.reset).";
|
|
161
|
+
readonly input: Schema.Struct<{
|
|
162
|
+
readonly id: Schema.String;
|
|
163
|
+
}>;
|
|
164
|
+
readonly output: Schema.Struct<{
|
|
165
|
+
readonly id: Schema.String;
|
|
166
|
+
}>;
|
|
167
|
+
readonly errors: typeof Unauthenticated;
|
|
168
|
+
};
|
|
169
|
+
readonly mine: {
|
|
170
|
+
description: string;
|
|
171
|
+
input: Schema.Struct<{
|
|
172
|
+
readonly includeHidden: Schema.optionalKey<Schema.Boolean>;
|
|
173
|
+
}>;
|
|
174
|
+
output: Schema.$Array<Schema.Struct<{
|
|
175
|
+
readonly id: Schema.String;
|
|
176
|
+
readonly title: Schema.String;
|
|
177
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
178
|
+
readonly icon: Schema.optionalKey<Schema.String>;
|
|
179
|
+
readonly pinned: Schema.Boolean;
|
|
180
|
+
readonly hidden: Schema.Boolean;
|
|
181
|
+
readonly position: Schema.Number;
|
|
182
|
+
readonly entries: Schema.$Array<Schema.Struct<{
|
|
183
|
+
readonly id: Schema.String;
|
|
184
|
+
readonly module: Schema.String;
|
|
185
|
+
readonly title: Schema.String;
|
|
186
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
187
|
+
readonly route: Schema.String;
|
|
188
|
+
readonly shows: Schema.Union<readonly [Schema.Struct<{
|
|
189
|
+
readonly entity: Schema.String;
|
|
190
|
+
}>, Schema.Struct<{
|
|
191
|
+
readonly queryView: Schema.String;
|
|
192
|
+
}>]>;
|
|
193
|
+
}>>;
|
|
194
|
+
}>>;
|
|
195
|
+
errors: Schema.Never;
|
|
196
|
+
};
|
|
197
|
+
}, {
|
|
198
|
+
readonly SpaceDefinition: Schema.Struct<{
|
|
199
|
+
readonly id: Schema.String;
|
|
200
|
+
readonly title: Schema.String;
|
|
201
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
202
|
+
/** An icon name the shell's icon set understands (opaque to the kernel). */
|
|
203
|
+
readonly icon: Schema.optionalKey<Schema.String>;
|
|
204
|
+
readonly entries: Schema.$Array<Schema.Struct<{
|
|
205
|
+
readonly view: Schema.String;
|
|
206
|
+
}>>;
|
|
207
|
+
readonly audience: Schema.Union<readonly [Schema.Struct<{
|
|
208
|
+
readonly everyone: Schema.Literal<true>;
|
|
209
|
+
}>, Schema.Struct<{
|
|
210
|
+
readonly roles: Schema.$Array<Schema.String>;
|
|
211
|
+
}>]>;
|
|
212
|
+
/** The organisation's default order (ascending). */
|
|
213
|
+
readonly position: Schema.optionalKey<Schema.Number>;
|
|
214
|
+
}>;
|
|
215
|
+
readonly SpaceAudience: Schema.Union<readonly [Schema.Struct<{
|
|
216
|
+
readonly everyone: Schema.Literal<true>;
|
|
217
|
+
}>, Schema.Struct<{
|
|
218
|
+
readonly roles: Schema.$Array<Schema.String>;
|
|
219
|
+
}>]>;
|
|
220
|
+
readonly SpaceEntry: Schema.Struct<{
|
|
221
|
+
readonly view: Schema.String;
|
|
222
|
+
}>;
|
|
223
|
+
readonly SpacePreference: Schema.Struct<{
|
|
224
|
+
readonly space: Schema.String;
|
|
225
|
+
readonly pinned: Schema.optionalKey<Schema.Boolean>;
|
|
226
|
+
readonly hidden: Schema.optionalKey<Schema.Boolean>;
|
|
227
|
+
readonly position: Schema.optionalKey<Schema.Number>;
|
|
228
|
+
readonly entryOrder: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
229
|
+
readonly hiddenEntries: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
230
|
+
}>;
|
|
231
|
+
readonly ResolvedSpace: Schema.Struct<{
|
|
232
|
+
readonly id: Schema.String;
|
|
233
|
+
readonly title: Schema.String;
|
|
234
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
235
|
+
readonly icon: Schema.optionalKey<Schema.String>;
|
|
236
|
+
readonly pinned: Schema.Boolean;
|
|
237
|
+
readonly hidden: Schema.Boolean;
|
|
238
|
+
readonly position: Schema.Number;
|
|
239
|
+
readonly entries: Schema.$Array<Schema.Struct<{
|
|
240
|
+
readonly id: Schema.String;
|
|
241
|
+
readonly module: Schema.String;
|
|
242
|
+
readonly title: Schema.String;
|
|
243
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
244
|
+
readonly route: Schema.String;
|
|
245
|
+
readonly shows: Schema.Union<readonly [Schema.Struct<{
|
|
246
|
+
readonly entity: Schema.String;
|
|
247
|
+
}>, Schema.Struct<{
|
|
248
|
+
readonly queryView: Schema.String;
|
|
249
|
+
}>]>;
|
|
250
|
+
}>>;
|
|
251
|
+
}>;
|
|
252
|
+
readonly SpaceRef: Schema.Struct<{
|
|
253
|
+
readonly id: Schema.String;
|
|
254
|
+
}>;
|
|
255
|
+
}>;
|
|
256
|
+
//# sourceMappingURL=Space.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Space.d.ts","sourceRoot":"","sources":["../../src/contracts/Space.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAKvE,8CAA8C;AAC9C,eAAO,MAAM,cAAc;aACzB,MAAM,EAAE,eAAe;aACvB,MAAM,EAAE,eAAe;aACvB,WAAW,EAAE,oBAAoB;aACjC,KAAK,EAAE,cAAc;CACb,CAAA;AAEV,uFAAuF;AACvF,eAAO,MAAM,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;;;;;;EA6FpD,CAAA"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Space (a shell contract): curated entry points over several modules' views. The organisation defines its
|
|
3
|
+
* spaces as data, its roles grant them, and each person personalises within the ones granted to them (pin,
|
|
4
|
+
* hide, reorder spaces; hide and reorder a space's entries; never add an entry the space does not have).
|
|
5
|
+
*
|
|
6
|
+
* Spaces live in the kernel-provided `spaces` module, synced through policy: a member's replica holds exactly
|
|
7
|
+
* the spaces granted to everyone in the organisation they act in or to a role they hold there (live: losing the
|
|
8
|
+
* role takes the space off the replica), and their own preferences, never anyone else's. Documented in
|
|
9
|
+
* docs/contracts/space.md; conformance kit `@eloxiv/testing/conformance/Space`; implemented by the kernel's
|
|
10
|
+
* `spacesModule` and `@eloxiv/shell-core` (`resolveSpaces`).
|
|
11
|
+
*/
|
|
12
|
+
import { Schema } from "effect";
|
|
13
|
+
import { Forbidden, InvalidInput, Unauthenticated } from "../Errors.js";
|
|
14
|
+
import { defineServiceContract } from "../Service.js";
|
|
15
|
+
import { DirectoryId } from "./Directory.js";
|
|
16
|
+
import { ViewDescriptor } from "./View.js";
|
|
17
|
+
/** The kernel's `spaces` module's actions. */
|
|
18
|
+
export const SPACES_ACTIONS = {
|
|
19
|
+
define: "spaces.define",
|
|
20
|
+
remove: "spaces.remove",
|
|
21
|
+
personalise: "spaces.personalise",
|
|
22
|
+
reset: "spaces.reset",
|
|
23
|
+
};
|
|
24
|
+
/** The permission that lets a member define and remove their organisation's spaces. */
|
|
25
|
+
export const SPACES_MANAGE_PERMISSION = "eloxiv.spaces.manage";
|
|
26
|
+
/**
|
|
27
|
+
* The audience value the kernel stores for a space granted to every member of the organisation. It is not a role
|
|
28
|
+
* id (role ids are the Directory's, `^[a-z0-9][a-z0-9_-]{0,62}$`), so no role can stand for it: everyone is said only
|
|
29
|
+
* as `{ everyone: true }`.
|
|
30
|
+
*/
|
|
31
|
+
export const EVERYONE = "*";
|
|
32
|
+
const SPACE_ID = /^[a-z][a-z0-9-]{0,62}$/;
|
|
33
|
+
export const SpaceId = Schema.String.check(Schema.isPattern(SPACE_ID));
|
|
34
|
+
/** One entry point of a space: a view of an installed module, by id. */
|
|
35
|
+
export const SpaceEntry = Schema.Struct({ view: Schema.String.check(Schema.isNonEmpty(), Schema.isMaxLength(200)) });
|
|
36
|
+
/**
|
|
37
|
+
* Who a space is granted to: every member of the organisation (`{ everyone: true }`, the only way to say it), or
|
|
38
|
+
* the members holding one of these roles (Directory role ids; a wildcard such as `*` is refused).
|
|
39
|
+
*/
|
|
40
|
+
export const SpaceAudience = Schema.Union([
|
|
41
|
+
Schema.Struct({ everyone: Schema.Literal(true) }),
|
|
42
|
+
Schema.Struct({
|
|
43
|
+
roles: Schema.Array(DirectoryId).check(Schema.isMinLength(1), Schema.isMaxLength(50)),
|
|
44
|
+
}),
|
|
45
|
+
]);
|
|
46
|
+
/** A space as its organisation defines it (`spaces.define` replaces the whole definition). */
|
|
47
|
+
export const SpaceDefinition = Schema.Struct({
|
|
48
|
+
id: SpaceId,
|
|
49
|
+
title: Schema.String.check(Schema.isNonEmpty(), Schema.isMaxLength(200)),
|
|
50
|
+
description: Schema.optionalKey(Schema.String.check(Schema.isMaxLength(1000))),
|
|
51
|
+
/** An icon name the shell's icon set understands (opaque to the kernel). */
|
|
52
|
+
icon: Schema.optionalKey(Schema.String.check(Schema.isMaxLength(100))),
|
|
53
|
+
entries: Schema.Array(SpaceEntry).check(Schema.isMaxLength(100)),
|
|
54
|
+
audience: SpaceAudience,
|
|
55
|
+
/** The organisation's default order (ascending). */
|
|
56
|
+
position: Schema.optionalKey(Schema.Number.check(Schema.isInt(), Schema.isBetween({ minimum: 0, maximum: 10_000 }))),
|
|
57
|
+
});
|
|
58
|
+
/**
|
|
59
|
+
* One person's personalisation of one space granted to them. Every field is optional; `spaces.personalise`
|
|
60
|
+
* replaces the person's preferences for the space with these. `entryOrder` and `hiddenEntries` name the space's
|
|
61
|
+
* own entries (by view id); entries the space does not have are ignored, so a person can never add one.
|
|
62
|
+
*/
|
|
63
|
+
export const SpacePreference = Schema.Struct({
|
|
64
|
+
space: SpaceId,
|
|
65
|
+
pinned: Schema.optionalKey(Schema.Boolean),
|
|
66
|
+
hidden: Schema.optionalKey(Schema.Boolean),
|
|
67
|
+
position: Schema.optionalKey(Schema.Number.check(Schema.isInt(), Schema.isBetween({ minimum: 0, maximum: 10_000 }))),
|
|
68
|
+
entryOrder: Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMaxLength(200))).check(Schema.isMaxLength(100))),
|
|
69
|
+
hiddenEntries: Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMaxLength(200))).check(Schema.isMaxLength(100))),
|
|
70
|
+
});
|
|
71
|
+
/**
|
|
72
|
+
* A space as one person sees it: granted to them, its entries resolved to installed views (an entry naming a
|
|
73
|
+
* view no installed module declares is dropped) in their order with their hidden entries left out, and their
|
|
74
|
+
* pin and position applied. Spaces they hid are left out of `mine` unless asked for.
|
|
75
|
+
*/
|
|
76
|
+
export const ResolvedSpace = Schema.Struct({
|
|
77
|
+
id: SpaceId,
|
|
78
|
+
title: Schema.String,
|
|
79
|
+
description: Schema.optionalKey(Schema.String),
|
|
80
|
+
icon: Schema.optionalKey(Schema.String),
|
|
81
|
+
pinned: Schema.Boolean,
|
|
82
|
+
hidden: Schema.Boolean,
|
|
83
|
+
position: Schema.Number,
|
|
84
|
+
entries: Schema.Array(ViewDescriptor),
|
|
85
|
+
});
|
|
86
|
+
export const SpaceRef = Schema.Struct({ id: SpaceId });
|
|
87
|
+
export const SpaceContract = defineServiceContract({
|
|
88
|
+
name: "Space",
|
|
89
|
+
kind: "shell",
|
|
90
|
+
version: "1.0.0",
|
|
91
|
+
description: "Curated entry points over several modules' views: the organisation defines spaces as data (administrators " +
|
|
92
|
+
"holding eloxiv.spaces.manage), grants each to every member or to roles, and each person personalises within " +
|
|
93
|
+
"the spaces granted to them. Synced through policy: a replica holds exactly the spaces granted to its actor " +
|
|
94
|
+
"in the organisation it acts in (live as roles change) and the actor's own preferences.",
|
|
95
|
+
operations: {
|
|
96
|
+
define: {
|
|
97
|
+
description: "Define or replace one of the organisation's spaces (action spaces.define; administrators). Replacing " +
|
|
98
|
+
"it re-grants it: roles no longer in its audience lose it at once.",
|
|
99
|
+
input: SpaceDefinition,
|
|
100
|
+
output: SpaceRef,
|
|
101
|
+
errors: Schema.Union([Unauthenticated, Forbidden, InvalidInput]),
|
|
102
|
+
},
|
|
103
|
+
remove: {
|
|
104
|
+
description: "Withdraw one of the organisation's spaces from everyone (action spaces.remove; administrators).",
|
|
105
|
+
input: SpaceRef,
|
|
106
|
+
output: SpaceRef,
|
|
107
|
+
errors: Schema.Union([Unauthenticated, Forbidden]),
|
|
108
|
+
},
|
|
109
|
+
personalise: {
|
|
110
|
+
description: "Set your own preferences for a space granted to you (action spaces.personalise): pinned, hidden, " +
|
|
111
|
+
"position, entry order and hidden entries. Forbidden for a space not granted to you (whether or not it exists).",
|
|
112
|
+
input: SpacePreference,
|
|
113
|
+
output: SpaceRef,
|
|
114
|
+
errors: Schema.Union([Unauthenticated, Forbidden, InvalidInput]),
|
|
115
|
+
},
|
|
116
|
+
reset: {
|
|
117
|
+
description: "Drop your preferences for a space, back to the organisation's definition (action spaces.reset).",
|
|
118
|
+
input: SpaceRef,
|
|
119
|
+
output: SpaceRef,
|
|
120
|
+
errors: Unauthenticated,
|
|
121
|
+
},
|
|
122
|
+
mine: {
|
|
123
|
+
description: "Your spaces, resolved from your replica against the installed views: granted, personalised, ordered " +
|
|
124
|
+
"(pinned first, then by your position or the organisation's, then by title). Hidden spaces only with " +
|
|
125
|
+
"`includeHidden`.",
|
|
126
|
+
input: Schema.Struct({ includeHidden: Schema.optionalKey(Schema.Boolean) }),
|
|
127
|
+
output: Schema.Array(ResolvedSpace),
|
|
128
|
+
errors: Schema.Never,
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
types: { SpaceDefinition, SpaceAudience, SpaceEntry, SpacePreference, Resolv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