diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index a65c623..fec4c97 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.326.3 +speakeasyVersion: 1.330.0 sources: source1: sourceNamespace: source-1 - sourceRevisionDigest: sha256:ac49c0f4c6476fb2b93161605a5d4f97663215a7835cac19e7c0d16cd2e9d39b - sourceBlobDigest: sha256:ee8b7da07674ee2a33ec867b19b8c8a8d3cd5490061478d253dea544ac5d2d75 + sourceRevisionDigest: sha256:02083728f9902a51eac72f77398545b5368ce1c5fdb5b848367035b2e75737bf + sourceBlobDigest: sha256:6d125adf040b266c51ef0547b637b1bd9165553a54af4835feacbcc96a098296 tags: - latest - main @@ -23,8 +23,8 @@ targets: lending: source: source1 sourceNamespace: source-1 - sourceRevisionDigest: sha256:ac49c0f4c6476fb2b93161605a5d4f97663215a7835cac19e7c0d16cd2e9d39b - sourceBlobDigest: sha256:ee8b7da07674ee2a33ec867b19b8c8a8d3cd5490061478d253dea544ac5d2d75 + sourceRevisionDigest: sha256:02083728f9902a51eac72f77398545b5368ce1c5fdb5b848367035b2e75737bf + sourceBlobDigest: sha256:6d125adf040b266c51ef0547b637b1bd9165553a54af4835feacbcc96a098296 outLocation: lending workflow: workflowVersion: 1.0.0 diff --git a/lending/.speakeasy/gen.lock b/lending/.speakeasy/gen.lock index c1470cd..90a6b57 100755 --- a/lending/.speakeasy/gen.lock +++ b/lending/.speakeasy/gen.lock @@ -3,10 +3,10 @@ id: 7caa457a-d738-4713-931d-4e4f19784732 management: docChecksum: 1bdb7a6f8bf3995d4b40475228403253 docVersion: 1.0.0 - speakeasyVersion: 1.326.3 - generationVersion: 2.359.6 - releaseVersion: 0.0.16 - configChecksum: 0368e5830f9c2a4b6b705a6ad5ce4534 + speakeasyVersion: 1.330.0 + generationVersion: 2.361.10 + releaseVersion: 0.0.17 + configChecksum: 37be3cd8c8969026a726cbb59e11c767 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 @@ -14,7 +14,7 @@ management: features: typescript: additionalDependencies: 0.1.0 - core: 3.11.3 + core: 3.11.5 globalSecurityCallbacks: 0.1.0 globalServerURLs: 2.82.4 responseFormat: 0.2.3 diff --git a/lending/.speakeasy/gen.yaml b/lending/.speakeasy/gen.yaml index b11952b..e1e7c8e 100644 --- a/lending/.speakeasy/gen.yaml +++ b/lending/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true typescript: - version: 0.0.16 + version: 0.0.17 additionalDependencies: dependencies: {} devDependencies: {} diff --git a/lending/RELEASES.md b/lending/RELEASES.md index 91c5075..517b3e2 100644 --- a/lending/RELEASES.md +++ b/lending/RELEASES.md @@ -108,4 +108,14 @@ Based on: ### Generated - [typescript v0.0.16] lending ### Releases -- [NPM v0.0.16] https://www.npmjs.com/package/ryan-lending/v/0.0.16 - lending \ No newline at end of file +- [NPM v0.0.16] https://www.npmjs.com/package/ryan-lending/v/0.0.16 - lending + +## 2024-07-09 00:51:03 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.330.0 (2.361.10) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.0.17] lending +### Releases +- [NPM v0.0.17] https://www.npmjs.com/package/ryan-lending/v/0.0.17 - lending \ No newline at end of file diff --git a/lending/RUNTIMES.md b/lending/RUNTIMES.md index 71fa3da..d08a0c0 100644 --- a/lending/RUNTIMES.md +++ b/lending/RUNTIMES.md @@ -3,7 +3,7 @@ This SDK is intended to be used in JavaScript runtimes that support the following features: * [Web Fetch API][web-fetch] -* [Web Streams API](web-streams) and in particular `ReadableStream` +* [Web Streams API][web-streams] and in particular `ReadableStream` * [Async iterables][async-iter] using `Symbol.asyncIterator` [web-fetch]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API diff --git a/lending/jsr.json b/lending/jsr.json index 25369f2..f04ec3d 100644 --- a/lending/jsr.json +++ b/lending/jsr.json @@ -2,7 +2,7 @@ { "name": "ryan-lending", - "version": "0.0.16", + "version": "0.0.17", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/lending/package-lock.json b/lending/package-lock.json index 123194b..a4926a5 100644 --- a/lending/package-lock.json +++ b/lending/package-lock.json @@ -1,12 +1,12 @@ { "name": "ryan-lending", - "version": "0.0.16", + "version": "0.0.17", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ryan-lending", - "version": "0.0.16", + "version": "0.0.17", "devDependencies": { "@types/jsonpath": "^0.2.4", "@typescript-eslint/eslint-plugin": "^7.7.1", diff --git a/lending/package.json b/lending/package.json index 1c3bc1e..3bd4a6a 100644 --- a/lending/package.json +++ b/lending/package.json @@ -1,6 +1,6 @@ { "name": "ryan-lending", - "version": "0.0.16", + "version": "0.0.17", "author": "ryan-timothy-albert", "main": "./index.js", "sideEffects": false, diff --git a/lending/src/lib/config.ts b/lending/src/lib/config.ts index e4e8a53..34992e7 100644 --- a/lending/src/lib/config.ts +++ b/lending/src/lib/config.ts @@ -47,7 +47,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "1.0.0", - sdkVersion: "0.0.16", - genVersion: "2.359.6", - userAgent: "speakeasy-sdk/typescript 0.0.16 2.359.6 1.0.0 ryan-lending", + sdkVersion: "0.0.17", + genVersion: "2.361.10", + userAgent: "speakeasy-sdk/typescript 0.0.17 2.361.10 1.0.0 ryan-lending", } as const; diff --git a/lending/src/lib/sdks.ts b/lending/src/lib/sdks.ts index 40007f5..e1624b8 100644 --- a/lending/src/lib/sdks.ts +++ b/lending/src/lib/sdks.ts @@ -35,7 +35,7 @@ const webWorkerLike = const isBrowserLike = webWorkerLike || (typeof navigator !== "undefined" && "serviceWorker" in navigator) || - typeof window === "object"; + (typeof window === "object" && typeof window.document !== "undefined"); export class ClientSDK { private readonly client: HTTPClient; diff --git a/lending/src/models/components/error.ts b/lending/src/models/components/error.ts index 1ebc730..ccf0cfb 100644 --- a/lending/src/models/components/error.ts +++ b/lending/src/models/components/error.ts @@ -10,19 +10,32 @@ export type ErrorT = { }; /** @internal */ -export namespace ErrorT$ { - export const inboundSchema: z.ZodType = z.object({ - code: z.number().int(), - message: z.string(), - }); +export const ErrorT$inboundSchema: z.ZodType = z.object({ + code: z.number().int(), + message: z.string(), +}); - export type Outbound = { - code: number; - message: string; - }; +/** @internal */ +export type ErrorT$Outbound = { + code: number; + message: string; +}; - export const outboundSchema: z.ZodType = z.object({ - code: z.number().int(), - message: z.string(), - }); +/** @internal */ +export const ErrorT$outboundSchema: z.ZodType = z.object({ + code: z.number().int(), + message: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ErrorT$ { + /** @deprecated use `ErrorT$inboundSchema` instead. */ + export const inboundSchema = ErrorT$inboundSchema; + /** @deprecated use `ErrorT$outboundSchema` instead. */ + export const outboundSchema = ErrorT$outboundSchema; + /** @deprecated use `ErrorT$Outbound` instead. */ + export type Outbound = ErrorT$Outbound; } diff --git a/lending/src/models/components/pet.ts b/lending/src/models/components/pet.ts index 4b766b0..2c80376 100644 --- a/lending/src/models/components/pet.ts +++ b/lending/src/models/components/pet.ts @@ -11,22 +11,35 @@ export type Pet = { }; /** @internal */ -export namespace Pet$ { - export const inboundSchema: z.ZodType = z.object({ - id: z.number().int(), - name: z.string(), - tag: z.string().optional(), - }); +export const Pet$inboundSchema: z.ZodType = z.object({ + id: z.number().int(), + name: z.string(), + tag: z.string().optional(), +}); + +/** @internal */ +export type Pet$Outbound = { + id: number; + name: string; + tag?: string | undefined; +}; - export type Outbound = { - id: number; - name: string; - tag?: string | undefined; - }; +/** @internal */ +export const Pet$outboundSchema: z.ZodType = z.object({ + id: z.number().int(), + name: z.string(), + tag: z.string().optional(), +}); - export const outboundSchema: z.ZodType = z.object({ - id: z.number().int(), - name: z.string(), - tag: z.string().optional(), - }); +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Pet$ { + /** @deprecated use `Pet$inboundSchema` instead. */ + export const inboundSchema = Pet$inboundSchema; + /** @deprecated use `Pet$outboundSchema` instead. */ + export const outboundSchema = Pet$outboundSchema; + /** @deprecated use `Pet$Outbound` instead. */ + export type Outbound = Pet$Outbound; } diff --git a/lending/src/models/operations/listpets.ts b/lending/src/models/operations/listpets.ts index 0ca1dc9..c2f0dae 100644 --- a/lending/src/models/operations/listpets.ts +++ b/lending/src/models/operations/listpets.ts @@ -21,66 +21,115 @@ export type ListPetsResponse = { }; /** @internal */ -export namespace ListPetsRequest$ { - export const inboundSchema: z.ZodType = z.object({ +export const ListPetsRequest$inboundSchema: z.ZodType = + z.object({ limit: z.number().int().optional(), }); - export type Outbound = { - limit?: number | undefined; - }; +/** @internal */ +export type ListPetsRequest$Outbound = { + limit?: number | undefined; +}; - export const outboundSchema: z.ZodType = z.object({ - limit: z.number().int().optional(), - }); +/** @internal */ +export const ListPetsRequest$outboundSchema: z.ZodType< + ListPetsRequest$Outbound, + z.ZodTypeDef, + ListPetsRequest +> = z.object({ + limit: z.number().int().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListPetsRequest$ { + /** @deprecated use `ListPetsRequest$inboundSchema` instead. */ + export const inboundSchema = ListPetsRequest$inboundSchema; + /** @deprecated use `ListPetsRequest$outboundSchema` instead. */ + export const outboundSchema = ListPetsRequest$outboundSchema; + /** @deprecated use `ListPetsRequest$Outbound` instead. */ + export type Outbound = ListPetsRequest$Outbound; } /** @internal */ +export const ListPetsResponseResult$inboundSchema: z.ZodType< + ListPetsResponseResult, + z.ZodTypeDef, + unknown +> = z.union([components.ErrorT$inboundSchema, z.array(components.Pet$inboundSchema)]); + +/** @internal */ +export type ListPetsResponseResult$Outbound = + | components.ErrorT$Outbound + | Array; + +/** @internal */ +export const ListPetsResponseResult$outboundSchema: z.ZodType< + ListPetsResponseResult$Outbound, + z.ZodTypeDef, + ListPetsResponseResult +> = z.union([components.ErrorT$outboundSchema, z.array(components.Pet$outboundSchema)]); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ export namespace ListPetsResponseResult$ { - export const inboundSchema: z.ZodType = z.union([ - components.ErrorT$.inboundSchema, - z.array(components.Pet$.inboundSchema), - ]); - - export type Outbound = components.ErrorT$.Outbound | Array; - export const outboundSchema: z.ZodType = - z.union([components.ErrorT$.outboundSchema, z.array(components.Pet$.outboundSchema)]); + /** @deprecated use `ListPetsResponseResult$inboundSchema` instead. */ + export const inboundSchema = ListPetsResponseResult$inboundSchema; + /** @deprecated use `ListPetsResponseResult$outboundSchema` instead. */ + export const outboundSchema = ListPetsResponseResult$outboundSchema; + /** @deprecated use `ListPetsResponseResult$Outbound` instead. */ + export type Outbound = ListPetsResponseResult$Outbound; } /** @internal */ -export namespace ListPetsResponse$ { - export const inboundSchema: z.ZodType = z - .object({ - Headers: z.record(z.array(z.string())), - Result: z.union([ - components.ErrorT$.inboundSchema, - z.array(components.Pet$.inboundSchema), - ]), - }) - .transform((v) => { - return remap$(v, { - Headers: "headers", - Result: "result", - }); +export const ListPetsResponse$inboundSchema: z.ZodType = z + .object({ + Headers: z.record(z.array(z.string())), + Result: z.union([components.ErrorT$inboundSchema, z.array(components.Pet$inboundSchema)]), + }) + .transform((v) => { + return remap$(v, { + Headers: "headers", + Result: "result", }); + }); - export type Outbound = { - Headers: { [k: string]: Array }; - Result: components.ErrorT$.Outbound | Array; - }; - - export const outboundSchema: z.ZodType = z - .object({ - headers: z.record(z.array(z.string())), - result: z.union([ - components.ErrorT$.outboundSchema, - z.array(components.Pet$.outboundSchema), - ]), - }) - .transform((v) => { - return remap$(v, { - headers: "Headers", - result: "Result", - }); +/** @internal */ +export type ListPetsResponse$Outbound = { + Headers: { [k: string]: Array }; + Result: components.ErrorT$Outbound | Array; +}; + +/** @internal */ +export const ListPetsResponse$outboundSchema: z.ZodType< + ListPetsResponse$Outbound, + z.ZodTypeDef, + ListPetsResponse +> = z + .object({ + headers: z.record(z.array(z.string())), + result: z.union([components.ErrorT$outboundSchema, z.array(components.Pet$outboundSchema)]), + }) + .transform((v) => { + return remap$(v, { + headers: "Headers", + result: "Result", }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListPetsResponse$ { + /** @deprecated use `ListPetsResponse$inboundSchema` instead. */ + export const inboundSchema = ListPetsResponse$inboundSchema; + /** @deprecated use `ListPetsResponse$outboundSchema` instead. */ + export const outboundSchema = ListPetsResponse$outboundSchema; + /** @deprecated use `ListPetsResponse$Outbound` instead. */ + export type Outbound = ListPetsResponse$Outbound; } diff --git a/lending/src/models/operations/showpetbyid.ts b/lending/src/models/operations/showpetbyid.ts index faabaef..852ca9f 100644 --- a/lending/src/models/operations/showpetbyid.ts +++ b/lending/src/models/operations/showpetbyid.ts @@ -15,30 +15,67 @@ export type ShowPetByIdRequest = { export type ShowPetByIdResponse = components.ErrorT | components.Pet; /** @internal */ -export namespace ShowPetByIdRequest$ { - export const inboundSchema: z.ZodType = z.object({ - petId: z.string(), - }); +export const ShowPetByIdRequest$inboundSchema: z.ZodType< + ShowPetByIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + petId: z.string(), +}); - export type Outbound = { - petId: string; - }; +/** @internal */ +export type ShowPetByIdRequest$Outbound = { + petId: string; +}; - export const outboundSchema: z.ZodType = z.object({ - petId: z.string(), - }); +/** @internal */ +export const ShowPetByIdRequest$outboundSchema: z.ZodType< + ShowPetByIdRequest$Outbound, + z.ZodTypeDef, + ShowPetByIdRequest +> = z.object({ + petId: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ShowPetByIdRequest$ { + /** @deprecated use `ShowPetByIdRequest$inboundSchema` instead. */ + export const inboundSchema = ShowPetByIdRequest$inboundSchema; + /** @deprecated use `ShowPetByIdRequest$outboundSchema` instead. */ + export const outboundSchema = ShowPetByIdRequest$outboundSchema; + /** @deprecated use `ShowPetByIdRequest$Outbound` instead. */ + export type Outbound = ShowPetByIdRequest$Outbound; } /** @internal */ +export const ShowPetByIdResponse$inboundSchema: z.ZodType< + ShowPetByIdResponse, + z.ZodTypeDef, + unknown +> = z.union([components.ErrorT$inboundSchema, components.Pet$inboundSchema]); + +/** @internal */ +export type ShowPetByIdResponse$Outbound = components.ErrorT$Outbound | components.Pet$Outbound; + +/** @internal */ +export const ShowPetByIdResponse$outboundSchema: z.ZodType< + ShowPetByIdResponse$Outbound, + z.ZodTypeDef, + ShowPetByIdResponse +> = z.union([components.ErrorT$outboundSchema, components.Pet$outboundSchema]); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ export namespace ShowPetByIdResponse$ { - export const inboundSchema: z.ZodType = z.union([ - components.ErrorT$.inboundSchema, - components.Pet$.inboundSchema, - ]); - - export type Outbound = components.ErrorT$.Outbound | components.Pet$.Outbound; - export const outboundSchema: z.ZodType = z.union([ - components.ErrorT$.outboundSchema, - components.Pet$.outboundSchema, - ]); + /** @deprecated use `ShowPetByIdResponse$inboundSchema` instead. */ + export const inboundSchema = ShowPetByIdResponse$inboundSchema; + /** @deprecated use `ShowPetByIdResponse$outboundSchema` instead. */ + export const outboundSchema = ShowPetByIdResponse$outboundSchema; + /** @deprecated use `ShowPetByIdResponse$Outbound` instead. */ + export type Outbound = ShowPetByIdResponse$Outbound; } diff --git a/lending/src/sdk/pets.ts b/lending/src/sdk/pets.ts index 2b2dd6b..ff06a04 100644 --- a/lending/src/sdk/pets.ts +++ b/lending/src/sdk/pets.ts @@ -53,7 +53,7 @@ export class Pets extends ClientSDK { const payload$ = schemas$.parse( input$, - (value$) => operations.ListPetsRequest$.outboundSchema.parse(value$), + (value$) => operations.ListPetsRequest$outboundSchema.parse(value$), "Input validation failed" ); const body$ = null; @@ -83,9 +83,9 @@ export class Pets extends ClientSDK { }; const [result$] = await this.matcher() - .json(200, operations.ListPetsResponse$, { hdrs: true, key: "Result" }) + .json(200, operations.ListPetsResponse$inboundSchema, { hdrs: true, key: "Result" }) .fail(["4XX", "5XX"]) - .json("default", operations.ListPetsResponse$, { key: "Result" }) + .json("default", operations.ListPetsResponse$inboundSchema, { key: "Result" }) .match(response, { extraFields: responseFields$ }); return result$; @@ -102,7 +102,7 @@ export class Pets extends ClientSDK { const payload$ = schemas$.parse( input$, - (value$) => components.Pet$.outboundSchema.parse(value$), + (value$) => components.Pet$outboundSchema.parse(value$), "Input validation failed" ); const body$ = encodeJSON$("body", payload$, { explode: true }); @@ -127,9 +127,9 @@ export class Pets extends ClientSDK { const response = await this.do$(request$, { context, errorCodes: ["4XX", "5XX"] }); const [result$] = await this.matcher() - .void(201, components.ErrorT$.inboundSchema.optional()) + .void(201, components.ErrorT$inboundSchema.optional()) .fail(["4XX", "5XX"]) - .json("default", components.ErrorT$.inboundSchema.optional()) + .json("default", components.ErrorT$inboundSchema.optional()) .match(response); return result$; @@ -146,7 +146,7 @@ export class Pets extends ClientSDK { const payload$ = schemas$.parse( input$, - (value$) => operations.ShowPetByIdRequest$.outboundSchema.parse(value$), + (value$) => operations.ShowPetByIdRequest$outboundSchema.parse(value$), "Input validation failed" ); const body$ = null; @@ -176,9 +176,9 @@ export class Pets extends ClientSDK { const response = await this.do$(request$, { context, errorCodes: ["4XX", "5XX"] }); const [result$] = await this.matcher() - .json(200, operations.ShowPetByIdResponse$) + .json(200, operations.ShowPetByIdResponse$inboundSchema) .fail(["4XX", "5XX"]) - .json("default", operations.ShowPetByIdResponse$) + .json("default", operations.ShowPetByIdResponse$inboundSchema) .match(response); return result$;