@goatlab/node-backend 0.2.0 → 0.2.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/dist/index.d.ts +1 -0
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/server/context/request.context.d.ts +9 -9
- package/dist/server/middleware/handleRequest.middleware.js +1 -1
- package/dist/server/schemas/user.schema.d.ts +5 -73
- package/dist/server/services/email/email.model.d.ts +1 -9
- package/dist/server/trpc.d.ts +81 -81
- package/dist/server/zod-compat.d.ts +4 -0
- package/dist/server/zod-compat.js +26 -0
- package/dist/server/zod-compat.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -33,3 +33,4 @@ export { Container } from './container/Container';
|
|
|
33
33
|
export type { Factory, ContainerOptions, PreloadStructure, ContainerFactories, ContainerMetadata, ContainerContext, MapInterface, ContainerBootstrapResult } from './container/types';
|
|
34
34
|
export { createServiceCache } from './container/LruCache';
|
|
35
35
|
export { DistributedCacheInvalidator, getDistributedCacheInvalidator } from './container/DistributedCacheInvalidator';
|
|
36
|
+
export * as zodCompat from './server/zod-compat';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDistributedCacheInvalidator = exports.DistributedCacheInvalidator = exports.createServiceCache = exports.Container = exports.tr = exports.translationService = exports.TRPCError = exports.paginationUtility = exports.UrlService = exports.SecretService = exports.getGcpServiceAccountFromBase64 = exports.SendgridService = exports.EmailCategory = exports.Content = exports.Layout = exports.EmailService = exports.config = exports.mockedAuthenticatedTrpcRouter = exports.requestContext = exports.getTrpc = exports.useCloudTaskDecryptMiddleware = exports.handleRequest = exports.getLogger = exports.getSentry = exports.SentryService = exports.getExpressTrpcApp = exports.Cache = void 0;
|
|
3
|
+
exports.zodCompat = exports.getDistributedCacheInvalidator = exports.DistributedCacheInvalidator = exports.createServiceCache = exports.Container = exports.tr = exports.translationService = exports.TRPCError = exports.paginationUtility = exports.UrlService = exports.SecretService = exports.getGcpServiceAccountFromBase64 = exports.SendgridService = exports.EmailCategory = exports.Content = exports.Layout = exports.EmailService = exports.config = exports.mockedAuthenticatedTrpcRouter = exports.requestContext = exports.getTrpc = exports.useCloudTaskDecryptMiddleware = exports.handleRequest = exports.getLogger = exports.getSentry = exports.SentryService = exports.getExpressTrpcApp = exports.Cache = void 0;
|
|
4
4
|
const Cache_1 = require("./Cache");
|
|
5
5
|
Object.defineProperty(exports, "Cache", { enumerable: true, get: function () { return Cache_1.Cache; } });
|
|
6
6
|
// New backend package
|
|
@@ -55,4 +55,8 @@ Object.defineProperty(exports, "createServiceCache", { enumerable: true, get: fu
|
|
|
55
55
|
var DistributedCacheInvalidator_1 = require("./container/DistributedCacheInvalidator");
|
|
56
56
|
Object.defineProperty(exports, "DistributedCacheInvalidator", { enumerable: true, get: function () { return DistributedCacheInvalidator_1.DistributedCacheInvalidator; } });
|
|
57
57
|
Object.defineProperty(exports, "getDistributedCacheInvalidator", { enumerable: true, get: function () { return DistributedCacheInvalidator_1.getDistributedCacheInvalidator; } });
|
|
58
|
+
////////////////////////
|
|
59
|
+
// Zod Compatibility
|
|
60
|
+
////////////////////////
|
|
61
|
+
exports.zodCompat = require("./server/zod-compat");
|
|
58
62
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,mCAA+B;AAGtB,sFAHA,aAAK,OAGA;AAGd,sBAAsB;AACtB,2EAAyE;AAAhE,sHAAA,iBAAiB,OAAA;AAC1B,iEAA8D;AAArD,+GAAA,aAAa,OAAA;AACtB,uDAAqD;AAA5C,sGAAA,SAAS,OAAA;AAClB,4EAAqE;AAA5D,2GAAA,SAAS,OAAA;AAClB,yFAA4E;AAAnE,yHAAA,aAAa,OAAA;AACtB,+FAA+F;AAAtF,4IAAA,6BAA6B,OAAA;AACtC,sCAAuC;AAA9B,+FAAA,OAAO,OAAA;AAChB,oEAAiE;AAAxD,iHAAA,cAAc,OAAA;AAEvB,qDAAuE;AAA9D,0HAAA,6BAA6B,OAAA;AAMtC,0CAAwC;AAA/B,gGAAA,MAAM,OAAA;AACf,uEAAoE;AAA3D,6GAAA,YAAY,OAAA;AACrB,mEAI4C;AAH1C,qGAAA,MAAM,OAAA;AACN,sGAAA,OAAO,OAAA;AACP,4GAAA,aAAa,OAAA;AAOf,sFAAgF;AAAvE,sHAAA,eAAe,OAAA;AACxB,uGAAqG;AAA5F,gJAAA,8BAA8B,OAAA;AAMvC,2EAAwE;AAA/D,+GAAA,aAAa,OAAA;AACtB,kEAA+D;AAAtD,yGAAA,UAAU,OAAA;AACnB,gEAAqE;AAA5D,+GAAA,iBAAiB,OAAA;AAE1B,uCAAwC;AAA/B,mGAAA,SAAS,OAAA;AAClB,0FAG2D;AAFzD,yHAAA,kBAAkB,OAAA;AAClB,yGAAA,EAAE,OAAA;AAKJ,wBAAwB;AACxB,mBAAmB;AACnB,wBAAwB;AACxB,mDAAiD;AAAxC,sGAAA,SAAS,OAAA;AAYlB,iDAAyD;AAAhD,8GAAA,kBAAkB,OAAA;AAC3B,uFAGgD;AAF9C,0IAAA,2BAA2B,OAAA;AAC3B,6IAAA,8BAA8B,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,mCAA+B;AAGtB,sFAHA,aAAK,OAGA;AAGd,sBAAsB;AACtB,2EAAyE;AAAhE,sHAAA,iBAAiB,OAAA;AAC1B,iEAA8D;AAArD,+GAAA,aAAa,OAAA;AACtB,uDAAqD;AAA5C,sGAAA,SAAS,OAAA;AAClB,4EAAqE;AAA5D,2GAAA,SAAS,OAAA;AAClB,yFAA4E;AAAnE,yHAAA,aAAa,OAAA;AACtB,+FAA+F;AAAtF,4IAAA,6BAA6B,OAAA;AACtC,sCAAuC;AAA9B,+FAAA,OAAO,OAAA;AAChB,oEAAiE;AAAxD,iHAAA,cAAc,OAAA;AAEvB,qDAAuE;AAA9D,0HAAA,6BAA6B,OAAA;AAMtC,0CAAwC;AAA/B,gGAAA,MAAM,OAAA;AACf,uEAAoE;AAA3D,6GAAA,YAAY,OAAA;AACrB,mEAI4C;AAH1C,qGAAA,MAAM,OAAA;AACN,sGAAA,OAAO,OAAA;AACP,4GAAA,aAAa,OAAA;AAOf,sFAAgF;AAAvE,sHAAA,eAAe,OAAA;AACxB,uGAAqG;AAA5F,gJAAA,8BAA8B,OAAA;AAMvC,2EAAwE;AAA/D,+GAAA,aAAa,OAAA;AACtB,kEAA+D;AAAtD,yGAAA,UAAU,OAAA;AACnB,gEAAqE;AAA5D,+GAAA,iBAAiB,OAAA;AAE1B,uCAAwC;AAA/B,mGAAA,SAAS,OAAA;AAClB,0FAG2D;AAFzD,yHAAA,kBAAkB,OAAA;AAClB,yGAAA,EAAE,OAAA;AAKJ,wBAAwB;AACxB,mBAAmB;AACnB,wBAAwB;AACxB,mDAAiD;AAAxC,sGAAA,SAAS,OAAA;AAYlB,iDAAyD;AAAhD,8GAAA,kBAAkB,OAAA;AAC3B,uFAGgD;AAF9C,0IAAA,2BAA2B,OAAA;AAC3B,6IAAA,8BAA8B,OAAA;AAGhC,wBAAwB;AACxB,oBAAoB;AACpB,wBAAwB;AACxB,mDAAgD"}
|
|
@@ -4,16 +4,16 @@ import type { LocationOutput } from './context.model';
|
|
|
4
4
|
export declare const requestContext: (request: Request, token?: DecodedUserToken) => {
|
|
5
5
|
user: {
|
|
6
6
|
decodedToken: {
|
|
7
|
-
iss
|
|
8
|
-
aud
|
|
9
|
-
auth_time
|
|
10
|
-
sub
|
|
11
|
-
iat
|
|
12
|
-
exp
|
|
13
|
-
email
|
|
14
|
-
email_verified
|
|
7
|
+
iss: string;
|
|
8
|
+
aud: string;
|
|
9
|
+
auth_time: number;
|
|
10
|
+
sub: string;
|
|
11
|
+
iat: number;
|
|
12
|
+
exp: number;
|
|
13
|
+
email: string;
|
|
14
|
+
email_verified: boolean;
|
|
15
|
+
uid: string;
|
|
15
16
|
firebase?: any;
|
|
16
|
-
uid?: string;
|
|
17
17
|
displayName?: string;
|
|
18
18
|
name?: string;
|
|
19
19
|
ownerId?: string;
|
|
@@ -25,7 +25,7 @@ const handleRequest = (schema, handler) => {
|
|
|
25
25
|
if (err instanceof zod_1.ZodError) {
|
|
26
26
|
return res.status(400).json({
|
|
27
27
|
error: 'Invalid request body',
|
|
28
|
-
details: err.
|
|
28
|
+
details: err.issues, // Send detailed validation errors
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
// Handle other errors and respond with a 500 status code
|
|
@@ -14,45 +14,11 @@ export declare const firebaseDecodedTokenSchema: z.ZodObject<{
|
|
|
14
14
|
name: z.ZodOptional<z.ZodString>;
|
|
15
15
|
ownerId: z.ZodOptional<z.ZodString>;
|
|
16
16
|
user_id: z.ZodOptional<z.ZodString>;
|
|
17
|
-
},
|
|
18
|
-
iss?: string;
|
|
19
|
-
aud?: string;
|
|
20
|
-
auth_time?: number;
|
|
21
|
-
sub?: string;
|
|
22
|
-
iat?: number;
|
|
23
|
-
exp?: number;
|
|
24
|
-
email?: string;
|
|
25
|
-
email_verified?: boolean;
|
|
26
|
-
firebase?: any;
|
|
27
|
-
uid?: string;
|
|
28
|
-
displayName?: string;
|
|
29
|
-
name?: string;
|
|
30
|
-
ownerId?: string;
|
|
31
|
-
user_id?: string;
|
|
32
|
-
}, {
|
|
33
|
-
iss?: string;
|
|
34
|
-
aud?: string;
|
|
35
|
-
auth_time?: number;
|
|
36
|
-
sub?: string;
|
|
37
|
-
iat?: number;
|
|
38
|
-
exp?: number;
|
|
39
|
-
email?: string;
|
|
40
|
-
email_verified?: boolean;
|
|
41
|
-
firebase?: any;
|
|
42
|
-
uid?: string;
|
|
43
|
-
displayName?: string;
|
|
44
|
-
name?: string;
|
|
45
|
-
ownerId?: string;
|
|
46
|
-
user_id?: string;
|
|
47
|
-
}>;
|
|
17
|
+
}, z.core.$strip>;
|
|
48
18
|
export declare const internalTokenSchema: z.ZodObject<{
|
|
49
19
|
tokenPurpose: z.ZodOptional<z.ZodString>;
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
}, {
|
|
53
|
-
tokenPurpose?: string;
|
|
54
|
-
}>;
|
|
55
|
-
export declare const requestTokenSchema: z.ZodUnion<[z.ZodObject<{
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
export declare const requestTokenSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
56
22
|
iss: z.ZodString;
|
|
57
23
|
aud: z.ZodString;
|
|
58
24
|
auth_time: z.ZodNumber;
|
|
@@ -67,43 +33,9 @@ export declare const requestTokenSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
67
33
|
name: z.ZodOptional<z.ZodString>;
|
|
68
34
|
ownerId: z.ZodOptional<z.ZodString>;
|
|
69
35
|
user_id: z.ZodOptional<z.ZodString>;
|
|
70
|
-
},
|
|
71
|
-
iss?: string;
|
|
72
|
-
aud?: string;
|
|
73
|
-
auth_time?: number;
|
|
74
|
-
sub?: string;
|
|
75
|
-
iat?: number;
|
|
76
|
-
exp?: number;
|
|
77
|
-
email?: string;
|
|
78
|
-
email_verified?: boolean;
|
|
79
|
-
firebase?: any;
|
|
80
|
-
uid?: string;
|
|
81
|
-
displayName?: string;
|
|
82
|
-
name?: string;
|
|
83
|
-
ownerId?: string;
|
|
84
|
-
user_id?: string;
|
|
85
|
-
}, {
|
|
86
|
-
iss?: string;
|
|
87
|
-
aud?: string;
|
|
88
|
-
auth_time?: number;
|
|
89
|
-
sub?: string;
|
|
90
|
-
iat?: number;
|
|
91
|
-
exp?: number;
|
|
92
|
-
email?: string;
|
|
93
|
-
email_verified?: boolean;
|
|
94
|
-
firebase?: any;
|
|
95
|
-
uid?: string;
|
|
96
|
-
displayName?: string;
|
|
97
|
-
name?: string;
|
|
98
|
-
ownerId?: string;
|
|
99
|
-
user_id?: string;
|
|
100
|
-
}>, z.ZodObject<{
|
|
36
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
101
37
|
tokenPurpose: z.ZodOptional<z.ZodString>;
|
|
102
|
-
},
|
|
103
|
-
tokenPurpose?: string;
|
|
104
|
-
}, {
|
|
105
|
-
tokenPurpose?: string;
|
|
106
|
-
}>]>;
|
|
38
|
+
}, z.core.$strip>]>;
|
|
107
39
|
export type FirebaseDecodedToken = z.infer<typeof firebaseDecodedTokenSchema>;
|
|
108
40
|
export type TokenBasedAccess = z.infer<typeof internalTokenSchema>;
|
|
109
41
|
export type DecodedUserToken = z.infer<typeof requestTokenSchema>;
|
|
@@ -22,15 +22,7 @@ export declare const testEmailTemplate: z.ZodObject<{
|
|
|
22
22
|
to: z.ZodString;
|
|
23
23
|
subject: z.ZodString;
|
|
24
24
|
mjml: z.ZodString;
|
|
25
|
-
},
|
|
26
|
-
to?: string;
|
|
27
|
-
subject?: string;
|
|
28
|
-
mjml?: string;
|
|
29
|
-
}, {
|
|
30
|
-
to?: string;
|
|
31
|
-
subject?: string;
|
|
32
|
-
mjml?: string;
|
|
33
|
-
}>;
|
|
25
|
+
}, z.core.$strip>;
|
|
34
26
|
export interface EmailAttachment {
|
|
35
27
|
Content: string;
|
|
36
28
|
Type: string;
|
package/dist/server/trpc.d.ts
CHANGED
|
@@ -8,16 +8,16 @@ export declare function getTrpc<ExtendedAuthenticatedContext = {}, ExtendedConte
|
|
|
8
8
|
authenticatedEndpoint: import("@trpc/server").TRPCProcedureBuilder<{
|
|
9
9
|
user: {
|
|
10
10
|
decodedToken: {
|
|
11
|
-
iss
|
|
12
|
-
aud
|
|
13
|
-
auth_time
|
|
14
|
-
sub
|
|
15
|
-
iat
|
|
16
|
-
exp
|
|
17
|
-
email
|
|
18
|
-
email_verified
|
|
11
|
+
iss: string;
|
|
12
|
+
aud: string;
|
|
13
|
+
auth_time: number;
|
|
14
|
+
sub: string;
|
|
15
|
+
iat: number;
|
|
16
|
+
exp: number;
|
|
17
|
+
email: string;
|
|
18
|
+
email_verified: boolean;
|
|
19
|
+
uid: string;
|
|
19
20
|
firebase?: any;
|
|
20
|
-
uid?: string;
|
|
21
21
|
displayName?: string;
|
|
22
22
|
name?: string;
|
|
23
23
|
ownerId?: string;
|
|
@@ -48,16 +48,16 @@ export declare function getTrpc<ExtendedAuthenticatedContext = {}, ExtendedConte
|
|
|
48
48
|
url: string;
|
|
49
49
|
user: {
|
|
50
50
|
decodedToken: {
|
|
51
|
-
iss
|
|
52
|
-
aud
|
|
53
|
-
auth_time
|
|
54
|
-
sub
|
|
55
|
-
iat
|
|
56
|
-
exp
|
|
57
|
-
email
|
|
58
|
-
email_verified
|
|
51
|
+
iss: string;
|
|
52
|
+
aud: string;
|
|
53
|
+
auth_time: number;
|
|
54
|
+
sub: string;
|
|
55
|
+
iat: number;
|
|
56
|
+
exp: number;
|
|
57
|
+
email: string;
|
|
58
|
+
email_verified: boolean;
|
|
59
|
+
uid: string;
|
|
59
60
|
firebase?: any;
|
|
60
|
-
uid?: string;
|
|
61
61
|
displayName?: string;
|
|
62
62
|
name?: string;
|
|
63
63
|
ownerId?: string;
|
|
@@ -83,16 +83,16 @@ export declare function getTrpc<ExtendedAuthenticatedContext = {}, ExtendedConte
|
|
|
83
83
|
maybeAuthenticatedEnpoint: import("@trpc/server").TRPCProcedureBuilder<{
|
|
84
84
|
user: {
|
|
85
85
|
decodedToken: {
|
|
86
|
-
iss
|
|
87
|
-
aud
|
|
88
|
-
auth_time
|
|
89
|
-
sub
|
|
90
|
-
iat
|
|
91
|
-
exp
|
|
92
|
-
email
|
|
93
|
-
email_verified
|
|
86
|
+
iss: string;
|
|
87
|
+
aud: string;
|
|
88
|
+
auth_time: number;
|
|
89
|
+
sub: string;
|
|
90
|
+
iat: number;
|
|
91
|
+
exp: number;
|
|
92
|
+
email: string;
|
|
93
|
+
email_verified: boolean;
|
|
94
|
+
uid: string;
|
|
94
95
|
firebase?: any;
|
|
95
|
-
uid?: string;
|
|
96
96
|
displayName?: string;
|
|
97
97
|
name?: string;
|
|
98
98
|
ownerId?: string;
|
|
@@ -123,16 +123,16 @@ export declare function getTrpc<ExtendedAuthenticatedContext = {}, ExtendedConte
|
|
|
123
123
|
url: string;
|
|
124
124
|
user: {
|
|
125
125
|
decodedToken: {
|
|
126
|
-
iss
|
|
127
|
-
aud
|
|
128
|
-
auth_time
|
|
129
|
-
sub
|
|
130
|
-
iat
|
|
131
|
-
exp
|
|
132
|
-
email
|
|
133
|
-
email_verified
|
|
126
|
+
iss: string;
|
|
127
|
+
aud: string;
|
|
128
|
+
auth_time: number;
|
|
129
|
+
sub: string;
|
|
130
|
+
iat: number;
|
|
131
|
+
exp: number;
|
|
132
|
+
email: string;
|
|
133
|
+
email_verified: boolean;
|
|
134
|
+
uid: string;
|
|
134
135
|
firebase?: any;
|
|
135
|
-
uid?: string;
|
|
136
136
|
displayName?: string;
|
|
137
137
|
name?: string;
|
|
138
138
|
ownerId?: string;
|
|
@@ -159,16 +159,16 @@ export declare function getTrpc<ExtendedAuthenticatedContext = {}, ExtendedConte
|
|
|
159
159
|
publicEndpoint: import("@trpc/server").TRPCProcedureBuilder<{
|
|
160
160
|
user: {
|
|
161
161
|
decodedToken: {
|
|
162
|
-
iss
|
|
163
|
-
aud
|
|
164
|
-
auth_time
|
|
165
|
-
sub
|
|
166
|
-
iat
|
|
167
|
-
exp
|
|
168
|
-
email
|
|
169
|
-
email_verified
|
|
162
|
+
iss: string;
|
|
163
|
+
aud: string;
|
|
164
|
+
auth_time: number;
|
|
165
|
+
sub: string;
|
|
166
|
+
iat: number;
|
|
167
|
+
exp: number;
|
|
168
|
+
email: string;
|
|
169
|
+
email_verified: boolean;
|
|
170
|
+
uid: string;
|
|
170
171
|
firebase?: any;
|
|
171
|
-
uid?: string;
|
|
172
172
|
displayName?: string;
|
|
173
173
|
name?: string;
|
|
174
174
|
ownerId?: string;
|
|
@@ -199,16 +199,16 @@ export declare function getTrpc<ExtendedAuthenticatedContext = {}, ExtendedConte
|
|
|
199
199
|
url: string;
|
|
200
200
|
user: {
|
|
201
201
|
decodedToken: {
|
|
202
|
-
iss
|
|
203
|
-
aud
|
|
204
|
-
auth_time
|
|
205
|
-
sub
|
|
206
|
-
iat
|
|
207
|
-
exp
|
|
208
|
-
email
|
|
209
|
-
email_verified
|
|
202
|
+
iss: string;
|
|
203
|
+
aud: string;
|
|
204
|
+
auth_time: number;
|
|
205
|
+
sub: string;
|
|
206
|
+
iat: number;
|
|
207
|
+
exp: number;
|
|
208
|
+
email: string;
|
|
209
|
+
email_verified: boolean;
|
|
210
|
+
uid: string;
|
|
210
211
|
firebase?: any;
|
|
211
|
-
uid?: string;
|
|
212
212
|
displayName?: string;
|
|
213
213
|
name?: string;
|
|
214
214
|
ownerId?: string;
|
|
@@ -234,16 +234,16 @@ export declare function getTrpc<ExtendedAuthenticatedContext = {}, ExtendedConte
|
|
|
234
234
|
ctx: {
|
|
235
235
|
user: {
|
|
236
236
|
decodedToken: {
|
|
237
|
-
iss
|
|
238
|
-
aud
|
|
239
|
-
auth_time
|
|
240
|
-
sub
|
|
241
|
-
iat
|
|
242
|
-
exp
|
|
243
|
-
email
|
|
244
|
-
email_verified
|
|
237
|
+
iss: string;
|
|
238
|
+
aud: string;
|
|
239
|
+
auth_time: number;
|
|
240
|
+
sub: string;
|
|
241
|
+
iat: number;
|
|
242
|
+
exp: number;
|
|
243
|
+
email: string;
|
|
244
|
+
email_verified: boolean;
|
|
245
|
+
uid: string;
|
|
245
246
|
firebase?: any;
|
|
246
|
-
uid?: string;
|
|
247
247
|
displayName?: string;
|
|
248
248
|
name?: string;
|
|
249
249
|
ownerId?: string;
|
|
@@ -275,16 +275,16 @@ export declare function getTrpc<ExtendedAuthenticatedContext = {}, ExtendedConte
|
|
|
275
275
|
t: import("@trpc/server").TRPCRootObject<{
|
|
276
276
|
user: {
|
|
277
277
|
decodedToken: {
|
|
278
|
-
iss
|
|
279
|
-
aud
|
|
280
|
-
auth_time
|
|
281
|
-
sub
|
|
282
|
-
iat
|
|
283
|
-
exp
|
|
284
|
-
email
|
|
285
|
-
email_verified
|
|
278
|
+
iss: string;
|
|
279
|
+
aud: string;
|
|
280
|
+
auth_time: number;
|
|
281
|
+
sub: string;
|
|
282
|
+
iat: number;
|
|
283
|
+
exp: number;
|
|
284
|
+
email: string;
|
|
285
|
+
email_verified: boolean;
|
|
286
|
+
uid: string;
|
|
286
287
|
firebase?: any;
|
|
287
|
-
uid?: string;
|
|
288
288
|
displayName?: string;
|
|
289
289
|
name?: string;
|
|
290
290
|
ownerId?: string;
|
|
@@ -323,16 +323,16 @@ export declare function getTrpc<ExtendedAuthenticatedContext = {}, ExtendedConte
|
|
|
323
323
|
ctx: {
|
|
324
324
|
user: {
|
|
325
325
|
decodedToken: {
|
|
326
|
-
iss
|
|
327
|
-
aud
|
|
328
|
-
auth_time
|
|
329
|
-
sub
|
|
330
|
-
iat
|
|
331
|
-
exp
|
|
332
|
-
email
|
|
333
|
-
email_verified
|
|
326
|
+
iss: string;
|
|
327
|
+
aud: string;
|
|
328
|
+
auth_time: number;
|
|
329
|
+
sub: string;
|
|
330
|
+
iat: number;
|
|
331
|
+
exp: number;
|
|
332
|
+
email: string;
|
|
333
|
+
email_verified: boolean;
|
|
334
|
+
uid: string;
|
|
334
335
|
firebase?: any;
|
|
335
|
-
uid?: string;
|
|
336
336
|
displayName?: string;
|
|
337
337
|
name?: string;
|
|
338
338
|
ownerId?: string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.z = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const zod = require("zod");
|
|
6
|
+
// Create a proxy for the z object that intercepts the record method
|
|
7
|
+
const zProxy = new Proxy(zod.z, {
|
|
8
|
+
get(target, prop) {
|
|
9
|
+
if (prop === 'record') {
|
|
10
|
+
// Return a wrapped record function that handles both old and new signatures
|
|
11
|
+
return function record(...args) {
|
|
12
|
+
if (args.length === 1) {
|
|
13
|
+
// New signature: z.record(valueType)
|
|
14
|
+
// Convert to old signature: z.record(z.string(), valueType)
|
|
15
|
+
return target.record(zod.z.string(), args[0]);
|
|
16
|
+
}
|
|
17
|
+
// Old signature: z.record(keyType, valueType)
|
|
18
|
+
return target.record(...args);
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
return target[prop];
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
exports.z = zProxy;
|
|
25
|
+
tslib_1.__exportStar(require("zod"), exports);
|
|
26
|
+
//# sourceMappingURL=zod-compat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zod-compat.js","sourceRoot":"","sources":["../../src/server/zod-compat.ts"],"names":[],"mappings":";;;;AAAA,2BAA0B;AAE1B,oEAAoE;AACpE,MAAM,MAAM,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE;IAC9B,GAAG,CAAC,MAAM,EAAE,IAAI;QACd,IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC;YACtB,4EAA4E;YAC5E,OAAO,SAAS,MAAM,CAAC,GAAG,IAAW;gBACnC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;oBACtB,qCAAqC;oBACrC,4DAA4D;oBAC5D,OAAQ,MAAc,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;gBACxD,CAAC;gBACD,8CAA8C;gBAC9C,OAAQ,MAAc,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAA;YACxC,CAAC,CAAA;QACH,CAAC;QACD,OAAQ,MAAc,CAAC,IAAI,CAAC,CAAA;IAC9B,CAAC;CACF,CAAC,CAAA;AAGiB,mBAAC;AACpB,8CAAmB"}
|