@skyblock-finance/actions 0.4.0 → 0.5.0

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/source/data.ts CHANGED
@@ -5,6 +5,7 @@ import { actions as _gems } from '../data/gems.json'
5
5
  import { actions as _northStars } from '../data/north-stars.json'
6
6
  import { actions as _northStarsCrafts } from '../data/north-stars-crafts.json'
7
7
  import { actions as _pests } from '../data/pests.json'
8
+ import { actions as _skymart } from '../data/skymart.json'
8
9
  import { actions as _wood } from '../data/wood.json'
9
10
  import { Action } from './types'
10
11
 
@@ -19,6 +20,8 @@ export const northStarsCrafts = _northStarsCrafts as Action[]
19
20
 
20
21
  export const pests = _pests as Action[]
21
22
 
23
+ export const skymart = _skymart as Action[]
24
+
22
25
  export const wood = _wood as Action[]
23
26
 
24
27
  export const allActions = [
@@ -29,5 +32,6 @@ export const allActions = [
29
32
  ...northStars,
30
33
  ...northStarsCrafts,
31
34
  ...pests,
35
+ ...skymart,
32
36
  ...wood,
33
37
  ]
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().finite(),
5
+ amount: z.number(),
6
6
  id: z.string(),
7
7
  type: z.literal('item'),
8
8
  })
@@ -10,8 +10,17 @@ export const actionIoItemSchema = z
10
10
 
11
11
  export const actionIoCurrencySchema = z
12
12
  .object({
13
- amount: z.number().finite(),
14
- id: z.enum(['bit', 'coin', 'gem', 'north-star', 'pest', 'second', 'usd']),
13
+ amount: z.number(),
14
+ id: z.enum([
15
+ 'bit',
16
+ 'coin',
17
+ 'copper',
18
+ 'gem',
19
+ 'north-star',
20
+ 'pest',
21
+ 'second',
22
+ 'usd',
23
+ ]),
15
24
  type: z.literal('currency'),
16
25
  })
17
26
  .strict()
@@ -38,7 +47,7 @@ export const actionPlaceSchema = z.discriminatedUnion('type', [
38
47
  z
39
48
  .object({
40
49
  type: z.literal('website'),
41
- url: z.string().url(),
50
+ url: z.url(),
42
51
  })
43
52
  .strict(),
44
53
  z
@@ -56,3 +65,10 @@ export const actionSchema = z
56
65
  place: z.array(actionPlaceSchema),
57
66
  })
58
67
  .strict()
68
+
69
+ export const actionDefinitionSchema = z
70
+ .object({
71
+ actions: z.array(actionSchema),
72
+ $schema: z.string().optional(),
73
+ })
74
+ .strict()
package/source/types.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { z } from 'zod'
1
+ import { z } from 'zod/v4'
2
2
  import {
3
3
  actionIoCurrencySchema,
4
4
  actionIoItemSchema,