Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.335.0
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Jul 14, 2024
1 parent f8d9a23 commit bdd9d50
Show file tree
Hide file tree
Showing 66 changed files with 3,056 additions and 1,650 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/esm
/dist
/.tshy
/.tshy-*
/models
/models/errors
/types
Expand Down
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-*
13 changes: 8 additions & 5 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,26 @@ id: 0115721b-c5d5-4598-9754-02eb24f100a8
management:
docChecksum: 108d5939aa1f55ecaef7b1e04e7745b6
docVersion: 1.0.0
speakeasyVersion: 1.309.1
generationVersion: 2.347.4
releaseVersion: 0.9.1
configChecksum: 3144aadae02ffcdbc2bcf9d1a9c2c8c7
speakeasyVersion: 1.335.0
generationVersion: 2.370.2
releaseVersion: 0.10.0
configChecksum: df1796ba257da0b8304dc3fd01342587
repoURL: https://github.com/speakeasy-sdks/nango-typescript-sdk.git
repoSubDirectory: .
installationURL: https://github.com/speakeasy-sdks/nango-typescript-sdk
published: true
features:
typescript:
additionalDependencies: 0.1.0
core: 3.10.0
core: 3.11.6
defaultEnabledRetries: 0.1.0
flattening: 2.81.1
globalSecurityCallbacks: 0.1.0
globalServerURLs: 2.82.4
groups: 2.81.2
nameOverrides: 2.81.2
responseFormat: 0.2.3
retries: 2.83.0
sdkHooks: 0.1.0
serverIDs: 2.81.2
generatedFiles:
Expand Down Expand Up @@ -158,6 +160,7 @@ generatedFiles:
- docs/models/operations/patchproxyrequest.md
- docs/models/operations/deleteproxyrequest.md
- docs/sdks/nango/README.md
- docs/lib/utils/retryconfig.md
- docs/sdks/integrations/README.md
- docs/sdks/connections/README.md
- docs/sdks/records/README.md
Expand Down
13 changes: 7 additions & 6 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
speakeasyVersion: 1.309.1
speakeasyVersion: 1.335.0
sources:
my-source:
sourceNamespace: my-source
sourceRevisionDigest: sha256:28f8ad416a8c616c03f380901b4f45883c023ec04e4d65ae5a811a8168c45108
sourceBlobDigest: sha256:efa987571d8346ba36b22ab4746cdde4b9470314c134765f1b925c8d4bf07dae
sourceRevisionDigest: sha256:df54796f529635fb568ba72c74aaaef6cd6648b26e220d76c073c0fa406f7720
sourceBlobDigest: sha256:ee8fa2cba530915e9b36f27a1b286a0b32b485e920a549ca7a809b1fb5fe68a5
tags:
- latest
- main
targets:
nango-ts:
source: my-source
sourceNamespace: my-source
sourceRevisionDigest: sha256:28f8ad416a8c616c03f380901b4f45883c023ec04e4d65ae5a811a8168c45108
sourceBlobDigest: sha256:efa987571d8346ba36b22ab4746cdde4b9470314c134765f1b925c8d4bf07dae
outLocation: /Users/sagar/go/src/Nango-sample-sdk
sourceRevisionDigest: sha256:df54796f529635fb568ba72c74aaaef6cd6648b26e220d76c073c0fa406f7720
sourceBlobDigest: sha256:ee8fa2cba530915e9b36f27a1b286a0b32b485e920a549ca7a809b1fb5fe68a5
outLocation: /github/workspace/repo
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
62 changes: 62 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,68 @@ const sdk = new Nango({ 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 { Nango } from "@speakeasy-sdks/nango";

const nango = new Nango();

async function run() {
const result = await nango.integrations.list({
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 { Nango } from "@speakeasy-sdks/nango";

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

async function run() {
const result = await nango.integrations.list();

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

run();

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

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

# Development
Expand Down
10 changes: 9 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,12 @@ Based on:
### Generated
- [typescript v0.6.0] .
### Releases
- [NPM v0.6.0] https://www.npmjs.com/package/@simplesagar92/nango/v/0.6.0 - .
- [NPM v0.6.0] https://www.npmjs.com/package/@simplesagar92/nango/v/0.6.0 - .

## 2024-07-14 00:25:52
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.335.0 (2.370.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.10.0] .
2 changes: 1 addition & 1 deletion RUNTIMES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This SDK is intended to be used in JavaScript runtimes that support the following features:

* [Web Fetch API][web-fetch]
* [Web Streams API](web-streams) and in particular `ReadableStream`
* [Web Streams API][web-streams] and in particular `ReadableStream`
* [Async iterables][async-iter] using `Symbol.asyncIterator`

[web-fetch]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
Expand Down
24 changes: 24 additions & 0 deletions 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` |
1 change: 1 addition & 0 deletions docs/sdks/actions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ run();
| `createActionTriggerRequest` | [components.CreateActionTriggerRequest](../../models/components/createactiontriggerrequest.md) | :heavy_check_mark: | N/A |
| `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
Loading

0 comments on commit bdd9d50

Please sign in to comment.