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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/examples/node_modules
.env
.env.local
.env.*.local
.DS_Store
**/.speakeasy/temp/
**/.speakeasy/logs/
Expand Down
20 changes: 12 additions & 8 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: f42cb8e6-e2ce-4565-b975-5a9f38b94d5a
management:
docChecksum: 9b8288dc7f01ab0f6eb797e80c06c995
docVersion: 1.1.30
speakeasyVersion: 1.574.1
generationVersion: 2.647.2
releaseVersion: 0.25.2
configChecksum: 8ac4331f595e4a955ff8b0ce0c9da3cf
docChecksum: 8f62b4348dafcf14eff2a6197cb404d2
docVersion: 1.1.34
speakeasyVersion: 1.576.1
generationVersion: 2.651.2
releaseVersion: 0.26.0
configChecksum: ba03610a27c44b6c80fa1ac48f200b46
repoURL: https://github.com/Unstructured-IO/unstructured-js-client.git
repoSubDirectory: .
installationURL: https://github.com/Unstructured-IO/unstructured-js-client
Expand All @@ -16,11 +16,11 @@ features:
acceptHeaders: 2.81.2
additionalDependencies: 0.1.0
constsAndDefaults: 0.1.12
core: 3.21.11
core: 3.21.13
defaultEnabledRetries: 0.1.0
enumUnions: 0.1.0
envVarSecurityUsage: 0.1.2
examples: 2.81.5
examples: 2.82.0
globalSecurity: 2.82.13
globalSecurityCallbacks: 0.1.0
globalServerURLs: 2.82.5
Expand Down Expand Up @@ -58,6 +58,10 @@ generatedFiles:
- docs/sdks/general/README.md
- docs/sdks/unstructuredclient/README.md
- eslint.config.mjs
- examples/.env.template
- examples/README.md
- examples/generalPartition.example.ts
- examples/package.json
- jsr.json
- package.json
- src/core.ts
Expand Down
16 changes: 8 additions & 8 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
speakeasyVersion: 1.574.1
speakeasyVersion: 1.576.1
sources:
my-source:
sourceNamespace: my-source
sourceRevisionDigest: sha256:38a045a6f6b311c0cb60dccbe7f479fef1090521ef45ac6c08f629824884d3d1
sourceBlobDigest: sha256:9a30b03f66488202677d8442e4a4fbc65b6b639bdd740cdc5b2c22af45de2170
sourceRevisionDigest: sha256:88df22653fd998cdac0f63b206f1873a33faca211c1af6033b28c468ebbdf480
sourceBlobDigest: sha256:4d0d9f1f722ffe417b3987b8e5e8d3295c32661b64a42d11ad13979dee826e16
tags:
- latest
- speakeasy-sdk-regen-1751416379
- 1.1.30
- speakeasy-sdk-regen-1751934799
- 1.1.34
targets:
unstructed-typescript:
source: my-source
sourceNamespace: my-source
sourceRevisionDigest: sha256:38a045a6f6b311c0cb60dccbe7f479fef1090521ef45ac6c08f629824884d3d1
sourceBlobDigest: sha256:9a30b03f66488202677d8442e4a4fbc65b6b639bdd740cdc5b2c22af45de2170
sourceRevisionDigest: sha256:88df22653fd998cdac0f63b206f1873a33faca211c1af6033b28c468ebbdf480
sourceBlobDigest: sha256:4d0d9f1f722ffe417b3987b8e5e8d3295c32661b64a42d11ad13979dee826e16
codeSamplesNamespace: my-source-typescript-code-samples
codeSamplesRevisionDigest: sha256:a7f39ceb784be5f33123e10681a51304d638145b4f67d03af7c13acd3f2ef613
codeSamplesRevisionDigest: sha256:d6804f3dacb4071900ba499d2d3f4ebc78190a7f8e845cbb0fb530d4bc470ca7
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -634,4 +634,14 @@ Based on:
### Generated
- [typescript v0.25.2] .
### Releases
- [NPM v0.25.2] https://www.npmjs.com/package/unstructured-client/v/0.25.2 - .
- [NPM v0.25.2] https://www.npmjs.com/package/unstructured-client/v/0.25.2 - .

## 2025-07-08 00:33:00
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.576.1 (2.651.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.26.0] .
### Releases
- [NPM v0.26.0] https://www.npmjs.com/package/unstructured-client/v/0.26.0 - .
3 changes: 3 additions & 0 deletions examples/.env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# unstructured-client SDK Environment Variables
# Copy this file to .env and fill in your actual values
# DO NOT commit the .env file to version control
26 changes: 26 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# unstructured-client Examples

This directory contains example scripts demonstrating how to use the unstructured-client SDK.

## Prerequisites

- Node.js (v18 or higher)
- npm

## Setup

1. Copy `.env.template` to `.env`:
```bash
cp .env.template .env
```

2. Edit `.env` and add your actual credentials

## Running the Examples

To run an example file from the examples directory:

```bash
npm run build && npx tsx example.ts
```

40 changes: 40 additions & 0 deletions examples/generalPartition.example.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/

/**
* Example usage of the unstructured-client SDK
*
* To run this example from the examples directory:
* npm run build && npx tsx generalPartition.ts
*/

import { openAsBlob } from "node:fs";
import { UnstructuredClient } from "unstructured-client";
import {
Strategy,
VLMModel,
VLMModelProvider,
} from "unstructured-client/sdk/models/shared";

const unstructuredClient = new UnstructuredClient();

async function main() {
const result = await unstructuredClient.partition({
partitionParameters: {
chunkingStrategy: "by_title",
files: await openAsBlob("example.file"),
splitPdfPageRange: [
1,
10,
],
strategy: Strategy.Auto,
vlmModel: VLMModel.Gpt4o,
vlmModelProvider: VLMModelProvider.Openai,
},
});

console.log(result);
}

main().catch(console.error);
Loading