@teardown/schemas 2.0.85 → 2.0.87

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teardown/schemas",
3
- "version": "2.0.85",
3
+ "version": "2.0.87",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -91,18 +91,19 @@
91
91
  },
92
92
  "scripts": {
93
93
  "dev": "bun run typecheck --watch",
94
- "typecheck": "bun x tsgo --noEmit --project ./tsconfig.json",
94
+ "typecheck": "bunx tsgo --noEmit --project ./tsconfig.json",
95
95
  "lint": "bun x biome lint .",
96
96
  "fmt": "bun x biome format --write .",
97
97
  "check": "bun x biome check ."
98
98
  },
99
99
  "dependencies": {
100
100
  "@sinclair/typebox": "^0.34.41",
101
- "@teardown/types": "2.0.85"
101
+ "@teardown/types": "2.0.87"
102
102
  },
103
103
  "devDependencies": {
104
+ "@typescript/native-preview": "^7.0.0-dev.20260203.1",
104
105
  "@biomejs/biome": "2.3.11",
105
- "@teardown/tsconfig": "2.0.85",
106
+ "@teardown/tsconfig": "2.0.87",
106
107
  "typescript": "5.9.3"
107
108
  },
108
109
  "peerDependencies": {
@@ -174,6 +174,22 @@ export const ProjectErrorSchema = Type.Union([
174
174
  code: Type.Literal("RATE_LIMITED"),
175
175
  message: Type.String(),
176
176
  }),
177
+ Type.Object({
178
+ code: Type.Literal("ENVIRONMENT_NOT_FOUND"),
179
+ message: Type.String(),
180
+ }),
181
+ Type.Object({
182
+ code: Type.Literal("CANNOT_EDIT_REQUIRED_ENVIRONMENT"),
183
+ message: Type.String(),
184
+ }),
185
+ Type.Object({
186
+ code: Type.Literal("CANNOT_DELETE_DEVELOPMENT"),
187
+ message: Type.String(),
188
+ }),
189
+ Type.Object({
190
+ code: Type.Literal("CANNOT_DELETE_PRODUCTION"),
191
+ message: Type.String(),
192
+ }),
177
193
  ]);
178
194
  export type ProjectError = Static<typeof ProjectErrorSchema>;
179
195
 
@@ -28,7 +28,7 @@ export const SessionSchema = Type.Object({
28
28
  export type Session = Static<typeof SessionSchema>;
29
29
 
30
30
  /**
31
- * Session with device info for joined queries
31
+ * Session with device and user info for joined queries
32
32
  */
33
33
  export const SessionWithDeviceSchema = Type.Composite([
34
34
  SessionSchema,
@@ -40,6 +40,14 @@ export const SessionWithDeviceSchema = Type.Composite([
40
40
  platform: Type.Union([Type.String(), Type.Null()]),
41
41
  })
42
42
  ),
43
+ user: Type.Optional(
44
+ Type.Object({
45
+ id: Type.String({ format: "uuid" }),
46
+ user_id: Type.Union([Type.String(), Type.Null()]),
47
+ email: Type.Union([Type.String(), Type.Null()]),
48
+ name: Type.Union([Type.String(), Type.Null()]),
49
+ })
50
+ ),
43
51
  }),
44
52
  ]);
45
53
  export type SessionWithDevice = Static<typeof SessionWithDeviceSchema>;