extend-ai 1.9.0 → 1.11.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.
Files changed (78) hide show
  1. package/.gitattributes +1 -0
  2. package/BaseClient.js +2 -2
  3. package/Client.d.ts +3 -0
  4. package/Client.js +43 -38
  5. package/api/resources/editTemplates/client/Client.d.ts +38 -0
  6. package/api/resources/editTemplates/client/Client.js +137 -0
  7. package/api/resources/editTemplates/client/index.d.ts +1 -0
  8. package/api/resources/editTemplates/client/index.js +17 -0
  9. package/api/resources/editTemplates/client/requests/EditTemplatesRetrieveRequest.d.ts +8 -0
  10. package/api/resources/editTemplates/client/requests/EditTemplatesRetrieveRequest.js +3 -0
  11. package/api/resources/editTemplates/client/requests/index.d.ts +1 -0
  12. package/api/resources/editTemplates/client/requests/index.js +2 -0
  13. package/api/resources/editTemplates/index.d.ts +1 -0
  14. package/api/resources/editTemplates/index.js +17 -0
  15. package/api/resources/evaluationSetRuns/client/Client.d.ts +34 -0
  16. package/api/resources/evaluationSetRuns/client/Client.js +101 -0
  17. package/api/resources/evaluationSetRuns/client/requests/EvaluationSetRunsCreateRequest.d.ts +27 -0
  18. package/api/resources/evaluationSetRuns/client/requests/EvaluationSetRunsCreateRequest.js +3 -0
  19. package/api/resources/evaluationSetRuns/client/requests/index.d.ts +1 -0
  20. package/api/resources/evaluationSetRuns/index.d.ts +1 -0
  21. package/api/resources/evaluationSetRuns/index.js +1 -0
  22. package/api/resources/evaluationSetRuns/types/EvaluationSetRunsCreateRequestEntity.d.ts +9 -0
  23. package/api/resources/evaluationSetRuns/types/EvaluationSetRunsCreateRequestEntity.js +3 -0
  24. package/api/resources/evaluationSetRuns/types/index.d.ts +1 -0
  25. package/api/resources/evaluationSetRuns/types/index.js +17 -0
  26. package/api/resources/extractors/client/Client.d.ts +25 -3
  27. package/api/resources/extractors/client/Client.js +25 -3
  28. package/api/resources/extractors/client/requests/ExtractorsCreateRequest.d.ts +31 -5
  29. package/api/resources/extractors/types/ExtractorsCreateRequestGenerate.d.ts +12 -0
  30. package/api/resources/extractors/types/ExtractorsCreateRequestGenerate.js +3 -0
  31. package/api/resources/extractors/types/ExtractorsCreateRequestGenerateFilesItem.d.ts +2 -0
  32. package/api/resources/extractors/types/ExtractorsCreateRequestGenerateFilesItem.js +3 -0
  33. package/api/resources/extractors/types/index.d.ts +2 -0
  34. package/api/resources/extractors/types/index.js +2 -0
  35. package/api/resources/index.d.ts +3 -0
  36. package/api/resources/index.js +4 -1
  37. package/api/resources/parseRuns/client/Client.d.ts +1 -1
  38. package/api/resources/parseRuns/client/Client.js +4 -2
  39. package/api/resources/parseRuns/client/requests/ParseRunsListRequest.d.ts +8 -0
  40. package/api/resources/webhookEndpoints/client/Client.d.ts +1 -1
  41. package/api/resources/webhookEndpoints/client/Client.js +1 -1
  42. package/api/resources/webhookEndpoints/client/requests/WebhookEndpointsCreateRequest.d.ts +1 -1
  43. package/api/types/ApiVersionEnum.d.ts +1 -9
  44. package/api/types/ApiVersionEnum.js +0 -9
  45. package/api/types/ClassifyAdvancedOptions.d.ts +2 -0
  46. package/api/types/ClassifyRun.d.ts +9 -11
  47. package/api/types/ClassifyRunSummary.d.ts +3 -5
  48. package/api/types/EditConfigAdvancedOptions.d.ts +1 -1
  49. package/api/types/EditRun.d.ts +1 -1
  50. package/api/types/EditTemplate.d.ts +26 -0
  51. package/api/types/EditTemplate.js +3 -0
  52. package/api/types/ExtractAdvancedOptions.d.ts +9 -0
  53. package/api/types/ExtractAdvancedOptionsCitationMode.d.ts +12 -0
  54. package/api/types/ExtractAdvancedOptionsCitationMode.js +15 -0
  55. package/api/types/ExtractRun.d.ts +14 -14
  56. package/api/types/ExtractRunSummary.d.ts +3 -3
  57. package/api/types/ParseRun.d.ts +1 -1
  58. package/api/types/ParseRunSource.d.ts +20 -0
  59. package/api/types/ParseRunSource.js +23 -0
  60. package/api/types/ParseRunStatus.d.ts +6 -0
  61. package/api/types/RunUsage.d.ts +14 -1
  62. package/api/types/RunUsageBreakdownEntry.d.ts +12 -0
  63. package/api/types/RunUsageBreakdownEntry.js +3 -0
  64. package/api/types/RunUsageBreakdownEntryObject.d.ts +9 -0
  65. package/api/types/RunUsageBreakdownEntryObject.js +12 -0
  66. package/api/types/RunUsageSummary.d.ts +19 -0
  67. package/api/types/RunUsageSummary.js +3 -0
  68. package/api/types/SplitRun.d.ts +9 -9
  69. package/api/types/SplitRunSummary.d.ts +3 -3
  70. package/api/types/StepRun.d.ts +28 -2
  71. package/api/types/WorkflowRun.d.ts +5 -0
  72. package/api/types/WorkflowRunSummary.d.ts +6 -1
  73. package/api/types/index.d.ts +6 -0
  74. package/api/types/index.js +6 -0
  75. package/package.json +1 -1
  76. package/reference.md +165 -5
  77. package/version.d.ts +1 -1
  78. package/version.js +1 -1
@@ -11,18 +11,6 @@ export interface ExtractRun {
11
11
  * Example: `"exr_Xj8mK2pL9nR4vT7qY5wZ"`
12
12
  */
13
13
  id: string;
14
- /**
15
- * The extractor that was used for this run.
16
- *
17
- * **Availability:** Present when an extractor reference was provided. Not present when using inline `config`.
18
- */
19
- extractor: Extend.ExtractorSummary | null;
20
- /**
21
- * The version of the extractor that was used for this run.
22
- *
23
- * **Availability:** Present when an extractor reference was provided. Not present when using inline `config`.
24
- */
25
- extractorVersion: Extend.ExtractorVersionSummary | null;
26
14
  status: Extend.ProcessorRunStatus;
27
15
  /**
28
16
  * The final output, either reviewed or initial. This is a union of two possible shapes:
@@ -93,6 +81,18 @@ export interface ExtractRun {
93
81
  * - **[Legacy config](https://docs.extend.ai/2025-04-21/product/legacy/legacy-schema):** A fields-array config from a previous API version. This shape is only returned when retrieving runs that were originally created with the legacy format. This API version does not support creating runs with legacy configs.
94
82
  */
95
83
  config: Extend.ExtractConfig;
84
+ /**
85
+ * The extractor that was used for this run.
86
+ *
87
+ * **Availability:** Present when an extractor reference was provided. Not present when using inline `config`.
88
+ */
89
+ extractor: Extend.ExtractorSummary | null;
90
+ /**
91
+ * The version of the extractor that was used for this run.
92
+ *
93
+ * **Availability:** Present when an extractor reference was provided. Not present when using inline `config`.
94
+ */
95
+ extractorVersion: Extend.ExtractorVersionSummary | null;
96
96
  /** The file that was processed. */
97
97
  file: Extend.FileSummary;
98
98
  /**
@@ -104,9 +104,9 @@ export interface ExtractRun {
104
104
  /** The URL to view the extract run in the Extend dashboard. */
105
105
  dashboardUrl: string;
106
106
  /**
107
- * Usage credits consumed by this run.
107
+ * Usage credits consumed by this extract run.
108
108
  *
109
- * **Availability:** Present when `status` is `"PROCESSED"`.
109
+ * **Availability:** Present when `status` is `"PROCESSED"`. Will not be returned for runs created before October 7, 2025 or for customers on legacy billing systems.
110
110
  */
111
111
  usage: Extend.RunUsage | null;
112
112
  createdAt: Extend.CreatedAt;
@@ -53,11 +53,11 @@ export interface ExtractRunSummary {
53
53
  /** The URL to view the extract run in the Extend dashboard. */
54
54
  dashboardUrl: string;
55
55
  /**
56
- * Usage credits consumed by this run.
56
+ * Usage credits consumed by this extract run. Omits `breakdown` — fetch the full extract run by id to see the per-line items.
57
57
  *
58
- * **Availability:** Present when `status` is `"PROCESSED"`.
58
+ * **Availability:** Present when `status` is `"PROCESSED"`. Will not be returned for runs created before October 7, 2025 or for customers on legacy billing systems.
59
59
  */
60
- usage: Extend.RunUsage | null;
60
+ usage: Extend.RunUsageSummary | null;
61
61
  createdAt: Extend.CreatedAt;
62
62
  updatedAt: Extend.UpdatedAt;
63
63
  }
@@ -79,7 +79,7 @@ export interface ParseRun {
79
79
  /** The configuration used for the parsing process, including any default values that were applied. */
80
80
  config: Extend.ParseConfig;
81
81
  /**
82
- * Usage credits consumed by this run.
82
+ * Usage credits consumed by this parse run.
83
83
  *
84
84
  * **Availability:** Present when `status` is `"PROCESSED"`, the run was created after October 7, 2025, and the customer is on the current billing system.
85
85
  */
@@ -0,0 +1,20 @@
1
+ /**
2
+ * The source that created the parse run:
3
+ * * `"API"` - Created via API
4
+ * * `"STUDIO"` - Created from Studio
5
+ * * `"WORKFLOW_RUN"` - Created from a workflow run
6
+ * * `"ADMIN"` - Created by admin
7
+ * * `"BATCH_PARSER_RUN"` - Created from a batch parse run (via `POST /parse_runs/batch`)
8
+ * * `"EDIT_RUN"` - Created from an edit run
9
+ * * `"DOCUMENT_PROCESSOR_RUN"` - Created from a document processor run
10
+ */
11
+ export declare const ParseRunSource: {
12
+ readonly Api: "API";
13
+ readonly Studio: "STUDIO";
14
+ readonly WorkflowRun: "WORKFLOW_RUN";
15
+ readonly Admin: "ADMIN";
16
+ readonly BatchParserRun: "BATCH_PARSER_RUN";
17
+ readonly EditRun: "EDIT_RUN";
18
+ readonly DocumentProcessorRun: "DOCUMENT_PROCESSOR_RUN";
19
+ };
20
+ export type ParseRunSource = (typeof ParseRunSource)[keyof typeof ParseRunSource] | string;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.ParseRunSource = void 0;
5
+ /**
6
+ * The source that created the parse run:
7
+ * * `"API"` - Created via API
8
+ * * `"STUDIO"` - Created from Studio
9
+ * * `"WORKFLOW_RUN"` - Created from a workflow run
10
+ * * `"ADMIN"` - Created by admin
11
+ * * `"BATCH_PARSER_RUN"` - Created from a batch parse run (via `POST /parse_runs/batch`)
12
+ * * `"EDIT_RUN"` - Created from an edit run
13
+ * * `"DOCUMENT_PROCESSOR_RUN"` - Created from a document processor run
14
+ */
15
+ exports.ParseRunSource = {
16
+ Api: "API",
17
+ Studio: "STUDIO",
18
+ WorkflowRun: "WORKFLOW_RUN",
19
+ Admin: "ADMIN",
20
+ BatchParserRun: "BATCH_PARSER_RUN",
21
+ EditRun: "EDIT_RUN",
22
+ DocumentProcessorRun: "DOCUMENT_PROCESSOR_RUN",
23
+ };
@@ -31,4 +31,10 @@ export interface ParseRunStatus {
31
31
  * **Availability:** Present when `status` is `"FAILED"`.
32
32
  */
33
33
  failureMessage?: string | null;
34
+ /**
35
+ * Any metadata that was provided when creating the parse run.
36
+ *
37
+ * **Availability:** Present when metadata was provided during creation.
38
+ */
39
+ metadata?: Extend.RunMetadata | null;
34
40
  }
@@ -1,3 +1,4 @@
1
+ import type * as Extend from "../index";
1
2
  /**
2
3
  * Usage credits consumed by a run.
3
4
  *
@@ -8,6 +9,18 @@
8
9
  * For more details on how credits work, see our [Credits Guide](https://docs.extend.ai/2026-02-09/product/general/how-credits-work).
9
10
  */
10
11
  export interface RunUsage {
11
- /** The number of credits consumed for this run. */
12
+ /** 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. */
12
13
  credits: number;
14
+ /**
15
+ * The total credits accounted for under this run, including any other runs it was responsible for creating. For example, an extract run on a fresh upload triggers a parse run, so `totalCredits` includes both line items. For runs that didn't trigger any other work — like `parse_run`, `edit_run` and `workflow_run` — `totalCredits` equals `credits`.
16
+ *
17
+ * **Availability:** Present on runs persisted on or after May 14, 2026. Runs persisted before that date will omit this field.
18
+ */
19
+ totalCredits?: number;
20
+ /**
21
+ * The chargeable resources that make up `totalCredits`, including this run itself when it has its own line item. For `workflow_run`, lists every contributing child run sorted by creation time (the workflow itself isn't chargeable and has no line item).
22
+ *
23
+ * **Availability:** Present on runs persisted on or after May 14, 2026. Runs persisted before that date will omit this field.
24
+ */
25
+ breakdown?: Extend.RunUsageBreakdownEntry[];
13
26
  }
@@ -0,0 +1,12 @@
1
+ import type * as Extend from "../index";
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.
4
+ */
5
+ export interface RunUsageBreakdownEntry {
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. */
7
+ object: Extend.RunUsageBreakdownEntryObject;
8
+ /** The id of the contributing resource (e.g. `pr_3UZSj69pYZDKHFuuX57ic`). */
9
+ id: string;
10
+ /** Credits charged to the contributing resource. */
11
+ credits: number;
12
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /** 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. */
2
+ export declare const RunUsageBreakdownEntryObject: {
3
+ readonly ExtractRun: "extract_run";
4
+ readonly ClassifyRun: "classify_run";
5
+ readonly SplitRun: "split_run";
6
+ readonly ParseRun: "parse_run";
7
+ readonly EditRun: "edit_run";
8
+ };
9
+ export type RunUsageBreakdownEntryObject = (typeof RunUsageBreakdownEntryObject)[keyof typeof RunUsageBreakdownEntryObject] | string;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.RunUsageBreakdownEntryObject = void 0;
5
+ /** 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. */
6
+ exports.RunUsageBreakdownEntryObject = {
7
+ ExtractRun: "extract_run",
8
+ ClassifyRun: "classify_run",
9
+ SplitRun: "split_run",
10
+ ParseRun: "parse_run",
11
+ EditRun: "edit_run",
12
+ };
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Usage credits consumed by a run. Omits `breakdown` - fetch the full resource by id when you need the breakdown.
3
+ *
4
+ * **Availability:** This field will not be returned for:
5
+ * * Runs created before October 7, 2025
6
+ * * Customers on legacy billing systems
7
+ *
8
+ * For more details on how credits work, see our [Credits Guide](https://docs.extend.ai/2026-02-09/product/general/how-credits-work).
9
+ */
10
+ export interface RunUsageSummary {
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. */
12
+ credits: number;
13
+ /**
14
+ * The total credits accounted for under this run, including any other runs it was responsible for creating. For example, an extract run on a fresh upload triggers a parse run, so `totalCredits` includes both line items. For runs that didn't trigger any other work — like `parse_run`, `edit_run`, and `workflow_run` — `totalCredits` equals `credits`.
15
+ *
16
+ * **Availability:** Present on runs persisted on or after May 14, 2026. Runs persisted before that date will omit this field.
17
+ */
18
+ totalCredits?: number;
19
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -11,6 +11,13 @@ export interface SplitRun {
11
11
  * Example: `"splr_Xj8mK2pL9nR4vT7qY5wZ"`
12
12
  */
13
13
  id: string;
14
+ status: Extend.ProcessorRunStatus;
15
+ /**
16
+ * The final output, either reviewed or initial.
17
+ *
18
+ * **Availability:** Present when `status` is `"PROCESSED"`.
19
+ */
20
+ output: Extend.SplitOutput | null;
14
21
  /**
15
22
  * The splitter that was used for this run.
16
23
  *
@@ -23,13 +30,6 @@ export interface SplitRun {
23
30
  * **Availability:** Present when a splitter reference was provided. Not present when using inline `config`.
24
31
  */
25
32
  splitterVersion: Extend.SplitterVersionSummary | null;
26
- status: Extend.ProcessorRunStatus;
27
- /**
28
- * The final output, either reviewed or initial.
29
- *
30
- * **Availability:** Present when `status` is `"PROCESSED"`.
31
- */
32
- output: Extend.SplitOutput | null;
33
33
  /**
34
34
  * The initial output from the split run, before any review edits.
35
35
  *
@@ -90,9 +90,9 @@ export interface SplitRun {
90
90
  /** The URL to view the split run in the Extend dashboard. */
91
91
  dashboardUrl: string;
92
92
  /**
93
- * Usage credits consumed by this run.
93
+ * Usage credits consumed by this split run.
94
94
  *
95
- * **Availability:** Present when `status` is `"PROCESSED"`.
95
+ * **Availability:** Present when `status` is `"PROCESSED"`. Will not be returned for runs created before October 7, 2025 or for customers on legacy billing systems.
96
96
  */
97
97
  usage: Extend.RunUsage | null;
98
98
  createdAt: Extend.CreatedAt;
@@ -53,11 +53,11 @@ export interface SplitRunSummary {
53
53
  /** The URL to view the split run in the Extend dashboard. */
54
54
  dashboardUrl: string;
55
55
  /**
56
- * Usage credits consumed by this run.
56
+ * Usage credits consumed by this split run. Omits `breakdown` — fetch the full split run by id to see the per-line items.
57
57
  *
58
- * **Availability:** Present when `status` is `"PROCESSED"`.
58
+ * **Availability:** Present when `status` is `"PROCESSED"`. Will not be returned for runs created before October 7, 2025 or for customers on legacy billing systems.
59
59
  */
60
- usage: Extend.RunUsage | null;
60
+ usage: Extend.RunUsageSummary | null;
61
61
  createdAt: Extend.CreatedAt;
62
62
  updatedAt: Extend.UpdatedAt;
63
63
  }
@@ -1,5 +1,31 @@
1
1
  import type * as Extend from "../index";
2
2
  /**
3
- * A workflow step run. The shape of the `result` field depends on the `step.type`.
3
+ * A workflow step run. The shape of the `result` field depends on the `stepType`.
4
4
  */
5
- export type StepRun = Extend.ParseStepRun | Extend.ExtractStepRun | Extend.ClassifyStepRun | Extend.SplitStepRun | Extend.MergeExtractStepRun | Extend.ConditionalExtractStepRun | Extend.RuleValidationStepRun | Extend.ExternalDataValidationStepRun;
5
+ export type StepRun = Extend.StepRun.Parse | Extend.StepRun.Extract | Extend.StepRun.Classify | Extend.StepRun.Split | Extend.StepRun.MergeExtract | Extend.StepRun.ConditionalExtract | Extend.StepRun.RuleValidation | Extend.StepRun.ExternalDataValidation;
6
+ export declare namespace StepRun {
7
+ interface Parse extends Extend.ParseStepRun {
8
+ stepType: "PARSE";
9
+ }
10
+ interface Extract extends Extend.ExtractStepRun {
11
+ stepType: "EXTRACT";
12
+ }
13
+ interface Classify extends Extend.ClassifyStepRun {
14
+ stepType: "CLASSIFY";
15
+ }
16
+ interface Split extends Extend.SplitStepRun {
17
+ stepType: "SPLIT";
18
+ }
19
+ interface MergeExtract extends Extend.MergeExtractStepRun {
20
+ stepType: "MERGE_EXTRACT";
21
+ }
22
+ interface ConditionalExtract extends Extend.ConditionalExtractStepRun {
23
+ stepType: "CONDITIONAL_EXTRACT";
24
+ }
25
+ interface RuleValidation extends Extend.RuleValidationStepRun {
26
+ stepType: "RULE_VALIDATION";
27
+ }
28
+ interface ExternalDataValidation extends Extend.ExternalDataValidationStepRun {
29
+ stepType: "EXTERNAL_DATA_VALIDATION";
30
+ }
31
+ }
@@ -73,5 +73,10 @@ export interface WorkflowRun {
73
73
  endTime: string | null;
74
74
  /** An array of WorkflowStepRun objects. Each WorkflowStepRun represents a single run of a WorkflowStep and contains details about the step's execution and result. */
75
75
  stepRuns: Extend.StepRun[];
76
+ /**
77
+ * Usage credits consumed by this workflow run, including a breakdown of every contributing child run.
78
+ *
79
+ * **Availability:** Will not be returned for runs created before October 7, 2025 or for customers on legacy billing systems.
80
+ */
76
81
  usage: Extend.RunUsage | null;
77
82
  }
@@ -61,5 +61,10 @@ export interface WorkflowRunSummary {
61
61
  rejectionNote: string | null;
62
62
  createdAt: Extend.CreatedAt;
63
63
  updatedAt: Extend.UpdatedAt;
64
- usage: Extend.RunUsage | null;
64
+ /**
65
+ * Usage credits consumed by this workflow run. Omits `breakdown` — fetch the full workflow run by id to see the per-line items for every contributing child run.
66
+ *
67
+ * **Availability:** Will not be returned for runs created before October 7, 2025 or for customers on legacy billing systems.
68
+ */
69
+ usage: Extend.RunUsageSummary | null;
65
70
  }
@@ -92,6 +92,7 @@ export * from "./EditSchemaGenerationConfigAdvancedOptions";
92
92
  export * from "./EditSchemaGenerationMappingMatch";
93
93
  export * from "./EditSchemaGenerationMappingResult";
94
94
  export * from "./EditSchemaGenerationResponse";
95
+ export * from "./EditTemplate";
95
96
  export * from "./EditTextOptions";
96
97
  export * from "./EmptyBlockDetails";
97
98
  export * from "./Enum";
@@ -118,6 +119,7 @@ export * from "./ExternalDataValidationStepRun";
118
119
  export * from "./ExternalDataValidationStepRunStep";
119
120
  export * from "./ExtractAdvancedOptions";
120
121
  export * from "./ExtractAdvancedOptionsArrayCitationStrategy";
122
+ export * from "./ExtractAdvancedOptionsCitationMode";
121
123
  export * from "./ExtractAdvancedOptionsExcelSheetSelectionStrategy";
122
124
  export * from "./ExtractAdvancedOptionsReviewAgent";
123
125
  export * from "./ExtractBaseProcessor";
@@ -299,6 +301,7 @@ export * from "./ParseRunOutput";
299
301
  export * from "./ParseRunOutputOcr";
300
302
  export * from "./ParseRunOutputOcrWordsItem";
301
303
  export * from "./ParseRunProcessedWebhookEvent";
304
+ export * from "./ParseRunSource";
302
305
  export * from "./ParseRunStatus";
303
306
  export * from "./ParseRunStatusEnum";
304
307
  export * from "./ParseRunStatusStatus";
@@ -331,6 +334,9 @@ export * from "./RunSecrets";
331
334
  export * from "./RunSource";
332
335
  export * from "./RunSourceId";
333
336
  export * from "./RunUsage";
337
+ export * from "./RunUsageBreakdownEntry";
338
+ export * from "./RunUsageBreakdownEntryObject";
339
+ export * from "./RunUsageSummary";
334
340
  export * from "./SimpleNextEntry";
335
341
  export * from "./SortBy";
336
342
  export * from "./SortDir";
@@ -108,6 +108,7 @@ __exportStar(require("./EditSchemaGenerationConfigAdvancedOptions"), exports);
108
108
  __exportStar(require("./EditSchemaGenerationMappingMatch"), exports);
109
109
  __exportStar(require("./EditSchemaGenerationMappingResult"), exports);
110
110
  __exportStar(require("./EditSchemaGenerationResponse"), exports);
111
+ __exportStar(require("./EditTemplate"), exports);
111
112
  __exportStar(require("./EditTextOptions"), exports);
112
113
  __exportStar(require("./EmptyBlockDetails"), exports);
113
114
  __exportStar(require("./Enum"), exports);
@@ -134,6 +135,7 @@ __exportStar(require("./ExternalDataValidationStepRun"), exports);
134
135
  __exportStar(require("./ExternalDataValidationStepRunStep"), exports);
135
136
  __exportStar(require("./ExtractAdvancedOptions"), exports);
136
137
  __exportStar(require("./ExtractAdvancedOptionsArrayCitationStrategy"), exports);
138
+ __exportStar(require("./ExtractAdvancedOptionsCitationMode"), exports);
137
139
  __exportStar(require("./ExtractAdvancedOptionsExcelSheetSelectionStrategy"), exports);
138
140
  __exportStar(require("./ExtractAdvancedOptionsReviewAgent"), exports);
139
141
  __exportStar(require("./ExtractBaseProcessor"), exports);
@@ -315,6 +317,7 @@ __exportStar(require("./ParseRunOutput"), exports);
315
317
  __exportStar(require("./ParseRunOutputOcr"), exports);
316
318
  __exportStar(require("./ParseRunOutputOcrWordsItem"), exports);
317
319
  __exportStar(require("./ParseRunProcessedWebhookEvent"), exports);
320
+ __exportStar(require("./ParseRunSource"), exports);
318
321
  __exportStar(require("./ParseRunStatus"), exports);
319
322
  __exportStar(require("./ParseRunStatusEnum"), exports);
320
323
  __exportStar(require("./ParseRunStatusStatus"), exports);
@@ -347,6 +350,9 @@ __exportStar(require("./RunSecrets"), exports);
347
350
  __exportStar(require("./RunSource"), exports);
348
351
  __exportStar(require("./RunSourceId"), exports);
349
352
  __exportStar(require("./RunUsage"), exports);
353
+ __exportStar(require("./RunUsageBreakdownEntry"), exports);
354
+ __exportStar(require("./RunUsageBreakdownEntryObject"), exports);
355
+ __exportStar(require("./RunUsageSummary"), exports);
350
356
  __exportStar(require("./SimpleNextEntry"), exports);
351
357
  __exportStar(require("./SortBy"), exports);
352
358
  __exportStar(require("./SortDir"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "extend-ai",
3
- "version": "1.9.0",
3
+ "version": "1.11.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -732,7 +732,7 @@ await client.files.upload(createReadStream("path/to/file"), {});
732
732
  <dl>
733
733
  <dd>
734
734
 
735
- List parse runs, with optional filters for status, batch ID, and file name.
735
+ List parse runs, with optional filters for status, batch ID, source, and file name.
736
736
 
737
737
  Returns a paginated list of parse runs. Use `GET /parse_runs/{id}` to retrieve the full result including output for a specific run.
738
738
  </dd>
@@ -1337,6 +1337,84 @@ Example: `"edr_xK9mLPqRtN3vS8wF5hB2cQ"`
1337
1337
  </dl>
1338
1338
 
1339
1339
 
1340
+ </dd>
1341
+ </dl>
1342
+ </details>
1343
+
1344
+ ## EditTemplates
1345
+ <details><summary><code>client.editTemplates.<a href="/src/api/resources/editTemplates/client/Client.ts">retrieve</a>(id, { ...params }) -> Extend.EditTemplate</code></summary>
1346
+ <dl>
1347
+ <dd>
1348
+
1349
+ #### 📝 Description
1350
+
1351
+ <dl>
1352
+ <dd>
1353
+
1354
+ <dl>
1355
+ <dd>
1356
+
1357
+ Retrieve a saved edit template by ID.
1358
+
1359
+ Use this endpoint to inspect the source file, default edit configuration, and optional schema generation configuration saved on an edit template. You can reuse the returned `config` with `POST /edit` or `POST /edit_runs`, and reuse `schemaConfig` with `POST /edit_schemas/generate`.
1360
+ </dd>
1361
+ </dl>
1362
+ </dd>
1363
+ </dl>
1364
+
1365
+ #### 🔌 Usage
1366
+
1367
+ <dl>
1368
+ <dd>
1369
+
1370
+ <dl>
1371
+ <dd>
1372
+
1373
+ ```typescript
1374
+ await client.editTemplates.retrieve("edit_template_id_here");
1375
+
1376
+ ```
1377
+ </dd>
1378
+ </dl>
1379
+ </dd>
1380
+ </dl>
1381
+
1382
+ #### ⚙️ Parameters
1383
+
1384
+ <dl>
1385
+ <dd>
1386
+
1387
+ <dl>
1388
+ <dd>
1389
+
1390
+ **id:** `string`
1391
+
1392
+ The unique identifier for the edit template.
1393
+
1394
+ Example: `"edt_xK9mLPqRtN3vS8wF5hB2cQ"`
1395
+
1396
+ </dd>
1397
+ </dl>
1398
+
1399
+ <dl>
1400
+ <dd>
1401
+
1402
+ **request:** `Extend.EditTemplatesRetrieveRequest`
1403
+
1404
+ </dd>
1405
+ </dl>
1406
+
1407
+ <dl>
1408
+ <dd>
1409
+
1410
+ **requestOptions:** `EditTemplatesClient.RequestOptions`
1411
+
1412
+ </dd>
1413
+ </dl>
1414
+ </dd>
1415
+ </dl>
1416
+
1417
+
1340
1418
  </dd>
1341
1419
  </dl>
1342
1420
  </details>
@@ -1969,6 +2047,8 @@ await client.extractors.list({
1969
2047
  <dd>
1970
2048
 
1971
2049
  Create a new extractor.
2050
+
2051
+ You can optionally provide a `generate` object to automatically generate an extraction schema from sample documents using AI. `generate` is mutually exclusive with `config` and `cloneExtractorId`.
1972
2052
  </dd>
1973
2053
  </dl>
1974
2054
  </dd>
@@ -1990,15 +2070,24 @@ await client.extractors.create({
1990
2070
  "type": "object",
1991
2071
  "properties": {
1992
2072
  "vendor_name": {
1993
- "type": "string",
2073
+ "type": [
2074
+ "string",
2075
+ "null"
2076
+ ],
1994
2077
  "description": "The name of the vendor"
1995
2078
  },
1996
2079
  "invoice_number": {
1997
- "type": "string",
2080
+ "type": [
2081
+ "string",
2082
+ "null"
2083
+ ],
1998
2084
  "description": "The invoice number"
1999
2085
  },
2000
2086
  "total_amount": {
2001
- "type": "number",
2087
+ "type": [
2088
+ "number",
2089
+ "null"
2090
+ ],
2002
2091
  "description": "The total amount due"
2003
2092
  }
2004
2093
  }
@@ -7152,6 +7241,77 @@ Example: `"evi_kR9mNP12Qw4yTv8BdR3H"`
7152
7241
  </details>
7153
7242
 
7154
7243
  ## EvaluationSetRuns
7244
+ <details><summary><code>client.evaluationSetRuns.<a href="/src/api/resources/evaluationSetRuns/client/Client.ts">create</a>({ ...params }) -> Extend.EvaluationSetRun</code></summary>
7245
+ <dl>
7246
+ <dd>
7247
+
7248
+ #### 📝 Description
7249
+
7250
+ <dl>
7251
+ <dd>
7252
+
7253
+ <dl>
7254
+ <dd>
7255
+
7256
+ Create and start an async evaluation set run. The response returns the evaluation set run object with its initial status; use `GET /evaluation_set_runs/{id}` to poll for completion.
7257
+
7258
+ Evaluation set runs are currently supported for document processor evaluation sets.
7259
+ </dd>
7260
+ </dl>
7261
+ </dd>
7262
+ </dl>
7263
+
7264
+ #### 🔌 Usage
7265
+
7266
+ <dl>
7267
+ <dd>
7268
+
7269
+ <dl>
7270
+ <dd>
7271
+
7272
+ ```typescript
7273
+ await client.evaluationSetRuns.create({
7274
+ evaluationSetId: "ev_2LcgeY_mp2T5yPaEuq5Lw",
7275
+ entity: {
7276
+ id: "ex_Xj8mK2pL9nR4vT7qY5wZ",
7277
+ version: "1.0"
7278
+ }
7279
+ });
7280
+
7281
+ ```
7282
+ </dd>
7283
+ </dl>
7284
+ </dd>
7285
+ </dl>
7286
+
7287
+ #### ⚙️ Parameters
7288
+
7289
+ <dl>
7290
+ <dd>
7291
+
7292
+ <dl>
7293
+ <dd>
7294
+
7295
+ **request:** `Extend.EvaluationSetRunsCreateRequest`
7296
+
7297
+ </dd>
7298
+ </dl>
7299
+
7300
+ <dl>
7301
+ <dd>
7302
+
7303
+ **requestOptions:** `EvaluationSetRunsClient.RequestOptions`
7304
+
7305
+ </dd>
7306
+ </dl>
7307
+ </dd>
7308
+ </dl>
7309
+
7310
+
7311
+ </dd>
7312
+ </dl>
7313
+ </details>
7314
+
7155
7315
  <details><summary><code>client.evaluationSetRuns.<a href="/src/api/resources/evaluationSetRuns/client/Client.ts">retrieve</a>(id, { ...params }) -> Extend.EvaluationSetRun</code></summary>
7156
7316
  <dl>
7157
7317
  <dd>
@@ -7328,7 +7488,7 @@ await client.webhookEndpoints.create({
7328
7488
  url: "https://example.com/webhooks",
7329
7489
  name: "Production webhook",
7330
7490
  enabledEvents: ["extract_run.processed", "workflow.created"],
7331
- apiVersion: "2026-02-09"
7491
+ apiVersion: "apiVersion"
7332
7492
  });
7333
7493
 
7334
7494
  ```
package/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.9.0";
1
+ export declare const SDK_VERSION = "1.11.0";
package/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "1.9.0";
4
+ exports.SDK_VERSION = "1.11.0";