Currency, storefronts, purchasing (#12)

And a few other minor things, but primarily, the balance table exists and also consumable/inventory table.
This commit is contained in:
devin
2026-07-15 14:10:49 -04:00
committed by GitHub
parent 8314e54439
commit c33919bc67
29 changed files with 2204 additions and 524 deletions
@@ -17,4 +17,19 @@ describe('commerce endpoints', () => {
expect(res.status).toBe(200)
expect(await res.json()).toBe(false)
})
it('GET /api/catalog/v1/all serves the SKU catalog', async () => {
const res = await SELF.fetch(`${ORIGIN}/api/catalog/v1/all?onlyAvailableSkus=true`)
expect(res.status).toBe(200)
const skus = (await res.json()) as Array<{ skuId: number }>
expect(Array.isArray(skus)).toBe(true)
expect(skus.length).toBeGreaterThan(0)
expect(skus[0]).toHaveProperty('skuId')
})
it('GET /purchasecampaign/allcurrent/v2 returns []', async () => {
const res = await SELF.fetch(`${ORIGIN}/purchasecampaign/allcurrent/v2`)
expect(res.status).toBe(200)
expect(await res.json()).toEqual([])
})
})