@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,243 @@
|
|
|
1
|
+
import type { RecurrenceService } from "#modules/recurrence/recurrence.service";
|
|
2
|
+
export declare function createRecurrenceTRPC(recurrenceService: RecurrenceService): import("@trpc/server").TRPCBuiltRouter<{
|
|
3
|
+
ctx: {
|
|
4
|
+
session: {
|
|
5
|
+
id: string;
|
|
6
|
+
userId: string;
|
|
7
|
+
expiresAt: Date;
|
|
8
|
+
createdAt: Date;
|
|
9
|
+
updatedAt: 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
|
+
image: string | null;
|
|
22
|
+
id: string;
|
|
23
|
+
createdAt: Date;
|
|
24
|
+
updatedAt: Date;
|
|
25
|
+
email: string;
|
|
26
|
+
metadata: Record<string, unknown>;
|
|
27
|
+
emailVerified: boolean;
|
|
28
|
+
role: string | null;
|
|
29
|
+
banned: boolean | null;
|
|
30
|
+
banReason: string | null;
|
|
31
|
+
banExpires: Date | null;
|
|
32
|
+
stripeCustomerId: string | null;
|
|
33
|
+
paymentCustomerId: string | null;
|
|
34
|
+
paymentPlanTier: string | null;
|
|
35
|
+
paymentPlanExpiresAt: Date | null;
|
|
36
|
+
preferences: string | null;
|
|
37
|
+
onboarding: number | null;
|
|
38
|
+
flags: string | null;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
42
|
+
errorShape: import("@trpc/server").TRPCDefaultErrorShape;
|
|
43
|
+
transformer: true;
|
|
44
|
+
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
45
|
+
list: import("@trpc/server").TRPCQueryProcedure<{
|
|
46
|
+
input: {
|
|
47
|
+
page?: number | undefined;
|
|
48
|
+
limit?: number | undefined;
|
|
49
|
+
sort?: string | undefined;
|
|
50
|
+
order?: "asc" | "desc" | undefined;
|
|
51
|
+
filters?: {
|
|
52
|
+
columnId: string;
|
|
53
|
+
type: "string" | "number" | "boolean" | "date" | "enum";
|
|
54
|
+
method: "contains" | "equals" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "on" | "between" | "before" | "after" | "oneOf" | "intersect" | "isEmpty" | "isNotEmpty" | "is_null" | "is_not_null";
|
|
55
|
+
value: string | number | boolean | string[];
|
|
56
|
+
valueTo?: string | undefined;
|
|
57
|
+
endColumnId?: string | undefined;
|
|
58
|
+
}[] | undefined;
|
|
59
|
+
} | undefined;
|
|
60
|
+
output: {
|
|
61
|
+
rows: {
|
|
62
|
+
id: string;
|
|
63
|
+
enabled: boolean;
|
|
64
|
+
createdAt: Date;
|
|
65
|
+
updatedAt: Date;
|
|
66
|
+
userId?: string | null | undefined;
|
|
67
|
+
organizationId?: string | null | undefined;
|
|
68
|
+
teamId?: string | null | undefined;
|
|
69
|
+
name?: string | null | undefined;
|
|
70
|
+
kind?: string | null | undefined;
|
|
71
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
72
|
+
}[];
|
|
73
|
+
total: number;
|
|
74
|
+
};
|
|
75
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
76
|
+
}>;
|
|
77
|
+
create: import("@trpc/server").TRPCMutationProcedure<{
|
|
78
|
+
input: {
|
|
79
|
+
name: string;
|
|
80
|
+
kind: string;
|
|
81
|
+
enabled: boolean;
|
|
82
|
+
recurrenceRules: {
|
|
83
|
+
interval: number;
|
|
84
|
+
freq: number;
|
|
85
|
+
count?: number | null | undefined;
|
|
86
|
+
dtstart?: Date | null | undefined;
|
|
87
|
+
wkst?: number | null | undefined;
|
|
88
|
+
until?: Date | null | undefined;
|
|
89
|
+
tzid?: string | null | undefined;
|
|
90
|
+
bysetpos?: number | number[] | null | undefined;
|
|
91
|
+
bymonth?: number | number[] | null | undefined;
|
|
92
|
+
bymonthday?: number | number[] | null | undefined;
|
|
93
|
+
byyearday?: number | number[] | null | undefined;
|
|
94
|
+
byweekno?: number | number[] | null | undefined;
|
|
95
|
+
byweekday?: number | number[] | null | undefined;
|
|
96
|
+
byhour?: number | number[] | null | undefined;
|
|
97
|
+
byminute?: number | number[] | null | undefined;
|
|
98
|
+
bysecond?: number | number[] | null | undefined;
|
|
99
|
+
}[];
|
|
100
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
101
|
+
};
|
|
102
|
+
output: {
|
|
103
|
+
recurrence: {
|
|
104
|
+
id: string;
|
|
105
|
+
enabled: boolean;
|
|
106
|
+
createdAt: Date;
|
|
107
|
+
updatedAt: Date;
|
|
108
|
+
userId?: string | null | undefined;
|
|
109
|
+
organizationId?: string | null | undefined;
|
|
110
|
+
teamId?: string | null | undefined;
|
|
111
|
+
name?: string | null | undefined;
|
|
112
|
+
kind?: string | null | undefined;
|
|
113
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
114
|
+
};
|
|
115
|
+
rules: {
|
|
116
|
+
id: string;
|
|
117
|
+
createdAt: Date;
|
|
118
|
+
updatedAt: Date;
|
|
119
|
+
freq: number;
|
|
120
|
+
interval: number;
|
|
121
|
+
recurrenceId?: string | null | undefined;
|
|
122
|
+
dtstart?: Date | null | undefined;
|
|
123
|
+
wkst?: number | null | undefined;
|
|
124
|
+
count?: number | null | undefined;
|
|
125
|
+
until?: Date | null | undefined;
|
|
126
|
+
tzid?: string | null | undefined;
|
|
127
|
+
bysetpos?: number | number[] | null | undefined;
|
|
128
|
+
bymonth?: number | number[] | null | undefined;
|
|
129
|
+
bymonthday?: number | number[] | null | undefined;
|
|
130
|
+
byyearday?: number | number[] | null | undefined;
|
|
131
|
+
byweekno?: number | number[] | null | undefined;
|
|
132
|
+
byweekday?: number | number[] | null | undefined;
|
|
133
|
+
byhour?: number | number[] | null | undefined;
|
|
134
|
+
byminute?: number | number[] | null | undefined;
|
|
135
|
+
bysecond?: number | number[] | null | undefined;
|
|
136
|
+
}[];
|
|
137
|
+
};
|
|
138
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
139
|
+
}>;
|
|
140
|
+
findById: import("@trpc/server").TRPCQueryProcedure<{
|
|
141
|
+
input: {
|
|
142
|
+
id: string;
|
|
143
|
+
};
|
|
144
|
+
output: {
|
|
145
|
+
id: string;
|
|
146
|
+
enabled: boolean;
|
|
147
|
+
createdAt: Date;
|
|
148
|
+
updatedAt: Date;
|
|
149
|
+
userId?: string | null | undefined;
|
|
150
|
+
organizationId?: string | null | undefined;
|
|
151
|
+
teamId?: string | null | undefined;
|
|
152
|
+
name?: string | null | undefined;
|
|
153
|
+
kind?: string | null | undefined;
|
|
154
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
155
|
+
} | null;
|
|
156
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
157
|
+
}>;
|
|
158
|
+
update: import("@trpc/server").TRPCMutationProcedure<{
|
|
159
|
+
input: {
|
|
160
|
+
id: string;
|
|
161
|
+
name?: string | undefined;
|
|
162
|
+
kind?: string | undefined;
|
|
163
|
+
enabled?: boolean | undefined;
|
|
164
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
165
|
+
};
|
|
166
|
+
output: {
|
|
167
|
+
id: string;
|
|
168
|
+
enabled: boolean;
|
|
169
|
+
createdAt: Date;
|
|
170
|
+
updatedAt: Date;
|
|
171
|
+
userId?: string | null | undefined;
|
|
172
|
+
organizationId?: string | null | undefined;
|
|
173
|
+
teamId?: string | null | undefined;
|
|
174
|
+
name?: string | null | undefined;
|
|
175
|
+
kind?: string | null | undefined;
|
|
176
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
177
|
+
};
|
|
178
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
179
|
+
}>;
|
|
180
|
+
updateRule: import("@trpc/server").TRPCMutationProcedure<{
|
|
181
|
+
input: {
|
|
182
|
+
id: string;
|
|
183
|
+
interval: number;
|
|
184
|
+
freq: number;
|
|
185
|
+
count?: number | null | undefined;
|
|
186
|
+
dtstart?: Date | null | undefined;
|
|
187
|
+
wkst?: number | null | undefined;
|
|
188
|
+
until?: Date | null | undefined;
|
|
189
|
+
tzid?: string | null | undefined;
|
|
190
|
+
bysetpos?: number | number[] | null | undefined;
|
|
191
|
+
bymonth?: number | number[] | null | undefined;
|
|
192
|
+
bymonthday?: number | number[] | null | undefined;
|
|
193
|
+
byyearday?: number | number[] | null | undefined;
|
|
194
|
+
byweekno?: number | number[] | null | undefined;
|
|
195
|
+
byweekday?: number | number[] | null | undefined;
|
|
196
|
+
byhour?: number | number[] | null | undefined;
|
|
197
|
+
byminute?: number | number[] | null | undefined;
|
|
198
|
+
bysecond?: number | number[] | null | undefined;
|
|
199
|
+
};
|
|
200
|
+
output: {
|
|
201
|
+
id: string;
|
|
202
|
+
createdAt: Date;
|
|
203
|
+
updatedAt: Date;
|
|
204
|
+
freq: number;
|
|
205
|
+
interval: number;
|
|
206
|
+
recurrenceId?: string | null | undefined;
|
|
207
|
+
dtstart?: Date | null | undefined;
|
|
208
|
+
wkst?: number | null | undefined;
|
|
209
|
+
count?: number | null | undefined;
|
|
210
|
+
until?: Date | null | undefined;
|
|
211
|
+
tzid?: string | null | undefined;
|
|
212
|
+
bysetpos?: number | number[] | null | undefined;
|
|
213
|
+
bymonth?: number | number[] | null | undefined;
|
|
214
|
+
bymonthday?: number | number[] | null | undefined;
|
|
215
|
+
byyearday?: number | number[] | null | undefined;
|
|
216
|
+
byweekno?: number | number[] | null | undefined;
|
|
217
|
+
byweekday?: number | number[] | null | undefined;
|
|
218
|
+
byhour?: number | number[] | null | undefined;
|
|
219
|
+
byminute?: number | number[] | null | undefined;
|
|
220
|
+
bysecond?: number | number[] | null | undefined;
|
|
221
|
+
};
|
|
222
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
223
|
+
}>;
|
|
224
|
+
delete: import("@trpc/server").TRPCMutationProcedure<{
|
|
225
|
+
input: {
|
|
226
|
+
id: string;
|
|
227
|
+
};
|
|
228
|
+
output: {
|
|
229
|
+
id: string;
|
|
230
|
+
};
|
|
231
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
232
|
+
}>;
|
|
233
|
+
deleteRule: import("@trpc/server").TRPCMutationProcedure<{
|
|
234
|
+
input: {
|
|
235
|
+
id: string;
|
|
236
|
+
};
|
|
237
|
+
output: {
|
|
238
|
+
id: string;
|
|
239
|
+
};
|
|
240
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
241
|
+
}>;
|
|
242
|
+
}>>;
|
|
243
|
+
//# sourceMappingURL=recurrence.trpc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recurrence.trpc.d.ts","sourceRoot":"","sources":["../../../../src/modules/recurrence/recurrence.trpc.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAmBhF,wBAAgB,oBAAoB,CAAC,iBAAiB,EAAE,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAmDxE"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const socialMediaInputSchema: z.ZodObject<{
|
|
3
|
+
s3Path: z.ZodString;
|
|
4
|
+
mediaType: z.ZodOptional<z.ZodEnum<{
|
|
5
|
+
image: "image";
|
|
6
|
+
video: "video";
|
|
7
|
+
document: "document";
|
|
8
|
+
}>>;
|
|
9
|
+
title: z.ZodOptional<z.ZodString>;
|
|
10
|
+
description: z.ZodOptional<z.ZodString>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export declare const socialPostInputSchema: z.ZodObject<{
|
|
13
|
+
text: z.ZodString;
|
|
14
|
+
media: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
15
|
+
s3Path: z.ZodString;
|
|
16
|
+
mediaType: z.ZodOptional<z.ZodEnum<{
|
|
17
|
+
image: "image";
|
|
18
|
+
video: "video";
|
|
19
|
+
document: "document";
|
|
20
|
+
}>>;
|
|
21
|
+
title: z.ZodOptional<z.ZodString>;
|
|
22
|
+
description: z.ZodOptional<z.ZodString>;
|
|
23
|
+
}, z.core.$strip>>>;
|
|
24
|
+
visibility: z.ZodDefault<z.ZodEnum<{
|
|
25
|
+
PUBLIC: "PUBLIC";
|
|
26
|
+
CONNECTIONS: "CONNECTIONS";
|
|
27
|
+
}>>;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
export declare const socialPostOutputSchema: z.ZodObject<{
|
|
30
|
+
shareUrn: z.ZodOptional<z.ZodString>;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
export type SocialPostInput = z.infer<typeof socialPostInputSchema>;
|
|
33
|
+
export type SocialMediaInput = z.infer<typeof socialMediaInputSchema>;
|
|
34
|
+
export type SocialPostOutput = z.infer<typeof socialPostOutputSchema>;
|
|
35
|
+
//# sourceMappingURL=social.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"social.dto.d.ts","sourceRoot":"","sources":["../../../../src/modules/social/social.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,sBAAsB;;;;;;;;;iBAKjC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;iBAIhC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;iBAEjC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SocialProvider } from "./social.types";
|
|
2
|
+
export declare function createLinkedInSocialProvider(): SocialProvider;
|
|
3
|
+
/**
|
|
4
|
+
* Escapes special characters in text for LinkedIn's post commentary field.
|
|
5
|
+
* LinkedIn requires certain characters to be backslash-escaped.
|
|
6
|
+
* Preserves mentions (@[Name](urn:li:...)) and hashtag templates ({hashtag|#|tag}).
|
|
7
|
+
* Converts simple hashtags (#tag) to the template format.
|
|
8
|
+
* @see https://learn.microsoft.com/en-us/linkedin/marketing/community-management/shares/little-text-format
|
|
9
|
+
*/
|
|
10
|
+
export declare function escapeLinkedInText(text: string): string;
|
|
11
|
+
//# sourceMappingURL=social.linkedin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"social.linkedin.d.ts","sourceRoot":"","sources":["../../../../src/modules/social/social.linkedin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAA4C,cAAc,EAAE,MAAM,gBAAgB,CAAC;AA6D/F,wBAAgB,4BAA4B,IAAI,cAAc,CA8B7D;AA2XD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAqDvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"social.linkedin.test.d.ts","sourceRoot":"","sources":["../../../../src/modules/social/social.linkedin.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ServerResultAsync } from "#modules/base/base.dto";
|
|
2
|
+
import { BaseService } from "#modules/base/base.service";
|
|
3
|
+
import type { ConnectRepository } from "#modules/connect/connect.repository";
|
|
4
|
+
import type { ConnectService } from "#modules/connect/connect.service";
|
|
5
|
+
import type { FileService } from "#modules/file/file.service";
|
|
6
|
+
import type { SocialPostInput } from "./social.dto";
|
|
7
|
+
import type { SocialPostResult, SocialProvider } from "./social.types";
|
|
8
|
+
export declare class SocialService extends BaseService<{
|
|
9
|
+
connect: ConnectRepository;
|
|
10
|
+
}, {
|
|
11
|
+
connect: ConnectService;
|
|
12
|
+
file: FileService;
|
|
13
|
+
}> {
|
|
14
|
+
private providers;
|
|
15
|
+
constructor(repositories: {
|
|
16
|
+
connect: ConnectRepository;
|
|
17
|
+
}, services: {
|
|
18
|
+
connect: ConnectService;
|
|
19
|
+
file: FileService;
|
|
20
|
+
}, providers: SocialProvider[]);
|
|
21
|
+
getProvider(id: string): SocialProvider | null;
|
|
22
|
+
postToProvider(providerId: string, input: SocialPostInput, { user }: {
|
|
23
|
+
user: {
|
|
24
|
+
id: string;
|
|
25
|
+
};
|
|
26
|
+
}): ServerResultAsync<SocialPostResult>;
|
|
27
|
+
private ensureFreshConnection;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=social.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"social.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/social/social.service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAc,MAAM,qCAAqC,CAAC;AACzF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAqB,gBAAgB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAE1F,qBAAa,aAAc,SAAQ,WAAW,CAC5C;IACE,OAAO,EAAE,iBAAiB,CAAC;CAC5B,EACD;IACE,OAAO,EAAE,cAAc,CAAC;IACxB,IAAI,EAAE,WAAW,CAAC;CACnB,CACF;IACC,OAAO,CAAC,SAAS,CAAqC;gBAGpD,YAAY,EAAE;QAAE,OAAO,EAAE,iBAAiB,CAAA;KAAE,EAC5C,QAAQ,EAAE;QAAE,OAAO,EAAE,cAAc,CAAC;QAAC,IAAI,EAAE,WAAW,CAAA;KAAE,EACxD,SAAS,EAAE,cAAc,EAAE;IAM7B,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI;IAIxC,cAAc,CAClB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,eAAe,EACtB,EAAE,IAAI,EAAE,EAAE;QAAE,IAAI,EAAE;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,GACjC,iBAAiB,CAAC,gBAAgB,CAAC;YAsDxB,qBAAqB;CAoBpC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ConnectRow } from "#modules/connect/connect.repository";
|
|
2
|
+
import type { FileService } from "#modules/file/file.service";
|
|
3
|
+
export type SocialMediaType = "image" | "video" | "document";
|
|
4
|
+
export interface SocialMediaDescriptor {
|
|
5
|
+
readonly s3Path: string;
|
|
6
|
+
readonly mediaType?: SocialMediaType;
|
|
7
|
+
readonly title?: string;
|
|
8
|
+
readonly description?: string;
|
|
9
|
+
}
|
|
10
|
+
export type SocialVisibility = "PUBLIC" | "CONNECTIONS";
|
|
11
|
+
export interface SocialPostPayload {
|
|
12
|
+
readonly text: string;
|
|
13
|
+
readonly media?: readonly SocialMediaDescriptor[];
|
|
14
|
+
readonly visibility: SocialVisibility;
|
|
15
|
+
}
|
|
16
|
+
export interface SocialProviderContext {
|
|
17
|
+
readonly userId: string;
|
|
18
|
+
readonly connection: ConnectRow;
|
|
19
|
+
readonly accessToken: string;
|
|
20
|
+
}
|
|
21
|
+
export interface SocialProviderDeps {
|
|
22
|
+
readonly fileService: FileService;
|
|
23
|
+
}
|
|
24
|
+
export interface SocialPostResult {
|
|
25
|
+
readonly shareUrn?: string;
|
|
26
|
+
readonly rawResponse?: unknown;
|
|
27
|
+
}
|
|
28
|
+
export interface SocialProvider {
|
|
29
|
+
readonly id: string;
|
|
30
|
+
post(options: {
|
|
31
|
+
deps: SocialProviderDeps;
|
|
32
|
+
context: SocialProviderContext;
|
|
33
|
+
payload: SocialPostPayload;
|
|
34
|
+
}): Promise<SocialPostResult>;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=social.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"social.types.d.ts","sourceRoot":"","sources":["../../../../src/modules/social/social.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9D,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,CAAC;AAE7D,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,CAAC,EAAE,eAAe,CAAC;IACrC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,aAAa,CAAC;AAExD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,qBAAqB,EAAE,CAAC;IAClD,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAC;CACvC;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;CACnC;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,OAAO,EAAE;QACZ,IAAI,EAAE,kBAAkB,CAAC;QACzB,OAAO,EAAE,qBAAqB,CAAC;QAC/B,OAAO,EAAE,iBAAiB,CAAC;KAC5B,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;CAC/B"}
|