Skip to content

chore: 🐝 Update SDK - Generate #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 10, 2024
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
File renamed without changes.
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/esm
/dist
/.tshy
/.tshy-*
/models
/sdk/models/errors
/sdk/types
Expand All @@ -10,9 +14,7 @@
/.tsbuildinfo
dist/
node_modules/

# Custom ignores
openapi.json
openapi_client.json

.idea/
.idea/
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@

/.eslintrc.js
/cjs
/.tshy
/.tshy-*
16 changes: 8 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: c209069202bc537f70476e86044130a0
docChecksum: 3f2fbf3f00965b046a501b0642259d4e
docVersion: 1.0.39
speakeasyVersion: 1.308.1
generationVersion: 2.342.6
releaseVersion: 0.11.3
configChecksum: 9eaa07233a4c948e9f569fd1a387ceb8
speakeasyVersion: 1.330.0
generationVersion: 2.361.10
releaseVersion: 0.12.0
configChecksum: d7fea18f81ca96b0f79ee5eb84463306
repoURL: https://github.com/Unstructured-IO/unstructured-js-client.git
repoSubDirectory: .
installationURL: https://github.com/Unstructured-IO/unstructured-js-client
Expand All @@ -15,14 +15,14 @@ features:
typescript:
additionalDependencies: 0.1.0
constsAndDefaults: 0.1.5
core: 3.9.14
core: 3.11.5
examples: 2.81.4
globalSecurity: 2.82.9
globalSecurityCallbacks: 0.1.0
globalServerURLs: 2.82.4
nameOverrides: 2.81.2
nullables: 0.1.0
openEnums: 0.1.0
openEnums: 0.1.1
responseFormat: 0.2.3
retries: 2.83.0
sdkHooks: 0.1.0
Expand All @@ -31,7 +31,7 @@ features:
generatedFiles:
- src/sdk/general.ts
- src/sdk/sdk.ts
- .eslintrc.js
- .eslintrc.cjs
- .npmignore
- RUNTIMES.md
- jsr.json
Expand Down
10 changes: 5 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
speakeasyVersion: 1.308.1
speakeasyVersion: 1.330.0
sources:
my-source:
sourceNamespace: my-source
sourceRevisionDigest: sha256:75c039c729d92b37dca8914b1b2f47e4f8a9775f1c77510896c906f925da24a9
sourceBlobDigest: sha256:f116cfff59082526bec401f05b9660a39c37f7db24417e8ab7aaa65676622e3c
sourceRevisionDigest: sha256:a6a17fc122fce52ae3601b08bffe8294b5d355d1b5370390192536c856f475da
sourceBlobDigest: sha256:c85052e891c341ae0a33a0bc0e21498d897649af7c1d1fa7638da4a857eb4d49
tags:
- latest
- main
targets:
unstructed-typescript:
source: my-source
sourceNamespace: my-source
sourceRevisionDigest: sha256:75c039c729d92b37dca8914b1b2f47e4f8a9775f1c77510896c906f925da24a9
sourceBlobDigest: sha256:f116cfff59082526bec401f05b9660a39c37f7db24417e8ab7aaa65676622e3c
sourceRevisionDigest: sha256:a6a17fc122fce52ae3601b08bffe8294b5d355d1b5370390192536c856f475da
sourceBlobDigest: sha256:c85052e891c341ae0a33a0bc0e21498d897649af7c1d1fa7638da4a857eb4d49
outLocation: /github/workspace/repo
workflow:
workflowVersion: 1.0.0
Expand Down
11 changes: 11 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,3 +354,14 @@ Based on:
- [typescript v0.11.3] .
### Releases
- [NPM v0.11.3] https://www.npmjs.com/package/unstructured-client/v/0.11.3 - .


## 2024-07-09 00:23:42
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.330.0 (2.361.10) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.12.0] .
### Releases
- [NPM v0.12.0] https://www.npmjs.com/package/unstructured-client/v/0.12.0 - .
15 changes: 15 additions & 0 deletions docs/sdk/models/errors/detail.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
# Detail


## Supported Types

### `shared.ValidationError[]`

```typescript
const value: shared.ValidationError[] = /* values here */
```

### `string`

```typescript
const value: string = /* values here */
```

15 changes: 15 additions & 0 deletions docs/sdk/models/shared/loc.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
# Loc


## Supported Types

### `string`

```typescript
const value: string = /* values here */
```

### `number`

```typescript
const value: number = /* values here */
```

4 changes: 3 additions & 1 deletion gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: false
typescript:
version: 0.11.3
version: 0.12.0
additionalDependencies:
dependencies:
async: ^3.2.5
Expand Down Expand Up @@ -38,7 +38,9 @@ typescript:
license: MIT
maxMethodParams: 0
methodArguments: require-security-and-request
moduleFormat: commonjs
outputModelSuffix: output
packageName: unstructured-client
responseFormat: envelope
templateVersion: v2
useIndexModules: true
16 changes: 13 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: "ts-jest",
testEnvironment: "node",
silent: true,
preset: 'ts-jest/presets/default-esm', // or other ESM presets
testEnvironment: 'node',
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
useESM: true,
},
],
},
};
2 changes: 1 addition & 1 deletion jsr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{
"name": "unstructured-client",
"version": "0.11.3",
"version": "0.12.0",
"exports": {
".": "./src/index.ts",
"./sdk/models/errors": "./src/sdk/models/errors/index.ts",
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.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "unstructured-client",
"version": "0.11.3",
"author": "Unstructured",
"version": "0.12.0",
"author": "Unstructured",
"main": "./index.js",
"sideEffects": false,
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/custom/HttpsCheckHook.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BASE_HOSTNAME_REGEX, BASE_PROTOCOL } from "./common";
import { SDKInitHook, SDKInitOptions } from "../types";
import { BASE_HOSTNAME_REGEX, BASE_PROTOCOL } from "./common.js";
import { SDKInitHook, SDKInitOptions } from "../types.js";

/**
* Represents a hook that performs base host HTTPS check during SDK initialization.
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/custom/LoggerHook.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AfterErrorContext, AfterErrorHook, AfterSuccessContext, AfterSuccessHook } from "../types";
import { AfterErrorContext, AfterErrorHook, AfterSuccessContext, AfterSuccessHook } from "../types.js";

/**
* Represents a hook that logs status and information that the request will be retried
Expand Down
8 changes: 4 additions & 4 deletions src/hooks/custom/SplitPdfHook.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import async from "async";

import { HTTPClient } from "../../lib/http";
import { HTTPClient } from "../../lib/http.js";
import {
AfterErrorContext,
AfterErrorHook,
Expand All @@ -10,7 +10,7 @@ import {
BeforeRequestHook,
SDKInitHook,
SDKInitOptions,
} from "../types";
} from "../types.js";
import {
getOptimalSplitSize,
getSplitPdfConcurrencyLevel,
Expand All @@ -22,12 +22,12 @@ import {
prepareResponseHeaders,
splitPdf,
stringToBoolean,
} from "./utils/index";
} from "./utils/index.js";
import {
MIN_PAGES_PER_THREAD,
PARTITION_FORM_FILES_KEY,
PARTITION_FORM_SPLIT_PDF_PAGE_KEY,
} from "./common";
} from "./common.js";

/**
* Represents a hook for splitting and sending PDF files as per page requests.
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/custom/utils/form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
MAX_NUMBER_OF_PARALLEL_REQUESTS,
PARTITION_FORM_SPLIT_PDF_CONCURRENCY_LEVEL,
PARTITION_FORM_STARTING_PAGE_NUMBER_KEY,
} from "../common";
} from "../common.js";

/**
* Retrieves an integer parameter from the given form data.
Expand Down
8 changes: 4 additions & 4 deletions src/hooks/custom/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from "./form";
export * from "./general";
export * from "./pdf";
export * from "./request";
export * from "./form.js";
export * from "./general.js";
export * from "./pdf.js";
export * from "./request.js";
2 changes: 1 addition & 1 deletion src/hooks/custom/utils/pdf.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { PDFDocument } from "pdf-lib";

import { MAX_PAGES_PER_THREAD, MIN_PAGES_PER_THREAD } from "../common";
import { MAX_PAGES_PER_THREAD, MIN_PAGES_PER_THREAD } from "../common.js";

interface PdfSplit {
content: Blob;
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/custom/utils/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
PARTITION_FORM_FILES_KEY,
PARTITION_FORM_SPLIT_PDF_PAGE_KEY,
PARTITION_FORM_STARTING_PAGE_NUMBER_KEY,
} from "../common";
} from "../common.js";

/**
* Removes the "content-length" header from the passed response headers.
Expand Down
6 changes: 3 additions & 3 deletions src/hooks/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/

import { RequestInput } from "../lib/http";
import { RequestInput } from "../lib/http.js";
import {
AfterErrorContext,
AfterErrorHook,
Expand All @@ -15,9 +15,9 @@ import {
Hooks,
SDKInitHook,
SDKInitOptions,
} from "./types";
} from "./types.js";

import { initHooks } from "./registration";
import { initHooks } from "./registration.js";

export class SDKHooks implements Hooks {
sdkInitHooks: SDKInitHook[] = [];
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/

export * from "./types";
export * from "./hooks";
export * from "./types.js";
export * from "./hooks.js";
6 changes: 3 additions & 3 deletions src/hooks/registration.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Hooks } from "./types";

import { LoggerHook } from "./custom/LoggerHook";
import { SplitPdfHook } from "./custom/SplitPdfHook";
import { HttpsCheckHook } from "./custom/HttpsCheckHook";
import { LoggerHook } from "./custom/LoggerHook.js";
import { SplitPdfHook } from "./custom/SplitPdfHook.js";
import { HttpsCheckHook } from "./custom/HttpsCheckHook.js";

/*
* This file is only ever generated once on the first generation and then is free to be modified.
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/

import { HTTPClient, RequestInput } from "../lib/http";
import { HTTPClient, RequestInput } from "../lib/http.js";

export type HookContext = {
operationID: string;
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/

export * from "./sdk";
export * from "./lib/config";
export * from "./sdk/sdk.js";
export * from "./lib/config.js";
14 changes: 7 additions & 7 deletions src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/

import * as shared from "../sdk/models/shared";
import { HTTPClient } from "./http";
import { RetryConfig } from "./retries";
import { Params, pathToFunc } from "./url";
import * as shared from "../sdk/models/shared/index.js";
import { HTTPClient } from "./http.js";
import { RetryConfig } from "./retries.js";
import { Params, pathToFunc } from "./url.js";

/**
* Hosted API Free
Expand Down Expand Up @@ -61,7 +61,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "1.0.39",
sdkVersion: "0.11.3",
genVersion: "2.342.6",
userAgent: "speakeasy-sdk/typescript 0.11.3 2.342.6 1.0.39 unstructured-client",
sdkVersion: "0.12.0",
genVersion: "2.361.10",
userAgent: "speakeasy-sdk/typescript 0.12.0 2.361.10 1.0.39 unstructured-client",
} as const;
4 changes: 2 additions & 2 deletions src/lib/encodings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/

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

export class EncodingError extends Error {
constructor(message: string) {
Expand Down
Loading
Loading