Skip to content

Commit

Permalink
Merge pull request #38 from ryan-timothy-albert/speakeasy-sdk-regen-1…
Browse files Browse the repository at this point in the history
…719017313

chore: 🐝 Update SDK - Generate THIRD-TARGET
  • Loading branch information
ryan-timothy-albert authored Jun 26, 2024
2 parents 435e5f7 + 05d82b3 commit 4cf3cf3
Show file tree
Hide file tree
Showing 13 changed files with 69 additions and 59 deletions.
10 changes: 5 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
speakeasyVersion: 1.315.2
speakeasyVersion: 1.320.0
sources:
petstore:
sourceNamespace: petstore
sourceRevisionDigest: sha256:6a996d4448a1cfaff5b5e81ec5b7599026c4eef7cd858867aad756131168440a
sourceBlobDigest: sha256:08ce70c4bc584c427d03c413e2fca26efe2f363bf8b80668cabf2915dc45af63
sourceRevisionDigest: sha256:4a8c53aa372a12ba7286627d4aedfa8519b22e90f5078986354eccac2517b323
sourceBlobDigest: sha256:c98884351f4dbd0082c2aab44206c8b17385357097608a34ba00ed234d451247
tags:
- latest
- main
Expand All @@ -23,8 +23,8 @@ targets:
third-target:
source: petstore
sourceNamespace: petstore
sourceRevisionDigest: sha256:6778a64ea0cc1588cf4acfeaaed33434b1efd87d9cedfb056f62b39f603a10ad
sourceBlobDigest: sha256:30eb71cd81638d80d91f5c67625e62402d23581ba608f2c8b16f783a18673fce
sourceRevisionDigest: sha256:4a8c53aa372a12ba7286627d4aedfa8519b22e90f5078986354eccac2517b323
sourceBlobDigest: sha256:c98884351f4dbd0082c2aab44206c8b17385357097608a34ba00ed234d451247
outLocation: ts
workflow:
workflowVersion: 1.0.0
Expand Down
12 changes: 6 additions & 6 deletions ts/.speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ id: f4be10ce-8651-4157-98c6-d75e2342372f
management:
docChecksum: 1bdb7a6f8bf3995d4b40475228403253
docVersion: 1.0.0
speakeasyVersion: 1.311.0
generationVersion: 2.347.8
releaseVersion: 0.1.2
configChecksum: 0d81825bd4a701ce94330183d122a4bd
speakeasyVersion: 1.320.0
generationVersion: 2.354.1
releaseVersion: 0.1.3
configChecksum: 1552f23964d9ccd2f55c761daa8183c5
repoURL: https://github.com/ryan-timothy-albert/multi-sdk-sample.git
repoSubDirectory: ts
installationURL: https://gitpkg.now.sh/ryan-timothy-albert/multi-sdk-sample/ts
published: true
features:
typescript:
additionalDependencies: 0.1.0
core: 3.10.1
core: 3.10.2
flattening: 2.81.1
globalSecurityCallbacks: 0.1.0
globalServerURLs: 2.82.4
Expand Down Expand Up @@ -66,7 +66,7 @@ generatedFiles:
- docs/models/components/errort.md
- docs/models/components/pet.md
- docs/models/components/httpmetadata.md
- docs/sdks/sdk/README.md
- docs/sdks/ryts/README.md
- docs/sdks/pets/README.md
- USAGE.md
- .gitattributes
Expand Down
2 changes: 1 addition & 1 deletion ts/.speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: true
typescript:
version: 0.1.2
version: 0.1.3
additionalDependencies:
dependencies: {}
devDependencies: {}
Expand Down
40 changes: 20 additions & 20 deletions ts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,25 @@ It has been generated successfully based on your OpenAPI spec. However, it is no
### NPM

```bash
npm add openapi
npm add ryan-test-1
```

### PNPM

```bash
pnpm add openapi
pnpm add ryan-test-1
```

### Bun

```bash
bun add openapi
bun add ryan-test-1
```

### Yarn

```bash
yarn add openapi zod
yarn add ryan-test-1 zod

# Note that Yarn does not install peer dependencies automatically. You will need
# to install zod as shown above.
Expand All @@ -59,12 +59,12 @@ For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md).
### Example

```typescript
import { SDK } from "openapi";
import { RyTs } from "ryan-test-1";

const sdk = new SDK();
const ryTs = new RyTs();

async function run() {
const result = await sdk.pets.listPets(21453);
const result = await ryTs.pets.listPets(21453);

// Handle the result
console.log(result);
Expand Down Expand Up @@ -98,15 +98,15 @@ Validation errors can also occur when either method arguments or data returned f


```typescript
import { SDK } from "openapi";
import { SDKValidationError } from "openapi/models/errors";
import { RyTs } from "ryan-test-1";
import { SDKValidationError } from "ryan-test-1/models/errors";

const sdk = new SDK();
const ryTs = new RyTs();

async function run() {
let result;
try {
result = await sdk.pets.listPets(21453);
result = await ryTs.pets.listPets(21453);
} catch (err) {
switch (true) {
case err instanceof SDKValidationError: {
Expand Down Expand Up @@ -143,14 +143,14 @@ You can override the default server globally by passing a server index to the `s
| 0 | `http://petstore.swagger.io/v1` | None |

```typescript
import { SDK } from "openapi";
import { RyTs } from "ryan-test-1";

const sdk = new SDK({
const ryTs = new RyTs({
serverIdx: 0,
});

async function run() {
const result = await sdk.pets.listPets(21453);
const result = await ryTs.pets.listPets(21453);

// Handle the result
console.log(result);
Expand All @@ -166,14 +166,14 @@ run();
The default server can also be overridden globally by passing a URL to the `serverURL` optional parameter when initializing the SDK client instance. For example:

```typescript
import { SDK } from "openapi";
import { RyTs } from "ryan-test-1";

const sdk = new SDK({
const ryTs = new RyTs({
serverURL: "http://petstore.swagger.io/v1",
});

async function run() {
const result = await sdk.pets.listPets(21453);
const result = await ryTs.pets.listPets(21453);

// Handle the result
console.log(result);
Expand Down Expand Up @@ -202,8 +202,8 @@ custom header and a timeout to requests and how to use the `"requestError"` hook
to log errors:

```typescript
import { SDK } from "openapi";
import { HTTPClient } from "openapi/lib/http";
import { RyTs } from "ryan-test-1";
import { HTTPClient } from "ryan-test-1/lib/http";

const httpClient = new HTTPClient({
// fetcher takes a function that has the same signature as native `fetch`.
Expand All @@ -229,7 +229,7 @@ httpClient.addHook("requestError", (error, request) => {
console.groupEnd();
});

const sdk = new SDK({ httpClient });
const sdk = new RyTs({ httpClient });
```
<!-- End Custom HTTP Client [http-client] -->

Expand Down
12 changes: 11 additions & 1 deletion ts/RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,14 @@ Based on:
### Generated
- [typescript v0.1.2] ts
### Releases
- [NPM v0.1.2] https://www.npmjs.com/package/openapi/v/0.1.2 - ts
- [NPM v0.1.2] https://www.npmjs.com/package/openapi/v/0.1.2 - ts

## 2024-06-26 19:53:09
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.320.0 (2.354.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.1.3] ts
### Releases
- [NPM v0.1.3] https://www.npmjs.com/package/ryan-test-1/v/0.1.3 - ts
6 changes: 3 additions & 3 deletions ts/USAGE.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!-- Start SDK Example Usage [usage] -->
```typescript
import { SDK } from "openapi";
import { RyTs } from "ryan-test-1";

const sdk = new SDK();
const ryTs = new RyTs();

async function run() {
const result = await sdk.pets.listPets(21453);
const result = await ryTs.pets.listPets(21453);

// Handle the result
console.log(result);
Expand Down
18 changes: 9 additions & 9 deletions ts/docs/sdks/pets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ List all pets
### Example Usage

```typescript
import { SDK } from "openapi";
import { RyTs } from "ryan-test-1";

const sdk = new SDK();
const ryTs = new RyTs();

async function run() {
const result = await sdk.pets.listPets(21453);
const result = await ryTs.pets.listPets(21453);

// Handle the result
console.log(result)
Expand Down Expand Up @@ -53,12 +53,12 @@ Create a pet
### Example Usage

```typescript
import { SDK } from "openapi";
import { RyTs } from "ryan-test-1";

const sdk = new SDK();
const ryTs = new RyTs();

async function run() {
const result = await sdk.pets.createPets({
const result = await ryTs.pets.createPets({
id: 596804,
name: "<value>",
});
Expand Down Expand Up @@ -95,12 +95,12 @@ Info for a specific pet
### Example Usage

```typescript
import { SDK } from "openapi";
import { RyTs } from "ryan-test-1";

const sdk = new SDK();
const ryTs = new RyTs();

async function run() {
const result = await sdk.pets.showPetById("<value>");
const result = await ryTs.pets.showPetById("<value>");

// Handle the result
console.log(result)
Expand Down
2 changes: 1 addition & 1 deletion ts/docs/sdks/sdk/README.md → ts/docs/sdks/ryts/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SDK
# RyTs SDK


## Overview
Expand Down
4 changes: 2 additions & 2 deletions ts/jsr.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@


{
"name": "openapi",
"version": "0.1.2",
"name": "ryan-test-1",
"version": "0.1.3",
"exports": {
".": "./src/index.ts",
"./models/errors": "./src/models/errors/index.ts",
Expand Down
8 changes: 4 additions & 4 deletions ts/package-lock.json

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

6 changes: 3 additions & 3 deletions ts/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "openapi",
"version": "0.1.2",
"author": "Speakeasy",
"name": "ryan-test-1",
"version": "0.1.3",
"author": "ryantimalbert",
"main": "./index.js",
"sideEffects": false,
"repository": {
Expand Down
6 changes: 3 additions & 3 deletions ts/src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "1.0.0",
sdkVersion: "0.1.2",
genVersion: "2.347.8",
userAgent: "speakeasy-sdk/typescript 0.1.2 2.347.8 1.0.0 openapi",
sdkVersion: "0.1.3",
genVersion: "2.354.1",
userAgent: "speakeasy-sdk/typescript 0.1.3 2.354.1 1.0.0 ryan-test-1",
} as const;
2 changes: 1 addition & 1 deletion ts/src/sdk/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { HTTPClient } from "../lib/http.js";
import { ClientSDK } from "../lib/sdks.js";
import { Pets } from "./pets.js";

export class SDK extends ClientSDK {
export class RyTs extends ClientSDK {
private readonly options$: SDKOptions & { hooks?: SDKHooks };

constructor(options: SDKOptions = {}) {
Expand Down

0 comments on commit 4cf3cf3

Please sign in to comment.