Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.438.1
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Nov 12, 2024
1 parent 47d77e4 commit c5fd565
Show file tree
Hide file tree
Showing 14 changed files with 91 additions and 19 deletions.
8 changes: 4 additions & 4 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
speakeasyVersion: 1.436.0
speakeasyVersion: 1.438.1
sources:
source1:
sourceNamespace: source-1
sourceRevisionDigest: sha256:d1a45d3d136d4ec3bdc89ed376b36b7f13e780cfd038da70119ae2dc69a5ee71
sourceRevisionDigest: sha256:92d980b20c5f6d648c19fb260d0a77bee98fe9879fdcf521b4b6d32993ff48e5
sourceBlobDigest: sha256:b51ff396c812e5270dad2ba1c47700f138d9a263866fb02f197d9cb5d9b87c08
tags:
- latest
Expand All @@ -21,10 +21,10 @@ targets:
lending:
source: source1
sourceNamespace: source-1
sourceRevisionDigest: sha256:d1a45d3d136d4ec3bdc89ed376b36b7f13e780cfd038da70119ae2dc69a5ee71
sourceRevisionDigest: sha256:92d980b20c5f6d648c19fb260d0a77bee98fe9879fdcf521b4b6d32993ff48e5
sourceBlobDigest: sha256:b51ff396c812e5270dad2ba1c47700f138d9a263866fb02f197d9cb5d9b87c08
codeSamplesNamespace: source-1-code-samples
codeSamplesRevisionDigest: sha256:cd73df6f790edf799b2cf99aef6f232eb5cd323dca9a14a65ed428bdd1b7b8ae
codeSamplesRevisionDigest: sha256:42ca01a1e18e9f381605dc0939ee4c71984345bcc303f7e1dc352d868c4127a8
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
8 changes: 4 additions & 4 deletions lending/.speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ id: 7caa457a-d738-4713-931d-4e4f19784732
management:
docChecksum: 1bdb7a6f8bf3995d4b40475228403253
docVersion: 1.0.0
speakeasyVersion: 1.436.0
generationVersion: 2.455.2
releaseVersion: 0.6.5
configChecksum: 6db5e286a6547bfffeae0431925ffcb6
speakeasyVersion: 1.438.1
generationVersion: 2.457.2
releaseVersion: 0.6.6
configChecksum: 11b4563e9eda8f89c01c5c4d8543ff88
repoURL: https://github.com/ryan-timothy-albert/sample-ts-monorepo.git
repoSubDirectory: lending
installationURL: https://gitpkg.now.sh/ryan-timothy-albert/sample-ts-monorepo/lending
Expand Down
2 changes: 1 addition & 1 deletion lending/.speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ generation:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: false
typescript:
version: 0.6.5
version: 0.6.6
additionalDependencies:
dependencies: {}
devDependencies: {}
Expand Down
12 changes: 11 additions & 1 deletion lending/RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -568,4 +568,14 @@ Based on:
### Generated
- [typescript v0.6.5] lending
### Releases
- [NPM v0.6.5] https://www.npmjs.com/package/ryan-lending/v/0.6.5 - lending
- [NPM v0.6.5] https://www.npmjs.com/package/ryan-lending/v/0.6.5 - lending

## 2024-11-12 00:57:03
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.438.1 (2.457.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.6.6] lending
### Releases
- [NPM v0.6.6] https://www.npmjs.com/package/ryan-lending/v/0.6.6 - lending
2 changes: 1 addition & 1 deletion lending/jsr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{
"name": "ryan-lending",
"version": "0.6.5",
"version": "0.6.6",
"exports": {
".": "./src/index.ts",
"./models/errors": "./src/models/errors/index.ts",
Expand Down
4 changes: 2 additions & 2 deletions lending/package-lock.json

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

2 changes: 1 addition & 1 deletion lending/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ryan-lending",
"version": "0.6.5",
"version": "0.6.6",
"author": "ryan-timothy-albert",
"main": "./index.js",
"sideEffects": false,
Expand Down
3 changes: 3 additions & 0 deletions lending/src/funcs/petsCreatePets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ export async function petsCreatePets(
const context = {
operationID: "createPets",
oAuth2Scopes: [],

resolvedSecurity: null,

securitySource: null,
retryConfig: options?.retries
|| client._options.retryConfig
Expand Down
3 changes: 3 additions & 0 deletions lending/src/funcs/petsListPets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ export async function petsListPets(
const context = {
operationID: "listPets",
oAuth2Scopes: [],

resolvedSecurity: null,

securitySource: null,
retryConfig: options?.retries
|| client._options.retryConfig
Expand Down
3 changes: 3 additions & 0 deletions lending/src/funcs/petsShowPetById.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ export async function petsShowPetById(
const context = {
operationID: "showPetById",
oAuth2Scopes: [],

resolvedSecurity: null,

securitySource: null,
retryConfig: options?.retries
|| client._options.retryConfig
Expand Down
2 changes: 2 additions & 0 deletions lending/src/hooks/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@

import { HTTPClient, RequestInput } from "../lib/http.js";
import { RetryConfig } from "../lib/retries.js";
import { SecurityState } from "../lib/security.js";

export type HookContext = {
operationID: string;
oAuth2Scopes?: string[];
securitySource?: any | (() => Promise<any>);
retryConfig: RetryConfig;
resolvedSecurity: SecurityState | null;
};

export type Awaitable<T> = T | Promise<T>;
Expand Down
6 changes: 3 additions & 3 deletions lending/src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "1.0.0",
sdkVersion: "0.6.5",
genVersion: "2.455.2",
userAgent: "speakeasy-sdk/typescript 0.6.5 2.455.2 1.0.0 ryan-lending",
sdkVersion: "0.6.6",
genVersion: "2.457.2",
userAgent: "speakeasy-sdk/typescript 0.6.6 2.457.2 1.0.0 ryan-lending",
} as const;
20 changes: 20 additions & 0 deletions lending/src/lib/primitives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/

class InvariantError extends Error {
constructor(message: string) {
super(message);
this.name = "InvariantError";
}
}

export function invariant(
condition: unknown,
message: string,
): asserts condition {
if (!condition) {
throw new InvariantError(message);
}
}

export type ExactPartial<T> = {
[P in keyof T]?: T[P] | undefined;
};

export type Remap<Inp, Mapping extends { [k in keyof Inp]?: string | null }> = {
[k in keyof Inp as Mapping[k] extends string /* if we have a string mapping for this key then use it */
? Mapping[k]
Expand Down
35 changes: 33 additions & 2 deletions lending/src/lib/security.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/

type OAuth2PasswordFlow = {
username: string;
password?: string | undefined;
clientID: string;
clientSecret?: string | undefined;
tokenURL: string;
};

export enum SecurityErrorCode {
Incomplete = "incomplete",
UnrecognisedSecurityType = "unrecognized_security_type",
Expand Down Expand Up @@ -35,6 +43,7 @@ export type SecurityState = {
headers: Record<string, string>;
queryParams: Record<string, string>;
cookies: Record<string, string>;
oauth2: ({ type: "password" } & OAuth2PasswordFlow) | { type: "none" };
};

type SecurityInputBasic = {
Expand Down Expand Up @@ -77,6 +86,15 @@ type SecurityInputOAuth2ClientCredentials = {
| undefined;
};

type SecurityInputOAuth2PasswordCredentials = {
type: "oauth2:password";
value:
| string
| null
| undefined;
fieldName: string;
};

type SecurityInputCustom = {
type: "http:custom";
value: any | null | undefined;
Expand All @@ -89,6 +107,7 @@ export type SecurityInput =
| SecurityInputAPIKey
| SecurityInputOAuth2
| SecurityInputOAuth2ClientCredentials
| SecurityInputOAuth2PasswordCredentials
| SecurityInputOIDC
| SecurityInputCustom;

Expand All @@ -100,6 +119,7 @@ export function resolveSecurity(
headers: {},
queryParams: {},
cookies: {},
oauth2: { type: "none" },
};

const option = options.find((opts) => {
Expand All @@ -110,6 +130,10 @@ export function resolveSecurity(
return o.value.username != null || o.value.password != null;
} else if (o.type === "http:custom") {
return null;
} else if (o.type === "oauth2:password") {
return (
typeof o.value === "string" && !!o.value
);
} else if (o.type === "oauth2:client_credentials") {
return o.value.clientID != null || o.value.clientSecret != null;
} else if (typeof o.value === "string") {
Expand Down Expand Up @@ -154,6 +178,9 @@ export function resolveSecurity(
case "oauth2":
applyBearer(state, spec);
break;
case "oauth2:password":
applyBearer(state, spec);
break;
case "oauth2:client_credentials":
break;
case "openIdConnect":
Expand Down Expand Up @@ -181,9 +208,13 @@ function applyBasic(

function applyBearer(
state: SecurityState,
spec: SecurityInputBearer | SecurityInputOAuth2 | SecurityInputOIDC,
spec:
| SecurityInputBearer
| SecurityInputOAuth2
| SecurityInputOIDC
| SecurityInputOAuth2PasswordCredentials,
) {
if (spec.value == null) {
if (typeof spec.value !== "string" || !spec.value) {
return;
}

Expand Down

0 comments on commit c5fd565

Please sign in to comment.