Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.335.2
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Jul 15, 2024
1 parent 7bbcd55 commit e974d9f
Show file tree
Hide file tree
Showing 13 changed files with 229 additions and 44 deletions.
18 changes: 9 additions & 9 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
speakeasyVersion: 1.331.0
speakeasyVersion: 1.335.2
sources:
source1:
sourceNamespace: source-1
sourceRevisionDigest: sha256:56ec44d889e3fda3ad03621a3ca66aa8ad51dcfa28894355b01740d2c52abf17
sourceBlobDigest: sha256:be8f049420bd34cd3b2da37cd59cb9a51540a3d879692a5ac8b28ce69d135b0a
sourceRevisionDigest: sha256:70427d8936519bbb31834da18b6a64ce50e62c8caa39ab27fadf1279d25bb412
sourceBlobDigest: sha256:41d6992001501dc4f8757117e3902f01178807fd20fbd9ce3a0b33ac2a99e283
tags:
- latest
- main
Expand All @@ -23,9 +23,9 @@ targets:
lending:
source: source1
sourceNamespace: source-1
sourceRevisionDigest: sha256:56ec44d889e3fda3ad03621a3ca66aa8ad51dcfa28894355b01740d2c52abf17
sourceBlobDigest: sha256:be8f049420bd34cd3b2da37cd59cb9a51540a3d879692a5ac8b28ce69d135b0a
outLocation: lending
sourceRevisionDigest: sha256:70427d8936519bbb31834da18b6a64ce50e62c8caa39ab27fadf1279d25bb412
sourceBlobDigest: sha256:41d6992001501dc4f8757117e3902f01178807fd20fbd9ce3a0b33ac2a99e283
outLocation: ./lending
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand All @@ -39,21 +39,21 @@ workflow:
accounting:
target: typescript
source: source1
output: accounting
output: ./accounting
publish:
npm:
token: $npm_token
finance:
target: typescript
source: source1
output: finance
output: ./finance
publish:
npm:
token: $npm_token
lending:
target: typescript
source: source1
output: lending
output: ./lending
publish:
npm:
token: $npm_token
11 changes: 7 additions & 4 deletions lending/.speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ id: 7caa457a-d738-4713-931d-4e4f19784732
management:
docChecksum: 1bdb7a6f8bf3995d4b40475228403253
docVersion: 1.0.0
speakeasyVersion: 1.331.0
generationVersion: 2.365.0
releaseVersion: 0.0.18
configChecksum: 70265682e30ef46fd3c09844c1126003
speakeasyVersion: 1.335.2
generationVersion: 2.372.3
releaseVersion: 0.1.0
configChecksum: 83b6549f9c6e71f0f8c0c20aae613df1
repoURL: https://github.com/ryan-timothy-albert/sample-ts-monorepo.git
repoSubDirectory: lending
installationURL: https://gitpkg.now.sh/ryan-timothy-albert/sample-ts-monorepo/lending
Expand All @@ -15,9 +15,11 @@ features:
typescript:
additionalDependencies: 0.1.0
core: 3.11.6
defaultEnabledRetries: 0.1.0
globalSecurityCallbacks: 0.1.0
globalServerURLs: 2.82.4
responseFormat: 0.2.3
retries: 2.83.0
sdkHooks: 0.1.0
generatedFiles:
- src/sdk/pets.ts
Expand Down Expand Up @@ -63,6 +65,7 @@ generatedFiles:
- docs/models/components/pet.md
- docs/models/components/errort.md
- docs/sdks/lendingsdk/README.md
- docs/lib/utils/retryconfig.md
- docs/sdks/pets/README.md
- USAGE.md
- .gitattributes
Expand Down
2 changes: 1 addition & 1 deletion lending/.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.0.18
version: 0.1.0
additionalDependencies:
dependencies: {}
devDependencies: {}
Expand Down
65 changes: 65 additions & 0 deletions lending/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,71 @@ const sdk = new LendingSDK({ httpClient });
```
<!-- End Custom HTTP Client [http-client] -->

<!-- Start Retries [retries] -->
## Retries

Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.

To change the default retry strategy for a single API call, simply provide a retryConfig object to the call:
```typescript
import { LendingSDK } from "ryan-lending";

const lendingSDK = new LendingSDK();

async function run() {
const result = await lendingSDK.pets.listPets(
{},
{
retries: {
strategy: "backoff",
backoff: {
initialInterval: 1,
maxInterval: 50,
exponent: 1.1,
maxElapsedTime: 100,
},
retryConnectionErrors: false,
},
}
);

// Handle the result
console.log(result);
}

run();

```

If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:
```typescript
import { LendingSDK } from "ryan-lending";

const lendingSDK = new LendingSDK({
retryConfig: {
strategy: "backoff",
backoff: {
initialInterval: 1,
maxInterval: 50,
exponent: 1.1,
maxElapsedTime: 100,
},
retryConnectionErrors: false,
},
});

async function run() {
const result = await lendingSDK.pets.listPets({});

// Handle the result
console.log(result);
}

run();

```
<!-- End Retries [retries] -->

<!-- Placeholder for Future Speakeasy SDK Sections -->

# Development
Expand Down
12 changes: 11 additions & 1 deletion lending/RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,14 @@ Based on:
### Generated
- [typescript v0.0.18] lending
### Releases
- [NPM v0.0.18] https://www.npmjs.com/package/ryan-lending/v/0.0.18 - lending
- [NPM v0.0.18] https://www.npmjs.com/package/ryan-lending/v/0.0.18 - lending

## 2024-07-15 19:34:09
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.335.2 (2.372.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.1.0] lending
### Releases
- [NPM v0.1.0] https://www.npmjs.com/package/ryan-lending/v/0.1.0 - lending
24 changes: 24 additions & 0 deletions lending/docs/lib/utils/retryconfig.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# RetryConfig

Allows customizing the default retry configuration. It is only permitted in methods that accept retry policies.

## Fields

| Name | Type | Description | Example |
| ------------------------- | ----------------------------------- | ------------------------------------------------------------------------------------------ | ----------- |
| `strategy` | `"backoff" | "none"` | The retry strategy to use. | `"backoff"` |
| `backoff` | [BackoffStrategy](#backoffstrategy) | When strategy is "backoff", this configurates for the backoff parameters. | |
| `retryConnectionErrors` | `*boolean*` | When strategy is "backoff", this determines whether or not to retry on connection errors. | `true` |

## BackoffStrategy

The backoff strategy allows retrying a request with an exponential backoff between each retry.

### Fields

| Name | Type | Description | Example |
| ------------------ | ------------ | ----------------------------------------- | -------- |
| `initialInterval` | `*number*` | The initial interval in milliseconds. | `500` |
| `maxInterval` | `*number*` | The maximum interval in milliseconds. | `60000` |
| `exponent` | `*number*` | The exponent to use for the backoff. | `1.5` |
| `maxElapsedTime` | `*number*` | The maximum elapsed time in milliseconds. | `300000` |
3 changes: 3 additions & 0 deletions lending/docs/sdks/pets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ run();
| `request` | [operations.ListPetsRequest](../../models/operations/listpetsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |


### Response
Expand Down Expand Up @@ -77,6 +78,7 @@ run();
| `request` | [components.Pet](../../models/components/pet.md) | :heavy_check_mark: | The request object to use for the request. |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |


### Response
Expand Down Expand Up @@ -118,6 +120,7 @@ run();
| `request` | [operations.ShowPetByIdRequest](../../models/operations/showpetbyidrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |


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

{
"name": "ryan-lending",
"version": "0.0.18",
"version": "0.1.0",
"exports": {
".": "./src/index.ts",
"./models/errors": "./src/models/errors/index.ts",
Expand Down
4 changes: 2 additions & 2 deletions lending/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 lending/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ryan-lending",
"version": "0.0.18",
"version": "0.1.0",
"author": "ryan-timothy-albert",
"main": "./index.js",
"sideEffects": false,
Expand Down
7 changes: 4 additions & 3 deletions lending/src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export type SDKOptions = {
* Allows overriding the default retry config used by the SDK
*/
retryConfig?: RetryConfig;
timeoutMs?: number;
};

export function serverURLFromOptions(options: SDKOptions): URL | null {
Expand All @@ -47,7 +48,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "1.0.0",
sdkVersion: "0.0.18",
genVersion: "2.365.0",
userAgent: "speakeasy-sdk/typescript 0.0.18 2.365.0 1.0.0 ryan-lending",
sdkVersion: "0.1.0",
genVersion: "2.372.3",
userAgent: "speakeasy-sdk/typescript 0.1.0 2.372.3 1.0.0 ryan-lending",
} as const;
Loading

0 comments on commit e974d9f

Please sign in to comment.