Package ai.extend.wrapper
Class ExtendClientWrapper
- java.lang.Object
-
- ai.extend.ExtendClient
-
- ai.extend.wrapper.ExtendClientWrapper
-
public class ExtendClientWrapper extends ExtendClient
Wrapper for the Extend API client with additional polling and webhook utilities.Extends the generated
ExtendClient, so all generated methods (parse, edit, extract, classify, split, files, extractors, classifiers, splitters, workflows, evaluation sets, etc.) are available directly.Additionally provides:
createAndPollon all run resources (extractRuns, classifyRuns, etc.)webhooks()for signature verification
Basic Usage
ExtendClientWrapper client = ExtendClientWrapper.builder() .token("your-api-key") .build(); // Synchronous convenience methods (inherited from ExtendClient) ParseRun parseResult = client.parse(ParseRequest.builder().file(...).build()); ExtractRun extractResult = client.extract(ExtractRequest.builder().file(...).build()); // Create and poll an extract run ExtractRun response = client.extractRuns().createAndPoll( ExtractRunsCreateRequest.builder() .file(...) .extractor(...) .build() );Webhook Verification
Map<String, Object> event = client.webhooks().verifyAndParse( requestBody, requestHeaders, signingSecret );
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classExtendClientWrapper.BuilderBuilder forExtendClientWrapper.
-
Field Summary
-
Fields inherited from class ai.extend.ExtendClient
batchProcessorRunClient, batchRunsClient, classifiersClient, classifierVersionsClient, clientOptions, editSchemasClient, editTemplatesClient, evaluationSetItemsClient, evaluationSetRunsClient, evaluationSetsClient, extractorsClient, extractorVersionsClient, filesClient, processorClient, processorRunClient, processorVersionClient, splittersClient, splitterVersionsClient, webhookEndpointsClient, webhookSubscriptionsClient, workflowsClient, workflowVersionsClient
-
-
Constructor Summary
Constructors Constructor Description ExtendClientWrapper(ClientOptions clientOptions)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ExtendClientWrapper.Builderbuilder()Creates a new builder for ExtendClientWrapper.ClassifyRunsClientclassifyRuns()Returns the classify runs client with createAndPoll support.EditRunsClienteditRuns()Returns the edit runs client with createAndPoll support.ExtractRunsClientextractRuns()Returns the extract runs client with createAndPoll support.ParseRunsClientparseRuns()Returns the parse runs client with createAndPoll support.SplitRunsClientsplitRuns()Returns the split runs client with createAndPoll support.Webhookswebhooks()Returns the webhook utilities for signature verification.WorkflowRunsClientworkflowRuns()Returns the workflow runs client with createAndPoll support.-
Methods inherited from class ai.extend.ExtendClient
batchProcessorRun, batchRuns, classifiers, classifierVersions, classify, classify, edit, edit, editSchemas, editTemplates, evaluationSetItems, evaluationSetRuns, evaluationSets, extract, extract, extractors, extractorVersions, files, parse, parse, processor, processorRun, processorVersion, split, split, splitters, splitterVersions, webhookEndpoints, webhookSubscriptions, withRawResponse, workflows, workflowVersions
-
-
-
-
Constructor Detail
-
ExtendClientWrapper
public ExtendClientWrapper(ClientOptions clientOptions)
-
-
Method Detail
-
webhooks
public Webhooks webhooks()
Returns the webhook utilities for signature verification.
-
extractRuns
public ExtractRunsClient extractRuns()
Returns the extract runs client with createAndPoll support. All standard methods (create, list, retrieve, delete, cancel) are also available.- Overrides:
extractRunsin classExtendClient
-
classifyRuns
public ClassifyRunsClient classifyRuns()
Returns the classify runs client with createAndPoll support. All standard methods (create, list, retrieve, delete, cancel) are also available.- Overrides:
classifyRunsin classExtendClient
-
splitRuns
public SplitRunsClient splitRuns()
Returns the split runs client with createAndPoll support. All standard methods (create, list, retrieve, delete, cancel) are also available.- Overrides:
splitRunsin classExtendClient
-
parseRuns
public ParseRunsClient parseRuns()
Returns the parse runs client with createAndPoll support. All standard methods (create, retrieve, delete) are also available.- Overrides:
parseRunsin classExtendClient
-
editRuns
public EditRunsClient editRuns()
Returns the edit runs client with createAndPoll support. All standard methods (create, retrieve, delete) are also available.- Overrides:
editRunsin classExtendClient
-
workflowRuns
public WorkflowRunsClient workflowRuns()
Returns the workflow runs client with createAndPoll support. All standard methods (create, list, retrieve, update, delete, cancel, createBatch) are also available.- Overrides:
workflowRunsin classExtendClient
-
builder
public static ExtendClientWrapper.Builder builder()
Creates a new builder for ExtendClientWrapper.
-
-