Skip to content

Commit

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

chore: 🐝 Update SDK - Generate 0.3.0
  • Loading branch information
ryan-timothy-albert authored Nov 5, 2024
2 parents 73654d4 + c7b8b5f commit 1b1e92f
Show file tree
Hide file tree
Showing 18 changed files with 162 additions and 93 deletions.
12 changes: 6 additions & 6 deletions package/.speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
speakeasyVersion: 1.424.0
speakeasyVersion: 1.430.0
sources:
petstore-oas:
sourceNamespace: petstore-oas
sourceRevisionDigest: sha256:b0f44cb22f1c6aec1bed1c781d21a6c41e8b0f3fccb116f229e782a9656ed921
sourceBlobDigest: sha256:69a3ed9123054331820acb44011f58db5480e6216f22616491d90fd743235b8b
sourceRevisionDigest: sha256:8b6ed82ea3bdb15f358c750fa7826a960198b6e316e48f0be78a629a9811fd1b
sourceBlobDigest: sha256:a1856050bcf3372d2b4104e1863a9be34ac008d355ed1b5f40b0273b4439a5ad
tags:
- latest
- main
targets:
petstore:
source: petstore-oas
sourceNamespace: petstore-oas
sourceRevisionDigest: sha256:b0f44cb22f1c6aec1bed1c781d21a6c41e8b0f3fccb116f229e782a9656ed921
sourceBlobDigest: sha256:69a3ed9123054331820acb44011f58db5480e6216f22616491d90fd743235b8b
sourceRevisionDigest: sha256:8b6ed82ea3bdb15f358c750fa7826a960198b6e316e48f0be78a629a9811fd1b
sourceBlobDigest: sha256:a1856050bcf3372d2b4104e1863a9be34ac008d355ed1b5f40b0273b4439a5ad
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
sources:
petstore-oas:
inputs:
- location: https://raw.githubusercontent.com/OAI/OpenAPI-Specification/refs/heads/main/tests/v3.0/pass/petstore.yaml
- location: ../openapi.yaml
registry:
location: registry.speakeasyapi.dev/ryan-local/ryan-telemetry/petstore-oas
targets:
Expand Down
4 changes: 4 additions & 0 deletions package/.speakeasy/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ targets:
publish:
npm:
token: $npm_token
codeSamples:
registry:
location: registry.speakeasyapi.dev/ryan-local/ryan-telemetry/petstore-oas-code-samples
blocking: false
25 changes: 16 additions & 9 deletions package/sdk/.speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
lockVersion: 2.0.0
id: 61baf600-f5ef-40e7-a8ac-60a427fe2b6e
management:
docChecksum: 1bdb7a6f8bf3995d4b40475228403253
docChecksum: b7ed2616c25c0eafe5e9cd14d1075de7
docVersion: 1.0.0
speakeasyVersion: 1.424.0
generationVersion: 2.445.1
releaseVersion: 0.2.1
configChecksum: 242f6619e57abb63b8d3a37bbb35e3f1
speakeasyVersion: 1.430.0
generationVersion: 2.449.0
releaseVersion: 0.3.0
configChecksum: c11f9b7b0fe1e5cd14886034ed4e9ee1
repoURL: https://github.com/ryan-timothy-albert/test_nested_repo.git
repoSubDirectory: package/sdk
installationURL: https://gitpkg.now.sh/ryan-timothy-albert/test_nested_repo/package/sdk
published: true
features:
typescript:
additionalDependencies: 0.1.0
core: 3.18.2
core: 3.18.3
defaultEnabledRetries: 0.1.0
devContainers: 2.90.0
envVarSecurityUsage: 0.1.1
envVarSecurityUsage: 0.1.2
globalSecurityCallbacks: 0.1.0
globalServerURLs: 2.82.4
responseFormat: 0.2.3
retries: 2.83.0
sdkHooks: 0.1.0
sdkHooks: 0.2.0
tests: 0.7.0
generatedFiles:
- .devcontainer/README.md
Expand All @@ -48,7 +48,7 @@ generatedFiles:
- jsr.json
- package.json
- src/core.ts
- src/funcs/petsCreatePets.ts
- src/funcs/petsCreatePetsMe.ts
- src/funcs/petsListPets.ts
- src/funcs/petsShowPetById.ts
- src/hooks/hooks.ts
Expand Down Expand Up @@ -117,3 +117,10 @@ examples:
application/json: {"id": 763078, "name": "<value>"}
default:
application/json: {"code": 743784, "message": "<value>"}
createPetsMe:
speakeasy-default-create-pets-me:
requestBody:
application/json: {"id": 413703, "name": "<value>"}
responses:
default:
application/json: {"code": 357040, "message": "<value>"}
3 changes: 2 additions & 1 deletion package/sdk/.speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ generation:
requestResponseComponentNamesFeb2024: true
auth:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: false
typescript:
version: 0.2.1
version: 0.3.0
additionalDependencies:
dependencies: {}
devDependencies: {}
Expand Down
4 changes: 2 additions & 2 deletions package/sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ run();
### [pets](docs/sdks/pets/README.md)

* [listPets](docs/sdks/pets/README.md#listpets) - List all pets
* [createPets](docs/sdks/pets/README.md#createpets) - Create a pet
* [createPetsMe](docs/sdks/pets/README.md#createpetsme) - Create a pet
* [showPetById](docs/sdks/pets/README.md#showpetbyid) - Info for a specific pet


Expand All @@ -108,7 +108,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).

<summary>Available standalone functions</summary>

- [`petsCreatePets`](docs/sdks/pets/README.md#createpets) - Create a pet
- [`petsCreatePetsMe`](docs/sdks/pets/README.md#createpetsme) - Create a pet
- [`petsListPets`](docs/sdks/pets/README.md#listpets) - List all pets
- [`petsShowPetById`](docs/sdks/pets/README.md#showpetbyid) - Info for a specific pet

Expand Down
12 changes: 11 additions & 1 deletion package/sdk/RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,4 +187,14 @@ Based on:
### Generated
- [typescript v0.2.1] package/sdk
### Releases
- [NPM v0.2.1] https://www.npmjs.com/package/ryan-total-test-act/v/0.2.1 - package/sdk
- [NPM v0.2.1] https://www.npmjs.com/package/ryan-total-test-act/v/0.2.1 - package/sdk

## 2024-11-05 22:38:14
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.430.0 (2.449.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.3.0] package/sdk
### Releases
- [NPM v0.3.0] https://www.npmjs.com/package/ryan-total-test-act/v/0.3.0 - package/sdk
14 changes: 7 additions & 7 deletions package/sdk/docs/sdks/pets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
### Available Operations

* [listPets](#listpets) - List all pets
* [createPets](#createpets) - Create a pet
* [createPetsMe](#createpetsme) - Create a pet
* [showPetById](#showpetbyid) - Info for a specific pet

## listPets
Expand Down Expand Up @@ -77,7 +77,7 @@ run();
| --------------- | --------------- | --------------- |
| errors.SDKError | 4XX, 5XX | \*/\* |

## createPets
## createPetsMe

Create a pet

Expand All @@ -89,8 +89,8 @@ import { Petstore } from "ryan-total-test-act";
const petstore = new Petstore();

async function run() {
const result = await petstore.pets.createPets({
id: 596804,
const result = await petstore.pets.createPetsMe({
id: 413703,
name: "<value>",
});

Expand All @@ -107,15 +107,15 @@ The standalone function version of this method:

```typescript
import { PetstoreCore } from "ryan-total-test-act/core.js";
import { petsCreatePets } from "ryan-total-test-act/funcs/petsCreatePets.js";
import { petsCreatePetsMe } from "ryan-total-test-act/funcs/petsCreatePetsMe.js";

// Use `PetstoreCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const petstore = new PetstoreCore();

async function run() {
const res = await petsCreatePets(petstore, {
id: 596804,
const res = await petsCreatePetsMe(petstore, {
id: 413703,
name: "<value>",
});

Expand Down
2 changes: 1 addition & 1 deletion package/sdk/jsr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{
"name": "ryan-total-test-act",
"version": "0.2.1",
"version": "0.3.0",
"exports": {
".": "./src/index.ts",
"./models/errors": "./src/models/errors/index.ts",
Expand Down
4 changes: 2 additions & 2 deletions package/sdk/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/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ryan-total-test-act",
"version": "0.2.1",
"version": "0.3.0",
"author": "ryan-timothy-albert",
"main": "./index.js",
"sideEffects": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { Result } from "../types/fp.js";
/**
* Create a pet
*/
export async function petsCreatePets(
export async function petsCreatePetsMe(
client: PetstoreCore,
request: components.Pet,
options?: RequestOptions,
Expand Down Expand Up @@ -58,9 +58,13 @@ export async function petsCreatePets(
});

const context = {
operationID: "createPets",
operationID: "createPetsMe",
oAuth2Scopes: [],
securitySource: null,
retryConfig: options?.retries
|| client._options.retryConfig
|| { strategy: "none" },
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
};

const requestRes = client._createRequest(context, {
Expand All @@ -78,9 +82,8 @@ export async function petsCreatePets(
const doResult = await client._do(req, {
context,
errorCodes: ["4XX", "5XX"],
retryConfig: options?.retries
|| client._options.retryConfig,
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
retryConfig: context.retryConfig,
retryCodes: context.retryCodes,
});
if (!doResult.ok) {
return doResult;
Expand Down
9 changes: 6 additions & 3 deletions package/sdk/src/funcs/petsListPets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ export async function petsListPets(
operationID: "listPets",
oAuth2Scopes: [],
securitySource: null,
retryConfig: options?.retries
|| client._options.retryConfig
|| { strategy: "none" },
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
};

const requestRes = client._createRequest(context, {
Expand All @@ -82,9 +86,8 @@ export async function petsListPets(
const doResult = await client._do(req, {
context,
errorCodes: ["4XX", "5XX"],
retryConfig: options?.retries
|| client._options.retryConfig,
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
retryConfig: context.retryConfig,
retryCodes: context.retryCodes,
});
if (!doResult.ok) {
return doResult;
Expand Down
9 changes: 6 additions & 3 deletions package/sdk/src/funcs/petsShowPetById.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ export async function petsShowPetById(
operationID: "showPetById",
oAuth2Scopes: [],
securitySource: null,
retryConfig: options?.retries
|| client._options.retryConfig
|| { strategy: "none" },
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
};

const requestRes = client._createRequest(context, {
Expand All @@ -84,9 +88,8 @@ export async function petsShowPetById(
const doResult = await client._do(req, {
context,
errorCodes: ["4XX", "5XX"],
retryConfig: options?.retries
|| client._options.retryConfig,
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
retryConfig: context.retryConfig,
retryCodes: context.retryCodes,
});
if (!doResult.ok) {
return doResult;
Expand Down
2 changes: 2 additions & 0 deletions package/sdk/src/hooks/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
*/

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

export type HookContext = {
operationID: string;
oAuth2Scopes?: string[];
securitySource?: any | (() => Promise<any>);
retryConfig: RetryConfig;
};

export type Awaitable<T> = T | Promise<T>;
Expand Down
6 changes: 3 additions & 3 deletions package/sdk/src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "1.0.0",
sdkVersion: "0.2.1",
genVersion: "2.445.1",
userAgent: "speakeasy-sdk/typescript 0.2.1 2.445.1 1.0.0 ryan-total-test-act",
sdkVersion: "0.3.0",
genVersion: "2.449.0",
userAgent: "speakeasy-sdk/typescript 0.3.0 2.449.0 1.0.0 ryan-total-test-act",
} as const;
Loading

0 comments on commit 1b1e92f

Please sign in to comment.