Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.390.7
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Sep 6, 2024
1 parent 2cfdc64 commit 7fa17da
Show file tree
Hide file tree
Showing 14 changed files with 149 additions and 26 deletions.
6 changes: 3 additions & 3 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
speakeasyVersion: 1.385.0
speakeasyVersion: 1.390.7
sources:
source1:
sourceNamespace: source-1
sourceRevisionDigest: sha256:e761d4d8bcbd96d1a2c95ea3f51818e677158d95a4ce349a44675c8391a6cda3
sourceRevisionDigest: sha256:9943a302176af064bd0009e0b85ed4e33c4e3213a3463ae58344f39e987d7c2a
sourceBlobDigest: sha256:7c35756702030633a8d2ebb1d378d34f883126319b06edcd798ac7bb2fddb189
tags:
- latest
Expand All @@ -11,7 +11,7 @@ targets:
accounting:
source: source1
sourceNamespace: source-1
sourceRevisionDigest: sha256:e761d4d8bcbd96d1a2c95ea3f51818e677158d95a4ce349a44675c8391a6cda3
sourceRevisionDigest: sha256:9943a302176af064bd0009e0b85ed4e33c4e3213a3463ae58344f39e987d7c2a
sourceBlobDigest: sha256:7c35756702030633a8d2ebb1d378d34f883126319b06edcd798ac7bb2fddb189
outLocation: ./accounting
finance:
Expand Down
12 changes: 7 additions & 5 deletions accounting/.speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ id: de44aa14-d51e-4f37-b22e-356d78ca0ebc
management:
docChecksum: 1bdb7a6f8bf3995d4b40475228403253
docVersion: 1.0.0
speakeasyVersion: 1.385.0
generationVersion: 2.407.2
releaseVersion: 0.2.2
configChecksum: 300a1be6e0b5be0de3dd36b89d94298f
speakeasyVersion: 1.390.7
generationVersion: 2.409.8
releaseVersion: 0.3.0
configChecksum: 879dd3c1988cd08535a555f32ec5f653
repoURL: https://github.com/ryan-timothy-albert/sample-ts-monorepo.git
repoSubDirectory: accounting
installationURL: https://gitpkg.now.sh/ryan-timothy-albert/sample-ts-monorepo/accounting
published: true
features:
typescript:
additionalDependencies: 0.1.0
core: 3.14.2
core: 3.16.1
defaultEnabledRetries: 0.1.0
envVarSecurityUsage: 0.1.1
globalSecurityCallbacks: 0.1.0
Expand All @@ -40,6 +40,7 @@ generatedFiles:
- src/lib/config.ts
- src/lib/dlv.ts
- src/lib/encodings.ts
- src/lib/files.ts
- src/lib/http.ts
- src/lib/is-plain-object.ts
- src/lib/logger.ts
Expand All @@ -61,6 +62,7 @@ generatedFiles:
- src/types/index.ts
- src/types/operations.ts
- src/types/rfcdate.ts
- src/types/streams.ts
- tsconfig.json
- src/models/operations/listpets.ts
- src/models/operations/showpetbyid.ts
Expand Down
8 changes: 4 additions & 4 deletions accounting/.speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: true
typescript:
version: 0.2.2
version: 0.3.0
additionalDependencies:
dependencies: {}
devDependencies: {}
peerDependencies: {}
additionalPackageJSON:
license: UNLICENSED
prepare: npm run build && true
author: Speakeasy
clientServerStatusCodesAsErrors: true
enumFormat: union
Expand All @@ -30,9 +33,6 @@ typescript:
shared: models/components
webhooks: models/webhooks
inputModelSuffix: input
additionalPackageJSON:
license: UNLICENSED
prepare: "npm run build && true"
maxMethodParams: 0
methodArguments: require-security-and-request
moduleFormat: commonjs
Expand Down
6 changes: 3 additions & 3 deletions accounting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ async function run() {
let result;
try {
result = await accountingSDK.pets.listPets({});

// Handle the result
console.log(result);
} catch (err) {
switch (true) {
case err instanceof SDKValidationError: {
Expand All @@ -144,9 +147,6 @@ async function run() {
}
}
}

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

run();
Expand Down
12 changes: 11 additions & 1 deletion accounting/RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,4 +197,14 @@ Based on:
### Generated
- [typescript v0.2.2] accounting
### Releases
- [NPM v0.2.2] https://www.npmjs.com/package/ryan-accounting/v/0.2.2 - accounting
- [NPM v0.2.2] https://www.npmjs.com/package/ryan-accounting/v/0.2.2 - accounting

## 2024-09-06 00:54:19
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.390.7 (2.409.8) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.3.0] accounting
### Releases
- [NPM v0.3.0] https://www.npmjs.com/package/ryan-accounting/v/0.3.0 - accounting
6 changes: 3 additions & 3 deletions accounting/docs/sdks/pets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const accountingSDK = new AccountingSDK();

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

// Handle the result
console.log(result)
}
Expand Down Expand Up @@ -94,7 +94,7 @@ async function run() {
id: 596804,
name: "<value>",
});

// Handle the result
console.log(result)
}
Expand Down Expand Up @@ -168,7 +168,7 @@ async function run() {
const result = await accountingSDK.pets.showPetById({
petId: "<value>",
});

// Handle the result
console.log(result)
}
Expand Down
2 changes: 1 addition & 1 deletion accounting/jsr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{
"name": "ryan-accounting",
"version": "0.2.2",
"version": "0.3.0",
"exports": {
".": "./src/index.ts",
"./models/errors": "./src/models/errors/index.ts",
Expand Down
38 changes: 36 additions & 2 deletions accounting/package-lock.json

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

5 changes: 4 additions & 1 deletion accounting/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"name": "ryan-accounting",
"version": "0.2.2",
"version": "0.3.0",
"author": "Speakeasy",
"license": "UNLICENSED",
"prepare": "npm run build && true",
"main": "./index.js",
"sideEffects": false,
"repository": {
Expand All @@ -18,6 +20,7 @@
"zod": ">= 3"
},
"devDependencies": {
"@types/node": "^18.19.3",
"@typescript-eslint/eslint-plugin": "^7.7.1",
"@typescript-eslint/parser": "^7.7.1",
"eslint": "^8.57.0",
Expand Down
1 change: 1 addition & 0 deletions accounting/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@

export * from "./sdk/sdk.js";
export * from "./lib/config.js";
export * as files from "./lib/files.js";
6 changes: 3 additions & 3 deletions accounting/src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "1.0.0",
sdkVersion: "0.2.2",
genVersion: "2.407.2",
userAgent: "speakeasy-sdk/typescript 0.2.2 2.407.2 1.0.0 ryan-accounting",
sdkVersion: "0.3.0",
genVersion: "2.409.8",
userAgent: "speakeasy-sdk/typescript 0.3.0 2.409.8 1.0.0 ryan-accounting",
} as const;
40 changes: 40 additions & 0 deletions accounting/src/lib/files.ts
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;
}
12 changes: 12 additions & 0 deletions accounting/src/lib/sdks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,18 @@ export class ClientSDK {
}
}

if (conf.body instanceof ReadableStream) {
if (!fetchOptions) {
fetchOptions = {
// @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769
duplex: "half",
};
} else {
// @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769
fetchOptions.duplex = "half";
}
}

let input;
try {
input = this.hooks$.beforeCreateRequest(context, {
Expand Down
21 changes: 21 additions & 0 deletions accounting/src/types/streams.ts
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"
);
}

0 comments on commit 7fa17da

Please sign in to comment.