@vertesia/common 0.24.0-dev.202601221707
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +13 -0
- package/README.md +53 -0
- package/lib/cjs/Progress.js +61 -0
- package/lib/cjs/Progress.js.map +1 -0
- package/lib/cjs/access-control.js +56 -0
- package/lib/cjs/access-control.js.map +1 -0
- package/lib/cjs/analytics.js +3 -0
- package/lib/cjs/analytics.js.map +1 -0
- package/lib/cjs/apikey.js +16 -0
- package/lib/cjs/apikey.js.map +1 -0
- package/lib/cjs/apps.js +35 -0
- package/lib/cjs/apps.js.map +1 -0
- package/lib/cjs/ask-user.js +8 -0
- package/lib/cjs/ask-user.js.map +1 -0
- package/lib/cjs/channels.js +63 -0
- package/lib/cjs/channels.js.map +1 -0
- package/lib/cjs/common.js +3 -0
- package/lib/cjs/common.js.map +1 -0
- package/lib/cjs/data-platform.js +127 -0
- package/lib/cjs/data-platform.js.map +1 -0
- package/lib/cjs/email.js +20 -0
- package/lib/cjs/email.js.map +1 -0
- package/lib/cjs/environment.js +44 -0
- package/lib/cjs/environment.js.map +1 -0
- package/lib/cjs/facets.js +3 -0
- package/lib/cjs/facets.js.map +1 -0
- package/lib/cjs/group.js +5 -0
- package/lib/cjs/group.js.map +1 -0
- package/lib/cjs/index.js +55 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/cjs/integrations.js +14 -0
- package/lib/cjs/integrations.js.map +1 -0
- package/lib/cjs/interaction.js +97 -0
- package/lib/cjs/interaction.js.map +1 -0
- package/lib/cjs/json-schema.js +3 -0
- package/lib/cjs/json-schema.js.map +1 -0
- package/lib/cjs/json.js +3 -0
- package/lib/cjs/json.js.map +1 -0
- package/lib/cjs/meters.js +13 -0
- package/lib/cjs/meters.js.map +1 -0
- package/lib/cjs/model_utility.js +6 -0
- package/lib/cjs/model_utility.js.map +1 -0
- package/lib/cjs/package.json +3 -0
- package/lib/cjs/payload.js +3 -0
- package/lib/cjs/payload.js.map +1 -0
- package/lib/cjs/pending-asks.js +7 -0
- package/lib/cjs/pending-asks.js.map +1 -0
- package/lib/cjs/project.js +107 -0
- package/lib/cjs/project.js.map +1 -0
- package/lib/cjs/prompt.js +21 -0
- package/lib/cjs/prompt.js.map +1 -0
- package/lib/cjs/query.js +3 -0
- package/lib/cjs/query.js.map +1 -0
- package/lib/cjs/rate-limiter.js +6 -0
- package/lib/cjs/rate-limiter.js.map +1 -0
- package/lib/cjs/refs.js +14 -0
- package/lib/cjs/refs.js.map +1 -0
- package/lib/cjs/runs.js +3 -0
- package/lib/cjs/runs.js.map +1 -0
- package/lib/cjs/skill.js +14 -0
- package/lib/cjs/skill.js.map +1 -0
- package/lib/cjs/store/activity-catalog.js +3 -0
- package/lib/cjs/store/activity-catalog.js.map +1 -0
- package/lib/cjs/store/collections.js +9 -0
- package/lib/cjs/store/collections.js.map +1 -0
- package/lib/cjs/store/common.js +3 -0
- package/lib/cjs/store/common.js.map +1 -0
- package/lib/cjs/store/conversation-state.js +3 -0
- package/lib/cjs/store/conversation-state.js.map +1 -0
- package/lib/cjs/store/doc-analyzer.js +3 -0
- package/lib/cjs/store/doc-analyzer.js.map +1 -0
- package/lib/cjs/store/dsl-workflow.js +5 -0
- package/lib/cjs/store/dsl-workflow.js.map +1 -0
- package/lib/cjs/store/index.js +30 -0
- package/lib/cjs/store/index.js.map +1 -0
- package/lib/cjs/store/object-types.js +98 -0
- package/lib/cjs/store/object-types.js.map +1 -0
- package/lib/cjs/store/schedule.js +32 -0
- package/lib/cjs/store/schedule.js.map +1 -0
- package/lib/cjs/store/signals.js +3 -0
- package/lib/cjs/store/signals.js.map +1 -0
- package/lib/cjs/store/store.js +166 -0
- package/lib/cjs/store/store.js.map +1 -0
- package/lib/cjs/store/temporalio.js +44 -0
- package/lib/cjs/store/temporalio.js.map +1 -0
- package/lib/cjs/store/worker.js +3 -0
- package/lib/cjs/store/worker.js.map +1 -0
- package/lib/cjs/store/workflow.js +241 -0
- package/lib/cjs/store/workflow.js.map +1 -0
- package/lib/cjs/sts-token-types.js +32 -0
- package/lib/cjs/sts-token-types.js.map +1 -0
- package/lib/cjs/tenant.js +3 -0
- package/lib/cjs/tenant.js.map +1 -0
- package/lib/cjs/tool-execution.js +6 -0
- package/lib/cjs/tool-execution.js.map +1 -0
- package/lib/cjs/training.js +14 -0
- package/lib/cjs/training.js.map +1 -0
- package/lib/cjs/transient-tokens.js +9 -0
- package/lib/cjs/transient-tokens.js.map +1 -0
- package/lib/cjs/user.js +25 -0
- package/lib/cjs/user.js.map +1 -0
- package/lib/cjs/utils/auth.js +15 -0
- package/lib/cjs/utils/auth.js.map +1 -0
- package/lib/cjs/utils/schemas.js +114 -0
- package/lib/cjs/utils/schemas.js.map +1 -0
- package/lib/cjs/utils/type-helpers.js +3 -0
- package/lib/cjs/utils/type-helpers.js.map +1 -0
- package/lib/cjs/versions.js +8 -0
- package/lib/cjs/versions.js.map +1 -0
- package/lib/cjs/workflow-analytics.js +52 -0
- package/lib/cjs/workflow-analytics.js.map +1 -0
- package/lib/esm/Progress.js +57 -0
- package/lib/esm/Progress.js.map +1 -0
- package/lib/esm/access-control.js +53 -0
- package/lib/esm/access-control.js.map +1 -0
- package/lib/esm/analytics.js +2 -0
- package/lib/esm/analytics.js.map +1 -0
- package/lib/esm/apikey.js +13 -0
- package/lib/esm/apikey.js.map +1 -0
- package/lib/esm/apps.js +32 -0
- package/lib/esm/apps.js.map +1 -0
- package/lib/esm/ask-user.js +7 -0
- package/lib/esm/ask-user.js.map +1 -0
- package/lib/esm/channels.js +57 -0
- package/lib/esm/channels.js.map +1 -0
- package/lib/esm/common.js +2 -0
- package/lib/esm/common.js.map +1 -0
- package/lib/esm/data-platform.js +124 -0
- package/lib/esm/data-platform.js.map +1 -0
- package/lib/esm/email.js +16 -0
- package/lib/esm/email.js.map +1 -0
- package/lib/esm/environment.js +41 -0
- package/lib/esm/environment.js.map +1 -0
- package/lib/esm/facets.js +2 -0
- package/lib/esm/facets.js.map +1 -0
- package/lib/esm/group.js +2 -0
- package/lib/esm/group.js.map +1 -0
- package/lib/esm/index.js +39 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/integrations.js +11 -0
- package/lib/esm/integrations.js.map +1 -0
- package/lib/esm/interaction.js +92 -0
- package/lib/esm/interaction.js.map +1 -0
- package/lib/esm/json-schema.js +2 -0
- package/lib/esm/json-schema.js.map +1 -0
- package/lib/esm/json.js +2 -0
- package/lib/esm/json.js.map +1 -0
- package/lib/esm/meters.js +10 -0
- package/lib/esm/meters.js.map +1 -0
- package/lib/esm/model_utility.js +2 -0
- package/lib/esm/model_utility.js.map +1 -0
- package/lib/esm/payload.js +2 -0
- package/lib/esm/payload.js.map +1 -0
- package/lib/esm/pending-asks.js +6 -0
- package/lib/esm/pending-asks.js.map +1 -0
- package/lib/esm/project.js +102 -0
- package/lib/esm/project.js.map +1 -0
- package/lib/esm/prompt.js +18 -0
- package/lib/esm/prompt.js.map +1 -0
- package/lib/esm/query.js +2 -0
- package/lib/esm/query.js.map +1 -0
- package/lib/esm/rate-limiter.js +5 -0
- package/lib/esm/rate-limiter.js.map +1 -0
- package/lib/esm/refs.js +11 -0
- package/lib/esm/refs.js.map +1 -0
- package/lib/esm/runs.js +2 -0
- package/lib/esm/runs.js.map +1 -0
- package/lib/esm/skill.js +13 -0
- package/lib/esm/skill.js.map +1 -0
- package/lib/esm/store/activity-catalog.js +2 -0
- package/lib/esm/store/activity-catalog.js.map +1 -0
- package/lib/esm/store/collections.js +6 -0
- package/lib/esm/store/collections.js.map +1 -0
- package/lib/esm/store/common.js +2 -0
- package/lib/esm/store/common.js.map +1 -0
- package/lib/esm/store/conversation-state.js +2 -0
- package/lib/esm/store/conversation-state.js.map +1 -0
- package/lib/esm/store/doc-analyzer.js +2 -0
- package/lib/esm/store/doc-analyzer.js.map +1 -0
- package/lib/esm/store/dsl-workflow.js +2 -0
- package/lib/esm/store/dsl-workflow.js.map +1 -0
- package/lib/esm/store/index.js +14 -0
- package/lib/esm/store/index.js.map +1 -0
- package/lib/esm/store/object-types.js +95 -0
- package/lib/esm/store/object-types.js.map +1 -0
- package/lib/esm/store/schedule.js +29 -0
- package/lib/esm/store/schedule.js.map +1 -0
- package/lib/esm/store/signals.js +2 -0
- package/lib/esm/store/signals.js.map +1 -0
- package/lib/esm/store/store.js +160 -0
- package/lib/esm/store/store.js.map +1 -0
- package/lib/esm/store/temporalio.js +41 -0
- package/lib/esm/store/temporalio.js.map +1 -0
- package/lib/esm/store/worker.js +2 -0
- package/lib/esm/store/worker.js.map +1 -0
- package/lib/esm/store/workflow.js +228 -0
- package/lib/esm/store/workflow.js.map +1 -0
- package/lib/esm/sts-token-types.js +24 -0
- package/lib/esm/sts-token-types.js.map +1 -0
- package/lib/esm/tenant.js +2 -0
- package/lib/esm/tenant.js.map +1 -0
- package/lib/esm/tool-execution.js +5 -0
- package/lib/esm/tool-execution.js.map +1 -0
- package/lib/esm/training.js +11 -0
- package/lib/esm/training.js.map +1 -0
- package/lib/esm/transient-tokens.js +6 -0
- package/lib/esm/transient-tokens.js.map +1 -0
- package/lib/esm/user.js +22 -0
- package/lib/esm/user.js.map +1 -0
- package/lib/esm/utils/auth.js +11 -0
- package/lib/esm/utils/auth.js.map +1 -0
- package/lib/esm/utils/schemas.js +107 -0
- package/lib/esm/utils/schemas.js.map +1 -0
- package/lib/esm/utils/type-helpers.js +2 -0
- package/lib/esm/utils/type-helpers.js.map +1 -0
- package/lib/esm/versions.js +5 -0
- package/lib/esm/versions.js.map +1 -0
- package/lib/esm/workflow-analytics.js +49 -0
- package/lib/esm/workflow-analytics.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/types/Progress.d.ts +21 -0
- package/lib/types/Progress.d.ts.map +1 -0
- package/lib/types/access-control.d.ts +73 -0
- package/lib/types/access-control.d.ts.map +1 -0
- package/lib/types/analytics.d.ts +87 -0
- package/lib/types/analytics.d.ts.map +1 -0
- package/lib/types/apikey.d.ts +98 -0
- package/lib/types/apikey.d.ts.map +1 -0
- package/lib/types/apps.d.ts +236 -0
- package/lib/types/apps.d.ts.map +1 -0
- package/lib/types/ask-user.d.ts +32 -0
- package/lib/types/ask-user.d.ts.map +1 -0
- package/lib/types/channels.d.ts +21 -0
- package/lib/types/channels.d.ts.map +1 -0
- package/lib/types/common.d.ts +31 -0
- package/lib/types/common.d.ts.map +1 -0
- package/lib/types/data-platform.d.ts +860 -0
- package/lib/types/data-platform.d.ts.map +1 -0
- package/lib/types/email.d.ts +66 -0
- package/lib/types/email.d.ts.map +1 -0
- package/lib/types/environment.d.ts +106 -0
- package/lib/types/environment.d.ts.map +1 -0
- package/lib/types/facets.d.ts +34 -0
- package/lib/types/facets.d.ts.map +1 -0
- package/lib/types/group.d.ts +21 -0
- package/lib/types/group.d.ts.map +1 -0
- package/lib/types/index.d.ts +39 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/integrations.d.ts +60 -0
- package/lib/types/integrations.d.ts.map +1 -0
- package/lib/types/interaction.d.ts +958 -0
- package/lib/types/interaction.d.ts.map +1 -0
- package/lib/types/json-schema.d.ts +1 -0
- package/lib/types/json-schema.d.ts.map +1 -0
- package/lib/types/json.d.ts +1 -0
- package/lib/types/json.d.ts.map +1 -0
- package/lib/types/meters.d.ts +23 -0
- package/lib/types/meters.d.ts.map +1 -0
- package/lib/types/model_utility.d.ts +1 -0
- package/lib/types/model_utility.d.ts.map +1 -0
- package/lib/types/payload.d.ts +60 -0
- package/lib/types/payload.d.ts.map +1 -0
- package/lib/types/pending-asks.d.ts +93 -0
- package/lib/types/pending-asks.d.ts.map +1 -0
- package/lib/types/project.d.ts +179 -0
- package/lib/types/project.d.ts.map +1 -0
- package/lib/types/prompt.d.ts +78 -0
- package/lib/types/prompt.d.ts.map +1 -0
- package/lib/types/query.d.ts +118 -0
- package/lib/types/query.d.ts.map +1 -0
- package/lib/types/rate-limiter.d.ts +28 -0
- package/lib/types/rate-limiter.d.ts.map +1 -0
- package/lib/types/refs.d.ts +22 -0
- package/lib/types/refs.d.ts.map +1 -0
- package/lib/types/runs.d.ts +32 -0
- package/lib/types/runs.d.ts.map +1 -0
- package/lib/types/skill.d.ts +78 -0
- package/lib/types/skill.d.ts.map +1 -0
- package/lib/types/store/activity-catalog.d.ts +26 -0
- package/lib/types/store/activity-catalog.d.ts.map +1 -0
- package/lib/types/store/collections.d.ts +78 -0
- package/lib/types/store/collections.d.ts.map +1 -0
- package/lib/types/store/common.d.ts +22 -0
- package/lib/types/store/common.d.ts.map +1 -0
- package/lib/types/store/conversation-state.d.ts +120 -0
- package/lib/types/store/conversation-state.d.ts.map +1 -0
- package/lib/types/store/doc-analyzer.d.ts +140 -0
- package/lib/types/store/doc-analyzer.d.ts.map +1 -0
- package/lib/types/store/dsl-workflow.d.ts +244 -0
- package/lib/types/store/dsl-workflow.d.ts.map +1 -0
- package/lib/types/store/index.d.ts +13 -0
- package/lib/types/store/index.d.ts.map +1 -0
- package/lib/types/store/object-types.d.ts +23 -0
- package/lib/types/store/object-types.d.ts.map +1 -0
- package/lib/types/store/schedule.d.ts +182 -0
- package/lib/types/store/schedule.d.ts.map +1 -0
- package/lib/types/store/signals.d.ts +24 -0
- package/lib/types/store/signals.d.ts.map +1 -0
- package/lib/types/store/store.d.ts +407 -0
- package/lib/types/store/store.d.ts.map +1 -0
- package/lib/types/store/temporalio.d.ts +16 -0
- package/lib/types/store/temporalio.d.ts.map +1 -0
- package/lib/types/store/worker.d.ts +18 -0
- package/lib/types/store/worker.d.ts.map +1 -0
- package/lib/types/store/workflow.d.ts +730 -0
- package/lib/types/store/workflow.d.ts.map +1 -0
- package/lib/types/sts-token-types.d.ts +72 -0
- package/lib/types/sts-token-types.d.ts.map +1 -0
- package/lib/types/tenant.d.ts +10 -0
- package/lib/types/tenant.d.ts.map +1 -0
- package/lib/types/tool-execution.d.ts +45 -0
- package/lib/types/tool-execution.d.ts.map +1 -0
- package/lib/types/training.d.ts +38 -0
- package/lib/types/training.d.ts.map +1 -0
- package/lib/types/transient-tokens.d.ts +24 -0
- package/lib/types/transient-tokens.d.ts.map +1 -0
- package/lib/types/user.d.ts +116 -0
- package/lib/types/user.d.ts.map +1 -0
- package/lib/types/utils/auth.d.ts +3 -0
- package/lib/types/utils/auth.d.ts.map +1 -0
- package/lib/types/utils/schemas.d.ts +9 -0
- package/lib/types/utils/schemas.d.ts.map +1 -0
- package/lib/types/utils/type-helpers.d.ts +3 -0
- package/lib/types/utils/type-helpers.d.ts.map +1 -0
- package/lib/types/versions.d.ts +3 -0
- package/lib/types/versions.d.ts.map +1 -0
- package/lib/types/workflow-analytics.d.ts +777 -0
- package/lib/types/workflow-analytics.d.ts.map +1 -0
- package/lib/vertesia-common.js +2 -0
- package/lib/vertesia-common.js.map +1 -0
- package/package.json +54 -0
- package/src/Progress.ts +57 -0
- package/src/access-control.ts +98 -0
- package/src/analytics.ts +106 -0
- package/src/apikey.ts +116 -0
- package/src/apps.ts +296 -0
- package/src/ask-user.ts +35 -0
- package/src/channels.ts +70 -0
- package/src/common.ts +37 -0
- package/src/data-platform.ts +976 -0
- package/src/email.ts +80 -0
- package/src/environment.ts +137 -0
- package/src/facets.ts +44 -0
- package/src/group.ts +26 -0
- package/src/index.ts +40 -0
- package/src/integrations.ts +72 -0
- package/src/interaction.ts +1182 -0
- package/src/json-schema.ts +7 -0
- package/src/json.ts +4 -0
- package/src/meters.ts +30 -0
- package/src/model_utility.ts +1 -0
- package/src/payload.ts +83 -0
- package/src/pending-asks.ts +106 -0
- package/src/project.ts +263 -0
- package/src/prompt.ts +103 -0
- package/src/query.ts +137 -0
- package/src/rate-limiter.ts +34 -0
- package/src/refs.ts +30 -0
- package/src/runs.ts +36 -0
- package/src/skill.ts +90 -0
- package/src/store/activity-catalog.ts +44 -0
- package/src/store/collections.ts +87 -0
- package/src/store/common.ts +30 -0
- package/src/store/conversation-state.ts +146 -0
- package/src/store/doc-analyzer.ts +161 -0
- package/src/store/dsl-workflow.ts +288 -0
- package/src/store/index.ts +14 -0
- package/src/store/ms.d.ts +11 -0
- package/src/store/object-types.ts +127 -0
- package/src/store/schedule.ts +238 -0
- package/src/store/signals.ts +25 -0
- package/src/store/store.ts +579 -0
- package/src/store/temporalio.ts +54 -0
- package/src/store/worker.ts +19 -0
- package/src/store/workflow.test.ts +578 -0
- package/src/store/workflow.ts +973 -0
- package/src/sts-token-types.ts +117 -0
- package/src/tenant.ts +10 -0
- package/src/tool-execution.ts +47 -0
- package/src/training.ts +44 -0
- package/src/transient-tokens.ts +30 -0
- package/src/user.ts +153 -0
- package/src/utils/auth.ts +12 -0
- package/src/utils/schemas.ts +108 -0
- package/src/utils/type-helpers.ts +6 -0
- package/src/versions.ts +3 -0
- package/src/workflow-analytics.ts +925 -0
- package/tsconfig.dist.json +20 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { WorkflowExecutionPayload, WorkflowRunStatus } from "./workflow.js";
|
|
2
|
+
|
|
3
|
+
export interface PdfToRichtextOptions {
|
|
4
|
+
features: string[];
|
|
5
|
+
debug?: boolean;
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface PdfToRichTextWorkflowPayload extends Omit<WorkflowExecutionPayload, "vars"> {
|
|
10
|
+
vars: PdfToRichtextOptions;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Represents a image in a document that has been analyzed
|
|
15
|
+
*/
|
|
16
|
+
export interface DocImage {
|
|
17
|
+
id?: string;
|
|
18
|
+
page_number?: number;
|
|
19
|
+
description?: string;
|
|
20
|
+
is_meaningful?: boolean;
|
|
21
|
+
width?: number;
|
|
22
|
+
height?: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The export type formats for tables.
|
|
27
|
+
*/
|
|
28
|
+
export type ExportTableFormats = 'json' | 'csv' | 'xml';
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Represents a table in a document that has been analyzed
|
|
32
|
+
*/
|
|
33
|
+
export interface DocTable {
|
|
34
|
+
page_number?: number;
|
|
35
|
+
table_number?: number;
|
|
36
|
+
title?: string;
|
|
37
|
+
format: "application/csv" | "application/json";
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Represents a table in a document that has been analyzed in CSV format
|
|
42
|
+
*/
|
|
43
|
+
export interface DocTableCsv extends DocTable {
|
|
44
|
+
format: "application/csv";
|
|
45
|
+
title?: string;
|
|
46
|
+
data: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Represents a table in a document that has been analyzed in JSON format
|
|
51
|
+
*/
|
|
52
|
+
export interface DocTableJson extends DocTable {
|
|
53
|
+
format: "application/json";
|
|
54
|
+
title?: string;
|
|
55
|
+
data: Object[];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Output format for document processing workflows
|
|
60
|
+
*/
|
|
61
|
+
export type DocProcessorOutputFormat = "xml" | "markdown";
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Represents a document analysis run status
|
|
65
|
+
*/
|
|
66
|
+
export interface DocAnalyzeRunStatusResponse extends WorkflowRunStatus {
|
|
67
|
+
progress?: DocAnalyzerProgress;
|
|
68
|
+
/** The output format being used for processing (markdown or xml) */
|
|
69
|
+
output_format?: DocProcessorOutputFormat;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface DocAnalyzerResultResponse {
|
|
73
|
+
document?: string;
|
|
74
|
+
tables?: DocTableCsv[] | DocTableJson[];
|
|
75
|
+
images?: DocImage[];
|
|
76
|
+
annotated?: string | null;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface DocAnalyzerProgress {
|
|
80
|
+
pages: DocAnalyzerProgressStatus;
|
|
81
|
+
images: DocAnalyzerProgressStatus;
|
|
82
|
+
tables: DocAnalyzerProgressStatus;
|
|
83
|
+
visuals: DocAnalyzerProgressStatus;
|
|
84
|
+
started_at?: number;
|
|
85
|
+
percent: number;
|
|
86
|
+
/** The output format being used for processing (markdown or xml) */
|
|
87
|
+
output_format?: DocProcessorOutputFormat;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
interface DocAnalyzerProgressStatus {
|
|
91
|
+
total: number;
|
|
92
|
+
processed: number;
|
|
93
|
+
success: number;
|
|
94
|
+
failed: number;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Adapt Tables Parameters, part of the request
|
|
99
|
+
*/
|
|
100
|
+
export interface AdaptTablesParams {
|
|
101
|
+
/**
|
|
102
|
+
* JSON Schema to to convert the table into
|
|
103
|
+
*/
|
|
104
|
+
target_schema: string;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Natural language description of the type item the table are composed of
|
|
108
|
+
*/
|
|
109
|
+
item_name: string;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Natural language description of the type of table or item to convert
|
|
113
|
+
*/
|
|
114
|
+
instructions?: string;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Format to return the data in (csv, json)
|
|
118
|
+
*/
|
|
119
|
+
format?: "csv" | "json";
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Process the table as a whole or by page
|
|
123
|
+
*/
|
|
124
|
+
process_as?: "page" | "table";
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Process the table as a CSV file
|
|
128
|
+
*/
|
|
129
|
+
process_as_csv?: boolean;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
interface DocAnalyzerRequestBase {
|
|
133
|
+
synchronous?: boolean;
|
|
134
|
+
|
|
135
|
+
notify_endpoints?: string[];
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* What environment to use to run the request
|
|
139
|
+
* If none specified the project embedded environment will be used
|
|
140
|
+
*/
|
|
141
|
+
environment?: string;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface AdaptTablesRequest extends DocAnalyzerRequestBase, AdaptTablesParams {}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Get Adapted Tables Request
|
|
148
|
+
* @param raw If true, the raw data will be returned
|
|
149
|
+
* @param format The format to return the data in (csv, json)
|
|
150
|
+
*/
|
|
151
|
+
export interface GetAdaptedTablesRequestQuery {
|
|
152
|
+
raw?: boolean;
|
|
153
|
+
format: "csv" | "json";
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* The adapted table result format
|
|
157
|
+
*/
|
|
158
|
+
export interface AdaptedTable {
|
|
159
|
+
comment?: string;
|
|
160
|
+
data: Record<string, any>[];
|
|
161
|
+
}
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import { StringValue } from "ms";
|
|
2
|
+
import { BaseObject } from "./common.js";
|
|
3
|
+
import { WorkflowExecutionPayload } from "./index.js";
|
|
4
|
+
import { ParentClosePolicyType } from "./temporalio.js";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* The payload sent when starting a workflow from the temporal client to the workflow instance.
|
|
9
|
+
*/
|
|
10
|
+
export interface DSLWorkflowExecutionPayload extends WorkflowExecutionPayload {
|
|
11
|
+
/**
|
|
12
|
+
* The workflow definition to be used by the DSL workflow.
|
|
13
|
+
* If a dsl workflow is executed and no definition is provided the workflow will fail.
|
|
14
|
+
*/
|
|
15
|
+
workflow: DSLWorkflowSpec;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The payload for a DSL activity options.
|
|
20
|
+
*
|
|
21
|
+
* @see ActivityOptions in @temporalio/common
|
|
22
|
+
*/
|
|
23
|
+
export interface DSLActivityOptions {
|
|
24
|
+
startToCloseTimeout?: StringValue | number;
|
|
25
|
+
scheduleToStartTimeout?: StringValue | number;
|
|
26
|
+
scheduleToCloseTimeout?: StringValue | number;
|
|
27
|
+
retry?: DSLRetryPolicy;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The payload for a DSL retry policy.
|
|
32
|
+
*
|
|
33
|
+
* @see RetryPolicy in @temporalio/common
|
|
34
|
+
*/
|
|
35
|
+
export interface DSLRetryPolicy {
|
|
36
|
+
backoffCoefficient?: number;
|
|
37
|
+
initialInterval?: StringValue | number;
|
|
38
|
+
maximumAttempts?: number;
|
|
39
|
+
maximumInterval?: StringValue | number;
|
|
40
|
+
nonRetryableErrorTypes?: string[];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The payload for a DSL activity execution.
|
|
45
|
+
*/
|
|
46
|
+
export interface DSLActivityExecutionPayload<ParamsT extends Record<string, any>> extends WorkflowExecutionPayload {
|
|
47
|
+
activity: DSLActivitySpec;
|
|
48
|
+
params: ParamsT;
|
|
49
|
+
workflow_name: string;
|
|
50
|
+
debug_mode?: boolean;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
export type ImportSpec = (string | Record<string, string>)[];
|
|
55
|
+
export interface ActivityFetchSpec {
|
|
56
|
+
/**
|
|
57
|
+
* The data provider name
|
|
58
|
+
*/
|
|
59
|
+
type: "document" | "document_type" | "interaction_run";
|
|
60
|
+
/**
|
|
61
|
+
* An optional URI to the data source.
|
|
62
|
+
*/
|
|
63
|
+
source?: string;
|
|
64
|
+
/**
|
|
65
|
+
* The query to be executed by the data provider
|
|
66
|
+
*/
|
|
67
|
+
query: Record<string, any>;
|
|
68
|
+
/**
|
|
69
|
+
* a string of space separated field names.
|
|
70
|
+
* Prefix a field name with "-" to exclude it from the result.
|
|
71
|
+
*/
|
|
72
|
+
select?: string;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* The number of results to return. If the result is limited to 1 the result will be a single object
|
|
76
|
+
*/
|
|
77
|
+
limit?: number;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* How to handle not found objects.
|
|
81
|
+
* 1. ignore - Ignore and return an empty array for multi objects query (or undefined for single object query) or empty array for multiple objects throw an error.
|
|
82
|
+
* 2. throw - Throw an error if the object or no objects are found.
|
|
83
|
+
*/
|
|
84
|
+
on_not_found?: "ignore" | "throw";
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface DSLWorkflowStepBase {
|
|
88
|
+
/**
|
|
89
|
+
* The type fo the step.
|
|
90
|
+
* If not set defaults to "activity"
|
|
91
|
+
*/
|
|
92
|
+
type: "activity" | "workflow";
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface DSLActivitySpec<PARAMS extends Record<string, any> = Record<string, any>> {
|
|
96
|
+
/**
|
|
97
|
+
* The name of the activity function
|
|
98
|
+
*/
|
|
99
|
+
name: string;
|
|
100
|
+
/**
|
|
101
|
+
* Title of the activity to be displayed in the UI workflow builder
|
|
102
|
+
*/
|
|
103
|
+
title?: string;
|
|
104
|
+
/**
|
|
105
|
+
* The description of the activity to e displayed in the UI workflow builder
|
|
106
|
+
*/
|
|
107
|
+
description?: string;
|
|
108
|
+
/**
|
|
109
|
+
* Activities parameters. These parameters can be either literals
|
|
110
|
+
* (hardcoded strings, numbers, booleans, objects, arrays etc.), either
|
|
111
|
+
* references to the workflow variables.
|
|
112
|
+
* The workflow variables are built from the workflow params (e.g. the workflow configuration)
|
|
113
|
+
* and from the result of the previous activities.
|
|
114
|
+
*/
|
|
115
|
+
params?: PARAMS;
|
|
116
|
+
/**
|
|
117
|
+
* The name of the workflow variable that will store the result of the activity
|
|
118
|
+
* If not specified the result will not be stored
|
|
119
|
+
* The parameters describe how the actual parameters will be obtained from the workflow execution vars.
|
|
120
|
+
* since it may contain references to workflow execution vars.
|
|
121
|
+
*/
|
|
122
|
+
output?: string;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* A JSON expression which evaluate to true or false similar to mongo matches.
|
|
126
|
+
* We support for now basic expression like: $true, $false, $eq, $ne, $gt, $gte, $lt, $lte, $in, $nin, $regexp
|
|
127
|
+
* {$eq: {name: value}},
|
|
128
|
+
* Ex: {$eq: {wfVarName: value}}
|
|
129
|
+
*/
|
|
130
|
+
condition?: Record<string, any>;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* The import spec is used to import data from workflow variables.
|
|
134
|
+
* The import spec is a list of variable names to import from the workflow context.
|
|
135
|
+
* You can also use objects to rename the imported variables, or to reference an expression.
|
|
136
|
+
* Example:
|
|
137
|
+
* ["runId", {"typeId": "docType.id"}]
|
|
138
|
+
*/
|
|
139
|
+
import?: ImportSpec;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* The fetch phase is used to fetch data from external sources.
|
|
143
|
+
*/
|
|
144
|
+
fetch?: Record<string, ActivityFetchSpec>;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Projection to apply to the result. Not all activities support this.
|
|
148
|
+
*/
|
|
149
|
+
projection?: never | Record<string, any>;
|
|
150
|
+
|
|
151
|
+
// ---------- Optional features not implemented in a first step ------------
|
|
152
|
+
/**
|
|
153
|
+
* If true the activity will be executed in parallel with the other activities.
|
|
154
|
+
* (i.e. the workflow will not wait for the activity to finish before starting the next one)
|
|
155
|
+
*/
|
|
156
|
+
parallel?: boolean;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Await for a parallel activity execution to return.
|
|
160
|
+
*/
|
|
161
|
+
await?: string; //the activity name to await
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Activity options for configuring the activity execution, which overrides the activity options
|
|
165
|
+
* defined at workflow level.
|
|
166
|
+
*/
|
|
167
|
+
options?: DSLActivityOptions;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export interface DSLActivityStep<PARAMS extends Record<string, any> = Record<string, any>> extends DSLActivitySpec<PARAMS>, DSLWorkflowStepBase {
|
|
171
|
+
type: "activity";
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export interface DSLChildWorkflowStep extends DSLWorkflowStepBase {
|
|
175
|
+
type: "workflow";
|
|
176
|
+
// the workflow endpoint to run
|
|
177
|
+
name: string;
|
|
178
|
+
/**
|
|
179
|
+
* The parameters to pass to the child workflow.
|
|
180
|
+
* These parameters will be merged over the parent workflow vars and passed altogether to the child workflow.
|
|
181
|
+
*/
|
|
182
|
+
vars?: Record<string, any>;
|
|
183
|
+
// whether or not to wait for the workflow to finish.
|
|
184
|
+
// default is false. (the parent workflow will await for the workflow to finish)
|
|
185
|
+
async?: boolean;
|
|
186
|
+
/**
|
|
187
|
+
* The name of the workflow variable that will store the result of the child workflow (if async the workflow id is stored)
|
|
188
|
+
* If not specified the result will not be stored
|
|
189
|
+
* The parameters describe how the actual parameters will be obtained from the workflow execution vars.
|
|
190
|
+
* since it may contain references to workflow execution vars.
|
|
191
|
+
*/
|
|
192
|
+
output?: string;
|
|
193
|
+
/**
|
|
194
|
+
* In case the dslWorkflow is used as a child workflow the spec is used to define the child workflow.
|
|
195
|
+
* If spec is defined then the name must be "dslWorkflow"
|
|
196
|
+
*/
|
|
197
|
+
spec?: DSLWorkflowSpec;
|
|
198
|
+
/**
|
|
199
|
+
* If true, copy the parent's workspace artifacts (scripts/, files/, skills/, docs/, out/)
|
|
200
|
+
* to the child workflow's agent space before execution. Defaults to true.
|
|
201
|
+
* conversation.json and tools.json are never copied.
|
|
202
|
+
*/
|
|
203
|
+
inherit_artifacts?: boolean;
|
|
204
|
+
options?: {
|
|
205
|
+
memo?: Record<string, any>;
|
|
206
|
+
retry?: DSLRetryPolicy;
|
|
207
|
+
searchAttributes?: Record<string, string[] | number[] | boolean[] | Date[]>;
|
|
208
|
+
taskQueue?: string;
|
|
209
|
+
workflowExecutionTimeout?: StringValue | number;
|
|
210
|
+
workflowRunTimeout?: StringValue | number;
|
|
211
|
+
workflowTaskTimeout?: StringValue | number;
|
|
212
|
+
workflowId?: string;
|
|
213
|
+
cronSchedule?: string;
|
|
214
|
+
parentClosePolicy?: ParentClosePolicyType;
|
|
215
|
+
//TODO
|
|
216
|
+
//cancellationType
|
|
217
|
+
//versioningIntent
|
|
218
|
+
//workflowIdReusePolicy
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export type DSLWorkflowStep = DSLActivityStep | DSLChildWorkflowStep;
|
|
223
|
+
|
|
224
|
+
export interface DSLWorkflowSpecBase {
|
|
225
|
+
name: string;
|
|
226
|
+
description?: string;
|
|
227
|
+
tags?: string[];
|
|
228
|
+
|
|
229
|
+
steps?: DSLWorkflowStep[] | never;
|
|
230
|
+
/**
|
|
231
|
+
* @deprecated use steps instead
|
|
232
|
+
*/
|
|
233
|
+
activities?: DSLActivitySpec[] | never;
|
|
234
|
+
|
|
235
|
+
// a dictionary of vars to initialize the workflow execution vars
|
|
236
|
+
// Initial vars cannot contains references to other vars
|
|
237
|
+
vars: Record<string, any>;
|
|
238
|
+
// activity options that apply to all activities within the workflow
|
|
239
|
+
options?: DSLActivityOptions;
|
|
240
|
+
// the name of the variable that will hold the workflow result
|
|
241
|
+
// if not specified "result" will be assumed
|
|
242
|
+
result?: string;
|
|
243
|
+
debug_mode?: boolean;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export interface DSLWorkflowSpecWithSteps extends DSLWorkflowSpecBase {
|
|
247
|
+
steps: DSLWorkflowStep[];
|
|
248
|
+
/**
|
|
249
|
+
* @deprecated use steps instead
|
|
250
|
+
*/
|
|
251
|
+
activities?: never;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* @deprecated use steps instead
|
|
256
|
+
*/
|
|
257
|
+
export interface DSLWorkflowSpecWithActivities extends DSLWorkflowSpecBase {
|
|
258
|
+
steps?: never;
|
|
259
|
+
/**
|
|
260
|
+
* @deprecated use steps instead
|
|
261
|
+
*/
|
|
262
|
+
activities: DSLActivitySpec[];
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* activities and steps fields are mutually exclusive
|
|
267
|
+
* steps was added after activities and may contain a mix of activities and other tasks like exec child workflows.
|
|
268
|
+
* For backward compatibility we keep the activities field as a fallback but one should use one or the other not both.
|
|
269
|
+
*/
|
|
270
|
+
export type DSLWorkflowSpec = DSLWorkflowSpecWithSteps | DSLWorkflowSpecWithActivities;
|
|
271
|
+
|
|
272
|
+
export interface DSLWorkflowDefinition extends BaseObject, DSLWorkflowSpecBase {
|
|
273
|
+
// an optional JSON schema to describe the input vars of the workflow.
|
|
274
|
+
input_schema?: Record<string, any>;
|
|
275
|
+
activities?: DSLActivitySpec[];
|
|
276
|
+
steps?: DSLWorkflowStep[];
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export interface WorkflowDefinitionRef {
|
|
280
|
+
id: string;
|
|
281
|
+
name: string;
|
|
282
|
+
description?: string;
|
|
283
|
+
tags?: string[];
|
|
284
|
+
created_at: Date;
|
|
285
|
+
updated_at: Date;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export const WorkflowDefinitionRefPopulate = "id name description tags created_at updated_at"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from "./activity-catalog.js";
|
|
2
|
+
export * from "./collections.js";
|
|
3
|
+
export * from "./common.js";
|
|
4
|
+
export * from "./conversation-state.js";
|
|
5
|
+
export * from "./doc-analyzer.js";
|
|
6
|
+
export * from "./dsl-workflow.js";
|
|
7
|
+
export * from "./object-types.js";
|
|
8
|
+
export * from "./schedule.js";
|
|
9
|
+
export * from "./signals.js";
|
|
10
|
+
export * from "./store.js";
|
|
11
|
+
export * from "./temporalio.js";
|
|
12
|
+
export * from "./worker.js";
|
|
13
|
+
export * from "./workflow.js";
|
|
14
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for the `ms` package (version 3.0.0-canary.1)
|
|
3
|
+
*/
|
|
4
|
+
declare module "ms" {
|
|
5
|
+
declare type Unit = 'Years' | 'Year' | 'Yrs' | 'Yr' | 'Y' | 'Weeks' | 'Week' | 'W' | 'Days' | 'Day' | 'D' | 'Hours' | 'Hour' | 'Hrs' | 'Hr' | 'H' | 'Minutes' | 'Minute' | 'Mins' | 'Min' | 'M' | 'Seconds' | 'Second' | 'Secs' | 'Sec' | 's' | 'Milliseconds' | 'Millisecond' | 'Msecs' | 'Msec' | 'Ms';
|
|
6
|
+
declare type UnitAnyCase = Unit | Uppercase<Unit> | Lowercase<Unit>;
|
|
7
|
+
export declare type StringValue = `${number}` | `${number}${UnitAnyCase}` | `${number} ${UnitAnyCase}`;
|
|
8
|
+
declare function ms(value: StringValue, options?: Options): number;
|
|
9
|
+
declare function ms(value: number, options?: Options): string;
|
|
10
|
+
export default ms;
|
|
11
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import type { JSONSchemaType } from "ajv"
|
|
2
|
+
|
|
3
|
+
/*Default JSON Schema type for rendition*/
|
|
4
|
+
|
|
5
|
+
export interface RenditionProperties {
|
|
6
|
+
mime_type: string,
|
|
7
|
+
source_etag?: string,
|
|
8
|
+
height?: number,
|
|
9
|
+
width?: number,
|
|
10
|
+
multipart?: boolean,
|
|
11
|
+
total_parts?: number,
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const RenditionSchema: JSONSchemaType<RenditionProperties> = {
|
|
15
|
+
|
|
16
|
+
type: "object",
|
|
17
|
+
description: "Represent a rendition of a file stored in an object. It will be stored as a separate object in the database.",
|
|
18
|
+
properties: {
|
|
19
|
+
mime_type: {
|
|
20
|
+
type: "string",
|
|
21
|
+
description: "The format of the rendition. This is a MIME type."
|
|
22
|
+
},
|
|
23
|
+
source_etag: {
|
|
24
|
+
type: "string",
|
|
25
|
+
description: "The ETag of the file used for the rendition.",
|
|
26
|
+
nullable: true
|
|
27
|
+
},
|
|
28
|
+
height: {
|
|
29
|
+
type: "integer",
|
|
30
|
+
description: "The height of the rendition",
|
|
31
|
+
nullable: true
|
|
32
|
+
},
|
|
33
|
+
width: {
|
|
34
|
+
type: "integer",
|
|
35
|
+
description: "The width of the rendition",
|
|
36
|
+
nullable: true
|
|
37
|
+
},
|
|
38
|
+
multipart: {
|
|
39
|
+
type: "boolean",
|
|
40
|
+
description: "If the rendition is a multi-part rendition",
|
|
41
|
+
nullable: true,
|
|
42
|
+
default: false
|
|
43
|
+
},
|
|
44
|
+
total_parts: {
|
|
45
|
+
type: "integer",
|
|
46
|
+
description: "The total number of parts in the rendition",
|
|
47
|
+
nullable: true
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
required: ["mime_type"],
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
export interface DocumentPartProperties {
|
|
56
|
+
|
|
57
|
+
source_etag?: string,
|
|
58
|
+
part_number: number,
|
|
59
|
+
title?: string,
|
|
60
|
+
source_line_start?: number,
|
|
61
|
+
source_line_end?: number,
|
|
62
|
+
type?: 'text' | 'image' | 'table' | 'chart' | 'diagram' | 'code' | 'other',
|
|
63
|
+
page_number?: number,
|
|
64
|
+
description?: string,
|
|
65
|
+
height?: number,
|
|
66
|
+
width?: number,
|
|
67
|
+
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
export const DocumentPartSchema: JSONSchemaType<DocumentPartProperties> = {
|
|
72
|
+
type: "object",
|
|
73
|
+
description: "Represent a semantic chunk of a document",
|
|
74
|
+
properties: {
|
|
75
|
+
source_etag: {
|
|
76
|
+
type: "string",
|
|
77
|
+
description: "The ETag of the file used for the rendition.",
|
|
78
|
+
nullable: true
|
|
79
|
+
},
|
|
80
|
+
part_number: {
|
|
81
|
+
type: "integer",
|
|
82
|
+
description: "The part number of the chunk",
|
|
83
|
+
},
|
|
84
|
+
title: {
|
|
85
|
+
type: "string",
|
|
86
|
+
description: "The title of the chunk",
|
|
87
|
+
nullable: true
|
|
88
|
+
},
|
|
89
|
+
source_line_start: {
|
|
90
|
+
type: "integer",
|
|
91
|
+
description: "The line number where the chunk starts",
|
|
92
|
+
nullable: true
|
|
93
|
+
},
|
|
94
|
+
source_line_end: {
|
|
95
|
+
type: "integer",
|
|
96
|
+
description: "The line number where the chunk ends",
|
|
97
|
+
nullable: true
|
|
98
|
+
},
|
|
99
|
+
type: {
|
|
100
|
+
type: "string",
|
|
101
|
+
description: "The type of the chunk",
|
|
102
|
+
enum: ['text', 'image', 'table', 'chart', 'diagram', 'code', 'other'],
|
|
103
|
+
nullable: true
|
|
104
|
+
},
|
|
105
|
+
page_number: {
|
|
106
|
+
type: "integer",
|
|
107
|
+
description: "The page number of the document part",
|
|
108
|
+
nullable: true
|
|
109
|
+
},
|
|
110
|
+
description: {
|
|
111
|
+
type: "string",
|
|
112
|
+
description: "The description of the document part, if it's an image, the exhaustive description of the image",
|
|
113
|
+
nullable: true
|
|
114
|
+
},
|
|
115
|
+
height: {
|
|
116
|
+
type: "integer",
|
|
117
|
+
description: "The height of the rendition",
|
|
118
|
+
nullable: true
|
|
119
|
+
},
|
|
120
|
+
width: {
|
|
121
|
+
type: "integer",
|
|
122
|
+
description: "The width of the rendition",
|
|
123
|
+
nullable: true
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
required: ["part_number"],
|
|
127
|
+
}
|