diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh index 94d21752..8cb43e9d 100644 --- a/.devcontainer/setup.sh +++ b/.devcontainer/setup.sh @@ -7,8 +7,8 @@ curl -fsSL https://raw.githubusercontent.com/speakeasy-api/speakeasy/main/instal rmdir samples || true mkdir samples -npm install -npm install -g ts-node +npm install --ignore-scripts +npm install -g ts-node --ignore-scripts npm link npm link @steamsets/client-ts TS_CONFIG_CONTENT=$(cat < { console.groupEnd(); }); -const sdk = new SteamSets({ httpClient }); +const sdk = new SteamSets({ httpClient: httpClient }); ``` @@ -476,10 +476,7 @@ bun add @steamsets/client-ts ### Yarn ```bash -yarn add @steamsets/client-ts zod - -# Note that Yarn does not install peer dependencies automatically. You will need -# to install zod as shown above. +yarn add @steamsets/client-ts ``` diff --git a/RELEASES.md b/RELEASES.md index e9351de5..62e6d54c 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1598,4 +1598,14 @@ Based on: ### Generated - [typescript v0.28.0] . ### Releases -- [NPM v0.28.0] https://www.npmjs.com/package/@steamsets/client-ts/v/0.28.0 - . \ No newline at end of file +- [NPM v0.28.0] https://www.npmjs.com/package/@steamsets/client-ts/v/0.28.0 - . + +## 2025-09-28 20:05:54 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.631.3 (2.716.14) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.28.1] . +### Releases +- [NPM v0.28.1] https://www.npmjs.com/package/@steamsets/client-ts/v/0.28.1 - . \ No newline at end of file diff --git a/docs/models/components/badge.md b/docs/models/components/badge.md index 061aba71..13ca8bf1 100644 --- a/docs/models/components/badge.md +++ b/docs/models/components/badge.md @@ -13,31 +13,29 @@ let value: Badge = { appImage: "", appName: "", bookmarks: 775541, - cardCount: 241602, colors: [ "", "", - "", ], designs: [ "", + "", + "", ], - firstCompletion: 781190, - highestLevel: 719260, - highestPrice: 534083, + firstCompletion: 274482, + highestLevel: 781190, id: "", - image: "https://picsum.photos/seed/ZhEwPesri/198/2037", - isEvent: true, - isFoil: true, - isSale: true, - lastCompletion: 695081, - level: 554725, - lowestPrice: 705781, + image: "https://loremflickr.com/2877/2136?lock=4587574259201405", + isEvent: false, + isFoil: false, + isSale: false, + lastChangedAt: 274437, + lastCompletion: 650973, + level: 530830, name: "", - price: 253246, - scarcity: 632242, - steamId: 11725, - xp: 2589.14, + scarcity: 822916, + steamId: 237125, + xp: 4643.94, }; ``` @@ -50,22 +48,19 @@ let value: Badge = { | `appImage` | *string* | :heavy_check_mark: | N/A | | `appName` | *string* | :heavy_check_mark: | N/A | | `bookmarks` | *number* | :heavy_check_mark: | N/A | -| `cardCount` | *number* | :heavy_check_mark: | N/A | | `colors` | *string*[] | :heavy_check_mark: | N/A | | `designs` | *string*[] | :heavy_check_mark: | N/A | | `firstCompletion` | *number* | :heavy_check_mark: | N/A | | `highestLevel` | *number* | :heavy_check_mark: | N/A | -| `highestPrice` | *number* | :heavy_check_mark: | N/A | | `id` | *string* | :heavy_check_mark: | N/A | | `image` | *string* | :heavy_check_mark: | N/A | | `isEvent` | *boolean* | :heavy_check_mark: | N/A | | `isFoil` | *boolean* | :heavy_check_mark: | N/A | | `isSale` | *boolean* | :heavy_check_mark: | N/A | +| `lastChangedAt` | *number* | :heavy_check_mark: | N/A | | `lastCompletion` | *number* | :heavy_check_mark: | N/A | | `level` | *number* | :heavy_check_mark: | N/A | -| `lowestPrice` | *number* | :heavy_check_mark: | N/A | | `name` | *string* | :heavy_check_mark: | N/A | -| `price` | *number* | :heavy_check_mark: | N/A | | `scarcity` | *number* | :heavy_check_mark: | N/A | | `steamId` | *number* | :heavy_check_mark: | N/A | | `xp` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/developerapp.md b/docs/models/components/developerapp.md index d53c4d6b..86721293 100644 --- a/docs/models/components/developerapp.md +++ b/docs/models/components/developerapp.md @@ -6,20 +6,24 @@ import { DeveloperApp } from "@steamsets/client-ts/models/components"; let value: DeveloperApp = { - apiKey: "api_123", + apiKey: "null", + createdAt: new Date("2023-01-01T00:00:00Z"), description: "My App Description", environment: "production", - id: "da_123456", + id: "key_123456", + keyId: "key_123456", name: "My App", }; ``` ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -| ~~`apiKey`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The api key of the developer app | api_123 | -| `description` | *string* | :heavy_check_mark: | The description of the developer app | My App Description | -| `environment` | [components.DeveloperAppEnvironment](../../models/components/developerappenvironment.md) | :heavy_check_mark: | The environment of the developer app | production | -| `id` | *string* | :heavy_check_mark: | The id of the developer app | da_123456 | -| `name` | *string* | :heavy_check_mark: | The name of the developer app | My App | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ~~`apiKey`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The api key (deprecated, always null for security) | null | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | When the app was created | 2023-01-01T00:00:00Z | +| `description` | *string* | :heavy_check_mark: | The description of the developer app | My App Description | +| `environment` | [components.DeveloperAppEnvironment](../../models/components/developerappenvironment.md) | :heavy_check_mark: | The environment of the developer app | production | +| `id` | *string* | :heavy_check_mark: | The id of the developer app (same as keyId for backwards compatibility) | key_123456 | +| `keyId` | *string* | :heavy_check_mark: | The Unkey key ID | key_123456 | +| `name` | *string* | :heavy_check_mark: | The name of the developer app | My App | \ No newline at end of file diff --git a/docs/models/components/v1accountgetsettingsbody.md b/docs/models/components/v1accountgetsettingsbody.md index a0e6d228..10740db4 100644 --- a/docs/models/components/v1accountgetsettingsbody.md +++ b/docs/models/components/v1accountgetsettingsbody.md @@ -27,10 +27,12 @@ let value: V1AccountGetSettingsBody = { ], developerApps: [ { - apiKey: "api_123", + apiKey: "null", + createdAt: new Date("2023-01-01T00:00:00Z"), description: "My App Description", environment: "production", - id: "da_123456", + id: "key_123456", + keyId: "key_123456", name: "My App", }, ], diff --git a/docs/models/components/v1badgesearchbadgesresponsebody.md b/docs/models/components/v1badgesearchbadgesresponsebody.md index 48b44fa9..633ab421 100644 --- a/docs/models/components/v1badgesearchbadgesresponsebody.md +++ b/docs/models/components/v1badgesearchbadgesresponsebody.md @@ -17,34 +17,32 @@ let value: V1BadgeSearchBadgesResponseBody = { appImage: "", appName: "", bookmarks: 353675, - cardCount: 569138, - colors: [], - designs: [ + colors: [ "", "", - "", ], - firstCompletion: 489094, - highestLevel: 840796, - highestPrice: 611451, + designs: [ + "", + ], + firstCompletion: 945501, + highestLevel: 489094, id: "", - image: "https://picsum.photos/seed/UgF54a/1520/3015", + image: "https://loremflickr.com/3363/2446?lock=6789580362501293", isEvent: false, isFoil: true, - isSale: true, - lastCompletion: 816554, - level: 445516, - lowestPrice: 892598, + isSale: false, + lastChangedAt: 270740, + lastCompletion: 672493, + level: 83446, name: "", - price: 583902, - scarcity: 417094, - steamId: 948325, - xp: 6147.04, + scarcity: 67481, + steamId: 163073, + xp: 6644.55, }, ], facets: "", - pages: 218407, - results: 225214, + pages: 136677, + results: 447990, }; ``` diff --git a/examples/package-lock.json b/examples/package-lock.json index 076a1446..7b0bd833 100644 --- a/examples/package-lock.json +++ b/examples/package-lock.json @@ -18,7 +18,7 @@ }, "..": { "name": "@steamsets/client-ts", - "version": "0.28.0", + "version": "0.28.1", "dependencies": { "zod": "^3.20.0" }, diff --git a/jsr.json b/jsr.json index 931f4d95..f169e24f 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@steamsets/client-ts", - "version": "0.28.0", + "version": "0.28.1", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index bdd90600..527b3a72 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@steamsets/client-ts", - "version": "0.28.0", + "version": "0.28.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@steamsets/client-ts", - "version": "0.28.0", + "version": "0.28.1", "dependencies": { "zod": "^3.20.0" }, diff --git a/package.json b/package.json index 7ab93ff6..7e102f9a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@steamsets/client-ts", - "version": "0.28.0", + "version": "0.28.1", "author": "Speakeasy", "main": "./index.js", "sideEffects": false, diff --git a/src/lib/config.ts b/src/lib/config.ts index 06de0990..b4d16811 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -59,8 +59,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "1.0.0", - sdkVersion: "0.28.0", - genVersion: "2.696.0", + sdkVersion: "0.28.1", + genVersion: "2.716.14", userAgent: - "speakeasy-sdk/typescript 0.28.0 2.696.0 1.0.0 @steamsets/client-ts", + "speakeasy-sdk/typescript 0.28.1 2.716.14 1.0.0 @steamsets/client-ts", } as const; diff --git a/src/lib/url.ts b/src/lib/url.ts index 6bc6356e..f3a8de6c 100644 --- a/src/lib/url.ts +++ b/src/lib/url.ts @@ -10,7 +10,7 @@ export function pathToFunc( pathPattern: string, options?: { charEncoding?: "percent" | "none" }, ): (params?: Params) => string { - const paramRE = /\{([a-zA-Z0-9_]+?)\}/g; + const paramRE = /\{([a-zA-Z0-9_][a-zA-Z0-9_-]*?)\}/g; return function buildURLPath(params: Record = {}): string { return pathPattern.replace(paramRE, function (_, placeholder) { diff --git a/src/models/components/badge.ts b/src/models/components/badge.ts index 2dee0b1b..6821a0b0 100644 --- a/src/models/components/badge.ts +++ b/src/models/components/badge.ts @@ -20,22 +20,19 @@ export type Badge = { appImage: string; appName: string; bookmarks: number; - cardCount: number; colors: Array | null; designs: Array | null; firstCompletion: number; highestLevel: number; - highestPrice: number; id: string; image: string; isEvent: boolean; isFoil: boolean; isSale: boolean; + lastChangedAt: number; lastCompletion: number; level: number; - lowestPrice: number; name: string; - price: number; scarcity: number; steamId: number; xp: number; @@ -49,22 +46,19 @@ export const Badge$inboundSchema: z.ZodType = z appImage: z.string(), appName: z.string(), bookmarks: z.number().int(), - cardCount: z.number().int(), colors: z.nullable(z.array(z.string())), designs: z.nullable(z.array(z.string())), firstCompletion: z.number().int(), highestLevel: z.number().int(), - highestPrice: z.number().int(), id: z.string(), image: z.string(), isEvent: z.boolean(), isFoil: z.boolean(), isSale: z.boolean(), + lastChangedAt: z.number().int(), lastCompletion: z.number().int(), level: z.number().int(), - lowestPrice: z.number().int(), name: z.string(), - price: z.number().int(), scarcity: z.number().int(), steamId: z.number().int(), xp: z.number(), @@ -81,22 +75,19 @@ export type Badge$Outbound = { appImage: string; appName: string; bookmarks: number; - cardCount: number; colors: Array | null; designs: Array | null; firstCompletion: number; highestLevel: number; - highestPrice: number; id: string; image: string; isEvent: boolean; isFoil: boolean; isSale: boolean; + lastChangedAt: number; lastCompletion: number; level: number; - lowestPrice: number; name: string; - price: number; scarcity: number; steamId: number; xp: number; @@ -113,22 +104,19 @@ export const Badge$outboundSchema: z.ZodType< appImage: z.string(), appName: z.string(), bookmarks: z.number().int(), - cardCount: z.number().int(), colors: z.nullable(z.array(z.string())), designs: z.nullable(z.array(z.string())), firstCompletion: z.number().int(), highestLevel: z.number().int(), - highestPrice: z.number().int(), id: z.string(), image: z.string(), isEvent: z.boolean(), isFoil: z.boolean(), isSale: z.boolean(), + lastChangedAt: z.number().int(), lastCompletion: z.number().int(), level: z.number().int(), - lowestPrice: z.number().int(), name: z.string(), - price: z.number().int(), scarcity: z.number().int(), steamId: z.number().int(), xp: z.number(), diff --git a/src/models/components/developerapp.ts b/src/models/components/developerapp.ts index 97c16442..27d6f4d3 100644 --- a/src/models/components/developerapp.ts +++ b/src/models/components/developerapp.ts @@ -25,11 +25,15 @@ export type DeveloperAppEnvironment = ClosedEnum< export type DeveloperApp = { /** - * The api key of the developer app + * The api key (deprecated, always null for security) * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ apiKey: string | null; + /** + * When the app was created + */ + createdAt: Date; /** * The description of the developer app */ @@ -39,9 +43,13 @@ export type DeveloperApp = { */ environment: DeveloperAppEnvironment; /** - * The id of the developer app + * The id of the developer app (same as keyId for backwards compatibility) */ id: string; + /** + * The Unkey key ID + */ + keyId: string; /** * The name of the developer app */ @@ -76,18 +84,22 @@ export const DeveloperApp$inboundSchema: z.ZodType< unknown > = z.object({ apiKey: z.nullable(z.string()), + createdAt: z.string().datetime({ offset: true }).transform(v => new Date(v)), description: z.string(), environment: DeveloperAppEnvironment$inboundSchema, id: z.string(), + keyId: z.string(), name: z.string(), }); /** @internal */ export type DeveloperApp$Outbound = { apiKey: string | null; + createdAt: string; description: string; environment: string; id: string; + keyId: string; name: string; }; @@ -98,9 +110,11 @@ export const DeveloperApp$outboundSchema: z.ZodType< DeveloperApp > = z.object({ apiKey: z.nullable(z.string()), + createdAt: z.date().transform(v => v.toISOString()), description: z.string(), environment: DeveloperAppEnvironment$outboundSchema, id: z.string(), + keyId: z.string(), name: z.string(), }); diff --git a/src/models/errors/index.ts b/src/models/errors/index.ts index 7609b99c..9faed8ff 100644 --- a/src/models/errors/index.ts +++ b/src/models/errors/index.ts @@ -7,3 +7,4 @@ export * from "./httpclienterrors.js"; export * from "./responsevalidationerror.js"; export * from "./sdkerror.js"; export * from "./sdkvalidationerror.js"; +export * from "./steamsetserror.js";