Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.454.2
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Dec 13, 2024
1 parent b51d08c commit 58753e4
Show file tree
Hide file tree
Showing 13 changed files with 84 additions and 145 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/react-query
/funcs
/core.*
/__tests__
Expand Down
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
**/*
!/FUNCTIONS.md
!/RUNTIMES.md
!/REACT_QUERY.md
!/**/*.ts
!/**/*.js
!/**/*.map
Expand Down
16 changes: 8 additions & 8 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
lockVersion: 2.0.0
id: 79fa0df9-852a-493c-b998-1d82654b5f18
management:
docChecksum: 8ff3e37e3bcdf4b0ef72f37df29c2c47
docVersion: 3.3.0
speakeasyVersion: 1.449.0
generationVersion: 2.467.4
releaseVersion: 0.23.0
configChecksum: d60a73c628ceca172cfcceb6dc5ad337
docChecksum: cd02dacb5ea03529426acee148b52684
docVersion: 3.3.1
speakeasyVersion: 1.454.2
generationVersion: 2.477.4
releaseVersion: 0.23.1
configChecksum: b0966968c7e705fe09976d316aa62073
repoURL: https://github.com/BoltApp/Bolt-Typescript-SDK.git
repoSubDirectory: .
installationURL: https://github.com/BoltApp/Bolt-Typescript-SDK
published: true
features:
typescript:
additionalDependencies: 0.1.0
core: 3.18.7
core: 3.18.9
defaultEnabledRetries: 0.1.0
enumUnions: 0.1.0
envVarSecurityUsage: 0.1.2
errorUnions: 0.1.1
flattening: 2.82.0
flattening: 2.82.1
globalSecurity: 2.82.11
globalSecurityCallbacks: 0.1.0
globalServerURLs: 2.82.4
Expand Down
16 changes: 8 additions & 8 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
speakeasyVersion: 1.449.0
speakeasyVersion: 1.454.2
sources:
my-source:
sourceNamespace: my-source
sourceRevisionDigest: sha256:564817516826aa870a4ec6daa86a0e6edc44a45a6eece5da503f62be38bbd61d
sourceBlobDigest: sha256:51c81ecaaa90446ad8968d89a42a84bcd2b3bfa0f97ba4cb8aae067637538117
sourceRevisionDigest: sha256:62a85f15193c9b727b646641ae7cd60bcf0799f5522f545dd5212207c7a77cc1
sourceBlobDigest: sha256:13a47f75ea523066457c04434bb9431410e7b4b9454d7d0049f421cab0a1ebd8
tags:
- latest
- speakeasy-sdk-regen-1733185446
- 3.3.0
- speakeasy-sdk-regen-1734049410
- 3.3.1
targets:
bolt-typescript:
source: my-source
sourceNamespace: my-source
sourceRevisionDigest: sha256:564817516826aa870a4ec6daa86a0e6edc44a45a6eece5da503f62be38bbd61d
sourceBlobDigest: sha256:51c81ecaaa90446ad8968d89a42a84bcd2b3bfa0f97ba4cb8aae067637538117
sourceRevisionDigest: sha256:62a85f15193c9b727b646641ae7cd60bcf0799f5522f545dd5212207c7a77cc1
sourceBlobDigest: sha256:13a47f75ea523066457c04434bb9431410e7b4b9454d7d0049f421cab0a1ebd8
codeSamplesNamespace: my-source-typescript-code-samples
codeSamplesRevisionDigest: sha256:1e67a4d948be1746b0c30a78421cbaf9fd9683468f988851b5f358405dd45cee
codeSamplesRevisionDigest: sha256:0f7a81ea5668c61b27ec3454f2c7551aa3354b01104bcc0375972617103c0c86
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
32 changes: 17 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,26 +143,16 @@ run();
<!-- Start Error Handling [errors] -->
## Error Handling

All SDK methods return a response object or throw an error. By default, an API error will throw a `errors.SDKError`.

If a HTTP request fails, an operation my also throw an error from the `models/errors/httpclienterrors.ts` module:

| HTTP Client Error | Description |
| ---------------------------------------------------- | ---------------------------------------------------- |
| RequestAbortedError | HTTP request was aborted by the client |
| RequestTimeoutError | HTTP request timed out due to an AbortSignal signal |
| ConnectionError | HTTP client was unable to make a request to a server |
| InvalidRequestError | Any input used to create a request is invalid |
| UnexpectedClientError | Unrecognised or unexpected error |

In addition, when custom error responses are specified for an operation, the SDK may throw their associated Error type. You can refer to respective *Errors* tables in SDK docs for more details on possible error types for each operation. For example, the `getDetails` method may throw the following errors:
Some methods specify known errors which can be thrown. All the known errors are enumerated in the `models/errors/errors.ts` module. The known errors for a method are documented under the *Errors* tables in SDK docs. For example, the `getDetails` method may throw the following errors:

| Error Type | Status Code | Content Type |
| ----------------- | ----------- | ---------------- |
| errors.ErrorT | 4XX | application/json |
| errors.FieldError | 4XX | application/json |
| errors.SDKError | 5XX | \*/\* |

If the method throws an error and it is not captured by the known errors, it will default to throwing a `SDKError`.

```typescript
import { BoltTypescriptSDK } from "@boltpay/bolt-typescript-sdk";
import {
Expand All @@ -187,8 +177,9 @@ async function run() {
console.log(result);
} catch (err) {
switch (true) {
// The server response does not match the expected SDK schema
case (err instanceof SDKValidationError): {
// Validation errors can be pretty-printed
// Pretty-print will provide a human-readable multi-line error message
console.error(err.pretty());
// Raw value may also be inspected
console.error(err.rawValue);
Expand All @@ -203,6 +194,7 @@ async function run() {
return;
}
default: {
// Other errors such as network errors, see HTTPClientErrors for more details
throw err;
}
}
Expand All @@ -213,7 +205,17 @@ run();

```

Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted string since validation errors can list many issues and the plain error string may be difficult read when debugging.
Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted multi-line string since validation errors can list many issues and the plain error string may be difficult read when debugging.

In some rare cases, the SDK can fail to get a response from the server or even make the request due to unexpected circumstances such as network conditions. These types of errors are captured in the `models/errors/httpclienterrors.ts` module:

| HTTP Client Error | Description |
| ---------------------------------------------------- | ---------------------------------------------------- |
| RequestAbortedError | HTTP request was aborted by the client |
| RequestTimeoutError | HTTP request timed out due to an AbortSignal signal |
| ConnectionError | HTTP client was unable to make a request to a server |
| InvalidRequestError | Any input used to create a request is invalid |
| UnexpectedClientError | Unrecognised or unexpected error |
<!-- End Error Handling [errors] -->

<!-- Start Server Selection [server] -->
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -598,4 +598,14 @@ Based on:
### Generated
- [typescript v0.23.0] .
### Releases
- [NPM v0.23.0] https://www.npmjs.com/package/@boltpay/bolt-typescript-sdk/v/0.23.0 - .
- [NPM v0.23.0] https://www.npmjs.com/package/@boltpay/bolt-typescript-sdk/v/0.23.0 - .

## 2024-12-13 00:23:27
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.454.2 (2.477.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.23.1] .
### Releases
- [NPM v0.23.1] https://www.npmjs.com/package/@boltpay/bolt-typescript-sdk/v/0.23.1 - .
2 changes: 1 addition & 1 deletion gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ generation:
oAuth2ClientCredentialsEnabled: false
oAuth2PasswordEnabled: false
typescript:
version: 0.23.0
version: 0.23.1
additionalDependencies:
dependencies: {}
devDependencies: {}
Expand Down
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": "@boltpay/bolt-typescript-sdk",
"version": "0.23.0",
"version": "0.23.1",
"exports": {
".": "./src/index.ts",
"./models/errors": "./src/models/errors/index.ts",
Expand Down
106 changes: 2 additions & 104 deletions package-lock.json

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

4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@boltpay/bolt-typescript-sdk",
"version": "0.23.0",
"version": "0.23.1",
"author": "BoltPublicAPI",
"main": "./index.js",
"sideEffects": false,
Expand All @@ -15,8 +15,6 @@
"prepublishOnly": "npm run build"
},
"peerDependencies": {
"react": "^18 || ^19",
"react-dom": "^18 || ^19",
"zod": ">= 3"
},
"devDependencies": {
Expand Down
Loading

0 comments on commit 58753e4

Please sign in to comment.