Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
88957ab
Initial look at using ts-to-zod
Pewtro Nov 27, 2025
4c85d89
Begin adding input/output mappings
Pewtro Nov 27, 2025
403740b
More minor fixes and added a package.json script to run
Pewtro Nov 27, 2025
98cbf93
Move base parameters into the core package to improve zod generation …
Pewtro Nov 27, 2025
1dbee36
Export search/sort so they don't go unused
Pewtro Nov 27, 2025
cdb802d
Remove tsdoc comments
Pewtro Nov 27, 2025
be6facc
Add changelog for d3 change
Pewtro Nov 27, 2025
cc35a97
Fix remaining lint issues
Pewtro Nov 27, 2025
c52ec27
Move schemas one level deeper
Pewtro Nov 27, 2025
2612853
Add an integration test project using the new zod schemas
Pewtro Nov 27, 2025
bd1a617
Update deps
Pewtro Nov 27, 2025
ec6cb23
Updates based on eslint
Pewtro Nov 27, 2025
e589668
Update d3 tests
Pewtro Dec 2, 2025
b84d4dd
Merge branch 'main' into feature/generate-zod
Pewtro Dec 5, 2025
dc35e2a
[Project] Update transitive dependencies
Pewtro Dec 5, 2025
8cc63ff
[Project] Update tsx
Pewtro Dec 5, 2025
be76185
[Project] Update dev dependencies
Pewtro Dec 18, 2025
1f63a61
[Project] Update pnpm to 10.26.0
Pewtro Dec 18, 2025
8ef0c64
[Client] Update ky to 1.14.1
Pewtro Dec 18, 2025
3d21919
Fix a few schemas
Pewtro Dec 25, 2025
29ac597
Update dev dependencies
Pewtro Dec 25, 2025
bc7fe1e
[Project] Update dev dependencies
Pewtro Jan 1, 2026
f049890
[Client] Update ky to 1.14.2
Pewtro Jan 1, 2026
5211996
[Project] Update pnpm version
Pewtro Jan 1, 2026
1a18bc2
[Chore] Update dev dependencies and update minimum version of node
Pewtro Jan 12, 2026
71fd204
[Project] Update minimum node version
Pewtro Jan 12, 2026
34c29d3
[Project] Update pnpm version
Pewtro Jan 12, 2026
448f8a0
[Project] Move back to the old prettier extension as a suggestion
Pewtro Jan 23, 2026
0e0628c
[Project] Update dependencies
Pewtro Jan 27, 2026
a9ce734
[Client] Fix lint issues in tests
Pewtro Jan 27, 2026
584aab0
[Project] Allow CI to generate oidc and publish with provenance
Pewtro Jan 27, 2026
2902fab
[Client] Update ky to 1.14.3
Pewtro Jan 27, 2026
fb0f971
[Project] Dedupe dependencies
Pewtro Jan 27, 2026
dc1fd78
[Project] Update dependencies
Pewtro Feb 3, 2026
104508b
[Classic] Add integration tests for classic
Pewtro Feb 3, 2026
e56b7b2
[WoW] Initial addition of integration tests for retail
Pewtro Feb 3, 2026
ed263a9
[Client] Remove the axios compatability layer
Pewtro Feb 3, 2026
108c673
Update zod tests for classic-wow
Pewtro Feb 3, 2026
5915d6f
[Zod] Make zod objects strict to catch more errors
Pewtro Feb 3, 2026
21b7efd
Update classic wow types based on zod tests
Pewtro Feb 3, 2026
ad98127
Initial work on creating zod integration tests for retail and update …
Pewtro Feb 3, 2026
c630af0
Update title and toy types and test
Pewtro Feb 3, 2026
06b75d9
[WoW/Core] Introduce new types for search results for various WoW APIs
Pewtro Feb 3, 2026
f240182
Fix a series of wow retail types and tests
Pewtro Feb 3, 2026
1323223
Fix type issue in azerite essence test
Pewtro Feb 3, 2026
c7ffea9
[Chore] Update dependencies to fix vulnerability
Pewtro Feb 3, 2026
b3f932e
Speed up tests and fix modified crafting types
Pewtro Feb 4, 2026
42b18ab
Fix up types for media-search and journal requests
Pewtro Feb 4, 2026
6473936
Fix more retail wow responses
Pewtro Feb 4, 2026
7734fe9
Finish wow retail type updates
Pewtro Feb 4, 2026
fe65fcb
Added more retail wow integration tests and update types
Pewtro Feb 4, 2026
c5fe966
Update integration tests for classic wow and retail wow, and update m…
Pewtro Feb 5, 2026
b1d4570
increease playable-specialization test timeout
Pewtro Feb 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
"ignore": ["@blizzard-api/integration-tests"]
}
5 changes: 5 additions & 0 deletions .changeset/fifty-mammals-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@blizzard-api/d3': patch
---

Fix an issue when calling D3 profile APIs where the battletag wasn't encoded properly
5 changes: 5 additions & 0 deletions .changeset/funny-snakes-see.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@blizzard-api/client': patch
---

Update ky to 1.14.3
7 changes: 7 additions & 0 deletions .changeset/metal-zebras-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@blizzard-api/classic-wow': minor
'@blizzard-api/core': minor
'@blizzard-api/wow': minor
---

Introduce new types for search results for various WoW APIs
5 changes: 5 additions & 0 deletions .changeset/moody-mirrors-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@blizzard-api/client': patch
---

Update ky to 1.14.2
7 changes: 7 additions & 0 deletions .changeset/new-pens-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@blizzard-api/classic-wow': major
'@blizzard-api/core': major
'@blizzard-api/wow': major
---

Many types have had keys added, removed, made nullable or otherwise edited to better reflect the possible return values of the API. This update is the largest pass of all the response types since the library was first published.
11 changes: 11 additions & 0 deletions .changeset/old-eggs-clap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'@blizzard-api/classic-wow': major
'@blizzard-api/client': major
'@blizzard-api/core': major
'@blizzard-api/sc2': major
'@blizzard-api/wow': major
'@blizzard-api/d3': major
'@blizzard-api/hs': major
---

Update minimum node version to ^20.19.0 || ^22.13.0 || >=24
5 changes: 5 additions & 0 deletions .changeset/petite-walls-clean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@blizzard-api/client': patch
---

Update ky to 1.14.1
5 changes: 5 additions & 0 deletions .changeset/twelve-planes-grin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@blizzard-api/client': major
---

Remove the axios compatability layer that resulted in response existing both directly in the response and in the data. If you face errors after this you likely just need to remove accessing data.
9 changes: 9 additions & 0 deletions .changeset/violet-bats-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@blizzard-api/classic-wow': major
'@blizzard-api/sc2': major
'@blizzard-api/wow': major
'@blizzard-api/d3': major
'@blizzard-api/hs': major
---

Moved a series of base parameters and generic types/interfaces into @blizzard-api/core to better share types between packages. If you can't access a type or interface anymore, it should now be available in @blizzard-api/core.
5 changes: 5 additions & 0 deletions .changeset/witty-bears-return.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@blizzard-api/core': minor
---

Add a series of base parameters that can be used when dealing with Blizzard API. These are used throughout the game packages.
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: CI
permissions:
contents: write
id-token: write
pull-requests: write

on:
Expand Down Expand Up @@ -31,7 +32,7 @@ jobs:

- uses: pnpm/action-setup@f2b2b233b538f500472c7274c7012f57857d8ce0 # https://github.com/pnpm/action-setup/commit/f2b2b233b538f500472c7274c7012f57857d8ce0
with:
version: 10.24.0
version: 10.28.0

- name: Cache turbo build setup
uses: actions/cache@v4
Expand Down Expand Up @@ -72,4 +73,5 @@ jobs:
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
uses: actions/configure-pages@v5
- uses: pnpm/action-setup@f2b2b233b538f500472c7274c7012f57857d8ce0 # https://github.com/pnpm/action-setup/commit/f2b2b233b538f500472c7274c7012f57857d8ce0
with:
version: 10.24.0
version: 10.28.0
- name: Setup Node.js 22.x
uses: actions/setup-node@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"recommendations": ["dbaeumer.vscode-eslint", "prettier.prettier-vscode", "yoavbls.pretty-ts-errors"]
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode", "yoavbls.pretty-ts-errors"]
}
4 changes: 2 additions & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { configs as putstackConfigs } from '@putstack/eslint-config-typescript';
import jsdocEslint from 'eslint-plugin-jsdoc';
import tseslint from 'typescript-eslint';
import { defineConfig } from 'eslint/config';

export default tseslint.config(
export default defineConfig(
{
ignores: ['**/coverage/**', '**/dist/**', '**/node_modules/**', '**/build/**', '**/docs/**', '!.prettierrc.js'],
},
Expand Down
25 changes: 25 additions & 0 deletions generated/schemas/classic-wow/auction-house.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Generated by ts-to-zod
import { z } from 'zod';
import { hrefSchema, nameIdKeySchema, nameIdSchema, responseBaseSchema } from '../core';

export const auctionHouseIndexResponseSchema = responseBaseSchema.extend({
auctions: z.array(nameIdKeySchema),
});

const auctionSchema = z.strictObject({
bid: z.number(),
buyout: z.number(),
id: z.number(),
item: z.strictObject({
id: z.number(),
rand: z.number().optional(),
seed: z.number().optional(),
}),
quantity: z.number(),
time_left: z.union([z.literal('LONG'), z.literal('MEDIUM'), z.literal('SHORT'), z.literal('VERY_LONG')]),
});

export const auctionsResponseSchema = nameIdSchema.extend(responseBaseSchema.shape).extend({
auctions: z.array(auctionSchema),
connected_realm: hrefSchema,
});
83 changes: 83 additions & 0 deletions generated/schemas/classic-wow/character-achievements.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
// Generated by ts-to-zod
import { z } from 'zod';
import { characterSchema, nameIdKeySchema, responseBaseSchema } from '../core';

const categoryProgressSchema = z.strictObject({
category: nameIdKeySchema,
points: z.number(),
quantity: z.number(),
});

const recentEventSchema = z.strictObject({
achievement: nameIdKeySchema,
timestamp: z.number(),
});

const statisticSchema = z.strictObject({
description: z.string().optional().nullable(),
id: z.number(),
last_updated_timestamp: z.number(),
name: z.string(),
quantity: z.number(),
});

const subCategorySchema = z.strictObject({
id: z.number(),
name: z.string(),
statistics: z.array(statisticSchema),
});

const childCriterum3Schema = z.strictObject({
amount: z.number().optional(),
id: z.number(),
is_completed: z.boolean(),
});

const categorySchema = z.strictObject({
id: z.number(),
name: z.string(),
statistics: z.array(statisticSchema).optional(),
sub_categories: z.array(subCategorySchema).optional(),
});

const childCriterum2Schema = z.strictObject({
amount: z.number().optional(),
child_criteria: z.array(childCriterum3Schema).optional(),
id: z.number(),
is_completed: z.boolean(),
});

const childCriterumSchema = z.strictObject({
amount: z.number().optional(),
child_criteria: z.array(childCriterum2Schema).optional(),
id: z.number(),
is_completed: z.boolean(),
});

export const characterAchievementStatisticsResponseSchema = responseBaseSchema.extend({
categories: z.array(categorySchema),
character: characterSchema,
});

const criteriaSchema = z.strictObject({
amount: z.number().optional(),
child_criteria: z.array(childCriterumSchema).optional(),
id: z.number(),
is_completed: z.boolean(),
});

const achievementSchema = z.strictObject({
achievement: nameIdKeySchema,
completed_timestamp: z.number().optional(),
criteria: criteriaSchema.optional(),
id: z.number(),
});

export const characterAchievementsSummaryResponseSchema = responseBaseSchema.extend({
achievements: z.array(achievementSchema),
category_progress: z.array(categoryProgressSchema),
character: characterSchema,
recent_events: z.array(recentEventSchema),
total_points: z.number(),
total_quantity: z.number(),
});
Loading
Loading