@kuckit/api 1.0.0 → 1.0.2
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/dist/context.d.ts +1 -21
- package/dist/context.d.ts.map +1 -1
- package/dist/index.d.ts +9 -189
- package/dist/index.d.ts.map +1 -1
- package/dist/routers/index.d.ts +16 -272
- package/dist/routers/index.d.ts.map +1 -1
- package/dist/routers/profile.d.ts +7 -107
- package/dist/routers/profile.d.ts.map +1 -1
- package/package.json +22 -35
- package/src/index.ts +0 -19
package/dist/context.d.ts
CHANGED
|
@@ -17,27 +17,7 @@ interface CreateContextOptions {
|
|
|
17
17
|
* Injects logger with requestId for structured tracing
|
|
18
18
|
*/
|
|
19
19
|
declare function createContext(opts: CreateContextOptions): Promise<{
|
|
20
|
-
session:
|
|
21
|
-
session: {
|
|
22
|
-
id: string;
|
|
23
|
-
createdAt: Date;
|
|
24
|
-
updatedAt: Date;
|
|
25
|
-
userId: string;
|
|
26
|
-
expiresAt: Date;
|
|
27
|
-
token: string;
|
|
28
|
-
ipAddress?: string | null | undefined | undefined;
|
|
29
|
-
userAgent?: string | null | undefined | undefined;
|
|
30
|
-
};
|
|
31
|
-
user: {
|
|
32
|
-
id: string;
|
|
33
|
-
createdAt: Date;
|
|
34
|
-
updatedAt: Date;
|
|
35
|
-
email: string;
|
|
36
|
-
emailVerified: boolean;
|
|
37
|
-
name: string;
|
|
38
|
-
image?: string | null | undefined | undefined;
|
|
39
|
-
};
|
|
40
|
-
} | null;
|
|
20
|
+
session: any;
|
|
41
21
|
di: AwilixContainer<any>;
|
|
42
22
|
}>;
|
|
43
23
|
type Context = Awaited<ReturnType<typeof createContext>>;
|
package/dist/context.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","names":[],"sources":["../src/context.ts"],"sourcesContent":[],"mappings":";;;;;;IAGsD,UAAA,OAAA,CAAA;MAAA,KAAA,CAAA,EAM3C,eAN2C;IAM3C;EAAe;;AAKT,UAAA,oBAAA,CACX;EAOgB,GAAA,EAPhB,OAOgB
|
|
1
|
+
{"version":3,"file":"context.d.ts","names":[],"sources":["../src/context.ts"],"sourcesContent":[],"mappings":";;;;;;IAGsD,UAAA,OAAA,CAAA;MAAA,KAAA,CAAA,EAM3C,eAN2C;IAM3C;EAAe;;AAKT,UAAA,oBAAA,CACX;EAOgB,GAAA,EAPhB,OAOgB;;;;;AA8CtB;AAAgD,iBA9C1B,aAAA,CA8C0B,IAAA,EA9CN,oBA8CM,CAAA,EA9Cc,OA8Cd,CAAA;EAAlB,OAAA,EAAA,GAAA;EAAR,EAAA,iBAAA,CAAA,GAAA,CAAA;CAAO,CAAA;KAAjB,OAAA,GAAU,QAAQ,kBAAkB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,213 +3,33 @@ import * as _orpc_server0 from "@orpc/server";
|
|
|
3
3
|
|
|
4
4
|
//#region src/index.d.ts
|
|
5
5
|
declare const o: _orpc_server0.Builder<{
|
|
6
|
-
session:
|
|
7
|
-
session: {
|
|
8
|
-
id: string;
|
|
9
|
-
createdAt: Date;
|
|
10
|
-
updatedAt: Date;
|
|
11
|
-
userId: string;
|
|
12
|
-
expiresAt: Date;
|
|
13
|
-
token: string;
|
|
14
|
-
ipAddress?: string | null | undefined | undefined;
|
|
15
|
-
userAgent?: string | null | undefined | undefined;
|
|
16
|
-
};
|
|
17
|
-
user: {
|
|
18
|
-
id: string;
|
|
19
|
-
createdAt: Date;
|
|
20
|
-
updatedAt: Date;
|
|
21
|
-
email: string;
|
|
22
|
-
emailVerified: boolean;
|
|
23
|
-
name: string;
|
|
24
|
-
image?: string | null | undefined | undefined;
|
|
25
|
-
};
|
|
26
|
-
} | null;
|
|
6
|
+
session: any;
|
|
27
7
|
di: awilix0.AwilixContainer<any>;
|
|
28
8
|
} & Record<never, never>, {
|
|
29
|
-
session:
|
|
30
|
-
session: {
|
|
31
|
-
id: string;
|
|
32
|
-
createdAt: Date;
|
|
33
|
-
updatedAt: Date;
|
|
34
|
-
userId: string;
|
|
35
|
-
expiresAt: Date;
|
|
36
|
-
token: string;
|
|
37
|
-
ipAddress?: string | null | undefined | undefined;
|
|
38
|
-
userAgent?: string | null | undefined | undefined;
|
|
39
|
-
};
|
|
40
|
-
user: {
|
|
41
|
-
id: string;
|
|
42
|
-
createdAt: Date;
|
|
43
|
-
updatedAt: Date;
|
|
44
|
-
email: string;
|
|
45
|
-
emailVerified: boolean;
|
|
46
|
-
name: string;
|
|
47
|
-
image?: string | null | undefined | undefined;
|
|
48
|
-
};
|
|
49
|
-
} | null;
|
|
9
|
+
session: any;
|
|
50
10
|
di: awilix0.AwilixContainer<any>;
|
|
51
11
|
}, _orpc_server0.Schema<unknown, unknown>, _orpc_server0.Schema<unknown, unknown>, Record<never, never>, Record<never, never>>;
|
|
52
12
|
declare const publicProcedure: _orpc_server0.Builder<{
|
|
53
|
-
session:
|
|
54
|
-
session: {
|
|
55
|
-
id: string;
|
|
56
|
-
createdAt: Date;
|
|
57
|
-
updatedAt: Date;
|
|
58
|
-
userId: string;
|
|
59
|
-
expiresAt: Date;
|
|
60
|
-
token: string;
|
|
61
|
-
ipAddress?: string | null | undefined | undefined;
|
|
62
|
-
userAgent?: string | null | undefined | undefined;
|
|
63
|
-
};
|
|
64
|
-
user: {
|
|
65
|
-
id: string;
|
|
66
|
-
createdAt: Date;
|
|
67
|
-
updatedAt: Date;
|
|
68
|
-
email: string;
|
|
69
|
-
emailVerified: boolean;
|
|
70
|
-
name: string;
|
|
71
|
-
image?: string | null | undefined | undefined;
|
|
72
|
-
};
|
|
73
|
-
} | null;
|
|
13
|
+
session: any;
|
|
74
14
|
di: awilix0.AwilixContainer<any>;
|
|
75
15
|
} & Record<never, never>, {
|
|
76
|
-
session:
|
|
77
|
-
session: {
|
|
78
|
-
id: string;
|
|
79
|
-
createdAt: Date;
|
|
80
|
-
updatedAt: Date;
|
|
81
|
-
userId: string;
|
|
82
|
-
expiresAt: Date;
|
|
83
|
-
token: string;
|
|
84
|
-
ipAddress?: string | null | undefined | undefined;
|
|
85
|
-
userAgent?: string | null | undefined | undefined;
|
|
86
|
-
};
|
|
87
|
-
user: {
|
|
88
|
-
id: string;
|
|
89
|
-
createdAt: Date;
|
|
90
|
-
updatedAt: Date;
|
|
91
|
-
email: string;
|
|
92
|
-
emailVerified: boolean;
|
|
93
|
-
name: string;
|
|
94
|
-
image?: string | null | undefined | undefined;
|
|
95
|
-
};
|
|
96
|
-
} | null;
|
|
16
|
+
session: any;
|
|
97
17
|
di: awilix0.AwilixContainer<any>;
|
|
98
18
|
}, _orpc_server0.Schema<unknown, unknown>, _orpc_server0.Schema<unknown, unknown>, Record<never, never>, Record<never, never>>;
|
|
99
19
|
declare const protectedProcedure: _orpc_server0.BuilderWithMiddlewares<_orpc_server0.MergedInitialContext<{
|
|
100
|
-
session:
|
|
101
|
-
session: {
|
|
102
|
-
id: string;
|
|
103
|
-
createdAt: Date;
|
|
104
|
-
updatedAt: Date;
|
|
105
|
-
userId: string;
|
|
106
|
-
expiresAt: Date;
|
|
107
|
-
token: string;
|
|
108
|
-
ipAddress?: string | null | undefined | undefined;
|
|
109
|
-
userAgent?: string | null | undefined | undefined;
|
|
110
|
-
};
|
|
111
|
-
user: {
|
|
112
|
-
id: string;
|
|
113
|
-
createdAt: Date;
|
|
114
|
-
updatedAt: Date;
|
|
115
|
-
email: string;
|
|
116
|
-
emailVerified: boolean;
|
|
117
|
-
name: string;
|
|
118
|
-
image?: string | null | undefined | undefined;
|
|
119
|
-
};
|
|
120
|
-
} | null;
|
|
20
|
+
session: any;
|
|
121
21
|
di: awilix0.AwilixContainer<any>;
|
|
122
22
|
} & Record<never, never>, {
|
|
123
|
-
session:
|
|
124
|
-
session: {
|
|
125
|
-
id: string;
|
|
126
|
-
createdAt: Date;
|
|
127
|
-
updatedAt: Date;
|
|
128
|
-
userId: string;
|
|
129
|
-
expiresAt: Date;
|
|
130
|
-
token: string;
|
|
131
|
-
ipAddress?: string | null | undefined | undefined;
|
|
132
|
-
userAgent?: string | null | undefined | undefined;
|
|
133
|
-
};
|
|
134
|
-
user: {
|
|
135
|
-
id: string;
|
|
136
|
-
createdAt: Date;
|
|
137
|
-
updatedAt: Date;
|
|
138
|
-
email: string;
|
|
139
|
-
emailVerified: boolean;
|
|
140
|
-
name: string;
|
|
141
|
-
image?: string | null | undefined | undefined;
|
|
142
|
-
};
|
|
143
|
-
} | null;
|
|
23
|
+
session: any;
|
|
144
24
|
di: awilix0.AwilixContainer<any>;
|
|
145
25
|
} & Record<never, never>, {
|
|
146
|
-
session:
|
|
147
|
-
session: {
|
|
148
|
-
id: string;
|
|
149
|
-
createdAt: Date;
|
|
150
|
-
updatedAt: Date;
|
|
151
|
-
userId: string;
|
|
152
|
-
expiresAt: Date;
|
|
153
|
-
token: string;
|
|
154
|
-
ipAddress?: string | null | undefined | undefined;
|
|
155
|
-
userAgent?: string | null | undefined | undefined;
|
|
156
|
-
};
|
|
157
|
-
user: {
|
|
158
|
-
id: string;
|
|
159
|
-
createdAt: Date;
|
|
160
|
-
updatedAt: Date;
|
|
161
|
-
email: string;
|
|
162
|
-
emailVerified: boolean;
|
|
163
|
-
name: string;
|
|
164
|
-
image?: string | null | undefined | undefined;
|
|
165
|
-
};
|
|
166
|
-
} | null;
|
|
26
|
+
session: any;
|
|
167
27
|
di: awilix0.AwilixContainer<any>;
|
|
168
28
|
}>, _orpc_server0.MergedCurrentContext<{
|
|
169
|
-
session:
|
|
170
|
-
session: {
|
|
171
|
-
id: string;
|
|
172
|
-
createdAt: Date;
|
|
173
|
-
updatedAt: Date;
|
|
174
|
-
userId: string;
|
|
175
|
-
expiresAt: Date;
|
|
176
|
-
token: string;
|
|
177
|
-
ipAddress?: string | null | undefined | undefined;
|
|
178
|
-
userAgent?: string | null | undefined | undefined;
|
|
179
|
-
};
|
|
180
|
-
user: {
|
|
181
|
-
id: string;
|
|
182
|
-
createdAt: Date;
|
|
183
|
-
updatedAt: Date;
|
|
184
|
-
email: string;
|
|
185
|
-
emailVerified: boolean;
|
|
186
|
-
name: string;
|
|
187
|
-
image?: string | null | undefined | undefined;
|
|
188
|
-
};
|
|
189
|
-
} | null;
|
|
29
|
+
session: any;
|
|
190
30
|
di: awilix0.AwilixContainer<any>;
|
|
191
31
|
}, {
|
|
192
|
-
session:
|
|
193
|
-
session: {
|
|
194
|
-
id: string;
|
|
195
|
-
createdAt: Date;
|
|
196
|
-
updatedAt: Date;
|
|
197
|
-
userId: string;
|
|
198
|
-
expiresAt: Date;
|
|
199
|
-
token: string;
|
|
200
|
-
ipAddress?: string | null | undefined | undefined;
|
|
201
|
-
userAgent?: string | null | undefined | undefined;
|
|
202
|
-
};
|
|
203
|
-
user: {
|
|
204
|
-
id: string;
|
|
205
|
-
createdAt: Date;
|
|
206
|
-
updatedAt: Date;
|
|
207
|
-
email: string;
|
|
208
|
-
emailVerified: boolean;
|
|
209
|
-
name: string;
|
|
210
|
-
image?: string | null | undefined | undefined;
|
|
211
|
-
};
|
|
212
|
-
};
|
|
32
|
+
session: any;
|
|
213
33
|
}>, _orpc_server0.Schema<unknown, unknown>, _orpc_server0.Schema<unknown, unknown>, Record<never, never>, Record<never, never>>;
|
|
214
34
|
//#endregion
|
|
215
35
|
export { o, protectedProcedure, publicProcedure };
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;cAGa,iBAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;cAGa,iBAAC;;MAAyB,OAAA,CAAA;;EAA1B,OAA0B,EAAA,GAAA;EAAA,EAAA,yBAAA,CAAA,GAAA,CAAA;;cAE1B,+BAAe;;MAAI,OAAA,CAAA;;;6BAFlB,CAAA,GAAA,CAAA;CAAA,sBAAA,CAAA,OAAA,EAAA,OAAA,CAAA,sBAAA,CAAA,OAAA,EAAA,OAAA,CAAA,QAAA,CAAA,KAAA,EAAA,KAAA,CAAA,QAAA,CAAA,KAAA,EAAA,KAAA,CAAA,CAAA;AAED,cAaA,kBAbmB,gBAaD,sBAbC,eAaD,oBAbC,CAAA;EAAA,OAAA,EAAA,GAAA;MAakC,OAAA,CAAA;;;;;;6BAbtC,CAAA,GAAA,CAAA;CAAA,CAAA,oCAAA,CAAA;EAaf,OAAA,EAAA,GAAA;EAAqD,EAAA,EAAnC,OAAA,CAAA,eAAmC,CAAA,GAAA,CAAA"}
|
package/dist/routers/index.d.ts
CHANGED
|
@@ -2,309 +2,53 @@ import * as awilix7 from "awilix";
|
|
|
2
2
|
import * as _orpc_server10 from "@orpc/server";
|
|
3
3
|
import { RouterClient } from "@orpc/server";
|
|
4
4
|
import * as zod0 from "zod";
|
|
5
|
-
import * as
|
|
5
|
+
import * as zod_v4_core0 from "zod/v4/core";
|
|
6
6
|
|
|
7
7
|
//#region src/routers/index.d.ts
|
|
8
8
|
declare const appRouter: {
|
|
9
9
|
healthCheck: _orpc_server10.DecoratedProcedure<{
|
|
10
|
-
session:
|
|
11
|
-
session: {
|
|
12
|
-
id: string;
|
|
13
|
-
createdAt: Date;
|
|
14
|
-
updatedAt: Date;
|
|
15
|
-
userId: string;
|
|
16
|
-
expiresAt: Date;
|
|
17
|
-
token: string;
|
|
18
|
-
ipAddress?: string | null | undefined | undefined;
|
|
19
|
-
userAgent?: string | null | undefined | undefined;
|
|
20
|
-
};
|
|
21
|
-
user: {
|
|
22
|
-
id: string;
|
|
23
|
-
createdAt: Date;
|
|
24
|
-
updatedAt: Date;
|
|
25
|
-
email: string;
|
|
26
|
-
emailVerified: boolean;
|
|
27
|
-
name: string;
|
|
28
|
-
image?: string | null | undefined | undefined;
|
|
29
|
-
};
|
|
30
|
-
} | null;
|
|
10
|
+
session: any;
|
|
31
11
|
di: awilix7.AwilixContainer<any>;
|
|
32
12
|
} & Record<never, never>, {
|
|
33
|
-
session:
|
|
34
|
-
session: {
|
|
35
|
-
id: string;
|
|
36
|
-
createdAt: Date;
|
|
37
|
-
updatedAt: Date;
|
|
38
|
-
userId: string;
|
|
39
|
-
expiresAt: Date;
|
|
40
|
-
token: string;
|
|
41
|
-
ipAddress?: string | null | undefined | undefined;
|
|
42
|
-
userAgent?: string | null | undefined | undefined;
|
|
43
|
-
};
|
|
44
|
-
user: {
|
|
45
|
-
id: string;
|
|
46
|
-
createdAt: Date;
|
|
47
|
-
updatedAt: Date;
|
|
48
|
-
email: string;
|
|
49
|
-
emailVerified: boolean;
|
|
50
|
-
name: string;
|
|
51
|
-
image?: string | null | undefined | undefined;
|
|
52
|
-
};
|
|
53
|
-
} | null;
|
|
13
|
+
session: any;
|
|
54
14
|
di: awilix7.AwilixContainer<any>;
|
|
55
15
|
}, _orpc_server10.Schema<unknown, unknown>, _orpc_server10.Schema<string, string>, Record<never, never>, Record<never, never>>;
|
|
56
16
|
privateData: _orpc_server10.DecoratedProcedure<_orpc_server10.MergedInitialContext<{
|
|
57
|
-
session:
|
|
58
|
-
session: {
|
|
59
|
-
id: string;
|
|
60
|
-
createdAt: Date;
|
|
61
|
-
updatedAt: Date;
|
|
62
|
-
userId: string;
|
|
63
|
-
expiresAt: Date;
|
|
64
|
-
token: string;
|
|
65
|
-
ipAddress?: string | null | undefined | undefined;
|
|
66
|
-
userAgent?: string | null | undefined | undefined;
|
|
67
|
-
};
|
|
68
|
-
user: {
|
|
69
|
-
id: string;
|
|
70
|
-
createdAt: Date;
|
|
71
|
-
updatedAt: Date;
|
|
72
|
-
email: string;
|
|
73
|
-
emailVerified: boolean;
|
|
74
|
-
name: string;
|
|
75
|
-
image?: string | null | undefined | undefined;
|
|
76
|
-
};
|
|
77
|
-
} | null;
|
|
17
|
+
session: any;
|
|
78
18
|
di: awilix7.AwilixContainer<any>;
|
|
79
19
|
} & Record<never, never>, {
|
|
80
|
-
session:
|
|
81
|
-
session: {
|
|
82
|
-
id: string;
|
|
83
|
-
createdAt: Date;
|
|
84
|
-
updatedAt: Date;
|
|
85
|
-
userId: string;
|
|
86
|
-
expiresAt: Date;
|
|
87
|
-
token: string;
|
|
88
|
-
ipAddress?: string | null | undefined | undefined;
|
|
89
|
-
userAgent?: string | null | undefined | undefined;
|
|
90
|
-
};
|
|
91
|
-
user: {
|
|
92
|
-
id: string;
|
|
93
|
-
createdAt: Date;
|
|
94
|
-
updatedAt: Date;
|
|
95
|
-
email: string;
|
|
96
|
-
emailVerified: boolean;
|
|
97
|
-
name: string;
|
|
98
|
-
image?: string | null | undefined | undefined;
|
|
99
|
-
};
|
|
100
|
-
} | null;
|
|
20
|
+
session: any;
|
|
101
21
|
di: awilix7.AwilixContainer<any>;
|
|
102
22
|
} & Record<never, never>, {
|
|
103
|
-
session:
|
|
104
|
-
session: {
|
|
105
|
-
id: string;
|
|
106
|
-
createdAt: Date;
|
|
107
|
-
updatedAt: Date;
|
|
108
|
-
userId: string;
|
|
109
|
-
expiresAt: Date;
|
|
110
|
-
token: string;
|
|
111
|
-
ipAddress?: string | null | undefined | undefined;
|
|
112
|
-
userAgent?: string | null | undefined | undefined;
|
|
113
|
-
};
|
|
114
|
-
user: {
|
|
115
|
-
id: string;
|
|
116
|
-
createdAt: Date;
|
|
117
|
-
updatedAt: Date;
|
|
118
|
-
email: string;
|
|
119
|
-
emailVerified: boolean;
|
|
120
|
-
name: string;
|
|
121
|
-
image?: string | null | undefined | undefined;
|
|
122
|
-
};
|
|
123
|
-
} | null;
|
|
23
|
+
session: any;
|
|
124
24
|
di: awilix7.AwilixContainer<any>;
|
|
125
25
|
}>, _orpc_server10.MergedCurrentContext<{
|
|
126
|
-
session:
|
|
127
|
-
session: {
|
|
128
|
-
id: string;
|
|
129
|
-
createdAt: Date;
|
|
130
|
-
updatedAt: Date;
|
|
131
|
-
userId: string;
|
|
132
|
-
expiresAt: Date;
|
|
133
|
-
token: string;
|
|
134
|
-
ipAddress?: string | null | undefined | undefined;
|
|
135
|
-
userAgent?: string | null | undefined | undefined;
|
|
136
|
-
};
|
|
137
|
-
user: {
|
|
138
|
-
id: string;
|
|
139
|
-
createdAt: Date;
|
|
140
|
-
updatedAt: Date;
|
|
141
|
-
email: string;
|
|
142
|
-
emailVerified: boolean;
|
|
143
|
-
name: string;
|
|
144
|
-
image?: string | null | undefined | undefined;
|
|
145
|
-
};
|
|
146
|
-
} | null;
|
|
26
|
+
session: any;
|
|
147
27
|
di: awilix7.AwilixContainer<any>;
|
|
148
28
|
}, {
|
|
149
|
-
session:
|
|
150
|
-
session: {
|
|
151
|
-
id: string;
|
|
152
|
-
createdAt: Date;
|
|
153
|
-
updatedAt: Date;
|
|
154
|
-
userId: string;
|
|
155
|
-
expiresAt: Date;
|
|
156
|
-
token: string;
|
|
157
|
-
ipAddress?: string | null | undefined | undefined;
|
|
158
|
-
userAgent?: string | null | undefined | undefined;
|
|
159
|
-
};
|
|
160
|
-
user: {
|
|
161
|
-
id: string;
|
|
162
|
-
createdAt: Date;
|
|
163
|
-
updatedAt: Date;
|
|
164
|
-
email: string;
|
|
165
|
-
emailVerified: boolean;
|
|
166
|
-
name: string;
|
|
167
|
-
image?: string | null | undefined | undefined;
|
|
168
|
-
};
|
|
169
|
-
};
|
|
29
|
+
session: any;
|
|
170
30
|
}>, _orpc_server10.Schema<unknown, unknown>, _orpc_server10.Schema<{
|
|
171
31
|
message: string;
|
|
172
|
-
user:
|
|
173
|
-
id: string;
|
|
174
|
-
createdAt: Date;
|
|
175
|
-
updatedAt: Date;
|
|
176
|
-
email: string;
|
|
177
|
-
emailVerified: boolean;
|
|
178
|
-
name: string;
|
|
179
|
-
image?: string | null | undefined | undefined;
|
|
180
|
-
};
|
|
32
|
+
user: any;
|
|
181
33
|
}, {
|
|
182
34
|
message: string;
|
|
183
|
-
user:
|
|
184
|
-
id: string;
|
|
185
|
-
createdAt: Date;
|
|
186
|
-
updatedAt: Date;
|
|
187
|
-
email: string;
|
|
188
|
-
emailVerified: boolean;
|
|
189
|
-
name: string;
|
|
190
|
-
image?: string | null | undefined | undefined;
|
|
191
|
-
};
|
|
35
|
+
user: any;
|
|
192
36
|
}>, Record<never, never>, Record<never, never>>;
|
|
193
37
|
profile: {
|
|
194
38
|
me: _orpc_server10.DecoratedProcedure<_orpc_server10.MergedInitialContext<{
|
|
195
|
-
session:
|
|
196
|
-
session: {
|
|
197
|
-
id: string;
|
|
198
|
-
createdAt: Date;
|
|
199
|
-
updatedAt: Date;
|
|
200
|
-
userId: string;
|
|
201
|
-
expiresAt: Date;
|
|
202
|
-
token: string;
|
|
203
|
-
ipAddress?: string | null | undefined | undefined;
|
|
204
|
-
userAgent?: string | null | undefined | undefined;
|
|
205
|
-
};
|
|
206
|
-
user: {
|
|
207
|
-
id: string;
|
|
208
|
-
createdAt: Date;
|
|
209
|
-
updatedAt: Date;
|
|
210
|
-
email: string;
|
|
211
|
-
emailVerified: boolean;
|
|
212
|
-
name: string;
|
|
213
|
-
image?: string | null | undefined | undefined;
|
|
214
|
-
};
|
|
215
|
-
} | null;
|
|
39
|
+
session: any;
|
|
216
40
|
di: awilix7.AwilixContainer<any>;
|
|
217
41
|
} & Record<never, never>, {
|
|
218
|
-
session:
|
|
219
|
-
session: {
|
|
220
|
-
id: string;
|
|
221
|
-
createdAt: Date;
|
|
222
|
-
updatedAt: Date;
|
|
223
|
-
userId: string;
|
|
224
|
-
expiresAt: Date;
|
|
225
|
-
token: string;
|
|
226
|
-
ipAddress?: string | null | undefined | undefined;
|
|
227
|
-
userAgent?: string | null | undefined | undefined;
|
|
228
|
-
};
|
|
229
|
-
user: {
|
|
230
|
-
id: string;
|
|
231
|
-
createdAt: Date;
|
|
232
|
-
updatedAt: Date;
|
|
233
|
-
email: string;
|
|
234
|
-
emailVerified: boolean;
|
|
235
|
-
name: string;
|
|
236
|
-
image?: string | null | undefined | undefined;
|
|
237
|
-
};
|
|
238
|
-
} | null;
|
|
42
|
+
session: any;
|
|
239
43
|
di: awilix7.AwilixContainer<any>;
|
|
240
44
|
} & Record<never, never>, {
|
|
241
|
-
session:
|
|
242
|
-
session: {
|
|
243
|
-
id: string;
|
|
244
|
-
createdAt: Date;
|
|
245
|
-
updatedAt: Date;
|
|
246
|
-
userId: string;
|
|
247
|
-
expiresAt: Date;
|
|
248
|
-
token: string;
|
|
249
|
-
ipAddress?: string | null | undefined | undefined;
|
|
250
|
-
userAgent?: string | null | undefined | undefined;
|
|
251
|
-
};
|
|
252
|
-
user: {
|
|
253
|
-
id: string;
|
|
254
|
-
createdAt: Date;
|
|
255
|
-
updatedAt: Date;
|
|
256
|
-
email: string;
|
|
257
|
-
emailVerified: boolean;
|
|
258
|
-
name: string;
|
|
259
|
-
image?: string | null | undefined | undefined;
|
|
260
|
-
};
|
|
261
|
-
} | null;
|
|
45
|
+
session: any;
|
|
262
46
|
di: awilix7.AwilixContainer<any>;
|
|
263
47
|
}>, _orpc_server10.MergedCurrentContext<{
|
|
264
|
-
session:
|
|
265
|
-
session: {
|
|
266
|
-
id: string;
|
|
267
|
-
createdAt: Date;
|
|
268
|
-
updatedAt: Date;
|
|
269
|
-
userId: string;
|
|
270
|
-
expiresAt: Date;
|
|
271
|
-
token: string;
|
|
272
|
-
ipAddress?: string | null | undefined | undefined;
|
|
273
|
-
userAgent?: string | null | undefined | undefined;
|
|
274
|
-
};
|
|
275
|
-
user: {
|
|
276
|
-
id: string;
|
|
277
|
-
createdAt: Date;
|
|
278
|
-
updatedAt: Date;
|
|
279
|
-
email: string;
|
|
280
|
-
emailVerified: boolean;
|
|
281
|
-
name: string;
|
|
282
|
-
image?: string | null | undefined | undefined;
|
|
283
|
-
};
|
|
284
|
-
} | null;
|
|
48
|
+
session: any;
|
|
285
49
|
di: awilix7.AwilixContainer<any>;
|
|
286
50
|
}, {
|
|
287
|
-
session:
|
|
288
|
-
session: {
|
|
289
|
-
id: string;
|
|
290
|
-
createdAt: Date;
|
|
291
|
-
updatedAt: Date;
|
|
292
|
-
userId: string;
|
|
293
|
-
expiresAt: Date;
|
|
294
|
-
token: string;
|
|
295
|
-
ipAddress?: string | null | undefined | undefined;
|
|
296
|
-
userAgent?: string | null | undefined | undefined;
|
|
297
|
-
};
|
|
298
|
-
user: {
|
|
299
|
-
id: string;
|
|
300
|
-
createdAt: Date;
|
|
301
|
-
updatedAt: Date;
|
|
302
|
-
email: string;
|
|
303
|
-
emailVerified: boolean;
|
|
304
|
-
name: string;
|
|
305
|
-
image?: string | null | undefined | undefined;
|
|
306
|
-
};
|
|
307
|
-
};
|
|
51
|
+
session: any;
|
|
308
52
|
}>, _orpc_server10.Schema<unknown, unknown>, zod0.ZodObject<{
|
|
309
53
|
id: zod0.ZodString;
|
|
310
54
|
name: zod0.ZodString;
|
|
@@ -312,7 +56,7 @@ declare const appRouter: {
|
|
|
312
56
|
emailVerified: zod0.ZodBoolean;
|
|
313
57
|
createdAt: zod0.ZodString;
|
|
314
58
|
updatedAt: zod0.ZodString;
|
|
315
|
-
},
|
|
59
|
+
}, zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
|
|
316
60
|
};
|
|
317
61
|
};
|
|
318
62
|
type AppRouter = typeof appRouter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/routers/index.ts"],"sourcesContent":[],"mappings":";;;;;;;cAIa
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/routers/index.ts"],"sourcesContent":[],"mappings":";;;;;;;cAIa;;;QAWZ,OAAA,CAAA;;;IAXY,EAAA,yBAWZ,CAAA,GAAA,CAAA;EAAA,CAAA,uBAAA,CAAA,OAAA,EAAA,OAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,MAAA,CAAA,QAAA,CAAA,KAAA,EAAA,KAAA,CAAA,QAAA,CAAA,KAAA,EAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MACW,SAAS,gBAAmB;MAC5B,SAAA,gBAAkB;;;;KADlB,SAAA,UAAmB;KACnB,eAAA,GAAkB,oBAAoB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as awilix17 from "awilix";
|
|
2
2
|
import * as _orpc_server22 from "@orpc/server";
|
|
3
3
|
import * as zod6 from "zod";
|
|
4
|
-
import * as
|
|
4
|
+
import * as zod_v4_core0 from "zod/v4/core";
|
|
5
5
|
|
|
6
6
|
//#region src/routers/profile.d.ts
|
|
7
7
|
declare const profileRouter: {
|
|
@@ -9,119 +9,19 @@ declare const profileRouter: {
|
|
|
9
9
|
* Get current user's profile
|
|
10
10
|
*/
|
|
11
11
|
me: _orpc_server22.DecoratedProcedure<_orpc_server22.MergedInitialContext<{
|
|
12
|
-
session:
|
|
13
|
-
session: {
|
|
14
|
-
id: string;
|
|
15
|
-
createdAt: Date;
|
|
16
|
-
updatedAt: Date;
|
|
17
|
-
userId: string;
|
|
18
|
-
expiresAt: Date;
|
|
19
|
-
token: string;
|
|
20
|
-
ipAddress?: string | null | undefined | undefined;
|
|
21
|
-
userAgent?: string | null | undefined | undefined;
|
|
22
|
-
};
|
|
23
|
-
user: {
|
|
24
|
-
id: string;
|
|
25
|
-
createdAt: Date;
|
|
26
|
-
updatedAt: Date;
|
|
27
|
-
email: string;
|
|
28
|
-
emailVerified: boolean;
|
|
29
|
-
name: string;
|
|
30
|
-
image?: string | null | undefined | undefined;
|
|
31
|
-
};
|
|
32
|
-
} | null;
|
|
12
|
+
session: any;
|
|
33
13
|
di: awilix17.AwilixContainer<any>;
|
|
34
14
|
} & Record<never, never>, {
|
|
35
|
-
session:
|
|
36
|
-
session: {
|
|
37
|
-
id: string;
|
|
38
|
-
createdAt: Date;
|
|
39
|
-
updatedAt: Date;
|
|
40
|
-
userId: string;
|
|
41
|
-
expiresAt: Date;
|
|
42
|
-
token: string;
|
|
43
|
-
ipAddress?: string | null | undefined | undefined;
|
|
44
|
-
userAgent?: string | null | undefined | undefined;
|
|
45
|
-
};
|
|
46
|
-
user: {
|
|
47
|
-
id: string;
|
|
48
|
-
createdAt: Date;
|
|
49
|
-
updatedAt: Date;
|
|
50
|
-
email: string;
|
|
51
|
-
emailVerified: boolean;
|
|
52
|
-
name: string;
|
|
53
|
-
image?: string | null | undefined | undefined;
|
|
54
|
-
};
|
|
55
|
-
} | null;
|
|
15
|
+
session: any;
|
|
56
16
|
di: awilix17.AwilixContainer<any>;
|
|
57
17
|
} & Record<never, never>, {
|
|
58
|
-
session:
|
|
59
|
-
session: {
|
|
60
|
-
id: string;
|
|
61
|
-
createdAt: Date;
|
|
62
|
-
updatedAt: Date;
|
|
63
|
-
userId: string;
|
|
64
|
-
expiresAt: Date;
|
|
65
|
-
token: string;
|
|
66
|
-
ipAddress?: string | null | undefined | undefined;
|
|
67
|
-
userAgent?: string | null | undefined | undefined;
|
|
68
|
-
};
|
|
69
|
-
user: {
|
|
70
|
-
id: string;
|
|
71
|
-
createdAt: Date;
|
|
72
|
-
updatedAt: Date;
|
|
73
|
-
email: string;
|
|
74
|
-
emailVerified: boolean;
|
|
75
|
-
name: string;
|
|
76
|
-
image?: string | null | undefined | undefined;
|
|
77
|
-
};
|
|
78
|
-
} | null;
|
|
18
|
+
session: any;
|
|
79
19
|
di: awilix17.AwilixContainer<any>;
|
|
80
20
|
}>, _orpc_server22.MergedCurrentContext<{
|
|
81
|
-
session:
|
|
82
|
-
session: {
|
|
83
|
-
id: string;
|
|
84
|
-
createdAt: Date;
|
|
85
|
-
updatedAt: Date;
|
|
86
|
-
userId: string;
|
|
87
|
-
expiresAt: Date;
|
|
88
|
-
token: string;
|
|
89
|
-
ipAddress?: string | null | undefined | undefined;
|
|
90
|
-
userAgent?: string | null | undefined | undefined;
|
|
91
|
-
};
|
|
92
|
-
user: {
|
|
93
|
-
id: string;
|
|
94
|
-
createdAt: Date;
|
|
95
|
-
updatedAt: Date;
|
|
96
|
-
email: string;
|
|
97
|
-
emailVerified: boolean;
|
|
98
|
-
name: string;
|
|
99
|
-
image?: string | null | undefined | undefined;
|
|
100
|
-
};
|
|
101
|
-
} | null;
|
|
21
|
+
session: any;
|
|
102
22
|
di: awilix17.AwilixContainer<any>;
|
|
103
23
|
}, {
|
|
104
|
-
session:
|
|
105
|
-
session: {
|
|
106
|
-
id: string;
|
|
107
|
-
createdAt: Date;
|
|
108
|
-
updatedAt: Date;
|
|
109
|
-
userId: string;
|
|
110
|
-
expiresAt: Date;
|
|
111
|
-
token: string;
|
|
112
|
-
ipAddress?: string | null | undefined | undefined;
|
|
113
|
-
userAgent?: string | null | undefined | undefined;
|
|
114
|
-
};
|
|
115
|
-
user: {
|
|
116
|
-
id: string;
|
|
117
|
-
createdAt: Date;
|
|
118
|
-
updatedAt: Date;
|
|
119
|
-
email: string;
|
|
120
|
-
emailVerified: boolean;
|
|
121
|
-
name: string;
|
|
122
|
-
image?: string | null | undefined | undefined;
|
|
123
|
-
};
|
|
124
|
-
};
|
|
24
|
+
session: any;
|
|
125
25
|
}>, _orpc_server22.Schema<unknown, unknown>, zod6.ZodObject<{
|
|
126
26
|
id: zod6.ZodString;
|
|
127
27
|
name: zod6.ZodString;
|
|
@@ -129,7 +29,7 @@ declare const profileRouter: {
|
|
|
129
29
|
emailVerified: zod6.ZodBoolean;
|
|
130
30
|
createdAt: zod6.ZodString;
|
|
131
31
|
updatedAt: zod6.ZodString;
|
|
132
|
-
},
|
|
32
|
+
}, zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
|
|
133
33
|
};
|
|
134
34
|
//#endregion
|
|
135
35
|
export { profileRouter };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.d.ts","names":[],"sources":["../../src/routers/profile.ts"],"sourcesContent":[],"mappings":";;;;;;cAGa;;;;;;
|
|
1
|
+
{"version":3,"file":"profile.d.ts","names":[],"sources":["../../src/routers/profile.ts"],"sourcesContent":[],"mappings":";;;;;;cAGa;;;;;;IAAA,EAAA,EAaZ,QAAA,CAAA,eAAA,CAAA,GAAA,CAAA;EAAA,CAAA,SAAA,CAAA,KAAA,EAAA,KAAA,CAAA,EAAA"}
|
package/package.json
CHANGED
|
@@ -1,38 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kuckit/api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"main": "
|
|
6
|
-
"types": "
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|
|
9
9
|
],
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
|
-
"types": "./
|
|
13
|
-
"default": "./
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"default": "./dist/index.js"
|
|
14
14
|
},
|
|
15
15
|
"./*": {
|
|
16
|
-
"types": "./
|
|
17
|
-
"default": "./
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"publishConfig": {
|
|
21
|
-
"main": "dist/index.js",
|
|
22
|
-
"types": "dist/index.d.ts",
|
|
23
|
-
"exports": {
|
|
24
|
-
".": {
|
|
25
|
-
"types": "./dist/index.d.ts",
|
|
26
|
-
"default": "./dist/index.js"
|
|
27
|
-
},
|
|
28
|
-
"./*": {
|
|
29
|
-
"types": "./dist/*.d.ts",
|
|
30
|
-
"default": "./dist/*.js"
|
|
31
|
-
}
|
|
16
|
+
"types": "./dist/*.d.ts",
|
|
17
|
+
"default": "./dist/*.js"
|
|
32
18
|
}
|
|
33
19
|
},
|
|
34
20
|
"scripts": {
|
|
35
|
-
"build": "tsdown"
|
|
21
|
+
"build": "tsdown",
|
|
22
|
+
"prepublishOnly": "npm run build && node ../../scripts/resolve-workspace-protocols.cjs && node ../../scripts/check-no-workspace-protocol.cjs"
|
|
36
23
|
},
|
|
37
24
|
"devDependencies": {
|
|
38
25
|
"@types/express": "catalog:",
|
|
@@ -42,19 +29,19 @@
|
|
|
42
29
|
"typescript": "^5"
|
|
43
30
|
},
|
|
44
31
|
"dependencies": {
|
|
45
|
-
"@orpc/server": "
|
|
46
|
-
"@orpc/client": "
|
|
47
|
-
"@orpc/openapi": "
|
|
48
|
-
"@orpc/zod": "
|
|
49
|
-
"better-auth": "
|
|
50
|
-
"drizzle-orm": "
|
|
51
|
-
"ai": "
|
|
52
|
-
"@ai-sdk/google": "
|
|
53
|
-
"dotenv": "
|
|
54
|
-
"zod": "
|
|
32
|
+
"@orpc/server": "^1.10.0",
|
|
33
|
+
"@orpc/client": "^1.10.0",
|
|
34
|
+
"@orpc/openapi": "^1.10.0",
|
|
35
|
+
"@orpc/zod": "^1.10.0",
|
|
36
|
+
"better-auth": "^1.3.28",
|
|
37
|
+
"drizzle-orm": "^0.44.2",
|
|
38
|
+
"ai": "^5.0.49",
|
|
39
|
+
"@ai-sdk/google": "^2.0.13",
|
|
40
|
+
"dotenv": "^17.2.2",
|
|
41
|
+
"zod": "^4.1.11",
|
|
55
42
|
"awilix": "^12.0.5",
|
|
56
|
-
"@kuckit/auth": "
|
|
57
|
-
"@kuckit/db": "
|
|
58
|
-
"@kuckit/contracts": "
|
|
43
|
+
"@kuckit/auth": "^1.0.2",
|
|
44
|
+
"@kuckit/db": "^1.0.2",
|
|
45
|
+
"@kuckit/contracts": "^1.0.2"
|
|
59
46
|
}
|
|
60
47
|
}
|
package/src/index.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ORPCError, os } from '@orpc/server'
|
|
2
|
-
import type { Context } from './context'
|
|
3
|
-
|
|
4
|
-
export const o = os.$context<Context>()
|
|
5
|
-
|
|
6
|
-
export const publicProcedure = o
|
|
7
|
-
|
|
8
|
-
const requireAuth = o.middleware(async ({ context, next }) => {
|
|
9
|
-
if (!context.session?.user) {
|
|
10
|
-
throw new ORPCError('UNAUTHORIZED')
|
|
11
|
-
}
|
|
12
|
-
return next({
|
|
13
|
-
context: {
|
|
14
|
-
session: context.session,
|
|
15
|
-
},
|
|
16
|
-
})
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
export const protectedProcedure = publicProcedure.use(requireAuth)
|