extend-ai 1.11.0 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BaseClient.js +2 -2
- package/Client.d.ts +33 -14
- package/Client.js +33 -14
- package/LICENSE +21 -0
- package/api/client/requests/ExtractRequest.d.ts +23 -4
- package/api/client/requests/ParseRequest.d.ts +1 -1
- package/api/resources/batchProcessorRun/client/Client.d.ts +2 -2
- package/api/resources/batchProcessorRun/client/Client.js +2 -2
- package/api/resources/batchProcessorRun/client/requests/BatchProcessorRunGetRequest.d.ts +1 -1
- package/api/resources/batchRuns/client/Client.d.ts +1 -1
- package/api/resources/batchRuns/client/Client.js +1 -1
- package/api/resources/classifierVersions/client/Client.d.ts +1 -1
- package/api/resources/classifierVersions/client/Client.js +1 -1
- package/api/resources/classifierVersions/client/requests/ClassifierVersionsCreateRequest.d.ts +1 -1
- package/api/resources/classifierVersions/client/requests/ClassifierVersionsListRequest.d.ts +1 -1
- package/api/resources/classifierVersions/client/requests/ClassifierVersionsRetrieveRequest.d.ts +1 -1
- package/api/resources/classifiers/client/Client.d.ts +1 -1
- package/api/resources/classifiers/client/Client.js +1 -1
- package/api/resources/classifiers/client/requests/ClassifiersListRequest.d.ts +1 -1
- package/api/resources/classifiers/client/requests/ClassifiersRetrieveRequest.d.ts +1 -1
- package/api/resources/classifiers/client/requests/ClassifiersUpdateRequest.d.ts +1 -1
- package/api/resources/classifyRuns/client/Client.d.ts +3 -3
- package/api/resources/classifyRuns/client/Client.js +3 -3
- package/api/resources/classifyRuns/client/requests/ClassifyRunsCancelRequest.d.ts +1 -1
- package/api/resources/classifyRuns/client/requests/ClassifyRunsDeleteRequest.d.ts +1 -1
- package/api/resources/classifyRuns/client/requests/ClassifyRunsListRequest.d.ts +1 -1
- package/api/resources/classifyRuns/client/requests/ClassifyRunsRetrieveRequest.d.ts +1 -1
- package/api/resources/editRuns/client/Client.d.ts +2 -2
- package/api/resources/editRuns/client/Client.js +2 -2
- package/api/resources/editRuns/client/requests/EditRunsDeleteRequest.d.ts +1 -1
- package/api/resources/editRuns/client/requests/EditRunsRetrieveRequest.d.ts +1 -1
- package/api/resources/editSchemas/client/Client.d.ts +2 -2
- package/api/resources/editSchemas/client/Client.js +2 -2
- package/api/resources/editTemplates/client/Client.d.ts +1 -1
- package/api/resources/editTemplates/client/Client.js +1 -1
- package/api/resources/editTemplates/client/requests/EditTemplatesRetrieveRequest.d.ts +1 -1
- package/api/resources/evaluationSetItems/client/Client.d.ts +3 -3
- package/api/resources/evaluationSetItems/client/Client.js +3 -3
- package/api/resources/evaluationSetItems/client/requests/EvaluationSetItemsCreateRequest.d.ts +1 -1
- package/api/resources/evaluationSetItems/client/requests/EvaluationSetItemsDeleteRequest.d.ts +1 -1
- package/api/resources/evaluationSetItems/client/requests/EvaluationSetItemsListRequest.d.ts +1 -1
- package/api/resources/evaluationSetItems/client/requests/EvaluationSetItemsRetrieveRequest.d.ts +1 -1
- package/api/resources/evaluationSetItems/client/requests/EvaluationSetItemsUpdateRequest.d.ts +1 -1
- package/api/resources/evaluationSetRuns/client/Client.d.ts +3 -3
- package/api/resources/evaluationSetRuns/client/Client.js +3 -3
- package/api/resources/evaluationSetRuns/client/requests/EvaluationSetRunsCreateRequest.d.ts +1 -1
- package/api/resources/evaluationSetRuns/client/requests/EvaluationSetRunsRetrieveRequest.d.ts +1 -1
- package/api/resources/evaluationSets/client/Client.d.ts +4 -4
- package/api/resources/evaluationSets/client/Client.js +4 -4
- package/api/resources/evaluationSets/client/requests/EvaluationSetsListRequest.d.ts +1 -1
- package/api/resources/evaluationSets/client/requests/EvaluationSetsRetrieveRequest.d.ts +1 -1
- package/api/resources/extractRuns/client/Client.d.ts +3 -3
- package/api/resources/extractRuns/client/Client.js +3 -3
- package/api/resources/extractRuns/client/requests/ExtractRunsCancelRequest.d.ts +1 -1
- package/api/resources/extractRuns/client/requests/ExtractRunsCreateRequest.d.ts +2 -2
- package/api/resources/extractRuns/client/requests/ExtractRunsDeleteRequest.d.ts +1 -1
- package/api/resources/extractRuns/client/requests/ExtractRunsListRequest.d.ts +1 -1
- package/api/resources/extractRuns/client/requests/ExtractRunsRetrieveRequest.d.ts +1 -1
- package/api/resources/extractRuns/types/ExtractRunsCreateRequestExtractor.d.ts +1 -1
- package/api/resources/extractorVersions/client/Client.d.ts +1 -1
- package/api/resources/extractorVersions/client/Client.js +1 -1
- package/api/resources/extractorVersions/client/requests/ExtractorVersionsCreateRequest.d.ts +1 -1
- package/api/resources/extractorVersions/client/requests/ExtractorVersionsListRequest.d.ts +1 -1
- package/api/resources/extractorVersions/client/requests/ExtractorVersionsRetrieveRequest.d.ts +1 -1
- package/api/resources/extractors/client/Client.d.ts +22 -6
- package/api/resources/extractors/client/Client.js +22 -6
- package/api/resources/extractors/client/requests/ExtractorsCreateRequest.d.ts +21 -5
- package/api/resources/extractors/client/requests/ExtractorsListRequest.d.ts +1 -1
- package/api/resources/extractors/client/requests/ExtractorsRetrieveRequest.d.ts +1 -1
- package/api/resources/extractors/client/requests/ExtractorsUpdateRequest.d.ts +1 -1
- package/api/resources/files/client/Client.d.ts +3 -3
- package/api/resources/files/client/Client.js +3 -3
- package/api/resources/files/client/requests/FilesDeleteRequest.d.ts +1 -1
- package/api/resources/files/client/requests/FilesListRequest.d.ts +1 -1
- package/api/resources/files/client/requests/FilesRetrieveRequest.d.ts +1 -1
- package/api/resources/files/client/requests/FilesUploadRequest.d.ts +1 -1
- package/api/resources/parseRuns/client/Client.d.ts +28 -3
- package/api/resources/parseRuns/client/Client.js +81 -3
- package/api/resources/parseRuns/client/requests/ParseRunsCancelRequest.d.ts +8 -0
- package/api/resources/parseRuns/client/requests/ParseRunsCancelRequest.js +3 -0
- package/api/resources/parseRuns/client/requests/ParseRunsDeleteRequest.d.ts +1 -1
- package/api/resources/parseRuns/client/requests/ParseRunsListRequest.d.ts +1 -1
- package/api/resources/parseRuns/client/requests/ParseRunsRetrieveRequest.d.ts +1 -1
- package/api/resources/parseRuns/client/requests/index.d.ts +1 -0
- package/api/resources/parseRuns/types/ParseRunsListResponse.d.ts +1 -1
- package/api/resources/processor/client/Client.d.ts +1 -1
- package/api/resources/processor/client/Client.js +1 -1
- package/api/resources/processor/client/requests/ProcessorListRequest.d.ts +1 -1
- package/api/resources/processor/client/requests/ProcessorUpdateRequest.d.ts +1 -1
- package/api/resources/processorRun/client/Client.d.ts +4 -4
- package/api/resources/processorRun/client/Client.js +4 -4
- package/api/resources/processorRun/client/requests/ProcessorRunCancelRequest.d.ts +1 -1
- package/api/resources/processorRun/client/requests/ProcessorRunCreateRequest.d.ts +2 -2
- package/api/resources/processorRun/client/requests/ProcessorRunDeleteRequest.d.ts +1 -1
- package/api/resources/processorRun/client/requests/ProcessorRunGetRequest.d.ts +1 -1
- package/api/resources/processorRun/client/requests/ProcessorRunListRequest.d.ts +1 -1
- package/api/resources/processorVersion/client/Client.d.ts +1 -1
- package/api/resources/processorVersion/client/Client.js +1 -1
- package/api/resources/processorVersion/client/requests/ProcessorVersionCreateRequest.d.ts +1 -1
- package/api/resources/processorVersion/client/requests/ProcessorVersionGetRequest.d.ts +1 -1
- package/api/resources/processorVersion/client/requests/ProcessorVersionListRequest.d.ts +1 -1
- package/api/resources/splitRuns/client/Client.d.ts +3 -3
- package/api/resources/splitRuns/client/Client.js +3 -3
- package/api/resources/splitRuns/client/requests/SplitRunsCancelRequest.d.ts +1 -1
- package/api/resources/splitRuns/client/requests/SplitRunsDeleteRequest.d.ts +1 -1
- package/api/resources/splitRuns/client/requests/SplitRunsListRequest.d.ts +1 -1
- package/api/resources/splitRuns/client/requests/SplitRunsRetrieveRequest.d.ts +1 -1
- package/api/resources/splitterVersions/client/Client.d.ts +1 -1
- package/api/resources/splitterVersions/client/Client.js +1 -1
- package/api/resources/splitterVersions/client/requests/SplitterVersionsCreateRequest.d.ts +1 -1
- package/api/resources/splitterVersions/client/requests/SplitterVersionsListRequest.d.ts +1 -1
- package/api/resources/splitterVersions/client/requests/SplitterVersionsRetrieveRequest.d.ts +1 -1
- package/api/resources/splitters/client/Client.d.ts +1 -1
- package/api/resources/splitters/client/Client.js +1 -1
- package/api/resources/splitters/client/requests/SplittersListRequest.d.ts +1 -1
- package/api/resources/splitters/client/requests/SplittersRetrieveRequest.d.ts +1 -1
- package/api/resources/splitters/client/requests/SplittersUpdateRequest.d.ts +1 -1
- package/api/resources/webhookEndpoints/client/Client.d.ts +3 -3
- package/api/resources/webhookEndpoints/client/Client.js +3 -3
- package/api/resources/webhookEndpoints/client/requests/WebhookEndpointsDeleteRequest.d.ts +1 -1
- package/api/resources/webhookEndpoints/client/requests/WebhookEndpointsListRequest.d.ts +1 -1
- package/api/resources/webhookEndpoints/client/requests/WebhookEndpointsRetrieveRequest.d.ts +1 -1
- package/api/resources/webhookEndpoints/client/requests/WebhookEndpointsUpdateRequest.d.ts +1 -1
- package/api/resources/webhookSubscriptions/client/Client.d.ts +1 -1
- package/api/resources/webhookSubscriptions/client/Client.js +1 -1
- package/api/resources/webhookSubscriptions/client/requests/WebhookSubscriptionsDeleteRequest.d.ts +1 -1
- package/api/resources/webhookSubscriptions/client/requests/WebhookSubscriptionsListRequest.d.ts +1 -1
- package/api/resources/webhookSubscriptions/client/requests/WebhookSubscriptionsRetrieveRequest.d.ts +1 -1
- package/api/resources/webhookSubscriptions/client/requests/WebhookSubscriptionsUpdateRequest.d.ts +1 -1
- package/api/resources/workflowRuns/client/Client.d.ts +6 -6
- package/api/resources/workflowRuns/client/Client.js +6 -6
- package/api/resources/workflowRuns/client/requests/WorkflowRunsCancelRequest.d.ts +1 -1
- package/api/resources/workflowRuns/client/requests/WorkflowRunsCreateBatchRequest.d.ts +2 -0
- package/api/resources/workflowRuns/client/requests/WorkflowRunsCreateRequest.d.ts +1 -1
- package/api/resources/workflowRuns/client/requests/WorkflowRunsDeleteRequest.d.ts +1 -1
- package/api/resources/workflowRuns/client/requests/WorkflowRunsListRequest.d.ts +2 -2
- package/api/resources/workflowRuns/client/requests/WorkflowRunsRetrieveRequest.d.ts +1 -1
- package/api/resources/workflowRuns/client/requests/WorkflowRunsUpdateRequest.d.ts +1 -1
- package/api/resources/workflowRuns/types/WorkflowRunsCreateRequestFile.d.ts +1 -1
- package/api/resources/workflowVersions/client/Client.d.ts +1 -1
- package/api/resources/workflowVersions/client/Client.js +1 -1
- package/api/resources/workflowVersions/client/requests/WorkflowVersionsCreateRequest.d.ts +1 -1
- package/api/resources/workflows/client/Client.d.ts +1 -1
- package/api/resources/workflows/client/Client.js +1 -1
- package/api/resources/workflows/client/requests/WorkflowsCreateRequest.d.ts +1 -1
- package/api/resources/workflows/client/requests/WorkflowsUpdateRequest.d.ts +1 -1
- package/api/types/ApiError.d.ts +1 -1
- package/api/types/BlockMetadata.d.ts +6 -0
- package/api/types/BlockMetadataSheet.d.ts +9 -0
- package/api/types/BlockMetadataSheet.js +3 -0
- package/api/types/ChunkMetadata.d.ts +4 -0
- package/api/types/ClassificationNextEntry.d.ts +1 -1
- package/api/types/ClassifyBaseProcessor.d.ts +1 -1
- package/api/types/ClassifyBaseProcessor.js +1 -1
- package/api/types/ClassifyConfig.d.ts +1 -1
- package/api/types/ClassifyOverrideConfig.d.ts +1 -1
- package/api/types/ClassifyRun.d.ts +2 -2
- package/api/types/ClassifyRunSummary.d.ts +2 -2
- package/api/types/ClassifyStepDefinition.d.ts +3 -3
- package/api/types/ClassifyStepDefinitionConfig.d.ts +1 -1
- package/api/types/CollectStepDefinition.d.ts +1 -1
- package/api/types/ConditionalExtractStepDefinition.d.ts +1 -1
- package/api/types/ConditionalExtractStepDefinitionConfig.d.ts +1 -1
- package/api/types/ConditionalExtractStepDefinitionConfigRulesItem.d.ts +1 -1
- package/api/types/ConditionalNextEntry.d.ts +1 -1
- package/api/types/ConditionalStepDefinition.d.ts +2 -2
- package/api/types/ConditionalStepDefinitionConfig.d.ts +1 -1
- package/api/types/ConditionalStepDefinitionConfigConditionsItem.d.ts +3 -3
- package/api/types/ConditionalStepDefinitionConfigConditionsItemOperation.d.ts +1 -1
- package/api/types/ConditionalStepDefinitionConfigConditionsItemOperation.js +1 -1
- package/api/types/EvaluationSetRun.d.ts +1 -1
- package/api/types/ExternalDataValidationStepDefinition.d.ts +1 -1
- package/api/types/ExternalDataValidationStepDefinitionConfig.d.ts +2 -2
- package/api/types/ExternalDataValidationStepDefinitionConfigFailureBehavior.d.ts +1 -1
- package/api/types/ExternalDataValidationStepDefinitionConfigFailureBehavior.js +1 -1
- package/api/types/ExternalDataValidationStepDefinitionConfigRequestOptions.d.ts +3 -3
- package/api/types/ExternalDataValidationStepDefinitionConfigRequestOptionsContentType.d.ts +1 -1
- package/api/types/ExternalDataValidationStepDefinitionConfigRequestOptionsContentType.js +1 -1
- package/api/types/ExtractAdvancedOptions.d.ts +1 -1
- package/api/types/ExtractAdvancedOptionsReviewAgent.d.ts +1 -1
- package/api/types/ExtractBaseProcessor.d.ts +1 -1
- package/api/types/ExtractBaseProcessor.js +1 -1
- package/api/types/ExtractConfigJson.d.ts +9 -5
- package/api/types/ExtractConfigLegacy.d.ts +2 -2
- package/api/types/ExtractConfigLegacyBaseProcessor.d.ts +1 -1
- package/api/types/ExtractConfigLegacyBaseProcessor.js +1 -1
- package/api/types/ExtractOutputMetadataValue.d.ts +1 -1
- package/api/types/ExtractOverrideConfigJson.d.ts +2 -2
- package/api/types/ExtractRequestExtractor.d.ts +1 -1
- package/api/types/ExtractRun.d.ts +5 -4
- package/api/types/ExtractRunSummary.d.ts +16 -2
- package/api/types/ExtractStepDefinition.d.ts +1 -1
- package/api/types/ExtractorVersion.d.ts +1 -1
- package/api/types/FileConversionStepDefinition.d.ts +1 -1
- package/api/types/FileConversionStepDefinitionConfig.d.ts +1 -1
- package/api/types/FileConversionStepDefinitionConfigFailureBehavior.d.ts +1 -1
- package/api/types/FileConversionStepDefinitionConfigFailureBehavior.js +1 -1
- package/api/types/FileFromUrl.d.ts +1 -1
- package/api/types/HumanReviewStepDefinition.d.ts +1 -1
- package/api/types/LegacyClassificationAdvancedOptions.d.ts +1 -1
- package/api/types/LegacyClassificationConfig.d.ts +2 -2
- package/api/types/LegacyClassificationConfigBaseProcessor.d.ts +1 -1
- package/api/types/LegacyClassificationConfigBaseProcessor.js +1 -1
- package/api/types/LegacyDocumentProcessorRunCredits.d.ts +2 -2
- package/api/types/LegacyExtractionAdvancedOptions.d.ts +2 -2
- package/api/types/LegacyExtractionAdvancedOptionsReviewAgent.d.ts +1 -1
- package/api/types/LegacyExtractionConfig.d.ts +3 -3
- package/api/types/LegacyExtractionConfigBaseProcessor.d.ts +1 -1
- package/api/types/LegacyExtractionConfigBaseProcessor.js +1 -1
- package/api/types/LegacyJsonOutputMetadataValue.d.ts +1 -1
- package/api/types/LegacySplitterAdvancedOptions.d.ts +1 -1
- package/api/types/LegacySplitterConfig.d.ts +2 -2
- package/api/types/LegacySplitterConfigBaseProcessor.d.ts +1 -1
- package/api/types/LegacySplitterConfigBaseProcessor.js +1 -1
- package/api/types/MergeExtractStepDefinition.d.ts +1 -1
- package/api/types/MergeExtractStepDefinitionConfig.d.ts +1 -1
- package/api/types/MergeExtractStepDefinitionConfigMergeOrder.d.ts +1 -1
- package/api/types/MergeExtractStepDefinitionConfigMergeOrder.js +1 -1
- package/api/types/PageRanges.d.ts +1 -1
- package/api/types/ParseConfig.d.ts +2 -2
- package/api/types/ParseConfigBlockOptionsFigures.d.ts +2 -0
- package/api/types/ParseConfigEngine.d.ts +1 -1
- package/api/types/ParseConfigEngine.js +1 -1
- package/api/types/ParseConfigTarget.d.ts +1 -1
- package/api/types/ParseConfigTarget.js +1 -1
- package/api/types/ParseRun.d.ts +6 -0
- package/api/types/ParseRunSummary.d.ts +81 -0
- package/api/types/ParseRunSummary.js +3 -0
- package/api/types/ParseRunSummaryMetrics.d.ts +11 -0
- package/api/types/ParseRunSummaryMetrics.js +3 -0
- package/api/types/ParseRunSummaryStatus.d.ts +14 -0
- package/api/types/ParseRunSummaryStatus.js +17 -0
- package/api/types/ParseStepDefinition.d.ts +1 -1
- package/api/types/RuleValidationNextEntry.d.ts +1 -1
- package/api/types/RuleValidationStepDefinition.d.ts +2 -2
- package/api/types/RuleValidationStepDefinitionConfig.d.ts +1 -1
- package/api/types/RuleValidationStepDefinitionConfigRulesItem.d.ts +1 -1
- package/api/types/RunUsage.d.ts +1 -1
- package/api/types/RunUsageBreakdownCharge.d.ts +15 -0
- package/api/types/RunUsageBreakdownCharge.js +3 -0
- package/api/types/RunUsageBreakdownEntry.d.ts +7 -1
- package/api/types/RunUsageSummary.d.ts +1 -1
- package/api/types/SplitBaseProcessor.d.ts +1 -1
- package/api/types/SplitBaseProcessor.js +1 -1
- package/api/types/SplitConfig.d.ts +1 -1
- package/api/types/SplitOverrideConfig.d.ts +1 -1
- package/api/types/SplitRun.d.ts +2 -2
- package/api/types/SplitRunSummary.d.ts +2 -2
- package/api/types/SplitStepDefinition.d.ts +3 -3
- package/api/types/SplitStepDefinitionConfig.d.ts +1 -1
- package/api/types/TriggerStepDefinition.d.ts +1 -1
- package/api/types/WebhookResponseStepDefinition.d.ts +1 -1
- package/api/types/WorkflowStepDefinition.d.ts +1 -1
- package/api/types/index.d.ts +5 -0
- package/api/types/index.js +5 -0
- package/auth/BearerAuthProvider.d.ts +1 -1
- package/auth/BearerAuthProvider.js +6 -3
- package/package.json +2 -1
- package/reference.md +160 -48
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/wrapper/resources/parseRuns/ParseRunsWrapper.test.js +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A single cost driver within a breakdown entry's credit total. The per-unit rate is `credits / quantity`.
|
|
3
|
+
*/
|
|
4
|
+
export interface RunUsageBreakdownCharge {
|
|
5
|
+
/** Identifier for the billable cost driver. */
|
|
6
|
+
product: string;
|
|
7
|
+
/** The unit `quantity` is measured in. */
|
|
8
|
+
unit: string;
|
|
9
|
+
/** How many units this charge was billed for. */
|
|
10
|
+
quantity: number;
|
|
11
|
+
/** Credits consumed by this charge. */
|
|
12
|
+
credits: number;
|
|
13
|
+
/** 1-indexed page numbers that incurred this charge. Present on usage-based add-ons that are only billed for the pages where they actually applied (e.g. `agentic_text_correction`, `agentic_table_correction`). */
|
|
14
|
+
pages?: number[];
|
|
15
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as Extend from "../index";
|
|
2
2
|
/**
|
|
3
|
-
* One line item in a run's `usage.breakdown`. Each entry corresponds to a concrete chargeable resource that contributed credits to the parent operation.
|
|
3
|
+
* One line item in a run's `usage.breakdown`. Each entry corresponds to a concrete chargeable resource that contributed credits to the parent operation. When `charges` is present, it itemizes the cost drivers behind this entry's `credits`.
|
|
4
4
|
*/
|
|
5
5
|
export interface RunUsageBreakdownEntry {
|
|
6
6
|
/** The public object type of the contributing resource. Mirrors the top-level `object` field on the corresponding endpoint so callers can fetch the underlying resource by id if they want more detail. */
|
|
@@ -9,4 +9,10 @@ export interface RunUsageBreakdownEntry {
|
|
|
9
9
|
id: string;
|
|
10
10
|
/** Credits charged to the contributing resource. */
|
|
11
11
|
credits: number;
|
|
12
|
+
/**
|
|
13
|
+
* Itemized cost drivers that make up this entry's `credits`. When present, `sum(charges[].credits) === credits`.
|
|
14
|
+
*
|
|
15
|
+
* **Availability:** Present on runs persisted on or after June 10, 2026. Runs persisted before that date will omit this field.
|
|
16
|
+
*/
|
|
17
|
+
charges?: Extend.RunUsageBreakdownCharge[];
|
|
12
18
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* * Runs created before October 7, 2025
|
|
6
6
|
* * Customers on legacy billing systems
|
|
7
7
|
*
|
|
8
|
-
* For more details on how credits work, see our [Credits Guide](https://docs.extend.ai/2026-02-09/
|
|
8
|
+
* For more details on how credits work, see our [Credits Guide](https://docs.extend.ai/2026-02-09/general/how-credits-work).
|
|
9
9
|
*/
|
|
10
10
|
export interface RunUsageSummary {
|
|
11
11
|
/** The credits consumed by this run. For most run types this is the line item for the run's own work; for `workflow_run` this is the aggregate across all child runs. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** The base processor to use. For splitters, this can be either `"splitting_performance"` or `"splitting_light"`. Defaults to `"splitting_performance"` if not provided. See [Splitting Changelog](https://docs.extend.ai/2026-02-09/
|
|
1
|
+
/** The base processor to use. For splitters, this can be either `"splitting_performance"` or `"splitting_light"`. Defaults to `"splitting_performance"` if not provided. See [Splitting Changelog](https://docs.extend.ai/2026-02-09/model-versioning/splitting/splitting-performance) for more details. */
|
|
2
2
|
export declare const SplitBaseProcessor: {
|
|
3
3
|
readonly SplittingPerformance: "splitting_performance";
|
|
4
4
|
readonly SplittingLight: "splitting_light";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.SplitBaseProcessor = void 0;
|
|
5
|
-
/** The base processor to use. For splitters, this can be either `"splitting_performance"` or `"splitting_light"`. Defaults to `"splitting_performance"` if not provided. See [Splitting Changelog](https://docs.extend.ai/2026-02-09/
|
|
5
|
+
/** The base processor to use. For splitters, this can be either `"splitting_performance"` or `"splitting_light"`. Defaults to `"splitting_performance"` if not provided. See [Splitting Changelog](https://docs.extend.ai/2026-02-09/model-versioning/splitting/splitting-performance) for more details. */
|
|
6
6
|
exports.SplitBaseProcessor = {
|
|
7
7
|
SplittingPerformance: "splitting_performance",
|
|
8
8
|
SplittingLight: "splitting_light",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as Extend from "../index";
|
|
2
2
|
export interface SplitConfig {
|
|
3
3
|
baseProcessor?: Extend.SplitBaseProcessor;
|
|
4
|
-
/** The version of the `"splitting_performance"` or `"splitting_light"` processor to use. If not provided, the latest stable version for the selected `baseProcessor` will be used automatically. See [Splitting Changelog](https://docs.extend.ai/2026-02-09/
|
|
4
|
+
/** The version of the `"splitting_performance"` or `"splitting_light"` processor to use. If not provided, the latest stable version for the selected `baseProcessor` will be used automatically. See [Splitting Changelog](https://docs.extend.ai/2026-02-09/model-versioning/splitting/splitting-performance) for more details. */
|
|
5
5
|
baseVersion?: string;
|
|
6
6
|
splitClassifications: Extend.SplitClassifications;
|
|
7
7
|
/** Custom rules to guide the document splitting process in natural language. */
|
|
@@ -5,7 +5,7 @@ import type * as Extend from "../index";
|
|
|
5
5
|
*/
|
|
6
6
|
export interface SplitOverrideConfig {
|
|
7
7
|
baseProcessor?: Extend.SplitBaseProcessor;
|
|
8
|
-
/** The version of the `"splitting_performance"` or `"splitting_light"` processor to use. If not provided, the latest stable version for the selected `baseProcessor` will be used automatically. See [Splitting Changelog](https://docs.extend.ai/2026-02-09/
|
|
8
|
+
/** The version of the `"splitting_performance"` or `"splitting_light"` processor to use. If not provided, the latest stable version for the selected `baseProcessor` will be used automatically. See [Splitting Changelog](https://docs.extend.ai/2026-02-09/model-versioning/splitting/splitting-performance) for more details. */
|
|
9
9
|
baseVersion?: string;
|
|
10
10
|
splitClassifications?: Extend.SplitClassifications;
|
|
11
11
|
/** Custom rules to guide the document splitting process in natural language. */
|
package/api/types/SplitRun.d.ts
CHANGED
|
@@ -79,8 +79,8 @@ export interface SplitRun {
|
|
|
79
79
|
edited: boolean;
|
|
80
80
|
/** The configuration used for this split run. */
|
|
81
81
|
config: Extend.SplitConfig;
|
|
82
|
-
/** The file that was processed. */
|
|
83
|
-
file: Extend.FileSummary;
|
|
82
|
+
/** The file that was processed. `null` when the file could not be accessed or processed (for example a run that failed during file ingestion, or a multi-file batch run). */
|
|
83
|
+
file: Extend.FileSummary | null;
|
|
84
84
|
/**
|
|
85
85
|
* The ID of the parse run that was used for this split run.
|
|
86
86
|
*
|
|
@@ -42,8 +42,8 @@ export interface SplitRunSummary {
|
|
|
42
42
|
reviewed: boolean;
|
|
43
43
|
/** Indicates whether the run results have been edited during review. */
|
|
44
44
|
edited: boolean;
|
|
45
|
-
/** The file that was processed. */
|
|
46
|
-
file: Extend.FileSummary;
|
|
45
|
+
/** The file that was processed. `null` when the file could not be accessed or processed (for example a run that failed during file ingestion, or a multi-file batch run). */
|
|
46
|
+
file: Extend.FileSummary | null;
|
|
47
47
|
/**
|
|
48
48
|
* The ID of the parse run that was used for this split run.
|
|
49
49
|
*
|
|
@@ -4,7 +4,7 @@ import type * as Extend from "../index";
|
|
|
4
4
|
*
|
|
5
5
|
* The splitter reference must include a pinned `version` — `"latest"` is not supported for `SPLIT` steps. Use a specific semver string (e.g. `"0.1"`) or `"draft"`. This is because classification IDs used for routing are tied to a specific processor version's config.
|
|
6
6
|
*
|
|
7
|
-
* See the [Split step docs](https://docs.extend.ai/2026-02-09/
|
|
7
|
+
* See the [Split step docs](https://docs.extend.ai/2026-02-09/workflows/configuring-workflows#split).
|
|
8
8
|
*/
|
|
9
9
|
export interface SplitStepDefinition {
|
|
10
10
|
name: string;
|
|
@@ -15,13 +15,13 @@ export interface SplitStepDefinition {
|
|
|
15
15
|
*
|
|
16
16
|
* The splitter `version` is required and must be a pinned version (semver like `"0.1"` or `"draft"`). `"latest"` is not allowed.
|
|
17
17
|
*
|
|
18
|
-
* See the [Split step docs](https://docs.extend.ai/2026-02-09/
|
|
18
|
+
* See the [Split step docs](https://docs.extend.ai/2026-02-09/workflows/configuring-workflows#split).
|
|
19
19
|
*/
|
|
20
20
|
config?: Extend.SplitStepDefinitionConfig;
|
|
21
21
|
/**
|
|
22
22
|
* Can only be set when `config` is present. Each entry must include a `classificationId` matching a split classification `id` from the referenced splitter's configuration. Use the classification's stable `id` (e.g. `"cls_receipt"`), not the `type` string.
|
|
23
23
|
*
|
|
24
|
-
* See the [Split step docs](https://docs.extend.ai/2026-02-09/
|
|
24
|
+
* See the [Split step docs](https://docs.extend.ai/2026-02-09/workflows/configuring-workflows#split).
|
|
25
25
|
*/
|
|
26
26
|
next?: Extend.ClassificationNextEntry[];
|
|
27
27
|
}
|
|
@@ -6,7 +6,7 @@ import type * as Extend from "../index";
|
|
|
6
6
|
*
|
|
7
7
|
* The splitter `version` is required and must be a pinned version (semver like `"0.1"` or `"draft"`). `"latest"` is not allowed.
|
|
8
8
|
*
|
|
9
|
-
* See the [Split step docs](https://docs.extend.ai/2026-02-09/
|
|
9
|
+
* See the [Split step docs](https://docs.extend.ai/2026-02-09/workflows/configuring-workflows#split).
|
|
10
10
|
*/
|
|
11
11
|
export interface SplitStepDefinitionConfig {
|
|
12
12
|
splitter: Extend.SplitterRef;
|
|
@@ -2,7 +2,7 @@ import type * as Extend from "../index";
|
|
|
2
2
|
/**
|
|
3
3
|
* The entry point of the workflow. Every workflow must have exactly one trigger step, and it must route to exactly one `PARSE` step.
|
|
4
4
|
*
|
|
5
|
-
* See the [Trigger step docs](https://docs.extend.ai/2026-02-09/
|
|
5
|
+
* See the [Trigger step docs](https://docs.extend.ai/2026-02-09/workflows/configuring-workflows#trigger).
|
|
6
6
|
*/
|
|
7
7
|
export interface TriggerStepDefinition {
|
|
8
8
|
/** Unique name for this step. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A terminal step that triggers webhook delivery of the workflow results.
|
|
3
3
|
*
|
|
4
|
-
* See the [Webhook Response step docs](https://docs.extend.ai/2026-02-09/
|
|
4
|
+
* See the [Webhook Response step docs](https://docs.extend.ai/2026-02-09/workflows/configuring-workflows#webhook-response).
|
|
5
5
|
*/
|
|
6
6
|
export interface WebhookResponseStepDefinition {
|
|
7
7
|
name: string;
|
|
@@ -2,7 +2,7 @@ import type * as Extend from "../index";
|
|
|
2
2
|
/**
|
|
3
3
|
* A workflow step definition used when creating, updating, deploying, and retrieving workflow versions.
|
|
4
4
|
*
|
|
5
|
-
* See the [Configuring Workflows via API guide](https://docs.extend.ai/2026-02-09/
|
|
5
|
+
* See the [Configuring Workflows via API guide](https://docs.extend.ai/2026-02-09/workflows/configuring-workflows) for routing patterns and examples.
|
|
6
6
|
*/
|
|
7
7
|
export type WorkflowStepDefinition = Extend.WorkflowStepDefinition.Trigger | Extend.WorkflowStepDefinition.Parse | Extend.WorkflowStepDefinition.Extract | Extend.WorkflowStepDefinition.Classify | Extend.WorkflowStepDefinition.Split | Extend.WorkflowStepDefinition.MergeExtract | Extend.WorkflowStepDefinition.Conditional | Extend.WorkflowStepDefinition.ConditionalExtract | Extend.WorkflowStepDefinition.ExternalDataValidation | Extend.WorkflowStepDefinition.WebhookResponse | Extend.WorkflowStepDefinition.RuleValidation | Extend.WorkflowStepDefinition.HumanReview | Extend.WorkflowStepDefinition.Collect | Extend.WorkflowStepDefinition.FileConversion;
|
|
8
8
|
export declare namespace WorkflowStepDefinition {
|
package/api/types/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export * from "./Block";
|
|
|
13
13
|
export * from "./BlockDetails";
|
|
14
14
|
export * from "./BlockMetadata";
|
|
15
15
|
export * from "./BlockMetadataPage";
|
|
16
|
+
export * from "./BlockMetadataSheet";
|
|
16
17
|
export * from "./BlockMetadataTextDirection";
|
|
17
18
|
export * from "./BlockPolygonItem";
|
|
18
19
|
export * from "./BlockType";
|
|
@@ -305,6 +306,9 @@ export * from "./ParseRunSource";
|
|
|
305
306
|
export * from "./ParseRunStatus";
|
|
306
307
|
export * from "./ParseRunStatusEnum";
|
|
307
308
|
export * from "./ParseRunStatusStatus";
|
|
309
|
+
export * from "./ParseRunSummary";
|
|
310
|
+
export * from "./ParseRunSummaryMetrics";
|
|
311
|
+
export * from "./ParseRunSummaryStatus";
|
|
308
312
|
export * from "./ParseStepDefinition";
|
|
309
313
|
export * from "./ParseStepDefinitionConfig";
|
|
310
314
|
export * from "./ParseStepRun";
|
|
@@ -334,6 +338,7 @@ export * from "./RunSecrets";
|
|
|
334
338
|
export * from "./RunSource";
|
|
335
339
|
export * from "./RunSourceId";
|
|
336
340
|
export * from "./RunUsage";
|
|
341
|
+
export * from "./RunUsageBreakdownCharge";
|
|
337
342
|
export * from "./RunUsageBreakdownEntry";
|
|
338
343
|
export * from "./RunUsageBreakdownEntryObject";
|
|
339
344
|
export * from "./RunUsageSummary";
|
package/api/types/index.js
CHANGED
|
@@ -29,6 +29,7 @@ __exportStar(require("./Block"), exports);
|
|
|
29
29
|
__exportStar(require("./BlockDetails"), exports);
|
|
30
30
|
__exportStar(require("./BlockMetadata"), exports);
|
|
31
31
|
__exportStar(require("./BlockMetadataPage"), exports);
|
|
32
|
+
__exportStar(require("./BlockMetadataSheet"), exports);
|
|
32
33
|
__exportStar(require("./BlockMetadataTextDirection"), exports);
|
|
33
34
|
__exportStar(require("./BlockPolygonItem"), exports);
|
|
34
35
|
__exportStar(require("./BlockType"), exports);
|
|
@@ -321,6 +322,9 @@ __exportStar(require("./ParseRunSource"), exports);
|
|
|
321
322
|
__exportStar(require("./ParseRunStatus"), exports);
|
|
322
323
|
__exportStar(require("./ParseRunStatusEnum"), exports);
|
|
323
324
|
__exportStar(require("./ParseRunStatusStatus"), exports);
|
|
325
|
+
__exportStar(require("./ParseRunSummary"), exports);
|
|
326
|
+
__exportStar(require("./ParseRunSummaryMetrics"), exports);
|
|
327
|
+
__exportStar(require("./ParseRunSummaryStatus"), exports);
|
|
324
328
|
__exportStar(require("./ParseStepDefinition"), exports);
|
|
325
329
|
__exportStar(require("./ParseStepDefinitionConfig"), exports);
|
|
326
330
|
__exportStar(require("./ParseStepRun"), exports);
|
|
@@ -350,6 +354,7 @@ __exportStar(require("./RunSecrets"), exports);
|
|
|
350
354
|
__exportStar(require("./RunSource"), exports);
|
|
351
355
|
__exportStar(require("./RunSourceId"), exports);
|
|
352
356
|
__exportStar(require("./RunUsage"), exports);
|
|
357
|
+
__exportStar(require("./RunUsageBreakdownCharge"), exports);
|
|
353
358
|
__exportStar(require("./RunUsageBreakdownEntry"), exports);
|
|
354
359
|
__exportStar(require("./RunUsageBreakdownEntryObject"), exports);
|
|
355
360
|
__exportStar(require("./RunUsageSummary"), exports);
|
|
@@ -13,7 +13,7 @@ export declare namespace BearerAuthProvider {
|
|
|
13
13
|
const AUTH_CONFIG_ERROR_MESSAGE: string;
|
|
14
14
|
type Options = AuthOptions;
|
|
15
15
|
type AuthOptions = {
|
|
16
|
-
[TOKEN_PARAM]
|
|
16
|
+
[TOKEN_PARAM]?: core.Supplier<core.BearerToken> | undefined;
|
|
17
17
|
};
|
|
18
18
|
function createInstance(options: Options): core.AuthProvider;
|
|
19
19
|
}
|
|
@@ -47,16 +47,19 @@ exports.BearerAuthProvider = void 0;
|
|
|
47
47
|
const core = __importStar(require("../core"));
|
|
48
48
|
const errors = __importStar(require("../errors/index"));
|
|
49
49
|
const TOKEN_PARAM = "token";
|
|
50
|
+
const ENV_TOKEN = "EXTEND_API_KEY";
|
|
50
51
|
class BearerAuthProvider {
|
|
51
52
|
constructor(options) {
|
|
52
53
|
this.options = options;
|
|
53
54
|
}
|
|
54
55
|
static canCreate(options) {
|
|
55
|
-
|
|
56
|
+
var _a;
|
|
57
|
+
return (options === null || options === void 0 ? void 0 : options[TOKEN_PARAM]) != null || ((_a = process.env) === null || _a === void 0 ? void 0 : _a[ENV_TOKEN]) != null;
|
|
56
58
|
}
|
|
57
59
|
getAuthRequest() {
|
|
58
60
|
return __awaiter(this, arguments, void 0, function* ({ endpointMetadata, } = {}) {
|
|
59
|
-
|
|
61
|
+
var _a, _b;
|
|
62
|
+
const token = (_a = (yield core.Supplier.get(this.options[TOKEN_PARAM]))) !== null && _a !== void 0 ? _a : (_b = process.env) === null || _b === void 0 ? void 0 : _b[ENV_TOKEN];
|
|
60
63
|
if (token == null) {
|
|
61
64
|
throw new errors.ExtendError({
|
|
62
65
|
message: BearerAuthProvider.AUTH_CONFIG_ERROR_MESSAGE,
|
|
@@ -71,7 +74,7 @@ class BearerAuthProvider {
|
|
|
71
74
|
exports.BearerAuthProvider = BearerAuthProvider;
|
|
72
75
|
(function (BearerAuthProvider) {
|
|
73
76
|
BearerAuthProvider.AUTH_SCHEME = "BearerAuth";
|
|
74
|
-
BearerAuthProvider.AUTH_CONFIG_ERROR_MESSAGE = `Please provide '${TOKEN_PARAM}' when initializing the client`;
|
|
77
|
+
BearerAuthProvider.AUTH_CONFIG_ERROR_MESSAGE = `Please provide '${TOKEN_PARAM}' when initializing the client, or set the '${ENV_TOKEN}' environment variable`;
|
|
75
78
|
function createInstance(options) {
|
|
76
79
|
return new BearerAuthProvider(options);
|
|
77
80
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "extend-ai",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/extend-hq/extend-typescript-sdk.git"
|
|
8
8
|
},
|
|
9
|
+
"license": "MIT",
|
|
9
10
|
"main": "./index.js",
|
|
10
11
|
"types": "./index.d.ts",
|
|
11
12
|
"scripts": {
|