-
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.390.7
- Loading branch information
1 parent
2cfdc64
commit 7fa17da
Showing
14 changed files
with
149 additions
and
26 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
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
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 |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
|
||
export * from "./sdk/sdk.js"; | ||
export * from "./lib/config.js"; | ||
export * as files from "./lib/files.js"; |
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,40 @@ | ||
/* | ||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. | ||
*/ | ||
|
||
/** | ||
* Consumes a stream and returns a concatenated array buffer. Useful in | ||
* situations where we need to read the whole file because it forms part of a | ||
* larger payload containing other fields, and we can't modify the underlying | ||
* request structure. | ||
*/ | ||
export async function readableStreamToArrayBuffer( | ||
readable: ReadableStream<Uint8Array>, | ||
): Promise<ArrayBuffer> { | ||
const reader = readable.getReader(); | ||
const chunks: Uint8Array[] = []; | ||
|
||
let totalLength = 0; | ||
let done = false; | ||
|
||
while (!done) { | ||
const { value, done: doneReading } = await reader.read(); | ||
|
||
if (doneReading) { | ||
done = true; | ||
} else { | ||
chunks.push(value); | ||
totalLength += value.length; | ||
} | ||
} | ||
|
||
const concatenatedChunks = new Uint8Array(totalLength); | ||
let offset = 0; | ||
|
||
for (const chunk of chunks) { | ||
concatenatedChunks.set(chunk, offset); | ||
offset += chunk.length; | ||
} | ||
|
||
return concatenatedChunks.buffer; | ||
} |
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,21 @@ | ||
/* | ||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. | ||
*/ | ||
|
||
export function isReadableStream<T = Uint8Array>( | ||
val: unknown, | ||
): val is ReadableStream<T> { | ||
if (typeof val !== "object" || val === null) { | ||
return false; | ||
} | ||
|
||
// Check for the presence of methods specific to ReadableStream | ||
const stream = val as ReadableStream<Uint8Array>; | ||
|
||
// ReadableStream has methods like getReader, cancel, and tee | ||
return ( | ||
typeof stream.getReader === "function" && | ||
typeof stream.cancel === "function" && | ||
typeof stream.tee === "function" | ||
); | ||
} |