Skip to content

Commit b222e4e

Browse files
authored
Merge pull request #7 from Unstructured-IO/speakeasy-sdk-regen-1698354555
chore: speakeasy sdk regeneration - Generate
2 parents 7aebc55 + 11068a9 commit b222e4e

File tree

8 files changed

+50
-15
lines changed

8 files changed

+50
-15
lines changed

README.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,33 @@ const client = new UnstructuredClient({
9696

9797

9898
<!-- No SDK Example Usage -->
99-
10099
<!-- No SDK Available Operations -->
101-
102100
<!-- No Pagination -->
101+
<!-- No Error Handling -->
102+
<!-- No Server Selection -->
103+
104+
<!-- Start Custom HTTP Client -->
105+
# Custom HTTP Client
106+
107+
The Typescript SDK makes API calls using the (axios)[https://axios-http.com/docs/intro] HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `AxiosInstance` object.
108+
109+
110+
For example, you could specify a header for every request that your sdk makes as follows:
111+
112+
```typescript
113+
from unstructured-client import UnstructuredClient;
114+
import axios;
115+
116+
const httpClient = axios.create({
117+
headers: {'x-custom-header': 'someValue'}
118+
})
119+
120+
121+
const sdk = new UnstructuredClient({defaultClient: httpClient});
122+
```
123+
124+
125+
<!-- End Custom HTTP Client -->
103126
104127
<!-- Placeholder for Future Speakeasy SDK Sections -->
105128

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,4 +162,14 @@ Based on:
162162
### Generated
163163
- [typescript v0.8.0] .
164164
### Releases
165-
- [NPM v0.8.0] https://www.npmjs.com/package/unstructured-client/v/0.8.0 - .
165+
- [NPM v0.8.0] https://www.npmjs.com/package/unstructured-client/v/0.8.0 - .
166+
167+
## 2023-10-26 21:09:14
168+
### Changes
169+
Based on:
170+
- OpenAPI Doc 0.0.1
171+
- Speakeasy CLI 1.108.1 (2.172.4) https://github.com/speakeasy-api/speakeasy
172+
### Generated
173+
- [typescript v0.8.1] .
174+
### Releases
175+
- [NPM v0.8.1] https://www.npmjs.com/package/unstructured-client/v/0.8.1 - .

USAGE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import { UnstructuredClient } from "unstructured-client";
3838
strategy: "hi_res",
3939
});
4040

41+
4142
if (res.statusCode == 200) {
4243
// handle response
4344
}

docs/sdks/general/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ import { UnstructuredClient } from "unstructured-client";
4848
strategy: "hi_res",
4949
});
5050

51+
5152
if (res.statusCode == 200) {
5253
// handle response
5354
}

gen.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ configVersion: 1.0.0
22
management:
33
docChecksum: 25324f1821b1070aa4a416ec8ddca590
44
docVersion: 0.0.1
5-
speakeasyVersion: 1.107.0
6-
generationVersion: 2.171.0
5+
speakeasyVersion: 1.108.1
6+
generationVersion: 2.172.4
77
generation:
88
comments:
99
disableComments: false
@@ -21,9 +21,9 @@ features:
2121
globalServerURLs: 2.82.0
2222
nameOverrides: 2.81.1
2323
retries: 2.82.1
24-
serverIDs: 2.81.1
24+
serverIDs: 2.81.2
2525
typescript:
26-
version: 0.8.0
26+
version: 0.8.1
2727
author: Unstructured
2828
clientServerStatusCodesAsErrors: true
2929
flattenGlobalSecurity: false

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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "unstructured-client",
3-
"version": "0.8.0",
3+
"version": "0.8.1",
44
"author": "Unstructured",
55
"scripts": {
66
"prepare": "tsc --build",

src/sdk/sdk.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const ServerLocal = "local";
1919
/**
2020
* Contains the list of servers available to the SDK
2121
*/
22-
export const ServerList: Record<string, string> = {
22+
export const ServerList = {
2323
[ServerProd]: "https://api.unstructured.io",
2424
[ServerLocal]: "http://localhost:8000",
2525
} as const;
@@ -41,7 +41,7 @@ export type SDKProps = {
4141
/**
4242
* Allows overriding the default server used by the SDK
4343
*/
44-
server?: string;
44+
server?: keyof typeof ServerList;
4545

4646
/**
4747
* Allows overriding the default server URL used by the SDK
@@ -60,9 +60,9 @@ export class SDKConfiguration {
6060
serverDefaults: any;
6161
language = "typescript";
6262
openapiDocVersion = "0.0.1";
63-
sdkVersion = "0.8.0";
64-
genVersion = "2.171.0";
65-
userAgent = "speakeasy-sdk/typescript 0.8.0 2.171.0 0.0.1 unstructured-client";
63+
sdkVersion = "0.8.1";
64+
genVersion = "2.172.4";
65+
userAgent = "speakeasy-sdk/typescript 0.8.1 2.172.4 0.0.1 unstructured-client";
6666
retryConfig?: utils.RetryConfig;
6767
public constructor(init?: Partial<SDKConfiguration>) {
6868
Object.assign(this, init);

0 commit comments

Comments
 (0)