Skip to content

Commit 804a361

Browse files
chore: 🐝 Update SDK - Generate (#86)
> [!IMPORTANT] > Linting report available at: <https://app.speakeasyapi.dev/org/unstructured/unstructured5xr/linting-report/c59c61d8aa602a8b3c01a6b157b57eec> > OpenAPI Change report available at: <https://app.speakeasyapi.dev/org/unstructured/unstructured5xr/changes-report/d5bd4f53640f22e99af3c46acde7d6a2> # SDK update Based on: - OpenAPI Doc - Speakeasy CLI 1.330.0 (2.361.10) https://github.com/speakeasy-api/speakeasy ## OpenAPI Change Summary ``` ├─┬Info │ └──[🔀] version (4:14) └─┬Components └─┬partition_parameters └─┬split_pdf_page └──[🔀] default (259:30)❌ ``` | Document Element | Total Changes | Breaking Changes | |------------------|---------------|------------------| | info | 1 | 0 | | components | 1 | 1 | ## TYPESCRIPT CHANGELOG ## openEnums: 0.1.1 - 2024-06-27 ### 🐛 Bug Fixes - add missing imports for open enums in TS *(commit by [@disintegrator](https://github.com/disintegrator))* ## core: 3.11.5 - 2024-07-05 ### 🔧 Chores - refactor zod schemas for better tree-shaking *(commit by [@disintegrator](https://github.com/disintegrator))* ## core: 3.11.4 - 2024-07-04 ### 🐛 Bug Fixes - account for Deno when detecting browsers *(commit by [@disintegrator](https://github.com/disintegrator))* ## core: 3.11.3 - 2024-07-04 ### 🐛 Bug Fixes - avoid setting user agent header in browsers *(commit by [@disintegrator](https://github.com/disintegrator))* ## core: 3.11.2 - 2024-07-04 ### 🔧 Chores - rearrange method bodies and drop some boilerplate *(commit by [@disintegrator](https://github.com/disintegrator))* ## core: 3.11.1 - 2024-07-04 ### 🐛 Bug Fixes - omit unused barrel exports in ESM/Dual mode *(commit by [@disintegrator](https://github.com/disintegrator))* ## core: 3.11.0 - 2024-06-30 ### 🐝 New Features - support building SDKS to ESM or ESM+CJS (dual bundling) *(commit by [@disintegrator](https://github.com/disintegrator))* ## core: 3.10.2 - 2024-06-21 ### 🔧 Chores - update contribution section wording *(commit by [@disintegrator](https://github.com/disintegrator))* ## core: 3.4.10 - 2024-06-21 ### 🔧 Chores - update contribution section wording *(commit by [@disintegrator](https://github.com/disintegrator))* ## core: 3.10.1 - 2024-06-20 ### 🐛 Bug Fixes - test response status codes in sdk methods in order of specificity *(commit by [@disintegrator](https://github.com/disintegrator))* ## core: 3.10.0 - 2024-06-13 ### 🐝 New Features - provide config to disable barrel files in TS and drop barrel file imports internally *(commit by [@disintegrator](https://github.com/disintegrator))* Co-authored-by: speakeasybot <[email protected]>
1 parent 044f459 commit 804a361

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+724
-461
lines changed
File renamed without changes.

.gitignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/esm
2+
/dist
3+
/.tshy
4+
/.tshy-*
15
/models
26
/sdk/models/errors
37
/sdk/types
@@ -10,9 +14,7 @@
1014
/.tsbuildinfo
1115
dist/
1216
node_modules/
13-
1417
# Custom ignores
1518
openapi.json
1619
openapi_client.json
17-
18-
.idea/
20+
.idea/

.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@
55

66
/.eslintrc.js
77
/cjs
8+
/.tshy
9+
/.tshy-*

.speakeasy/gen.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
lockVersion: 2.0.0
22
id: f42cb8e6-e2ce-4565-b975-5a9f38b94d5a
33
management:
4-
docChecksum: c209069202bc537f70476e86044130a0
4+
docChecksum: 3f2fbf3f00965b046a501b0642259d4e
55
docVersion: 1.0.39
6-
speakeasyVersion: 1.308.1
7-
generationVersion: 2.342.6
8-
releaseVersion: 0.11.3
9-
configChecksum: 9eaa07233a4c948e9f569fd1a387ceb8
6+
speakeasyVersion: 1.330.0
7+
generationVersion: 2.361.10
8+
releaseVersion: 0.12.0
9+
configChecksum: d7fea18f81ca96b0f79ee5eb84463306
1010
repoURL: https://github.com/Unstructured-IO/unstructured-js-client.git
1111
repoSubDirectory: .
1212
installationURL: https://github.com/Unstructured-IO/unstructured-js-client
@@ -15,14 +15,14 @@ features:
1515
typescript:
1616
additionalDependencies: 0.1.0
1717
constsAndDefaults: 0.1.5
18-
core: 3.9.14
18+
core: 3.11.5
1919
examples: 2.81.4
2020
globalSecurity: 2.82.9
2121
globalSecurityCallbacks: 0.1.0
2222
globalServerURLs: 2.82.4
2323
nameOverrides: 2.81.2
2424
nullables: 0.1.0
25-
openEnums: 0.1.0
25+
openEnums: 0.1.1
2626
responseFormat: 0.2.3
2727
retries: 2.83.0
2828
sdkHooks: 0.1.0
@@ -31,7 +31,7 @@ features:
3131
generatedFiles:
3232
- src/sdk/general.ts
3333
- src/sdk/sdk.ts
34-
- .eslintrc.js
34+
- .eslintrc.cjs
3535
- .npmignore
3636
- RUNTIMES.md
3737
- jsr.json

.speakeasy/workflow.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
speakeasyVersion: 1.308.1
1+
speakeasyVersion: 1.330.0
22
sources:
33
my-source:
44
sourceNamespace: my-source
5-
sourceRevisionDigest: sha256:75c039c729d92b37dca8914b1b2f47e4f8a9775f1c77510896c906f925da24a9
6-
sourceBlobDigest: sha256:f116cfff59082526bec401f05b9660a39c37f7db24417e8ab7aaa65676622e3c
5+
sourceRevisionDigest: sha256:a6a17fc122fce52ae3601b08bffe8294b5d355d1b5370390192536c856f475da
6+
sourceBlobDigest: sha256:c85052e891c341ae0a33a0bc0e21498d897649af7c1d1fa7638da4a857eb4d49
77
tags:
88
- latest
99
- main
1010
targets:
1111
unstructed-typescript:
1212
source: my-source
1313
sourceNamespace: my-source
14-
sourceRevisionDigest: sha256:75c039c729d92b37dca8914b1b2f47e4f8a9775f1c77510896c906f925da24a9
15-
sourceBlobDigest: sha256:f116cfff59082526bec401f05b9660a39c37f7db24417e8ab7aaa65676622e3c
14+
sourceRevisionDigest: sha256:a6a17fc122fce52ae3601b08bffe8294b5d355d1b5370390192536c856f475da
15+
sourceBlobDigest: sha256:c85052e891c341ae0a33a0bc0e21498d897649af7c1d1fa7638da4a857eb4d49
1616
outLocation: /github/workspace/repo
1717
workflow:
1818
workflowVersion: 1.0.0

RELEASES.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,3 +354,14 @@ Based on:
354354
- [typescript v0.11.3] .
355355
### Releases
356356
- [NPM v0.11.3] https://www.npmjs.com/package/unstructured-client/v/0.11.3 - .
357+
358+
359+
## 2024-07-09 00:23:42
360+
### Changes
361+
Based on:
362+
- OpenAPI Doc
363+
- Speakeasy CLI 1.330.0 (2.361.10) https://github.com/speakeasy-api/speakeasy
364+
### Generated
365+
- [typescript v0.12.0] .
366+
### Releases
367+
- [NPM v0.12.0] https://www.npmjs.com/package/unstructured-client/v/0.12.0 - .

docs/sdk/models/errors/detail.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,17 @@
11
# Detail
22

3+
4+
## Supported Types
5+
6+
### `shared.ValidationError[]`
7+
8+
```typescript
9+
const value: shared.ValidationError[] = /* values here */
10+
```
11+
12+
### `string`
13+
14+
```typescript
15+
const value: string = /* values here */
16+
```
17+

docs/sdk/models/shared/loc.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,17 @@
11
# Loc
22

3+
4+
## Supported Types
5+
6+
### `string`
7+
8+
```typescript
9+
const value: string = /* values here */
10+
```
11+
12+
### `number`
13+
14+
```typescript
15+
const value: number = /* values here */
16+
```
17+

gen.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ generation:
1010
auth:
1111
oAuth2ClientCredentialsEnabled: false
1212
typescript:
13-
version: 0.11.3
13+
version: 0.12.0
1414
additionalDependencies:
1515
dependencies:
1616
async: ^3.2.5
@@ -38,7 +38,9 @@ typescript:
3838
license: MIT
3939
maxMethodParams: 0
4040
methodArguments: require-security-and-request
41+
moduleFormat: commonjs
4142
outputModelSuffix: output
4243
packageName: unstructured-client
4344
responseFormat: envelope
4445
templateVersion: v2
46+
useIndexModules: true

jest.config.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
/** @type {import('ts-jest').JestConfigWithTsJest} */
22
module.exports = {
3-
preset: "ts-jest",
4-
testEnvironment: "node",
5-
silent: true,
3+
preset: 'ts-jest/presets/default-esm', // or other ESM presets
4+
testEnvironment: 'node',
5+
moduleNameMapper: {
6+
'^(\\.{1,2}/.*)\\.js$': '$1',
7+
},
8+
transform: {
9+
'^.+\\.tsx?$': [
10+
'ts-jest',
11+
{
12+
useESM: true,
13+
},
14+
],
15+
},
616
};

jsr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{
44
"name": "unstructured-client",
5-
"version": "0.11.3",
5+
"version": "0.12.0",
66
"exports": {
77
".": "./src/index.ts",
88
"./sdk/models/errors": "./src/sdk/models/errors/index.ts",

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "unstructured-client",
3-
"version": "0.11.3",
4-
"author": "Unstructured",
3+
"version": "0.12.0",
4+
"author": "Unstructured",
55
"main": "./index.js",
66
"sideEffects": false,
77
"repository": {

src/hooks/custom/HttpsCheckHook.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { BASE_HOSTNAME_REGEX, BASE_PROTOCOL } from "./common";
2-
import { SDKInitHook, SDKInitOptions } from "../types";
1+
import { BASE_HOSTNAME_REGEX, BASE_PROTOCOL } from "./common.js";
2+
import { SDKInitHook, SDKInitOptions } from "../types.js";
33

44
/**
55
* Represents a hook that performs base host HTTPS check during SDK initialization.

src/hooks/custom/LoggerHook.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { AfterErrorContext, AfterErrorHook, AfterSuccessContext, AfterSuccessHook } from "../types";
1+
import { AfterErrorContext, AfterErrorHook, AfterSuccessContext, AfterSuccessHook } from "../types.js";
22

33
/**
44
* Represents a hook that logs status and information that the request will be retried

src/hooks/custom/SplitPdfHook.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import async from "async";
22

3-
import { HTTPClient } from "../../lib/http";
3+
import { HTTPClient } from "../../lib/http.js";
44
import {
55
AfterErrorContext,
66
AfterErrorHook,
@@ -10,7 +10,7 @@ import {
1010
BeforeRequestHook,
1111
SDKInitHook,
1212
SDKInitOptions,
13-
} from "../types";
13+
} from "../types.js";
1414
import {
1515
getOptimalSplitSize,
1616
getSplitPdfConcurrencyLevel,
@@ -22,12 +22,12 @@ import {
2222
prepareResponseHeaders,
2323
splitPdf,
2424
stringToBoolean,
25-
} from "./utils/index";
25+
} from "./utils/index.js";
2626
import {
2727
MIN_PAGES_PER_THREAD,
2828
PARTITION_FORM_FILES_KEY,
2929
PARTITION_FORM_SPLIT_PDF_PAGE_KEY,
30-
} from "./common";
30+
} from "./common.js";
3131

3232
/**
3333
* Represents a hook for splitting and sending PDF files as per page requests.

src/hooks/custom/utils/form.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
MAX_NUMBER_OF_PARALLEL_REQUESTS,
55
PARTITION_FORM_SPLIT_PDF_CONCURRENCY_LEVEL,
66
PARTITION_FORM_STARTING_PAGE_NUMBER_KEY,
7-
} from "../common";
7+
} from "../common.js";
88

99
/**
1010
* Retrieves an integer parameter from the given form data.

src/hooks/custom/utils/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export * from "./form";
2-
export * from "./general";
3-
export * from "./pdf";
4-
export * from "./request";
1+
export * from "./form.js";
2+
export * from "./general.js";
3+
export * from "./pdf.js";
4+
export * from "./request.js";

src/hooks/custom/utils/pdf.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { PDFDocument } from "pdf-lib";
22

3-
import { MAX_PAGES_PER_THREAD, MIN_PAGES_PER_THREAD } from "../common";
3+
import { MAX_PAGES_PER_THREAD, MIN_PAGES_PER_THREAD } from "../common.js";
44

55
interface PdfSplit {
66
content: Blob;

src/hooks/custom/utils/request.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
PARTITION_FORM_FILES_KEY,
33
PARTITION_FORM_SPLIT_PDF_PAGE_KEY,
44
PARTITION_FORM_STARTING_PAGE_NUMBER_KEY,
5-
} from "../common";
5+
} from "../common.js";
66

77
/**
88
* Removes the "content-length" header from the passed response headers.

src/hooks/hooks.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
33
*/
44

5-
import { RequestInput } from "../lib/http";
5+
import { RequestInput } from "../lib/http.js";
66
import {
77
AfterErrorContext,
88
AfterErrorHook,
@@ -15,9 +15,9 @@ import {
1515
Hooks,
1616
SDKInitHook,
1717
SDKInitOptions,
18-
} from "./types";
18+
} from "./types.js";
1919

20-
import { initHooks } from "./registration";
20+
import { initHooks } from "./registration.js";
2121

2222
export class SDKHooks implements Hooks {
2323
sdkInitHooks: SDKInitHook[] = [];

src/hooks/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
33
*/
44

5-
export * from "./types";
6-
export * from "./hooks";
5+
export * from "./types.js";
6+
export * from "./hooks.js";

src/hooks/registration.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Hooks } from "./types";
22

3-
import { LoggerHook } from "./custom/LoggerHook";
4-
import { SplitPdfHook } from "./custom/SplitPdfHook";
5-
import { HttpsCheckHook } from "./custom/HttpsCheckHook";
3+
import { LoggerHook } from "./custom/LoggerHook.js";
4+
import { SplitPdfHook } from "./custom/SplitPdfHook.js";
5+
import { HttpsCheckHook } from "./custom/HttpsCheckHook.js";
66

77
/*
88
* This file is only ever generated once on the first generation and then is free to be modified.

src/hooks/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
33
*/
44

5-
import { HTTPClient, RequestInput } from "../lib/http";
5+
import { HTTPClient, RequestInput } from "../lib/http.js";
66

77
export type HookContext = {
88
operationID: string;

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
33
*/
44

5-
export * from "./sdk";
6-
export * from "./lib/config";
5+
export * from "./sdk/sdk.js";
6+
export * from "./lib/config.js";

src/lib/config.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
33
*/
44

5-
import * as shared from "../sdk/models/shared";
6-
import { HTTPClient } from "./http";
7-
import { RetryConfig } from "./retries";
8-
import { Params, pathToFunc } from "./url";
5+
import * as shared from "../sdk/models/shared/index.js";
6+
import { HTTPClient } from "./http.js";
7+
import { RetryConfig } from "./retries.js";
8+
import { Params, pathToFunc } from "./url.js";
99

1010
/**
1111
* Hosted API Free
@@ -61,7 +61,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
6161
export const SDK_METADATA = {
6262
language: "typescript",
6363
openapiDocVersion: "1.0.39",
64-
sdkVersion: "0.11.3",
65-
genVersion: "2.342.6",
66-
userAgent: "speakeasy-sdk/typescript 0.11.3 2.342.6 1.0.39 unstructured-client",
64+
sdkVersion: "0.12.0",
65+
genVersion: "2.361.10",
66+
userAgent: "speakeasy-sdk/typescript 0.12.0 2.361.10 1.0.39 unstructured-client",
6767
} as const;

src/lib/encodings.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
33
*/
44

5-
import { bytesToBase64 } from "./base64";
6-
import { isPlainObject } from "./is-plain-object";
5+
import { bytesToBase64 } from "./base64.js";
6+
import { isPlainObject } from "./is-plain-object.js";
77

88
export class EncodingError extends Error {
99
constructor(message: string) {

0 commit comments

Comments
 (0)