@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,484 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Relationships Collection - Graph-style entity linking for Digital Objects
|
|
3
|
+
*
|
|
4
|
+
* @module collections/relationships
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* Manages graph-style relationships between Things within a Digital Object.
|
|
8
|
+
* Integrates with the cascade operators for post-generation linking and
|
|
9
|
+
* the RelationManager for unified relation storage.
|
|
10
|
+
*
|
|
11
|
+
* Cascade Operators:
|
|
12
|
+
* | Operator | Type | Action |
|
|
13
|
+
* |----------|------------------|-------------------------------------------|
|
|
14
|
+
* | `->` | Forward Insert | Create entity, link TO it |
|
|
15
|
+
* | `~>` | Forward Search | Vector search existing, link TO it |
|
|
16
|
+
* | `<-` | Backward Insert | Create entity, link FROM it (it owns us) |
|
|
17
|
+
* | `<~` | Backward Search | Vector search existing, link FROM it |
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```typescript
|
|
21
|
+
* const relationships = new RelationshipCollection(storage)
|
|
22
|
+
*
|
|
23
|
+
* // Create a simple relationship
|
|
24
|
+
* await relationships.create({
|
|
25
|
+
* from: 'customer_123',
|
|
26
|
+
* to: 'company_456',
|
|
27
|
+
* type: 'belongsTo'
|
|
28
|
+
* })
|
|
29
|
+
*
|
|
30
|
+
* // Use cascade operators
|
|
31
|
+
* await relationships.createWithOperator('customer_123', '~>Company', companyData)
|
|
32
|
+
*
|
|
33
|
+
* // Traverse relationships
|
|
34
|
+
* const related = await relationships.traverse('customer_123', 'belongsTo', 2)
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
import type { Relationship } from '../../types/collections';
|
|
38
|
+
import type { StoredRelation, RelationOperator, RelationFieldDefinition, CascadeResult, CascadeFieldResult } from '../../types/cascade';
|
|
39
|
+
import { BaseCollection, DOStorage } from './base';
|
|
40
|
+
/**
|
|
41
|
+
* Options for creating a relationship
|
|
42
|
+
*/
|
|
43
|
+
export interface CreateRelationshipOptions {
|
|
44
|
+
/**
|
|
45
|
+
* Source entity ID
|
|
46
|
+
*/
|
|
47
|
+
from: string;
|
|
48
|
+
/**
|
|
49
|
+
* Target entity ID
|
|
50
|
+
*/
|
|
51
|
+
to: string;
|
|
52
|
+
/**
|
|
53
|
+
* Relationship type
|
|
54
|
+
*/
|
|
55
|
+
type: string;
|
|
56
|
+
/**
|
|
57
|
+
* Additional data associated with the relationship
|
|
58
|
+
*/
|
|
59
|
+
data?: Record<string, unknown>;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Options for querying relationships
|
|
63
|
+
*/
|
|
64
|
+
export interface RelationshipQueryOptions {
|
|
65
|
+
/**
|
|
66
|
+
* Filter by relationship type
|
|
67
|
+
*/
|
|
68
|
+
type?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Direction to query
|
|
71
|
+
*/
|
|
72
|
+
direction?: 'outgoing' | 'incoming' | 'both';
|
|
73
|
+
/**
|
|
74
|
+
* Maximum depth for traversal
|
|
75
|
+
*/
|
|
76
|
+
depth?: number;
|
|
77
|
+
/**
|
|
78
|
+
* Include relationship data
|
|
79
|
+
*/
|
|
80
|
+
includeData?: boolean;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Result of a relationship traversal
|
|
84
|
+
*/
|
|
85
|
+
export interface TraversalResult {
|
|
86
|
+
/**
|
|
87
|
+
* Entity ID
|
|
88
|
+
*/
|
|
89
|
+
id: string;
|
|
90
|
+
/**
|
|
91
|
+
* Depth from source (0 = direct relation)
|
|
92
|
+
*/
|
|
93
|
+
depth: number;
|
|
94
|
+
/**
|
|
95
|
+
* Relationship that led here
|
|
96
|
+
*/
|
|
97
|
+
relationship?: Relationship;
|
|
98
|
+
/**
|
|
99
|
+
* Path of IDs from source to this entity
|
|
100
|
+
*/
|
|
101
|
+
path: string[];
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Relationships collection for graph-style entity linking
|
|
105
|
+
*
|
|
106
|
+
* @description
|
|
107
|
+
* The RelationshipCollection provides graph-style relationship management
|
|
108
|
+
* between Things in a DO. It integrates with:
|
|
109
|
+
*
|
|
110
|
+
* - Cascade operators for schema-driven linking
|
|
111
|
+
* - RelationManager for unified storage
|
|
112
|
+
* - Things collection for entity resolution
|
|
113
|
+
*
|
|
114
|
+
* Key features:
|
|
115
|
+
* - Bidirectional relationships with automatic inverse creation
|
|
116
|
+
* - Cascade operator support (-> ~> <- <~)
|
|
117
|
+
* - Graph traversal with depth limiting
|
|
118
|
+
* - Relationship metadata storage
|
|
119
|
+
* - Ordered relationships (via ordinal)
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* ```typescript
|
|
123
|
+
* const relationships = new RelationshipCollection(storage)
|
|
124
|
+
*
|
|
125
|
+
* // Create relationships
|
|
126
|
+
* await relationships.create({
|
|
127
|
+
* from: 'order_123',
|
|
128
|
+
* to: 'customer_456',
|
|
129
|
+
* type: 'orderedBy'
|
|
130
|
+
* })
|
|
131
|
+
*
|
|
132
|
+
* // Query relationships
|
|
133
|
+
* const customerOrders = await relationships.findTo('customer_456', 'orderedBy')
|
|
134
|
+
*
|
|
135
|
+
* // Traverse graph
|
|
136
|
+
* const network = await relationships.traverse('customer_456', null, 2)
|
|
137
|
+
*
|
|
138
|
+
* // Process cascade schema
|
|
139
|
+
* const result = await relationships.processCascade(
|
|
140
|
+
* 'Customer',
|
|
141
|
+
* 'cust_123',
|
|
142
|
+
* generatedData,
|
|
143
|
+
* CustomerSchema
|
|
144
|
+
* )
|
|
145
|
+
* ```
|
|
146
|
+
*/
|
|
147
|
+
export declare class RelationshipCollection extends BaseCollection<Relationship> {
|
|
148
|
+
/**
|
|
149
|
+
* Create a new RelationshipCollection instance
|
|
150
|
+
*
|
|
151
|
+
* @param storage - DO storage interface
|
|
152
|
+
*/
|
|
153
|
+
constructor(storage: DOStorage);
|
|
154
|
+
/**
|
|
155
|
+
* Initialize the relationships table in SQLite
|
|
156
|
+
*
|
|
157
|
+
* @internal
|
|
158
|
+
*/
|
|
159
|
+
protected initializeTable(): Promise<void>;
|
|
160
|
+
/**
|
|
161
|
+
* Create a relationship
|
|
162
|
+
*
|
|
163
|
+
* @param data - Relationship creation options
|
|
164
|
+
* @returns Created relationship
|
|
165
|
+
*
|
|
166
|
+
* @throws {ValidationError} If relationship already exists
|
|
167
|
+
*
|
|
168
|
+
* @example
|
|
169
|
+
* ```typescript
|
|
170
|
+
* const rel = await relationships.create({
|
|
171
|
+
* from: 'order_123',
|
|
172
|
+
* to: 'customer_456',
|
|
173
|
+
* type: 'belongsTo'
|
|
174
|
+
* })
|
|
175
|
+
* ```
|
|
176
|
+
*/
|
|
177
|
+
create(data: Omit<Relationship, 'id' | 'createdAt'>): Promise<Relationship>;
|
|
178
|
+
/**
|
|
179
|
+
* Create a bidirectional relationship
|
|
180
|
+
*
|
|
181
|
+
* @param data - Relationship data
|
|
182
|
+
* @param inverseType - Type for the inverse relationship
|
|
183
|
+
* @returns Tuple of [forward, inverse] relationships
|
|
184
|
+
*
|
|
185
|
+
* @example
|
|
186
|
+
* ```typescript
|
|
187
|
+
* const [parentRel, childRel] = await relationships.createBidirectional(
|
|
188
|
+
* { from: 'parent_1', to: 'child_2', type: 'hasChild' },
|
|
189
|
+
* 'hasParent'
|
|
190
|
+
* )
|
|
191
|
+
* ```
|
|
192
|
+
*/
|
|
193
|
+
createBidirectional(data: Omit<Relationship, 'id' | 'createdAt'>, inverseType: string): Promise<[Relationship, Relationship]>;
|
|
194
|
+
/**
|
|
195
|
+
* Get all outgoing relationships from an entity
|
|
196
|
+
*
|
|
197
|
+
* @param entityId - Source entity ID
|
|
198
|
+
* @param type - Optional filter by relationship type
|
|
199
|
+
* @returns Array of relationships
|
|
200
|
+
*
|
|
201
|
+
* @example
|
|
202
|
+
* ```typescript
|
|
203
|
+
* const orders = await relationships.findFrom('customer_123', 'hasOrder')
|
|
204
|
+
* ```
|
|
205
|
+
*/
|
|
206
|
+
findFrom(entityId: string, type?: string): Promise<Relationship[]>;
|
|
207
|
+
/**
|
|
208
|
+
* Get all incoming relationships to an entity
|
|
209
|
+
*
|
|
210
|
+
* @param entityId - Target entity ID
|
|
211
|
+
* @param type - Optional filter by relationship type
|
|
212
|
+
* @returns Array of relationships
|
|
213
|
+
*
|
|
214
|
+
* @example
|
|
215
|
+
* ```typescript
|
|
216
|
+
* const owners = await relationships.findTo('order_123', 'belongsTo')
|
|
217
|
+
* ```
|
|
218
|
+
*/
|
|
219
|
+
findTo(entityId: string, type?: string): Promise<Relationship[]>;
|
|
220
|
+
/**
|
|
221
|
+
* Get all relationships for an entity (both directions)
|
|
222
|
+
*
|
|
223
|
+
* @param entityId - Entity ID
|
|
224
|
+
* @param options - Query options
|
|
225
|
+
* @returns Array of relationships
|
|
226
|
+
*
|
|
227
|
+
* @example
|
|
228
|
+
* ```typescript
|
|
229
|
+
* const allRels = await relationships.findAll('entity_123')
|
|
230
|
+
* ```
|
|
231
|
+
*/
|
|
232
|
+
findAll(entityId: string, options?: RelationshipQueryOptions): Promise<Relationship[]>;
|
|
233
|
+
/**
|
|
234
|
+
* Check if a relationship exists
|
|
235
|
+
*
|
|
236
|
+
* @param from - Source entity ID
|
|
237
|
+
* @param to - Target entity ID
|
|
238
|
+
* @param type - Relationship type
|
|
239
|
+
* @returns True if relationship exists
|
|
240
|
+
*
|
|
241
|
+
* @example
|
|
242
|
+
* ```typescript
|
|
243
|
+
* if (await relationships.exists('customer_123', 'company_456', 'belongsTo')) {
|
|
244
|
+
* // Already linked
|
|
245
|
+
* }
|
|
246
|
+
* ```
|
|
247
|
+
*/
|
|
248
|
+
exists(from: string, to: string, type: string): Promise<boolean>;
|
|
249
|
+
/**
|
|
250
|
+
* Delete a relationship by ID
|
|
251
|
+
*
|
|
252
|
+
* @param id - Relationship ID
|
|
253
|
+
*
|
|
254
|
+
* @throws {NotFoundError} If relationship not found
|
|
255
|
+
*/
|
|
256
|
+
delete(id: string): Promise<void>;
|
|
257
|
+
/**
|
|
258
|
+
* Delete a specific relationship by from/to/type
|
|
259
|
+
*
|
|
260
|
+
* @param from - Source entity ID
|
|
261
|
+
* @param to - Target entity ID
|
|
262
|
+
* @param type - Relationship type
|
|
263
|
+
* @returns True if deleted, false if not found
|
|
264
|
+
*/
|
|
265
|
+
deleteRelation(from: string, to: string, type: string): Promise<boolean>;
|
|
266
|
+
/**
|
|
267
|
+
* Delete all relationships for an entity
|
|
268
|
+
*
|
|
269
|
+
* @param entityId - Entity ID
|
|
270
|
+
* @returns Number of deleted relationships
|
|
271
|
+
*
|
|
272
|
+
* @description
|
|
273
|
+
* Deletes both incoming and outgoing relationships.
|
|
274
|
+
*
|
|
275
|
+
* @example
|
|
276
|
+
* ```typescript
|
|
277
|
+
* const deleted = await relationships.deleteAll('entity_123')
|
|
278
|
+
* console.log(`Deleted ${deleted} relationships`)
|
|
279
|
+
* ```
|
|
280
|
+
*/
|
|
281
|
+
deleteAll(entityId: string): Promise<number>;
|
|
282
|
+
/**
|
|
283
|
+
* Update relationship data
|
|
284
|
+
*
|
|
285
|
+
* @param id - Relationship ID
|
|
286
|
+
* @param data - Data to merge
|
|
287
|
+
* @returns Updated relationship
|
|
288
|
+
*
|
|
289
|
+
* @throws {NotFoundError} If relationship not found
|
|
290
|
+
*/
|
|
291
|
+
updateData(id: string, data: Record<string, unknown>): Promise<Relationship>;
|
|
292
|
+
/**
|
|
293
|
+
* Traverse the relationship graph
|
|
294
|
+
*
|
|
295
|
+
* @param startId - Starting entity ID
|
|
296
|
+
* @param type - Relationship type to follow (null for any)
|
|
297
|
+
* @param maxDepth - Maximum traversal depth
|
|
298
|
+
* @param direction - Direction to traverse
|
|
299
|
+
* @returns Array of traversal results
|
|
300
|
+
*
|
|
301
|
+
* @description
|
|
302
|
+
* Performs breadth-first traversal of the relationship graph.
|
|
303
|
+
*
|
|
304
|
+
* @example
|
|
305
|
+
* ```typescript
|
|
306
|
+
* // Find all entities connected to customer within 2 hops
|
|
307
|
+
* const network = await relationships.traverse('customer_123', null, 2)
|
|
308
|
+
*
|
|
309
|
+
* // Find all children of an organization
|
|
310
|
+
* const children = await relationships.traverse('org_1', 'hasChild', 3, 'outgoing')
|
|
311
|
+
* ```
|
|
312
|
+
*/
|
|
313
|
+
traverse(startId: string, type: string | null, maxDepth?: number, direction?: 'outgoing' | 'incoming' | 'both'): Promise<TraversalResult[]>;
|
|
314
|
+
/**
|
|
315
|
+
* Find shortest path between two entities
|
|
316
|
+
*
|
|
317
|
+
* @param fromId - Source entity ID
|
|
318
|
+
* @param toId - Target entity ID
|
|
319
|
+
* @param maxDepth - Maximum search depth
|
|
320
|
+
* @returns Path of relationships or null if not connected
|
|
321
|
+
*
|
|
322
|
+
* @example
|
|
323
|
+
* ```typescript
|
|
324
|
+
* const path = await relationships.findPath('entity_a', 'entity_z', 5)
|
|
325
|
+
* if (path) {
|
|
326
|
+
* console.log(`Connected via ${path.length} relationships`)
|
|
327
|
+
* }
|
|
328
|
+
* ```
|
|
329
|
+
*/
|
|
330
|
+
findPath(fromId: string, toId: string, maxDepth?: number): Promise<Relationship[] | null>;
|
|
331
|
+
/**
|
|
332
|
+
* Count relationships for an entity
|
|
333
|
+
*
|
|
334
|
+
* @param entityId - Entity ID
|
|
335
|
+
* @param direction - Direction to count
|
|
336
|
+
* @returns Relationship count
|
|
337
|
+
*/
|
|
338
|
+
countFor(entityId: string, direction?: 'outgoing' | 'incoming' | 'both'): Promise<number>;
|
|
339
|
+
/**
|
|
340
|
+
* Get relationship types used by an entity
|
|
341
|
+
*
|
|
342
|
+
* @param entityId - Entity ID
|
|
343
|
+
* @returns Array of unique relationship types
|
|
344
|
+
*/
|
|
345
|
+
getTypesFor(entityId: string): Promise<string[]>;
|
|
346
|
+
/**
|
|
347
|
+
* Create relationship using cascade operator
|
|
348
|
+
*
|
|
349
|
+
* @param sourceId - Source entity ID
|
|
350
|
+
* @param operator - Cascade operator (-> ~> <- <~)
|
|
351
|
+
* @param targetType - Target entity type
|
|
352
|
+
* @param targetId - Target entity ID
|
|
353
|
+
* @param relName - Relationship name (field name)
|
|
354
|
+
* @returns Created relationship
|
|
355
|
+
*
|
|
356
|
+
* @example
|
|
357
|
+
* ```typescript
|
|
358
|
+
* // Forward insert: customer -> contact
|
|
359
|
+
* await relationships.createWithOperator('cust_1', '->', 'Contact', 'contact_2', 'contacts')
|
|
360
|
+
*
|
|
361
|
+
* // Backward search: industry <~ customer
|
|
362
|
+
* await relationships.createWithOperator('cust_1', '<~', 'Industry', 'ind_3', 'industry')
|
|
363
|
+
* ```
|
|
364
|
+
*/
|
|
365
|
+
createWithOperator(sourceId: string, operator: RelationOperator, targetType: string, targetId: string, relName: string): Promise<Relationship>;
|
|
366
|
+
/**
|
|
367
|
+
* Parse a cascade operator into direction and method
|
|
368
|
+
*
|
|
369
|
+
* @param op - Cascade operator
|
|
370
|
+
* @returns Parsed operator components
|
|
371
|
+
*
|
|
372
|
+
* @internal
|
|
373
|
+
*/
|
|
374
|
+
private parseOperator;
|
|
375
|
+
/**
|
|
376
|
+
* Process cascade relationships for a generated entity
|
|
377
|
+
*
|
|
378
|
+
* @param sourceType - Source entity type
|
|
379
|
+
* @param sourceId - Source entity ID
|
|
380
|
+
* @param generatedData - AI-generated data
|
|
381
|
+
* @param schema - Schema with cascade operators
|
|
382
|
+
* @returns Processing results
|
|
383
|
+
*
|
|
384
|
+
* @description
|
|
385
|
+
* Processes all fields in the schema that have cascade operators:
|
|
386
|
+
* - `->`: Creates new entity and links TO it
|
|
387
|
+
* - `~>`: Searches for entity and links TO it
|
|
388
|
+
* - `<-`: Creates new entity and links FROM it
|
|
389
|
+
* - `<~`: Searches for entity and links FROM it
|
|
390
|
+
*
|
|
391
|
+
* @example
|
|
392
|
+
* ```typescript
|
|
393
|
+
* const schema = {
|
|
394
|
+
* contacts: ['->Contact'], // Create contacts
|
|
395
|
+
* company: '~>Company', // Search for company
|
|
396
|
+
* owner: '<-SalesRep', // SalesRep owns this
|
|
397
|
+
* }
|
|
398
|
+
*
|
|
399
|
+
* const result = await relationships.processCascade(
|
|
400
|
+
* 'Customer',
|
|
401
|
+
* 'cust_123',
|
|
402
|
+
* generatedData,
|
|
403
|
+
* schema
|
|
404
|
+
* )
|
|
405
|
+
*
|
|
406
|
+
* console.log(result.created) // Entities created
|
|
407
|
+
* console.log(result.relations) // Relations created
|
|
408
|
+
* console.log(result.errors) // Any errors
|
|
409
|
+
* ```
|
|
410
|
+
*/
|
|
411
|
+
processCascade(sourceType: string, sourceId: string, generatedData: Record<string, unknown>, schema: Record<string, string | string[]>): Promise<CascadeResult>;
|
|
412
|
+
/**
|
|
413
|
+
* Process a single cascade field
|
|
414
|
+
*
|
|
415
|
+
* @param sourceType - Source entity type
|
|
416
|
+
* @param sourceId - Source entity ID
|
|
417
|
+
* @param fieldName - Field name
|
|
418
|
+
* @param fieldValue - Generated value for field
|
|
419
|
+
* @param fieldDef - Parsed field definition
|
|
420
|
+
* @returns Field processing result
|
|
421
|
+
*
|
|
422
|
+
* @internal
|
|
423
|
+
*/
|
|
424
|
+
processCascadeField(sourceType: string, sourceId: string, fieldName: string, fieldValue: unknown, fieldDef: RelationFieldDefinition): Promise<CascadeFieldResult>;
|
|
425
|
+
/**
|
|
426
|
+
* Convert to StoredRelation format
|
|
427
|
+
*
|
|
428
|
+
* @param rel - Relationship
|
|
429
|
+
* @param options - Additional fields
|
|
430
|
+
* @returns StoredRelation
|
|
431
|
+
*
|
|
432
|
+
* @internal
|
|
433
|
+
*/
|
|
434
|
+
toStoredRelation(rel: Relationship, options: {
|
|
435
|
+
relType: 'Forward' | 'Backward' | 'FuzzyForward' | 'FuzzyBackward';
|
|
436
|
+
relName: string;
|
|
437
|
+
fromCollection?: string;
|
|
438
|
+
toCollection?: string;
|
|
439
|
+
label?: string;
|
|
440
|
+
ordinal?: number;
|
|
441
|
+
}): StoredRelation;
|
|
442
|
+
/**
|
|
443
|
+
* Get outgoing relations (RelationManager interface)
|
|
444
|
+
*
|
|
445
|
+
* @param collection - Source collection
|
|
446
|
+
* @param docId - Source document ID
|
|
447
|
+
* @param relName - Optional relation name filter
|
|
448
|
+
*/
|
|
449
|
+
getOutgoing(collection: string, docId: string, relName?: string): Promise<StoredRelation[]>;
|
|
450
|
+
/**
|
|
451
|
+
* Get incoming relations (RelationManager interface)
|
|
452
|
+
*
|
|
453
|
+
* @param collection - Target collection
|
|
454
|
+
* @param docId - Target document ID
|
|
455
|
+
* @param relName - Optional relation name filter
|
|
456
|
+
*/
|
|
457
|
+
getIncoming(collection: string, docId: string, relName?: string): Promise<StoredRelation[]>;
|
|
458
|
+
/**
|
|
459
|
+
* Update ordinal for a relationship (for reordering)
|
|
460
|
+
*
|
|
461
|
+
* @param id - Relationship ID
|
|
462
|
+
* @param ordinal - New ordinal value
|
|
463
|
+
* @returns Updated relationship
|
|
464
|
+
*/
|
|
465
|
+
updateOrdinal(id: string, ordinal: number): Promise<Relationship>;
|
|
466
|
+
/**
|
|
467
|
+
* Reorder relationships for an entity
|
|
468
|
+
*
|
|
469
|
+
* @param entityId - Entity ID
|
|
470
|
+
* @param type - Relationship type
|
|
471
|
+
* @param orderedIds - Array of relationship IDs in new order
|
|
472
|
+
*
|
|
473
|
+
* @example
|
|
474
|
+
* ```typescript
|
|
475
|
+
* // Reorder contacts for a customer
|
|
476
|
+
* await relationships.reorder('customer_123', 'hasContact', [
|
|
477
|
+
* 'rel_c', 'rel_a', 'rel_b' // New order
|
|
478
|
+
* ])
|
|
479
|
+
* ```
|
|
480
|
+
*/
|
|
481
|
+
reorder(entityId: string, type: string, orderedIds: string[]): Promise<void>;
|
|
482
|
+
}
|
|
483
|
+
export default RelationshipCollection;
|
|
484
|
+
//# sourceMappingURL=relationships.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relationships.d.ts","sourceRoot":"","sources":["../../../db/collections/relationships.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,KAAK,EACV,cAAc,EAEd,gBAAgB,EAChB,uBAAuB,EAGvB,aAAa,EACb,kBAAkB,EAEnB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,cAAc,EAAE,SAAS,EAAkC,MAAM,QAAQ,CAAA;AAElF;;GAEG;AACH,MAAM,WAAW,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