extend-ai 1.2.0 → 1.4.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 +72 -8
- package/Client.js +80 -12
- package/api/client/requests/ClassifyRequest.d.ts +16 -1
- package/api/client/requests/EditRequest.d.ts +7 -1
- package/api/client/requests/ExtractRequest.d.ts +20 -1
- package/api/client/requests/ParseRequest.d.ts +2 -1
- package/api/client/requests/SplitRequest.d.ts +18 -1
- package/api/resources/batchProcessorRun/client/Client.d.ts +1 -1
- package/api/resources/batchProcessorRun/client/Client.js +1 -1
- package/api/resources/classifierVersions/client/Client.d.ts +2 -1
- package/api/resources/classifierVersions/client/Client.js +2 -1
- package/api/resources/classifierVersions/client/requests/ClassifierVersionsCreateRequest.d.ts +2 -1
- package/api/resources/classifiers/client/Client.d.ts +19 -2
- package/api/resources/classifiers/client/Client.js +19 -2
- package/api/resources/classifiers/client/requests/ClassifiersCreateRequest.d.ts +16 -1
- package/api/resources/classifiers/client/requests/ClassifiersUpdateRequest.d.ts +3 -1
- package/api/resources/classifyRuns/client/Client.d.ts +4 -1
- package/api/resources/classifyRuns/client/Client.js +4 -1
- package/api/resources/classifyRuns/client/requests/ClassifyRunsCreateRequest.d.ts +4 -1
- package/api/resources/editRuns/client/Client.d.ts +7 -1
- package/api/resources/editRuns/client/Client.js +7 -1
- package/api/resources/editRuns/client/requests/EditRunsCreateRequest.d.ts +7 -1
- package/api/resources/evaluationSetItems/client/Client.d.ts +16 -4
- package/api/resources/evaluationSetItems/client/Client.js +16 -4
- package/api/resources/evaluationSetItems/client/requests/EvaluationSetItemsCreateRequest.d.ts +8 -2
- package/api/resources/evaluationSetItems/client/requests/EvaluationSetItemsUpdateRequest.d.ts +7 -1
- package/api/resources/evaluationSets/client/Client.d.ts +4 -3
- package/api/resources/evaluationSets/client/Client.js +4 -3
- package/api/resources/evaluationSets/client/requests/EvaluationSetsCreateRequest.d.ts +3 -2
- package/api/resources/extractRuns/client/Client.d.ts +4 -1
- package/api/resources/extractRuns/client/Client.js +4 -1
- package/api/resources/extractRuns/client/requests/ExtractRunsCreateRequest.d.ts +4 -1
- package/api/resources/extractorVersions/client/Client.d.ts +2 -1
- package/api/resources/extractorVersions/client/Client.js +2 -1
- package/api/resources/extractorVersions/client/requests/ExtractorVersionsCreateRequest.d.ts +2 -1
- package/api/resources/extractors/client/Client.d.ts +23 -2
- package/api/resources/extractors/client/Client.js +23 -2
- package/api/resources/extractors/client/requests/ExtractorsCreateRequest.d.ts +20 -1
- package/api/resources/extractors/client/requests/ExtractorsUpdateRequest.d.ts +3 -1
- package/api/resources/files/client/Client.d.ts +1 -1
- package/api/resources/files/client/Client.js +1 -1
- package/api/resources/index.d.ts +6 -0
- package/api/resources/index.js +7 -1
- package/api/resources/parseRuns/client/Client.d.ts +2 -1
- package/api/resources/parseRuns/client/Client.js +2 -1
- package/api/resources/parseRuns/client/requests/ParseRunsCreateRequest.d.ts +2 -1
- package/api/resources/processorRun/client/Client.d.ts +3 -3
- package/api/resources/processorRun/client/Client.js +3 -3
- package/api/resources/processorRun/client/requests/ProcessorRunCreateRequest.d.ts +1 -1
- package/api/resources/splitRuns/client/Client.d.ts +4 -1
- package/api/resources/splitRuns/client/Client.js +4 -1
- package/api/resources/splitRuns/client/requests/SplitRunsCreateRequest.d.ts +4 -1
- package/api/resources/splitterVersions/client/Client.d.ts +2 -1
- package/api/resources/splitterVersions/client/Client.js +2 -1
- package/api/resources/splitterVersions/client/requests/SplitterVersionsCreateRequest.d.ts +2 -1
- package/api/resources/splitters/client/Client.d.ts +21 -2
- package/api/resources/splitters/client/Client.js +21 -2
- package/api/resources/splitters/client/requests/SplittersCreateRequest.d.ts +18 -1
- package/api/resources/splitters/client/requests/SplittersUpdateRequest.d.ts +3 -1
- package/api/resources/webhookEndpoints/client/Client.d.ts +133 -0
- package/api/resources/webhookEndpoints/client/Client.js +440 -0
- package/api/resources/webhookEndpoints/client/index.d.ts +1 -0
- package/api/resources/webhookEndpoints/client/index.js +17 -0
- package/api/resources/webhookEndpoints/client/requests/WebhookEndpointsCreateRequest.d.ts +21 -0
- package/api/resources/webhookEndpoints/client/requests/WebhookEndpointsCreateRequest.js +3 -0
- package/api/resources/webhookEndpoints/client/requests/WebhookEndpointsListRequest.d.ts +14 -0
- package/api/resources/webhookEndpoints/client/requests/WebhookEndpointsListRequest.js +3 -0
- package/api/resources/webhookEndpoints/client/requests/WebhookEndpointsUpdateRequest.d.ts +15 -0
- package/api/resources/webhookEndpoints/client/requests/WebhookEndpointsUpdateRequest.js +3 -0
- package/api/resources/webhookEndpoints/client/requests/index.d.ts +3 -0
- package/api/resources/webhookEndpoints/client/requests/index.js +2 -0
- package/api/resources/webhookEndpoints/index.d.ts +2 -0
- package/api/resources/webhookEndpoints/index.js +18 -0
- package/api/resources/webhookEndpoints/types/WebhookEndpointsDeleteResponse.d.ts +4 -0
- package/api/resources/webhookEndpoints/types/WebhookEndpointsDeleteResponse.js +3 -0
- package/api/resources/webhookEndpoints/types/WebhookEndpointsListResponse.d.ts +6 -0
- package/api/resources/webhookEndpoints/types/WebhookEndpointsListResponse.js +3 -0
- package/api/resources/webhookEndpoints/types/index.d.ts +2 -0
- package/api/resources/webhookEndpoints/types/index.js +18 -0
- package/api/resources/webhookSubscriptions/client/Client.d.ts +133 -0
- package/api/resources/webhookSubscriptions/client/Client.js +444 -0
- package/api/resources/webhookSubscriptions/client/index.d.ts +1 -0
- package/api/resources/webhookSubscriptions/client/index.js +17 -0
- package/api/resources/webhookSubscriptions/client/requests/WebhookSubscriptionsCreateRequest.d.ts +19 -0
- package/api/resources/webhookSubscriptions/client/requests/WebhookSubscriptionsCreateRequest.js +3 -0
- package/api/resources/webhookSubscriptions/client/requests/WebhookSubscriptionsListRequest.d.ts +16 -0
- package/api/resources/webhookSubscriptions/client/requests/WebhookSubscriptionsListRequest.js +3 -0
- package/api/resources/webhookSubscriptions/client/requests/WebhookSubscriptionsUpdateRequest.d.ts +11 -0
- package/api/resources/webhookSubscriptions/client/requests/WebhookSubscriptionsUpdateRequest.js +3 -0
- package/api/resources/webhookSubscriptions/client/requests/index.d.ts +3 -0
- package/api/resources/webhookSubscriptions/client/requests/index.js +2 -0
- package/api/resources/webhookSubscriptions/index.d.ts +2 -0
- package/api/resources/webhookSubscriptions/index.js +18 -0
- package/api/resources/webhookSubscriptions/types/WebhookSubscriptionsDeleteResponse.d.ts +4 -0
- package/api/resources/webhookSubscriptions/types/WebhookSubscriptionsDeleteResponse.js +3 -0
- package/api/resources/webhookSubscriptions/types/WebhookSubscriptionsListResponse.d.ts +6 -0
- package/api/resources/webhookSubscriptions/types/WebhookSubscriptionsListResponse.js +3 -0
- package/api/resources/webhookSubscriptions/types/index.d.ts +2 -0
- package/api/resources/webhookSubscriptions/types/index.js +18 -0
- package/api/resources/workflowRuns/client/Client.d.ts +22 -6
- package/api/resources/workflowRuns/client/Client.js +22 -6
- package/api/resources/workflowRuns/client/requests/WorkflowRunsCreateBatchRequest.d.ts +12 -2
- package/api/resources/workflowRuns/client/requests/WorkflowRunsCreateRequest.d.ts +3 -3
- package/api/resources/workflowRuns/client/requests/WorkflowRunsListRequest.d.ts +1 -1
- package/api/resources/workflowRuns/client/requests/WorkflowRunsUpdateRequest.d.ts +7 -1
- package/api/resources/workflowRuns/types/WorkflowRunsCreateRequestFile.d.ts +1 -1
- package/api/types/EditConfigAdvancedOptions.d.ts +4 -0
- package/api/types/EditJson.d.ts +2 -0
- package/api/types/ExtractAdvancedOptions.d.ts +1 -1
- package/api/types/ExtractAdvancedOptionsReviewAgent.d.ts +1 -1
- package/api/types/ExtractConfigJson.d.ts +1 -1
- package/api/types/ExtractOutputMetadataValue.d.ts +1 -1
- package/api/types/ExtractOverrideConfigJson.d.ts +1 -1
- package/api/types/ExtractRun.d.ts +10 -2
- package/api/types/ExtractorVersion.d.ts +6 -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 +6 -2
- package/api/types/LegacySplitterAdvancedOptionsSplitMethod.d.ts +5 -1
- package/api/types/LegacySplitterAdvancedOptionsSplitMethod.js +5 -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/ParseConfig.d.ts +1 -1
- package/api/types/ParseConfigTarget.d.ts +1 -1
- package/api/types/ParseConfigTarget.js +1 -1
- package/api/types/SplitAdvancedOptions.d.ts +10 -2
- package/api/types/SplitAdvancedOptionsSplitMethod.d.ts +5 -1
- package/api/types/SplitAdvancedOptionsSplitMethod.js +5 -1
- package/api/types/SplitClassification.d.ts +19 -0
- package/api/types/SplitClassification.js +3 -0
- package/api/types/SplitClassifications.d.ts +5 -0
- package/api/types/SplitClassifications.js +3 -0
- package/api/types/SplitConfig.d.ts +1 -1
- package/api/types/SplitOverrideConfig.d.ts +1 -1
- package/api/types/WebhookAdvancedOptions.d.ts +9 -0
- package/api/types/WebhookAdvancedOptions.js +3 -0
- package/api/types/WebhookEndpoint.d.ts +18 -0
- package/api/types/WebhookEndpoint.js +3 -0
- package/api/types/WebhookEndpointCreate.d.ts +27 -0
- package/api/types/WebhookEndpointCreate.js +3 -0
- package/api/types/WebhookEndpointEventType.d.ts +32 -0
- package/api/types/WebhookEndpointEventType.js +35 -0
- package/api/types/WebhookEndpointStatus.d.ts +6 -0
- package/api/types/WebhookEndpointStatus.js +9 -0
- package/api/types/WebhookPayloadFormat.d.ts +11 -0
- package/api/types/WebhookPayloadFormat.js +14 -0
- package/api/types/WebhookPayloadOptions.d.ts +9 -0
- package/api/types/WebhookPayloadOptions.js +3 -0
- package/api/types/WebhookSubscription.d.ts +15 -0
- package/api/types/WebhookSubscription.js +3 -0
- package/api/types/WebhookSubscriptionEventType.d.ts +23 -0
- package/api/types/WebhookSubscriptionEventType.js +26 -0
- package/api/types/WebhookSubscriptionResourceType.d.ts +8 -0
- package/api/types/WebhookSubscriptionResourceType.js +11 -0
- package/api/types/index.d.ts +12 -0
- package/api/types/index.js +12 -0
- package/package.json +1 -1
- package/reference.md +901 -40
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** The base processor to use. For splitters, this can currently only be `"splitting_performance"` or `"splitting_light"`. See [Splitting Changelog](/changelog/splitting/splitting-performance) for more details. */
|
|
1
|
+
/** The base processor to use. For splitters, this can currently only be `"splitting_performance"` or `"splitting_light"`. See [Splitting Changelog](https://docs.extend.ai/2026-02-09/changelog/splitting/splitting-performance) for more details. */
|
|
2
2
|
export declare const LegacySplitterConfigBaseProcessor: {
|
|
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.LegacySplitterConfigBaseProcessor = void 0;
|
|
5
|
-
/** The base processor to use. For splitters, this can currently only be `"splitting_performance"` or `"splitting_light"`. See [Splitting Changelog](/changelog/splitting/splitting-performance) for more details. */
|
|
5
|
+
/** The base processor to use. For splitters, this can currently only be `"splitting_performance"` or `"splitting_light"`. See [Splitting Changelog](https://docs.extend.ai/2026-02-09/changelog/splitting/splitting-performance) for more details. */
|
|
6
6
|
exports.LegacySplitterConfigBaseProcessor = {
|
|
7
7
|
SplittingPerformance: "splitting_performance",
|
|
8
8
|
SplittingLight: "splitting_light",
|
|
@@ -16,7 +16,7 @@ export interface ParseConfig {
|
|
|
16
16
|
* * Prefer `markdown` for most documents, multi-column reading order, and retrieval use cases
|
|
17
17
|
* * Prefer `spatial` for messy/scanned/handwritten or skewed documents, when you need near 1:1 layout fidelity, or for BOL-like logistics docs
|
|
18
18
|
*
|
|
19
|
-
* See “Markdown vs Spatial” in the [Parse guide](https://docs.extend.ai/2026-02-09/
|
|
19
|
+
* See “Markdown vs Spatial” in the [Parse guide](https://docs.extend.ai/2026-02-09/product/parsing/configuration-options#target-format) for details.
|
|
20
20
|
*/
|
|
21
21
|
target?: Extend.ParseConfigTarget;
|
|
22
22
|
/** Strategy for dividing the document into chunks. */
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* * Prefer `markdown` for most documents, multi-column reading order, and retrieval use cases
|
|
12
12
|
* * Prefer `spatial` for messy/scanned/handwritten or skewed documents, when you need near 1:1 layout fidelity, or for BOL-like logistics docs
|
|
13
13
|
*
|
|
14
|
-
* See “Markdown vs Spatial” in the [Parse guide](https://docs.extend.ai/2026-02-09/
|
|
14
|
+
* See “Markdown vs Spatial” in the [Parse guide](https://docs.extend.ai/2026-02-09/product/parsing/configuration-options#target-format) for details.
|
|
15
15
|
*/
|
|
16
16
|
export declare const ParseConfigTarget: {
|
|
17
17
|
readonly Markdown: "markdown";
|
|
@@ -15,7 +15,7 @@ exports.ParseConfigTarget = void 0;
|
|
|
15
15
|
* * Prefer `markdown` for most documents, multi-column reading order, and retrieval use cases
|
|
16
16
|
* * Prefer `spatial` for messy/scanned/handwritten or skewed documents, when you need near 1:1 layout fidelity, or for BOL-like logistics docs
|
|
17
17
|
*
|
|
18
|
-
* See “Markdown vs Spatial” in the [Parse guide](https://docs.extend.ai/2026-02-09/
|
|
18
|
+
* See “Markdown vs Spatial” in the [Parse guide](https://docs.extend.ai/2026-02-09/product/parsing/configuration-options#target-format) for details.
|
|
19
19
|
*/
|
|
20
20
|
exports.ParseConfigTarget = {
|
|
21
21
|
Markdown: "markdown",
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import type * as Extend from "../index";
|
|
2
2
|
export interface SplitAdvancedOptions {
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Custom rules for identifying split points.
|
|
5
|
+
*
|
|
6
|
+
* **Deprecated:** For `splitting_light` >= 1.3.0 and `splitting_performance` >= 1.5.0, use the `identifierKey` field on each classification in `splitClassifications` instead. This provides per-type identifier extraction rules rather than a single global rule. On those versions, this field is accepted but ignored if provided.
|
|
7
|
+
*/
|
|
4
8
|
splitIdentifierRules?: string;
|
|
5
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* The method to use for splitting documents. `high_precision` is more accurate but slower, while `basic_precision` is faster but less precise.
|
|
11
|
+
*
|
|
12
|
+
* **Deprecated:** For `splitting_light` >= 1.3.0 and `splitting_performance` >= 1.5.0, this field has no impact and is ignored if provided. It is still accepted for compatibility with older integrations.
|
|
13
|
+
*/
|
|
6
14
|
splitMethod?: Extend.SplitAdvancedOptionsSplitMethod;
|
|
7
15
|
/** For Excel documents, split by worksheet. */
|
|
8
16
|
splitExcelDocumentsBySheetEnabled?: boolean;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* The method to use for splitting documents. `high_precision` is more accurate but slower, while `basic_precision` is faster but less precise.
|
|
3
|
+
*
|
|
4
|
+
* **Deprecated:** For `splitting_light` >= 1.3.0 and `splitting_performance` >= 1.5.0, this field has no impact and is ignored if provided. It is still accepted for compatibility with older integrations.
|
|
5
|
+
*/
|
|
2
6
|
export declare const SplitAdvancedOptionsSplitMethod: {
|
|
3
7
|
readonly HighPrecision: "high_precision";
|
|
4
8
|
readonly BasicPrecision: "basic_precision";
|
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.SplitAdvancedOptionsSplitMethod = void 0;
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* The method to use for splitting documents. `high_precision` is more accurate but slower, while `basic_precision` is faster but less precise.
|
|
7
|
+
*
|
|
8
|
+
* **Deprecated:** For `splitting_light` >= 1.3.0 and `splitting_performance` >= 1.5.0, this field has no impact and is ignored if provided. It is still accepted for compatibility with older integrations.
|
|
9
|
+
*/
|
|
6
10
|
exports.SplitAdvancedOptionsSplitMethod = {
|
|
7
11
|
HighPrecision: "high_precision",
|
|
8
12
|
BasicPrecision: "basic_precision",
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A classification for document splitting. Extends the base Classification with an optional `identifierKey` field for per-type identifier extraction rules.
|
|
3
|
+
*/
|
|
4
|
+
export interface SplitClassification {
|
|
5
|
+
/** Unique identifier for the classification. We recommend lowercase, underscore-separated format. */
|
|
6
|
+
id: string;
|
|
7
|
+
/** Type identifier for the classification. */
|
|
8
|
+
type: string;
|
|
9
|
+
/** A detailed description of the classification. */
|
|
10
|
+
description: string;
|
|
11
|
+
/**
|
|
12
|
+
* A natural-language rule describing how to extract a unique identifier for subdocuments of this type. For example, `"Extract the invoice number from the document header"`.
|
|
13
|
+
*
|
|
14
|
+
* When provided, the splitter will extract the specified identifier for each subdocument of this type and include it in the output as the `identifier` field. This enables merging of related subdocuments that share the same extracted identifier.
|
|
15
|
+
*
|
|
16
|
+
* **Availability:** Supported on `splitting_light` >= 1.3.0 and `splitting_performance` >= 1.5.0. If provided on older versions, this field is accepted but ignored.
|
|
17
|
+
*/
|
|
18
|
+
identifierKey?: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type * as Extend from "../index";
|
|
2
|
+
/**
|
|
3
|
+
* Array of split classifications that define the possible types of document sections. Must provide at least one classification. At least one classification must have the type `"other"`. Each classification item must have a unique id.
|
|
4
|
+
*/
|
|
5
|
+
export type SplitClassifications = Extend.SplitClassification[];
|
|
@@ -3,7 +3,7 @@ export interface SplitConfig {
|
|
|
3
3
|
baseProcessor?: Extend.SplitBaseProcessor;
|
|
4
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/changelog/splitting/splitting-performance) for more details. */
|
|
5
5
|
baseVersion?: string;
|
|
6
|
-
splitClassifications: Extend.
|
|
6
|
+
splitClassifications: Extend.SplitClassifications;
|
|
7
7
|
/** Custom rules to guide the document splitting process in natural language. */
|
|
8
8
|
splitRules?: string;
|
|
9
9
|
/** Advanced configuration options. */
|
|
@@ -7,7 +7,7 @@ export interface SplitOverrideConfig {
|
|
|
7
7
|
baseProcessor?: Extend.SplitBaseProcessor;
|
|
8
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/changelog/splitting/splitting-performance) for more details. */
|
|
9
9
|
baseVersion?: string;
|
|
10
|
-
splitClassifications?: Extend.
|
|
10
|
+
splitClassifications?: Extend.SplitClassifications;
|
|
11
11
|
/** Custom rules to guide the document splitting process in natural language. */
|
|
12
12
|
splitRules?: string;
|
|
13
13
|
/** Advanced configuration options. */
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as Extend from "../index";
|
|
2
|
+
/**
|
|
3
|
+
* Advanced configuration options for the webhook endpoint, including custom headers and payload delivery settings.
|
|
4
|
+
*/
|
|
5
|
+
export interface WebhookAdvancedOptions {
|
|
6
|
+
/** Custom HTTP headers to include in webhook requests. */
|
|
7
|
+
headers?: Record<string, string>;
|
|
8
|
+
payload?: Extend.WebhookPayloadOptions;
|
|
9
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type * as Extend from "../index";
|
|
2
|
+
export interface WebhookEndpoint {
|
|
3
|
+
object: "webhook_endpoint";
|
|
4
|
+
/** Unique identifier for the webhook endpoint. */
|
|
5
|
+
id: string;
|
|
6
|
+
/** The URL that webhook events are sent to. */
|
|
7
|
+
url: string;
|
|
8
|
+
/** A human-readable name for the webhook endpoint. */
|
|
9
|
+
name: string;
|
|
10
|
+
status: Extend.WebhookEndpointStatus;
|
|
11
|
+
/** The list of event types this endpoint is subscribed to at the global level. These are events that are not scoped to a specific resource. */
|
|
12
|
+
enabledEvents: Extend.WebhookEndpointEventType[];
|
|
13
|
+
apiVersion: Extend.ApiVersionEnum;
|
|
14
|
+
/** Advanced configuration options for the webhook endpoint, including custom headers and payload delivery settings. */
|
|
15
|
+
advancedOptions: Extend.WebhookAdvancedOptions | null;
|
|
16
|
+
/** The date and time the webhook endpoint was created. */
|
|
17
|
+
createdAt: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type * as Extend from "../index";
|
|
2
|
+
/**
|
|
3
|
+
* The response when creating a webhook endpoint. Includes the `signingSecret`, which is only returned on creation and cannot be retrieved again.
|
|
4
|
+
*/
|
|
5
|
+
export interface WebhookEndpointCreate {
|
|
6
|
+
object: "webhook_endpoint";
|
|
7
|
+
/** Unique identifier for the webhook endpoint. */
|
|
8
|
+
id: string;
|
|
9
|
+
/** The URL that webhook events are sent to. */
|
|
10
|
+
url: string;
|
|
11
|
+
/** A human-readable name for the webhook endpoint. */
|
|
12
|
+
name: string;
|
|
13
|
+
status: Extend.WebhookEndpointStatus;
|
|
14
|
+
/** The list of event types this endpoint is subscribed to at the global level. These are events that are not scoped to a specific resource. */
|
|
15
|
+
enabledEvents: Extend.WebhookEndpointEventType[];
|
|
16
|
+
apiVersion: Extend.ApiVersionEnum;
|
|
17
|
+
/** Advanced configuration options for the webhook endpoint, including custom headers and payload delivery settings. */
|
|
18
|
+
advancedOptions: Extend.WebhookAdvancedOptions | null;
|
|
19
|
+
/**
|
|
20
|
+
* The signing secret used to verify webhook payloads. This is only returned when creating the endpoint and cannot be retrieved again.
|
|
21
|
+
*
|
|
22
|
+
* Store it securely — you will need it to verify webhook signatures.
|
|
23
|
+
*/
|
|
24
|
+
signingSecret: string;
|
|
25
|
+
/** The date and time the webhook endpoint was created. */
|
|
26
|
+
createdAt: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** Event types available for webhook endpoints at the global level. Includes run events and resource lifecycle events. */
|
|
2
|
+
export declare const WebhookEndpointEventType: {
|
|
3
|
+
readonly ParseRunProcessed: "parse_run.processed";
|
|
4
|
+
readonly ParseRunFailed: "parse_run.failed";
|
|
5
|
+
readonly EditRunProcessed: "edit_run.processed";
|
|
6
|
+
readonly EditRunFailed: "edit_run.failed";
|
|
7
|
+
readonly ExtractRunProcessed: "extract_run.processed";
|
|
8
|
+
readonly ExtractRunFailed: "extract_run.failed";
|
|
9
|
+
readonly ClassifyRunProcessed: "classify_run.processed";
|
|
10
|
+
readonly ClassifyRunFailed: "classify_run.failed";
|
|
11
|
+
readonly SplitRunProcessed: "split_run.processed";
|
|
12
|
+
readonly SplitRunFailed: "split_run.failed";
|
|
13
|
+
readonly ExtractorCreated: "extractor.created";
|
|
14
|
+
readonly ExtractorUpdated: "extractor.updated";
|
|
15
|
+
readonly ExtractorDeleted: "extractor.deleted";
|
|
16
|
+
readonly ExtractorDraftUpdated: "extractor.draft.updated";
|
|
17
|
+
readonly ExtractorVersionPublished: "extractor.version.published";
|
|
18
|
+
readonly ClassifierCreated: "classifier.created";
|
|
19
|
+
readonly ClassifierUpdated: "classifier.updated";
|
|
20
|
+
readonly ClassifierDeleted: "classifier.deleted";
|
|
21
|
+
readonly ClassifierDraftUpdated: "classifier.draft.updated";
|
|
22
|
+
readonly ClassifierVersionPublished: "classifier.version.published";
|
|
23
|
+
readonly SplitterCreated: "splitter.created";
|
|
24
|
+
readonly SplitterUpdated: "splitter.updated";
|
|
25
|
+
readonly SplitterDeleted: "splitter.deleted";
|
|
26
|
+
readonly SplitterDraftUpdated: "splitter.draft.updated";
|
|
27
|
+
readonly SplitterVersionPublished: "splitter.version.published";
|
|
28
|
+
readonly WorkflowCreated: "workflow.created";
|
|
29
|
+
readonly WorkflowDeployed: "workflow.deployed";
|
|
30
|
+
readonly WorkflowDeleted: "workflow.deleted";
|
|
31
|
+
};
|
|
32
|
+
export type WebhookEndpointEventType = (typeof WebhookEndpointEventType)[keyof typeof WebhookEndpointEventType] | string;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.WebhookEndpointEventType = void 0;
|
|
5
|
+
/** Event types available for webhook endpoints at the global level. Includes run events and resource lifecycle events. */
|
|
6
|
+
exports.WebhookEndpointEventType = {
|
|
7
|
+
ParseRunProcessed: "parse_run.processed",
|
|
8
|
+
ParseRunFailed: "parse_run.failed",
|
|
9
|
+
EditRunProcessed: "edit_run.processed",
|
|
10
|
+
EditRunFailed: "edit_run.failed",
|
|
11
|
+
ExtractRunProcessed: "extract_run.processed",
|
|
12
|
+
ExtractRunFailed: "extract_run.failed",
|
|
13
|
+
ClassifyRunProcessed: "classify_run.processed",
|
|
14
|
+
ClassifyRunFailed: "classify_run.failed",
|
|
15
|
+
SplitRunProcessed: "split_run.processed",
|
|
16
|
+
SplitRunFailed: "split_run.failed",
|
|
17
|
+
ExtractorCreated: "extractor.created",
|
|
18
|
+
ExtractorUpdated: "extractor.updated",
|
|
19
|
+
ExtractorDeleted: "extractor.deleted",
|
|
20
|
+
ExtractorDraftUpdated: "extractor.draft.updated",
|
|
21
|
+
ExtractorVersionPublished: "extractor.version.published",
|
|
22
|
+
ClassifierCreated: "classifier.created",
|
|
23
|
+
ClassifierUpdated: "classifier.updated",
|
|
24
|
+
ClassifierDeleted: "classifier.deleted",
|
|
25
|
+
ClassifierDraftUpdated: "classifier.draft.updated",
|
|
26
|
+
ClassifierVersionPublished: "classifier.version.published",
|
|
27
|
+
SplitterCreated: "splitter.created",
|
|
28
|
+
SplitterUpdated: "splitter.updated",
|
|
29
|
+
SplitterDeleted: "splitter.deleted",
|
|
30
|
+
SplitterDraftUpdated: "splitter.draft.updated",
|
|
31
|
+
SplitterVersionPublished: "splitter.version.published",
|
|
32
|
+
WorkflowCreated: "workflow.created",
|
|
33
|
+
WorkflowDeployed: "workflow.deployed",
|
|
34
|
+
WorkflowDeleted: "workflow.deleted",
|
|
35
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** The status of the webhook endpoint. */
|
|
2
|
+
export declare const WebhookEndpointStatus: {
|
|
3
|
+
readonly Enabled: "enabled";
|
|
4
|
+
readonly Disabled: "disabled";
|
|
5
|
+
};
|
|
6
|
+
export type WebhookEndpointStatus = (typeof WebhookEndpointStatus)[keyof typeof WebhookEndpointStatus] | string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.WebhookEndpointStatus = void 0;
|
|
5
|
+
/** The status of the webhook endpoint. */
|
|
6
|
+
exports.WebhookEndpointStatus = {
|
|
7
|
+
Enabled: "enabled",
|
|
8
|
+
Disabled: "disabled",
|
|
9
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The format used to deliver webhook payloads.
|
|
3
|
+
*
|
|
4
|
+
* - `json` — the full payload is sent inline in the webhook request body.
|
|
5
|
+
* - `url` — large payloads are replaced with a signed download URL.
|
|
6
|
+
*/
|
|
7
|
+
export declare const WebhookPayloadFormat: {
|
|
8
|
+
readonly Json: "json";
|
|
9
|
+
readonly Url: "url";
|
|
10
|
+
};
|
|
11
|
+
export type WebhookPayloadFormat = (typeof WebhookPayloadFormat)[keyof typeof WebhookPayloadFormat] | string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.WebhookPayloadFormat = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* The format used to deliver webhook payloads.
|
|
7
|
+
*
|
|
8
|
+
* - `json` — the full payload is sent inline in the webhook request body.
|
|
9
|
+
* - `url` — large payloads are replaced with a signed download URL.
|
|
10
|
+
*/
|
|
11
|
+
exports.WebhookPayloadFormat = {
|
|
12
|
+
Json: "json",
|
|
13
|
+
Url: "url",
|
|
14
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as Extend from "../index";
|
|
2
|
+
/**
|
|
3
|
+
* Configuration for how webhook payloads are delivered.
|
|
4
|
+
*/
|
|
5
|
+
export interface WebhookPayloadOptions {
|
|
6
|
+
format: Extend.WebhookPayloadFormat;
|
|
7
|
+
/** When `format` is `url`, payloads larger than this threshold (in bytes) are delivered as a signed download URL instead of inline JSON. Only applicable when `format` is `url`. */
|
|
8
|
+
urlThresholdBytes?: number;
|
|
9
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type * as Extend from "../index";
|
|
2
|
+
export interface WebhookSubscription {
|
|
3
|
+
object: "webhook_subscription";
|
|
4
|
+
/** Unique identifier for the webhook subscription. */
|
|
5
|
+
id: string;
|
|
6
|
+
/** The ID of the webhook endpoint this subscription belongs to. */
|
|
7
|
+
webhookEndpointId: string;
|
|
8
|
+
resourceType: Extend.WebhookSubscriptionResourceType;
|
|
9
|
+
/** The ID of the resource this subscription is scoped to (e.g., an extractor, classifier, splitter, or workflow). */
|
|
10
|
+
resourceId: string;
|
|
11
|
+
/** The list of event types this subscription is subscribed to. The valid event types depend on the `resourceType`. */
|
|
12
|
+
enabledEvents: Extend.WebhookSubscriptionEventType[];
|
|
13
|
+
/** The date and time the webhook subscription was created. */
|
|
14
|
+
createdAt: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Event types available for resource-scoped webhook subscriptions. The valid subset depends on the `resourceType`:
|
|
3
|
+
*
|
|
4
|
+
* - **extractor**: `extract_run.processed`, `extract_run.failed`
|
|
5
|
+
* - **classifier**: `classify_run.processed`, `classify_run.failed`
|
|
6
|
+
* - **splitter**: `split_run.processed`, `split_run.failed`
|
|
7
|
+
* - **workflow**: `workflow_run.completed`, `workflow_run.failed`, `workflow_run.needs_review`, `workflow_run.rejected`, `workflow_run.cancelled`, `workflow_run.step_run.processed`
|
|
8
|
+
*/
|
|
9
|
+
export declare const WebhookSubscriptionEventType: {
|
|
10
|
+
readonly ExtractRunProcessed: "extract_run.processed";
|
|
11
|
+
readonly ExtractRunFailed: "extract_run.failed";
|
|
12
|
+
readonly ClassifyRunProcessed: "classify_run.processed";
|
|
13
|
+
readonly ClassifyRunFailed: "classify_run.failed";
|
|
14
|
+
readonly SplitRunProcessed: "split_run.processed";
|
|
15
|
+
readonly SplitRunFailed: "split_run.failed";
|
|
16
|
+
readonly WorkflowRunCompleted: "workflow_run.completed";
|
|
17
|
+
readonly WorkflowRunFailed: "workflow_run.failed";
|
|
18
|
+
readonly WorkflowRunNeedsReview: "workflow_run.needs_review";
|
|
19
|
+
readonly WorkflowRunRejected: "workflow_run.rejected";
|
|
20
|
+
readonly WorkflowRunCancelled: "workflow_run.cancelled";
|
|
21
|
+
readonly WorkflowRunStepRunProcessed: "workflow_run.step_run.processed";
|
|
22
|
+
};
|
|
23
|
+
export type WebhookSubscriptionEventType = (typeof WebhookSubscriptionEventType)[keyof typeof WebhookSubscriptionEventType] | string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.WebhookSubscriptionEventType = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* Event types available for resource-scoped webhook subscriptions. The valid subset depends on the `resourceType`:
|
|
7
|
+
*
|
|
8
|
+
* - **extractor**: `extract_run.processed`, `extract_run.failed`
|
|
9
|
+
* - **classifier**: `classify_run.processed`, `classify_run.failed`
|
|
10
|
+
* - **splitter**: `split_run.processed`, `split_run.failed`
|
|
11
|
+
* - **workflow**: `workflow_run.completed`, `workflow_run.failed`, `workflow_run.needs_review`, `workflow_run.rejected`, `workflow_run.cancelled`, `workflow_run.step_run.processed`
|
|
12
|
+
*/
|
|
13
|
+
exports.WebhookSubscriptionEventType = {
|
|
14
|
+
ExtractRunProcessed: "extract_run.processed",
|
|
15
|
+
ExtractRunFailed: "extract_run.failed",
|
|
16
|
+
ClassifyRunProcessed: "classify_run.processed",
|
|
17
|
+
ClassifyRunFailed: "classify_run.failed",
|
|
18
|
+
SplitRunProcessed: "split_run.processed",
|
|
19
|
+
SplitRunFailed: "split_run.failed",
|
|
20
|
+
WorkflowRunCompleted: "workflow_run.completed",
|
|
21
|
+
WorkflowRunFailed: "workflow_run.failed",
|
|
22
|
+
WorkflowRunNeedsReview: "workflow_run.needs_review",
|
|
23
|
+
WorkflowRunRejected: "workflow_run.rejected",
|
|
24
|
+
WorkflowRunCancelled: "workflow_run.cancelled",
|
|
25
|
+
WorkflowRunStepRunProcessed: "workflow_run.step_run.processed",
|
|
26
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** The type of resource the webhook subscription is for. */
|
|
2
|
+
export declare const WebhookSubscriptionResourceType: {
|
|
3
|
+
readonly Extractor: "extractor";
|
|
4
|
+
readonly Classifier: "classifier";
|
|
5
|
+
readonly Splitter: "splitter";
|
|
6
|
+
readonly Workflow: "workflow";
|
|
7
|
+
};
|
|
8
|
+
export type WebhookSubscriptionResourceType = (typeof WebhookSubscriptionResourceType)[keyof typeof WebhookSubscriptionResourceType] | string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.WebhookSubscriptionResourceType = void 0;
|
|
5
|
+
/** The type of resource the webhook subscription is for. */
|
|
6
|
+
exports.WebhookSubscriptionResourceType = {
|
|
7
|
+
Extractor: "extractor",
|
|
8
|
+
Classifier: "classifier",
|
|
9
|
+
Splitter: "splitter",
|
|
10
|
+
Workflow: "workflow",
|
|
11
|
+
};
|
package/api/types/index.d.ts
CHANGED
|
@@ -282,6 +282,8 @@ export * from "./SortDir";
|
|
|
282
282
|
export * from "./SplitAdvancedOptions";
|
|
283
283
|
export * from "./SplitAdvancedOptionsSplitMethod";
|
|
284
284
|
export * from "./SplitBaseProcessor";
|
|
285
|
+
export * from "./SplitClassification";
|
|
286
|
+
export * from "./SplitClassifications";
|
|
285
287
|
export * from "./SplitConfig";
|
|
286
288
|
export * from "./SplitOutput";
|
|
287
289
|
export * from "./SplitOutputSplitsItem";
|
|
@@ -312,7 +314,17 @@ export * from "./TableDetails";
|
|
|
312
314
|
export * from "./TooManyRequestsErrorBody";
|
|
313
315
|
export * from "./UpdatedAt";
|
|
314
316
|
export * from "./VersionDescription";
|
|
317
|
+
export * from "./WebhookAdvancedOptions";
|
|
318
|
+
export * from "./WebhookEndpoint";
|
|
319
|
+
export * from "./WebhookEndpointCreate";
|
|
320
|
+
export * from "./WebhookEndpointEventType";
|
|
321
|
+
export * from "./WebhookEndpointStatus";
|
|
315
322
|
export * from "./WebhookEvent";
|
|
323
|
+
export * from "./WebhookPayloadFormat";
|
|
324
|
+
export * from "./WebhookPayloadOptions";
|
|
325
|
+
export * from "./WebhookSubscription";
|
|
326
|
+
export * from "./WebhookSubscriptionEventType";
|
|
327
|
+
export * from "./WebhookSubscriptionResourceType";
|
|
316
328
|
export * from "./Workflow";
|
|
317
329
|
export * from "./WorkflowCreatedWebhookEvent";
|
|
318
330
|
export * from "./WorkflowDeletedWebhookEvent";
|
package/api/types/index.js
CHANGED
|
@@ -298,6 +298,8 @@ __exportStar(require("./SortDir"), exports);
|
|
|
298
298
|
__exportStar(require("./SplitAdvancedOptions"), exports);
|
|
299
299
|
__exportStar(require("./SplitAdvancedOptionsSplitMethod"), exports);
|
|
300
300
|
__exportStar(require("./SplitBaseProcessor"), exports);
|
|
301
|
+
__exportStar(require("./SplitClassification"), exports);
|
|
302
|
+
__exportStar(require("./SplitClassifications"), exports);
|
|
301
303
|
__exportStar(require("./SplitConfig"), exports);
|
|
302
304
|
__exportStar(require("./SplitOutput"), exports);
|
|
303
305
|
__exportStar(require("./SplitOutputSplitsItem"), exports);
|
|
@@ -328,7 +330,17 @@ __exportStar(require("./TableDetails"), exports);
|
|
|
328
330
|
__exportStar(require("./TooManyRequestsErrorBody"), exports);
|
|
329
331
|
__exportStar(require("./UpdatedAt"), exports);
|
|
330
332
|
__exportStar(require("./VersionDescription"), exports);
|
|
333
|
+
__exportStar(require("./WebhookAdvancedOptions"), exports);
|
|
334
|
+
__exportStar(require("./WebhookEndpoint"), exports);
|
|
335
|
+
__exportStar(require("./WebhookEndpointCreate"), exports);
|
|
336
|
+
__exportStar(require("./WebhookEndpointEventType"), exports);
|
|
337
|
+
__exportStar(require("./WebhookEndpointStatus"), exports);
|
|
331
338
|
__exportStar(require("./WebhookEvent"), exports);
|
|
339
|
+
__exportStar(require("./WebhookPayloadFormat"), exports);
|
|
340
|
+
__exportStar(require("./WebhookPayloadOptions"), exports);
|
|
341
|
+
__exportStar(require("./WebhookSubscription"), exports);
|
|
342
|
+
__exportStar(require("./WebhookSubscriptionEventType"), exports);
|
|
343
|
+
__exportStar(require("./WebhookSubscriptionResourceType"), exports);
|
|
332
344
|
__exportStar(require("./Workflow"), exports);
|
|
333
345
|
__exportStar(require("./WorkflowCreatedWebhookEvent"), exports);
|
|
334
346
|
__exportStar(require("./WorkflowDeletedWebhookEvent"), exports);
|