Skip to content

Commit

Permalink
Merge pull request #7 from Unstructured-IO/speakeasy-sdk-regen-169835…
Browse files Browse the repository at this point in the history
…4555

chore: speakeasy sdk regeneration - Generate
  • Loading branch information
awalker4 authored Oct 28, 2023
2 parents 7aebc55 + 11068a9 commit b222e4e
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 15 deletions.
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,33 @@ const client = new UnstructuredClient({


<!-- No SDK Example Usage -->

<!-- No SDK Available Operations -->

<!-- No Pagination -->
<!-- No Error Handling -->
<!-- No Server Selection -->

<!-- Start Custom HTTP Client -->
# Custom HTTP Client

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.


For example, you could specify a header for every request that your sdk makes as follows:

```typescript
from unstructured-client import UnstructuredClient;
import axios;

const httpClient = axios.create({
headers: {'x-custom-header': 'someValue'}
})


const sdk = new UnstructuredClient({defaultClient: httpClient});
```
<!-- End Custom HTTP Client -->
<!-- Placeholder for Future Speakeasy SDK Sections -->
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,14 @@ Based on:
### Generated
- [typescript v0.8.0] .
### Releases
- [NPM v0.8.0] https://www.npmjs.com/package/unstructured-client/v/0.8.0 - .
- [NPM v0.8.0] https://www.npmjs.com/package/unstructured-client/v/0.8.0 - .

## 2023-10-26 21:09:14
### Changes
Based on:
- OpenAPI Doc 0.0.1
- Speakeasy CLI 1.108.1 (2.172.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.8.1] .
### Releases
- [NPM v0.8.1] https://www.npmjs.com/package/unstructured-client/v/0.8.1 - .
1 change: 1 addition & 0 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import { UnstructuredClient } from "unstructured-client";
strategy: "hi_res",
});


if (res.statusCode == 200) {
// handle response
}
Expand Down
1 change: 1 addition & 0 deletions docs/sdks/general/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import { UnstructuredClient } from "unstructured-client";
strategy: "hi_res",
});


if (res.statusCode == 200) {
// handle response
}
Expand Down
8 changes: 4 additions & 4 deletions gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ configVersion: 1.0.0
management:
docChecksum: 25324f1821b1070aa4a416ec8ddca590
docVersion: 0.0.1
speakeasyVersion: 1.107.0
generationVersion: 2.171.0
speakeasyVersion: 1.108.1
generationVersion: 2.172.4
generation:
comments:
disableComments: false
Expand All @@ -21,9 +21,9 @@ features:
globalServerURLs: 2.82.0
nameOverrides: 2.81.1
retries: 2.82.1
serverIDs: 2.81.1
serverIDs: 2.81.2
typescript:
version: 0.8.0
version: 0.8.1
author: Unstructured
clientServerStatusCodesAsErrors: true
flattenGlobalSecurity: false
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "unstructured-client",
"version": "0.8.0",
"version": "0.8.1",
"author": "Unstructured",
"scripts": {
"prepare": "tsc --build",
Expand Down
10 changes: 5 additions & 5 deletions src/sdk/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const ServerLocal = "local";
/**
* Contains the list of servers available to the SDK
*/
export const ServerList: Record<string, string> = {
export const ServerList = {
[ServerProd]: "https://api.unstructured.io",
[ServerLocal]: "http://localhost:8000",
} as const;
Expand All @@ -41,7 +41,7 @@ export type SDKProps = {
/**
* Allows overriding the default server used by the SDK
*/
server?: string;
server?: keyof typeof ServerList;

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

0 comments on commit b222e4e

Please sign in to comment.