@m5kdev/backend 0.1.0 → 0.1.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/.cursor/rules/backend.mdc +70 -0
- package/.turbo/turbo-build.log +5 -0
- package/.turbo/turbo-check-types.log +5 -0
- package/.turbo/turbo-lint$colon$fix.log +255 -0
- package/CHANGELOG.md +10 -0
- package/dist/src/lib/posthog.d.ts +3 -0
- package/dist/src/lib/posthog.d.ts.map +1 -0
- package/dist/src/lib/sentry.d.ts +2 -0
- package/dist/src/lib/sentry.d.ts.map +1 -0
- package/dist/src/modules/access/access.repository.d.ts +2348 -0
- package/dist/src/modules/access/access.repository.d.ts.map +1 -0
- package/dist/src/modules/access/access.service.d.ts +22 -0
- package/dist/src/modules/access/access.service.d.ts.map +1 -0
- package/dist/src/modules/access/access.test.d.ts +2 -0
- package/dist/src/modules/access/access.test.d.ts.map +1 -0
- package/dist/src/modules/access/access.utils.d.ts +17 -0
- package/dist/src/modules/access/access.utils.d.ts.map +1 -0
- package/dist/src/modules/ai/ai.db.d.ts +396 -0
- package/dist/src/modules/ai/ai.db.d.ts.map +1 -0
- package/dist/src/modules/ai/ai.prompt.d.ts +28 -0
- package/dist/src/modules/ai/ai.prompt.d.ts.map +1 -0
- package/dist/src/modules/ai/ai.repository.d.ts +424 -0
- package/dist/src/modules/ai/ai.repository.d.ts.map +1 -0
- package/dist/src/modules/ai/ai.router.d.ts +2 -0
- package/dist/src/modules/ai/ai.router.d.ts.map +1 -0
- package/dist/src/modules/ai/ai.service.d.ts +115 -0
- package/dist/src/modules/ai/ai.service.d.ts.map +1 -0
- package/dist/src/modules/ai/ai.trpc.d.ts +59 -0
- package/dist/src/modules/ai/ai.trpc.d.ts.map +1 -0
- package/dist/src/modules/ai/ideogram/ideogram.constants.d.ts +8 -0
- package/dist/src/modules/ai/ideogram/ideogram.constants.d.ts.map +1 -0
- package/dist/src/modules/ai/ideogram/ideogram.dto.d.ts +230 -0
- package/dist/src/modules/ai/ideogram/ideogram.dto.d.ts.map +1 -0
- package/dist/src/modules/ai/ideogram/ideogram.prompt.d.ts +3 -0
- package/dist/src/modules/ai/ideogram/ideogram.prompt.d.ts.map +1 -0
- package/dist/src/modules/ai/ideogram/ideogram.repository.d.ts +7 -0
- package/dist/src/modules/ai/ideogram/ideogram.repository.d.ts.map +1 -0
- package/dist/src/modules/ai/ideogram/ideogram.service.d.ts +10 -0
- package/dist/src/modules/ai/ideogram/ideogram.service.d.ts.map +1 -0
- package/dist/src/modules/auth/auth.db.d.ts +2336 -0
- package/dist/src/modules/auth/auth.db.d.ts.map +1 -0
- package/dist/src/modules/auth/auth.dto.d.ts +66 -0
- package/dist/src/modules/auth/auth.dto.d.ts.map +1 -0
- package/dist/src/modules/auth/auth.lib.d.ts +4874 -0
- package/dist/src/modules/auth/auth.lib.d.ts.map +1 -0
- package/dist/src/modules/auth/auth.middleware.d.ts +615 -0
- package/dist/src/modules/auth/auth.middleware.d.ts.map +1 -0
- package/dist/src/modules/auth/auth.repository.d.ts +2417 -0
- package/dist/src/modules/auth/auth.repository.d.ts.map +1 -0
- package/dist/src/modules/auth/auth.service.d.ts +104 -0
- package/dist/src/modules/auth/auth.service.d.ts.map +1 -0
- package/dist/src/modules/auth/auth.trpc.d.ts +309 -0
- package/dist/src/modules/auth/auth.trpc.d.ts.map +1 -0
- package/dist/src/modules/auth/auth.utils.d.ts +2352 -0
- package/dist/src/modules/auth/auth.utils.d.ts.map +1 -0
- package/dist/src/modules/base/base.abstract.d.ts +19 -0
- package/dist/src/modules/base/base.abstract.d.ts.map +1 -0
- package/dist/src/modules/base/base.dto.d.ts +70 -0
- package/dist/src/modules/base/base.dto.d.ts.map +1 -0
- package/dist/src/modules/base/base.grants.d.ts +29 -0
- package/dist/src/modules/base/base.grants.d.ts.map +1 -0
- package/dist/src/modules/base/base.grants.test.d.ts +2 -0
- package/dist/src/modules/base/base.grants.test.d.ts.map +1 -0
- package/dist/src/modules/base/base.repository.d.ts +97 -0
- package/dist/src/modules/base/base.repository.d.ts.map +1 -0
- package/dist/src/modules/base/base.service.d.ts +42 -0
- package/dist/src/modules/base/base.service.d.ts.map +1 -0
- package/dist/src/modules/base/base.types.d.ts +2 -0
- package/dist/src/modules/base/base.types.d.ts.map +1 -0
- package/dist/src/modules/billing/billing.db.d.ts +366 -0
- package/dist/src/modules/billing/billing.db.d.ts.map +1 -0
- package/dist/src/modules/billing/billing.repository.d.ts +2764 -0
- package/dist/src/modules/billing/billing.repository.d.ts.map +1 -0
- package/dist/src/modules/billing/billing.router.d.ts +5 -0
- package/dist/src/modules/billing/billing.router.d.ts.map +1 -0
- package/dist/src/modules/billing/billing.service.d.ts +60 -0
- package/dist/src/modules/billing/billing.service.d.ts.map +1 -0
- package/dist/src/modules/billing/billing.trpc.d.ts +75 -0
- package/dist/src/modules/billing/billing.trpc.d.ts.map +1 -0
- package/dist/src/modules/clay/clay.repository.d.ts +6 -0
- package/dist/src/modules/clay/clay.repository.d.ts.map +1 -0
- package/dist/src/modules/clay/clay.service.d.ts +29 -0
- package/dist/src/modules/clay/clay.service.d.ts.map +1 -0
- package/dist/src/modules/connect/connect.db.d.ts +357 -0
- package/dist/src/modules/connect/connect.db.d.ts.map +1 -0
- package/dist/src/modules/connect/connect.dto.d.ts +75 -0
- package/dist/src/modules/connect/connect.dto.d.ts.map +1 -0
- package/dist/src/modules/connect/connect.linkedin.d.ts +3 -0
- package/dist/src/modules/connect/connect.linkedin.d.ts.map +1 -0
- package/dist/src/modules/connect/connect.oauth.d.ts +28 -0
- package/dist/src/modules/connect/connect.oauth.d.ts.map +1 -0
- package/dist/src/modules/connect/connect.repository.d.ts +414 -0
- package/dist/src/modules/connect/connect.repository.d.ts.map +1 -0
- package/dist/src/modules/connect/connect.router.d.ts +5 -0
- package/dist/src/modules/connect/connect.router.d.ts.map +1 -0
- package/dist/src/modules/connect/connect.service.d.ts +89 -0
- package/dist/src/modules/connect/connect.service.d.ts.map +1 -0
- package/dist/src/modules/connect/connect.trpc.d.ts +81 -0
- package/dist/src/modules/connect/connect.trpc.d.ts.map +1 -0
- package/dist/src/modules/connect/connect.types.d.ts +26 -0
- package/dist/src/modules/connect/connect.types.d.ts.map +1 -0
- package/dist/src/modules/crypto/crypto.db.d.ts +152 -0
- package/dist/src/modules/crypto/crypto.db.d.ts.map +1 -0
- package/dist/src/modules/crypto/crypto.repository.d.ts +160 -0
- package/dist/src/modules/crypto/crypto.repository.d.ts.map +1 -0
- package/dist/src/modules/crypto/crypto.service.d.ts +11 -0
- package/dist/src/modules/crypto/crypto.service.d.ts.map +1 -0
- package/dist/src/modules/email/email.service.d.ts +57 -0
- package/dist/src/modules/email/email.service.d.ts.map +1 -0
- package/dist/src/modules/file/file.repository.d.ts +13 -0
- package/dist/src/modules/file/file.repository.d.ts.map +1 -0
- package/dist/src/modules/file/file.router.d.ts +4 -0
- package/dist/src/modules/file/file.router.d.ts.map +1 -0
- package/dist/src/modules/file/file.service.d.ts +25 -0
- package/dist/src/modules/file/file.service.d.ts.map +1 -0
- package/dist/src/modules/recurrence/recurrence.db.d.ts +563 -0
- package/dist/src/modules/recurrence/recurrence.db.d.ts.map +1 -0
- package/dist/src/modules/recurrence/recurrence.repository.d.ts +585 -0
- package/dist/src/modules/recurrence/recurrence.repository.d.ts.map +1 -0
- package/dist/src/modules/recurrence/recurrence.service.d.ts +30 -0
- package/dist/src/modules/recurrence/recurrence.service.d.ts.map +1 -0
- package/dist/src/modules/recurrence/recurrence.trpc.d.ts +243 -0
- package/dist/src/modules/recurrence/recurrence.trpc.d.ts.map +1 -0
- package/dist/src/modules/social/social.dto.d.ts +35 -0
- package/dist/src/modules/social/social.dto.d.ts.map +1 -0
- package/dist/src/modules/social/social.linkedin.d.ts +11 -0
- package/dist/src/modules/social/social.linkedin.d.ts.map +1 -0
- package/dist/src/modules/social/social.linkedin.test.d.ts +2 -0
- package/dist/src/modules/social/social.linkedin.test.d.ts.map +1 -0
- package/dist/src/modules/social/social.service.d.ts +29 -0
- package/dist/src/modules/social/social.service.d.ts.map +1 -0
- package/dist/src/modules/social/social.types.d.ts +36 -0
- package/dist/src/modules/social/social.types.d.ts.map +1 -0
- package/dist/src/modules/tag/tag.db.d.ts +347 -0
- package/dist/src/modules/tag/tag.db.d.ts.map +1 -0
- package/dist/src/modules/tag/tag.dto.d.ts +1019 -0
- package/dist/src/modules/tag/tag.dto.d.ts.map +1 -0
- package/dist/src/modules/tag/tag.repository.d.ts +384 -0
- package/dist/src/modules/tag/tag.repository.d.ts.map +1 -0
- package/dist/src/modules/tag/tag.service.d.ts +36 -0
- package/dist/src/modules/tag/tag.service.d.ts.map +1 -0
- package/dist/src/modules/tag/tag.trpc.d.ts +191 -0
- package/dist/src/modules/tag/tag.trpc.d.ts.map +1 -0
- package/dist/src/modules/utils/applyPagination.d.ts +7 -0
- package/dist/src/modules/utils/applyPagination.d.ts.map +1 -0
- package/dist/src/modules/utils/applySorting.d.ts +9 -0
- package/dist/src/modules/utils/applySorting.d.ts.map +1 -0
- package/dist/src/modules/utils/getConditionsFromFilters.d.ts +5 -0
- package/dist/src/modules/utils/getConditionsFromFilters.d.ts.map +1 -0
- package/dist/src/modules/video/video.service.d.ts +8 -0
- package/dist/src/modules/video/video.service.d.ts.map +1 -0
- package/dist/src/modules/webhook/webhook.constants.d.ts +9 -0
- package/dist/src/modules/webhook/webhook.constants.d.ts.map +1 -0
- package/dist/src/modules/webhook/webhook.db.d.ts +137 -0
- package/dist/src/modules/webhook/webhook.db.d.ts.map +1 -0
- package/dist/src/modules/webhook/webhook.dto.d.ts +395 -0
- package/dist/src/modules/webhook/webhook.dto.d.ts.map +1 -0
- package/dist/src/modules/webhook/webhook.repository.d.ts +149 -0
- package/dist/src/modules/webhook/webhook.repository.d.ts.map +1 -0
- package/dist/src/modules/webhook/webhook.router.d.ts +4 -0
- package/dist/src/modules/webhook/webhook.router.d.ts.map +1 -0
- package/dist/src/modules/webhook/webhook.service.d.ts +10 -0
- package/dist/src/modules/webhook/webhook.service.d.ts.map +1 -0
- package/dist/src/modules/workflow/workflow.db.d.ts +297 -0
- package/dist/src/modules/workflow/workflow.db.d.ts.map +1 -0
- package/dist/src/modules/workflow/workflow.repository.d.ts +344 -0
- package/dist/src/modules/workflow/workflow.repository.d.ts.map +1 -0
- package/dist/src/modules/workflow/workflow.service.d.ts +22 -0
- package/dist/src/modules/workflow/workflow.service.d.ts.map +1 -0
- package/dist/src/modules/workflow/workflow.trpc.d.ts +93 -0
- package/dist/src/modules/workflow/workflow.trpc.d.ts.map +1 -0
- package/dist/src/modules/workflow/workflow.types.d.ts +21 -0
- package/dist/src/modules/workflow/workflow.types.d.ts.map +1 -0
- package/dist/src/modules/workflow/workflow.utils.d.ts +22 -0
- package/dist/src/modules/workflow/workflow.utils.d.ts.map +1 -0
- package/dist/src/test/stubs/utils.d.ts +3 -0
- package/dist/src/test/stubs/utils.d.ts.map +1 -0
- package/dist/src/trpc/context.d.ts +42 -0
- package/dist/src/trpc/context.d.ts.map +1 -0
- package/dist/src/trpc/index.d.ts +4 -0
- package/dist/src/trpc/index.d.ts.map +1 -0
- package/dist/src/trpc/procedures.d.ts +234 -0
- package/dist/src/trpc/procedures.d.ts.map +1 -0
- package/dist/src/trpc/utils.d.ts +5 -0
- package/dist/src/trpc/utils.d.ts.map +1 -0
- package/dist/src/types.d.ts +486 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/utils/errors.d.ts +50 -0
- package/dist/src/utils/errors.d.ts.map +1 -0
- package/dist/src/utils/logger.d.ts +2 -0
- package/dist/src/utils/logger.d.ts.map +1 -0
- package/dist/src/utils/posthog.d.ts +14 -0
- package/dist/src/utils/posthog.d.ts.map +1 -0
- package/dist/src/utils/types.d.ts +5 -0
- package/dist/src/utils/types.d.ts.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/jest.config.ts +19 -0
- package/package.json +3 -6
- package/tsconfig.json +19 -0
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
import type { Mastra } from "@mastra/core";
|
|
2
|
+
import type { AIService } from "#modules/ai/ai.service";
|
|
3
|
+
import type { AuthService } from "#modules/auth/auth.service";
|
|
4
|
+
import type { BillingService } from "#modules/billing/billing.service";
|
|
5
|
+
export declare const createAuthTRPCRouter: <MastraInstance extends Mastra>(authService: AuthService, aiService: AIService<MastraInstance>, billingService: BillingService) => import("@trpc/server").TRPCBuiltRouter<{
|
|
6
|
+
ctx: {
|
|
7
|
+
session: {
|
|
8
|
+
id: string;
|
|
9
|
+
userId: string;
|
|
10
|
+
expiresAt: Date;
|
|
11
|
+
createdAt: Date;
|
|
12
|
+
updatedAt: Date;
|
|
13
|
+
token: string;
|
|
14
|
+
ipAddress: string | null;
|
|
15
|
+
userAgent: string | null;
|
|
16
|
+
impersonatedBy: string | null;
|
|
17
|
+
activeOrganizationId: string | null;
|
|
18
|
+
activeOrganizationRole: string | null;
|
|
19
|
+
activeTeamId: string | null;
|
|
20
|
+
activeTeamRole: string | null;
|
|
21
|
+
};
|
|
22
|
+
user: {
|
|
23
|
+
name: string;
|
|
24
|
+
image: string | null;
|
|
25
|
+
id: string;
|
|
26
|
+
createdAt: Date;
|
|
27
|
+
updatedAt: Date;
|
|
28
|
+
email: string;
|
|
29
|
+
metadata: Record<string, unknown>;
|
|
30
|
+
emailVerified: boolean;
|
|
31
|
+
role: string | null;
|
|
32
|
+
banned: boolean | null;
|
|
33
|
+
banReason: string | null;
|
|
34
|
+
banExpires: Date | null;
|
|
35
|
+
stripeCustomerId: string | null;
|
|
36
|
+
paymentCustomerId: string | null;
|
|
37
|
+
paymentPlanTier: string | null;
|
|
38
|
+
paymentPlanExpiresAt: Date | null;
|
|
39
|
+
preferences: string | null;
|
|
40
|
+
onboarding: number | null;
|
|
41
|
+
flags: string | null;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
45
|
+
errorShape: import("@trpc/server").TRPCDefaultErrorShape;
|
|
46
|
+
transformer: true;
|
|
47
|
+
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
48
|
+
auth: import("@trpc/server").TRPCBuiltRouter<{
|
|
49
|
+
ctx: {
|
|
50
|
+
session: {
|
|
51
|
+
id: string;
|
|
52
|
+
userId: string;
|
|
53
|
+
expiresAt: Date;
|
|
54
|
+
createdAt: Date;
|
|
55
|
+
updatedAt: Date;
|
|
56
|
+
token: string;
|
|
57
|
+
ipAddress: string | null;
|
|
58
|
+
userAgent: string | null;
|
|
59
|
+
impersonatedBy: string | null;
|
|
60
|
+
activeOrganizationId: string | null;
|
|
61
|
+
activeOrganizationRole: string | null;
|
|
62
|
+
activeTeamId: string | null;
|
|
63
|
+
activeTeamRole: string | null;
|
|
64
|
+
};
|
|
65
|
+
user: {
|
|
66
|
+
name: string;
|
|
67
|
+
image: string | null;
|
|
68
|
+
id: string;
|
|
69
|
+
createdAt: Date;
|
|
70
|
+
updatedAt: Date;
|
|
71
|
+
email: string;
|
|
72
|
+
metadata: Record<string, unknown>;
|
|
73
|
+
emailVerified: boolean;
|
|
74
|
+
role: string | null;
|
|
75
|
+
banned: boolean | null;
|
|
76
|
+
banReason: string | null;
|
|
77
|
+
banExpires: Date | null;
|
|
78
|
+
stripeCustomerId: string | null;
|
|
79
|
+
paymentCustomerId: string | null;
|
|
80
|
+
paymentPlanTier: string | null;
|
|
81
|
+
paymentPlanExpiresAt: Date | null;
|
|
82
|
+
preferences: string | null;
|
|
83
|
+
onboarding: number | null;
|
|
84
|
+
flags: string | null;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
88
|
+
errorShape: import("@trpc/server").TRPCDefaultErrorShape;
|
|
89
|
+
transformer: true;
|
|
90
|
+
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
91
|
+
getUserWaitlistCount: import("@trpc/server").TRPCQueryProcedure<{
|
|
92
|
+
input: void;
|
|
93
|
+
output: number;
|
|
94
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
95
|
+
}>;
|
|
96
|
+
createInvitationCode: import("@trpc/server").TRPCMutationProcedure<{
|
|
97
|
+
input: {
|
|
98
|
+
name?: string | undefined;
|
|
99
|
+
};
|
|
100
|
+
output: {
|
|
101
|
+
id: string;
|
|
102
|
+
name: string | null;
|
|
103
|
+
email: string | null;
|
|
104
|
+
createdAt: Date;
|
|
105
|
+
updatedAt: Date | null;
|
|
106
|
+
status: string;
|
|
107
|
+
code: string | null;
|
|
108
|
+
expiresAt: Date | null;
|
|
109
|
+
};
|
|
110
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
111
|
+
}>;
|
|
112
|
+
createAccountClaimCode: import("@trpc/server").TRPCMutationProcedure<{
|
|
113
|
+
input: {
|
|
114
|
+
userId: string;
|
|
115
|
+
expiresInHours?: number | undefined;
|
|
116
|
+
};
|
|
117
|
+
output: {
|
|
118
|
+
id: string;
|
|
119
|
+
claimUserId: string | null;
|
|
120
|
+
code: string | null;
|
|
121
|
+
status: string;
|
|
122
|
+
expiresAt: Date | null;
|
|
123
|
+
claimedAt: Date | null;
|
|
124
|
+
claimedEmail: string | null;
|
|
125
|
+
createdAt: Date;
|
|
126
|
+
updatedAt: Date | null;
|
|
127
|
+
};
|
|
128
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
129
|
+
}>;
|
|
130
|
+
listAccountClaims: import("@trpc/server").TRPCQueryProcedure<{
|
|
131
|
+
input: void;
|
|
132
|
+
output: {
|
|
133
|
+
id: string;
|
|
134
|
+
expiresAt: Date | null;
|
|
135
|
+
createdAt: Date;
|
|
136
|
+
updatedAt: Date | null;
|
|
137
|
+
status: string;
|
|
138
|
+
claimUserId: string | null;
|
|
139
|
+
claimedAt: Date | null;
|
|
140
|
+
claimedEmail: string | null;
|
|
141
|
+
}[];
|
|
142
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
143
|
+
}>;
|
|
144
|
+
generateAccountClaimMagicLink: import("@trpc/server").TRPCMutationProcedure<{
|
|
145
|
+
input: {
|
|
146
|
+
claimId: string;
|
|
147
|
+
email?: string | undefined;
|
|
148
|
+
};
|
|
149
|
+
output: {
|
|
150
|
+
id: string;
|
|
151
|
+
userId: string;
|
|
152
|
+
expiresAt: Date | null;
|
|
153
|
+
createdAt: Date;
|
|
154
|
+
email: string;
|
|
155
|
+
url: string;
|
|
156
|
+
claimId: string;
|
|
157
|
+
};
|
|
158
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
159
|
+
}>;
|
|
160
|
+
listAccountClaimMagicLinks: import("@trpc/server").TRPCQueryProcedure<{
|
|
161
|
+
input: {
|
|
162
|
+
claimId: string;
|
|
163
|
+
};
|
|
164
|
+
output: {
|
|
165
|
+
id: string;
|
|
166
|
+
userId: string;
|
|
167
|
+
expiresAt: Date | null;
|
|
168
|
+
createdAt: Date;
|
|
169
|
+
email: string;
|
|
170
|
+
url: string;
|
|
171
|
+
claimId: string;
|
|
172
|
+
}[];
|
|
173
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
174
|
+
}>;
|
|
175
|
+
getMyAccountClaimStatus: import("@trpc/server").TRPCQueryProcedure<{
|
|
176
|
+
input: void;
|
|
177
|
+
output: {
|
|
178
|
+
id: string;
|
|
179
|
+
claimUserId: string | null;
|
|
180
|
+
code: string | null;
|
|
181
|
+
status: string;
|
|
182
|
+
expiresAt: Date | null;
|
|
183
|
+
claimedAt: Date | null;
|
|
184
|
+
claimedEmail: string | null;
|
|
185
|
+
createdAt: Date;
|
|
186
|
+
updatedAt: Date | null;
|
|
187
|
+
} | null;
|
|
188
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
189
|
+
}>;
|
|
190
|
+
setMyAccountClaimEmail: import("@trpc/server").TRPCMutationProcedure<{
|
|
191
|
+
input: {
|
|
192
|
+
email: string;
|
|
193
|
+
};
|
|
194
|
+
output: {
|
|
195
|
+
status: boolean;
|
|
196
|
+
};
|
|
197
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
198
|
+
}>;
|
|
199
|
+
acceptMyAccountClaim: import("@trpc/server").TRPCMutationProcedure<{
|
|
200
|
+
input: void;
|
|
201
|
+
output: {
|
|
202
|
+
status: boolean;
|
|
203
|
+
};
|
|
204
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
205
|
+
}>;
|
|
206
|
+
listWaitlist: import("@trpc/server").TRPCQueryProcedure<{
|
|
207
|
+
input: void;
|
|
208
|
+
output: {
|
|
209
|
+
id: string;
|
|
210
|
+
name: string | null;
|
|
211
|
+
email: string | null;
|
|
212
|
+
createdAt: Date;
|
|
213
|
+
updatedAt: Date | null;
|
|
214
|
+
status: string;
|
|
215
|
+
code: string | null;
|
|
216
|
+
expiresAt: Date | null;
|
|
217
|
+
}[];
|
|
218
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
219
|
+
}>;
|
|
220
|
+
listAdminWaitlist: import("@trpc/server").TRPCQueryProcedure<{
|
|
221
|
+
input: void;
|
|
222
|
+
output: {
|
|
223
|
+
name: string | null;
|
|
224
|
+
id: string;
|
|
225
|
+
createdAt: Date;
|
|
226
|
+
updatedAt: Date | null;
|
|
227
|
+
email: string | null;
|
|
228
|
+
status: string;
|
|
229
|
+
}[];
|
|
230
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
231
|
+
}>;
|
|
232
|
+
addToWaitlist: import("@trpc/server").TRPCMutationProcedure<{
|
|
233
|
+
input: {
|
|
234
|
+
email: string;
|
|
235
|
+
};
|
|
236
|
+
output: {
|
|
237
|
+
name: string | null;
|
|
238
|
+
id: string;
|
|
239
|
+
createdAt: Date;
|
|
240
|
+
updatedAt: Date | null;
|
|
241
|
+
email: string | null;
|
|
242
|
+
status: string;
|
|
243
|
+
};
|
|
244
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
245
|
+
}>;
|
|
246
|
+
inviteToWaitlist: import("@trpc/server").TRPCMutationProcedure<{
|
|
247
|
+
input: {
|
|
248
|
+
email: string;
|
|
249
|
+
name?: string | undefined;
|
|
250
|
+
};
|
|
251
|
+
output: {
|
|
252
|
+
id: string;
|
|
253
|
+
name: string | null;
|
|
254
|
+
email: string | null;
|
|
255
|
+
createdAt: Date;
|
|
256
|
+
updatedAt: Date | null;
|
|
257
|
+
status: string;
|
|
258
|
+
code: string | null;
|
|
259
|
+
expiresAt: Date | null;
|
|
260
|
+
};
|
|
261
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
262
|
+
}>;
|
|
263
|
+
inviteFromWaitlist: import("@trpc/server").TRPCMutationProcedure<{
|
|
264
|
+
input: {
|
|
265
|
+
id: string;
|
|
266
|
+
};
|
|
267
|
+
output: {
|
|
268
|
+
name: string | null;
|
|
269
|
+
id: string;
|
|
270
|
+
createdAt: Date;
|
|
271
|
+
updatedAt: Date | null;
|
|
272
|
+
email: string | null;
|
|
273
|
+
status: string;
|
|
274
|
+
};
|
|
275
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
276
|
+
}>;
|
|
277
|
+
removeFromWaitlist: import("@trpc/server").TRPCMutationProcedure<{
|
|
278
|
+
input: {
|
|
279
|
+
id: string;
|
|
280
|
+
};
|
|
281
|
+
output: {
|
|
282
|
+
name: string | null;
|
|
283
|
+
id: string;
|
|
284
|
+
createdAt: Date;
|
|
285
|
+
updatedAt: Date | null;
|
|
286
|
+
email: string | null;
|
|
287
|
+
status: string;
|
|
288
|
+
};
|
|
289
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
290
|
+
}>;
|
|
291
|
+
joinWaitlist: import("@trpc/server").TRPCMutationProcedure<{
|
|
292
|
+
input: {
|
|
293
|
+
email: string;
|
|
294
|
+
};
|
|
295
|
+
output: {
|
|
296
|
+
name: string | null;
|
|
297
|
+
id: string;
|
|
298
|
+
createdAt: Date;
|
|
299
|
+
updatedAt: Date | null;
|
|
300
|
+
email: string | null;
|
|
301
|
+
status: string;
|
|
302
|
+
};
|
|
303
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
304
|
+
}>;
|
|
305
|
+
getOnboarding: import("@trpc/server").TRPCQueryProcedure<{
|
|
306
|
+
input: void;
|
|
307
|
+
output: number;
|
|
308
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
309
|
+
}>;
|
|
310
|
+
setOnboarding: import("@trpc/server").TRPCMutationProcedure<{
|
|
311
|
+
input: number;
|
|
312
|
+
output: number;
|
|
313
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
314
|
+
}>;
|
|
315
|
+
getPreferences: import("@trpc/server").TRPCQueryProcedure<{
|
|
316
|
+
input: void;
|
|
317
|
+
output: Record<string, unknown>;
|
|
318
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
319
|
+
}>;
|
|
320
|
+
setPreferences: import("@trpc/server").TRPCMutationProcedure<{
|
|
321
|
+
input: Record<string, unknown>;
|
|
322
|
+
output: Record<string, unknown>;
|
|
323
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
324
|
+
}>;
|
|
325
|
+
getMetadata: import("@trpc/server").TRPCQueryProcedure<{
|
|
326
|
+
input: void;
|
|
327
|
+
output: Record<string, unknown>;
|
|
328
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
329
|
+
}>;
|
|
330
|
+
setMetadata: import("@trpc/server").TRPCMutationProcedure<{
|
|
331
|
+
input: Record<string, unknown>;
|
|
332
|
+
output: Record<string, unknown>;
|
|
333
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
334
|
+
}>;
|
|
335
|
+
getFlags: import("@trpc/server").TRPCQueryProcedure<{
|
|
336
|
+
input: void;
|
|
337
|
+
output: string[];
|
|
338
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
339
|
+
}>;
|
|
340
|
+
setFlags: import("@trpc/server").TRPCMutationProcedure<{
|
|
341
|
+
input: string[];
|
|
342
|
+
output: string[];
|
|
343
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
344
|
+
}>;
|
|
345
|
+
validateWaitlistCode: import("@trpc/server").TRPCQueryProcedure<{
|
|
346
|
+
input: {
|
|
347
|
+
code: string;
|
|
348
|
+
};
|
|
349
|
+
output: {
|
|
350
|
+
status: string;
|
|
351
|
+
};
|
|
352
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
353
|
+
}>;
|
|
354
|
+
}>>;
|
|
355
|
+
ai: import("@trpc/server").TRPCBuiltRouter<{
|
|
356
|
+
ctx: {
|
|
357
|
+
session: {
|
|
358
|
+
id: string;
|
|
359
|
+
userId: string;
|
|
360
|
+
expiresAt: Date;
|
|
361
|
+
createdAt: Date;
|
|
362
|
+
updatedAt: Date;
|
|
363
|
+
token: string;
|
|
364
|
+
ipAddress: string | null;
|
|
365
|
+
userAgent: string | null;
|
|
366
|
+
impersonatedBy: string | null;
|
|
367
|
+
activeOrganizationId: string | null;
|
|
368
|
+
activeOrganizationRole: string | null;
|
|
369
|
+
activeTeamId: string | null;
|
|
370
|
+
activeTeamRole: string | null;
|
|
371
|
+
};
|
|
372
|
+
user: {
|
|
373
|
+
name: string;
|
|
374
|
+
image: string | null;
|
|
375
|
+
id: string;
|
|
376
|
+
createdAt: Date;
|
|
377
|
+
updatedAt: Date;
|
|
378
|
+
email: string;
|
|
379
|
+
metadata: Record<string, unknown>;
|
|
380
|
+
emailVerified: boolean;
|
|
381
|
+
role: string | null;
|
|
382
|
+
banned: boolean | null;
|
|
383
|
+
banReason: string | null;
|
|
384
|
+
banExpires: Date | null;
|
|
385
|
+
stripeCustomerId: string | null;
|
|
386
|
+
paymentCustomerId: string | null;
|
|
387
|
+
paymentPlanTier: string | null;
|
|
388
|
+
paymentPlanExpiresAt: Date | null;
|
|
389
|
+
preferences: string | null;
|
|
390
|
+
onboarding: number | null;
|
|
391
|
+
flags: string | null;
|
|
392
|
+
};
|
|
393
|
+
};
|
|
394
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
395
|
+
errorShape: import("@trpc/server").TRPCDefaultErrorShape;
|
|
396
|
+
transformer: true;
|
|
397
|
+
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
398
|
+
getUserUsage: import("@trpc/server").TRPCQueryProcedure<{
|
|
399
|
+
input: {
|
|
400
|
+
userId: string;
|
|
401
|
+
};
|
|
402
|
+
output: {
|
|
403
|
+
inputTokens: number | null;
|
|
404
|
+
outputTokens: number | null;
|
|
405
|
+
totalTokens: number | null;
|
|
406
|
+
cost: number | null;
|
|
407
|
+
};
|
|
408
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
409
|
+
}>;
|
|
410
|
+
}>>;
|
|
411
|
+
billing: import("@trpc/server").TRPCBuiltRouter<{
|
|
412
|
+
ctx: {
|
|
413
|
+
session: {
|
|
414
|
+
id: string;
|
|
415
|
+
userId: string;
|
|
416
|
+
expiresAt: Date;
|
|
417
|
+
createdAt: Date;
|
|
418
|
+
updatedAt: Date;
|
|
419
|
+
token: string;
|
|
420
|
+
ipAddress: string | null;
|
|
421
|
+
userAgent: string | null;
|
|
422
|
+
impersonatedBy: string | null;
|
|
423
|
+
activeOrganizationId: string | null;
|
|
424
|
+
activeOrganizationRole: string | null;
|
|
425
|
+
activeTeamId: string | null;
|
|
426
|
+
activeTeamRole: string | null;
|
|
427
|
+
};
|
|
428
|
+
user: {
|
|
429
|
+
name: string;
|
|
430
|
+
image: string | null;
|
|
431
|
+
id: string;
|
|
432
|
+
createdAt: Date;
|
|
433
|
+
updatedAt: Date;
|
|
434
|
+
email: string;
|
|
435
|
+
metadata: Record<string, unknown>;
|
|
436
|
+
emailVerified: boolean;
|
|
437
|
+
role: string | null;
|
|
438
|
+
banned: boolean | null;
|
|
439
|
+
banReason: string | null;
|
|
440
|
+
banExpires: Date | null;
|
|
441
|
+
stripeCustomerId: string | null;
|
|
442
|
+
paymentCustomerId: string | null;
|
|
443
|
+
paymentPlanTier: string | null;
|
|
444
|
+
paymentPlanExpiresAt: Date | null;
|
|
445
|
+
preferences: string | null;
|
|
446
|
+
onboarding: number | null;
|
|
447
|
+
flags: string | null;
|
|
448
|
+
};
|
|
449
|
+
};
|
|
450
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
451
|
+
errorShape: import("@trpc/server").TRPCDefaultErrorShape;
|
|
452
|
+
transformer: true;
|
|
453
|
+
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
454
|
+
getActiveSubscription: import("@trpc/server").TRPCQueryProcedure<{
|
|
455
|
+
input: void;
|
|
456
|
+
output: {
|
|
457
|
+
id: string;
|
|
458
|
+
plan: string;
|
|
459
|
+
referenceId: string;
|
|
460
|
+
status: string;
|
|
461
|
+
stripeCustomerId?: string | null | undefined;
|
|
462
|
+
stripeSubscriptionId?: string | null | undefined;
|
|
463
|
+
periodStart?: Date | null | undefined;
|
|
464
|
+
periodEnd?: Date | null | undefined;
|
|
465
|
+
cancelAtPeriodEnd?: boolean | null | undefined;
|
|
466
|
+
cancelAt?: Date | null | undefined;
|
|
467
|
+
canceledAt?: Date | null | undefined;
|
|
468
|
+
seats?: number | null | undefined;
|
|
469
|
+
trialStart?: Date | null | undefined;
|
|
470
|
+
trialEnd?: Date | null | undefined;
|
|
471
|
+
priceId?: string | null | undefined;
|
|
472
|
+
interval?: string | null | undefined;
|
|
473
|
+
unitAmount?: number | null | undefined;
|
|
474
|
+
discounts?: string[] | null | undefined;
|
|
475
|
+
} | null;
|
|
476
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
477
|
+
}>;
|
|
478
|
+
listInvoices: import("@trpc/server").TRPCQueryProcedure<{
|
|
479
|
+
input: void;
|
|
480
|
+
output: import("stripe").Stripe.Invoice[];
|
|
481
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
482
|
+
}>;
|
|
483
|
+
}>>;
|
|
484
|
+
}>>;
|
|
485
|
+
export type BackendTRPCRouter = ReturnType<typeof createAuthTRPCRouter>;
|
|
486
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAIvE,eAAO,MAAM,oBAAoB,GAAI,cAAc,SAAS,MAAM,EAChE,aAAa,WAAW,EACxB,WAAW,SAAS,CAAC,cAAc,CAAC,EACpC,gBAAgB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAM5B,CAAC;AAEL,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { captureException } from "@sentry/node";
|
|
2
|
+
import { type TRPC_ERROR_CODE_KEY, TRPCError } from "@trpc/server";
|
|
3
|
+
import type { ServerErrorLayer } from "#modules/base/base.types";
|
|
4
|
+
export type { ServerErrorLayer };
|
|
5
|
+
export declare class ServerError extends Error {
|
|
6
|
+
readonly code: TRPC_ERROR_CODE_KEY;
|
|
7
|
+
readonly layer: ServerErrorLayer;
|
|
8
|
+
readonly layerName: string;
|
|
9
|
+
readonly clientMessage?: string;
|
|
10
|
+
readonly context?: Record<string, unknown>;
|
|
11
|
+
readonly boundaryStack?: string;
|
|
12
|
+
constructor({ code, layer, layerName, message, clientMessage, cause, context, captureBoundary, }: {
|
|
13
|
+
code: TRPC_ERROR_CODE_KEY;
|
|
14
|
+
layer?: ServerErrorLayer;
|
|
15
|
+
layerName?: string;
|
|
16
|
+
message?: string;
|
|
17
|
+
clientMessage?: string;
|
|
18
|
+
cause?: unknown;
|
|
19
|
+
context?: Record<string, unknown>;
|
|
20
|
+
captureBoundary?: boolean;
|
|
21
|
+
});
|
|
22
|
+
is5xxError(): boolean;
|
|
23
|
+
getHTTPStatusCode(): number;
|
|
24
|
+
toTRPC(): TRPCError;
|
|
25
|
+
toJSON(): {
|
|
26
|
+
code: "PARSE_ERROR" | "BAD_REQUEST" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_SUPPORTED" | "TIMEOUT" | "CONFLICT" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "UNSUPPORTED_MEDIA_TYPE" | "UNPROCESSABLE_CONTENT" | "TOO_MANY_REQUESTS" | "CLIENT_CLOSED_REQUEST";
|
|
27
|
+
layer: ServerErrorLayer;
|
|
28
|
+
layerName: string;
|
|
29
|
+
message: string;
|
|
30
|
+
context: Record<string, unknown> | undefined;
|
|
31
|
+
stack: string | undefined;
|
|
32
|
+
boundaryStack: string | undefined;
|
|
33
|
+
cause: unknown;
|
|
34
|
+
};
|
|
35
|
+
static fromUnknown(code: TRPC_ERROR_CODE_KEY, cause: unknown, opts?: {
|
|
36
|
+
layer?: ServerErrorLayer;
|
|
37
|
+
layerName?: string;
|
|
38
|
+
context?: Record<string, unknown>;
|
|
39
|
+
}): ServerError;
|
|
40
|
+
}
|
|
41
|
+
export type ErrorReporter = {
|
|
42
|
+
captureException: (err: Parameters<typeof captureException>[0], hint?: Parameters<typeof captureException>[1]) => string;
|
|
43
|
+
};
|
|
44
|
+
declare global {
|
|
45
|
+
var m5ErrorReporter: ErrorReporter | undefined;
|
|
46
|
+
}
|
|
47
|
+
export declare function getErrorReporter(): ErrorReporter | undefined;
|
|
48
|
+
export declare function setErrorReporter(reporter: ErrorReporter): void;
|
|
49
|
+
export declare function reportError(err: ServerError | Error | unknown, hint?: Parameters<typeof captureException>[1]): string | undefined;
|
|
50
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/utils/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,KAAK,mBAAmB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAGjE,YAAY,EAAE,gBAAgB,EAAE,CAAC;AACjC,qBAAa,WAAY,SAAQ,KAAK;IACpC,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAC;IACjC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3C,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;gBAEpB,EACV,IAAI,EACJ,KAAK,EACL,SAAS,EACT,OAAO,EACP,aAAa,EACb,KAAK,EACL,OAAO,EACP,eAAsB,GACvB,EAAE;QACD,IAAI,EAAE,mBAAmB,CAAC;QAC1B,KAAK,CAAC,EAAE,gBAAgB,CAAC;QACzB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAClC,eAAe,CAAC,EAAE,OAAO,CAAC;KAC3B;IAiBD,UAAU,IAAI,OAAO;IAKrB,iBAAiB,IAAI,MAAM;IAI3B,MAAM,IAAI,SAAS;IAQnB,MAAM;;;;;;;;;;IAiBN,MAAM,CAAC,WAAW,CAChB,IAAI,EAAE,mBAAmB,EACzB,KAAK,EAAE,OAAO,EACd,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,gBAAgB,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE;CAa7F;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,gBAAgB,EAAE,CAChB,GAAG,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAC3C,IAAI,CAAC,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,KAC1C,MAAM,CAAC;CACb,CAAC;AACF,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,eAAe,EAAE,aAAa,GAAG,SAAS,CAAC;CAChD;AAED,wBAAgB,gBAAgB,IAAI,aAAa,GAAG,SAAS,CAE5D;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,aAAa,QAEvD;AAED,wBAAgB,WAAW,CACzB,GAAG,EAAE,WAAW,GAAG,KAAK,GAAG,OAAO,EAClC,IAAI,CAAC,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAC5C,MAAM,GAAG,SAAS,CAsBpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/utils/logger.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,uCAKjB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PostHog } from "posthog-node";
|
|
2
|
+
declare global {
|
|
3
|
+
var m5Posthog: PostHog | undefined;
|
|
4
|
+
}
|
|
5
|
+
export declare function getPosthog(): PostHog | undefined;
|
|
6
|
+
export declare function setPosthog(posthog: PostHog): void;
|
|
7
|
+
type PosthogRequestState = {
|
|
8
|
+
disableCapture: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare function runWithPosthogRequestState<T>(state: PosthogRequestState, callback: () => T): T;
|
|
11
|
+
export declare function isPosthogCaptureDisabled(): boolean;
|
|
12
|
+
export declare function posthogCapture(event: Parameters<PostHog["capture"]>[0]): ReturnType<PostHog["capture"]> | undefined;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=posthog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"posthog.d.ts","sourceRoot":"","sources":["../../../src/utils/posthog.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,SAAS,EAAE,OAAO,GAAG,SAAS,CAAC;CACpC;AAED,wBAAgB,UAAU,IAAI,OAAO,GAAG,SAAS,CAEhD;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,QAE1C;AAED,KAAK,mBAAmB,GAAG;IACzB,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AAIF,wBAAgB,0BAA0B,CAAC,CAAC,EAAE,KAAK,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,CAE9F;AAED,wBAAgB,wBAAwB,IAAI,OAAO,CAElD;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,GACvC,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,GAAG,SAAS,CAU5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;AACrD,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC"}
|