@skyblock-finance/actions 0.3.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/$schema.json +160 -83
- package/data/bits.json +12 -0
- package/data/gems.json +10 -10
- package/dist/.tsbuildinfo +1 -1
- package/dist/data.d.ts +9 -9
- package/dist/schema.d.ts +132 -337
- package/dist/schema.js +33 -27
- package/dist/types.d.ts +1 -1
- package/package.json +5 -4
- package/source/data.test.ts +1 -1
- package/source/schema.ts +11 -4
- package/source/types.ts +1 -1
package/source/schema.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { z } from 'zod'
|
|
1
|
+
import { z } from 'zod/v4'
|
|
2
2
|
|
|
3
3
|
export const actionIoItemSchema = z
|
|
4
4
|
.object({
|
|
5
|
-
amount: z.number()
|
|
5
|
+
amount: z.number(),
|
|
6
6
|
id: z.string(),
|
|
7
7
|
type: z.literal('item'),
|
|
8
8
|
})
|
|
@@ -10,7 +10,7 @@ export const actionIoItemSchema = z
|
|
|
10
10
|
|
|
11
11
|
export const actionIoCurrencySchema = z
|
|
12
12
|
.object({
|
|
13
|
-
amount: z.number()
|
|
13
|
+
amount: z.number(),
|
|
14
14
|
id: z.enum(['bit', 'coin', 'gem', 'north-star', 'pest', 'second', 'usd']),
|
|
15
15
|
type: z.literal('currency'),
|
|
16
16
|
})
|
|
@@ -38,7 +38,7 @@ export const actionPlaceSchema = z.discriminatedUnion('type', [
|
|
|
38
38
|
z
|
|
39
39
|
.object({
|
|
40
40
|
type: z.literal('website'),
|
|
41
|
-
url: z.
|
|
41
|
+
url: z.url(),
|
|
42
42
|
})
|
|
43
43
|
.strict(),
|
|
44
44
|
z
|
|
@@ -56,3 +56,10 @@ export const actionSchema = z
|
|
|
56
56
|
place: z.array(actionPlaceSchema),
|
|
57
57
|
})
|
|
58
58
|
.strict()
|
|
59
|
+
|
|
60
|
+
export const actionDefinitionSchema = z
|
|
61
|
+
.object({
|
|
62
|
+
actions: z.array(actionSchema),
|
|
63
|
+
$schema: z.string().optional(),
|
|
64
|
+
})
|
|
65
|
+
.strict()
|
package/source/types.ts
CHANGED