Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc 1.0.0, Speakeasy CLI 1.183.2
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Feb 17, 2024
1 parent c9116c2 commit ffe7017
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ management:
docChecksum: 354db46ad7c46031799521bd155482f1
docVersion: 1.0.0
speakeasyVersion: internal
generationVersion: 2.258.0
generationVersion: 2.262.2
releaseVersion: 0.1.4
configChecksum: 0a09ed2158bb08e3a5d6b66ceeff3034
repoURL: https://github.com/unkeyed/speakeasy.git
Expand Down
8 changes: 8 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,12 @@ Based on:
- OpenAPI Doc 1.0.0
- Speakeasy CLI 1.180.0 (2.258.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.1.4] .

## 2024-02-17 00:27:40
### Changes
Based on:
- OpenAPI Doc 1.0.0
- Speakeasy CLI 1.183.2 (2.262.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.1.4] .
4 changes: 2 additions & 2 deletions src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ export const SDK_METADATA = Object.freeze({
language: "typescript",
openapiDocVersion: "1.0.0",
sdkVersion: "0.1.4",
genVersion: "2.258.0",
userAgent: "speakeasy-sdk/typescript 0.1.4 2.258.0 1.0.0 openapi",
genVersion: "2.262.2",
userAgent: "speakeasy-sdk/typescript 0.1.4 2.262.2 1.0.0 openapi",
});
27 changes: 23 additions & 4 deletions src/lib/retries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,29 @@ async function retryBackoff(
throw err;
}

const d = Math.min(
initialInterval * Math.pow(x, exponent) + Math.random() * 1000,
maxInterval,
);
let retryInterval = 0;
if (err instanceof TemporaryError && err.res && err.res.headers) {
const retryVal = err.res.headers.get("retry-after") || "";
if (retryVal != "") {
const parsedNumber = Number(retryVal);
if (!isNaN(parsedNumber) && Number.isInteger(parsedNumber)) {
retryInterval = parsedNumber * 1000;
} else {
const parsedDate = Date.parse(retryVal);
if (!isNaN(parsedDate)) {
const deltaMS = parsedDate - Date.now();
retryInterval = deltaMS > 0 ? Math.ceil(deltaMS) : 0;
}
}
}
}

if (retryInterval == 0) {
retryInterval =
initialInterval * Math.pow(x, exponent) + Math.random() * 1000;
}

const d = Math.min(retryInterval, maxInterval);

await delay(d);
x++;
Expand Down
4 changes: 0 additions & 4 deletions src/sdk/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1444,7 +1444,6 @@ export class SDK extends ClientSDK {
charEncoding: "percent",
}),
};

const path$ = this.templateURLComponent("/v1/keys/{keyId}")(pathParams$);

let security$;
Expand Down Expand Up @@ -2051,7 +2050,6 @@ export class SDK extends ClientSDK {
charEncoding: "percent",
}),
};

const path$ = this.templateURLComponent("/v1/apis/{apiId}")(pathParams$);

let security$;
Expand Down Expand Up @@ -2163,7 +2161,6 @@ export class SDK extends ClientSDK {
charEncoding: "percent",
}),
};

const path$ = this.templateURLComponent("/v1/apis/{apiId}")(pathParams$);

let security$;
Expand Down Expand Up @@ -2281,7 +2278,6 @@ export class SDK extends ClientSDK {
charEncoding: "percent",
}),
};

const path$ = this.templateURLComponent("/v1/apis/{apiId}/keys")(pathParams$);

const query$ = [
Expand Down

0 comments on commit ffe7017

Please sign in to comment.