@fiction/types 1.0.5 → 1.0.6

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.
@@ -0,0 +1,4 @@
1
+ interface Window {
2
+ rewardful?: (action: string, data: { email: string }) => void
3
+ dataLayer?: any[]
4
+ }
package/dist/hono.d.ts ADDED
@@ -0,0 +1,25 @@
1
+ // Hono type extensions for the application
2
+ /// <reference types="hono" />
3
+
4
+ // Extend Hono context with our custom variables
5
+ // Re-export Context type for convenience (using import type keeps this as global script)
6
+ import type { Context } from 'hono'
7
+
8
+ declare module 'hono' {
9
+ interface ContextVariableMap {
10
+ // Authentication context
11
+ userId: string
12
+ user?: {
13
+ id: string
14
+ email: string
15
+ }
16
+ jwtPayload?: {
17
+ userId: string
18
+ email: string
19
+ exp: number
20
+ }
21
+ // Validation context (from our enhanced validator)
22
+ validatedData?: any
23
+ }
24
+ }
25
+ export type AppContext = Context
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiction/types",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Shared TypeScript types and Zod schemas for Fiction monorepo",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -10,6 +10,22 @@
10
10
  ".": {
11
11
  "import": "./dist/index.js",
12
12
  "types": "./dist/index.d.ts"
13
+ },
14
+ "./hono": {
15
+ "types": "./dist/hono.d.ts"
16
+ },
17
+ "./global": {
18
+ "types": "./dist/global.d.ts"
19
+ }
20
+ },
21
+ "typesVersions": {
22
+ "*": {
23
+ "hono": [
24
+ "./dist/hono.d.ts"
25
+ ],
26
+ "global": [
27
+ "./dist/global.d.ts"
28
+ ]
13
29
  }
14
30
  },
15
31
  "files": [
@@ -31,13 +47,13 @@
31
47
  "registry": "https://registry.npmjs.org/"
32
48
  },
33
49
  "dependencies": {
34
- "zod": "^4.1.11"
50
+ "zod": "^4.1.12"
35
51
  },
36
52
  "devDependencies": {
37
53
  "typescript": "^5.9.3"
38
54
  },
39
55
  "scripts": {
40
- "build": "tsc",
56
+ "build": "tsc && cp src/*.d.ts dist/",
41
57
  "dev": "tsc --watch",
42
58
  "typecheck": "tsc --noEmit"
43
59
  }