@m5kdev/backend 0.1.4 → 0.2.0
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/src/lib/posthog.d.ts +0 -1
- package/dist/src/lib/sentry.d.ts +0 -1
- package/dist/src/modules/access/access.repository.d.ts +0 -1
- package/dist/src/modules/access/access.service.d.ts +0 -1
- package/dist/src/modules/access/access.test.d.ts +0 -1
- package/dist/src/modules/access/access.utils.d.ts +0 -1
- package/dist/src/modules/ai/ai.db.d.ts +0 -1
- package/dist/src/modules/ai/ai.prompt.d.ts +0 -1
- package/dist/src/modules/ai/ai.repository.d.ts +0 -1
- package/dist/src/modules/ai/ai.router.d.ts +0 -1
- package/dist/src/modules/ai/ai.service.d.ts +0 -1
- package/dist/src/modules/ai/ai.trpc.d.ts +5 -42
- package/dist/src/modules/ai/ai.trpc.js +5 -5
- package/dist/src/modules/ai/ideogram/ideogram.constants.d.ts +0 -1
- package/dist/src/modules/ai/ideogram/ideogram.dto.d.ts +0 -1
- package/dist/src/modules/ai/ideogram/ideogram.prompt.d.ts +0 -1
- package/dist/src/modules/ai/ideogram/ideogram.repository.d.ts +0 -1
- package/dist/src/modules/ai/ideogram/ideogram.service.d.ts +0 -1
- package/dist/src/modules/auth/auth.db.d.ts +0 -1
- package/dist/src/modules/auth/auth.dto.d.ts +7 -8
- package/dist/src/modules/auth/auth.lib.d.ts +8 -9
- package/dist/src/modules/auth/auth.middleware.d.ts +0 -1
- package/dist/src/modules/auth/auth.repository.d.ts +0 -1
- package/dist/src/modules/auth/auth.service.d.ts +0 -1
- package/dist/src/modules/auth/auth.trpc.d.ts +52 -89
- package/dist/src/modules/auth/auth.trpc.js +55 -53
- package/dist/src/modules/auth/auth.utils.d.ts +0 -1
- package/dist/src/modules/base/base.abstract.d.ts +0 -1
- package/dist/src/modules/base/base.dto.d.ts +2 -3
- package/dist/src/modules/base/base.grants.d.ts +0 -1
- package/dist/src/modules/base/base.grants.test.d.ts +0 -1
- package/dist/src/modules/base/base.repository.d.ts +0 -1
- package/dist/src/modules/base/base.service.d.ts +2 -4
- package/dist/src/modules/base/base.types.d.ts +0 -1
- package/dist/src/modules/billing/billing.db.d.ts +0 -1
- package/dist/src/modules/billing/billing.repository.d.ts +0 -1
- package/dist/src/modules/billing/billing.router.d.ts +0 -1
- package/dist/src/modules/billing/billing.service.d.ts +0 -1
- package/dist/src/modules/billing/billing.trpc.d.ts +6 -43
- package/dist/src/modules/billing/billing.trpc.js +7 -7
- package/dist/src/modules/clay/clay.repository.d.ts +0 -1
- package/dist/src/modules/clay/clay.service.d.ts +0 -1
- package/dist/src/modules/connect/connect.db.d.ts +0 -1
- package/dist/src/modules/connect/connect.dto.d.ts +8 -9
- package/dist/src/modules/connect/connect.linkedin.d.ts +0 -1
- package/dist/src/modules/connect/connect.oauth.d.ts +0 -1
- package/dist/src/modules/connect/connect.repository.d.ts +3 -4
- package/dist/src/modules/connect/connect.router.d.ts +0 -1
- package/dist/src/modules/connect/connect.service.d.ts +6 -7
- package/dist/src/modules/connect/connect.trpc.d.ts +9 -46
- package/dist/src/modules/connect/connect.trpc.js +7 -7
- package/dist/src/modules/connect/connect.types.d.ts +0 -1
- package/dist/src/modules/crypto/crypto.db.d.ts +0 -1
- package/dist/src/modules/crypto/crypto.repository.d.ts +0 -1
- package/dist/src/modules/crypto/crypto.service.d.ts +0 -1
- package/dist/src/modules/email/email.service.d.ts +0 -1
- package/dist/src/modules/file/file.repository.d.ts +0 -1
- package/dist/src/modules/file/file.router.d.ts +0 -1
- package/dist/src/modules/file/file.service.d.ts +0 -1
- package/dist/src/modules/recurrence/recurrence.db.d.ts +0 -1
- package/dist/src/modules/recurrence/recurrence.repository.d.ts +0 -1
- package/dist/src/modules/recurrence/recurrence.service.d.ts +0 -1
- package/dist/src/modules/recurrence/recurrence.trpc.d.ts +11 -48
- package/dist/src/modules/recurrence/recurrence.trpc.js +17 -17
- package/dist/src/modules/social/social.dto.d.ts +0 -1
- package/dist/src/modules/social/social.linkedin.d.ts +0 -1
- package/dist/src/modules/social/social.linkedin.test.d.ts +0 -1
- package/dist/src/modules/social/social.service.d.ts +0 -1
- package/dist/src/modules/social/social.types.d.ts +0 -1
- package/dist/src/modules/tag/tag.db.d.ts +0 -1
- package/dist/src/modules/tag/tag.dto.d.ts +0 -1
- package/dist/src/modules/tag/tag.repository.d.ts +0 -1
- package/dist/src/modules/tag/tag.service.d.ts +0 -1
- package/dist/src/modules/tag/tag.trpc.d.ts +10 -47
- package/dist/src/modules/tag/tag.trpc.js +15 -15
- package/dist/src/modules/utils/applyPagination.d.ts +0 -1
- package/dist/src/modules/utils/applySorting.d.ts +0 -1
- package/dist/src/modules/utils/getConditionsFromFilters.d.ts +0 -1
- package/dist/src/modules/video/video.service.d.ts +0 -1
- package/dist/src/modules/webhook/webhook.constants.d.ts +0 -1
- package/dist/src/modules/webhook/webhook.db.d.ts +0 -1
- package/dist/src/modules/webhook/webhook.dto.d.ts +0 -1
- package/dist/src/modules/webhook/webhook.repository.d.ts +0 -1
- package/dist/src/modules/webhook/webhook.router.d.ts +0 -1
- package/dist/src/modules/webhook/webhook.service.d.ts +0 -1
- package/dist/src/modules/workflow/workflow.db.d.ts +0 -1
- package/dist/src/modules/workflow/workflow.repository.d.ts +0 -1
- package/dist/src/modules/workflow/workflow.service.d.ts +0 -1
- package/dist/src/modules/workflow/workflow.trpc.d.ts +6 -43
- package/dist/src/modules/workflow/workflow.trpc.js +7 -7
- package/dist/src/modules/workflow/workflow.types.d.ts +0 -1
- package/dist/src/modules/workflow/workflow.utils.d.ts +0 -1
- package/dist/src/test/stubs/utils.d.ts +0 -1
- package/dist/src/trpc/context.d.ts +4 -5
- package/dist/src/trpc/index.d.ts +0 -1
- package/dist/src/trpc/procedures.d.ts +24 -25
- package/dist/src/trpc/utils.d.ts +0 -1
- package/dist/src/types.d.ts +61 -209
- package/dist/src/types.js +4 -5
- package/dist/src/utils/errors.d.ts +0 -1
- package/dist/src/utils/logger.d.ts +0 -1
- package/dist/src/utils/posthog.d.ts +0 -1
- package/dist/src/utils/trpc.d.ts +58 -0
- package/dist/src/utils/trpc.js +63 -0
- package/dist/src/utils/types.d.ts +0 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -8
- package/.cursor/rules/backend.mdc +0 -70
- package/.turbo/turbo-build.log +0 -5
- package/.turbo/turbo-check-types.log +0 -5
- package/.turbo/turbo-lint$colon$fix.log +0 -255
- package/CHANGELOG.md +0 -37
- package/dist/src/lib/posthog.d.ts.map +0 -1
- package/dist/src/lib/sentry.d.ts.map +0 -1
- package/dist/src/modules/access/access.repository.d.ts.map +0 -1
- package/dist/src/modules/access/access.service.d.ts.map +0 -1
- package/dist/src/modules/access/access.test.d.ts.map +0 -1
- package/dist/src/modules/access/access.utils.d.ts.map +0 -1
- package/dist/src/modules/ai/ai.db.d.ts.map +0 -1
- package/dist/src/modules/ai/ai.prompt.d.ts.map +0 -1
- package/dist/src/modules/ai/ai.repository.d.ts.map +0 -1
- package/dist/src/modules/ai/ai.router.d.ts.map +0 -1
- package/dist/src/modules/ai/ai.service.d.ts.map +0 -1
- package/dist/src/modules/ai/ai.trpc.d.ts.map +0 -1
- package/dist/src/modules/ai/ideogram/ideogram.constants.d.ts.map +0 -1
- package/dist/src/modules/ai/ideogram/ideogram.dto.d.ts.map +0 -1
- package/dist/src/modules/ai/ideogram/ideogram.prompt.d.ts.map +0 -1
- package/dist/src/modules/ai/ideogram/ideogram.repository.d.ts.map +0 -1
- package/dist/src/modules/ai/ideogram/ideogram.service.d.ts.map +0 -1
- package/dist/src/modules/auth/auth.db.d.ts.map +0 -1
- package/dist/src/modules/auth/auth.dto.d.ts.map +0 -1
- package/dist/src/modules/auth/auth.lib.d.ts.map +0 -1
- package/dist/src/modules/auth/auth.middleware.d.ts.map +0 -1
- package/dist/src/modules/auth/auth.repository.d.ts.map +0 -1
- package/dist/src/modules/auth/auth.service.d.ts.map +0 -1
- package/dist/src/modules/auth/auth.trpc.d.ts.map +0 -1
- package/dist/src/modules/auth/auth.utils.d.ts.map +0 -1
- package/dist/src/modules/base/base.abstract.d.ts.map +0 -1
- package/dist/src/modules/base/base.dto.d.ts.map +0 -1
- package/dist/src/modules/base/base.grants.d.ts.map +0 -1
- package/dist/src/modules/base/base.grants.test.d.ts.map +0 -1
- package/dist/src/modules/base/base.repository.d.ts.map +0 -1
- package/dist/src/modules/base/base.service.d.ts.map +0 -1
- package/dist/src/modules/base/base.types.d.ts.map +0 -1
- package/dist/src/modules/billing/billing.db.d.ts.map +0 -1
- package/dist/src/modules/billing/billing.repository.d.ts.map +0 -1
- package/dist/src/modules/billing/billing.router.d.ts.map +0 -1
- package/dist/src/modules/billing/billing.service.d.ts.map +0 -1
- package/dist/src/modules/billing/billing.trpc.d.ts.map +0 -1
- package/dist/src/modules/clay/clay.repository.d.ts.map +0 -1
- package/dist/src/modules/clay/clay.service.d.ts.map +0 -1
- package/dist/src/modules/connect/connect.db.d.ts.map +0 -1
- package/dist/src/modules/connect/connect.dto.d.ts.map +0 -1
- package/dist/src/modules/connect/connect.linkedin.d.ts.map +0 -1
- package/dist/src/modules/connect/connect.oauth.d.ts.map +0 -1
- package/dist/src/modules/connect/connect.repository.d.ts.map +0 -1
- package/dist/src/modules/connect/connect.router.d.ts.map +0 -1
- package/dist/src/modules/connect/connect.service.d.ts.map +0 -1
- package/dist/src/modules/connect/connect.trpc.d.ts.map +0 -1
- package/dist/src/modules/connect/connect.types.d.ts.map +0 -1
- package/dist/src/modules/crypto/crypto.db.d.ts.map +0 -1
- package/dist/src/modules/crypto/crypto.repository.d.ts.map +0 -1
- package/dist/src/modules/crypto/crypto.service.d.ts.map +0 -1
- package/dist/src/modules/email/email.service.d.ts.map +0 -1
- package/dist/src/modules/file/file.repository.d.ts.map +0 -1
- package/dist/src/modules/file/file.router.d.ts.map +0 -1
- package/dist/src/modules/file/file.service.d.ts.map +0 -1
- package/dist/src/modules/recurrence/recurrence.db.d.ts.map +0 -1
- package/dist/src/modules/recurrence/recurrence.repository.d.ts.map +0 -1
- package/dist/src/modules/recurrence/recurrence.service.d.ts.map +0 -1
- package/dist/src/modules/recurrence/recurrence.trpc.d.ts.map +0 -1
- package/dist/src/modules/social/social.dto.d.ts.map +0 -1
- package/dist/src/modules/social/social.linkedin.d.ts.map +0 -1
- package/dist/src/modules/social/social.linkedin.test.d.ts.map +0 -1
- package/dist/src/modules/social/social.service.d.ts.map +0 -1
- package/dist/src/modules/social/social.types.d.ts.map +0 -1
- package/dist/src/modules/tag/tag.db.d.ts.map +0 -1
- package/dist/src/modules/tag/tag.dto.d.ts.map +0 -1
- package/dist/src/modules/tag/tag.repository.d.ts.map +0 -1
- package/dist/src/modules/tag/tag.service.d.ts.map +0 -1
- package/dist/src/modules/tag/tag.trpc.d.ts.map +0 -1
- package/dist/src/modules/utils/applyPagination.d.ts.map +0 -1
- package/dist/src/modules/utils/applySorting.d.ts.map +0 -1
- package/dist/src/modules/utils/getConditionsFromFilters.d.ts.map +0 -1
- package/dist/src/modules/video/video.service.d.ts.map +0 -1
- package/dist/src/modules/webhook/webhook.constants.d.ts.map +0 -1
- package/dist/src/modules/webhook/webhook.db.d.ts.map +0 -1
- package/dist/src/modules/webhook/webhook.dto.d.ts.map +0 -1
- package/dist/src/modules/webhook/webhook.repository.d.ts.map +0 -1
- package/dist/src/modules/webhook/webhook.router.d.ts.map +0 -1
- package/dist/src/modules/webhook/webhook.service.d.ts.map +0 -1
- package/dist/src/modules/workflow/workflow.db.d.ts.map +0 -1
- package/dist/src/modules/workflow/workflow.repository.d.ts.map +0 -1
- package/dist/src/modules/workflow/workflow.service.d.ts.map +0 -1
- package/dist/src/modules/workflow/workflow.trpc.d.ts.map +0 -1
- package/dist/src/modules/workflow/workflow.types.d.ts.map +0 -1
- package/dist/src/modules/workflow/workflow.utils.d.ts.map +0 -1
- package/dist/src/test/stubs/utils.d.ts.map +0 -1
- package/dist/src/trpc/context.d.ts.map +0 -1
- package/dist/src/trpc/index.d.ts.map +0 -1
- package/dist/src/trpc/procedures.d.ts.map +0 -1
- package/dist/src/trpc/utils.d.ts.map +0 -1
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/utils/errors.d.ts.map +0 -1
- package/dist/src/utils/logger.d.ts.map +0 -1
- package/dist/src/utils/posthog.d.ts.map +0 -1
- package/dist/src/utils/types.d.ts.map +0 -1
- package/jest.config.ts +0 -19
- package/src/lib/posthog.ts +0 -5
- package/src/lib/sentry.ts +0 -8
- package/src/modules/access/access.repository.ts +0 -36
- package/src/modules/access/access.service.ts +0 -81
- package/src/modules/access/access.test.ts +0 -216
- package/src/modules/access/access.utils.ts +0 -46
- package/src/modules/ai/ai.db.ts +0 -38
- package/src/modules/ai/ai.prompt.ts +0 -47
- package/src/modules/ai/ai.repository.ts +0 -53
- package/src/modules/ai/ai.router.ts +0 -148
- package/src/modules/ai/ai.service.ts +0 -310
- package/src/modules/ai/ai.trpc.ts +0 -22
- package/src/modules/ai/ideogram/ideogram.constants.ts +0 -170
- package/src/modules/ai/ideogram/ideogram.dto.ts +0 -64
- package/src/modules/ai/ideogram/ideogram.prompt.ts +0 -858
- package/src/modules/ai/ideogram/ideogram.repository.ts +0 -39
- package/src/modules/ai/ideogram/ideogram.service.ts +0 -14
- package/src/modules/auth/auth.db.ts +0 -224
- package/src/modules/auth/auth.dto.ts +0 -47
- package/src/modules/auth/auth.lib.ts +0 -349
- package/src/modules/auth/auth.middleware.ts +0 -62
- package/src/modules/auth/auth.repository.ts +0 -672
- package/src/modules/auth/auth.service.ts +0 -261
- package/src/modules/auth/auth.trpc.ts +0 -208
- package/src/modules/auth/auth.utils.ts +0 -117
- package/src/modules/base/base.abstract.ts +0 -62
- package/src/modules/base/base.dto.ts +0 -206
- package/src/modules/base/base.grants.test.ts +0 -861
- package/src/modules/base/base.grants.ts +0 -199
- package/src/modules/base/base.repository.ts +0 -433
- package/src/modules/base/base.service.ts +0 -154
- package/src/modules/base/base.types.ts +0 -7
- package/src/modules/billing/billing.db.ts +0 -27
- package/src/modules/billing/billing.repository.ts +0 -328
- package/src/modules/billing/billing.router.ts +0 -77
- package/src/modules/billing/billing.service.ts +0 -177
- package/src/modules/billing/billing.trpc.ts +0 -17
- package/src/modules/clay/clay.repository.ts +0 -29
- package/src/modules/clay/clay.service.ts +0 -61
- package/src/modules/connect/connect.db.ts +0 -32
- package/src/modules/connect/connect.dto.ts +0 -44
- package/src/modules/connect/connect.linkedin.ts +0 -70
- package/src/modules/connect/connect.oauth.ts +0 -288
- package/src/modules/connect/connect.repository.ts +0 -65
- package/src/modules/connect/connect.router.ts +0 -76
- package/src/modules/connect/connect.service.ts +0 -171
- package/src/modules/connect/connect.trpc.ts +0 -26
- package/src/modules/connect/connect.types.ts +0 -27
- package/src/modules/crypto/crypto.db.ts +0 -15
- package/src/modules/crypto/crypto.repository.ts +0 -13
- package/src/modules/crypto/crypto.service.ts +0 -57
- package/src/modules/email/email.service.ts +0 -222
- package/src/modules/file/file.repository.ts +0 -95
- package/src/modules/file/file.router.ts +0 -108
- package/src/modules/file/file.service.ts +0 -186
- package/src/modules/recurrence/recurrence.db.ts +0 -79
- package/src/modules/recurrence/recurrence.repository.ts +0 -70
- package/src/modules/recurrence/recurrence.service.ts +0 -105
- package/src/modules/recurrence/recurrence.trpc.ts +0 -82
- package/src/modules/social/social.dto.ts +0 -22
- package/src/modules/social/social.linkedin.test.ts +0 -277
- package/src/modules/social/social.linkedin.ts +0 -593
- package/src/modules/social/social.service.ts +0 -112
- package/src/modules/social/social.types.ts +0 -43
- package/src/modules/tag/tag.db.ts +0 -41
- package/src/modules/tag/tag.dto.ts +0 -18
- package/src/modules/tag/tag.repository.ts +0 -222
- package/src/modules/tag/tag.service.ts +0 -48
- package/src/modules/tag/tag.trpc.ts +0 -62
- package/src/modules/uploads/0581796b-8845-420d-bd95-cd7de79f6d37.webm +0 -0
- package/src/modules/uploads/33b1e649-6727-4bd0-94d0-a0b363646865.webm +0 -0
- package/src/modules/uploads/49a8c4c0-54d7-4c94-bef4-c93c029f9ed0.webm +0 -0
- package/src/modules/uploads/50e31e38-a2f0-47ca-8b7d-2d7fcad9267d.webm +0 -0
- package/src/modules/uploads/72ac8cf9-c3a7-4cd8-8a78-6d8e137a4c7e.webm +0 -0
- package/src/modules/uploads/75293649-d966-46cd-a675-67518958ae9c.png +0 -0
- package/src/modules/uploads/88b7b867-ce15-4891-bf73-81305a7de1f7.wav +0 -0
- package/src/modules/uploads/a5d6fee8-6a59-42c6-9d4a-ac8a3c5e7245.webm +0 -0
- package/src/modules/uploads/c13a9785-ca5a-4983-af30-b338ed76d370.webm +0 -0
- package/src/modules/uploads/caa1a5a7-71ba-4381-902d-7e2cafdf6dcb.webm +0 -0
- package/src/modules/uploads/cbeb0b81-374d-445b-914b-40ace7c8e031.webm +0 -0
- package/src/modules/uploads/d626aa82-b10f-493f-aee7-87bfb3361dfc.webm +0 -0
- package/src/modules/uploads/d7de4c16-de0c-495d-9612-e72260a6ecca.png +0 -0
- package/src/modules/uploads/e532e38a-6421-400e-8a5f-8e7bc8ce411b.wav +0 -0
- package/src/modules/uploads/e86ec867-6adf-4c51-84e0-00b0836625e8.webm +0 -0
- package/src/modules/utils/applyPagination.ts +0 -13
- package/src/modules/utils/applySorting.ts +0 -21
- package/src/modules/utils/getConditionsFromFilters.ts +0 -216
- package/src/modules/video/video.service.ts +0 -89
- package/src/modules/webhook/webhook.constants.ts +0 -9
- package/src/modules/webhook/webhook.db.ts +0 -15
- package/src/modules/webhook/webhook.dto.ts +0 -9
- package/src/modules/webhook/webhook.repository.ts +0 -68
- package/src/modules/webhook/webhook.router.ts +0 -29
- package/src/modules/webhook/webhook.service.ts +0 -78
- package/src/modules/workflow/workflow.db.ts +0 -29
- package/src/modules/workflow/workflow.repository.ts +0 -171
- package/src/modules/workflow/workflow.service.ts +0 -56
- package/src/modules/workflow/workflow.trpc.ts +0 -26
- package/src/modules/workflow/workflow.types.ts +0 -30
- package/src/modules/workflow/workflow.utils.ts +0 -259
- package/src/test/stubs/utils.ts +0 -2
- package/src/trpc/context.ts +0 -21
- package/src/trpc/index.ts +0 -3
- package/src/trpc/procedures.ts +0 -43
- package/src/trpc/utils.ts +0 -20
- package/src/types.ts +0 -22
- package/src/utils/errors.ts +0 -148
- package/src/utils/logger.ts +0 -8
- package/src/utils/posthog.ts +0 -43
- package/src/utils/types.ts +0 -5
- package/tsconfig.json +0 -21
|
@@ -1,44 +1,8 @@
|
|
|
1
1
|
import type { WorkflowService } from "#modules/workflow/workflow.service";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
userId: string;
|
|
7
|
-
updatedAt: Date;
|
|
8
|
-
createdAt: Date;
|
|
9
|
-
expiresAt: Date;
|
|
10
|
-
token: string;
|
|
11
|
-
ipAddress: string | null;
|
|
12
|
-
userAgent: string | null;
|
|
13
|
-
impersonatedBy: string | null;
|
|
14
|
-
activeOrganizationId: string | null;
|
|
15
|
-
activeOrganizationRole: string | null;
|
|
16
|
-
activeTeamId: string | null;
|
|
17
|
-
activeTeamRole: string | null;
|
|
18
|
-
};
|
|
19
|
-
user: {
|
|
20
|
-
name: string;
|
|
21
|
-
id: string;
|
|
22
|
-
updatedAt: Date;
|
|
23
|
-
email: string;
|
|
24
|
-
emailVerified: boolean;
|
|
25
|
-
image: string | null;
|
|
26
|
-
createdAt: Date;
|
|
27
|
-
role: string | null;
|
|
28
|
-
banned: boolean | null;
|
|
29
|
-
banReason: string | null;
|
|
30
|
-
banExpires: Date | null;
|
|
31
|
-
stripeCustomerId: string | null;
|
|
32
|
-
paymentCustomerId: string | null;
|
|
33
|
-
paymentPlanTier: string | null;
|
|
34
|
-
paymentPlanExpiresAt: Date | null;
|
|
35
|
-
preferences: string | null;
|
|
36
|
-
metadata: Record<string, unknown>;
|
|
37
|
-
onboarding: number | null;
|
|
38
|
-
flags: string | null;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
2
|
+
import { type TRPCMethods } from "#utils/trpc";
|
|
3
|
+
export declare function createWorkflowTRPC({ router, privateProcedure: procedure }: TRPCMethods, workflowService: WorkflowService): import("@trpc/server").TRPCBuiltRouter<{
|
|
4
|
+
ctx: import("../auth/auth.lib").Context;
|
|
5
|
+
meta: any;
|
|
42
6
|
errorShape: import("@trpc/server").TRPCDefaultErrorShape;
|
|
43
7
|
transformer: true;
|
|
44
8
|
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
@@ -63,7 +27,7 @@ export declare function createWorkflowTRPC(workflowService: WorkflowService): im
|
|
|
63
27
|
createdAt: Date;
|
|
64
28
|
updatedAt: Date;
|
|
65
29
|
};
|
|
66
|
-
meta:
|
|
30
|
+
meta: any;
|
|
67
31
|
}>;
|
|
68
32
|
list: import("@trpc/server").TRPCQueryProcedure<{
|
|
69
33
|
input: {
|
|
@@ -87,7 +51,6 @@ export declare function createWorkflowTRPC(workflowService: WorkflowService): im
|
|
|
87
51
|
createdAt: Date;
|
|
88
52
|
updatedAt: Date;
|
|
89
53
|
}[];
|
|
90
|
-
meta:
|
|
54
|
+
meta: any;
|
|
91
55
|
}>;
|
|
92
56
|
}>>;
|
|
93
|
-
//# sourceMappingURL=workflow.trpc.d.ts.map
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createWorkflowTRPC = createWorkflowTRPC;
|
|
4
4
|
const workflow_schema_1 = require("@m5kdev/commons/modules/workflow/workflow.schema");
|
|
5
|
-
const
|
|
6
|
-
function createWorkflowTRPC(workflowService) {
|
|
7
|
-
return
|
|
8
|
-
read:
|
|
5
|
+
const trpc_1 = require("#utils/trpc");
|
|
6
|
+
function createWorkflowTRPC({ router, privateProcedure: procedure }, workflowService) {
|
|
7
|
+
return router({
|
|
8
|
+
read: procedure
|
|
9
9
|
.input(workflow_schema_1.workflowReadInputSchema)
|
|
10
10
|
.output(workflow_schema_1.workflowReadOutputSchema)
|
|
11
11
|
.query(async ({ ctx, input }) => {
|
|
12
|
-
return (0,
|
|
12
|
+
return (0, trpc_1.handleTRPCResult)(await workflowService.read(input, ctx));
|
|
13
13
|
}),
|
|
14
|
-
list:
|
|
14
|
+
list: procedure
|
|
15
15
|
.input(workflow_schema_1.workflowListInputSchema)
|
|
16
16
|
.output(workflow_schema_1.workflowListOutputSchema)
|
|
17
17
|
.query(async ({ ctx, input }) => {
|
|
18
|
-
return (0,
|
|
18
|
+
return (0, trpc_1.handleTRPCResult)(await workflowService.list(input, ctx));
|
|
19
19
|
}),
|
|
20
20
|
});
|
|
21
21
|
}
|
|
@@ -18,4 +18,3 @@ export type WorkflowJob<DataType extends WorkflowDataType<any>, ReturnType exten
|
|
|
18
18
|
onSuccess?: (job: Job<DataType, ReturnType, Name>) => ServerResultAsync<any>;
|
|
19
19
|
onFailure?: (job: Job<DataType, ReturnType, Name>, error?: ServerError | unknown) => ServerResultAsync<any>;
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=workflow.types.d.ts.map
|
|
@@ -19,4 +19,3 @@ export declare function createWorkflowTrigger<Jobs extends Record<string, Workfl
|
|
|
19
19
|
};
|
|
20
20
|
export declare function createWorkflowWorker<Jobs extends Record<string, WorkflowJob<WorkflowDataType<any>, any, string>>>(service: WorkflowService, queueName: string, workerOptions: WorkerOptions, jobs: Jobs, errorHandler?: (error: unknown) => void): Worker<any, any, string>;
|
|
21
21
|
export declare function createWorkflowWorkers<Jobs extends Record<string, WorkflowJob<WorkflowDataType<any>, any, string>>>(service: WorkflowService, workerSettings: Record<string, WorkerOptions>, jobs: Jobs, errorHandler?: (error: unknown) => void): Record<string, Worker<any, any, string>>;
|
|
22
|
-
//# sourceMappingURL=workflow.utils.d.ts.map
|
|
@@ -4,13 +4,13 @@ export type Context = Awaited<ReturnType<typeof createAuthContext>>;
|
|
|
4
4
|
export declare function createAuthContext(auth: BetterAuth): ({ req }: CreateExpressContextOptions) => Promise<{
|
|
5
5
|
session: {
|
|
6
6
|
id: string;
|
|
7
|
-
userId: string;
|
|
8
|
-
updatedAt: Date;
|
|
9
7
|
createdAt: Date;
|
|
8
|
+
updatedAt: Date;
|
|
10
9
|
expiresAt: Date;
|
|
11
10
|
token: string;
|
|
12
11
|
ipAddress: string | null;
|
|
13
12
|
userAgent: string | null;
|
|
13
|
+
userId: string;
|
|
14
14
|
impersonatedBy: string | null;
|
|
15
15
|
activeOrganizationId: string | null;
|
|
16
16
|
activeOrganizationRole: string | null;
|
|
@@ -18,13 +18,13 @@ export declare function createAuthContext(auth: BetterAuth): ({ req }: CreateExp
|
|
|
18
18
|
activeTeamRole: string | null;
|
|
19
19
|
};
|
|
20
20
|
user: {
|
|
21
|
-
name: string;
|
|
22
21
|
id: string;
|
|
23
|
-
|
|
22
|
+
name: string;
|
|
24
23
|
email: string;
|
|
25
24
|
emailVerified: boolean;
|
|
26
25
|
image: string | null;
|
|
27
26
|
createdAt: Date;
|
|
27
|
+
updatedAt: Date;
|
|
28
28
|
role: string | null;
|
|
29
29
|
banned: boolean | null;
|
|
30
30
|
banReason: string | null;
|
|
@@ -39,4 +39,3 @@ export declare function createAuthContext(auth: BetterAuth): ({ req }: CreateExp
|
|
|
39
39
|
flags: string | null;
|
|
40
40
|
};
|
|
41
41
|
}>;
|
|
42
|
-
//# sourceMappingURL=context.d.ts.map
|
package/dist/src/trpc/index.d.ts
CHANGED
|
@@ -2,13 +2,13 @@ import type { OpenApiMeta } from "trpc-to-openapi";
|
|
|
2
2
|
export declare const publicProcedure: import("@trpc/server").TRPCProcedureBuilder<{
|
|
3
3
|
session: {
|
|
4
4
|
id: string;
|
|
5
|
-
userId: string;
|
|
6
|
-
updatedAt: Date;
|
|
7
5
|
createdAt: Date;
|
|
6
|
+
updatedAt: Date;
|
|
8
7
|
expiresAt: Date;
|
|
9
8
|
token: string;
|
|
10
9
|
ipAddress: string | null;
|
|
11
10
|
userAgent: string | null;
|
|
11
|
+
userId: string;
|
|
12
12
|
impersonatedBy: string | null;
|
|
13
13
|
activeOrganizationId: string | null;
|
|
14
14
|
activeOrganizationRole: string | null;
|
|
@@ -16,13 +16,13 @@ export declare const publicProcedure: import("@trpc/server").TRPCProcedureBuilde
|
|
|
16
16
|
activeTeamRole: string | null;
|
|
17
17
|
};
|
|
18
18
|
user: {
|
|
19
|
-
name: string;
|
|
20
19
|
id: string;
|
|
21
|
-
|
|
20
|
+
name: string;
|
|
22
21
|
email: string;
|
|
23
22
|
emailVerified: boolean;
|
|
24
23
|
image: string | null;
|
|
25
24
|
createdAt: Date;
|
|
25
|
+
updatedAt: Date;
|
|
26
26
|
role: string | null;
|
|
27
27
|
banned: boolean | null;
|
|
28
28
|
banReason: string | null;
|
|
@@ -40,13 +40,13 @@ export declare const publicProcedure: import("@trpc/server").TRPCProcedureBuilde
|
|
|
40
40
|
export declare const procedure: import("@trpc/server").TRPCProcedureBuilder<{
|
|
41
41
|
session: {
|
|
42
42
|
id: string;
|
|
43
|
-
userId: string;
|
|
44
|
-
updatedAt: Date;
|
|
45
43
|
createdAt: Date;
|
|
44
|
+
updatedAt: Date;
|
|
46
45
|
expiresAt: Date;
|
|
47
46
|
token: string;
|
|
48
47
|
ipAddress: string | null;
|
|
49
48
|
userAgent: string | null;
|
|
49
|
+
userId: string;
|
|
50
50
|
impersonatedBy: string | null;
|
|
51
51
|
activeOrganizationId: string | null;
|
|
52
52
|
activeOrganizationRole: string | null;
|
|
@@ -54,13 +54,13 @@ export declare const procedure: import("@trpc/server").TRPCProcedureBuilder<{
|
|
|
54
54
|
activeTeamRole: string | null;
|
|
55
55
|
};
|
|
56
56
|
user: {
|
|
57
|
-
name: string;
|
|
58
57
|
id: string;
|
|
59
|
-
|
|
58
|
+
name: string;
|
|
60
59
|
email: string;
|
|
61
60
|
emailVerified: boolean;
|
|
62
61
|
image: string | null;
|
|
63
62
|
createdAt: Date;
|
|
63
|
+
updatedAt: Date;
|
|
64
64
|
role: string | null;
|
|
65
65
|
banned: boolean | null;
|
|
66
66
|
banReason: string | null;
|
|
@@ -76,13 +76,13 @@ export declare const procedure: import("@trpc/server").TRPCProcedureBuilder<{
|
|
|
76
76
|
};
|
|
77
77
|
}, OpenApiMeta, {
|
|
78
78
|
user: {
|
|
79
|
-
name: string;
|
|
80
79
|
id: string;
|
|
81
|
-
|
|
80
|
+
name: string;
|
|
82
81
|
email: string;
|
|
83
82
|
emailVerified: boolean;
|
|
84
83
|
image: string | null;
|
|
85
84
|
createdAt: Date;
|
|
85
|
+
updatedAt: Date;
|
|
86
86
|
role: string | null;
|
|
87
87
|
banned: boolean | null;
|
|
88
88
|
banReason: string | null;
|
|
@@ -98,13 +98,13 @@ export declare const procedure: import("@trpc/server").TRPCProcedureBuilder<{
|
|
|
98
98
|
};
|
|
99
99
|
session: {
|
|
100
100
|
id: string;
|
|
101
|
-
userId: string;
|
|
102
|
-
updatedAt: Date;
|
|
103
101
|
createdAt: Date;
|
|
102
|
+
updatedAt: Date;
|
|
104
103
|
expiresAt: Date;
|
|
105
104
|
token: string;
|
|
106
105
|
ipAddress: string | null;
|
|
107
106
|
userAgent: string | null;
|
|
107
|
+
userId: string;
|
|
108
108
|
impersonatedBy: string | null;
|
|
109
109
|
activeOrganizationId: string | null;
|
|
110
110
|
activeOrganizationRole: string | null;
|
|
@@ -115,13 +115,13 @@ export declare const procedure: import("@trpc/server").TRPCProcedureBuilder<{
|
|
|
115
115
|
export declare const adminProcedure: import("@trpc/server").TRPCProcedureBuilder<{
|
|
116
116
|
session: {
|
|
117
117
|
id: string;
|
|
118
|
-
userId: string;
|
|
119
|
-
updatedAt: Date;
|
|
120
118
|
createdAt: Date;
|
|
119
|
+
updatedAt: Date;
|
|
121
120
|
expiresAt: Date;
|
|
122
121
|
token: string;
|
|
123
122
|
ipAddress: string | null;
|
|
124
123
|
userAgent: string | null;
|
|
124
|
+
userId: string;
|
|
125
125
|
impersonatedBy: string | null;
|
|
126
126
|
activeOrganizationId: string | null;
|
|
127
127
|
activeOrganizationRole: string | null;
|
|
@@ -129,13 +129,13 @@ export declare const adminProcedure: import("@trpc/server").TRPCProcedureBuilder
|
|
|
129
129
|
activeTeamRole: string | null;
|
|
130
130
|
};
|
|
131
131
|
user: {
|
|
132
|
-
name: string;
|
|
133
132
|
id: string;
|
|
134
|
-
|
|
133
|
+
name: string;
|
|
135
134
|
email: string;
|
|
136
135
|
emailVerified: boolean;
|
|
137
136
|
image: string | null;
|
|
138
137
|
createdAt: Date;
|
|
138
|
+
updatedAt: Date;
|
|
139
139
|
role: string | null;
|
|
140
140
|
banned: boolean | null;
|
|
141
141
|
banReason: string | null;
|
|
@@ -151,13 +151,13 @@ export declare const adminProcedure: import("@trpc/server").TRPCProcedureBuilder
|
|
|
151
151
|
};
|
|
152
152
|
}, OpenApiMeta, {
|
|
153
153
|
user: {
|
|
154
|
-
name: string;
|
|
155
154
|
id: string;
|
|
156
|
-
|
|
155
|
+
name: string;
|
|
157
156
|
email: string;
|
|
158
157
|
emailVerified: boolean;
|
|
159
158
|
image: string | null;
|
|
160
159
|
createdAt: Date;
|
|
160
|
+
updatedAt: Date;
|
|
161
161
|
role: string | null;
|
|
162
162
|
banned: boolean | null;
|
|
163
163
|
banReason: string | null;
|
|
@@ -173,13 +173,13 @@ export declare const adminProcedure: import("@trpc/server").TRPCProcedureBuilder
|
|
|
173
173
|
};
|
|
174
174
|
session: {
|
|
175
175
|
id: string;
|
|
176
|
-
userId: string;
|
|
177
|
-
updatedAt: Date;
|
|
178
176
|
createdAt: Date;
|
|
177
|
+
updatedAt: Date;
|
|
179
178
|
expiresAt: Date;
|
|
180
179
|
token: string;
|
|
181
180
|
ipAddress: string | null;
|
|
182
181
|
userAgent: string | null;
|
|
182
|
+
userId: string;
|
|
183
183
|
impersonatedBy: string | null;
|
|
184
184
|
activeOrganizationId: string | null;
|
|
185
185
|
activeOrganizationRole: string | null;
|
|
@@ -192,13 +192,13 @@ export declare const router: import("@trpc/server").TRPCRouterBuilder<{
|
|
|
192
192
|
ctx: {
|
|
193
193
|
session: {
|
|
194
194
|
id: string;
|
|
195
|
-
userId: string;
|
|
196
|
-
updatedAt: Date;
|
|
197
195
|
createdAt: Date;
|
|
196
|
+
updatedAt: Date;
|
|
198
197
|
expiresAt: Date;
|
|
199
198
|
token: string;
|
|
200
199
|
ipAddress: string | null;
|
|
201
200
|
userAgent: string | null;
|
|
201
|
+
userId: string;
|
|
202
202
|
impersonatedBy: string | null;
|
|
203
203
|
activeOrganizationId: string | null;
|
|
204
204
|
activeOrganizationRole: string | null;
|
|
@@ -206,13 +206,13 @@ export declare const router: import("@trpc/server").TRPCRouterBuilder<{
|
|
|
206
206
|
activeTeamRole: string | null;
|
|
207
207
|
};
|
|
208
208
|
user: {
|
|
209
|
-
name: string;
|
|
210
209
|
id: string;
|
|
211
|
-
|
|
210
|
+
name: string;
|
|
212
211
|
email: string;
|
|
213
212
|
emailVerified: boolean;
|
|
214
213
|
image: string | null;
|
|
215
214
|
createdAt: Date;
|
|
215
|
+
updatedAt: Date;
|
|
216
216
|
role: string | null;
|
|
217
217
|
banned: boolean | null;
|
|
218
218
|
banReason: string | null;
|
|
@@ -231,4 +231,3 @@ export declare const router: import("@trpc/server").TRPCRouterBuilder<{
|
|
|
231
231
|
errorShape: import("@trpc/server").TRPCDefaultErrorShape;
|
|
232
232
|
transformer: true;
|
|
233
233
|
}>;
|
|
234
|
-
//# sourceMappingURL=procedures.d.ts.map
|
package/dist/src/trpc/utils.d.ts
CHANGED
|
@@ -2,4 +2,3 @@ import type { Result } from "neverthrow";
|
|
|
2
2
|
import type { ServerError } from "#utils/errors";
|
|
3
3
|
export declare function handleAsyncTRPCResult<T>(result: Promise<Result<T, ServerError>>): Promise<T>;
|
|
4
4
|
export declare function handleTRPCResult<T>(result: Result<T, ServerError>): T;
|
|
5
|
-
//# sourceMappingURL=utils.d.ts.map
|