Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ management:
docVersion: 1.0.81
speakeasyVersion: 1.517.3
generationVersion: 2.548.6
releaseVersion: 0.21.1
configChecksum: e65806695f558e569e7327b62f146277
releaseVersion: 0.22.1
configChecksum: 2cebaaef5f17f81677d245e1b6606f99
repoURL: https://github.com/Unstructured-IO/unstructured-js-client.git
repoSubDirectory: .
installationURL: https://github.com/Unstructured-IO/unstructured-js-client
Expand All @@ -24,6 +24,7 @@ features:
globalSecurity: 2.82.13
globalSecurityCallbacks: 0.1.0
globalServerURLs: 2.82.4
mcpServer: 0.7.0
nameOverrides: 2.81.2
nullables: 0.1.1
openEnums: 0.1.1
Expand Down Expand Up @@ -80,6 +81,19 @@ generatedFiles:
- src/lib/sdks.ts
- src/lib/security.ts
- src/lib/url.ts
- src/mcp-server/build.mts
- src/mcp-server/cli.ts
- src/mcp-server/cli/start/command.ts
- src/mcp-server/cli/start/impl.ts
- src/mcp-server/console-logger.ts
- src/mcp-server/extensions.ts
- src/mcp-server/mcp-server.ts
- src/mcp-server/resources.ts
- src/mcp-server/scopes.ts
- src/mcp-server/server.ts
- src/mcp-server/shared.ts
- src/mcp-server/tools.ts
- src/mcp-server/tools/generalPartition.ts
- src/sdk/general.ts
- src/sdk/index.ts
- src/sdk/models/errors/httpclienterrors.ts
Expand Down
7 changes: 3 additions & 4 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,19 @@ speakeasyVersion: 1.517.3
sources:
my-source:
sourceNamespace: my-source
sourceRevisionDigest: sha256:5c2f4c4260daeae651dff81c9ec543cf04f8652ee4731c54363766ad6101cb9a
sourceRevisionDigest: sha256:9e9f4ecb34f6a07b353e1209254ed5fca4b14fa19b7117d4d9c263c8160cf1cf
sourceBlobDigest: sha256:822e38da0c61b9aeaa5446413a6cec058a464920a02d20d9ee7955c827446050
tags:
- latest
- speakeasy-sdk-regen-1741912135
- 1.0.81
targets:
unstructed-typescript:
source: my-source
sourceNamespace: my-source
sourceRevisionDigest: sha256:5c2f4c4260daeae651dff81c9ec543cf04f8652ee4731c54363766ad6101cb9a
sourceRevisionDigest: sha256:9e9f4ecb34f6a07b353e1209254ed5fca4b14fa19b7117d4d9c263c8160cf1cf
sourceBlobDigest: sha256:822e38da0c61b9aeaa5446413a6cec058a464920a02d20d9ee7955c827446050
codeSamplesNamespace: my-source-typescript-code-samples
codeSamplesRevisionDigest: sha256:3091e64d53d2b0729ef230c5abcccf9f7fe0058c0b30ee15342eb55047902e18
codeSamplesRevisionDigest: sha256:4d09779f82fdbd1876eb140badbe39203ed5dc68f2104e7a383e1c3ce77ef820
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
50 changes: 50 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,56 @@ npm install unstructured-client --include=dev
```bash
yarn add unstructured-client --dev
```

### Model Context Protocol (MCP) Server

This SDK is also an installable MCP server where the various SDK methods are
exposed as tools that can be invoked by AI applications.

> Node.js v20 or greater is required to run the MCP server.

<details>
<summary>Claude installation steps</summary>

Add the following server definition to your `claude_desktop_config.json` file:

```json
{
"mcpServers": {
"Unstructured": {
"command": "npx",
"args": [
"-y", "--package", "unstructured-client",
"--",
"mcp", "start",
]
}
}
}
```

</details>

<details>
<summary>Cursor installation steps</summary>

Go to `Cursor Settings > Features > MCP Servers > Add new MCP server` and use the following settings:

- Name: Unstructured
- Type: `command`
- Command:
```sh
npx -y --package unstructured-client -- mcp start
```

</details>

For a full list of server arguments, run:

```sh
npx -y --package unstructured-client -- mcp start --help
```

<!-- No SDK Installation -->

## SDK Example Usage
Expand Down
2 changes: 1 addition & 1 deletion docs/sdk/models/errors/detail.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
const value: shared.ValidationError[] = [
{
loc: [
544883,
715190,
],
msg: "<value>",
type: "<value>",
Expand Down
57 changes: 24 additions & 33 deletions docs/sdk/models/operations/partitionresponse.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,32 @@
# PartitionResponse

## Example Usage

## Supported Types

### `string`

```typescript
import { PartitionResponse } from "unstructured-client/sdk/models/operations";
const value: string = "<value>";
```

let value: PartitionResponse = {
contentType: "<value>",
statusCode: 306,
rawResponse: new Response("{\"message\": \"hello world\"}", {
headers: { "Content-Type": "application/json" },
}),
elements: [
{
"type": "Title",
"element_id": "6aa0ff22f91bbe7e26e8e25ca8052acd",
"text":
"LayoutParser: A Unified Toolkit for Deep Learning Based Document Image Analysis",
"metadata": {
"languages": [
"eng",
],
"page_number": 1,
"filename": "layout-parser-paper.pdf",
"filetype": "application/pdf",
},
### `{ [k: string]: any }[]`

```typescript
const value: { [k: string]: any }[] = [
{
"type": "Title",
"element_id": "6aa0ff22f91bbe7e26e8e25ca8052acd",
"text":
"LayoutParser: A Unified Toolkit for Deep Learning Based Document Image Analysis",
"metadata": {
"languages": [
"eng",
],
"page_number": 1,
"filename": "layout-parser-paper.pdf",
"filetype": "application/pdf",
},
],
};
},
];
```

## Fields

| Field | Type | Required | Description |
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `csvElements` | *string* | :heavy_minus_sign: | Successful Response |
| `elements` | Record<string, *any*>[] | :heavy_minus_sign: | Successful Response |
2 changes: 1 addition & 1 deletion docs/sdk/models/shared/loc.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ const value: string = "<value>";
### `number`

```typescript
const value: number = 423655;
const value: number = 602763;
```

2 changes: 1 addition & 1 deletion docs/sdk/models/shared/strategy.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The strategy to use for partitioning PDF/image. Options are fast, hi_res, auto.
```typescript
import { Strategy } from "unstructured-client/sdk/models/shared";

let value: Strategy = Strategy.Vlm;
let value: Strategy = Strategy.HiRes;
```

## Values
Expand Down
2 changes: 1 addition & 1 deletion docs/sdk/models/shared/validationerror.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ValidationError } from "unstructured-client/sdk/models/shared";

let value: ValidationError = {
loc: [
437587,
423655,
],
msg: "<value>",
type: "<value>",
Expand Down
6 changes: 3 additions & 3 deletions gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ generation:
oAuth2ClientCredentialsEnabled: false
oAuth2PasswordEnabled: false
typescript:
version: 0.21.1
version: 0.22.0
additionalDependencies:
dependencies:
async: ^3.2.5
Expand Down Expand Up @@ -44,9 +44,9 @@ typescript:
license: MIT
maxMethodParams: 0
methodArguments: require-security-and-request
moduleFormat: commonjs
moduleFormat: dual
outputModelSuffix: output
packageName: unstructured-client
responseFormat: envelope
responseFormat: flat
templateVersion: v2
useIndexModules: true
2 changes: 1 addition & 1 deletion jsr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{
"name": "unstructured-client",
"version": "0.21.1",
"version": "0.22.1",
"exports": {
".": "./src/index.ts",
"./sdk/models/errors": "./src/sdk/models/errors/index.ts",
Expand Down
Loading
Loading