@dotdo/do 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +400 -0
- package/dist/ai/embeddings.d.ts +129 -0
- package/dist/ai/embeddings.d.ts.map +1 -0
- package/dist/ai/embeddings.js +217 -0
- package/dist/ai/embeddings.js.map +1 -0
- package/dist/ai/gateway.d.ts +139 -0
- package/dist/ai/gateway.d.ts.map +1 -0
- package/dist/ai/gateway.js +179 -0
- package/dist/ai/gateway.js.map +1 -0
- package/dist/ai/image.d.ts +140 -0
- package/dist/ai/image.d.ts.map +1 -0
- package/dist/ai/image.js +199 -0
- package/dist/ai/image.js.map +1 -0
- package/dist/ai/index.d.ts +98 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/index.js +223 -0
- package/dist/ai/index.js.map +1 -0
- package/dist/ai/models.d.ts +81 -0
- package/dist/ai/models.d.ts.map +1 -0
- package/dist/ai/models.js +537 -0
- package/dist/ai/models.js.map +1 -0
- package/dist/ai/text.d.ts +176 -0
- package/dist/ai/text.d.ts.map +1 -0
- package/dist/ai/text.js +253 -0
- package/dist/ai/text.js.map +1 -0
- package/dist/ai/voice/agents.d.ts +224 -0
- package/dist/ai/voice/agents.d.ts.map +1 -0
- package/dist/ai/voice/agents.js +375 -0
- package/dist/ai/voice/agents.js.map +1 -0
- package/dist/ai/voice/campaigns.d.ts +307 -0
- package/dist/ai/voice/campaigns.d.ts.map +1 -0
- package/dist/ai/voice/campaigns.js +739 -0
- package/dist/ai/voice/campaigns.js.map +1 -0
- package/dist/ai/voice/index.d.ts +21 -0
- package/dist/ai/voice/index.d.ts.map +1 -0
- package/dist/ai/voice/index.js +42 -0
- package/dist/ai/voice/index.js.map +1 -0
- package/dist/ai/voice/providers.d.ts +283 -0
- package/dist/ai/voice/providers.d.ts.map +1 -0
- package/dist/ai/voice/providers.js +286 -0
- package/dist/ai/voice/providers.js.map +1 -0
- package/dist/ai/voice/sessions.d.ts +294 -0
- package/dist/ai/voice/sessions.d.ts.map +1 -0
- package/dist/ai/voice/sessions.js +531 -0
- package/dist/ai/voice/sessions.js.map +1 -0
- package/dist/ai/voice/tools.d.ts +242 -0
- package/dist/ai/voice/tools.d.ts.map +1 -0
- package/dist/ai/voice/tools.js +370 -0
- package/dist/ai/voice/tools.js.map +1 -0
- package/dist/ai/voice/tts.d.ts +173 -0
- package/dist/ai/voice/tts.d.ts.map +1 -0
- package/dist/ai/voice/tts.js +252 -0
- package/dist/ai/voice/tts.js.map +1 -0
- package/dist/ai/voice/webrtc.d.ts +228 -0
- package/dist/ai/voice/webrtc.d.ts.map +1 -0
- package/dist/ai/voice/webrtc.js +372 -0
- package/dist/ai/voice/webrtc.js.map +1 -0
- package/dist/api/index.d.ts +103 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +191 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/mcp/handlers.d.ts +25 -0
- package/dist/api/mcp/handlers.d.ts.map +1 -0
- package/dist/api/mcp/handlers.js +422 -0
- package/dist/api/mcp/handlers.js.map +1 -0
- package/dist/api/mcp/index.d.ts +113 -0
- package/dist/api/mcp/index.d.ts.map +1 -0
- package/dist/api/mcp/index.js +141 -0
- package/dist/api/mcp/index.js.map +1 -0
- package/dist/api/middleware/auth.d.ts +65 -0
- package/dist/api/middleware/auth.d.ts.map +1 -0
- package/dist/api/middleware/auth.js +271 -0
- package/dist/api/middleware/auth.js.map +1 -0
- package/dist/api/middleware/cors.d.ts +62 -0
- package/dist/api/middleware/cors.d.ts.map +1 -0
- package/dist/api/middleware/cors.js +225 -0
- package/dist/api/middleware/cors.js.map +1 -0
- package/dist/api/middleware/index.d.ts +60 -0
- package/dist/api/middleware/index.d.ts.map +1 -0
- package/dist/api/middleware/index.js +175 -0
- package/dist/api/middleware/index.js.map +1 -0
- package/dist/api/middleware/rateLimit.d.ts +84 -0
- package/dist/api/middleware/rateLimit.d.ts.map +1 -0
- package/dist/api/middleware/rateLimit.js +321 -0
- package/dist/api/middleware/rateLimit.js.map +1 -0
- package/dist/api/routes/ai.d.ts +17 -0
- package/dist/api/routes/ai.d.ts.map +1 -0
- package/dist/api/routes/ai.js +430 -0
- package/dist/api/routes/ai.js.map +1 -0
- package/dist/api/routes/do.d.ts +17 -0
- package/dist/api/routes/do.d.ts.map +1 -0
- package/dist/api/routes/do.js +458 -0
- package/dist/api/routes/do.js.map +1 -0
- package/dist/api/routes/functions.d.ts +111 -0
- package/dist/api/routes/functions.d.ts.map +1 -0
- package/dist/api/routes/functions.js +548 -0
- package/dist/api/routes/functions.js.map +1 -0
- package/dist/api/routes/health.d.ts +16 -0
- package/dist/api/routes/health.d.ts.map +1 -0
- package/dist/api/routes/health.js +163 -0
- package/dist/api/routes/health.js.map +1 -0
- package/dist/api/routes/index.d.ts +41 -0
- package/dist/api/routes/index.d.ts.map +1 -0
- package/dist/api/routes/index.js +275 -0
- package/dist/api/routes/index.js.map +1 -0
- package/dist/api/routes/nouns.d.ts +26 -0
- package/dist/api/routes/nouns.d.ts.map +1 -0
- package/dist/api/routes/nouns.js +456 -0
- package/dist/api/routes/nouns.js.map +1 -0
- package/dist/api/routes/orgs.d.ts +17 -0
- package/dist/api/routes/orgs.d.ts.map +1 -0
- package/dist/api/routes/orgs.js +560 -0
- package/dist/api/routes/orgs.js.map +1 -0
- package/dist/api/routes/relationships.d.ts +30 -0
- package/dist/api/routes/relationships.d.ts.map +1 -0
- package/dist/api/routes/relationships.js +360 -0
- package/dist/api/routes/relationships.js.map +1 -0
- package/dist/api/routes/roles.d.ts +17 -0
- package/dist/api/routes/roles.d.ts.map +1 -0
- package/dist/api/routes/roles.js +721 -0
- package/dist/api/routes/roles.js.map +1 -0
- package/dist/api/routes/things.d.ts +27 -0
- package/dist/api/routes/things.d.ts.map +1 -0
- package/dist/api/routes/things.js +568 -0
- package/dist/api/routes/things.js.map +1 -0
- package/dist/api/routes/users.d.ts +17 -0
- package/dist/api/routes/users.d.ts.map +1 -0
- package/dist/api/routes/users.js +401 -0
- package/dist/api/routes/users.js.map +1 -0
- package/dist/api/routes/verbs.d.ts +31 -0
- package/dist/api/routes/verbs.d.ts.map +1 -0
- package/dist/api/routes/verbs.js +505 -0
- package/dist/api/routes/verbs.js.map +1 -0
- package/dist/api/routes/workflows.d.ts +44 -0
- package/dist/api/routes/workflows.d.ts.map +1 -0
- package/dist/api/routes/workflows.js +521 -0
- package/dist/api/routes/workflows.js.map +1 -0
- package/dist/api/types.d.ts +370 -0
- package/dist/api/types.d.ts.map +1 -0
- package/dist/api/types.js +11 -0
- package/dist/api/types.js.map +1 -0
- package/dist/db/cdc/events.d.ts +201 -0
- package/dist/db/cdc/events.d.ts.map +1 -0
- package/dist/db/cdc/events.js +271 -0
- package/dist/db/cdc/events.js.map +1 -0
- package/dist/db/cdc/index.d.ts +13 -0
- package/dist/db/cdc/index.d.ts.map +1 -0
- package/dist/db/cdc/index.js +16 -0
- package/dist/db/cdc/index.js.map +1 -0
- package/dist/db/cdc/replay.d.ts +388 -0
- package/dist/db/cdc/replay.d.ts.map +1 -0
- package/dist/db/cdc/replay.js +469 -0
- package/dist/db/cdc/replay.js.map +1 -0
- package/dist/db/cdc/storage.d.ts +567 -0
- package/dist/db/cdc/storage.d.ts.map +1 -0
- package/dist/db/cdc/storage.js +856 -0
- package/dist/db/cdc/storage.js.map +1 -0
- package/dist/db/cdc/streaming.d.ts +459 -0
- package/dist/db/cdc/streaming.d.ts.map +1 -0
- package/dist/db/cdc/streaming.js +636 -0
- package/dist/db/cdc/streaming.js.map +1 -0
- package/dist/db/collections/actions.d.ts +440 -0
- package/dist/db/collections/actions.d.ts.map +1 -0
- package/dist/db/collections/actions.js +631 -0
- package/dist/db/collections/actions.js.map +1 -0
- package/dist/db/collections/base.d.ts +342 -0
- package/dist/db/collections/base.d.ts.map +1 -0
- package/dist/db/collections/base.js +510 -0
- package/dist/db/collections/base.js.map +1 -0
- package/dist/db/collections/index.d.ts +50 -0
- package/dist/db/collections/index.d.ts.map +1 -0
- package/dist/db/collections/index.js +48 -0
- package/dist/db/collections/index.js.map +1 -0
- package/dist/db/collections/nouns.d.ts +260 -0
- package/dist/db/collections/nouns.d.ts.map +1 -0
- package/dist/db/collections/nouns.js +273 -0
- package/dist/db/collections/nouns.js.map +1 -0
- package/dist/db/collections/relationships.d.ts +484 -0
- package/dist/db/collections/relationships.d.ts.map +1 -0
- package/dist/db/collections/relationships.js +815 -0
- package/dist/db/collections/relationships.js.map +1 -0
- package/dist/db/collections/things.d.ts +439 -0
- package/dist/db/collections/things.d.ts.map +1 -0
- package/dist/db/collections/things.js +603 -0
- package/dist/db/collections/things.js.map +1 -0
- package/dist/db/collections/verbs.d.ts +308 -0
- package/dist/db/collections/verbs.d.ts.map +1 -0
- package/dist/db/collections/verbs.js +480 -0
- package/dist/db/collections/verbs.js.map +1 -0
- package/dist/db/index.d.ts +14 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +23 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/storage/cold.d.ts +313 -0
- package/dist/db/storage/cold.d.ts.map +1 -0
- package/dist/db/storage/cold.js +319 -0
- package/dist/db/storage/cold.js.map +1 -0
- package/dist/db/storage/hot.d.ts +340 -0
- package/dist/db/storage/hot.d.ts.map +1 -0
- package/dist/db/storage/hot.js +333 -0
- package/dist/db/storage/hot.js.map +1 -0
- package/dist/db/storage/index.d.ts +242 -0
- package/dist/db/storage/index.d.ts.map +1 -0
- package/dist/db/storage/index.js +109 -0
- package/dist/db/storage/index.js.map +1 -0
- package/dist/db/storage/snapshots.d.ts +342 -0
- package/dist/db/storage/snapshots.d.ts.map +1 -0
- package/dist/db/storage/snapshots.js +298 -0
- package/dist/db/storage/snapshots.js.map +1 -0
- package/dist/db/storage/vortex.d.ts +324 -0
- package/dist/db/storage/vortex.d.ts.map +1 -0
- package/dist/db/storage/vortex.js +365 -0
- package/dist/db/storage/vortex.js.map +1 -0
- package/dist/db/storage/warm.d.ts +306 -0
- package/dist/db/storage/warm.d.ts.map +1 -0
- package/dist/db/storage/warm.js +339 -0
- package/dist/db/storage/warm.js.map +1 -0
- package/dist/do/DigitalObject.d.ts +595 -0
- package/dist/do/DigitalObject.d.ts.map +1 -0
- package/dist/do/DigitalObject.js +971 -0
- package/dist/do/DigitalObject.js.map +1 -0
- package/dist/do/business/financial/accounting.d.ts +436 -0
- package/dist/do/business/financial/accounting.d.ts.map +1 -0
- package/dist/do/business/financial/accounting.js +476 -0
- package/dist/do/business/financial/accounting.js.map +1 -0
- package/dist/do/business/financial/index.d.ts +15 -0
- package/dist/do/business/financial/index.d.ts.map +1 -0
- package/dist/do/business/financial/index.js +20 -0
- package/dist/do/business/financial/index.js.map +1 -0
- package/dist/do/business/financial/metrics.d.ts +370 -0
- package/dist/do/business/financial/metrics.d.ts.map +1 -0
- package/dist/do/business/financial/metrics.js +376 -0
- package/dist/do/business/financial/metrics.js.map +1 -0
- package/dist/do/business/financial/payments.d.ts +397 -0
- package/dist/do/business/financial/payments.d.ts.map +1 -0
- package/dist/do/business/financial/payments.js +395 -0
- package/dist/do/business/financial/payments.js.map +1 -0
- package/dist/do/business/financial/reports.d.ts +284 -0
- package/dist/do/business/financial/reports.d.ts.map +1 -0
- package/dist/do/business/financial/reports.js +347 -0
- package/dist/do/business/financial/reports.js.map +1 -0
- package/dist/do/business/financial/stripe.d.ts +254 -0
- package/dist/do/business/financial/stripe.d.ts.map +1 -0
- package/dist/do/business/financial/stripe.js +261 -0
- package/dist/do/business/financial/stripe.js.map +1 -0
- package/dist/do/business/financial/subscriptions.d.ts +402 -0
- package/dist/do/business/financial/subscriptions.d.ts.map +1 -0
- package/dist/do/business/financial/subscriptions.js +349 -0
- package/dist/do/business/financial/subscriptions.js.map +1 -0
- package/dist/do/business/index.d.ts +9 -0
- package/dist/do/business/index.d.ts.map +1 -0
- package/dist/do/business/index.js +10 -0
- package/dist/do/business/index.js.map +1 -0
- package/dist/do/colo/followers.d.ts +194 -0
- package/dist/do/colo/followers.d.ts.map +1 -0
- package/dist/do/colo/followers.js +224 -0
- package/dist/do/colo/followers.js.map +1 -0
- package/dist/do/colo/fork.d.ts +103 -0
- package/dist/do/colo/fork.d.ts.map +1 -0
- package/dist/do/colo/fork.js +143 -0
- package/dist/do/colo/fork.js.map +1 -0
- package/dist/do/colo/index.d.ts +181 -0
- package/dist/do/colo/index.d.ts.map +1 -0
- package/dist/do/colo/index.js +145 -0
- package/dist/do/colo/index.js.map +1 -0
- package/dist/do/colo/info.d.ts +106 -0
- package/dist/do/colo/info.d.ts.map +1 -0
- package/dist/do/colo/info.js +196 -0
- package/dist/do/colo/info.js.map +1 -0
- package/dist/do/colo/migrate.d.ts +161 -0
- package/dist/do/colo/migrate.d.ts.map +1 -0
- package/dist/do/colo/migrate.js +190 -0
- package/dist/do/colo/migrate.js.map +1 -0
- package/dist/do/colo/routing.d.ts +182 -0
- package/dist/do/colo/routing.d.ts.map +1 -0
- package/dist/do/colo/routing.js +254 -0
- package/dist/do/colo/routing.js.map +1 -0
- package/dist/do/domains/dns.d.ts +269 -0
- package/dist/do/domains/dns.d.ts.map +1 -0
- package/dist/do/domains/dns.js +215 -0
- package/dist/do/domains/dns.js.map +1 -0
- package/dist/do/domains/index.d.ts +40 -0
- package/dist/do/domains/index.d.ts.map +1 -0
- package/dist/do/domains/index.js +61 -0
- package/dist/do/domains/index.js.map +1 -0
- package/dist/do/domains/routing.d.ts +263 -0
- package/dist/do/domains/routing.d.ts.map +1 -0
- package/dist/do/domains/routing.js +362 -0
- package/dist/do/domains/routing.js.map +1 -0
- package/dist/do/domains/ssl.d.ts +217 -0
- package/dist/do/domains/ssl.d.ts.map +1 -0
- package/dist/do/domains/ssl.js +231 -0
- package/dist/do/domains/ssl.js.map +1 -0
- package/dist/do/domains/subdomains.d.ts +207 -0
- package/dist/do/domains/subdomains.d.ts.map +1 -0
- package/dist/do/domains/subdomains.js +223 -0
- package/dist/do/domains/subdomains.js.map +1 -0
- package/dist/do/domains/tlds.d.ts +175 -0
- package/dist/do/domains/tlds.d.ts.map +1 -0
- package/dist/do/domains/tlds.js +188 -0
- package/dist/do/domains/tlds.js.map +1 -0
- package/dist/do/domains/validation.d.ts +164 -0
- package/dist/do/domains/validation.d.ts.map +1 -0
- package/dist/do/domains/validation.js +290 -0
- package/dist/do/domains/validation.js.map +1 -0
- package/dist/do/hibernation.d.ts +385 -0
- package/dist/do/hibernation.d.ts.map +1 -0
- package/dist/do/hibernation.js +518 -0
- package/dist/do/hibernation.js.map +1 -0
- package/dist/do/index.d.ts +19 -0
- package/dist/do/index.d.ts.map +1 -0
- package/dist/do/index.js +23 -0
- package/dist/do/index.js.map +1 -0
- package/dist/do/state.d.ts +336 -0
- package/dist/do/state.d.ts.map +1 -0
- package/dist/do/state.js +290 -0
- package/dist/do/state.js.map +1 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +89 -0
- package/dist/index.js.map +1 -0
- package/dist/rpc/client.d.ts +426 -0
- package/dist/rpc/client.d.ts.map +1 -0
- package/dist/rpc/client.js +826 -0
- package/dist/rpc/client.js.map +1 -0
- package/dist/rpc/index.d.ts +19 -0
- package/dist/rpc/index.d.ts.map +1 -0
- package/dist/rpc/index.js +23 -0
- package/dist/rpc/index.js.map +1 -0
- package/dist/rpc/methods.d.ts +364 -0
- package/dist/rpc/methods.d.ts.map +1 -0
- package/dist/rpc/methods.js +557 -0
- package/dist/rpc/methods.js.map +1 -0
- package/dist/rpc/protocol.d.ts +310 -0
- package/dist/rpc/protocol.d.ts.map +1 -0
- package/dist/rpc/protocol.js +672 -0
- package/dist/rpc/protocol.js.map +1 -0
- package/dist/rpc/routes.d.ts +332 -0
- package/dist/rpc/routes.d.ts.map +1 -0
- package/dist/rpc/routes.js +633 -0
- package/dist/rpc/routes.js.map +1 -0
- package/dist/rpc/server.d.ts +380 -0
- package/dist/rpc/server.d.ts.map +1 -0
- package/dist/rpc/server.js +850 -0
- package/dist/rpc/server.js.map +1 -0
- package/dist/sdk/auth.d.ts +201 -0
- package/dist/sdk/auth.d.ts.map +1 -0
- package/dist/sdk/auth.js +343 -0
- package/dist/sdk/auth.js.map +1 -0
- package/dist/sdk/client.d.ts +123 -0
- package/dist/sdk/client.d.ts.map +1 -0
- package/dist/sdk/client.js +403 -0
- package/dist/sdk/client.js.map +1 -0
- package/dist/sdk/index.d.ts +123 -0
- package/dist/sdk/index.d.ts.map +1 -0
- package/dist/sdk/index.js +230 -0
- package/dist/sdk/index.js.map +1 -0
- package/dist/sdk/rpc.d.ts +275 -0
- package/dist/sdk/rpc.d.ts.map +1 -0
- package/dist/sdk/rpc.js +249 -0
- package/dist/sdk/rpc.js.map +1 -0
- package/dist/sdk/transport.d.ts +283 -0
- package/dist/sdk/transport.d.ts.map +1 -0
- package/dist/sdk/transport.js +661 -0
- package/dist/sdk/transport.js.map +1 -0
- package/dist/sdk/types.d.ts +265 -0
- package/dist/sdk/types.d.ts.map +1 -0
- package/dist/sdk/types.js +27 -0
- package/dist/sdk/types.js.map +1 -0
- package/dist/types/ai.d.ts +533 -0
- package/dist/types/ai.d.ts.map +1 -0
- package/dist/types/ai.js +18 -0
- package/dist/types/ai.js.map +1 -0
- package/dist/types/app.d.ts +371 -0
- package/dist/types/app.d.ts.map +1 -0
- package/dist/types/app.js +151 -0
- package/dist/types/app.js.map +1 -0
- package/dist/types/business.d.ts +482 -0
- package/dist/types/business.d.ts.map +1 -0
- package/dist/types/business.js +60 -0
- package/dist/types/business.js.map +1 -0
- package/dist/types/cascade.d.ts +323 -0
- package/dist/types/cascade.d.ts.map +1 -0
- package/dist/types/cascade.js +82 -0
- package/dist/types/cascade.js.map +1 -0
- package/dist/types/collections.d.ts +704 -0
- package/dist/types/collections.d.ts.map +1 -0
- package/dist/types/collections.js +23 -0
- package/dist/types/collections.js.map +1 -0
- package/dist/types/colo.d.ts +171 -0
- package/dist/types/colo.d.ts.map +1 -0
- package/dist/types/colo.js +63 -0
- package/dist/types/colo.js.map +1 -0
- package/dist/types/communication.d.ts +595 -0
- package/dist/types/communication.d.ts.map +1 -0
- package/dist/types/communication.js +16 -0
- package/dist/types/communication.js.map +1 -0
- package/dist/types/content.d.ts +286 -0
- package/dist/types/content.d.ts.map +1 -0
- package/dist/types/content.js +8 -0
- package/dist/types/content.js.map +1 -0
- package/dist/types/context.d.ts +407 -0
- package/dist/types/context.d.ts.map +1 -0
- package/dist/types/context.js +36 -0
- package/dist/types/context.js.map +1 -0
- package/dist/types/databases.d.ts +377 -0
- package/dist/types/databases.d.ts.map +1 -0
- package/dist/types/databases.js +14 -0
- package/dist/types/databases.js.map +1 -0
- package/dist/types/domains.d.ts +132 -0
- package/dist/types/domains.d.ts.map +1 -0
- package/dist/types/domains.js +107 -0
- package/dist/types/domains.js.map +1 -0
- package/dist/types/execution.d.ts +381 -0
- package/dist/types/execution.d.ts.map +1 -0
- package/dist/types/execution.js +40 -0
- package/dist/types/execution.js.map +1 -0
- package/dist/types/financial.d.ts +608 -0
- package/dist/types/financial.d.ts.map +1 -0
- package/dist/types/financial.js +12 -0
- package/dist/types/financial.js.map +1 -0
- package/dist/types/functions.d.ts +215 -0
- package/dist/types/functions.d.ts.map +1 -0
- package/dist/types/functions.js +15 -0
- package/dist/types/functions.js.map +1 -0
- package/dist/types/git.d.ts +299 -0
- package/dist/types/git.d.ts.map +1 -0
- package/dist/types/git.js +17 -0
- package/dist/types/git.js.map +1 -0
- package/dist/types/identity.d.ts +141 -0
- package/dist/types/identity.d.ts.map +1 -0
- package/dist/types/identity.js +54 -0
- package/dist/types/identity.js.map +1 -0
- package/dist/types/index.d.ts +40 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +65 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/integrations.d.ts +356 -0
- package/dist/types/integrations.d.ts.map +1 -0
- package/dist/types/integrations.js +19 -0
- package/dist/types/integrations.js.map +1 -0
- package/dist/types/mdxui.d.ts +1955 -0
- package/dist/types/mdxui.d.ts.map +1 -0
- package/dist/types/mdxui.js +751 -0
- package/dist/types/mdxui.js.map +1 -0
- package/dist/types/observability.d.ts +315 -0
- package/dist/types/observability.d.ts.map +1 -0
- package/dist/types/observability.js +13 -0
- package/dist/types/observability.js.map +1 -0
- package/dist/types/rpc.d.ts +339 -0
- package/dist/types/rpc.d.ts.map +1 -0
- package/dist/types/rpc.js +24 -0
- package/dist/types/rpc.js.map +1 -0
- package/dist/types/saas.d.ts +678 -0
- package/dist/types/saas.d.ts.map +1 -0
- package/dist/types/saas.js +59 -0
- package/dist/types/saas.js.map +1 -0
- package/dist/types/service.d.ts +676 -0
- package/dist/types/service.d.ts.map +1 -0
- package/dist/types/service.js +69 -0
- package/dist/types/service.js.map +1 -0
- package/dist/types/site.d.ts +317 -0
- package/dist/types/site.d.ts.map +1 -0
- package/dist/types/site.js +203 -0
- package/dist/types/site.js.map +1 -0
- package/dist/types/startup.d.ts +576 -0
- package/dist/types/startup.d.ts.map +1 -0
- package/dist/types/startup.js +59 -0
- package/dist/types/startup.js.map +1 -0
- package/dist/types/storage.d.ts +276 -0
- package/dist/types/storage.d.ts.map +1 -0
- package/dist/types/storage.js +35 -0
- package/dist/types/storage.js.map +1 -0
- package/dist/types/telephony.d.ts +458 -0
- package/dist/types/telephony.d.ts.map +1 -0
- package/dist/types/telephony.js +19 -0
- package/dist/types/telephony.js.map +1 -0
- package/dist/types/tenant.d.ts +708 -0
- package/dist/types/tenant.d.ts.map +1 -0
- package/dist/types/tenant.js +103 -0
- package/dist/types/tenant.js.map +1 -0
- package/dist/types/voice-ai.d.ts +459 -0
- package/dist/types/voice-ai.d.ts.map +1 -0
- package/dist/types/voice-ai.js +32 -0
- package/dist/types/voice-ai.js.map +1 -0
- package/package.json +143 -0
|
@@ -0,0 +1,704 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Collection Types for Digital Objects
|
|
3
|
+
*
|
|
4
|
+
* Every DO can contain these collections:
|
|
5
|
+
* - Data: Databases, Nouns, Verbs, Things, Actions, Relationships
|
|
6
|
+
* - Execution: Functions, Workflows, Actions (durable)
|
|
7
|
+
* - Events: Events (immutable), Experiments, Analytics
|
|
8
|
+
* - External: Integrations, Webhooks
|
|
9
|
+
* - Identity: Orgs, Roles, Users, Agents
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Noun - defines an entity type
|
|
13
|
+
*/
|
|
14
|
+
export interface Noun {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
singular: string;
|
|
18
|
+
plural: string;
|
|
19
|
+
slug: string;
|
|
20
|
+
schema?: Record<string, unknown>;
|
|
21
|
+
description?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Verb - defines an action type with all grammatical forms
|
|
25
|
+
*
|
|
26
|
+
* Every verb has:
|
|
27
|
+
* - action: create (imperative)
|
|
28
|
+
* - activity: creating (present participle)
|
|
29
|
+
* - event: created (past tense - what happened)
|
|
30
|
+
* - reverse: createdBy (passive - who/what did it)
|
|
31
|
+
* - inverse: delete (opposite action)
|
|
32
|
+
*
|
|
33
|
+
* Example: create → creating → created → createdBy → delete
|
|
34
|
+
*/
|
|
35
|
+
export interface Verb {
|
|
36
|
+
id: string;
|
|
37
|
+
name: string;
|
|
38
|
+
/** Imperative form: create, update, delete */
|
|
39
|
+
action: string;
|
|
40
|
+
/** Short form: act */
|
|
41
|
+
act: string;
|
|
42
|
+
/** Present participle: creating, updating, deleting */
|
|
43
|
+
activity: string;
|
|
44
|
+
/** Past tense (event): created, updated, deleted */
|
|
45
|
+
event: string;
|
|
46
|
+
/** Passive form: createdBy, updatedBy, deletedBy */
|
|
47
|
+
reverse: string;
|
|
48
|
+
/** Opposite action: create ↔ delete, start ↔ stop */
|
|
49
|
+
inverse?: string;
|
|
50
|
+
description?: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Actor - who initiated an action
|
|
54
|
+
*/
|
|
55
|
+
export type ActorType = 'User' | 'Agent' | 'Service' | 'System';
|
|
56
|
+
export interface Actor {
|
|
57
|
+
/** Actor type */
|
|
58
|
+
type: ActorType;
|
|
59
|
+
/** Actor ID (user ID, agent ID, service name) */
|
|
60
|
+
id: string;
|
|
61
|
+
/** Display name */
|
|
62
|
+
name?: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Thing - an instance of a Noun
|
|
66
|
+
*
|
|
67
|
+
* Supports two MDXLD formats:
|
|
68
|
+
* - Expanded: { $id, $type, $content, $code, ...data }
|
|
69
|
+
* - Compact: { id, type, data, content, code }
|
|
70
|
+
*
|
|
71
|
+
* DUAL NATURE: A Thing can also BE its own DO via $ref.
|
|
72
|
+
* Example: `headless.ly` is a Thing in `startups.studio` BUT ALSO
|
|
73
|
+
* its own DO with $context pointing back to startups.studio.
|
|
74
|
+
*/
|
|
75
|
+
export interface ThingExpanded {
|
|
76
|
+
/** Entity ID (JSON-LD @id) */
|
|
77
|
+
$id: string;
|
|
78
|
+
/** Entity type (JSON-LD @type, replaces noun) */
|
|
79
|
+
$type: string;
|
|
80
|
+
/**
|
|
81
|
+
* URL reference to this Thing's own DO (if it has one)
|
|
82
|
+
* Creates the Parent→Child side of the dual nature pattern.
|
|
83
|
+
* The child DO's $context creates the Child→Parent side.
|
|
84
|
+
* Example: 'https://headless.ly'
|
|
85
|
+
*/
|
|
86
|
+
$ref?: string;
|
|
87
|
+
/** MDX content (markdown + JSX) */
|
|
88
|
+
$content?: string;
|
|
89
|
+
/** Executable code */
|
|
90
|
+
$code?: string;
|
|
91
|
+
/** Version */
|
|
92
|
+
$version?: number;
|
|
93
|
+
/** Created timestamp */
|
|
94
|
+
$createdAt?: number;
|
|
95
|
+
/** Updated timestamp */
|
|
96
|
+
$updatedAt?: number;
|
|
97
|
+
/** Data fields spread at root level */
|
|
98
|
+
[key: string]: unknown;
|
|
99
|
+
}
|
|
100
|
+
export interface ThingCompact<T = unknown> {
|
|
101
|
+
/** Entity ID */
|
|
102
|
+
id: string;
|
|
103
|
+
/** Entity type (replaces noun) */
|
|
104
|
+
type: string;
|
|
105
|
+
/** Entity data */
|
|
106
|
+
data: T;
|
|
107
|
+
/**
|
|
108
|
+
* URL reference to this Thing's own DO (if it has one)
|
|
109
|
+
* Creates the Parent→Child side of the dual nature pattern.
|
|
110
|
+
* Example: 'https://headless.ly'
|
|
111
|
+
*/
|
|
112
|
+
ref?: string;
|
|
113
|
+
/** MDX content */
|
|
114
|
+
content?: string;
|
|
115
|
+
/** Executable code */
|
|
116
|
+
code?: string;
|
|
117
|
+
/** Version */
|
|
118
|
+
version?: number;
|
|
119
|
+
/** Created timestamp */
|
|
120
|
+
createdAt?: number;
|
|
121
|
+
/** Updated timestamp */
|
|
122
|
+
updatedAt?: number;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Thing - union of both formats
|
|
126
|
+
* Use ThingExpanded for MDXLD-style documents
|
|
127
|
+
* Use ThingCompact for traditional data structures
|
|
128
|
+
*/
|
|
129
|
+
export type Thing<T = unknown> = ThingExpanded | ThingCompact<T>;
|
|
130
|
+
/**
|
|
131
|
+
* Type guard for expanded format
|
|
132
|
+
*/
|
|
133
|
+
export declare function isThingExpanded<T>(thing: Thing<T>): thing is ThingExpanded;
|
|
134
|
+
/**
|
|
135
|
+
* Type guard for compact format
|
|
136
|
+
*/
|
|
137
|
+
export declare function isThingCompact<T>(thing: Thing<T>): thing is ThingCompact<T>;
|
|
138
|
+
/**
|
|
139
|
+
* Action - an instance of a Verb (durable action)
|
|
140
|
+
*
|
|
141
|
+
* Every action has:
|
|
142
|
+
* - actor: who initiated (User, Agent, Service)
|
|
143
|
+
* - timestamp: when it happened
|
|
144
|
+
* - request: the request that initiated it
|
|
145
|
+
* - input/object: what it operates on
|
|
146
|
+
* - config/options: settings for the action
|
|
147
|
+
* - output/results: what it produced
|
|
148
|
+
* - state/status: current state
|
|
149
|
+
*/
|
|
150
|
+
export interface Action<TInput = unknown, TOutput = unknown, TConfig = unknown> {
|
|
151
|
+
/** Action ID */
|
|
152
|
+
$id: string;
|
|
153
|
+
/** Verb reference (action type) */
|
|
154
|
+
verb: string;
|
|
155
|
+
/** Subject (what performed the action, if not actor) */
|
|
156
|
+
subject?: string;
|
|
157
|
+
/** Object/Input (what the action operates on) */
|
|
158
|
+
object?: string;
|
|
159
|
+
input?: TInput;
|
|
160
|
+
/** Config/Options/Settings for the action */
|
|
161
|
+
config?: TConfig;
|
|
162
|
+
/** Output/Results of the action */
|
|
163
|
+
output?: TOutput;
|
|
164
|
+
/** Current state/status */
|
|
165
|
+
status: ActionStatus;
|
|
166
|
+
/** Actor - who initiated this action */
|
|
167
|
+
actor: Actor;
|
|
168
|
+
/** Request that initiated this action */
|
|
169
|
+
request?: ActionRequest;
|
|
170
|
+
/** Timestamps */
|
|
171
|
+
createdAt: number;
|
|
172
|
+
startedAt?: number;
|
|
173
|
+
completedAt?: number;
|
|
174
|
+
updatedAt?: number;
|
|
175
|
+
/** Error if failed */
|
|
176
|
+
error?: ActionError;
|
|
177
|
+
/** Metadata */
|
|
178
|
+
metadata?: Record<string, unknown>;
|
|
179
|
+
}
|
|
180
|
+
export type ActionStatus = 'Pending' | 'Running' | 'Completed' | 'Failed' | 'Cancelled' | 'Retrying' | 'Blocked';
|
|
181
|
+
/**
|
|
182
|
+
* Request that initiated an action
|
|
183
|
+
*/
|
|
184
|
+
export interface ActionRequest {
|
|
185
|
+
/** Request ID */
|
|
186
|
+
id: string;
|
|
187
|
+
/** Request method */
|
|
188
|
+
method?: string;
|
|
189
|
+
/** Request path/URL */
|
|
190
|
+
path?: string;
|
|
191
|
+
/** Request timestamp */
|
|
192
|
+
timestamp: number;
|
|
193
|
+
/** Trace/correlation ID */
|
|
194
|
+
traceId?: string;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Error from a failed action
|
|
198
|
+
*/
|
|
199
|
+
export interface ActionError {
|
|
200
|
+
/** Error code */
|
|
201
|
+
code: string;
|
|
202
|
+
/** Error message */
|
|
203
|
+
message: string;
|
|
204
|
+
/** Stack trace */
|
|
205
|
+
stack?: string;
|
|
206
|
+
/** Retry count */
|
|
207
|
+
retryCount?: number;
|
|
208
|
+
/** Is retryable */
|
|
209
|
+
retryable?: boolean;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Relationship - connection between Things
|
|
213
|
+
*/
|
|
214
|
+
export interface Relationship {
|
|
215
|
+
id: string;
|
|
216
|
+
from: string;
|
|
217
|
+
to: string;
|
|
218
|
+
type: string;
|
|
219
|
+
data?: Record<string, unknown>;
|
|
220
|
+
createdAt: number;
|
|
221
|
+
}
|
|
222
|
+
export type FunctionType = 'code' | 'generative' | 'agentic' | 'human';
|
|
223
|
+
/**
|
|
224
|
+
* Function - executable unit with 4 tiers
|
|
225
|
+
* - code: Pure code execution
|
|
226
|
+
* - generative: AI model call
|
|
227
|
+
* - agentic: Autonomous agent
|
|
228
|
+
* - human: Human-in-the-loop
|
|
229
|
+
*/
|
|
230
|
+
export interface Function {
|
|
231
|
+
id: string;
|
|
232
|
+
name: string;
|
|
233
|
+
type: FunctionType;
|
|
234
|
+
definition: FunctionDefinition;
|
|
235
|
+
description?: string;
|
|
236
|
+
inputs?: SchemaDefinition;
|
|
237
|
+
outputs?: SchemaDefinition;
|
|
238
|
+
timeout?: number;
|
|
239
|
+
}
|
|
240
|
+
export type FunctionDefinition = {
|
|
241
|
+
type: 'code';
|
|
242
|
+
code: string;
|
|
243
|
+
runtime?: string;
|
|
244
|
+
} | {
|
|
245
|
+
type: 'generative';
|
|
246
|
+
model: string;
|
|
247
|
+
prompt: string;
|
|
248
|
+
schema?: Record<string, unknown>;
|
|
249
|
+
} | {
|
|
250
|
+
type: 'agentic';
|
|
251
|
+
agent: string;
|
|
252
|
+
goal: string;
|
|
253
|
+
} | {
|
|
254
|
+
type: 'human';
|
|
255
|
+
assignee?: string;
|
|
256
|
+
instructions: string;
|
|
257
|
+
};
|
|
258
|
+
export interface SchemaDefinition {
|
|
259
|
+
type: string;
|
|
260
|
+
properties?: Record<string, SchemaDefinition>;
|
|
261
|
+
required?: string[];
|
|
262
|
+
items?: SchemaDefinition;
|
|
263
|
+
[key: string]: unknown;
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Workflows can be:
|
|
267
|
+
* 1. Durable code functions responding to events or time intervals
|
|
268
|
+
* 2. XState-based state machines
|
|
269
|
+
*
|
|
270
|
+
* Both are durably executed and survive hibernation.
|
|
271
|
+
*/
|
|
272
|
+
export type WorkflowType = 'code' | 'state-machine';
|
|
273
|
+
export type WorkflowExecutionState = 'Idle' | 'Running' | 'Paused' | 'Waiting' | 'Completed' | 'Failed';
|
|
274
|
+
/**
|
|
275
|
+
* Workflow - unified interface for both types
|
|
276
|
+
*/
|
|
277
|
+
export interface Workflow<TContext = Record<string, unknown>> {
|
|
278
|
+
id: string;
|
|
279
|
+
name: string;
|
|
280
|
+
type: WorkflowType;
|
|
281
|
+
definition: WorkflowDefinition | StateMachineDefinition;
|
|
282
|
+
executionState: WorkflowExecutionState;
|
|
283
|
+
context: TContext;
|
|
284
|
+
/** Current state (for state machines) or current step (for code workflows) */
|
|
285
|
+
currentState?: string;
|
|
286
|
+
/** History of state transitions */
|
|
287
|
+
history?: WorkflowHistoryEntry[];
|
|
288
|
+
/** Actor who started the workflow */
|
|
289
|
+
actor?: Actor;
|
|
290
|
+
/** Timestamps */
|
|
291
|
+
createdAt: number;
|
|
292
|
+
startedAt?: number;
|
|
293
|
+
completedAt?: number;
|
|
294
|
+
updatedAt?: number;
|
|
295
|
+
/** Error if failed */
|
|
296
|
+
error?: ActionError;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Code workflow definition - durable functions triggered by events or time
|
|
300
|
+
*/
|
|
301
|
+
export interface WorkflowDefinition {
|
|
302
|
+
type: 'code';
|
|
303
|
+
steps: WorkflowStep[];
|
|
304
|
+
initialContext?: Record<string, unknown>;
|
|
305
|
+
/** Event triggers */
|
|
306
|
+
triggers?: WorkflowTrigger[];
|
|
307
|
+
/** Error handling */
|
|
308
|
+
onError?: 'stop' | 'continue' | 'retry';
|
|
309
|
+
retryPolicy?: RetryPolicy;
|
|
310
|
+
}
|
|
311
|
+
export interface WorkflowStep {
|
|
312
|
+
id: string;
|
|
313
|
+
name: string;
|
|
314
|
+
/** Function to execute */
|
|
315
|
+
function: string;
|
|
316
|
+
/** Input mapping from context */
|
|
317
|
+
inputs?: Record<string, unknown>;
|
|
318
|
+
/** Condition to execute (expression) */
|
|
319
|
+
condition?: string;
|
|
320
|
+
/** Next step(s) */
|
|
321
|
+
next?: string | string[];
|
|
322
|
+
/** Error handling for this step */
|
|
323
|
+
onError?: 'stop' | 'continue' | 'retry' | 'goto';
|
|
324
|
+
errorTarget?: string;
|
|
325
|
+
/** Timeout for this step in ms */
|
|
326
|
+
timeout?: number;
|
|
327
|
+
}
|
|
328
|
+
export interface WorkflowTrigger {
|
|
329
|
+
type: 'event' | 'schedule' | 'webhook';
|
|
330
|
+
/** Event pattern: NS.Object.event (e.g., Order.Payment.completed) */
|
|
331
|
+
event?: string;
|
|
332
|
+
/** Schedule: cron expression or interval */
|
|
333
|
+
schedule?: string;
|
|
334
|
+
/** Webhook path */
|
|
335
|
+
webhook?: string;
|
|
336
|
+
/** Condition to trigger */
|
|
337
|
+
condition?: string;
|
|
338
|
+
}
|
|
339
|
+
export interface RetryPolicy {
|
|
340
|
+
maxAttempts: number;
|
|
341
|
+
initialDelay: number;
|
|
342
|
+
maxDelay: number;
|
|
343
|
+
backoffMultiplier: number;
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* State machine definition - XState-compatible
|
|
347
|
+
*
|
|
348
|
+
* Based on XState v5 machine config format
|
|
349
|
+
*/
|
|
350
|
+
export interface StateMachineDefinition {
|
|
351
|
+
type: 'state-machine';
|
|
352
|
+
/** Machine ID */
|
|
353
|
+
id: string;
|
|
354
|
+
/** Initial state */
|
|
355
|
+
initial: string;
|
|
356
|
+
/** Initial context */
|
|
357
|
+
context?: Record<string, unknown>;
|
|
358
|
+
/** State definitions */
|
|
359
|
+
states: Record<string, StateNode>;
|
|
360
|
+
/** Machine-level event handlers */
|
|
361
|
+
on?: Record<string, Transition | Transition[]>;
|
|
362
|
+
}
|
|
363
|
+
export interface StateNode {
|
|
364
|
+
/** State type */
|
|
365
|
+
type?: 'atomic' | 'compound' | 'parallel' | 'final' | 'history';
|
|
366
|
+
/** Entry actions */
|
|
367
|
+
entry?: StateAction | StateAction[];
|
|
368
|
+
/** Exit actions */
|
|
369
|
+
exit?: StateAction | StateAction[];
|
|
370
|
+
/** Event handlers */
|
|
371
|
+
on?: Record<string, Transition | Transition[]>;
|
|
372
|
+
/** Invoked services/actors */
|
|
373
|
+
invoke?: InvokeConfig | InvokeConfig[];
|
|
374
|
+
/** Nested states (for compound/parallel) */
|
|
375
|
+
states?: Record<string, StateNode>;
|
|
376
|
+
/** Initial nested state (for compound) */
|
|
377
|
+
initial?: string;
|
|
378
|
+
/** After delays */
|
|
379
|
+
after?: Record<string | number, Transition | Transition[]>;
|
|
380
|
+
/** Always transitions (eventless) */
|
|
381
|
+
always?: Transition | Transition[];
|
|
382
|
+
/** Tags for state */
|
|
383
|
+
tags?: string[];
|
|
384
|
+
/** Meta information */
|
|
385
|
+
meta?: Record<string, unknown>;
|
|
386
|
+
}
|
|
387
|
+
export interface Transition {
|
|
388
|
+
/** Target state */
|
|
389
|
+
target?: string;
|
|
390
|
+
/** Guard condition */
|
|
391
|
+
guard?: string | GuardConfig;
|
|
392
|
+
/** Actions to execute */
|
|
393
|
+
actions?: StateAction | StateAction[];
|
|
394
|
+
/** Description */
|
|
395
|
+
description?: string;
|
|
396
|
+
/** Reenter the same state */
|
|
397
|
+
reenter?: boolean;
|
|
398
|
+
}
|
|
399
|
+
export interface GuardConfig {
|
|
400
|
+
type: string;
|
|
401
|
+
params?: Record<string, unknown>;
|
|
402
|
+
}
|
|
403
|
+
export type StateAction = string | {
|
|
404
|
+
type: string;
|
|
405
|
+
params?: Record<string, unknown>;
|
|
406
|
+
} | {
|
|
407
|
+
type: 'assign';
|
|
408
|
+
assignment: Record<string, unknown> | string;
|
|
409
|
+
} | {
|
|
410
|
+
type: 'raise';
|
|
411
|
+
event: string | {
|
|
412
|
+
type: string;
|
|
413
|
+
};
|
|
414
|
+
} | {
|
|
415
|
+
type: 'sendTo';
|
|
416
|
+
to: string;
|
|
417
|
+
event: string | {
|
|
418
|
+
type: string;
|
|
419
|
+
};
|
|
420
|
+
delay?: number;
|
|
421
|
+
} | {
|
|
422
|
+
type: 'emit';
|
|
423
|
+
event: string;
|
|
424
|
+
data?: unknown;
|
|
425
|
+
} | {
|
|
426
|
+
type: 'log';
|
|
427
|
+
message?: string;
|
|
428
|
+
};
|
|
429
|
+
export interface InvokeConfig {
|
|
430
|
+
/** Invoked service ID */
|
|
431
|
+
id?: string;
|
|
432
|
+
/** Service source (function name or actor) */
|
|
433
|
+
src: string | {
|
|
434
|
+
type: string;
|
|
435
|
+
input?: unknown;
|
|
436
|
+
};
|
|
437
|
+
/** Input for the service */
|
|
438
|
+
input?: unknown;
|
|
439
|
+
/** Events to send on done/error */
|
|
440
|
+
onDone?: Transition | Transition[];
|
|
441
|
+
onError?: Transition | Transition[];
|
|
442
|
+
/** onSnapshot for actors */
|
|
443
|
+
onSnapshot?: Transition | Transition[];
|
|
444
|
+
}
|
|
445
|
+
export interface WorkflowHistoryEntry {
|
|
446
|
+
timestamp: number;
|
|
447
|
+
event: string;
|
|
448
|
+
previousState: string;
|
|
449
|
+
currentState: string;
|
|
450
|
+
context?: Record<string, unknown>;
|
|
451
|
+
actor?: Actor;
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* Event - immutable record of something that happened
|
|
455
|
+
*/
|
|
456
|
+
export interface Event<T = unknown> {
|
|
457
|
+
id: string;
|
|
458
|
+
type: string;
|
|
459
|
+
payload: T;
|
|
460
|
+
source: string;
|
|
461
|
+
timestamp: number;
|
|
462
|
+
correlationId?: string;
|
|
463
|
+
causationId?: string;
|
|
464
|
+
metadata?: Record<string, unknown>;
|
|
465
|
+
}
|
|
466
|
+
export type ExperimentStatus = 'Draft' | 'Running' | 'Paused' | 'Concluded';
|
|
467
|
+
/**
|
|
468
|
+
* Experiment - A/B testing and feature flags
|
|
469
|
+
*/
|
|
470
|
+
export interface Experiment {
|
|
471
|
+
id: string;
|
|
472
|
+
name: string;
|
|
473
|
+
description?: string;
|
|
474
|
+
variants: Variant[];
|
|
475
|
+
allocation: AllocationStrategy;
|
|
476
|
+
status: ExperimentStatus;
|
|
477
|
+
metrics?: string[];
|
|
478
|
+
startedAt?: number;
|
|
479
|
+
concludedAt?: number;
|
|
480
|
+
results?: ExperimentResults;
|
|
481
|
+
}
|
|
482
|
+
export interface Variant {
|
|
483
|
+
id: string;
|
|
484
|
+
name: string;
|
|
485
|
+
weight: number;
|
|
486
|
+
config?: Record<string, unknown>;
|
|
487
|
+
}
|
|
488
|
+
export interface AllocationStrategy {
|
|
489
|
+
type: 'random' | 'sticky' | 'deterministic';
|
|
490
|
+
seed?: string;
|
|
491
|
+
stickyKey?: string;
|
|
492
|
+
}
|
|
493
|
+
export interface ExperimentResults {
|
|
494
|
+
winner?: string;
|
|
495
|
+
confidence?: number;
|
|
496
|
+
metrics: Record<string, VariantMetrics>;
|
|
497
|
+
}
|
|
498
|
+
export interface VariantMetrics {
|
|
499
|
+
participants: number;
|
|
500
|
+
conversions?: number;
|
|
501
|
+
values?: number[];
|
|
502
|
+
mean?: number;
|
|
503
|
+
variance?: number;
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Organization - group of users
|
|
507
|
+
*/
|
|
508
|
+
export interface Org {
|
|
509
|
+
id: string;
|
|
510
|
+
name: string;
|
|
511
|
+
parentId?: string;
|
|
512
|
+
metadata?: Record<string, unknown>;
|
|
513
|
+
createdAt: number;
|
|
514
|
+
updatedAt: number;
|
|
515
|
+
}
|
|
516
|
+
/**
|
|
517
|
+
* Role - set of permissions
|
|
518
|
+
*/
|
|
519
|
+
export interface Role {
|
|
520
|
+
id: string;
|
|
521
|
+
name: string;
|
|
522
|
+
description?: string;
|
|
523
|
+
permissions: Permission[];
|
|
524
|
+
orgId?: string;
|
|
525
|
+
}
|
|
526
|
+
export interface Permission {
|
|
527
|
+
resource: string;
|
|
528
|
+
action: string;
|
|
529
|
+
condition?: string;
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* User - human identity
|
|
533
|
+
*/
|
|
534
|
+
export interface User {
|
|
535
|
+
id: string;
|
|
536
|
+
email: string;
|
|
537
|
+
name?: string;
|
|
538
|
+
roles: string[];
|
|
539
|
+
orgId?: string;
|
|
540
|
+
metadata?: Record<string, unknown>;
|
|
541
|
+
createdAt: number;
|
|
542
|
+
updatedAt: number;
|
|
543
|
+
lastLoginAt?: number;
|
|
544
|
+
}
|
|
545
|
+
export type AgentStatus = 'Idle' | 'Working' | 'Blocked' | 'Paused' | 'Stopped';
|
|
546
|
+
/**
|
|
547
|
+
* Agent modality - how the agent communicates
|
|
548
|
+
*
|
|
549
|
+
* Voice is a MODALITY, not an entity type.
|
|
550
|
+
* An agent has personality + capabilities + modalities.
|
|
551
|
+
*/
|
|
552
|
+
export type AgentModality = 'text' | 'voice' | 'video' | 'multimodal';
|
|
553
|
+
/**
|
|
554
|
+
* Agent personality - who the agent is
|
|
555
|
+
*/
|
|
556
|
+
export interface AgentPersonality {
|
|
557
|
+
/** Personality name */
|
|
558
|
+
name: string;
|
|
559
|
+
/** Persona description */
|
|
560
|
+
description?: string;
|
|
561
|
+
/** Voice/tone characteristics */
|
|
562
|
+
tone?: string;
|
|
563
|
+
/** Communication style */
|
|
564
|
+
style?: 'formal' | 'casual' | 'professional' | 'friendly';
|
|
565
|
+
/** Language */
|
|
566
|
+
language?: string;
|
|
567
|
+
/** Custom traits */
|
|
568
|
+
traits?: string[];
|
|
569
|
+
}
|
|
570
|
+
/**
|
|
571
|
+
* Agent voice configuration (when modality includes voice)
|
|
572
|
+
*/
|
|
573
|
+
export interface AgentVoiceConfig {
|
|
574
|
+
/** Voice provider */
|
|
575
|
+
provider: 'elevenlabs' | 'playht' | 'azure' | 'google' | 'openai' | 'deepgram';
|
|
576
|
+
/** Voice ID */
|
|
577
|
+
voiceId: string;
|
|
578
|
+
/** Voice name (for reference) */
|
|
579
|
+
voiceName?: string;
|
|
580
|
+
/** Speaking rate (0.5-2.0) */
|
|
581
|
+
speed?: number;
|
|
582
|
+
/** Stability (for ElevenLabs) */
|
|
583
|
+
stability?: number;
|
|
584
|
+
}
|
|
585
|
+
/**
|
|
586
|
+
* Agent - autonomous agent with personality and modalities
|
|
587
|
+
*
|
|
588
|
+
* Agents are distinct from their modalities:
|
|
589
|
+
* - Personality: Who they are (tone, style, traits)
|
|
590
|
+
* - Capabilities: What they can do (tools, skills)
|
|
591
|
+
* - Modalities: How they communicate (text, voice, video)
|
|
592
|
+
*/
|
|
593
|
+
export interface Agent {
|
|
594
|
+
id: string;
|
|
595
|
+
name: string;
|
|
596
|
+
type: string;
|
|
597
|
+
description?: string;
|
|
598
|
+
/** Agent personality */
|
|
599
|
+
personality?: AgentPersonality;
|
|
600
|
+
/** Supported modalities */
|
|
601
|
+
modalities: AgentModality[];
|
|
602
|
+
/** Voice configuration (if voice modality enabled) */
|
|
603
|
+
voiceConfig?: AgentVoiceConfig;
|
|
604
|
+
/** Capabilities/skills */
|
|
605
|
+
capabilities: string[];
|
|
606
|
+
/** Current status */
|
|
607
|
+
status: AgentStatus;
|
|
608
|
+
/** Current task */
|
|
609
|
+
currentTask?: string;
|
|
610
|
+
/** Agent memory */
|
|
611
|
+
memory?: Record<string, unknown>;
|
|
612
|
+
/** Agent configuration */
|
|
613
|
+
config?: AgentConfig;
|
|
614
|
+
/** Timestamps */
|
|
615
|
+
createdAt: number;
|
|
616
|
+
updatedAt: number;
|
|
617
|
+
}
|
|
618
|
+
export interface AgentConfig {
|
|
619
|
+
model?: string;
|
|
620
|
+
maxIterations?: number;
|
|
621
|
+
timeout?: number;
|
|
622
|
+
tools?: string[];
|
|
623
|
+
systemPrompt?: string;
|
|
624
|
+
/** Temperature for AI responses */
|
|
625
|
+
temperature?: number;
|
|
626
|
+
/** Maximum tokens per response */
|
|
627
|
+
maxTokens?: number;
|
|
628
|
+
}
|
|
629
|
+
export type IntegrationStatus = 'Active' | 'Inactive' | 'Error' | 'Pending';
|
|
630
|
+
/**
|
|
631
|
+
* Integration - external service connection
|
|
632
|
+
*/
|
|
633
|
+
export interface Integration {
|
|
634
|
+
id: string;
|
|
635
|
+
type: string;
|
|
636
|
+
name?: string;
|
|
637
|
+
config: Record<string, unknown>;
|
|
638
|
+
credentials?: IntegrationCredentials;
|
|
639
|
+
status: IntegrationStatus;
|
|
640
|
+
lastSyncAt?: number;
|
|
641
|
+
error?: string;
|
|
642
|
+
createdAt: number;
|
|
643
|
+
updatedAt: number;
|
|
644
|
+
}
|
|
645
|
+
export interface IntegrationCredentials {
|
|
646
|
+
type: 'oauth' | 'api_key' | 'basic' | 'bearer' | 'custom';
|
|
647
|
+
data: Record<string, unknown>;
|
|
648
|
+
expiresAt?: number;
|
|
649
|
+
}
|
|
650
|
+
/**
|
|
651
|
+
* Webhook - outbound event notification
|
|
652
|
+
*/
|
|
653
|
+
export interface Webhook {
|
|
654
|
+
id: string;
|
|
655
|
+
url: string;
|
|
656
|
+
events: string[];
|
|
657
|
+
secret?: string;
|
|
658
|
+
headers?: Record<string, string>;
|
|
659
|
+
enabled: boolean;
|
|
660
|
+
retryPolicy?: RetryPolicy;
|
|
661
|
+
lastTriggeredAt?: number;
|
|
662
|
+
failureCount?: number;
|
|
663
|
+
createdAt: number;
|
|
664
|
+
updatedAt: number;
|
|
665
|
+
}
|
|
666
|
+
/**
|
|
667
|
+
* Standard collection methods for any collection type
|
|
668
|
+
*/
|
|
669
|
+
export interface CollectionMethods<T> {
|
|
670
|
+
list(options?: ListOptions): Promise<ListResult<T>>;
|
|
671
|
+
get(id: string): Promise<T | null>;
|
|
672
|
+
create(data: Omit<T, 'id'>): Promise<T>;
|
|
673
|
+
update(id: string, data: Partial<T>): Promise<T>;
|
|
674
|
+
delete(id: string): Promise<void>;
|
|
675
|
+
count(filter?: FilterExpression): Promise<number>;
|
|
676
|
+
find(filter: FilterExpression): Promise<T[]>;
|
|
677
|
+
}
|
|
678
|
+
export interface ListOptions {
|
|
679
|
+
limit?: number;
|
|
680
|
+
offset?: number;
|
|
681
|
+
cursor?: string;
|
|
682
|
+
orderBy?: string;
|
|
683
|
+
orderDir?: 'asc' | 'desc';
|
|
684
|
+
filter?: FilterExpression;
|
|
685
|
+
}
|
|
686
|
+
export interface ListResult<T> {
|
|
687
|
+
items: T[];
|
|
688
|
+
total?: number;
|
|
689
|
+
cursor?: string;
|
|
690
|
+
hasMore: boolean;
|
|
691
|
+
}
|
|
692
|
+
export type FilterExpression = {
|
|
693
|
+
field: string;
|
|
694
|
+
op: FilterOp;
|
|
695
|
+
value: unknown;
|
|
696
|
+
} | {
|
|
697
|
+
and: FilterExpression[];
|
|
698
|
+
} | {
|
|
699
|
+
or: FilterExpression[];
|
|
700
|
+
} | {
|
|
701
|
+
not: FilterExpression;
|
|
702
|
+
};
|
|
703
|
+
export type FilterOp = 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'nin' | 'contains' | 'startsWith' | 'endsWith';
|
|
704
|
+
//# sourceMappingURL=collections.d.ts.map
|