-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.358.0
- Loading branch information
1 parent
49cd5b1
commit 7682d0c
Showing
49 changed files
with
1,400 additions
and
790 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
/funcs | ||
/core.* | ||
/models | ||
/models/errors | ||
/types | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Contributing to This Repository | ||
|
||
Thank you for your interest in contributing to this repository. Please note that this repository contains generated code. As such, we do not accept direct changes or pull requests. Instead, we encourage you to follow the guidelines below to report issues and suggest improvements. | ||
|
||
## How to Report Issues | ||
|
||
If you encounter any bugs or have suggestions for improvements, please open an issue on GitHub. When reporting an issue, please provide as much detail as possible to help us reproduce the problem. This includes: | ||
|
||
- A clear and descriptive title | ||
- Steps to reproduce the issue | ||
- Expected and actual behavior | ||
- Any relevant logs, screenshots, or error messages | ||
- Information about your environment (e.g., operating system, software versions) | ||
- For example can be collected using the `npx envinfo` command from your terminal if you have Node.js installed | ||
|
||
## Issue Triage and Upstream Fixes | ||
|
||
We will review and triage issues as quickly as possible. Our goal is to address bugs and incorporate improvements in the upstream source code. Fixes will be included in the next generation of the generated code. | ||
|
||
## Contact | ||
|
||
If you have any questions or need further assistance, please feel free to reach out by opening an issue. | ||
|
||
Thank you for your understanding and cooperation! | ||
|
||
The Maintainers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* | ||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. | ||
*/ | ||
|
||
import { ClientSDK } from "./lib/sdks.js"; | ||
|
||
/** | ||
* A minimal client to use when calling standalone SDK functions. Typically, an | ||
* instance of this class would be instantiated once at the start of an | ||
* application and passed around through some dependency injection mechanism to | ||
* parts of an application that need to make SDK calls. | ||
*/ | ||
export class LendingSDKCore extends ClientSDK {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
/* | ||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. | ||
*/ | ||
|
||
import { LendingSDKCore } from "../core.js"; | ||
import { encodeJSON as encodeJSON$ } from "../lib/encodings.js"; | ||
import * as m$ from "../lib/matchers.js"; | ||
import * as schemas$ from "../lib/schemas.js"; | ||
import { RequestOptions } from "../lib/sdks.js"; | ||
import { pathToFunc } from "../lib/url.js"; | ||
import * as components from "../models/components/index.js"; | ||
import { | ||
ConnectionError, | ||
InvalidRequestError, | ||
RequestAbortedError, | ||
RequestTimeoutError, | ||
UnexpectedClientError, | ||
} from "../models/errors/httpclienterrors.js"; | ||
import { SDKError } from "../models/errors/sdkerror.js"; | ||
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; | ||
import { Result } from "../types/fp.js"; | ||
|
||
/** | ||
* Create a pet | ||
*/ | ||
export async function petsCreatePets( | ||
client$: LendingSDKCore, | ||
request: components.Pet, | ||
options?: RequestOptions | ||
): Promise< | ||
Result< | ||
components.ErrorT | undefined, | ||
| SDKError | ||
| SDKValidationError | ||
| UnexpectedClientError | ||
| InvalidRequestError | ||
| RequestAbortedError | ||
| RequestTimeoutError | ||
| ConnectionError | ||
> | ||
> { | ||
const input$ = request; | ||
|
||
const parsed$ = schemas$.safeParse( | ||
input$, | ||
(value$) => components.Pet$outboundSchema.parse(value$), | ||
"Input validation failed" | ||
); | ||
if (!parsed$.ok) { | ||
return parsed$; | ||
} | ||
const payload$ = parsed$.value; | ||
const body$ = encodeJSON$("body", payload$, { explode: true }); | ||
|
||
const path$ = pathToFunc("/pets")(); | ||
|
||
const headers$ = new Headers({ | ||
"Content-Type": "application/json", | ||
Accept: "application/json", | ||
}); | ||
|
||
const context = { operationID: "createPets", oAuth2Scopes: [], securitySource: null }; | ||
|
||
const requestRes = client$.createRequest$( | ||
context, | ||
{ | ||
method: "POST", | ||
path: path$, | ||
headers: headers$, | ||
body: body$, | ||
timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, | ||
}, | ||
options | ||
); | ||
if (!requestRes.ok) { | ||
return requestRes; | ||
} | ||
const request$ = requestRes.value; | ||
|
||
const doResult = await client$.do$(request$, { | ||
context, | ||
errorCodes: ["4XX", "5XX"], | ||
retryConfig: options?.retries || client$.options$.retryConfig, | ||
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], | ||
}); | ||
if (!doResult.ok) { | ||
return doResult; | ||
} | ||
const response = doResult.value; | ||
|
||
const [result$] = await m$.match< | ||
components.ErrorT | undefined, | ||
| SDKError | ||
| SDKValidationError | ||
| UnexpectedClientError | ||
| InvalidRequestError | ||
| RequestAbortedError | ||
| RequestTimeoutError | ||
| ConnectionError | ||
>( | ||
m$.nil(201, components.ErrorT$inboundSchema.optional()), | ||
m$.fail(["4XX", "5XX"]), | ||
m$.json("default", components.ErrorT$inboundSchema.optional()) | ||
)(response); | ||
if (!result$.ok) { | ||
return result$; | ||
} | ||
|
||
return result$; | ||
} |
Oops, something went wrong.