@vertesia/common 1.5.0-dev.20260725.083715Z → 1.5.0-dev.20260804.124748Z
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/lib/access-control-values.d.ts +98 -0
- package/lib/access-control-values.d.ts.map +1 -0
- package/lib/access-control-values.js +101 -0
- package/lib/access-control-values.js.map +1 -0
- package/lib/access-control.d.ts +22 -119
- package/lib/access-control.d.ts.map +1 -1
- package/lib/access-control.js +6 -78
- package/lib/access-control.js.map +1 -1
- package/lib/account-values.d.ts +53 -0
- package/lib/account-values.d.ts.map +1 -0
- package/lib/account-values.js +91 -0
- package/lib/account-values.js.map +1 -0
- package/lib/analytics.d.ts +12 -38
- package/lib/analytics.d.ts.map +1 -1
- package/lib/api-schemas/access-control.d.ts +215 -0
- package/lib/api-schemas/access-control.d.ts.map +1 -0
- package/lib/api-schemas/access-control.js +165 -0
- package/lib/api-schemas/access-control.js.map +1 -0
- package/lib/api-schemas/account.d.ts +101 -0
- package/lib/api-schemas/account.d.ts.map +1 -0
- package/lib/api-schemas/account.js +136 -0
- package/lib/api-schemas/account.js.map +1 -0
- package/lib/api-schemas/adapter.d.ts +80 -0
- package/lib/api-schemas/adapter.d.ts.map +1 -0
- package/lib/api-schemas/adapter.js +726 -0
- package/lib/api-schemas/adapter.js.map +1 -0
- package/lib/api-schemas/agent-runs.d.ts +3781 -0
- package/lib/api-schemas/agent-runs.d.ts.map +1 -0
- package/lib/api-schemas/agent-runs.js +991 -0
- package/lib/api-schemas/agent-runs.js.map +1 -0
- package/lib/api-schemas/analytics.d.ts +86 -0
- package/lib/api-schemas/analytics.d.ts.map +1 -0
- package/lib/api-schemas/analytics.js +58 -0
- package/lib/api-schemas/analytics.js.map +1 -0
- package/lib/api-schemas/apikey.d.ts +231 -0
- package/lib/api-schemas/apikey.d.ts.map +1 -0
- package/lib/api-schemas/apikey.js +172 -0
- package/lib/api-schemas/apikey.js.map +1 -0
- package/lib/api-schemas/app-lifecycle.d.ts +1114 -0
- package/lib/api-schemas/app-lifecycle.d.ts.map +1 -0
- package/lib/api-schemas/app-lifecycle.js +750 -0
- package/lib/api-schemas/app-lifecycle.js.map +1 -0
- package/lib/api-schemas/app-runtime.d.ts +9056 -0
- package/lib/api-schemas/app-runtime.d.ts.map +1 -0
- package/lib/api-schemas/app-runtime.js +782 -0
- package/lib/api-schemas/app-runtime.js.map +1 -0
- package/lib/api-schemas/apps.d.ts +247 -0
- package/lib/api-schemas/apps.d.ts.map +1 -0
- package/lib/api-schemas/apps.js +366 -0
- package/lib/api-schemas/apps.js.map +1 -0
- package/lib/api-schemas/audit-trail.d.ts +465 -0
- package/lib/api-schemas/audit-trail.d.ts.map +1 -0
- package/lib/api-schemas/audit-trail.js +218 -0
- package/lib/api-schemas/audit-trail.js.map +1 -0
- package/lib/api-schemas/bulk-operation.d.ts +104 -0
- package/lib/api-schemas/bulk-operation.d.ts.map +1 -0
- package/lib/api-schemas/bulk-operation.js +66 -0
- package/lib/api-schemas/bulk-operation.js.map +1 -0
- package/lib/api-schemas/commands.d.ts +50 -0
- package/lib/api-schemas/commands.d.ts.map +1 -0
- package/lib/api-schemas/commands.js +58 -0
- package/lib/api-schemas/commands.js.map +1 -0
- package/lib/api-schemas/content.d.ts +3561 -0
- package/lib/api-schemas/content.d.ts.map +1 -0
- package/lib/api-schemas/content.js +842 -0
- package/lib/api-schemas/content.js.map +1 -0
- package/lib/api-schemas/cost-analytics.d.ts +300 -0
- package/lib/api-schemas/cost-analytics.d.ts.map +1 -0
- package/lib/api-schemas/cost-analytics.js +218 -0
- package/lib/api-schemas/cost-analytics.js.map +1 -0
- package/lib/api-schemas/dashboard.d.ts +408 -0
- package/lib/api-schemas/dashboard.d.ts.map +1 -0
- package/lib/api-schemas/dashboard.js +311 -0
- package/lib/api-schemas/dashboard.js.map +1 -0
- package/lib/api-schemas/data-store.d.ts +1650 -0
- package/lib/api-schemas/data-store.d.ts.map +1 -0
- package/lib/api-schemas/data-store.js +504 -0
- package/lib/api-schemas/data-store.js.map +1 -0
- package/lib/api-schemas/document-processing.d.ts +1501 -0
- package/lib/api-schemas/document-processing.d.ts.map +1 -0
- package/lib/api-schemas/document-processing.js +312 -0
- package/lib/api-schemas/document-processing.js.map +1 -0
- package/lib/api-schemas/embeddings.d.ts +184 -0
- package/lib/api-schemas/embeddings.d.ts.map +1 -0
- package/lib/api-schemas/embeddings.js +102 -0
- package/lib/api-schemas/embeddings.js.map +1 -0
- package/lib/api-schemas/environment.d.ts +412 -0
- package/lib/api-schemas/environment.d.ts.map +1 -0
- package/lib/api-schemas/environment.js +170 -0
- package/lib/api-schemas/environment.js.map +1 -0
- package/lib/api-schemas/events.d.ts +4880 -0
- package/lib/api-schemas/events.d.ts.map +1 -0
- package/lib/api-schemas/events.js +832 -0
- package/lib/api-schemas/events.js.map +1 -0
- package/lib/api-schemas/files.d.ts +107 -0
- package/lib/api-schemas/files.d.ts.map +1 -0
- package/lib/api-schemas/files.js +137 -0
- package/lib/api-schemas/files.js.map +1 -0
- package/lib/api-schemas/group.d.ts +122 -0
- package/lib/api-schemas/group.d.ts.map +1 -0
- package/lib/api-schemas/group.js +142 -0
- package/lib/api-schemas/group.js.map +1 -0
- package/lib/api-schemas/index.d.ts +36 -0
- package/lib/api-schemas/index.d.ts.map +1 -0
- package/lib/api-schemas/index.js +36 -0
- package/lib/api-schemas/index.js.map +1 -0
- package/lib/api-schemas/indexing.d.ts +144 -0
- package/lib/api-schemas/indexing.d.ts.map +1 -0
- package/lib/api-schemas/indexing.js +217 -0
- package/lib/api-schemas/indexing.js.map +1 -0
- package/lib/api-schemas/integrations.d.ts +269 -0
- package/lib/api-schemas/integrations.d.ts.map +1 -0
- package/lib/api-schemas/integrations.js +335 -0
- package/lib/api-schemas/integrations.js.map +1 -0
- package/lib/api-schemas/interaction.d.ts +22454 -0
- package/lib/api-schemas/interaction.d.ts.map +1 -0
- package/lib/api-schemas/interaction.js +2065 -0
- package/lib/api-schemas/interaction.js.map +1 -0
- package/lib/api-schemas/invites.d.ts +162 -0
- package/lib/api-schemas/invites.d.ts.map +1 -0
- package/lib/api-schemas/invites.js +106 -0
- package/lib/api-schemas/invites.js.map +1 -0
- package/lib/api-schemas/oauth-server.d.ts +415 -0
- package/lib/api-schemas/oauth-server.d.ts.map +1 -0
- package/lib/api-schemas/oauth-server.js +193 -0
- package/lib/api-schemas/oauth-server.js.map +1 -0
- package/lib/api-schemas/oauth.d.ts +150 -0
- package/lib/api-schemas/oauth.d.ts.map +1 -0
- package/lib/api-schemas/oauth.js +148 -0
- package/lib/api-schemas/oauth.js.map +1 -0
- package/lib/api-schemas/parameters.d.ts +64 -0
- package/lib/api-schemas/parameters.d.ts.map +1 -0
- package/lib/api-schemas/parameters.js +246 -0
- package/lib/api-schemas/parameters.js.map +1 -0
- package/lib/api-schemas/process.d.ts +499 -0
- package/lib/api-schemas/process.d.ts.map +1 -0
- package/lib/api-schemas/process.js +817 -0
- package/lib/api-schemas/process.js.map +1 -0
- package/lib/api-schemas/project-configuration.d.ts +4900 -0
- package/lib/api-schemas/project-configuration.d.ts.map +1 -0
- package/lib/api-schemas/project-configuration.js +425 -0
- package/lib/api-schemas/project-configuration.js.map +1 -0
- package/lib/api-schemas/project.d.ts +7247 -0
- package/lib/api-schemas/project.d.ts.map +1 -0
- package/lib/api-schemas/project.js +185 -0
- package/lib/api-schemas/project.js.map +1 -0
- package/lib/api-schemas/prompt.d.ts +70 -0
- package/lib/api-schemas/prompt.d.ts.map +1 -0
- package/lib/api-schemas/prompt.js +77 -0
- package/lib/api-schemas/prompt.js.map +1 -0
- package/lib/api-schemas/quota.d.ts +90 -0
- package/lib/api-schemas/quota.d.ts.map +1 -0
- package/lib/api-schemas/quota.js +95 -0
- package/lib/api-schemas/quota.js.map +1 -0
- package/lib/api-schemas/registry.d.ts +97458 -0
- package/lib/api-schemas/registry.d.ts.map +1 -0
- package/lib/api-schemas/registry.js +2586 -0
- package/lib/api-schemas/registry.js.map +1 -0
- package/lib/api-schemas/schema-primitives.d.ts +5 -0
- package/lib/api-schemas/schema-primitives.d.ts.map +1 -0
- package/lib/api-schemas/schema-primitives.js +11 -0
- package/lib/api-schemas/schema-primitives.js.map +1 -0
- package/lib/api-schemas/secrets.d.ts +497 -0
- package/lib/api-schemas/secrets.d.ts.map +1 -0
- package/lib/api-schemas/secrets.js +298 -0
- package/lib/api-schemas/secrets.js.map +1 -0
- package/lib/api-schemas/store.d.ts +22140 -0
- package/lib/api-schemas/store.d.ts.map +1 -0
- package/lib/api-schemas/store.js +557 -0
- package/lib/api-schemas/store.js.map +1 -0
- package/lib/api-schemas/sts.d.ts +156 -0
- package/lib/api-schemas/sts.d.ts.map +1 -0
- package/lib/api-schemas/sts.js +96 -0
- package/lib/api-schemas/sts.js.map +1 -0
- package/lib/api-schemas/task.d.ts +215 -0
- package/lib/api-schemas/task.d.ts.map +1 -0
- package/lib/api-schemas/task.js +95 -0
- package/lib/api-schemas/task.js.map +1 -0
- package/lib/api-schemas/tools.d.ts +111 -0
- package/lib/api-schemas/tools.d.ts.map +1 -0
- package/lib/api-schemas/tools.js +122 -0
- package/lib/api-schemas/tools.js.map +1 -0
- package/lib/api-schemas/user.d.ts +208 -0
- package/lib/api-schemas/user.d.ts.map +1 -0
- package/lib/api-schemas/user.js +180 -0
- package/lib/api-schemas/user.js.map +1 -0
- package/lib/api-schemas/view-execution.d.ts +3163 -0
- package/lib/api-schemas/view-execution.d.ts.map +1 -0
- package/lib/api-schemas/view-execution.js +172 -0
- package/lib/api-schemas/view-execution.js.map +1 -0
- package/lib/api-schemas/views.d.ts +5990 -0
- package/lib/api-schemas/views.d.ts.map +1 -0
- package/lib/api-schemas/views.js +396 -0
- package/lib/api-schemas/views.js.map +1 -0
- package/lib/api-schemas/workflow-runs.d.ts +2209 -0
- package/lib/api-schemas/workflow-runs.d.ts.map +1 -0
- package/lib/api-schemas/workflow-runs.js +589 -0
- package/lib/api-schemas/workflow-runs.js.map +1 -0
- package/lib/apikey-values.d.ts +10 -0
- package/lib/apikey-values.d.ts.map +1 -0
- package/lib/apikey-values.js +11 -0
- package/lib/apikey-values.js.map +1 -0
- package/lib/apikey.d.ts +37 -36
- package/lib/apikey.d.ts.map +1 -1
- package/lib/apikey.js +5 -4
- package/lib/apikey.js.map +1 -1
- package/lib/apps.d.ts +107 -1151
- package/lib/apps.d.ts.map +1 -1
- package/lib/apps.js.map +1 -1
- package/lib/ask-user.d.ts +8 -1
- package/lib/ask-user.d.ts.map +1 -1
- package/lib/audit-trail.d.ts +17 -128
- package/lib/audit-trail.d.ts.map +1 -1
- package/lib/audit-trail.js.map +1 -1
- package/lib/browser-credentials.d.ts +11 -106
- package/lib/browser-credentials.d.ts.map +1 -1
- package/lib/common.d.ts +59 -81
- package/lib/common.d.ts.map +1 -1
- package/lib/cost-analytics.d.ts +14 -167
- package/lib/cost-analytics.d.ts.map +1 -1
- package/lib/cost-analytics.js.map +1 -1
- package/lib/data-platform.d.ts +122 -786
- package/lib/data-platform.d.ts.map +1 -1
- package/lib/data-platform.js +41 -61
- package/lib/data-platform.js.map +1 -1
- package/lib/email.d.ts +5 -17
- package/lib/email.d.ts.map +1 -1
- package/lib/email.js +0 -3
- package/lib/email.js.map +1 -1
- package/lib/embeddings.d.ts +14 -56
- package/lib/embeddings.d.ts.map +1 -1
- package/lib/environment.d.ts +19 -115
- package/lib/environment.d.ts.map +1 -1
- package/lib/environment.js +3 -0
- package/lib/environment.js.map +1 -1
- package/lib/facets.d.ts +4 -7
- package/lib/facets.d.ts.map +1 -1
- package/lib/group.d.ts +33 -39
- package/lib/group.d.ts.map +1 -1
- package/lib/group.js +0 -1
- package/lib/group.js.map +1 -1
- package/lib/index.d.ts +7 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/integrations.d.ts +20 -108
- package/lib/integrations.d.ts.map +1 -1
- package/lib/integrations.js.map +1 -1
- package/lib/interaction-values.d.ts +11 -0
- package/lib/interaction-values.d.ts.map +1 -0
- package/lib/interaction-values.js +24 -0
- package/lib/interaction-values.js.map +1 -0
- package/lib/interaction.d.ts +88 -778
- package/lib/interaction.d.ts.map +1 -1
- package/lib/interaction.js +8 -12
- package/lib/interaction.js.map +1 -1
- package/lib/meters.d.ts +11 -7
- package/lib/meters.d.ts.map +1 -1
- package/lib/meters.js.map +1 -1
- package/lib/oauth-server.d.ts +33 -119
- package/lib/oauth-server.d.ts.map +1 -1
- package/lib/oauth.d.ts +14 -96
- package/lib/oauth.d.ts.map +1 -1
- package/lib/oauth.js +0 -4
- package/lib/oauth.js.map +1 -1
- package/lib/payload.d.ts +15 -38
- package/lib/payload.d.ts.map +1 -1
- package/lib/platform-event.d.ts +49 -462
- package/lib/platform-event.d.ts.map +1 -1
- package/lib/platform-event.js.map +1 -1
- package/lib/principal-context.d.ts +10 -15
- package/lib/principal-context.d.ts.map +1 -1
- package/lib/project-values.d.ts +24 -0
- package/lib/project-values.d.ts.map +1 -0
- package/lib/project-values.js +42 -0
- package/lib/project-values.js.map +1 -0
- package/lib/project.d.ts +55 -503
- package/lib/project.d.ts.map +1 -1
- package/lib/project.js +6 -76
- package/lib/project.js.map +1 -1
- package/lib/prompt.d.ts +20 -51
- package/lib/prompt.d.ts.map +1 -1
- package/lib/prompt.js.map +1 -1
- package/lib/query.d.ts +27 -88
- package/lib/query.d.ts.map +1 -1
- package/lib/rate-limiter.d.ts +19 -70
- package/lib/rate-limiter.d.ts.map +1 -1
- package/lib/rate-limiter.js +0 -3
- package/lib/rate-limiter.js.map +1 -1
- package/lib/refs.d.ts +3 -11
- package/lib/refs.d.ts.map +1 -1
- package/lib/refs.js.map +1 -1
- package/lib/roles/types.d.ts +14 -20
- package/lib/roles/types.d.ts.map +1 -1
- package/lib/roles/types.js +5 -9
- package/lib/roles/types.js.map +1 -1
- package/lib/runs.d.ts +6 -25
- package/lib/runs.d.ts.map +1 -1
- package/lib/secrets.d.ts +20 -105
- package/lib/secrets.d.ts.map +1 -1
- package/lib/store/agent-approval.d.ts +5 -14
- package/lib/store/agent-approval.d.ts.map +1 -1
- package/lib/store/agent-approval.js.map +1 -1
- package/lib/store/agent-run.d.ts +57 -358
- package/lib/store/agent-run.d.ts.map +1 -1
- package/lib/store/collections.d.ts +11 -63
- package/lib/store/collections.d.ts.map +1 -1
- package/lib/store/collections.js.map +1 -1
- package/lib/store/conversation-state.d.ts +61 -61
- package/lib/store/conversation-state.d.ts.map +1 -1
- package/lib/store/conversation-state.js +2 -0
- package/lib/store/conversation-state.js.map +1 -1
- package/lib/store/doc-analyzer.d.ts +9 -32
- package/lib/store/doc-analyzer.d.ts.map +1 -1
- package/lib/store/dsl-workflow.d.ts +37 -151
- package/lib/store/dsl-workflow.d.ts.map +1 -1
- package/lib/store/dsl-workflow.js.map +1 -1
- package/lib/store/editing-policy-schema.generated.d.ts +3 -0
- package/lib/store/editing-policy-schema.generated.d.ts.map +1 -0
- package/lib/store/editing-policy-schema.generated.js +28 -0
- package/lib/store/editing-policy-schema.generated.js.map +1 -0
- package/lib/store/grounded-extraction.d.ts +7 -104
- package/lib/store/grounded-extraction.d.ts.map +1 -1
- package/lib/store/grounded-extraction.js.map +1 -1
- package/lib/store/index.d.ts +2 -0
- package/lib/store/index.d.ts.map +1 -1
- package/lib/store/index.js +3 -0
- package/lib/store/index.js.map +1 -1
- package/lib/store/intake-policy-schema.generated.d.ts +3 -0
- package/lib/store/intake-policy-schema.generated.d.ts.map +1 -0
- package/lib/store/intake-policy-schema.generated.js +1425 -0
- package/lib/store/intake-policy-schema.generated.js.map +1 -0
- package/lib/store/process-schema.d.ts +80 -0
- package/lib/store/process-schema.d.ts.map +1 -1
- package/lib/store/process-schema.js +79 -0
- package/lib/store/process-schema.js.map +1 -1
- package/lib/store/process-validation.d.ts.map +1 -1
- package/lib/store/process-validation.js +70 -2
- package/lib/store/process-validation.js.map +1 -1
- package/lib/store/process.d.ts +36 -125
- package/lib/store/process.d.ts.map +1 -1
- package/lib/store/process.js.map +1 -1
- package/lib/store/rendering.d.ts +9 -64
- package/lib/store/rendering.d.ts.map +1 -1
- package/lib/store/rendering.js.map +1 -1
- package/lib/store/store.d.ts +98 -700
- package/lib/store/store.d.ts.map +1 -1
- package/lib/store/store.js +4 -456
- package/lib/store/store.js.map +1 -1
- package/lib/store/task.d.ts +15 -59
- package/lib/store/task.d.ts.map +1 -1
- package/lib/store/task.js +0 -3
- package/lib/store/task.js.map +1 -1
- package/lib/store/workflow.d.ts +54 -518
- package/lib/store/workflow.d.ts.map +1 -1
- package/lib/store/workflow.js +23 -11
- package/lib/store/workflow.js.map +1 -1
- package/lib/sts-token-types.d.ts +12 -66
- package/lib/sts-token-types.d.ts.map +1 -1
- package/lib/sts-token-types.js.map +1 -1
- package/lib/tools.d.ts +8 -100
- package/lib/tools.d.ts.map +1 -1
- package/lib/transient-tokens-values.d.ts +11 -0
- package/lib/transient-tokens-values.d.ts.map +1 -0
- package/lib/transient-tokens-values.js +12 -0
- package/lib/transient-tokens-values.js.map +1 -0
- package/lib/transient-tokens.d.ts +15 -13
- package/lib/transient-tokens.d.ts.map +1 -1
- package/lib/transient-tokens.js +5 -5
- package/lib/transient-tokens.js.map +1 -1
- package/lib/user.d.ts +54 -155
- package/lib/user.d.ts.map +1 -1
- package/lib/user.js +1 -78
- package/lib/user.js.map +1 -1
- package/lib/versions.d.ts +24 -1
- package/lib/versions.d.ts.map +1 -1
- package/lib/versions.js +23 -0
- package/lib/versions.js.map +1 -1
- package/lib/vertesia-common.js +6 -2
- package/lib/vertesia-common.js.map +1 -1
- package/lib/views-schema.d.ts +4 -4
- package/lib/views.d.ts +56 -312
- package/lib/views.d.ts.map +1 -1
- package/lib/views.js.map +1 -1
- package/package.json +13 -4
- package/src/access-control-values.ts +113 -0
- package/src/access-control.ts +33 -138
- package/src/account-values.ts +95 -0
- package/src/analytics.ts +18 -42
- package/src/api-schemas/access-control.contract.test.ts +209 -0
- package/src/api-schemas/access-control.ts +208 -0
- package/src/api-schemas/account.contract.test.ts +318 -0
- package/src/api-schemas/account.ts +150 -0
- package/src/api-schemas/adapter-edge-cases.test.ts +480 -0
- package/src/api-schemas/adapter.ts +778 -0
- package/src/api-schemas/agent-runs.ts +1081 -0
- package/src/api-schemas/analytics.ts +65 -0
- package/src/api-schemas/apikey.contract.test.ts +270 -0
- package/src/api-schemas/apikey.ts +199 -0
- package/src/api-schemas/app-lifecycle.ts +841 -0
- package/src/api-schemas/app-runtime.ts +919 -0
- package/src/api-schemas/apps.ts +415 -0
- package/src/api-schemas/audit-trail.ts +243 -0
- package/src/api-schemas/bulk-operation.contract.test.ts +39 -0
- package/src/api-schemas/bulk-operation.ts +75 -0
- package/src/api-schemas/bundle-isolation.test.ts +80 -0
- package/src/api-schemas/commands.contract.test.ts +51 -0
- package/src/api-schemas/commands.ts +62 -0
- package/src/api-schemas/content.ts +939 -0
- package/src/api-schemas/cost-analytics.contract.test.ts +64 -0
- package/src/api-schemas/cost-analytics.ts +235 -0
- package/src/api-schemas/dashboard.contract.test.ts +127 -0
- package/src/api-schemas/dashboard.ts +351 -0
- package/src/api-schemas/data-store.contract.test.ts +91 -0
- package/src/api-schemas/data-store.ts +571 -0
- package/src/api-schemas/document-processing.contract.test.ts +76 -0
- package/src/api-schemas/document-processing.ts +344 -0
- package/src/api-schemas/embeddings.ts +113 -0
- package/src/api-schemas/environment.contract.test.ts +184 -0
- package/src/api-schemas/environment.ts +190 -0
- package/src/api-schemas/events.ts +921 -0
- package/src/api-schemas/files.ts +159 -0
- package/src/api-schemas/group.contract.test.ts +205 -0
- package/src/api-schemas/group.ts +155 -0
- package/src/api-schemas/index.ts +35 -0
- package/src/api-schemas/indexing.contract.test.ts +83 -0
- package/src/api-schemas/indexing.ts +234 -0
- package/src/api-schemas/integrations.ts +369 -0
- package/src/api-schemas/interaction.ts +2357 -0
- package/src/api-schemas/invites.contract.test.ts +268 -0
- package/src/api-schemas/invites.ts +127 -0
- package/src/api-schemas/llumiverse.contract.test.ts +108 -0
- package/src/api-schemas/oauth-server.ts +219 -0
- package/src/api-schemas/oauth.contract.test.ts +118 -0
- package/src/api-schemas/oauth.ts +166 -0
- package/src/api-schemas/parameters.test.ts +402 -0
- package/src/api-schemas/parameters.ts +310 -0
- package/src/api-schemas/process.ts +929 -0
- package/src/api-schemas/project-configuration.ts +478 -0
- package/src/api-schemas/project.contract.test.ts +365 -0
- package/src/api-schemas/project.ts +214 -0
- package/src/api-schemas/prompt.ts +88 -0
- package/src/api-schemas/pruning-limits.test.ts +189 -0
- package/src/api-schemas/quota.contract.test.ts +147 -0
- package/src/api-schemas/quota.ts +122 -0
- package/src/api-schemas/registry-groups.test.ts +91 -0
- package/src/api-schemas/registry.ts +3487 -0
- package/src/api-schemas/response-pruning.test.ts +260 -0
- package/src/api-schemas/schema-primitives.ts +12 -0
- package/src/api-schemas/secrets.ts +332 -0
- package/src/api-schemas/store.contract.test.ts +450 -0
- package/src/api-schemas/store.ts +604 -0
- package/src/api-schemas/sts.contract.test.ts +80 -0
- package/src/api-schemas/sts.ts +110 -0
- package/src/api-schemas/task.ts +104 -0
- package/src/api-schemas/tools.ts +140 -0
- package/src/api-schemas/user.contract.test.ts +191 -0
- package/src/api-schemas/user.ts +204 -0
- package/src/api-schemas/view-execution.ts +200 -0
- package/src/api-schemas/views.ts +437 -0
- package/src/api-schemas/workflow-runs.ts +653 -0
- package/src/apikey-values.ts +10 -0
- package/src/apikey.ts +49 -40
- package/src/apps.ts +234 -1213
- package/src/ask-user.ts +9 -1
- package/src/audit-trail.ts +45 -137
- package/src/browser-credentials.ts +21 -106
- package/src/common.ts +67 -78
- package/src/cost-analytics.ts +37 -176
- package/src/data-platform.ts +205 -776
- package/src/email.ts +5 -17
- package/src/embeddings.ts +22 -60
- package/src/environment.ts +52 -126
- package/src/facets.ts +4 -7
- package/src/group.ts +38 -42
- package/src/index.ts +11 -0
- package/src/integrations.ts +39 -129
- package/src/interaction-values.ts +23 -0
- package/src/interaction.ts +162 -902
- package/src/meters.ts +11 -7
- package/src/oauth-server.ts +58 -127
- package/src/oauth.ts +24 -108
- package/src/payload.ts +25 -40
- package/src/platform-event.ts +98 -484
- package/src/principal-context.ts +11 -15
- package/src/project-values.ts +41 -0
- package/src/project.ts +116 -588
- package/src/prompt.ts +34 -61
- package/src/query.ts +34 -93
- package/src/rate-limiter.ts +27 -75
- package/src/refs.ts +4 -11
- package/src/roles/types.ts +20 -20
- package/src/runs.ts +11 -24
- package/src/secrets.ts +38 -117
- package/src/store/agent-approval.ts +9 -14
- package/src/store/agent-run.ts +93 -450
- package/src/store/collections.ts +21 -63
- package/src/store/content-type-editing.test.ts +1 -1
- package/src/store/conversation-state.ts +75 -64
- package/src/store/doc-analyzer.ts +17 -33
- package/src/store/dsl-workflow.ts +62 -158
- package/src/store/editing-policy-schema.generated.ts +30 -0
- package/src/store/grounded-extraction.ts +13 -104
- package/src/store/index.ts +3 -0
- package/src/store/intake-policy-schema.generated.ts +1442 -0
- package/src/store/process-schema.test.ts +43 -0
- package/src/store/process-schema.ts +79 -0
- package/src/store/process-validation.test.ts +141 -0
- package/src/store/process-validation.ts +82 -2
- package/src/store/process.ts +70 -146
- package/src/store/rendering.ts +15 -64
- package/src/store/store.ts +197 -1204
- package/src/store/task.ts +25 -59
- package/src/store/workflow.ts +97 -557
- package/src/sts-token-types.ts +24 -75
- package/src/tools.ts +18 -97
- package/src/transient-tokens-values.ts +11 -0
- package/src/transient-tokens.ts +16 -13
- package/src/user.ts +74 -214
- package/src/versions.ts +24 -0
- package/src/views-schema.test.ts +9 -1
- package/src/views.ts +106 -329
package/src/store/store.ts
CHANGED
|
@@ -1,10 +1,90 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import type { ContentObjectTypeRefSchema } from '../api-schemas/app-lifecycle.js';
|
|
3
|
+
import type {
|
|
4
|
+
ComplexSearchPayloadSchema,
|
|
5
|
+
ContentObjectApiResponseSchema,
|
|
6
|
+
ContentObjectApiRevisionSchema,
|
|
7
|
+
ContentObjectApiTypeRefSchema,
|
|
8
|
+
ContentObjectExportArtifactFileSchema,
|
|
9
|
+
ContentObjectExportArtifactSchema,
|
|
10
|
+
ContentObjectExportProgressSchema,
|
|
11
|
+
ContentObjectExportResultSchema,
|
|
12
|
+
ContentObjectExportStatusResponseSchema,
|
|
13
|
+
ContentObjectItemApiResponseSchema,
|
|
14
|
+
ContentObjectTextResponseSchema,
|
|
15
|
+
ContentObjectUserPermissionsSchema,
|
|
16
|
+
ContentSourceSchema,
|
|
17
|
+
CreateContentObjectHeadersSchema,
|
|
18
|
+
CreateContentObjectPayloadSchema,
|
|
19
|
+
CreateContentObjectQuerySchema,
|
|
20
|
+
DeleteContentObjectExportResponseSchema,
|
|
21
|
+
DeleteContentObjectResultSchema,
|
|
22
|
+
EmbeddingSchema,
|
|
23
|
+
ExportContentObjectsFilterSchema,
|
|
24
|
+
ExportContentObjectsIncludeOptionsSchema,
|
|
25
|
+
GenerationRunMetadataSchema,
|
|
26
|
+
GetObjectRenditionQuerySchema,
|
|
27
|
+
GetRenditionResponseSchema,
|
|
28
|
+
InheritedPropertyMetadataSchema,
|
|
29
|
+
ListContentObjectExportsResponseSchema,
|
|
30
|
+
ObjectSearchResponseSchema,
|
|
31
|
+
RevisionInfoSchema,
|
|
32
|
+
SetObjectEmbeddingsResponseSchema,
|
|
33
|
+
StartContentObjectExportRequestSchema,
|
|
34
|
+
StartContentObjectExportResponseSchema,
|
|
35
|
+
TranscriptSchema,
|
|
36
|
+
TranscriptSegmentSchema,
|
|
37
|
+
UpdateContentObjectHeadersSchema,
|
|
38
|
+
UpdateContentObjectQuerySchema,
|
|
39
|
+
} from '../api-schemas/content.js';
|
|
40
|
+
import type { MarkdownRenditionFormatSchema } from '../api-schemas/document-processing.js';
|
|
41
|
+
import type {
|
|
42
|
+
CreateWorkflowRulePayloadSchema,
|
|
43
|
+
WorkflowRuleItemSchema,
|
|
44
|
+
WorkflowRuleSchema,
|
|
45
|
+
} from '../api-schemas/events.js';
|
|
46
|
+
import type {
|
|
47
|
+
BucketReadAccessStatusResponseSchema,
|
|
48
|
+
BulkUploadUrlsPayloadSchema,
|
|
49
|
+
BulkUploadUrlsResponseSchema,
|
|
50
|
+
CopyFilePayloadSchema,
|
|
51
|
+
CopyFileResponseSchema,
|
|
52
|
+
DeleteFileResultSchema,
|
|
53
|
+
EnsureBucketReadAccessPayloadSchema,
|
|
54
|
+
EnsureBucketReadAccessResponseSchema,
|
|
55
|
+
FileBucketResponseSchema,
|
|
56
|
+
FileDeleteQuerySchema,
|
|
57
|
+
FileListQuerySchema,
|
|
58
|
+
FileListResponseSchema,
|
|
59
|
+
FileMetadataQuerySchema,
|
|
60
|
+
FileMetadataResponseSchema,
|
|
61
|
+
FileMetadataUpdateResultSchema,
|
|
62
|
+
GetFileUrlPayloadSchema,
|
|
63
|
+
GetFileUrlResponseSchema,
|
|
64
|
+
GetUploadUrlPayloadSchema,
|
|
65
|
+
SetFileMetadataPayloadSchema,
|
|
66
|
+
} from '../api-schemas/files.js';
|
|
67
|
+
import type {
|
|
68
|
+
ColumnLayoutSchema,
|
|
69
|
+
ContentObjectTypeCatalogEntrySchema,
|
|
70
|
+
ContentObjectTypeCatalogQuerySchema,
|
|
71
|
+
ContentObjectTypeItemSchema,
|
|
72
|
+
ContentObjectTypeListQuerySchema,
|
|
73
|
+
ContentObjectTypeSchema,
|
|
74
|
+
ContentObjectTypeStatusSchema,
|
|
75
|
+
ContentTypeEditingPolicySchema,
|
|
76
|
+
ContentTypeExtractionGroundingPolicySchema,
|
|
77
|
+
ContentTypeExtractionGroundingReviewPolicySchema,
|
|
78
|
+
ContentTypeIntakePolicySchema,
|
|
79
|
+
CreateContentObjectTypePayloadSchema,
|
|
80
|
+
InCodeTypeDefinitionSchema,
|
|
81
|
+
IntakePageRangesSchema,
|
|
82
|
+
IntakePageScopeSchema,
|
|
83
|
+
IntakeVisionDetailSchema,
|
|
84
|
+
UpdateContentObjectTypePayloadSchema,
|
|
85
|
+
} from '../api-schemas/store.js';
|
|
4
86
|
import type { JSONObject } from '../json.js';
|
|
5
|
-
import type { SearchPayload } from '../payload.js';
|
|
6
87
|
import type { SupportedEmbeddingTypes } from '../project.js';
|
|
7
|
-
import type { ComplexSearchQuery } from '../query.js';
|
|
8
88
|
import type { BaseObject } from './common.js';
|
|
9
89
|
|
|
10
90
|
export enum ContentObjectApiHeaders {
|
|
@@ -18,39 +98,15 @@ export enum ContentObjectApiHeaders {
|
|
|
18
98
|
SUPPRESS_WORKFLOWS = 'x-suppress-workflows',
|
|
19
99
|
}
|
|
20
100
|
|
|
21
|
-
export
|
|
22
|
-
collection_id?: string;
|
|
23
|
-
processing_priority?: ContentObjectProcessingPriority;
|
|
24
|
-
}
|
|
101
|
+
export type CreateContentObjectQuery = z.infer<typeof CreateContentObjectQuerySchema>;
|
|
25
102
|
|
|
26
|
-
export
|
|
27
|
-
'x-collection-id'?: string;
|
|
28
|
-
'x-processing-priority'?: ContentObjectProcessingPriority;
|
|
29
|
-
}
|
|
103
|
+
export type CreateContentObjectHeaders = z.infer<typeof CreateContentObjectHeadersSchema>;
|
|
30
104
|
|
|
31
|
-
export
|
|
32
|
-
create_revision?: boolean;
|
|
33
|
-
revision_label?: string;
|
|
34
|
-
processing_priority?: ContentObjectProcessingPriority;
|
|
35
|
-
}
|
|
105
|
+
export type UpdateContentObjectQuery = z.infer<typeof UpdateContentObjectQuerySchema>;
|
|
36
106
|
|
|
37
|
-
export
|
|
38
|
-
'if-match'?: string;
|
|
39
|
-
'x-create-revision'?: boolean;
|
|
40
|
-
'x-revision-label'?: string;
|
|
41
|
-
'x-processing-priority'?: ContentObjectProcessingPriority;
|
|
42
|
-
/**
|
|
43
|
-
* @deprecated Events are now always emitted. This suppresses the Temporal-backed delivery targets (workflow, agent, and process) — webhook deliveries still fire.
|
|
44
|
-
*/
|
|
45
|
-
'x-suppress-workflows'?: boolean;
|
|
46
|
-
}
|
|
107
|
+
export type UpdateContentObjectHeaders = z.infer<typeof UpdateContentObjectHeadersSchema>;
|
|
47
108
|
|
|
48
|
-
export
|
|
49
|
-
block_on_generation?: boolean;
|
|
50
|
-
generate_if_missing?: boolean;
|
|
51
|
-
max_hw?: number;
|
|
52
|
-
sign_url?: boolean;
|
|
53
|
-
}
|
|
109
|
+
export type GetObjectRenditionQuery = z.infer<typeof GetObjectRenditionQuerySchema>;
|
|
54
110
|
|
|
55
111
|
/**
|
|
56
112
|
* Headers for Data Store API calls.
|
|
@@ -70,52 +126,11 @@ export enum ContentObjectStatus {
|
|
|
70
126
|
archived = 'archived',
|
|
71
127
|
}
|
|
72
128
|
|
|
73
|
-
export
|
|
74
|
-
model: string; //the model used to generate this embedding
|
|
75
|
-
values: number[];
|
|
76
|
-
etag?: string; // the etag of the text used for the embedding
|
|
77
|
-
}
|
|
129
|
+
export type Embedding = z.infer<typeof EmbeddingSchema>;
|
|
78
130
|
|
|
79
|
-
|
|
80
|
-
* Optional object context to include in content object export rows.
|
|
81
|
-
*/
|
|
82
|
-
export interface ExportContentObjectsIncludeOptions {
|
|
83
|
-
/**
|
|
84
|
-
* Include stored embeddings. Disabled by default for generic object exports.
|
|
85
|
-
*/
|
|
86
|
-
embeddings?: boolean;
|
|
87
|
-
/**
|
|
88
|
-
* Include content source metadata. Enabled by default.
|
|
89
|
-
*/
|
|
90
|
-
content?: boolean;
|
|
91
|
-
/**
|
|
92
|
-
* Include object lifecycle status. Enabled by default.
|
|
93
|
-
*/
|
|
94
|
-
status?: boolean;
|
|
95
|
-
/**
|
|
96
|
-
* Include object properties. Enabled by default.
|
|
97
|
-
*/
|
|
98
|
-
properties?: boolean;
|
|
99
|
-
/**
|
|
100
|
-
* Include technical object metadata. Disabled by default because metadata may be large.
|
|
101
|
-
*/
|
|
102
|
-
metadata?: boolean;
|
|
103
|
-
/**
|
|
104
|
-
* Include object revision details. Enabled by default.
|
|
105
|
-
*/
|
|
106
|
-
revision?: boolean;
|
|
107
|
-
}
|
|
131
|
+
export type ExportContentObjectsIncludeOptions = z.infer<typeof ExportContentObjectsIncludeOptionsSchema>;
|
|
108
132
|
|
|
109
|
-
|
|
110
|
-
* Bounded filters supported by the bulk content object export API.
|
|
111
|
-
*/
|
|
112
|
-
export interface ExportContentObjectsFilter {
|
|
113
|
-
types?: string[];
|
|
114
|
-
created_from?: string;
|
|
115
|
-
created_to?: string;
|
|
116
|
-
updated_from?: string;
|
|
117
|
-
updated_to?: string;
|
|
118
|
-
}
|
|
133
|
+
export type ExportContentObjectsFilter = z.infer<typeof ExportContentObjectsFilterSchema>;
|
|
119
134
|
|
|
120
135
|
/**
|
|
121
136
|
* Exported object identity and context for a single content object row.
|
|
@@ -146,34 +161,9 @@ export interface ExportedContentObjectRecord {
|
|
|
146
161
|
embeddings?: Partial<Record<SupportedEmbeddingTypes, Embedding>>;
|
|
147
162
|
}
|
|
148
163
|
|
|
149
|
-
export
|
|
150
|
-
/**
|
|
151
|
-
* Embedding types to export when include.embeddings is true. Defaults to all supported embedding types.
|
|
152
|
-
*/
|
|
153
|
-
embedding_types?: SupportedEmbeddingTypes[];
|
|
154
|
-
/**
|
|
155
|
-
* Explicit export filters. This intentionally does not accept the search API's full Mongo/search DSL.
|
|
156
|
-
*/
|
|
157
|
-
filter?: ExportContentObjectsFilter;
|
|
158
|
-
/**
|
|
159
|
-
* Include all revisions. Defaults to false, exporting only head revisions.
|
|
160
|
-
*/
|
|
161
|
-
all_revisions?: boolean;
|
|
162
|
-
/**
|
|
163
|
-
* Optional object context selectors.
|
|
164
|
-
*/
|
|
165
|
-
include?: ExportContentObjectsIncludeOptions;
|
|
166
|
-
/**
|
|
167
|
-
* Compress the export with gzip. Defaults to true.
|
|
168
|
-
*/
|
|
169
|
-
compression?: boolean;
|
|
170
|
-
}
|
|
164
|
+
export type StartContentObjectExportRequest = z.infer<typeof StartContentObjectExportRequestSchema>;
|
|
171
165
|
|
|
172
|
-
export
|
|
173
|
-
workflow_id: string;
|
|
174
|
-
run_id: string;
|
|
175
|
-
export_id: string;
|
|
176
|
-
}
|
|
166
|
+
export type StartContentObjectExportResponse = z.infer<typeof StartContentObjectExportResponseSchema>;
|
|
177
167
|
|
|
178
168
|
export interface ZenoBulkContentObjectExportRequest extends Omit<StartContentObjectExportRequest, 'compression'> {
|
|
179
169
|
tenant_id: string;
|
|
@@ -240,145 +230,36 @@ export interface ZenoBulkContentObjectExportComposeRequest extends ZenoBulkConte
|
|
|
240
230
|
started_at?: string;
|
|
241
231
|
}
|
|
242
232
|
|
|
243
|
-
export
|
|
244
|
-
status: 'completed';
|
|
245
|
-
path: string;
|
|
246
|
-
filename: string;
|
|
247
|
-
content_type: string;
|
|
248
|
-
manifest_path?: string;
|
|
249
|
-
manifest_filename?: string;
|
|
250
|
-
manifest_content_type?: string;
|
|
251
|
-
manifest_bytes?: number;
|
|
252
|
-
records: number;
|
|
253
|
-
bytes: number;
|
|
254
|
-
started_at: string;
|
|
255
|
-
completed_at: string;
|
|
256
|
-
duration_ms: number;
|
|
257
|
-
}
|
|
233
|
+
export type ContentObjectExportResult = z.infer<typeof ContentObjectExportResultSchema>;
|
|
258
234
|
|
|
259
|
-
export
|
|
260
|
-
status: 'queued' | 'planning' | 'exporting' | 'composing' | 'completed' | 'failed';
|
|
261
|
-
records: number;
|
|
262
|
-
bytes: number;
|
|
263
|
-
path?: string;
|
|
264
|
-
filename?: string;
|
|
265
|
-
completed_shards?: number;
|
|
266
|
-
total_shards?: number;
|
|
267
|
-
started_at?: string;
|
|
268
|
-
completed_at?: string;
|
|
269
|
-
error?: string;
|
|
270
|
-
}
|
|
235
|
+
export type ContentObjectExportProgress = z.infer<typeof ContentObjectExportProgressSchema>;
|
|
271
236
|
|
|
272
|
-
export
|
|
273
|
-
workflow_id: string;
|
|
274
|
-
run_id: string;
|
|
275
|
-
status: 'queued' | 'running' | 'completed' | 'failed' | 'canceled' | 'terminated' | 'timed_out' | 'unknown';
|
|
276
|
-
done: boolean;
|
|
277
|
-
progress?: ContentObjectExportProgress;
|
|
278
|
-
result?: ContentObjectExportResult;
|
|
279
|
-
error?: string;
|
|
280
|
-
}
|
|
237
|
+
export type ContentObjectExportStatusResponse = z.infer<typeof ContentObjectExportStatusResponseSchema>;
|
|
281
238
|
|
|
282
|
-
export
|
|
283
|
-
export_id: string;
|
|
284
|
-
path: string;
|
|
285
|
-
filename: string;
|
|
286
|
-
content_type: string;
|
|
287
|
-
bytes: number;
|
|
288
|
-
created_at?: string;
|
|
289
|
-
files?: ContentObjectExportArtifactFile[];
|
|
290
|
-
}
|
|
239
|
+
export type ContentObjectExportArtifact = z.infer<typeof ContentObjectExportArtifactSchema>;
|
|
291
240
|
|
|
292
|
-
export
|
|
293
|
-
role: 'data' | 'manifest';
|
|
294
|
-
path: string;
|
|
295
|
-
filename: string;
|
|
296
|
-
content_type: string;
|
|
297
|
-
bytes: number;
|
|
298
|
-
}
|
|
241
|
+
export type ContentObjectExportArtifactFile = z.infer<typeof ContentObjectExportArtifactFileSchema>;
|
|
299
242
|
|
|
300
|
-
export
|
|
301
|
-
items: ContentObjectExportArtifact[];
|
|
302
|
-
limit: number;
|
|
303
|
-
}
|
|
243
|
+
export type ListContentObjectExportsResponse = z.infer<typeof ListContentObjectExportsResponseSchema>;
|
|
304
244
|
|
|
305
|
-
export
|
|
306
|
-
success: boolean;
|
|
307
|
-
export_id: string;
|
|
308
|
-
path: string;
|
|
309
|
-
}
|
|
245
|
+
export type DeleteContentObjectExportResponse = z.infer<typeof DeleteContentObjectExportResponseSchema>;
|
|
310
246
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
*/
|
|
314
|
-
export interface InheritedPropertyMetadata {
|
|
315
|
-
/** The property name that was inherited */
|
|
316
|
-
name: string;
|
|
317
|
-
/** The collection ID that provided this property */
|
|
318
|
-
collection: string;
|
|
319
|
-
}
|
|
320
|
-
/**
|
|
321
|
-
* Computed per-request permissions for the current user on a content object.
|
|
322
|
-
* Not stored in the database — computed on the fly by the API from the object's security field.
|
|
323
|
-
*/
|
|
324
|
-
export interface ContentObjectUserPermissions {
|
|
325
|
-
can_write: boolean;
|
|
326
|
-
can_delete: boolean;
|
|
327
|
-
}
|
|
247
|
+
export type InheritedPropertyMetadata = z.infer<typeof InheritedPropertyMetadataSchema>;
|
|
248
|
+
export type ContentObjectUserPermissions = z.infer<typeof ContentObjectUserPermissionsSchema>;
|
|
328
249
|
|
|
329
|
-
export
|
|
330
|
-
text?: string;
|
|
331
|
-
}
|
|
250
|
+
export type ContentObjectTextResponse = z.infer<typeof ContentObjectTextResponseSchema>;
|
|
332
251
|
|
|
333
|
-
export
|
|
334
|
-
id: string;
|
|
335
|
-
count: number;
|
|
336
|
-
}
|
|
252
|
+
export type DeleteContentObjectResult = z.infer<typeof DeleteContentObjectResultSchema>;
|
|
337
253
|
|
|
338
|
-
export
|
|
339
|
-
type?: Embedding;
|
|
340
|
-
}
|
|
254
|
+
export type SetObjectEmbeddingsResponse = z.infer<typeof SetObjectEmbeddingsResponseSchema>;
|
|
341
255
|
|
|
342
|
-
export type ContentObjectApiTypeRef =
|
|
256
|
+
export type ContentObjectApiTypeRef = z.infer<typeof ContentObjectApiTypeRefSchema>;
|
|
343
257
|
|
|
344
|
-
export
|
|
345
|
-
parent?: string;
|
|
346
|
-
root: string;
|
|
347
|
-
head: boolean;
|
|
348
|
-
label?: string;
|
|
349
|
-
}
|
|
258
|
+
export type ContentObjectApiRevision = z.infer<typeof ContentObjectApiRevisionSchema>;
|
|
350
259
|
|
|
351
|
-
export
|
|
352
|
-
parent?: string;
|
|
353
|
-
location: string;
|
|
354
|
-
status: ContentObjectStatus;
|
|
355
|
-
type?: ContentObjectApiTypeRef;
|
|
356
|
-
content?: ContentSource;
|
|
357
|
-
external_id?: string;
|
|
358
|
-
properties: JSONObject;
|
|
359
|
-
metadata?: Record<string, unknown>;
|
|
360
|
-
tokens?: {
|
|
361
|
-
count?: number;
|
|
362
|
-
encoding?: string;
|
|
363
|
-
etag?: string;
|
|
364
|
-
};
|
|
365
|
-
revision: ContentObjectApiRevision;
|
|
366
|
-
is_deleted?: boolean;
|
|
367
|
-
is_locked?: boolean;
|
|
368
|
-
score?: number;
|
|
369
|
-
user_permissions?: ContentObjectUserPermissions;
|
|
370
|
-
}
|
|
260
|
+
export type ContentObjectItemApiResponse = z.infer<typeof ContentObjectItemApiResponseSchema>;
|
|
371
261
|
|
|
372
|
-
export
|
|
373
|
-
text?: string;
|
|
374
|
-
text_etag?: string;
|
|
375
|
-
embeddings?: Record<string, Embedding>;
|
|
376
|
-
parts?: string[];
|
|
377
|
-
parts_etag?: string;
|
|
378
|
-
transcript?: Record<string, unknown>;
|
|
379
|
-
security?: Record<string, string[]>;
|
|
380
|
-
inherited_properties?: InheritedPropertyMetadata[];
|
|
381
|
-
}
|
|
262
|
+
export type ContentObjectApiResponse = z.infer<typeof ContentObjectApiResponseSchema>;
|
|
382
263
|
|
|
383
264
|
export interface ContentObject<T = JSONObject> extends ContentObjectItem<T> {
|
|
384
265
|
text?: string; // the text representation of the object
|
|
@@ -419,18 +300,7 @@ export interface Location {
|
|
|
419
300
|
longitude: number;
|
|
420
301
|
}
|
|
421
302
|
|
|
422
|
-
export
|
|
423
|
-
id: string;
|
|
424
|
-
date: string;
|
|
425
|
-
model: string;
|
|
426
|
-
target?: string;
|
|
427
|
-
/**
|
|
428
|
-
* Fingerprint of the inputs used by property extraction (content etag, type + its object
|
|
429
|
-
* schema, source, instructions, interaction). Lets a later run skip re-extraction when
|
|
430
|
-
* nothing changed.
|
|
431
|
-
*/
|
|
432
|
-
extraction_fingerprint?: string;
|
|
433
|
-
}
|
|
303
|
+
export type GenerationRunMetadata = z.infer<typeof GenerationRunMetadataSchema>;
|
|
434
304
|
|
|
435
305
|
// Base rendition interface for document and audio
|
|
436
306
|
export interface Rendition {
|
|
@@ -609,11 +479,7 @@ export interface GroundedMetadata {
|
|
|
609
479
|
[key: string]: unknown;
|
|
610
480
|
}
|
|
611
481
|
|
|
612
|
-
export
|
|
613
|
-
text?: string;
|
|
614
|
-
segments?: TranscriptSegment[];
|
|
615
|
-
etag?: string;
|
|
616
|
-
}
|
|
482
|
+
export type Transcript = z.infer<typeof TranscriptSchema>;
|
|
617
483
|
|
|
618
484
|
export const TextExtractionStatus = {
|
|
619
485
|
success: 'success',
|
|
@@ -626,48 +492,11 @@ export interface TranscriptMediaResult {
|
|
|
626
492
|
gladiaTranscriptionId?: string;
|
|
627
493
|
}
|
|
628
494
|
|
|
629
|
-
export
|
|
630
|
-
start: number;
|
|
631
|
-
text: string;
|
|
632
|
-
speaker?: number;
|
|
633
|
-
end?: number;
|
|
634
|
-
confidence?: number;
|
|
635
|
-
language?: string;
|
|
636
|
-
}
|
|
495
|
+
export type TranscriptSegment = z.infer<typeof TranscriptSegmentSchema>;
|
|
637
496
|
|
|
638
|
-
export
|
|
639
|
-
// the URI of the content source. Usually an URL to the uploaded file inside a cloud file storage like s3.
|
|
640
|
-
source?: string;
|
|
641
|
-
// the mime type of the content source.
|
|
642
|
-
type?: string;
|
|
643
|
-
// the original name of the input file if any
|
|
644
|
-
name?: string;
|
|
645
|
-
// the etag of the content source if any
|
|
646
|
-
etag?: string;
|
|
647
|
-
}
|
|
497
|
+
export type ContentSource = z.infer<typeof ContentSourceSchema>;
|
|
648
498
|
|
|
649
|
-
|
|
650
|
-
*
|
|
651
|
-
*/
|
|
652
|
-
export interface RevisionInfo {
|
|
653
|
-
/** Direct parent revision id (omit on the first revision) */
|
|
654
|
-
parent?: string;
|
|
655
|
-
|
|
656
|
-
/** The root revision id (omit on the first revision) */
|
|
657
|
-
root: string;
|
|
658
|
-
|
|
659
|
-
/** True if this revision is the head revision */
|
|
660
|
-
head: boolean;
|
|
661
|
-
|
|
662
|
-
/** Human‑friendly tag or state ("v1.2", "approved") */
|
|
663
|
-
label?: string;
|
|
664
|
-
|
|
665
|
-
/** Extra parents when two branches are merged (leave undefined until needed) */
|
|
666
|
-
//merge_parents?: string[]; //maybe later
|
|
667
|
-
|
|
668
|
-
/** Pointer to a diff / patch blob if you store deltas instead of full content */
|
|
669
|
-
//delta_ref?: string;
|
|
670
|
-
}
|
|
499
|
+
export type RevisionInfo = z.infer<typeof RevisionInfoSchema>;
|
|
671
500
|
|
|
672
501
|
/**
|
|
673
502
|
* The content object item is a simplified version of the ContentObject that is returned by the store API when listing objects.
|
|
@@ -750,15 +579,15 @@ export interface ContentObjectItem<T = JSONObject> extends BaseObject {
|
|
|
750
579
|
user_permissions?: ContentObjectUserPermissions;
|
|
751
580
|
}
|
|
752
581
|
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
}
|
|
582
|
+
type CreateContentObjectPayloadWire = z.infer<typeof CreateContentObjectPayloadSchema>;
|
|
583
|
+
export type CreateContentObjectPayload<T = JSONObject> = Omit<
|
|
584
|
+
CreateContentObjectPayloadWire,
|
|
585
|
+
'properties' | 'metadata'
|
|
586
|
+
> & {
|
|
587
|
+
properties?: T;
|
|
588
|
+
/** Known metadata interfaces remain assignable; the runtime contract deliberately accepts any object keys. */
|
|
589
|
+
metadata?: ContentObjectItem['metadata'];
|
|
590
|
+
};
|
|
762
591
|
|
|
763
592
|
type LegacyContentObjectTypeRef = Partial<ContentObjectTypeRef> & {
|
|
764
593
|
ref_type?: 'stored' | 'incode';
|
|
@@ -783,92 +612,27 @@ export function withContentObjectTypeRefDiscriminator(
|
|
|
783
612
|
return { ref_type: 'stored', id, name };
|
|
784
613
|
}
|
|
785
614
|
|
|
786
|
-
|
|
787
|
-
* Reference to a content object type. `id` is the canonical identifier for both
|
|
788
|
-
* stored and in-code types.
|
|
789
|
-
*/
|
|
790
|
-
/**
|
|
791
|
-
* @discriminator ref_type
|
|
792
|
-
*/
|
|
793
|
-
export type ContentObjectTypeRef = StoredTypeRef | InCodeTypeRef;
|
|
794
|
-
|
|
795
|
-
interface StoredTypeRef {
|
|
796
|
-
ref_type: 'stored';
|
|
797
|
-
/**
|
|
798
|
-
* MongoDB ObjectId string for stored types
|
|
799
|
-
*/
|
|
800
|
-
id: string;
|
|
801
|
-
name: string;
|
|
802
|
-
/**
|
|
803
|
-
* Display hint from the type's intake policy (`intake.default_view`). Enriched by the
|
|
804
|
-
* API on single-object reads so clients can pick the initial view without fetching the
|
|
805
|
-
* type. Absent on list responses and older servers.
|
|
806
|
-
*/
|
|
807
|
-
default_view?: ContentTypeIntakePolicy['default_view'];
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
interface InCodeTypeRef {
|
|
811
|
-
ref_type: 'incode';
|
|
812
|
-
/**
|
|
813
|
-
* Namespaced identifier for in-code types (e.g. "sys:Invoice", "app:myapp:Contract")
|
|
814
|
-
*/
|
|
815
|
-
id: string;
|
|
816
|
-
name: string;
|
|
817
|
-
/**
|
|
818
|
-
* Display hint from the type's intake policy (`intake.default_view`). Enriched by the
|
|
819
|
-
* API on single-object reads so clients can pick the initial view without fetching the
|
|
820
|
-
* type. Absent on list responses and older servers.
|
|
821
|
-
*/
|
|
822
|
-
default_view?: ContentTypeIntakePolicy['default_view'];
|
|
823
|
-
}
|
|
615
|
+
export type ContentObjectTypeRef = z.infer<typeof ContentObjectTypeRefSchema>;
|
|
824
616
|
|
|
825
|
-
export
|
|
826
|
-
query?: ComplexSearchQuery;
|
|
827
|
-
}
|
|
617
|
+
export type ComplexSearchPayload = z.infer<typeof ComplexSearchPayloadSchema>;
|
|
828
618
|
|
|
829
|
-
export
|
|
830
|
-
/**
|
|
831
|
-
* The path of the field to use (e.g. "properties.title")
|
|
832
|
-
*/
|
|
833
|
-
field: string;
|
|
834
|
-
/**
|
|
835
|
-
* The name to display in the table column
|
|
836
|
-
*/
|
|
837
|
-
name: string;
|
|
838
|
-
/**
|
|
839
|
-
* The type of the field specifies how the rendering will be done. If not specified the string type will be used.
|
|
840
|
-
* The type may contain additional parameters prepended using a web-like query string syntax: date?LLL
|
|
841
|
-
*/
|
|
842
|
-
type?: string;
|
|
843
|
-
/*
|
|
844
|
-
* a fallback field to use if the field is not present in the object
|
|
845
|
-
*/
|
|
846
|
-
fallback?: string;
|
|
847
|
-
/**
|
|
848
|
-
* A default value to be used if the field is not present in the object
|
|
849
|
-
*/
|
|
850
|
-
default?: unknown;
|
|
851
|
-
}
|
|
619
|
+
export type ColumnLayout = z.infer<typeof ColumnLayoutSchema>;
|
|
852
620
|
|
|
853
|
-
export type ContentObjectTypeStatus =
|
|
621
|
+
export type ContentObjectTypeStatus = z.infer<typeof ContentObjectTypeStatusSchema>;
|
|
854
622
|
|
|
855
|
-
|
|
856
|
-
* names (dpi, max size, quality, color mode) are PLATFORM-defined and project-overridable —
|
|
857
|
-
* a type only ever references a detail name. */
|
|
858
|
-
export type IntakeVisionDetail = 'low' | 'standard' | 'high';
|
|
623
|
+
export type IntakeVisionDetail = z.infer<typeof IntakeVisionDetailSchema>;
|
|
859
624
|
|
|
860
|
-
|
|
861
|
-
* Named page scope for intake conversion/extraction: everything or the locate-pass result.
|
|
862
|
-
* Static page ranges live in the sibling `page_ranges` field (which wins when set) — kept as
|
|
863
|
-
* a SEPARATE field because scalar-or-collection unions generate unstable API clients.
|
|
864
|
-
*/
|
|
865
|
-
export type IntakePageScope = 'all' | 'located';
|
|
625
|
+
export type IntakePageScope = z.infer<typeof IntakePageScopeSchema>;
|
|
866
626
|
|
|
867
627
|
/**
|
|
868
|
-
*
|
|
869
|
-
*
|
|
628
|
+
* Inclusive `[start, end]` pairs.
|
|
629
|
+
*
|
|
630
|
+
* Inferred as `number[][]` rather than the `[number, number][]` this used to declare: the published
|
|
631
|
+
* component is a uniform-items array with `minItems`/`maxItems`, which is what the scanner made of the
|
|
632
|
+
* tuple, and reproducing it is what keeps the generated clients unchanged. The length is still
|
|
633
|
+
* enforced at runtime.
|
|
870
634
|
*/
|
|
871
|
-
export type IntakePageRanges =
|
|
635
|
+
export type IntakePageRanges = z.infer<typeof IntakePageRangesSchema>;
|
|
872
636
|
|
|
873
637
|
/** Rendering settings behind a vision detail name (platform defaults, project-overridable
|
|
874
638
|
* via `configuration.intake.vision_profiles`). */
|
|
@@ -883,674 +647,31 @@ export interface IntakeVisionProfileSettings {
|
|
|
883
647
|
color_mode: 'grayscale' | 'auto';
|
|
884
648
|
}
|
|
885
649
|
|
|
886
|
-
export
|
|
887
|
-
|
|
888
|
-
enabled?: boolean;
|
|
889
|
-
/** Model execution configuration for the review interaction. */
|
|
890
|
-
config?: InteractionExecutionConfiguration;
|
|
891
|
-
/** Hardness score at or above which review runs. Defaults to hardness_threshold. */
|
|
892
|
-
threshold?: number;
|
|
893
|
-
/**
|
|
894
|
-
* Review also runs when any page's citation coverage falls below this
|
|
895
|
-
* floor (evidence of missed content). Default 0.2.
|
|
896
|
-
*/
|
|
897
|
-
coverage_threshold?: number;
|
|
898
|
-
/** Run review regardless of hardness. */
|
|
899
|
-
force?: boolean;
|
|
900
|
-
}
|
|
901
|
-
|
|
902
|
-
export interface ContentTypeExtractionGroundingPolicy {
|
|
903
|
-
/** Enable PDF block-level citation grounding for property extraction. */
|
|
904
|
-
enabled?: boolean;
|
|
905
|
-
/** Grounded extraction interaction. Defaults to the system grounded extractor. */
|
|
906
|
-
interaction?: string;
|
|
907
|
-
/** Maximum pages to process. */
|
|
908
|
-
max_pages?: number;
|
|
909
|
-
/** Run OCR on every page even when a text layer exists. */
|
|
910
|
-
force_ocr?: boolean;
|
|
911
|
-
/** Attach instrumented page images to the grounded extraction prompt. */
|
|
912
|
-
use_vision?: boolean;
|
|
913
|
-
/**
|
|
914
|
-
* How to read pages with no digital text layer (scans / image-only pages).
|
|
915
|
-
* 'vision' (default): read them off the page image and skip OCR. 'ocr': legacy
|
|
916
|
-
* path — OCR those pages and block-ground on the (lossy) OCR text.
|
|
917
|
-
*/
|
|
918
|
-
raster_mode?: 'vision' | 'ocr';
|
|
919
|
-
/**
|
|
920
|
-
* A1 locate-grid cell size in PDF points for vision pages. Smaller = finer grid
|
|
921
|
-
* (more cells, tighter boxes) but can trip weaker models into over-reading;
|
|
922
|
-
* tune per the model in `config`. Default 15.
|
|
923
|
-
*/
|
|
924
|
-
grid_cell_pt?: number;
|
|
925
|
-
/**
|
|
926
|
-
* Drop block bounding boxes from the extraction prompt. Only sound with
|
|
927
|
-
* use_vision (layout comes from the image).
|
|
928
|
-
*/
|
|
929
|
-
omit_block_boxes?: boolean;
|
|
930
|
-
/** Maximum pages per grounded extraction call before windowing. */
|
|
931
|
-
window_pages?: number;
|
|
932
|
-
/** Update object properties with grounded extraction data. Default true. */
|
|
933
|
-
update_properties?: boolean;
|
|
934
|
-
/** Model execution configuration for the main grounded extraction interaction. */
|
|
935
|
-
config?: InteractionExecutionConfiguration;
|
|
936
|
-
/** Model execution configuration used for hard-to-read content. */
|
|
937
|
-
hard_config?: InteractionExecutionConfiguration;
|
|
938
|
-
/** Hardness score at or above which hard_config is used. Default 0.5. */
|
|
939
|
-
hardness_threshold?: number;
|
|
940
|
-
/**
|
|
941
|
-
* Minimum citations-per-leaf-value ratio; completions below it retry with
|
|
942
|
-
* escalation. Default 0.3.
|
|
943
|
-
*/
|
|
944
|
-
min_citation_density?: number;
|
|
945
|
-
/** Re-run OCR instead of restoring durable OCR artifacts (stale pipeline output). */
|
|
946
|
-
refresh_ocr?: boolean;
|
|
947
|
-
/** Optional post-extraction review pass. */
|
|
948
|
-
review?: ContentTypeExtractionGroundingReviewPolicy;
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
/**
|
|
952
|
-
* Per-content-type policy for the standard intake workflows.
|
|
953
|
-
*/
|
|
954
|
-
export interface ContentTypeIntakePolicy {
|
|
955
|
-
/** Intake orchestration mode for this type. */
|
|
956
|
-
mode?: 'programmatic' | 'agentic';
|
|
957
|
-
/** Guidance used when selecting or creating this content type. */
|
|
958
|
-
identification?: {
|
|
959
|
-
guidance?: string;
|
|
960
|
-
distinguish_from?: string;
|
|
961
|
-
examples?: string[];
|
|
962
|
-
};
|
|
963
|
-
/**
|
|
964
|
-
* Document-map ("locate") pass: page thumbnails tiled into labeled contact sheets, one
|
|
965
|
-
* vision call returns which pages matter for THIS type. The result can scope conversion
|
|
966
|
-
* and extraction, and doubles as the vision planner for visual extraction.
|
|
967
|
-
*/
|
|
968
|
-
locate?: {
|
|
969
|
-
/** What to look for ("commercial terms, payment schedule, signature pages"). */
|
|
970
|
-
instructions: string;
|
|
971
|
-
/** Pages per contact sheet: 8 = bigger tiles (headings readable). Default 16. */
|
|
972
|
-
detail?: 8 | 16;
|
|
973
|
-
/** Only run when the page count is at least this. Default 8. */
|
|
974
|
-
min_pages?: number;
|
|
975
|
-
};
|
|
976
|
-
/** Controls source-to-text conversion before extraction and embedding. */
|
|
977
|
-
text_conversion?: {
|
|
978
|
-
enabled?: boolean;
|
|
979
|
-
method?: 'auto' | 'basic' | 'llm' | 'custom';
|
|
980
|
-
custom?: {
|
|
981
|
-
interaction?: string;
|
|
982
|
-
agent?: string;
|
|
983
|
-
};
|
|
984
|
-
instructions?: string;
|
|
985
|
-
output_format?: 'markdown' | 'text';
|
|
986
|
-
/** Which pages to convert: everything or the locate result. Default all. */
|
|
987
|
-
scope?: IntakePageScope;
|
|
988
|
-
/** Static page ranges to convert (wins over `scope` when set). */
|
|
989
|
-
page_ranges?: IntakePageRanges;
|
|
990
|
-
};
|
|
991
|
-
/** Controls schema-property extraction after type assignment. */
|
|
992
|
-
extraction?: {
|
|
993
|
-
enabled?: boolean;
|
|
994
|
-
source?: 'auto' | 'text' | 'vision' | 'mixed';
|
|
995
|
-
instructions?: string;
|
|
996
|
-
interaction?: string;
|
|
997
|
-
/** Which pages extraction sees: everything or the locate result. */
|
|
998
|
-
scope?: IntakePageScope;
|
|
999
|
-
/** Static page ranges extraction sees (wins over `scope` when set). */
|
|
1000
|
-
page_ranges?: IntakePageRanges;
|
|
1001
|
-
/** Cap on pages sent to extraction. Default 20. */
|
|
1002
|
-
max_pages?: number;
|
|
1003
|
-
/** Vision evidence budget for visual extraction. Detail names reference platform
|
|
1004
|
-
* profiles; the type never defines dpi/quality/resolution. */
|
|
1005
|
-
vision?: {
|
|
1006
|
-
default_detail?: IntakeVisionDetail;
|
|
1007
|
-
allowed_details?: IntakeVisionDetail[];
|
|
1008
|
-
/** PRIMARY budget: estimated image tokens per extraction call. Default 16000. */
|
|
1009
|
-
max_image_tokens?: number;
|
|
1010
|
-
/** Transport guard in megabytes. Default 16. */
|
|
1011
|
-
max_payload_mb?: number;
|
|
1012
|
-
/** Cap on page images per extraction call. Default 8. */
|
|
1013
|
-
max_pages_per_call?: number;
|
|
1014
|
-
};
|
|
1015
|
-
verification?: {
|
|
1016
|
-
enabled?: boolean;
|
|
1017
|
-
model?: string;
|
|
1018
|
-
environment?: string;
|
|
1019
|
-
materiality?: string;
|
|
1020
|
-
threshold?: number;
|
|
1021
|
-
max_retries?: number;
|
|
1022
|
-
on_fail?: 'flag' | 'block';
|
|
1023
|
-
};
|
|
1024
|
-
/** Controls PDF block-level citation grounding with annotated proof output. */
|
|
1025
|
-
grounding?: ContentTypeExtractionGroundingPolicy;
|
|
1026
|
-
};
|
|
1027
|
-
/** Handlebars template used to materialize extracted properties into object text. */
|
|
1028
|
-
rendering_template?: string;
|
|
1029
|
-
/** Per-type embedding switches. Unspecified values inherit the project policy. */
|
|
1030
|
-
embeddings?: Partial<Record<SupportedEmbeddingTypes, boolean>>;
|
|
1031
|
-
/** Whether intake should generate a table of contents for matching documents. */
|
|
1032
|
-
generate_toc?: boolean;
|
|
1033
|
-
/** Preferred first view for objects of this type. */
|
|
1034
|
-
default_view?: 'auto' | 'text' | 'pdf' | 'image' | 'properties';
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
|
-
/** Per-content-type policy for collaborative document editing. */
|
|
1038
|
-
export interface ContentTypeEditingPolicy {
|
|
1039
|
-
/** Agent interaction used for new document-editing sessions. Defaults to sys:GeneralAgent. */
|
|
1040
|
-
interaction?: string;
|
|
1041
|
-
}
|
|
1042
|
-
|
|
1043
|
-
export const ContentTypeEditingPolicySchema: JSONSchemaType<ContentTypeEditingPolicy> = {
|
|
1044
|
-
type: 'object',
|
|
1045
|
-
description: 'Per-content-type policy for collaborative document editing.',
|
|
1046
|
-
required: [],
|
|
1047
|
-
additionalProperties: false,
|
|
1048
|
-
properties: {
|
|
1049
|
-
interaction: {
|
|
1050
|
-
type: 'string',
|
|
1051
|
-
description: 'Agent interaction used for new document-editing sessions. Omit to use sys:GeneralAgent.',
|
|
1052
|
-
nullable: true,
|
|
1053
|
-
},
|
|
1054
|
-
},
|
|
1055
|
-
};
|
|
1056
|
-
|
|
1057
|
-
/** Reusable sub-schema for IntakePageScope ('all' | 'located'). */
|
|
1058
|
-
const IntakePageScopeSchema = {
|
|
1059
|
-
type: 'string',
|
|
1060
|
-
enum: ['all', 'located'],
|
|
1061
|
-
description: "Named pages selection: 'all' or 'located' (the locate-pass result). Default all.",
|
|
1062
|
-
nullable: true,
|
|
1063
|
-
};
|
|
1064
|
-
|
|
1065
|
-
/** Reusable sub-schema for IntakePageRanges (inclusive [start, end] pairs, negative = from end). */
|
|
1066
|
-
const IntakePageRangesSchema = {
|
|
1067
|
-
type: 'array',
|
|
1068
|
-
items: { type: 'array', items: { type: 'integer' }, minItems: 2, maxItems: 2 },
|
|
1069
|
-
description:
|
|
1070
|
-
'Static inclusive [start, end] page ranges; negative indexes count from the end ' +
|
|
1071
|
-
'([[1,2],[-1,-1]] = first two pages plus the last). Wins over scope when set.',
|
|
1072
|
-
nullable: true,
|
|
1073
|
-
};
|
|
1074
|
-
|
|
1075
|
-
const IntakeExecutionConfigurationSchema = {
|
|
1076
|
-
type: 'object',
|
|
1077
|
-
description: 'Interaction execution configuration such as model, environment, and model options.',
|
|
1078
|
-
nullable: true,
|
|
1079
|
-
required: [],
|
|
1080
|
-
additionalProperties: true,
|
|
1081
|
-
properties: {
|
|
1082
|
-
id: { type: 'string', nullable: true },
|
|
1083
|
-
environment: { type: 'string', nullable: true },
|
|
1084
|
-
model: { type: 'string', nullable: true },
|
|
1085
|
-
do_validate: { type: 'boolean', nullable: true },
|
|
1086
|
-
run_data: { type: 'string', nullable: true },
|
|
1087
|
-
configMode: { type: 'string', nullable: true },
|
|
1088
|
-
model_options: {
|
|
1089
|
-
type: 'object',
|
|
1090
|
-
nullable: true,
|
|
1091
|
-
required: [],
|
|
1092
|
-
additionalProperties: true,
|
|
1093
|
-
},
|
|
1094
|
-
http_timeout: {
|
|
1095
|
-
type: 'object',
|
|
1096
|
-
nullable: true,
|
|
1097
|
-
required: [],
|
|
1098
|
-
additionalProperties: true,
|
|
1099
|
-
},
|
|
1100
|
-
},
|
|
1101
|
-
};
|
|
1102
|
-
|
|
1103
|
-
const ContentTypeExtractionGroundingPolicySchema = {
|
|
1104
|
-
type: 'object',
|
|
1105
|
-
description:
|
|
1106
|
-
'PDF block-level citation grounding policy. When enabled, property extraction uses the grounded ' +
|
|
1107
|
-
'child workflow and stores citations plus annotated proof output.',
|
|
1108
|
-
nullable: true,
|
|
1109
|
-
required: [],
|
|
1110
|
-
additionalProperties: false,
|
|
1111
|
-
properties: {
|
|
1112
|
-
enabled: {
|
|
1113
|
-
type: 'boolean',
|
|
1114
|
-
description: 'Enable PDF block-level citation grounding for this type.',
|
|
1115
|
-
nullable: true,
|
|
1116
|
-
},
|
|
1117
|
-
interaction: {
|
|
1118
|
-
type: 'string',
|
|
1119
|
-
description: 'Grounded extraction interaction id. Omit to use the system grounded extractor.',
|
|
1120
|
-
nullable: true,
|
|
1121
|
-
},
|
|
1122
|
-
max_pages: {
|
|
1123
|
-
type: 'integer',
|
|
1124
|
-
minimum: 1,
|
|
1125
|
-
description: 'Maximum pages to process.',
|
|
1126
|
-
nullable: true,
|
|
1127
|
-
},
|
|
1128
|
-
force_ocr: {
|
|
1129
|
-
type: 'boolean',
|
|
1130
|
-
description: 'Run OCR on every page even when a text layer exists.',
|
|
1131
|
-
nullable: true,
|
|
1132
|
-
},
|
|
1133
|
-
use_vision: {
|
|
1134
|
-
type: 'boolean',
|
|
1135
|
-
description: 'Attach instrumented page images to the grounded extraction prompt.',
|
|
1136
|
-
nullable: true,
|
|
1137
|
-
},
|
|
1138
|
-
raster_mode: {
|
|
1139
|
-
type: 'string',
|
|
1140
|
-
enum: ['vision', 'ocr'],
|
|
1141
|
-
description:
|
|
1142
|
-
"How to read pages with no digital text layer (scans). 'vision' (default) reads off the page image and skips OCR; 'ocr' is the legacy OCR-then-block-ground path.",
|
|
1143
|
-
nullable: true,
|
|
1144
|
-
},
|
|
1145
|
-
grid_cell_pt: {
|
|
1146
|
-
type: 'number',
|
|
1147
|
-
minimum: 1,
|
|
1148
|
-
description:
|
|
1149
|
-
'A1 locate-grid cell size in PDF points for vision pages. Smaller = finer grid; tune per the model in config. Default 14.',
|
|
1150
|
-
nullable: true,
|
|
1151
|
-
},
|
|
1152
|
-
omit_block_boxes: {
|
|
1153
|
-
type: 'boolean',
|
|
1154
|
-
description: 'Drop block bounding boxes from the extraction prompt (only sound with use_vision).',
|
|
1155
|
-
nullable: true,
|
|
1156
|
-
},
|
|
1157
|
-
window_pages: {
|
|
1158
|
-
type: 'integer',
|
|
1159
|
-
minimum: 1,
|
|
1160
|
-
description:
|
|
1161
|
-
'Maximum pages per extraction call before sequential window completion (later windows append to prior). Default 3.',
|
|
1162
|
-
nullable: true,
|
|
1163
|
-
},
|
|
1164
|
-
update_properties: {
|
|
1165
|
-
type: 'boolean',
|
|
1166
|
-
description: 'Update object properties with grounded extraction data. Default true.',
|
|
1167
|
-
nullable: true,
|
|
1168
|
-
},
|
|
1169
|
-
config: IntakeExecutionConfigurationSchema,
|
|
1170
|
-
hard_config: IntakeExecutionConfigurationSchema,
|
|
1171
|
-
hardness_threshold: {
|
|
1172
|
-
type: 'number',
|
|
1173
|
-
minimum: 0,
|
|
1174
|
-
maximum: 1,
|
|
1175
|
-
description: 'Hardness score at or above which hard_config is used. Default 0.5.',
|
|
1176
|
-
nullable: true,
|
|
1177
|
-
},
|
|
1178
|
-
min_citation_density: {
|
|
1179
|
-
type: 'number',
|
|
1180
|
-
minimum: 0,
|
|
1181
|
-
maximum: 1,
|
|
1182
|
-
description:
|
|
1183
|
-
'Minimum citations-per-leaf-value ratio; completions below it retry with escalation. Default 0.3.',
|
|
1184
|
-
nullable: true,
|
|
1185
|
-
},
|
|
1186
|
-
refresh_ocr: {
|
|
1187
|
-
type: 'boolean',
|
|
1188
|
-
description: 'Re-run OCR instead of restoring durable OCR artifacts (stale pipeline output).',
|
|
1189
|
-
nullable: true,
|
|
1190
|
-
},
|
|
1191
|
-
review: {
|
|
1192
|
-
type: 'object',
|
|
1193
|
-
description: 'Optional post-extraction review pass for hard content.',
|
|
1194
|
-
nullable: true,
|
|
1195
|
-
required: [],
|
|
1196
|
-
additionalProperties: false,
|
|
1197
|
-
properties: {
|
|
1198
|
-
enabled: {
|
|
1199
|
-
type: 'boolean',
|
|
1200
|
-
description: 'Set false to disable an inherited grounding review pass for this type.',
|
|
1201
|
-
nullable: true,
|
|
1202
|
-
},
|
|
1203
|
-
config: IntakeExecutionConfigurationSchema,
|
|
1204
|
-
threshold: {
|
|
1205
|
-
type: 'number',
|
|
1206
|
-
minimum: 0,
|
|
1207
|
-
maximum: 1,
|
|
1208
|
-
description: 'Hardness score at or above which review runs.',
|
|
1209
|
-
nullable: true,
|
|
1210
|
-
},
|
|
1211
|
-
coverage_threshold: {
|
|
1212
|
-
type: 'number',
|
|
1213
|
-
minimum: 0,
|
|
1214
|
-
maximum: 1,
|
|
1215
|
-
description:
|
|
1216
|
-
"Review also runs when any page's citation coverage falls below this floor. Default 0.2.",
|
|
1217
|
-
nullable: true,
|
|
1218
|
-
},
|
|
1219
|
-
force: {
|
|
1220
|
-
type: 'boolean',
|
|
1221
|
-
description: 'Run review regardless of hardness.',
|
|
1222
|
-
nullable: true,
|
|
1223
|
-
},
|
|
1224
|
-
},
|
|
1225
|
-
},
|
|
1226
|
-
},
|
|
1227
|
-
};
|
|
1228
|
-
|
|
1229
|
-
/** JSON schema for validating ContentTypeIntakePolicy payloads at API/tool boundaries.
|
|
1230
|
-
* NOTE: typed via a cast because AJV's strict `JSONSchemaType` mapping cannot express the
|
|
1231
|
-
* `[number, number]` pair items of `page_ranges` as a uniform-items array. The runtime
|
|
1232
|
-
* schema is compiled (and thus validated) by every consumer and by the schema-acceptance
|
|
1233
|
-
* unit test in packages/workflows. */
|
|
1234
|
-
export const ContentTypeIntakePolicySchema = {
|
|
1235
|
-
type: 'object',
|
|
1236
|
-
description:
|
|
1237
|
-
'Per-content-type policy for standard intake: type selection, conversion, extraction, rendering, and embeddings.',
|
|
1238
|
-
required: [],
|
|
1239
|
-
additionalProperties: false,
|
|
1240
|
-
properties: {
|
|
1241
|
-
mode: {
|
|
1242
|
-
type: 'string',
|
|
1243
|
-
enum: ['programmatic', 'agentic'],
|
|
1244
|
-
description:
|
|
1245
|
-
'Intake orchestration mode. Use programmatic unless the user explicitly asks for agentic intake.',
|
|
1246
|
-
nullable: true,
|
|
1247
|
-
},
|
|
1248
|
-
identification: {
|
|
1249
|
-
type: 'object',
|
|
1250
|
-
description: 'Guidance used by automatic type selection to recognize this type before full extraction.',
|
|
1251
|
-
nullable: true,
|
|
1252
|
-
required: [],
|
|
1253
|
-
additionalProperties: false,
|
|
1254
|
-
properties: {
|
|
1255
|
-
guidance: {
|
|
1256
|
-
type: 'string',
|
|
1257
|
-
description: 'Classifier-facing description of what this type is and when it should be selected.',
|
|
1258
|
-
nullable: true,
|
|
1259
|
-
},
|
|
1260
|
-
distinguish_from: {
|
|
1261
|
-
type: 'string',
|
|
1262
|
-
description: 'How to distinguish this type from common look-alike document types.',
|
|
1263
|
-
nullable: true,
|
|
1264
|
-
},
|
|
1265
|
-
examples: {
|
|
1266
|
-
type: 'array',
|
|
1267
|
-
description: 'Object ids of human-confirmed examples for this type.',
|
|
1268
|
-
nullable: true,
|
|
1269
|
-
items: { type: 'string' },
|
|
1270
|
-
},
|
|
1271
|
-
},
|
|
1272
|
-
},
|
|
1273
|
-
locate: {
|
|
1274
|
-
type: 'object',
|
|
1275
|
-
description:
|
|
1276
|
-
'Document-map pass: labeled page-thumbnail contact sheets and one vision call return which ' +
|
|
1277
|
-
'pages matter for this type. Scopes conversion/extraction and plans visual extraction.',
|
|
1278
|
-
nullable: true,
|
|
1279
|
-
required: ['instructions'],
|
|
1280
|
-
additionalProperties: false,
|
|
1281
|
-
properties: {
|
|
1282
|
-
instructions: {
|
|
1283
|
-
type: 'string',
|
|
1284
|
-
description: 'What to look for (e.g. "commercial terms, payment schedule, signature pages").',
|
|
1285
|
-
},
|
|
1286
|
-
detail: {
|
|
1287
|
-
type: 'integer',
|
|
1288
|
-
enum: [8, 16],
|
|
1289
|
-
description: 'Pages per contact sheet: 8 = bigger tiles with readable headings. Default 16.',
|
|
1290
|
-
nullable: true,
|
|
1291
|
-
},
|
|
1292
|
-
min_pages: {
|
|
1293
|
-
type: 'integer',
|
|
1294
|
-
minimum: 0,
|
|
1295
|
-
description: 'Only run the locate pass when the page count is at least this. Default 8.',
|
|
1296
|
-
nullable: true,
|
|
1297
|
-
},
|
|
1298
|
-
},
|
|
1299
|
-
},
|
|
1300
|
-
text_conversion: {
|
|
1301
|
-
type: 'object',
|
|
1302
|
-
description: 'Controls source-to-text conversion before extraction, search, and text embeddings.',
|
|
1303
|
-
nullable: true,
|
|
1304
|
-
required: [],
|
|
1305
|
-
additionalProperties: false,
|
|
1306
|
-
properties: {
|
|
1307
|
-
enabled: {
|
|
1308
|
-
type: 'boolean',
|
|
1309
|
-
description: 'Set false for extraction-only types that should not create converted markdown/text.',
|
|
1310
|
-
nullable: true,
|
|
1311
|
-
},
|
|
1312
|
-
method: {
|
|
1313
|
-
type: 'string',
|
|
1314
|
-
enum: ['auto', 'basic', 'llm', 'custom'],
|
|
1315
|
-
description: 'Conversion method. Use auto unless the user asks for a specific converter.',
|
|
1316
|
-
nullable: true,
|
|
1317
|
-
},
|
|
1318
|
-
custom: {
|
|
1319
|
-
type: 'object',
|
|
1320
|
-
description: 'Custom conversion implementation for method=custom.',
|
|
1321
|
-
nullable: true,
|
|
1322
|
-
required: [],
|
|
1323
|
-
additionalProperties: false,
|
|
1324
|
-
properties: {
|
|
1325
|
-
interaction: {
|
|
1326
|
-
type: 'string',
|
|
1327
|
-
description: 'Interaction id to call for custom conversion.',
|
|
1328
|
-
nullable: true,
|
|
1329
|
-
},
|
|
1330
|
-
agent: {
|
|
1331
|
-
type: 'string',
|
|
1332
|
-
description: 'Agent id to launch for custom conversion.',
|
|
1333
|
-
nullable: true,
|
|
1334
|
-
},
|
|
1335
|
-
},
|
|
1336
|
-
},
|
|
1337
|
-
instructions: {
|
|
1338
|
-
type: 'string',
|
|
1339
|
-
description: 'Instructions for what source content to preserve during conversion.',
|
|
1340
|
-
nullable: true,
|
|
1341
|
-
},
|
|
1342
|
-
output_format: {
|
|
1343
|
-
type: 'string',
|
|
1344
|
-
enum: ['markdown', 'text'],
|
|
1345
|
-
description: 'Output format for converted text. Prefer markdown for readable documents.',
|
|
1346
|
-
nullable: true,
|
|
1347
|
-
},
|
|
1348
|
-
scope: IntakePageScopeSchema,
|
|
1349
|
-
page_ranges: IntakePageRangesSchema,
|
|
1350
|
-
},
|
|
1351
|
-
},
|
|
1352
|
-
extraction: {
|
|
1353
|
-
type: 'object',
|
|
1354
|
-
description: 'Controls structured property extraction against the content type object_schema.',
|
|
1355
|
-
nullable: true,
|
|
1356
|
-
required: [],
|
|
1357
|
-
additionalProperties: false,
|
|
1358
|
-
properties: {
|
|
1359
|
-
enabled: {
|
|
1360
|
-
type: 'boolean',
|
|
1361
|
-
description: 'Whether intake should extract structured properties for this type.',
|
|
1362
|
-
nullable: true,
|
|
1363
|
-
},
|
|
1364
|
-
source: {
|
|
1365
|
-
type: 'string',
|
|
1366
|
-
enum: ['auto', 'text', 'vision', 'mixed'],
|
|
1367
|
-
description:
|
|
1368
|
-
'Evidence source for extraction: auto chooses text or vision, text sends text only, vision sends image/PDF evidence only, mixed sends both.',
|
|
1369
|
-
nullable: true,
|
|
1370
|
-
},
|
|
1371
|
-
instructions: {
|
|
1372
|
-
type: 'string',
|
|
1373
|
-
description: 'Type-specific extraction instructions such as pages or sections to ignore.',
|
|
1374
|
-
nullable: true,
|
|
1375
|
-
},
|
|
1376
|
-
interaction: {
|
|
1377
|
-
type: 'string',
|
|
1378
|
-
description: 'Interaction id used for extraction. Omit to use the system extractor.',
|
|
1379
|
-
nullable: true,
|
|
1380
|
-
},
|
|
1381
|
-
scope: IntakePageScopeSchema,
|
|
1382
|
-
page_ranges: IntakePageRangesSchema,
|
|
1383
|
-
max_pages: {
|
|
1384
|
-
type: 'integer',
|
|
1385
|
-
minimum: 1,
|
|
1386
|
-
description: 'Cap on pages sent to extraction. Default 20.',
|
|
1387
|
-
nullable: true,
|
|
1388
|
-
},
|
|
1389
|
-
vision: {
|
|
1390
|
-
type: 'object',
|
|
1391
|
-
description:
|
|
1392
|
-
'Vision evidence budget for visual extraction. Detail names reference platform-defined ' +
|
|
1393
|
-
'profiles; the type never sets dpi, quality, or resolution.',
|
|
1394
|
-
nullable: true,
|
|
1395
|
-
required: [],
|
|
1396
|
-
additionalProperties: false,
|
|
1397
|
-
properties: {
|
|
1398
|
-
default_detail: {
|
|
1399
|
-
type: 'string',
|
|
1400
|
-
enum: ['low', 'standard', 'high'],
|
|
1401
|
-
description: 'Detail profile used when the plan does not request one. Default standard.',
|
|
1402
|
-
nullable: true,
|
|
1403
|
-
},
|
|
1404
|
-
allowed_details: {
|
|
1405
|
-
type: 'array',
|
|
1406
|
-
items: { type: 'string', enum: ['low', 'standard', 'high'] },
|
|
1407
|
-
description: 'Detail profiles the plan may request. Others fall back to default_detail.',
|
|
1408
|
-
nullable: true,
|
|
1409
|
-
},
|
|
1410
|
-
max_image_tokens: {
|
|
1411
|
-
type: 'integer',
|
|
1412
|
-
minimum: 1,
|
|
1413
|
-
description: 'PRIMARY budget: estimated image tokens per extraction call. Default 16000.',
|
|
1414
|
-
nullable: true,
|
|
1415
|
-
},
|
|
1416
|
-
max_payload_mb: {
|
|
1417
|
-
type: 'number',
|
|
1418
|
-
minimum: 1,
|
|
1419
|
-
description: 'Transport guard in megabytes. Default 16.',
|
|
1420
|
-
nullable: true,
|
|
1421
|
-
},
|
|
1422
|
-
max_pages_per_call: {
|
|
1423
|
-
type: 'integer',
|
|
1424
|
-
minimum: 1,
|
|
1425
|
-
description: 'Cap on page images per extraction call. Default 8.',
|
|
1426
|
-
nullable: true,
|
|
1427
|
-
},
|
|
1428
|
-
},
|
|
1429
|
-
},
|
|
1430
|
-
verification: {
|
|
1431
|
-
type: 'object',
|
|
1432
|
-
description: 'Optional safe-mode verification of extracted values against source evidence.',
|
|
1433
|
-
nullable: true,
|
|
1434
|
-
required: [],
|
|
1435
|
-
additionalProperties: false,
|
|
1436
|
-
properties: {
|
|
1437
|
-
enabled: {
|
|
1438
|
-
type: 'boolean',
|
|
1439
|
-
description: 'Whether to verify extracted values after extraction.',
|
|
1440
|
-
nullable: true,
|
|
1441
|
-
},
|
|
1442
|
-
model: { type: 'string', description: 'Verifier model override.', nullable: true },
|
|
1443
|
-
environment: {
|
|
1444
|
-
type: 'string',
|
|
1445
|
-
description: 'Verifier environment override.',
|
|
1446
|
-
nullable: true,
|
|
1447
|
-
},
|
|
1448
|
-
materiality: {
|
|
1449
|
-
type: 'string',
|
|
1450
|
-
description: 'What errors are material for this type.',
|
|
1451
|
-
nullable: true,
|
|
1452
|
-
},
|
|
1453
|
-
threshold: {
|
|
1454
|
-
type: 'number',
|
|
1455
|
-
minimum: 0,
|
|
1456
|
-
maximum: 1,
|
|
1457
|
-
description: 'Minimum verification confidence before flag/block behavior applies.',
|
|
1458
|
-
nullable: true,
|
|
1459
|
-
},
|
|
1460
|
-
max_retries: {
|
|
1461
|
-
type: 'integer',
|
|
1462
|
-
minimum: 0,
|
|
1463
|
-
description: 'Maximum extraction retries when verification fails.',
|
|
1464
|
-
nullable: true,
|
|
1465
|
-
},
|
|
1466
|
-
on_fail: {
|
|
1467
|
-
type: 'string',
|
|
1468
|
-
enum: ['flag', 'block'],
|
|
1469
|
-
description: 'Failure behavior after retries: flag for review or block property write.',
|
|
1470
|
-
nullable: true,
|
|
1471
|
-
},
|
|
1472
|
-
},
|
|
1473
|
-
},
|
|
1474
|
-
grounding: ContentTypeExtractionGroundingPolicySchema,
|
|
1475
|
-
},
|
|
1476
|
-
},
|
|
1477
|
-
rendering_template: {
|
|
1478
|
-
type: 'string',
|
|
1479
|
-
description: 'Handlebars template used to materialize extracted properties into object text.',
|
|
1480
|
-
nullable: true,
|
|
1481
|
-
},
|
|
1482
|
-
embeddings: {
|
|
1483
|
-
type: 'object',
|
|
1484
|
-
description: 'Per-type embedding switches. Omitted fields inherit the project embedding policy.',
|
|
1485
|
-
nullable: true,
|
|
1486
|
-
required: [],
|
|
1487
|
-
additionalProperties: false,
|
|
1488
|
-
properties: {
|
|
1489
|
-
text: { type: 'boolean', description: 'Whether to generate text embeddings.', nullable: true },
|
|
1490
|
-
image: { type: 'boolean', description: 'Whether to generate image embeddings.', nullable: true },
|
|
1491
|
-
properties: {
|
|
1492
|
-
type: 'boolean',
|
|
1493
|
-
description: 'Whether to generate property embeddings.',
|
|
1494
|
-
nullable: true,
|
|
1495
|
-
},
|
|
1496
|
-
},
|
|
1497
|
-
},
|
|
1498
|
-
generate_toc: {
|
|
1499
|
-
type: 'boolean',
|
|
1500
|
-
description: 'Whether intake should generate table-of-contents sections for this type.',
|
|
1501
|
-
nullable: true,
|
|
1502
|
-
},
|
|
1503
|
-
default_view: {
|
|
1504
|
-
type: 'string',
|
|
1505
|
-
enum: ['auto', 'text', 'pdf', 'image', 'properties'],
|
|
1506
|
-
description: 'Preferred first view for objects of this type.',
|
|
1507
|
-
nullable: true,
|
|
1508
|
-
},
|
|
1509
|
-
},
|
|
1510
|
-
} as unknown as JSONSchemaType<ContentTypeIntakePolicy>;
|
|
1511
|
-
|
|
1512
|
-
export interface ContentObjectType extends ContentObjectTypeItem {}
|
|
1513
|
-
export interface ContentObjectTypeItem extends BaseObject {
|
|
1514
|
-
status?: ContentObjectTypeStatus;
|
|
1515
|
-
is_chunkable?: boolean;
|
|
1516
|
-
intake?: ContentTypeIntakePolicy;
|
|
1517
|
-
editing?: ContentTypeEditingPolicy;
|
|
1518
|
-
/**
|
|
1519
|
-
* This is only included in ContentObjectTypeItem if explicitly requested
|
|
1520
|
-
* It is always included in ContentObjectType
|
|
1521
|
-
*/
|
|
1522
|
-
table_layout?: ColumnLayout[];
|
|
1523
|
-
/**
|
|
1524
|
-
* this is only included in ContentObjectTypeItem if explicitly requested
|
|
1525
|
-
* It is always included in ContentObjectType
|
|
1526
|
-
*/
|
|
1527
|
-
object_schema?: Record<string, unknown>; // an optional JSON schema for the object properties.
|
|
1528
|
-
|
|
1529
|
-
/**
|
|
1530
|
-
* Determines if the content will be validated against the object schema a generation time and save/update time.
|
|
1531
|
-
*/
|
|
1532
|
-
strict_mode?: boolean;
|
|
1533
|
-
}
|
|
1534
|
-
export type InCodeTypeDefinition = Pick<
|
|
1535
|
-
ContentObjectTypeItem,
|
|
1536
|
-
| 'id'
|
|
1537
|
-
| 'name'
|
|
1538
|
-
| 'description'
|
|
1539
|
-
| 'tags'
|
|
1540
|
-
| 'object_schema'
|
|
1541
|
-
| 'table_layout'
|
|
1542
|
-
| 'is_chunkable'
|
|
1543
|
-
| 'strict_mode'
|
|
1544
|
-
| 'status'
|
|
1545
|
-
| 'intake'
|
|
1546
|
-
| 'editing'
|
|
650
|
+
export type ContentTypeExtractionGroundingReviewPolicy = z.infer<
|
|
651
|
+
typeof ContentTypeExtractionGroundingReviewPolicySchema
|
|
1547
652
|
>;
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
653
|
+
|
|
654
|
+
export type ContentTypeExtractionGroundingPolicy = z.infer<typeof ContentTypeExtractionGroundingPolicySchema>;
|
|
655
|
+
|
|
656
|
+
export type ContentTypeIntakePolicy = z.infer<typeof ContentTypeIntakePolicySchema>;
|
|
657
|
+
|
|
658
|
+
// No TSDoc: the description is the canonical schema's, and a doc comment above a canonical alias is
|
|
659
|
+
// published a second time.
|
|
660
|
+
//
|
|
661
|
+
// The hand-written AJV `ContentTypeEditingPolicySchema` that used to sit here is gone. It said the
|
|
662
|
+
// same thing as the Zod schema and had to be kept in step by hand; `./editing-policy-schema.generated.ts`
|
|
663
|
+
// now emits it from the canonical component, under the same exported name, so the validator the types
|
|
664
|
+
// resource compiles and the component the spec publishes are the same object.
|
|
665
|
+
export type ContentTypeEditingPolicy = z.infer<typeof ContentTypeEditingPolicySchema>;
|
|
666
|
+
|
|
667
|
+
export type ContentObjectType = z.infer<typeof ContentObjectTypeSchema>;
|
|
668
|
+
export type ContentObjectTypeItem = z.infer<typeof ContentObjectTypeItemSchema>;
|
|
669
|
+
// Was `Pick<ContentObjectTypeItem, ...>`, and published under the name that derived from:
|
|
670
|
+
// `Pick_ContentObjectTypeItem_id_name_description_tags_object_schema_...`. A mapped type over a
|
|
671
|
+
// canonical alias resolves to `{}`, so the shape is authored now — and it publishes under its own
|
|
672
|
+
// name, which is what the API always meant.
|
|
673
|
+
export type InCodeTypeDefinition = z.infer<typeof InCodeTypeDefinitionSchema>;
|
|
674
|
+
export type ContentObjectTypeCatalogEntry = z.infer<typeof ContentObjectTypeCatalogEntrySchema>;
|
|
1554
675
|
/**
|
|
1555
676
|
* The itnerface to be used whend efining types in a plugin app.
|
|
1556
677
|
*/
|
|
@@ -1565,61 +686,19 @@ export function isInCodeType(typeId: string): boolean {
|
|
|
1565
686
|
return typeId.includes(':');
|
|
1566
687
|
}
|
|
1567
688
|
|
|
1568
|
-
export
|
|
1569
|
-
|
|
689
|
+
export type CreateContentObjectTypePayload = z.infer<typeof CreateContentObjectTypePayloadSchema>;
|
|
690
|
+
|
|
691
|
+
export type UpdateContentObjectTypePayload = z.infer<typeof UpdateContentObjectTypePayloadSchema>;
|
|
1570
692
|
|
|
1571
693
|
export enum WorkflowRuleInputType {
|
|
1572
694
|
single = 'single',
|
|
1573
695
|
multiple = 'multiple',
|
|
1574
696
|
none = 'none',
|
|
1575
697
|
}
|
|
1576
|
-
export
|
|
1577
|
-
|
|
1578
|
-
endpoint: string;
|
|
1579
|
-
input_type: WorkflowRuleInputType;
|
|
1580
|
-
}
|
|
1581
|
-
export interface WorkflowRule extends WorkflowRuleItem {
|
|
1582
|
-
/*
|
|
1583
|
-
* mongo matching rules for a content event
|
|
1584
|
-
*/
|
|
1585
|
-
match?: Record<string, unknown>;
|
|
1586
|
-
/**
|
|
1587
|
-
* Activities configuration if any.
|
|
1588
|
-
*/
|
|
1589
|
-
config?: Record<string, unknown>;
|
|
1590
|
-
|
|
1591
|
-
/**
|
|
1592
|
-
* Debug mode for the rule
|
|
1593
|
-
* @default false
|
|
1594
|
-
*/
|
|
1595
|
-
debug?: boolean;
|
|
698
|
+
export type WorkflowRuleItem = z.infer<typeof WorkflowRuleItemSchema>;
|
|
699
|
+
export type WorkflowRule = z.infer<typeof WorkflowRuleSchema>;
|
|
1596
700
|
|
|
1597
|
-
|
|
1598
|
-
* Customer override for the rule
|
|
1599
|
-
* When set to true the rule will not be updated by the system
|
|
1600
|
-
*/
|
|
1601
|
-
customer_override?: boolean;
|
|
1602
|
-
|
|
1603
|
-
/**
|
|
1604
|
-
* Optional task queue name to use when starting workflows for this rule
|
|
1605
|
-
*/
|
|
1606
|
-
task_queue?: string;
|
|
1607
|
-
|
|
1608
|
-
/**
|
|
1609
|
-
* Event subscription migration status for legacy workflow-rule cutover.
|
|
1610
|
-
*/
|
|
1611
|
-
event_subscription_migration_status?: 'migrated' | 'unsupported_match' | 'failed';
|
|
1612
|
-
|
|
1613
|
-
/**
|
|
1614
|
-
* Migration failure or unsupported-match reason, when applicable.
|
|
1615
|
-
*/
|
|
1616
|
-
event_subscription_migration_error?: string;
|
|
1617
|
-
}
|
|
1618
|
-
|
|
1619
|
-
export interface CreateWorkflowRulePayload extends UploadWorkflowRulePayload {
|
|
1620
|
-
name: string; // required
|
|
1621
|
-
endpoint: string; // required
|
|
1622
|
-
}
|
|
701
|
+
export type CreateWorkflowRulePayload = z.infer<typeof CreateWorkflowRulePayloadSchema>;
|
|
1623
702
|
export interface UploadWorkflowRulePayload
|
|
1624
703
|
extends Partial<Omit<WorkflowRule, 'id' | 'created_at' | 'updated_at' | 'owner'>> {}
|
|
1625
704
|
|
|
@@ -1629,10 +708,12 @@ export enum ImageRenditionFormat {
|
|
|
1629
708
|
webp = 'webp',
|
|
1630
709
|
}
|
|
1631
710
|
|
|
1632
|
-
export
|
|
1633
|
-
docx
|
|
1634
|
-
pdf
|
|
1635
|
-
}
|
|
711
|
+
export const MarkdownRenditionFormat = {
|
|
712
|
+
docx: 'docx',
|
|
713
|
+
pdf: 'pdf',
|
|
714
|
+
} as const;
|
|
715
|
+
|
|
716
|
+
export type MarkdownRenditionFormat = z.infer<typeof MarkdownRenditionFormatSchema>;
|
|
1636
717
|
|
|
1637
718
|
export interface GetRenditionParams {
|
|
1638
719
|
format: ImageRenditionFormat | MarkdownRenditionFormat;
|
|
@@ -1642,17 +723,9 @@ export interface GetRenditionParams {
|
|
|
1642
723
|
block_on_generation?: boolean;
|
|
1643
724
|
}
|
|
1644
725
|
|
|
1645
|
-
export
|
|
1646
|
-
status: 'found' | 'generating' | 'failed';
|
|
1647
|
-
renditions?: string[]; //file paths for the renditions
|
|
1648
|
-
workflow_run_id?: string;
|
|
1649
|
-
}
|
|
726
|
+
export type GetRenditionResponse = z.infer<typeof GetRenditionResponseSchema>;
|
|
1650
727
|
|
|
1651
|
-
export
|
|
1652
|
-
results: ContentObjectItemApiResponse[];
|
|
1653
|
-
facets: ComputedFacetResponse;
|
|
1654
|
-
aggregations?: Record<string, unknown>;
|
|
1655
|
-
}
|
|
728
|
+
export type ObjectSearchResponse = z.infer<typeof ObjectSearchResponseSchema>;
|
|
1656
729
|
|
|
1657
730
|
// ============================================================================
|
|
1658
731
|
// Rendition Format Compatibility Utilities
|
|
@@ -1766,127 +839,47 @@ export function supportsVisualRendition(contentType: string | undefined): boolea
|
|
|
1766
839
|
return canGenerateRendition(contentType, ImageRenditionFormat.jpeg);
|
|
1767
840
|
}
|
|
1768
841
|
|
|
1769
|
-
export
|
|
1770
|
-
name: string;
|
|
1771
|
-
id?: string;
|
|
1772
|
-
mime_type?: string;
|
|
1773
|
-
ttl?: number;
|
|
1774
|
-
}
|
|
842
|
+
export type GetUploadUrlPayload = z.infer<typeof GetUploadUrlPayloadSchema>;
|
|
1775
843
|
|
|
1776
|
-
export
|
|
1777
|
-
file: string;
|
|
1778
|
-
// Optional filename to use in Content-Disposition for downloads
|
|
1779
|
-
name?: string;
|
|
1780
|
-
// Optional disposition for downloads (default: attachment)
|
|
1781
|
-
disposition?: 'inline' | 'attachment';
|
|
1782
|
-
}
|
|
844
|
+
export type GetFileUrlPayload = z.infer<typeof GetFileUrlPayloadSchema>;
|
|
1783
845
|
|
|
1784
|
-
export
|
|
1785
|
-
url: string;
|
|
1786
|
-
id: string;
|
|
1787
|
-
mime_type?: string;
|
|
1788
|
-
path: string;
|
|
1789
|
-
}
|
|
846
|
+
export type GetFileUrlResponse = z.infer<typeof GetFileUrlResponseSchema>;
|
|
1790
847
|
|
|
1791
|
-
export
|
|
1792
|
-
principal: string;
|
|
1793
|
-
}
|
|
848
|
+
export type EnsureBucketReadAccessPayload = z.infer<typeof EnsureBucketReadAccessPayloadSchema>;
|
|
1794
849
|
|
|
1795
|
-
export
|
|
1796
|
-
bucket: string;
|
|
1797
|
-
principal: string;
|
|
1798
|
-
granted: boolean;
|
|
1799
|
-
}
|
|
850
|
+
export type EnsureBucketReadAccessResponse = z.infer<typeof EnsureBucketReadAccessResponseSchema>;
|
|
1800
851
|
|
|
1801
|
-
export
|
|
1802
|
-
bucket: string;
|
|
1803
|
-
principal: string;
|
|
1804
|
-
hasAccess: boolean;
|
|
1805
|
-
}
|
|
852
|
+
export type BucketReadAccessStatusResponse = z.infer<typeof BucketReadAccessStatusResponseSchema>;
|
|
1806
853
|
|
|
1807
|
-
export
|
|
1808
|
-
name: string;
|
|
1809
|
-
size: number;
|
|
1810
|
-
contentType: string;
|
|
1811
|
-
contentDisposition?: string;
|
|
1812
|
-
etag?: string;
|
|
1813
|
-
customMetadata?: Record<string, string>;
|
|
1814
|
-
}
|
|
854
|
+
export type FileMetadataResponse = z.infer<typeof FileMetadataResponseSchema>;
|
|
1815
855
|
|
|
1816
|
-
export
|
|
1817
|
-
/** The file path (relative to bucket) or full URI */
|
|
1818
|
-
file: string;
|
|
1819
|
-
/** Custom metadata key-value pairs to set on the file */
|
|
1820
|
-
metadata: Record<string, string>;
|
|
1821
|
-
}
|
|
856
|
+
export type SetFileMetadataPayload = z.infer<typeof SetFileMetadataPayloadSchema>;
|
|
1822
857
|
|
|
1823
|
-
export
|
|
1824
|
-
success: boolean;
|
|
1825
|
-
file: string;
|
|
1826
|
-
}
|
|
858
|
+
export type FileMetadataUpdateResult = z.infer<typeof FileMetadataUpdateResultSchema>;
|
|
1827
859
|
|
|
1828
|
-
export
|
|
1829
|
-
files: { name: string; mime_type?: string; id?: string }[];
|
|
1830
|
-
}
|
|
860
|
+
export type BulkUploadUrlsPayload = z.infer<typeof BulkUploadUrlsPayloadSchema>;
|
|
1831
861
|
|
|
1832
|
-
export
|
|
1833
|
-
files: GetFileUrlResponse[];
|
|
1834
|
-
}
|
|
862
|
+
export type BulkUploadUrlsResponse = z.infer<typeof BulkUploadUrlsResponseSchema>;
|
|
1835
863
|
|
|
1836
|
-
export
|
|
1837
|
-
bucket: string;
|
|
1838
|
-
}
|
|
864
|
+
export type FileBucketResponse = z.infer<typeof FileBucketResponseSchema>;
|
|
1839
865
|
|
|
1840
|
-
export
|
|
1841
|
-
files: string[];
|
|
1842
|
-
}
|
|
866
|
+
export type FileListResponse = z.infer<typeof FileListResponseSchema>;
|
|
1843
867
|
|
|
1844
|
-
export
|
|
1845
|
-
file: string;
|
|
1846
|
-
}
|
|
868
|
+
export type FileMetadataQuery = z.infer<typeof FileMetadataQuerySchema>;
|
|
1847
869
|
|
|
1848
|
-
export
|
|
1849
|
-
prefix: string;
|
|
1850
|
-
}
|
|
870
|
+
export type FileListQuery = z.infer<typeof FileListQuerySchema>;
|
|
1851
871
|
|
|
1852
|
-
export
|
|
1853
|
-
prefix?: boolean;
|
|
1854
|
-
}
|
|
872
|
+
export type FileDeleteQuery = z.infer<typeof FileDeleteQuerySchema>;
|
|
1855
873
|
|
|
1856
|
-
export
|
|
1857
|
-
tag?: string;
|
|
1858
|
-
layout?: boolean;
|
|
1859
|
-
schema?: boolean;
|
|
1860
|
-
limit?: number;
|
|
1861
|
-
offset?: number;
|
|
1862
|
-
}
|
|
874
|
+
export type ContentObjectTypeCatalogQuery = z.infer<typeof ContentObjectTypeCatalogQuerySchema>;
|
|
1863
875
|
|
|
1864
|
-
export
|
|
1865
|
-
name?: string;
|
|
1866
|
-
chunkable?: boolean;
|
|
1867
|
-
layout?: boolean;
|
|
1868
|
-
schema?: boolean;
|
|
1869
|
-
limit?: number;
|
|
1870
|
-
offset?: number;
|
|
1871
|
-
}
|
|
876
|
+
export type ContentObjectTypeListQuery = z.infer<typeof ContentObjectTypeListQuerySchema>;
|
|
1872
877
|
|
|
1873
|
-
export
|
|
1874
|
-
source: string;
|
|
1875
|
-
dest: string;
|
|
1876
|
-
}
|
|
878
|
+
export type CopyFilePayload = z.infer<typeof CopyFilePayloadSchema>;
|
|
1877
879
|
|
|
1878
|
-
export
|
|
1879
|
-
success: boolean;
|
|
1880
|
-
source: string;
|
|
1881
|
-
dest: string;
|
|
1882
|
-
}
|
|
880
|
+
export type CopyFileResponse = z.infer<typeof CopyFileResponseSchema>;
|
|
1883
881
|
|
|
1884
|
-
export
|
|
1885
|
-
success: boolean;
|
|
1886
|
-
count: number;
|
|
1887
|
-
message?: string;
|
|
1888
|
-
file?: string;
|
|
1889
|
-
}
|
|
882
|
+
export type DeleteFileResult = z.infer<typeof DeleteFileResultSchema>;
|
|
1890
883
|
|
|
1891
884
|
export enum ContentObjectProcessingPriority {
|
|
1892
885
|
normal = 'normal',
|