Skip to content

Commit a417487

Browse files
committed
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.332.1
1 parent 804a361 commit a417487

File tree

10 files changed

+53
-34
lines changed

10 files changed

+53
-34
lines changed

.speakeasy/gen.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ id: f42cb8e6-e2ce-4565-b975-5a9f38b94d5a
33
management:
44
docChecksum: 3f2fbf3f00965b046a501b0642259d4e
55
docVersion: 1.0.39
6-
speakeasyVersion: 1.330.0
7-
generationVersion: 2.361.10
8-
releaseVersion: 0.12.0
9-
configChecksum: d7fea18f81ca96b0f79ee5eb84463306
6+
speakeasyVersion: 1.332.1
7+
generationVersion: 2.366.1
8+
releaseVersion: 0.12.1
9+
configChecksum: 52e1668cd91ab9c26359b89fb6fed9ea
1010
repoURL: https://github.com/Unstructured-IO/unstructured-js-client.git
1111
repoSubDirectory: .
1212
installationURL: https://github.com/Unstructured-IO/unstructured-js-client
@@ -15,7 +15,7 @@ features:
1515
typescript:
1616
additionalDependencies: 0.1.0
1717
constsAndDefaults: 0.1.5
18-
core: 3.11.5
18+
core: 3.11.6
1919
examples: 2.81.4
2020
globalSecurity: 2.82.9
2121
globalSecurityCallbacks: 0.1.0

.speakeasy/workflow.lock

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

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,4 +364,14 @@ Based on:
364364
### Generated
365365
- [typescript v0.12.0] .
366366
### Releases
367-
- [NPM v0.12.0] https://www.npmjs.com/package/unstructured-client/v/0.12.0 - .
367+
- [NPM v0.12.0] https://www.npmjs.com/package/unstructured-client/v/0.12.0 - .
368+
369+
## 2024-07-12 00:23:31
370+
### Changes
371+
Based on:
372+
- OpenAPI Doc
373+
- Speakeasy CLI 1.332.1 (2.366.1) https://github.com/speakeasy-api/speakeasy
374+
### Generated
375+
- [typescript v0.12.1] .
376+
### Releases
377+
- [NPM v0.12.1] https://www.npmjs.com/package/unstructured-client/v/0.12.1 - .

gen.yaml

Lines changed: 1 addition & 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.12.0
13+
version: 0.12.1
1414
additionalDependencies:
1515
dependencies:
1616
async: ^3.2.5

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.12.0",
5+
"version": "0.12.1",
66
"exports": {
77
".": "./src/index.ts",
88
"./sdk/models/errors": "./src/sdk/models/errors/index.ts",

package-lock.json

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

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "unstructured-client",
3-
"version": "0.12.0",
3+
"version": "0.12.1",
44
"author": "Unstructured",
55
"main": "./index.js",
66
"sideEffects": false,
@@ -20,7 +20,6 @@
2020
"devDependencies": {
2121
"@types/async": "^3.2.24",
2222
"@types/jest": "^29.5.12",
23-
"@types/jsonpath": "^0.2.4",
2423
"@typescript-eslint/eslint-plugin": "^7.7.1",
2524
"@typescript-eslint/parser": "^7.7.1",
2625
"eslint": "^8.57.0",

src/lib/config.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export type SDKOptions = {
4242
* Allows overriding the default retry config used by the SDK
4343
*/
4444
retryConfig?: RetryConfig;
45+
timeoutMs?: number;
4546
};
4647

4748
export function serverURLFromOptions(options: SDKOptions): URL | null {
@@ -61,7 +62,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
6162
export const SDK_METADATA = {
6263
language: "typescript",
6364
openapiDocVersion: "1.0.39",
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",
65+
sdkVersion: "0.12.1",
66+
genVersion: "2.366.1",
67+
userAgent: "speakeasy-sdk/typescript 0.12.1 2.366.1 1.0.39 unstructured-client",
6768
} as const;

src/lib/sdks.ts

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ import { SDKHooks } from "../hooks/hooks.js";
1212
import { HookContext } from "../hooks/types.js";
1313

1414
export type RequestOptions = {
15+
/**
16+
* Sets a timeout, in milliseconds, on HTTP requests made by an SDK method. If
17+
* `fetchOptions.signal` is set then it will take precedence over this option.
18+
*/
19+
timeoutMs?: number;
20+
/**
21+
* Sets various request options on the `fetch` call made by an SDK method.
22+
*
23+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options|Request}
24+
*/
1525
fetchOptions?: Omit<RequestInit, "method" | "body">;
1626
};
1727

@@ -24,6 +34,7 @@ type RequestConfig = {
2434
headers?: HeadersInit;
2535
security?: SecurityState | null;
2636
uaHeader?: string;
37+
timeoutMs?: number;
2738
};
2839

2940
const gt: unknown = typeof globalThis === "undefined" ? null : globalThis;
@@ -119,10 +130,20 @@ export class ClientSDK {
119130
headers.set(conf.uaHeader ?? "user-agent", SDK_METADATA.userAgent);
120131
}
121132

133+
let fetchOptions = options?.fetchOptions;
134+
if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) {
135+
const timeoutSignal = AbortSignal.timeout(conf.timeoutMs);
136+
if (!fetchOptions) {
137+
fetchOptions = { signal: timeoutSignal };
138+
} else {
139+
fetchOptions.signal = timeoutSignal;
140+
}
141+
}
142+
122143
const input = this.hooks$.beforeCreateRequest(context, {
123144
url: reqURL,
124145
options: {
125-
...options?.fetchOptions,
146+
...fetchOptions,
126147
body: conf.body ?? null,
127148
headers,
128149
method,

src/sdk/general.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ export class General extends ClientSDK {
228228
headers: headers$,
229229
query: query$,
230230
body: body$,
231+
timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1,
231232
},
232233
options
233234
);

0 commit comments

Comments
 (0)