@m5kdev/backend 0.9.2 → 0.9.4
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/modules/ai/ai.repository.cjs +1 -1
- package/dist/src/modules/ai/ai.repository.d.mts +1 -1
- package/dist/src/modules/ai/ai.repository.mjs +1 -1
- package/dist/src/modules/ai/ai.service.cjs +1 -1
- package/dist/src/modules/ai/ai.service.mjs +1 -1
- package/dist/src/modules/auth/auth.dto.d.cts +2 -2
- package/dist/src/modules/auth/auth.dto.d.mts +2 -2
- package/dist/src/modules/auth/auth.lib.d.mts +1 -1
- package/dist/src/modules/auth/auth.middleware.d.mts +1 -1
- package/dist/src/modules/auth/auth.repository.cjs +1 -1
- package/dist/src/modules/auth/auth.repository.mjs +1 -1
- package/dist/src/modules/auth/auth.trpc.d.cts +7 -7
- package/dist/src/modules/auth/auth.trpc.d.mts +7 -7
- package/dist/src/modules/auth/auth.utils.cjs +1 -1
- package/dist/src/modules/auth/auth.utils.mjs +1 -1
- package/dist/src/modules/base/base.db.d.mts +1 -1
- package/dist/src/modules/base/base.repository.d.mts +1 -1
- package/dist/src/modules/billing/billing.repository.d.cts +11 -11
- package/dist/src/modules/billing/billing.repository.d.mts +1 -1
- package/dist/src/modules/billing/billing.service.d.cts +7 -7
- package/dist/src/modules/connect/connect.dto.d.cts +4 -4
- package/dist/src/modules/connect/connect.dto.d.mts +4 -4
- package/dist/src/modules/connect/connect.repository.d.cts +2 -2
- package/dist/src/modules/connect/connect.repository.d.mts +3 -3
- package/dist/src/modules/connect/connect.service.d.cts +4 -4
- package/dist/src/modules/connect/connect.service.d.mts +4 -4
- package/dist/src/modules/file/file.service.cjs +1 -1
- package/dist/src/modules/file/file.service.mjs +1 -1
- package/dist/src/modules/recurrence/recurrence.repository.d.mts +1 -1
- package/dist/src/modules/recurrence/recurrence.service.d.cts +3 -3
- package/dist/src/modules/recurrence/recurrence.service.d.mts +3 -3
- package/dist/src/modules/recurrence/recurrence.trpc.d.cts +1 -1
- package/dist/src/modules/recurrence/recurrence.trpc.d.mts +1 -1
- package/dist/src/modules/tag/tag.dto.d.mts +1 -1
- package/dist/src/modules/tag/tag.trpc.d.cts +2 -2
- package/dist/src/modules/tag/tag.trpc.d.mts +2 -2
- package/dist/src/modules/utils/getGlobalSearchCondition.d.mts +1 -1
- package/dist/src/modules/video/video.service.cjs +19 -4
- package/dist/src/modules/video/video.service.cjs.map +1 -1
- package/dist/src/modules/video/video.service.mjs +19 -4
- package/dist/src/modules/video/video.service.mjs.map +1 -1
- package/dist/src/types.d.cts +7 -7
- package/dist/src/types.d.mts +7 -7
- package/package.json +23 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../../../_virtual/_rolldown/runtime.cjs");
|
|
3
|
-
const require_src_modules_ai_ai_db = require("./ai.db.cjs");
|
|
4
3
|
const require_src_modules_base_base_repository = require("../base/base.repository.cjs");
|
|
4
|
+
const require_src_modules_ai_ai_db = require("./ai.db.cjs");
|
|
5
5
|
let drizzle_orm = require("drizzle-orm");
|
|
6
6
|
let neverthrow = require("neverthrow");
|
|
7
7
|
//#region src/modules/ai/ai.repository.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ServerResultAsync } from "../base/base.dto.mjs";
|
|
2
2
|
import { BaseTableRepository } from "../base/base.repository.mjs";
|
|
3
|
-
import * as _$drizzle_orm_sqlite_core0 from "drizzle-orm/sqlite-core";
|
|
4
3
|
import { InferInsertModel, InferSelectModel } from "drizzle-orm";
|
|
4
|
+
import * as _$drizzle_orm_sqlite_core0 from "drizzle-orm/sqlite-core";
|
|
5
5
|
import { LibSQLDatabase } from "drizzle-orm/libsql";
|
|
6
6
|
|
|
7
7
|
//#region src/modules/ai/ai.repository.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ai_db_exports } from "./ai.db.mjs";
|
|
2
1
|
import { BaseTableRepository } from "../base/base.repository.mjs";
|
|
2
|
+
import { ai_db_exports } from "./ai.db.mjs";
|
|
3
3
|
import { eq, sql } from "drizzle-orm";
|
|
4
4
|
import { ok } from "neverthrow";
|
|
5
5
|
//#region src/modules/ai/ai.repository.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../../../_virtual/_rolldown/runtime.cjs");
|
|
3
|
-
const require_src_modules_ai_ai_prompts = require("./ai.prompts.cjs");
|
|
4
3
|
const require_src_modules_base_base_service = require("../base/base.service.cjs");
|
|
4
|
+
const require_src_modules_ai_ai_prompts = require("./ai.prompts.cjs");
|
|
5
5
|
let neverthrow = require("neverthrow");
|
|
6
6
|
let _m5kdev_commons_modules_ai_ai_constants = require("@m5kdev/commons/modules/ai/ai.constants");
|
|
7
7
|
let _m5kdev_commons_modules_ai_ai_utils = require("@m5kdev/commons/modules/ai/ai.utils");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { repairJsonPrompt } from "./ai.prompts.mjs";
|
|
2
1
|
import { BaseService } from "../base/base.service.mjs";
|
|
2
|
+
import { repairJsonPrompt } from "./ai.prompts.mjs";
|
|
3
3
|
import { err, ok } from "neverthrow";
|
|
4
4
|
import { OPENAI_TEXT_EMBEDDING_3_SMALL } from "@m5kdev/commons/modules/ai/ai.constants";
|
|
5
5
|
import { arrayToPseudoXML } from "@m5kdev/commons/modules/ai/ai.utils";
|
|
@@ -12,8 +12,8 @@ declare const waitlistSchema: z.ZodObject<{
|
|
|
12
12
|
expiresAt: z.ZodNullable<z.ZodDate>;
|
|
13
13
|
}, z.core.$strip>;
|
|
14
14
|
declare const waitlistOutputSchema: z.ZodObject<{
|
|
15
|
-
id: z.ZodString;
|
|
16
15
|
name: z.ZodNullable<z.ZodString>;
|
|
16
|
+
id: z.ZodString;
|
|
17
17
|
email: z.ZodNullable<z.ZodString>;
|
|
18
18
|
createdAt: z.ZodDate;
|
|
19
19
|
updatedAt: z.ZodNullable<z.ZodDate>;
|
|
@@ -58,8 +58,8 @@ declare const accountClaimMagicLinkOutputSchema: z.ZodObject<{
|
|
|
58
58
|
id: z.ZodString;
|
|
59
59
|
email: z.ZodString;
|
|
60
60
|
createdAt: z.ZodDate;
|
|
61
|
-
userId: z.ZodString;
|
|
62
61
|
expiresAt: z.ZodNullable<z.ZodDate>;
|
|
62
|
+
userId: z.ZodString;
|
|
63
63
|
claimId: z.ZodString;
|
|
64
64
|
url: z.ZodString;
|
|
65
65
|
}, z.core.$strip>;
|
|
@@ -12,8 +12,8 @@ declare const waitlistSchema: z.ZodObject<{
|
|
|
12
12
|
expiresAt: z.ZodNullable<z.ZodDate>;
|
|
13
13
|
}, z.core.$strip>;
|
|
14
14
|
declare const waitlistOutputSchema: z.ZodObject<{
|
|
15
|
-
id: z.ZodString;
|
|
16
15
|
name: z.ZodNullable<z.ZodString>;
|
|
16
|
+
id: z.ZodString;
|
|
17
17
|
email: z.ZodNullable<z.ZodString>;
|
|
18
18
|
createdAt: z.ZodDate;
|
|
19
19
|
updatedAt: z.ZodNullable<z.ZodDate>;
|
|
@@ -58,8 +58,8 @@ declare const accountClaimMagicLinkOutputSchema: z.ZodObject<{
|
|
|
58
58
|
id: z.ZodString;
|
|
59
59
|
email: z.ZodString;
|
|
60
60
|
createdAt: z.ZodDate;
|
|
61
|
-
userId: z.ZodString;
|
|
62
61
|
expiresAt: z.ZodNullable<z.ZodDate>;
|
|
62
|
+
userId: z.ZodString;
|
|
63
63
|
claimId: z.ZodString;
|
|
64
64
|
url: z.ZodString;
|
|
65
65
|
}, z.core.$strip>;
|
|
@@ -2,8 +2,8 @@ import { LiteralUnion } from "../../../node_modules/.pnpm/@better-auth_core@1.4.
|
|
|
2
2
|
import { BillingService } from "../billing/billing.service.mjs";
|
|
3
3
|
import { EmailService } from "../email/email.service.mjs";
|
|
4
4
|
import { sessions, users } from "./auth.db.mjs";
|
|
5
|
-
import * as _$drizzle_orm_sqlite_core0 from "drizzle-orm/sqlite-core";
|
|
6
5
|
import { InferSelectModel } from "drizzle-orm";
|
|
6
|
+
import * as _$drizzle_orm_sqlite_core0 from "drizzle-orm/sqlite-core";
|
|
7
7
|
import * as _$better_auth0 from "better-auth";
|
|
8
8
|
import { BetterAuthOptions, betterAuth } from "better-auth";
|
|
9
9
|
import * as _$better_auth_api0 from "better-auth/api";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BetterAuth } from "./auth.lib.mjs";
|
|
2
|
-
import * as _$drizzle_orm_sqlite_core0 from "drizzle-orm/sqlite-core";
|
|
3
2
|
import { InferSelectModel } from "drizzle-orm";
|
|
3
|
+
import * as _$drizzle_orm_sqlite_core0 from "drizzle-orm/sqlite-core";
|
|
4
4
|
import { NextFunction, Request, Response } from "express";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/auth/auth.middleware.d.ts
|
|
@@ -2,9 +2,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
require("../../../_virtual/_rolldown/runtime.cjs");
|
|
3
3
|
const require_src_modules_auth_auth_db = require("./auth.db.cjs");
|
|
4
4
|
const require_src_modules_base_base_repository = require("../base/base.repository.cjs");
|
|
5
|
-
let uuid = require("uuid");
|
|
6
5
|
let drizzle_orm = require("drizzle-orm");
|
|
7
6
|
let neverthrow = require("neverthrow");
|
|
7
|
+
let uuid = require("uuid");
|
|
8
8
|
//#region src/modules/auth/auth.repository.ts
|
|
9
9
|
({ ...require_src_modules_auth_auth_db.auth_db_exports });
|
|
10
10
|
function parseOrganizationMetadata(metadata) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { auth_db_exports } from "./auth.db.mjs";
|
|
2
2
|
import { BaseRepository } from "../base/base.repository.mjs";
|
|
3
|
-
import { v4 } from "uuid";
|
|
4
3
|
import { and, count, desc, eq, gte, ne } from "drizzle-orm";
|
|
5
4
|
import { ok } from "neverthrow";
|
|
5
|
+
import { v4 } from "uuid";
|
|
6
6
|
//#region src/modules/auth/auth.repository.ts
|
|
7
7
|
({ ...auth_db_exports });
|
|
8
8
|
function parseOrganizationMetadata(metadata) {
|
|
@@ -76,8 +76,8 @@ declare function createAuthTRPC({
|
|
|
76
76
|
id: string;
|
|
77
77
|
email: string;
|
|
78
78
|
createdAt: Date;
|
|
79
|
-
userId: string;
|
|
80
79
|
expiresAt: Date | null;
|
|
80
|
+
userId: string;
|
|
81
81
|
claimId: string;
|
|
82
82
|
url: string;
|
|
83
83
|
};
|
|
@@ -91,8 +91,8 @@ declare function createAuthTRPC({
|
|
|
91
91
|
id: string;
|
|
92
92
|
email: string;
|
|
93
93
|
createdAt: Date;
|
|
94
|
-
userId: string;
|
|
95
94
|
expiresAt: Date | null;
|
|
95
|
+
userId: string;
|
|
96
96
|
claimId: string;
|
|
97
97
|
url: string;
|
|
98
98
|
}[];
|
|
@@ -146,8 +146,8 @@ declare function createAuthTRPC({
|
|
|
146
146
|
listAdminWaitlist: _$_trpc_server0.TRPCQueryProcedure<{
|
|
147
147
|
input: void;
|
|
148
148
|
output: {
|
|
149
|
-
id: string;
|
|
150
149
|
name: string | null;
|
|
150
|
+
id: string;
|
|
151
151
|
email: string | null;
|
|
152
152
|
createdAt: Date;
|
|
153
153
|
updatedAt: Date | null;
|
|
@@ -160,8 +160,8 @@ declare function createAuthTRPC({
|
|
|
160
160
|
email: string;
|
|
161
161
|
};
|
|
162
162
|
output: {
|
|
163
|
-
id: string;
|
|
164
163
|
name: string | null;
|
|
164
|
+
id: string;
|
|
165
165
|
email: string | null;
|
|
166
166
|
createdAt: Date;
|
|
167
167
|
updatedAt: Date | null;
|
|
@@ -191,8 +191,8 @@ declare function createAuthTRPC({
|
|
|
191
191
|
id: string;
|
|
192
192
|
};
|
|
193
193
|
output: {
|
|
194
|
-
id: string;
|
|
195
194
|
name: string | null;
|
|
195
|
+
id: string;
|
|
196
196
|
email: string | null;
|
|
197
197
|
createdAt: Date;
|
|
198
198
|
updatedAt: Date | null;
|
|
@@ -205,8 +205,8 @@ declare function createAuthTRPC({
|
|
|
205
205
|
id: string;
|
|
206
206
|
};
|
|
207
207
|
output: {
|
|
208
|
-
id: string;
|
|
209
208
|
name: string | null;
|
|
209
|
+
id: string;
|
|
210
210
|
email: string | null;
|
|
211
211
|
createdAt: Date;
|
|
212
212
|
updatedAt: Date | null;
|
|
@@ -219,8 +219,8 @@ declare function createAuthTRPC({
|
|
|
219
219
|
email: string;
|
|
220
220
|
};
|
|
221
221
|
output: {
|
|
222
|
-
id: string;
|
|
223
222
|
name: string | null;
|
|
223
|
+
id: string;
|
|
224
224
|
email: string | null;
|
|
225
225
|
createdAt: Date;
|
|
226
226
|
updatedAt: Date | null;
|
|
@@ -76,8 +76,8 @@ declare function createAuthTRPC({
|
|
|
76
76
|
id: string;
|
|
77
77
|
email: string;
|
|
78
78
|
createdAt: Date;
|
|
79
|
-
userId: string;
|
|
80
79
|
expiresAt: Date | null;
|
|
80
|
+
userId: string;
|
|
81
81
|
claimId: string;
|
|
82
82
|
url: string;
|
|
83
83
|
};
|
|
@@ -91,8 +91,8 @@ declare function createAuthTRPC({
|
|
|
91
91
|
id: string;
|
|
92
92
|
email: string;
|
|
93
93
|
createdAt: Date;
|
|
94
|
-
userId: string;
|
|
95
94
|
expiresAt: Date | null;
|
|
95
|
+
userId: string;
|
|
96
96
|
claimId: string;
|
|
97
97
|
url: string;
|
|
98
98
|
}[];
|
|
@@ -146,8 +146,8 @@ declare function createAuthTRPC({
|
|
|
146
146
|
listAdminWaitlist: _$_trpc_server0.TRPCQueryProcedure<{
|
|
147
147
|
input: void;
|
|
148
148
|
output: {
|
|
149
|
-
id: string;
|
|
150
149
|
name: string | null;
|
|
150
|
+
id: string;
|
|
151
151
|
email: string | null;
|
|
152
152
|
createdAt: Date;
|
|
153
153
|
updatedAt: Date | null;
|
|
@@ -160,8 +160,8 @@ declare function createAuthTRPC({
|
|
|
160
160
|
email: string;
|
|
161
161
|
};
|
|
162
162
|
output: {
|
|
163
|
-
id: string;
|
|
164
163
|
name: string | null;
|
|
164
|
+
id: string;
|
|
165
165
|
email: string | null;
|
|
166
166
|
createdAt: Date;
|
|
167
167
|
updatedAt: Date | null;
|
|
@@ -191,8 +191,8 @@ declare function createAuthTRPC({
|
|
|
191
191
|
id: string;
|
|
192
192
|
};
|
|
193
193
|
output: {
|
|
194
|
-
id: string;
|
|
195
194
|
name: string | null;
|
|
195
|
+
id: string;
|
|
196
196
|
email: string | null;
|
|
197
197
|
createdAt: Date;
|
|
198
198
|
updatedAt: Date | null;
|
|
@@ -205,8 +205,8 @@ declare function createAuthTRPC({
|
|
|
205
205
|
id: string;
|
|
206
206
|
};
|
|
207
207
|
output: {
|
|
208
|
-
id: string;
|
|
209
208
|
name: string | null;
|
|
209
|
+
id: string;
|
|
210
210
|
email: string | null;
|
|
211
211
|
createdAt: Date;
|
|
212
212
|
updatedAt: Date | null;
|
|
@@ -219,8 +219,8 @@ declare function createAuthTRPC({
|
|
|
219
219
|
email: string;
|
|
220
220
|
};
|
|
221
221
|
output: {
|
|
222
|
-
id: string;
|
|
223
222
|
name: string | null;
|
|
223
|
+
id: string;
|
|
224
224
|
email: string | null;
|
|
225
225
|
createdAt: Date;
|
|
226
226
|
updatedAt: Date | null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../../../_virtual/_rolldown/runtime.cjs");
|
|
3
3
|
const require_src_modules_auth_auth_db = require("./auth.db.cjs");
|
|
4
|
-
let uuid = require("uuid");
|
|
5
4
|
let drizzle_orm = require("drizzle-orm");
|
|
5
|
+
let uuid = require("uuid");
|
|
6
6
|
//#region src/modules/auth/auth.utils.ts
|
|
7
7
|
({ ...require_src_modules_auth_auth_db.auth_db_exports });
|
|
8
8
|
async function getActiveOrganizationAndTeam(orm, schema, userId) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { auth_db_exports } from "./auth.db.mjs";
|
|
2
|
-
import { v4 } from "uuid";
|
|
3
2
|
import { desc, eq } from "drizzle-orm";
|
|
3
|
+
import { v4 } from "uuid";
|
|
4
4
|
//#region src/modules/auth/auth.utils.ts
|
|
5
5
|
({ ...auth_db_exports });
|
|
6
6
|
async function getActiveOrganizationAndTeam(orm, schema, userId) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as _$drizzle_orm_sqlite_core0 from "drizzle-orm/sqlite-core";
|
|
2
1
|
import * as _$drizzle_orm0 from "drizzle-orm";
|
|
2
|
+
import * as _$drizzle_orm_sqlite_core0 from "drizzle-orm/sqlite-core";
|
|
3
3
|
|
|
4
4
|
//#region src/modules/base/base.db.d.ts
|
|
5
5
|
declare function createDbId(): _$drizzle_orm0.HasRuntimeDefault<_$drizzle_orm0.HasDefault<_$drizzle_orm0.IsPrimaryKey<_$drizzle_orm0.NotNull<_$drizzle_orm_sqlite_core0.SQLiteTextBuilderInitial<"id", [string, ...string[]], number | undefined>>>>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ServerResultAsync, pickColumns } from "./base.dto.mjs";
|
|
2
2
|
import { Base } from "./base.abstract.mjs";
|
|
3
|
-
import { SQLiteColumn, SQLiteTableWithColumns } from "drizzle-orm/sqlite-core";
|
|
4
3
|
import { InferInsertModel, InferSelectModel, SQL, SelectedFields } from "drizzle-orm";
|
|
4
|
+
import { SQLiteColumn, SQLiteTableWithColumns } from "drizzle-orm/sqlite-core";
|
|
5
5
|
import { QueryFilters, QueryInput } from "@m5kdev/commons/modules/schemas/query.schema";
|
|
6
6
|
import { LibSQLDatabase } from "drizzle-orm/libsql";
|
|
7
7
|
|
|
@@ -4,7 +4,7 @@ import * as _$drizzle_orm_sqlite_core0 from "drizzle-orm/sqlite-core";
|
|
|
4
4
|
import { LibSQLDatabase } from "drizzle-orm/libsql";
|
|
5
5
|
import { InferSelectModel } from "drizzle-orm";
|
|
6
6
|
import { BillingSchema } from "@m5kdev/commons/modules/billing/billing.schema";
|
|
7
|
-
import { Stripe } from "stripe";
|
|
7
|
+
import { Stripe as Stripe$1 } from "stripe";
|
|
8
8
|
import { StripePlan } from "@m5kdev/commons/modules/billing/billing.types";
|
|
9
9
|
|
|
10
10
|
//#region src/modules/billing/billing.repository.d.ts
|
|
@@ -2713,7 +2713,7 @@ declare const schema: {
|
|
|
2713
2713
|
type Schema = typeof schema;
|
|
2714
2714
|
type Orm = LibSQLDatabase<Schema>;
|
|
2715
2715
|
declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<string, never>, Schema["subscriptions"]> {
|
|
2716
|
-
stripe: Stripe;
|
|
2716
|
+
stripe: Stripe$1;
|
|
2717
2717
|
plans: StripePlan[];
|
|
2718
2718
|
trial?: StripePlan;
|
|
2719
2719
|
constructor(options: {
|
|
@@ -2721,7 +2721,7 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
|
|
|
2721
2721
|
schema: Schema;
|
|
2722
2722
|
table: Schema["subscriptions"];
|
|
2723
2723
|
libs: {
|
|
2724
|
-
stripe: Stripe;
|
|
2724
|
+
stripe: Stripe$1;
|
|
2725
2725
|
};
|
|
2726
2726
|
config: {
|
|
2727
2727
|
trial?: StripePlan;
|
|
@@ -2730,7 +2730,7 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
|
|
|
2730
2730
|
});
|
|
2731
2731
|
hasTrial(): boolean;
|
|
2732
2732
|
getPlanByPriceId(priceId: string): StripePlan | undefined;
|
|
2733
|
-
getCustomerByEmail(email: string): ServerResultAsync<Stripe.Customer | null>;
|
|
2733
|
+
getCustomerByEmail(email: string): ServerResultAsync<Stripe$1.Customer | null>;
|
|
2734
2734
|
getUserByCustomerId(customerId: string): ServerResultAsync<InferSelectModel<Schema["users"]> | null>;
|
|
2735
2735
|
createCustomer({
|
|
2736
2736
|
email,
|
|
@@ -2740,8 +2740,8 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
|
|
|
2740
2740
|
email: string;
|
|
2741
2741
|
name?: string;
|
|
2742
2742
|
userId: string;
|
|
2743
|
-
}): ServerResultAsync<Stripe.Customer>;
|
|
2744
|
-
createTrialSubscription(customerId: string): ServerResultAsync<Stripe.Subscription>;
|
|
2743
|
+
}): ServerResultAsync<Stripe$1.Customer>;
|
|
2744
|
+
createTrialSubscription(customerId: string): ServerResultAsync<Stripe$1.Subscription>;
|
|
2745
2745
|
createSubscription({
|
|
2746
2746
|
customerId,
|
|
2747
2747
|
priceId,
|
|
@@ -2752,7 +2752,7 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
|
|
|
2752
2752
|
priceId: string;
|
|
2753
2753
|
quantity?: number;
|
|
2754
2754
|
trialDays?: number;
|
|
2755
|
-
}): ServerResultAsync<Stripe.Subscription>;
|
|
2755
|
+
}): ServerResultAsync<Stripe$1.Subscription>;
|
|
2756
2756
|
updateUserCustomerId({
|
|
2757
2757
|
userId,
|
|
2758
2758
|
customerId
|
|
@@ -2762,7 +2762,7 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
|
|
|
2762
2762
|
}): ServerResultAsync<InferSelectModel<Schema["users"]>>;
|
|
2763
2763
|
getLatestSubscription(referenceId: string): ServerResultAsync<BillingSchema | null>;
|
|
2764
2764
|
getActiveSubscription(referenceId: string): ServerResultAsync<BillingSchema | null>;
|
|
2765
|
-
listInvoices(customerId: string): ServerResultAsync<Stripe.Invoice[]>;
|
|
2765
|
+
listInvoices(customerId: string): ServerResultAsync<Stripe$1.Invoice[]>;
|
|
2766
2766
|
createCheckoutSession({
|
|
2767
2767
|
customerId,
|
|
2768
2768
|
priceId,
|
|
@@ -2771,8 +2771,8 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
|
|
|
2771
2771
|
customerId: string;
|
|
2772
2772
|
priceId: string;
|
|
2773
2773
|
userId: string;
|
|
2774
|
-
}): ServerResultAsync<Stripe.Checkout.Session>;
|
|
2775
|
-
createBillingPortalSession(customerId: string): ServerResultAsync<Stripe.BillingPortal.Session>;
|
|
2774
|
+
}): ServerResultAsync<Stripe$1.Checkout.Session>;
|
|
2775
|
+
createBillingPortalSession(customerId: string): ServerResultAsync<Stripe$1.BillingPortal.Session>;
|
|
2776
2776
|
syncStripeData({
|
|
2777
2777
|
customerId,
|
|
2778
2778
|
userId
|
|
@@ -2780,7 +2780,7 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
|
|
|
2780
2780
|
customerId: string;
|
|
2781
2781
|
userId: string;
|
|
2782
2782
|
}): ServerResultAsync<boolean>;
|
|
2783
|
-
constructEvent(body: Buffer | string, signature: string, secret: string): ServerResult<Stripe.Event>;
|
|
2783
|
+
constructEvent(body: Buffer | string, signature: string, secret: string): ServerResult<Stripe$1.Event>;
|
|
2784
2784
|
}
|
|
2785
2785
|
//#endregion
|
|
2786
2786
|
export { BillingRepository };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ServerResult, ServerResultAsync } from "../base/base.dto.mjs";
|
|
2
2
|
import { BaseTableRepository } from "../base/base.repository.mjs";
|
|
3
3
|
import { BillingSchema } from "@m5kdev/commons/modules/billing/billing.schema";
|
|
4
|
-
import * as _$drizzle_orm_sqlite_core0 from "drizzle-orm/sqlite-core";
|
|
5
4
|
import { InferSelectModel } from "drizzle-orm";
|
|
5
|
+
import * as _$drizzle_orm_sqlite_core0 from "drizzle-orm/sqlite-core";
|
|
6
6
|
import { LibSQLDatabase } from "drizzle-orm/libsql";
|
|
7
7
|
import { Stripe } from "stripe";
|
|
8
8
|
import { StripePlan } from "@m5kdev/commons/modules/billing/billing.types";
|
|
@@ -4,7 +4,7 @@ import { BillingRepository } from "./billing.repository.cjs";
|
|
|
4
4
|
import { User } from "../auth/auth.lib.cjs";
|
|
5
5
|
import { BaseService } from "../base/base.service.cjs";
|
|
6
6
|
import { BillingSchema } from "@m5kdev/commons/modules/billing/billing.schema";
|
|
7
|
-
import Stripe
|
|
7
|
+
import Stripe from "stripe";
|
|
8
8
|
|
|
9
9
|
//#region src/modules/billing/billing.service.d.ts
|
|
10
10
|
declare class BillingService extends BaseService<{
|
|
@@ -18,7 +18,7 @@ declare class BillingService extends BaseService<{
|
|
|
18
18
|
email: string;
|
|
19
19
|
name?: string;
|
|
20
20
|
};
|
|
21
|
-
}): ServerResultAsync<Stripe
|
|
21
|
+
}): ServerResultAsync<Stripe.Customer>;
|
|
22
22
|
createUserHook({
|
|
23
23
|
user
|
|
24
24
|
}: {
|
|
@@ -29,7 +29,7 @@ declare class BillingService extends BaseService<{
|
|
|
29
29
|
};
|
|
30
30
|
}): ServerResultAsync<boolean>;
|
|
31
31
|
getActiveSubscription(ctx: Context): ServerResultAsync<BillingSchema | null>;
|
|
32
|
-
listInvoices(ctx: Context): ServerResultAsync<Stripe
|
|
32
|
+
listInvoices(ctx: Context): ServerResultAsync<Stripe.Invoice[]>;
|
|
33
33
|
createCheckoutSession({
|
|
34
34
|
priceId
|
|
35
35
|
}: {
|
|
@@ -38,15 +38,15 @@ declare class BillingService extends BaseService<{
|
|
|
38
38
|
user
|
|
39
39
|
}: {
|
|
40
40
|
user: User;
|
|
41
|
-
}): ServerResultAsync<Stripe
|
|
41
|
+
}): ServerResultAsync<Stripe.Checkout.Session>;
|
|
42
42
|
createBillingPortalSession({
|
|
43
43
|
user
|
|
44
44
|
}: {
|
|
45
45
|
user: User;
|
|
46
|
-
}): ServerResultAsync<Stripe
|
|
47
|
-
constructEvent(body: Buffer | string, signature: string): ServerResult<Stripe
|
|
46
|
+
}): ServerResultAsync<Stripe.BillingPortal.Session>;
|
|
47
|
+
constructEvent(body: Buffer | string, signature: string): ServerResult<Stripe.Event>;
|
|
48
48
|
syncStripeData(customerId: string, eventType?: string): ServerResultAsync<boolean>;
|
|
49
|
-
processEvent(event: Stripe
|
|
49
|
+
processEvent(event: Stripe.Event): ServerResultAsync<boolean>;
|
|
50
50
|
}
|
|
51
51
|
//#endregion
|
|
52
52
|
export { BillingService };
|
|
@@ -27,10 +27,10 @@ declare const connectSelectOutputSchema: z.ZodObject<{
|
|
|
27
27
|
id: z.ZodString;
|
|
28
28
|
createdAt: z.ZodDate;
|
|
29
29
|
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
30
|
-
userId: z.ZodString;
|
|
31
|
-
provider: z.ZodString;
|
|
32
30
|
expiresAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
31
|
+
userId: z.ZodString;
|
|
33
32
|
scope: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
33
|
+
provider: z.ZodString;
|
|
34
34
|
accountType: z.ZodString;
|
|
35
35
|
providerAccountId: z.ZodString;
|
|
36
36
|
handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -51,10 +51,10 @@ declare const connectListOutputSchema: z.ZodArray<z.ZodObject<{
|
|
|
51
51
|
id: z.ZodString;
|
|
52
52
|
createdAt: z.ZodDate;
|
|
53
53
|
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
54
|
-
userId: z.ZodString;
|
|
55
|
-
provider: z.ZodString;
|
|
56
54
|
expiresAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
55
|
+
userId: z.ZodString;
|
|
57
56
|
scope: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
57
|
+
provider: z.ZodString;
|
|
58
58
|
accountType: z.ZodString;
|
|
59
59
|
providerAccountId: z.ZodString;
|
|
60
60
|
handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -27,10 +27,10 @@ declare const connectSelectOutputSchema: z.ZodObject<{
|
|
|
27
27
|
id: z.ZodString;
|
|
28
28
|
createdAt: z.ZodDate;
|
|
29
29
|
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
30
|
-
userId: z.ZodString;
|
|
31
|
-
provider: z.ZodString;
|
|
32
30
|
expiresAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
31
|
+
userId: z.ZodString;
|
|
33
32
|
scope: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
33
|
+
provider: z.ZodString;
|
|
34
34
|
accountType: z.ZodString;
|
|
35
35
|
providerAccountId: z.ZodString;
|
|
36
36
|
handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -51,10 +51,10 @@ declare const connectListOutputSchema: z.ZodArray<z.ZodObject<{
|
|
|
51
51
|
id: z.ZodString;
|
|
52
52
|
createdAt: z.ZodDate;
|
|
53
53
|
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
54
|
-
userId: z.ZodString;
|
|
55
|
-
provider: z.ZodString;
|
|
56
54
|
expiresAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
55
|
+
userId: z.ZodString;
|
|
57
56
|
scope: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
57
|
+
provider: z.ZodString;
|
|
58
58
|
accountType: z.ZodString;
|
|
59
59
|
providerAccountId: z.ZodString;
|
|
60
60
|
handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -396,12 +396,12 @@ declare class ConnectRepository extends BaseTableRepository<Orm, Schema, Record<
|
|
|
396
396
|
id: string;
|
|
397
397
|
createdAt: Date;
|
|
398
398
|
updatedAt: Date | null;
|
|
399
|
-
userId: string;
|
|
400
|
-
provider: string;
|
|
401
399
|
expiresAt: Date | null;
|
|
400
|
+
userId: string;
|
|
402
401
|
accessToken: string;
|
|
403
402
|
refreshToken: string | null;
|
|
404
403
|
scope: string | null;
|
|
404
|
+
provider: string;
|
|
405
405
|
accountType: string;
|
|
406
406
|
providerAccountId: string;
|
|
407
407
|
handle: string | null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ServerResult } from "../base/base.dto.mjs";
|
|
2
2
|
import { BaseTableRepository } from "../base/base.repository.mjs";
|
|
3
3
|
import { ConnectListInputSchema } from "./connect.dto.mjs";
|
|
4
|
-
import * as _$drizzle_orm_sqlite_core0 from "drizzle-orm/sqlite-core";
|
|
5
4
|
import { InferInsertModel, InferSelectModel } from "drizzle-orm";
|
|
5
|
+
import * as _$drizzle_orm_sqlite_core0 from "drizzle-orm/sqlite-core";
|
|
6
6
|
import { LibSQLDatabase } from "drizzle-orm/libsql";
|
|
7
7
|
|
|
8
8
|
//#region src/modules/connect/connect.repository.d.ts
|
|
@@ -396,12 +396,12 @@ declare class ConnectRepository extends BaseTableRepository<Orm, Schema, Record<
|
|
|
396
396
|
id: string;
|
|
397
397
|
createdAt: Date;
|
|
398
398
|
updatedAt: Date | null;
|
|
399
|
-
userId: string;
|
|
400
|
-
provider: string;
|
|
401
399
|
expiresAt: Date | null;
|
|
400
|
+
userId: string;
|
|
402
401
|
accessToken: string;
|
|
403
402
|
refreshToken: string | null;
|
|
404
403
|
scope: string | null;
|
|
404
|
+
provider: string;
|
|
405
405
|
accountType: string;
|
|
406
406
|
providerAccountId: string;
|
|
407
407
|
handle: string | null;
|
|
@@ -22,12 +22,12 @@ declare class ConnectService extends BaseService<{
|
|
|
22
22
|
id: string;
|
|
23
23
|
createdAt: Date;
|
|
24
24
|
updatedAt: Date | null;
|
|
25
|
-
userId: string;
|
|
26
|
-
provider: string;
|
|
27
25
|
expiresAt: Date | null;
|
|
26
|
+
userId: string;
|
|
28
27
|
accessToken: string;
|
|
29
28
|
refreshToken: string | null;
|
|
30
29
|
scope: string | null;
|
|
30
|
+
provider: string;
|
|
31
31
|
accountType: string;
|
|
32
32
|
providerAccountId: string;
|
|
33
33
|
handle: string | null;
|
|
@@ -43,12 +43,12 @@ declare class ConnectService extends BaseService<{
|
|
|
43
43
|
id: string;
|
|
44
44
|
createdAt: Date;
|
|
45
45
|
updatedAt: Date | null;
|
|
46
|
-
userId: string;
|
|
47
|
-
provider: string;
|
|
48
46
|
expiresAt: Date | null;
|
|
47
|
+
userId: string;
|
|
49
48
|
accessToken: string;
|
|
50
49
|
refreshToken: string | null;
|
|
51
50
|
scope: string | null;
|
|
51
|
+
provider: string;
|
|
52
52
|
accountType: string;
|
|
53
53
|
providerAccountId: string;
|
|
54
54
|
handle: string | null;
|
|
@@ -22,12 +22,12 @@ declare class ConnectService extends BaseService<{
|
|
|
22
22
|
id: string;
|
|
23
23
|
createdAt: Date;
|
|
24
24
|
updatedAt: Date | null;
|
|
25
|
-
userId: string;
|
|
26
|
-
provider: string;
|
|
27
25
|
expiresAt: Date | null;
|
|
26
|
+
userId: string;
|
|
28
27
|
accessToken: string;
|
|
29
28
|
refreshToken: string | null;
|
|
30
29
|
scope: string | null;
|
|
30
|
+
provider: string;
|
|
31
31
|
accountType: string;
|
|
32
32
|
providerAccountId: string;
|
|
33
33
|
handle: string | null;
|
|
@@ -43,12 +43,12 @@ declare class ConnectService extends BaseService<{
|
|
|
43
43
|
id: string;
|
|
44
44
|
createdAt: Date;
|
|
45
45
|
updatedAt: Date | null;
|
|
46
|
-
userId: string;
|
|
47
|
-
provider: string;
|
|
48
46
|
expiresAt: Date | null;
|
|
47
|
+
userId: string;
|
|
49
48
|
accessToken: string;
|
|
50
49
|
refreshToken: string | null;
|
|
51
50
|
scope: string | null;
|
|
51
|
+
provider: string;
|
|
52
52
|
accountType: string;
|
|
53
53
|
providerAccountId: string;
|
|
54
54
|
handle: string | null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
|
|
3
3
|
const require_src_modules_base_base_service = require("../base/base.service.cjs");
|
|
4
|
-
let uuid = require("uuid");
|
|
5
4
|
let neverthrow = require("neverthrow");
|
|
5
|
+
let uuid = require("uuid");
|
|
6
6
|
let node_path = require("node:path");
|
|
7
7
|
node_path = require_runtime.__toESM(node_path);
|
|
8
8
|
let _m5kdev_commons_modules_file_file_constants = require("@m5kdev/commons/modules/file/file.constants");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseService } from "../base/base.service.mjs";
|
|
2
|
-
import { v4 } from "uuid";
|
|
3
2
|
import { err, ok } from "neverthrow";
|
|
3
|
+
import { v4 } from "uuid";
|
|
4
4
|
import path, { dirname } from "node:path";
|
|
5
5
|
import { fileTypes } from "@m5kdev/commons/modules/file/file.constants";
|
|
6
6
|
import { createWriteStream } from "node:fs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ServerResultAsync } from "../base/base.dto.mjs";
|
|
2
2
|
import { BaseTableRepository } from "../base/base.repository.mjs";
|
|
3
|
-
import * as _$drizzle_orm_sqlite_core0 from "drizzle-orm/sqlite-core";
|
|
4
3
|
import { InferInsertModel, InferSelectModel } from "drizzle-orm";
|
|
4
|
+
import * as _$drizzle_orm_sqlite_core0 from "drizzle-orm/sqlite-core";
|
|
5
5
|
import { LibSQLDatabase } from "drizzle-orm/libsql";
|
|
6
6
|
|
|
7
7
|
//#region src/modules/recurrence/recurrence.repository.d.ts
|
|
@@ -18,7 +18,7 @@ declare class RecurrenceService extends BaseService<{
|
|
|
18
18
|
filters?: {
|
|
19
19
|
columnId: string;
|
|
20
20
|
type: "string" | "number" | "boolean" | "date" | "enum" | "jsonArray";
|
|
21
|
-
method: "contains" | "starts_with" | "ends_with" | "
|
|
21
|
+
method: "contains" | "starts_with" | "ends_with" | "intersect" | "on" | "equals" | "greater_than" | "less_than" | "between" | "before" | "after" | "oneOf" | "isEmpty" | "isNotEmpty" | "is_null" | "is_not_null";
|
|
22
22
|
value: string | number | boolean | string[];
|
|
23
23
|
valueTo?: string | undefined;
|
|
24
24
|
endColumnId?: string | undefined;
|
|
@@ -30,12 +30,12 @@ declare class RecurrenceService extends BaseService<{
|
|
|
30
30
|
actor: UserActor;
|
|
31
31
|
}, {
|
|
32
32
|
rows: {
|
|
33
|
-
id: string;
|
|
34
33
|
name: string | null;
|
|
34
|
+
id: string;
|
|
35
35
|
createdAt: Date;
|
|
36
36
|
updatedAt: Date;
|
|
37
|
-
metadata: Record<string, any> | null;
|
|
38
37
|
userId: string | null;
|
|
38
|
+
metadata: Record<string, any> | null;
|
|
39
39
|
organizationId: string | null;
|
|
40
40
|
teamId: string | null;
|
|
41
41
|
enabled: boolean;
|
|
@@ -18,7 +18,7 @@ declare class RecurrenceService extends BaseService<{
|
|
|
18
18
|
filters?: {
|
|
19
19
|
columnId: string;
|
|
20
20
|
type: "string" | "number" | "boolean" | "date" | "enum" | "jsonArray";
|
|
21
|
-
method: "contains" | "starts_with" | "ends_with" | "
|
|
21
|
+
method: "contains" | "starts_with" | "ends_with" | "intersect" | "on" | "equals" | "greater_than" | "less_than" | "between" | "before" | "after" | "oneOf" | "isEmpty" | "isNotEmpty" | "is_null" | "is_not_null";
|
|
22
22
|
value: string | number | boolean | string[];
|
|
23
23
|
valueTo?: string | undefined;
|
|
24
24
|
endColumnId?: string | undefined;
|
|
@@ -30,12 +30,12 @@ declare class RecurrenceService extends BaseService<{
|
|
|
30
30
|
actor: UserActor;
|
|
31
31
|
}, {
|
|
32
32
|
rows: {
|
|
33
|
-
id: string;
|
|
34
33
|
name: string | null;
|
|
34
|
+
id: string;
|
|
35
35
|
createdAt: Date;
|
|
36
36
|
updatedAt: Date;
|
|
37
|
-
metadata: Record<string, any> | null;
|
|
38
37
|
userId: string | null;
|
|
38
|
+
metadata: Record<string, any> | null;
|
|
39
39
|
organizationId: string | null;
|
|
40
40
|
teamId: string | null;
|
|
41
41
|
enabled: boolean;
|
|
@@ -21,7 +21,7 @@ declare function createRecurrenceTRPC({
|
|
|
21
21
|
filters?: {
|
|
22
22
|
columnId: string;
|
|
23
23
|
type: "string" | "number" | "boolean" | "date" | "enum" | "jsonArray";
|
|
24
|
-
method: "contains" | "starts_with" | "ends_with" | "
|
|
24
|
+
method: "contains" | "starts_with" | "ends_with" | "intersect" | "on" | "equals" | "greater_than" | "less_than" | "between" | "before" | "after" | "oneOf" | "isEmpty" | "isNotEmpty" | "is_null" | "is_not_null";
|
|
25
25
|
value: string | number | boolean | string[];
|
|
26
26
|
valueTo?: string | undefined;
|
|
27
27
|
endColumnId?: string | undefined;
|
|
@@ -21,7 +21,7 @@ declare function createRecurrenceTRPC({
|
|
|
21
21
|
filters?: {
|
|
22
22
|
columnId: string;
|
|
23
23
|
type: "string" | "number" | "boolean" | "date" | "enum" | "jsonArray";
|
|
24
|
-
method: "contains" | "starts_with" | "ends_with" | "
|
|
24
|
+
method: "contains" | "starts_with" | "ends_with" | "intersect" | "on" | "equals" | "greater_than" | "less_than" | "between" | "before" | "after" | "oneOf" | "isEmpty" | "isNotEmpty" | "is_null" | "is_not_null";
|
|
25
25
|
value: string | number | boolean | string[];
|
|
26
26
|
valueTo?: string | undefined;
|
|
27
27
|
endColumnId?: string | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ServerError } from "../../utils/errors.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import * as _$drizzle_orm_sqlite_core0 from "drizzle-orm/sqlite-core";
|
|
4
3
|
import { Result } from "neverthrow";
|
|
4
|
+
import * as _$drizzle_orm_sqlite_core0 from "drizzle-orm/sqlite-core";
|
|
5
5
|
import * as _$drizzle_zod0 from "drizzle-zod";
|
|
6
6
|
|
|
7
7
|
//#region src/modules/tag/tag.dto.d.ts
|
|
@@ -21,7 +21,7 @@ declare function createTagTRPC({
|
|
|
21
21
|
filters?: {
|
|
22
22
|
columnId: string;
|
|
23
23
|
type: "string" | "number" | "boolean" | "date" | "enum" | "jsonArray";
|
|
24
|
-
method: "contains" | "starts_with" | "ends_with" | "
|
|
24
|
+
method: "contains" | "starts_with" | "ends_with" | "intersect" | "on" | "equals" | "greater_than" | "less_than" | "between" | "before" | "after" | "oneOf" | "isEmpty" | "isNotEmpty" | "is_null" | "is_not_null";
|
|
25
25
|
value: string | number | boolean | string[];
|
|
26
26
|
valueTo?: string | undefined;
|
|
27
27
|
endColumnId?: string | undefined;
|
|
@@ -55,7 +55,7 @@ declare function createTagTRPC({
|
|
|
55
55
|
resourceIds?: {
|
|
56
56
|
columnId: string;
|
|
57
57
|
type: "string" | "number" | "boolean" | "date" | "enum" | "jsonArray";
|
|
58
|
-
method: "contains" | "starts_with" | "ends_with" | "
|
|
58
|
+
method: "contains" | "starts_with" | "ends_with" | "intersect" | "on" | "equals" | "greater_than" | "less_than" | "between" | "before" | "after" | "oneOf" | "isEmpty" | "isNotEmpty" | "is_null" | "is_not_null";
|
|
59
59
|
value: string | number | boolean | string[];
|
|
60
60
|
valueTo?: string | undefined;
|
|
61
61
|
endColumnId?: string | undefined;
|
|
@@ -21,7 +21,7 @@ declare function createTagTRPC({
|
|
|
21
21
|
filters?: {
|
|
22
22
|
columnId: string;
|
|
23
23
|
type: "string" | "number" | "boolean" | "date" | "enum" | "jsonArray";
|
|
24
|
-
method: "contains" | "starts_with" | "ends_with" | "
|
|
24
|
+
method: "contains" | "starts_with" | "ends_with" | "intersect" | "on" | "equals" | "greater_than" | "less_than" | "between" | "before" | "after" | "oneOf" | "isEmpty" | "isNotEmpty" | "is_null" | "is_not_null";
|
|
25
25
|
value: string | number | boolean | string[];
|
|
26
26
|
valueTo?: string | undefined;
|
|
27
27
|
endColumnId?: string | undefined;
|
|
@@ -55,7 +55,7 @@ declare function createTagTRPC({
|
|
|
55
55
|
resourceIds?: {
|
|
56
56
|
columnId: string;
|
|
57
57
|
type: "string" | "number" | "boolean" | "date" | "enum" | "jsonArray";
|
|
58
|
-
method: "contains" | "starts_with" | "ends_with" | "
|
|
58
|
+
method: "contains" | "starts_with" | "ends_with" | "intersect" | "on" | "equals" | "greater_than" | "less_than" | "between" | "before" | "after" | "oneOf" | "isEmpty" | "isNotEmpty" | "is_null" | "is_not_null";
|
|
59
59
|
value: string | number | boolean | string[];
|
|
60
60
|
valueTo?: string | undefined;
|
|
61
61
|
endColumnId?: string | undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
|
|
3
3
|
const require_src_modules_base_base_service = require("../base/base.service.cjs");
|
|
4
|
-
let uuid = require("uuid");
|
|
5
4
|
let neverthrow = require("neverthrow");
|
|
5
|
+
let uuid = require("uuid");
|
|
6
6
|
let node_path = require("node:path");
|
|
7
7
|
node_path = require_runtime.__toESM(node_path);
|
|
8
8
|
let node_fs = require("node:fs");
|
|
@@ -10,12 +10,19 @@ let node_child_process = require("node:child_process");
|
|
|
10
10
|
let ffmpeg_ffprobe_static = require("ffmpeg-ffprobe-static");
|
|
11
11
|
ffmpeg_ffprobe_static = require_runtime.__toESM(ffmpeg_ffprobe_static);
|
|
12
12
|
//#region src/modules/video/video.service.ts
|
|
13
|
-
if (!ffmpeg_ffprobe_static.default.ffmpegPath || !ffmpeg_ffprobe_static.default.ffprobePath) throw new Error("FFmpeg or FFprobe not found");
|
|
14
13
|
const uploadsDir = node_path.default.join(__dirname, "..", "uploads");
|
|
15
14
|
if (!(0, node_fs.existsSync)(uploadsDir)) (0, node_fs.mkdirSync)(uploadsDir, { recursive: true });
|
|
15
|
+
const resolveFfmpegPath = () => {
|
|
16
|
+
const envPath = process.env.FFMPEG_PATH;
|
|
17
|
+
if (envPath && (0, node_fs.existsSync)(envPath)) return envPath;
|
|
18
|
+
const staticPath = ffmpeg_ffprobe_static.default.ffmpegPath;
|
|
19
|
+
if (typeof staticPath === "string" && (0, node_fs.existsSync)(staticPath)) return staticPath;
|
|
20
|
+
return "ffmpeg";
|
|
21
|
+
};
|
|
16
22
|
const runFfmpeg = async (args) => {
|
|
17
23
|
await new Promise((resolve, reject) => {
|
|
18
|
-
const
|
|
24
|
+
const ffmpegPath = resolveFfmpegPath();
|
|
25
|
+
const child = (0, node_child_process.spawn)(ffmpegPath, [...args], { stdio: [
|
|
19
26
|
"ignore",
|
|
20
27
|
"ignore",
|
|
21
28
|
"pipe"
|
|
@@ -25,7 +32,15 @@ const runFfmpeg = async (args) => {
|
|
|
25
32
|
child.stderr?.on("data", (chunk) => {
|
|
26
33
|
stderr += chunk;
|
|
27
34
|
});
|
|
28
|
-
child.on("error", (error) =>
|
|
35
|
+
child.on("error", (error) => {
|
|
36
|
+
const details = [
|
|
37
|
+
"Failed to spawn ffmpeg.",
|
|
38
|
+
`Resolved ffmpeg path: ${ffmpegPath}`,
|
|
39
|
+
`FFMPEG_PATH: ${process.env.FFMPEG_PATH ?? "(unset)"}`,
|
|
40
|
+
`ffmpeg-ffprobe-static ffmpegPath: ${ffmpeg_ffprobe_static.default.ffmpegPath ?? "(missing)"}`
|
|
41
|
+
].join("\n");
|
|
42
|
+
reject(/* @__PURE__ */ new Error(`${details}\n\n${String(error)}`));
|
|
43
|
+
});
|
|
29
44
|
child.on("close", (code) => {
|
|
30
45
|
if (code === 0) {
|
|
31
46
|
resolve();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"video.service.cjs","names":["
|
|
1
|
+
{"version":3,"file":"video.service.cjs","names":["path","ffbin","BaseService"],"sources":["../../../../src/modules/video/video.service.ts"],"sourcesContent":["import { closeSync, existsSync, mkdirSync, openSync } from \"node:fs\";\r\nimport path from \"node:path\";\r\nimport { spawn } from \"node:child_process\";\r\n//\r\nimport ffbin from \"ffmpeg-ffprobe-static\";\r\nimport { ok } from \"neverthrow\";\r\nimport { v4 as uuidv4 } from \"uuid\";\r\nimport type { ServerResultAsync } from \"../base/base.dto\";\r\nimport { BaseService } from \"../base/base.service\";\r\n\r\nconst uploadsDir = path.join(__dirname, \"..\", \"uploads\");\r\nif (!existsSync(uploadsDir)) {\r\n mkdirSync(uploadsDir, { recursive: true });\r\n}\r\n\r\nconst resolveFfmpegPath = (): string => {\r\n const envPath = process.env.FFMPEG_PATH;\r\n if (envPath && existsSync(envPath)) return envPath;\r\n\r\n const staticPath = ffbin.ffmpegPath;\r\n if (typeof staticPath === \"string\" && existsSync(staticPath)) return staticPath;\r\n\r\n return \"ffmpeg\";\r\n};\r\n\r\nconst runFfmpeg = async (args: readonly string[]): Promise<void> => {\r\n await new Promise<void>((resolve, reject) => {\r\n const ffmpegPath = resolveFfmpegPath();\r\n const child = spawn(ffmpegPath, [...args], {\r\n stdio: [\"ignore\", \"ignore\", \"pipe\"],\r\n });\r\n\r\n let stderr = \"\";\r\n child.stderr?.setEncoding(\"utf8\");\r\n child.stderr?.on(\"data\", (chunk: string) => {\r\n stderr += chunk;\r\n });\r\n\r\n child.on(\"error\", (error) => {\r\n const details = [\r\n \"Failed to spawn ffmpeg.\",\r\n `Resolved ffmpeg path: ${ffmpegPath}`,\r\n `FFMPEG_PATH: ${process.env.FFMPEG_PATH ?? \"(unset)\"}`,\r\n `ffmpeg-ffprobe-static ffmpegPath: ${ffbin.ffmpegPath ?? \"(missing)\"}`,\r\n ].join(\"\\n\");\r\n reject(new Error(`${details}\\n\\n${String(error)}`));\r\n });\r\n child.on(\"close\", (code) => {\r\n if (code === 0) {\r\n resolve();\r\n return;\r\n }\r\n reject(new Error(stderr || `ffmpeg exited with code ${code ?? \"unknown\"}`));\r\n });\r\n });\r\n};\r\n\r\nexport class VideoService extends BaseService<never, never> {\r\n async cut(file: string, start: number, end: number): ServerResultAsync<string> {\r\n return this.throwableAsync(async () => {\r\n const duration = end - start;\r\n const output = path.join(uploadsDir, `${uuidv4()}.mp4`);\r\n if (!existsSync(output)) {\r\n closeSync(openSync(output, \"w\"));\r\n }\r\n\r\n await runFfmpeg([\r\n \"-i\",\r\n file,\r\n \"-ss\",\r\n String(start),\r\n \"-t\",\r\n String(duration),\r\n \"-c:v\",\r\n \"libx264\",\r\n \"-c:a\",\r\n \"copy\",\r\n \"-movflags\",\r\n \"+faststart\",\r\n \"-y\",\r\n output,\r\n ]).catch((error) => {\r\n throw this.handleUnknownError(error);\r\n });\r\n\r\n return ok(output);\r\n });\r\n }\r\n\r\n async webmToWav(input: string, hz = 48000): ServerResultAsync<string> {\r\n return this.throwableAsync(async () => {\r\n const output = path.join(uploadsDir, `${uuidv4()}.wav`);\r\n if (!existsSync(output)) {\r\n closeSync(openSync(output, \"w\"));\r\n }\r\n\r\n await runFfmpeg([\r\n \"-i\",\r\n input,\r\n \"-vn\",\r\n \"-c:a\",\r\n \"pcm_s16le\",\r\n \"-ar\",\r\n String(hz),\r\n \"-ac\",\r\n \"2\",\r\n \"-f\",\r\n \"wav\",\r\n \"-y\",\r\n output,\r\n ]).catch((error) => {\r\n throw this.handleUnknownError(error);\r\n });\r\n return ok(output);\r\n });\r\n }\r\n\r\n async extractAudioMp3(input: string, kbps = 192, streamIndex = 0): ServerResultAsync<string> {\r\n return this.throwableAsync(async () => {\r\n const output = path.join(uploadsDir, `${uuidv4()}.mp3`);\r\n if (!existsSync(output)) {\r\n closeSync(openSync(output, \"w\"));\r\n }\r\n await runFfmpeg([\r\n \"-i\",\r\n input,\r\n \"-map\",\r\n `0:a:${streamIndex}`,\r\n \"-c:a\",\r\n \"libmp3lame\",\r\n \"-b:a\",\r\n `${kbps}k`,\r\n \"-y\",\r\n output,\r\n ]).catch((error) => {\r\n throw this.handleUnknownError(error);\r\n });\r\n\r\n return ok(output);\r\n });\r\n }\r\n}\r\n"],"mappings":";;;;;;;;;;;;AAUA,MAAM,aAAaA,UAAAA,QAAK,KAAK,WAAW,MAAM,UAAU;AACxD,IAAI,EAAA,GAAA,QAAA,YAAY,WAAW,CACzB,EAAA,GAAA,QAAA,WAAU,YAAY,EAAE,WAAW,MAAM,CAAC;AAG5C,MAAM,0BAAkC;CACtC,MAAM,UAAU,QAAQ,IAAI;AAC5B,KAAI,YAAA,GAAA,QAAA,YAAsB,QAAQ,CAAE,QAAO;CAE3C,MAAM,aAAaC,sBAAAA,QAAM;AACzB,KAAI,OAAO,eAAe,aAAA,GAAA,QAAA,YAAuB,WAAW,CAAE,QAAO;AAErE,QAAO;;AAGT,MAAM,YAAY,OAAO,SAA2C;AAClE,OAAM,IAAI,SAAe,SAAS,WAAW;EAC3C,MAAM,aAAa,mBAAmB;EACtC,MAAM,SAAA,GAAA,mBAAA,OAAc,YAAY,CAAC,GAAG,KAAK,EAAE,EACzC,OAAO;GAAC;GAAU;GAAU;GAAO,EACpC,CAAC;EAEF,IAAI,SAAS;AACb,QAAM,QAAQ,YAAY,OAAO;AACjC,QAAM,QAAQ,GAAG,SAAS,UAAkB;AAC1C,aAAU;IACV;AAEF,QAAM,GAAG,UAAU,UAAU;GAC3B,MAAM,UAAU;IACd;IACA,yBAAyB;IACzB,gBAAgB,QAAQ,IAAI,eAAe;IAC3C,qCAAqCA,sBAAAA,QAAM,cAAc;IAC1D,CAAC,KAAK,KAAK;AACZ,0BAAO,IAAI,MAAM,GAAG,QAAQ,MAAM,OAAO,MAAM,GAAG,CAAC;IACnD;AACF,QAAM,GAAG,UAAU,SAAS;AAC1B,OAAI,SAAS,GAAG;AACd,aAAS;AACT;;AAEF,UAAO,IAAI,MAAM,UAAU,2BAA2B,QAAQ,YAAY,CAAC;IAC3E;GACF;;AAGJ,IAAa,eAAb,cAAkCC,sCAAAA,YAA0B;CAC1D,MAAM,IAAI,MAAc,OAAe,KAAwC;AAC7E,SAAO,KAAK,eAAe,YAAY;GACrC,MAAM,WAAW,MAAM;GACvB,MAAM,SAASF,UAAAA,QAAK,KAAK,YAAY,IAAA,GAAA,KAAA,KAAW,CAAC,MAAM;AACvD,OAAI,EAAA,GAAA,QAAA,YAAY,OAAO,CACrB,EAAA,GAAA,QAAA,YAAA,GAAA,QAAA,UAAmB,QAAQ,IAAI,CAAC;AAGlC,SAAM,UAAU;IACd;IACA;IACA;IACA,OAAO,MAAM;IACb;IACA,OAAO,SAAS;IAChB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACD,CAAC,CAAC,OAAO,UAAU;AAClB,UAAM,KAAK,mBAAmB,MAAM;KACpC;AAEF,WAAA,GAAA,WAAA,IAAU,OAAO;IACjB;;CAGJ,MAAM,UAAU,OAAe,KAAK,MAAkC;AACpE,SAAO,KAAK,eAAe,YAAY;GACrC,MAAM,SAASA,UAAAA,QAAK,KAAK,YAAY,IAAA,GAAA,KAAA,KAAW,CAAC,MAAM;AACvD,OAAI,EAAA,GAAA,QAAA,YAAY,OAAO,CACrB,EAAA,GAAA,QAAA,YAAA,GAAA,QAAA,UAAmB,QAAQ,IAAI,CAAC;AAGlC,SAAM,UAAU;IACd;IACA;IACA;IACA;IACA;IACA;IACA,OAAO,GAAG;IACV;IACA;IACA;IACA;IACA;IACA;IACD,CAAC,CAAC,OAAO,UAAU;AAClB,UAAM,KAAK,mBAAmB,MAAM;KACpC;AACF,WAAA,GAAA,WAAA,IAAU,OAAO;IACjB;;CAGJ,MAAM,gBAAgB,OAAe,OAAO,KAAK,cAAc,GAA8B;AAC3F,SAAO,KAAK,eAAe,YAAY;GACrC,MAAM,SAASA,UAAAA,QAAK,KAAK,YAAY,IAAA,GAAA,KAAA,KAAW,CAAC,MAAM;AACvD,OAAI,EAAA,GAAA,QAAA,YAAY,OAAO,CACrB,EAAA,GAAA,QAAA,YAAA,GAAA,QAAA,UAAmB,QAAQ,IAAI,CAAC;AAElC,SAAM,UAAU;IACd;IACA;IACA;IACA,OAAO;IACP;IACA;IACA;IACA,GAAG,KAAK;IACR;IACA;IACD,CAAC,CAAC,OAAO,UAAU;AAClB,UAAM,KAAK,mBAAmB,MAAM;KACpC;AAEF,WAAA,GAAA,WAAA,IAAU,OAAO;IACjB"}
|
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
import { BaseService } from "../base/base.service.mjs";
|
|
2
|
-
import { v4 } from "uuid";
|
|
3
2
|
import { ok } from "neverthrow";
|
|
3
|
+
import { v4 } from "uuid";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { closeSync, existsSync, mkdirSync, openSync } from "node:fs";
|
|
6
6
|
import { spawn } from "node:child_process";
|
|
7
7
|
import ffbin from "ffmpeg-ffprobe-static";
|
|
8
8
|
//#region src/modules/video/video.service.ts
|
|
9
|
-
if (!ffbin.ffmpegPath || !ffbin.ffprobePath) throw new Error("FFmpeg or FFprobe not found");
|
|
10
9
|
const uploadsDir = path.join(__dirname, "..", "uploads");
|
|
11
10
|
if (!existsSync(uploadsDir)) mkdirSync(uploadsDir, { recursive: true });
|
|
11
|
+
const resolveFfmpegPath = () => {
|
|
12
|
+
const envPath = process.env.FFMPEG_PATH;
|
|
13
|
+
if (envPath && existsSync(envPath)) return envPath;
|
|
14
|
+
const staticPath = ffbin.ffmpegPath;
|
|
15
|
+
if (typeof staticPath === "string" && existsSync(staticPath)) return staticPath;
|
|
16
|
+
return "ffmpeg";
|
|
17
|
+
};
|
|
12
18
|
const runFfmpeg = async (args) => {
|
|
13
19
|
await new Promise((resolve, reject) => {
|
|
14
|
-
const
|
|
20
|
+
const ffmpegPath = resolveFfmpegPath();
|
|
21
|
+
const child = spawn(ffmpegPath, [...args], { stdio: [
|
|
15
22
|
"ignore",
|
|
16
23
|
"ignore",
|
|
17
24
|
"pipe"
|
|
@@ -21,7 +28,15 @@ const runFfmpeg = async (args) => {
|
|
|
21
28
|
child.stderr?.on("data", (chunk) => {
|
|
22
29
|
stderr += chunk;
|
|
23
30
|
});
|
|
24
|
-
child.on("error", (error) =>
|
|
31
|
+
child.on("error", (error) => {
|
|
32
|
+
const details = [
|
|
33
|
+
"Failed to spawn ffmpeg.",
|
|
34
|
+
`Resolved ffmpeg path: ${ffmpegPath}`,
|
|
35
|
+
`FFMPEG_PATH: ${process.env.FFMPEG_PATH ?? "(unset)"}`,
|
|
36
|
+
`ffmpeg-ffprobe-static ffmpegPath: ${ffbin.ffmpegPath ?? "(missing)"}`
|
|
37
|
+
].join("\n");
|
|
38
|
+
reject(/* @__PURE__ */ new Error(`${details}\n\n${String(error)}`));
|
|
39
|
+
});
|
|
25
40
|
child.on("close", (code) => {
|
|
26
41
|
if (code === 0) {
|
|
27
42
|
resolve();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"video.service.mjs","names":["uuidv4"],"sources":["../../../../src/modules/video/video.service.ts"],"sourcesContent":["import { closeSync, existsSync, mkdirSync, openSync } from \"node:fs\";\r\nimport path from \"node:path\";\r\nimport { spawn } from \"node:child_process\";\r\n//\r\nimport ffbin from \"ffmpeg-ffprobe-static\";\r\nimport { ok } from \"neverthrow\";\r\nimport { v4 as uuidv4 } from \"uuid\";\r\nimport type { ServerResultAsync } from \"../base/base.dto\";\r\nimport { BaseService } from \"../base/base.service\";\r\n\r\
|
|
1
|
+
{"version":3,"file":"video.service.mjs","names":["uuidv4"],"sources":["../../../../src/modules/video/video.service.ts"],"sourcesContent":["import { closeSync, existsSync, mkdirSync, openSync } from \"node:fs\";\r\nimport path from \"node:path\";\r\nimport { spawn } from \"node:child_process\";\r\n//\r\nimport ffbin from \"ffmpeg-ffprobe-static\";\r\nimport { ok } from \"neverthrow\";\r\nimport { v4 as uuidv4 } from \"uuid\";\r\nimport type { ServerResultAsync } from \"../base/base.dto\";\r\nimport { BaseService } from \"../base/base.service\";\r\n\r\nconst uploadsDir = path.join(__dirname, \"..\", \"uploads\");\r\nif (!existsSync(uploadsDir)) {\r\n mkdirSync(uploadsDir, { recursive: true });\r\n}\r\n\r\nconst resolveFfmpegPath = (): string => {\r\n const envPath = process.env.FFMPEG_PATH;\r\n if (envPath && existsSync(envPath)) return envPath;\r\n\r\n const staticPath = ffbin.ffmpegPath;\r\n if (typeof staticPath === \"string\" && existsSync(staticPath)) return staticPath;\r\n\r\n return \"ffmpeg\";\r\n};\r\n\r\nconst runFfmpeg = async (args: readonly string[]): Promise<void> => {\r\n await new Promise<void>((resolve, reject) => {\r\n const ffmpegPath = resolveFfmpegPath();\r\n const child = spawn(ffmpegPath, [...args], {\r\n stdio: [\"ignore\", \"ignore\", \"pipe\"],\r\n });\r\n\r\n let stderr = \"\";\r\n child.stderr?.setEncoding(\"utf8\");\r\n child.stderr?.on(\"data\", (chunk: string) => {\r\n stderr += chunk;\r\n });\r\n\r\n child.on(\"error\", (error) => {\r\n const details = [\r\n \"Failed to spawn ffmpeg.\",\r\n `Resolved ffmpeg path: ${ffmpegPath}`,\r\n `FFMPEG_PATH: ${process.env.FFMPEG_PATH ?? \"(unset)\"}`,\r\n `ffmpeg-ffprobe-static ffmpegPath: ${ffbin.ffmpegPath ?? \"(missing)\"}`,\r\n ].join(\"\\n\");\r\n reject(new Error(`${details}\\n\\n${String(error)}`));\r\n });\r\n child.on(\"close\", (code) => {\r\n if (code === 0) {\r\n resolve();\r\n return;\r\n }\r\n reject(new Error(stderr || `ffmpeg exited with code ${code ?? \"unknown\"}`));\r\n });\r\n });\r\n};\r\n\r\nexport class VideoService extends BaseService<never, never> {\r\n async cut(file: string, start: number, end: number): ServerResultAsync<string> {\r\n return this.throwableAsync(async () => {\r\n const duration = end - start;\r\n const output = path.join(uploadsDir, `${uuidv4()}.mp4`);\r\n if (!existsSync(output)) {\r\n closeSync(openSync(output, \"w\"));\r\n }\r\n\r\n await runFfmpeg([\r\n \"-i\",\r\n file,\r\n \"-ss\",\r\n String(start),\r\n \"-t\",\r\n String(duration),\r\n \"-c:v\",\r\n \"libx264\",\r\n \"-c:a\",\r\n \"copy\",\r\n \"-movflags\",\r\n \"+faststart\",\r\n \"-y\",\r\n output,\r\n ]).catch((error) => {\r\n throw this.handleUnknownError(error);\r\n });\r\n\r\n return ok(output);\r\n });\r\n }\r\n\r\n async webmToWav(input: string, hz = 48000): ServerResultAsync<string> {\r\n return this.throwableAsync(async () => {\r\n const output = path.join(uploadsDir, `${uuidv4()}.wav`);\r\n if (!existsSync(output)) {\r\n closeSync(openSync(output, \"w\"));\r\n }\r\n\r\n await runFfmpeg([\r\n \"-i\",\r\n input,\r\n \"-vn\",\r\n \"-c:a\",\r\n \"pcm_s16le\",\r\n \"-ar\",\r\n String(hz),\r\n \"-ac\",\r\n \"2\",\r\n \"-f\",\r\n \"wav\",\r\n \"-y\",\r\n output,\r\n ]).catch((error) => {\r\n throw this.handleUnknownError(error);\r\n });\r\n return ok(output);\r\n });\r\n }\r\n\r\n async extractAudioMp3(input: string, kbps = 192, streamIndex = 0): ServerResultAsync<string> {\r\n return this.throwableAsync(async () => {\r\n const output = path.join(uploadsDir, `${uuidv4()}.mp3`);\r\n if (!existsSync(output)) {\r\n closeSync(openSync(output, \"w\"));\r\n }\r\n await runFfmpeg([\r\n \"-i\",\r\n input,\r\n \"-map\",\r\n `0:a:${streamIndex}`,\r\n \"-c:a\",\r\n \"libmp3lame\",\r\n \"-b:a\",\r\n `${kbps}k`,\r\n \"-y\",\r\n output,\r\n ]).catch((error) => {\r\n throw this.handleUnknownError(error);\r\n });\r\n\r\n return ok(output);\r\n });\r\n }\r\n}\r\n"],"mappings":";;;;;;;;AAUA,MAAM,aAAa,KAAK,KAAK,WAAW,MAAM,UAAU;AACxD,IAAI,CAAC,WAAW,WAAW,CACzB,WAAU,YAAY,EAAE,WAAW,MAAM,CAAC;AAG5C,MAAM,0BAAkC;CACtC,MAAM,UAAU,QAAQ,IAAI;AAC5B,KAAI,WAAW,WAAW,QAAQ,CAAE,QAAO;CAE3C,MAAM,aAAa,MAAM;AACzB,KAAI,OAAO,eAAe,YAAY,WAAW,WAAW,CAAE,QAAO;AAErE,QAAO;;AAGT,MAAM,YAAY,OAAO,SAA2C;AAClE,OAAM,IAAI,SAAe,SAAS,WAAW;EAC3C,MAAM,aAAa,mBAAmB;EACtC,MAAM,QAAQ,MAAM,YAAY,CAAC,GAAG,KAAK,EAAE,EACzC,OAAO;GAAC;GAAU;GAAU;GAAO,EACpC,CAAC;EAEF,IAAI,SAAS;AACb,QAAM,QAAQ,YAAY,OAAO;AACjC,QAAM,QAAQ,GAAG,SAAS,UAAkB;AAC1C,aAAU;IACV;AAEF,QAAM,GAAG,UAAU,UAAU;GAC3B,MAAM,UAAU;IACd;IACA,yBAAyB;IACzB,gBAAgB,QAAQ,IAAI,eAAe;IAC3C,qCAAqC,MAAM,cAAc;IAC1D,CAAC,KAAK,KAAK;AACZ,0BAAO,IAAI,MAAM,GAAG,QAAQ,MAAM,OAAO,MAAM,GAAG,CAAC;IACnD;AACF,QAAM,GAAG,UAAU,SAAS;AAC1B,OAAI,SAAS,GAAG;AACd,aAAS;AACT;;AAEF,UAAO,IAAI,MAAM,UAAU,2BAA2B,QAAQ,YAAY,CAAC;IAC3E;GACF;;AAGJ,IAAa,eAAb,cAAkC,YAA0B;CAC1D,MAAM,IAAI,MAAc,OAAe,KAAwC;AAC7E,SAAO,KAAK,eAAe,YAAY;GACrC,MAAM,WAAW,MAAM;GACvB,MAAM,SAAS,KAAK,KAAK,YAAY,GAAGA,IAAQ,CAAC,MAAM;AACvD,OAAI,CAAC,WAAW,OAAO,CACrB,WAAU,SAAS,QAAQ,IAAI,CAAC;AAGlC,SAAM,UAAU;IACd;IACA;IACA;IACA,OAAO,MAAM;IACb;IACA,OAAO,SAAS;IAChB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACD,CAAC,CAAC,OAAO,UAAU;AAClB,UAAM,KAAK,mBAAmB,MAAM;KACpC;AAEF,UAAO,GAAG,OAAO;IACjB;;CAGJ,MAAM,UAAU,OAAe,KAAK,MAAkC;AACpE,SAAO,KAAK,eAAe,YAAY;GACrC,MAAM,SAAS,KAAK,KAAK,YAAY,GAAGA,IAAQ,CAAC,MAAM;AACvD,OAAI,CAAC,WAAW,OAAO,CACrB,WAAU,SAAS,QAAQ,IAAI,CAAC;AAGlC,SAAM,UAAU;IACd;IACA;IACA;IACA;IACA;IACA;IACA,OAAO,GAAG;IACV;IACA;IACA;IACA;IACA;IACA;IACD,CAAC,CAAC,OAAO,UAAU;AAClB,UAAM,KAAK,mBAAmB,MAAM;KACpC;AACF,UAAO,GAAG,OAAO;IACjB;;CAGJ,MAAM,gBAAgB,OAAe,OAAO,KAAK,cAAc,GAA8B;AAC3F,SAAO,KAAK,eAAe,YAAY;GACrC,MAAM,SAAS,KAAK,KAAK,YAAY,GAAGA,IAAQ,CAAC,MAAM;AACvD,OAAI,CAAC,WAAW,OAAO,CACrB,WAAU,SAAS,QAAQ,IAAI,CAAC;AAElC,SAAM,UAAU;IACd;IACA;IACA;IACA,OAAO;IACP;IACA;IACA;IACA,GAAG,KAAK;IACR;IACA;IACD,CAAC,CAAC,OAAO,UAAU;AAClB,UAAM,KAAK,mBAAmB,MAAM;KACpC;AAEF,UAAO,GAAG,OAAO;IACjB"}
|
package/dist/src/types.d.cts
CHANGED
|
@@ -79,8 +79,8 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
|
|
|
79
79
|
id: string;
|
|
80
80
|
email: string;
|
|
81
81
|
createdAt: Date;
|
|
82
|
-
userId: string;
|
|
83
82
|
expiresAt: Date | null;
|
|
83
|
+
userId: string;
|
|
84
84
|
claimId: string;
|
|
85
85
|
url: string;
|
|
86
86
|
};
|
|
@@ -94,8 +94,8 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
|
|
|
94
94
|
id: string;
|
|
95
95
|
email: string;
|
|
96
96
|
createdAt: Date;
|
|
97
|
-
userId: string;
|
|
98
97
|
expiresAt: Date | null;
|
|
98
|
+
userId: string;
|
|
99
99
|
claimId: string;
|
|
100
100
|
url: string;
|
|
101
101
|
}[];
|
|
@@ -149,8 +149,8 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
|
|
|
149
149
|
listAdminWaitlist: _$_trpc_server0.TRPCQueryProcedure<{
|
|
150
150
|
input: void;
|
|
151
151
|
output: {
|
|
152
|
-
id: string;
|
|
153
152
|
name: string | null;
|
|
153
|
+
id: string;
|
|
154
154
|
email: string | null;
|
|
155
155
|
createdAt: Date;
|
|
156
156
|
updatedAt: Date | null;
|
|
@@ -163,8 +163,8 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
|
|
|
163
163
|
email: string;
|
|
164
164
|
};
|
|
165
165
|
output: {
|
|
166
|
-
id: string;
|
|
167
166
|
name: string | null;
|
|
167
|
+
id: string;
|
|
168
168
|
email: string | null;
|
|
169
169
|
createdAt: Date;
|
|
170
170
|
updatedAt: Date | null;
|
|
@@ -194,8 +194,8 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
|
|
|
194
194
|
id: string;
|
|
195
195
|
};
|
|
196
196
|
output: {
|
|
197
|
-
id: string;
|
|
198
197
|
name: string | null;
|
|
198
|
+
id: string;
|
|
199
199
|
email: string | null;
|
|
200
200
|
createdAt: Date;
|
|
201
201
|
updatedAt: Date | null;
|
|
@@ -208,8 +208,8 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
|
|
|
208
208
|
id: string;
|
|
209
209
|
};
|
|
210
210
|
output: {
|
|
211
|
-
id: string;
|
|
212
211
|
name: string | null;
|
|
212
|
+
id: string;
|
|
213
213
|
email: string | null;
|
|
214
214
|
createdAt: Date;
|
|
215
215
|
updatedAt: Date | null;
|
|
@@ -222,8 +222,8 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
|
|
|
222
222
|
email: string;
|
|
223
223
|
};
|
|
224
224
|
output: {
|
|
225
|
-
id: string;
|
|
226
225
|
name: string | null;
|
|
226
|
+
id: string;
|
|
227
227
|
email: string | null;
|
|
228
228
|
createdAt: Date;
|
|
229
229
|
updatedAt: Date | null;
|
package/dist/src/types.d.mts
CHANGED
|
@@ -79,8 +79,8 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
|
|
|
79
79
|
id: string;
|
|
80
80
|
email: string;
|
|
81
81
|
createdAt: Date;
|
|
82
|
-
userId: string;
|
|
83
82
|
expiresAt: Date | null;
|
|
83
|
+
userId: string;
|
|
84
84
|
claimId: string;
|
|
85
85
|
url: string;
|
|
86
86
|
};
|
|
@@ -94,8 +94,8 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
|
|
|
94
94
|
id: string;
|
|
95
95
|
email: string;
|
|
96
96
|
createdAt: Date;
|
|
97
|
-
userId: string;
|
|
98
97
|
expiresAt: Date | null;
|
|
98
|
+
userId: string;
|
|
99
99
|
claimId: string;
|
|
100
100
|
url: string;
|
|
101
101
|
}[];
|
|
@@ -149,8 +149,8 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
|
|
|
149
149
|
listAdminWaitlist: _$_trpc_server0.TRPCQueryProcedure<{
|
|
150
150
|
input: void;
|
|
151
151
|
output: {
|
|
152
|
-
id: string;
|
|
153
152
|
name: string | null;
|
|
153
|
+
id: string;
|
|
154
154
|
email: string | null;
|
|
155
155
|
createdAt: Date;
|
|
156
156
|
updatedAt: Date | null;
|
|
@@ -163,8 +163,8 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
|
|
|
163
163
|
email: string;
|
|
164
164
|
};
|
|
165
165
|
output: {
|
|
166
|
-
id: string;
|
|
167
166
|
name: string | null;
|
|
167
|
+
id: string;
|
|
168
168
|
email: string | null;
|
|
169
169
|
createdAt: Date;
|
|
170
170
|
updatedAt: Date | null;
|
|
@@ -194,8 +194,8 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
|
|
|
194
194
|
id: string;
|
|
195
195
|
};
|
|
196
196
|
output: {
|
|
197
|
-
id: string;
|
|
198
197
|
name: string | null;
|
|
198
|
+
id: string;
|
|
199
199
|
email: string | null;
|
|
200
200
|
createdAt: Date;
|
|
201
201
|
updatedAt: Date | null;
|
|
@@ -208,8 +208,8 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
|
|
|
208
208
|
id: string;
|
|
209
209
|
};
|
|
210
210
|
output: {
|
|
211
|
-
id: string;
|
|
212
211
|
name: string | null;
|
|
212
|
+
id: string;
|
|
213
213
|
email: string | null;
|
|
214
214
|
createdAt: Date;
|
|
215
215
|
updatedAt: Date | null;
|
|
@@ -222,8 +222,8 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
|
|
|
222
222
|
email: string;
|
|
223
223
|
};
|
|
224
224
|
output: {
|
|
225
|
-
id: string;
|
|
226
225
|
name: string | null;
|
|
226
|
+
id: string;
|
|
227
227
|
email: string | null;
|
|
228
228
|
createdAt: Date;
|
|
229
229
|
updatedAt: Date | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m5kdev/backend",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"description": "Composable Express server stack with Drizzle ORM and tRPC.",
|
|
5
5
|
"license": "GPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"turndown": "7.2.2",
|
|
62
62
|
"uuid": "11.0.5",
|
|
63
63
|
"zod": "4.2.1",
|
|
64
|
-
"@m5kdev/commons": "0.9.
|
|
65
|
-
"@m5kdev/config": "0.9.
|
|
64
|
+
"@m5kdev/commons": "0.9.4",
|
|
65
|
+
"@m5kdev/config": "0.9.4"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@jest/globals": "30.2.0",
|
|
@@ -266,6 +266,26 @@
|
|
|
266
266
|
"default": "./dist/src/modules/email/*.cjs"
|
|
267
267
|
}
|
|
268
268
|
},
|
|
269
|
+
"./modules/pdf/*": {
|
|
270
|
+
"import": {
|
|
271
|
+
"types": "./dist/src/modules/pdf/*.d.mts",
|
|
272
|
+
"default": "./dist/src/modules/pdf/*.mjs"
|
|
273
|
+
},
|
|
274
|
+
"require": {
|
|
275
|
+
"types": "./dist/src/modules/pdf/*.d.cts",
|
|
276
|
+
"default": "./dist/src/modules/pdf/*.cjs"
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
"./modules/docx/*": {
|
|
280
|
+
"import": {
|
|
281
|
+
"types": "./dist/src/modules/docx/*.d.mts",
|
|
282
|
+
"default": "./dist/src/modules/docx/*.mjs"
|
|
283
|
+
},
|
|
284
|
+
"require": {
|
|
285
|
+
"types": "./dist/src/modules/docx/*.d.cts",
|
|
286
|
+
"default": "./dist/src/modules/docx/*.cjs"
|
|
287
|
+
}
|
|
288
|
+
},
|
|
269
289
|
"./lib/*": {
|
|
270
290
|
"import": {
|
|
271
291
|
"types": "./dist/src/lib/*.d.mts",
|