@m5kdev/backend 0.8.10 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/modules/auth/auth.dto.d.cts +6 -6
- package/dist/src/modules/auth/auth.dto.d.mts +6 -6
- package/dist/src/modules/auth/auth.lib.d.cts +6 -6
- package/dist/src/modules/auth/auth.lib.d.mts +6 -6
- package/dist/src/modules/auth/auth.trpc.d.cts +17 -17
- package/dist/src/modules/auth/auth.trpc.d.mts +17 -17
- package/dist/src/modules/billing/billing.repository.d.cts +11 -11
- package/dist/src/modules/billing/billing.repository.d.mts +11 -11
- package/dist/src/modules/billing/billing.service.d.cts +7 -7
- package/dist/src/modules/billing/billing.service.d.mts +7 -7
- package/dist/src/modules/connect/connect.dto.d.cts +6 -6
- package/dist/src/modules/connect/connect.dto.d.mts +6 -6
- package/dist/src/modules/connect/connect.repository.d.cts +3 -3
- package/dist/src/modules/connect/connect.repository.d.mts +3 -3
- package/dist/src/modules/connect/connect.service.d.cts +6 -6
- package/dist/src/modules/connect/connect.service.d.mts +6 -6
- package/dist/src/modules/connect/connect.trpc.d.cts +3 -3
- package/dist/src/modules/connect/connect.trpc.d.mts +3 -3
- package/dist/src/modules/docx/docx.service.cjs +21 -0
- package/dist/src/modules/docx/docx.service.cjs.map +1 -0
- package/dist/src/modules/docx/docx.service.d.cts +10 -0
- package/dist/src/modules/docx/docx.service.d.mts +10 -0
- package/dist/src/modules/docx/docx.service.mjs +17 -0
- package/dist/src/modules/docx/docx.service.mjs.map +1 -0
- 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.trpc.d.cts +2 -2
- package/dist/src/modules/tag/tag.trpc.d.mts +2 -2
- package/dist/src/types.d.cts +17 -17
- package/dist/src/types.d.mts +17 -17
- package/package.json +7 -5
|
@@ -25,6 +25,9 @@ declare const connectSelectSchema: z.ZodObject<{
|
|
|
25
25
|
type ConnectSelectSchema = z.infer<typeof connectSelectSchema>;
|
|
26
26
|
declare const connectSelectOutputSchema: z.ZodObject<{
|
|
27
27
|
id: z.ZodString;
|
|
28
|
+
createdAt: z.ZodDate;
|
|
29
|
+
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
30
|
+
expiresAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
28
31
|
userId: z.ZodString;
|
|
29
32
|
provider: z.ZodString;
|
|
30
33
|
accountType: z.ZodString;
|
|
@@ -34,13 +37,10 @@ declare const connectSelectOutputSchema: z.ZodObject<{
|
|
|
34
37
|
avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
35
38
|
tokenType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
36
39
|
scope: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
37
|
-
expiresAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
38
40
|
parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
39
41
|
metadataJson: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
40
42
|
revokedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
41
43
|
lastRefreshedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
42
|
-
createdAt: z.ZodDate;
|
|
43
|
-
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
44
44
|
}, z.core.$strip>;
|
|
45
45
|
declare const connectListInputSchema: z.ZodObject<{
|
|
46
46
|
providers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -49,6 +49,9 @@ declare const connectListInputSchema: z.ZodObject<{
|
|
|
49
49
|
type ConnectListInputSchema = z.infer<typeof connectListInputSchema>;
|
|
50
50
|
declare const connectListOutputSchema: z.ZodArray<z.ZodObject<{
|
|
51
51
|
id: z.ZodString;
|
|
52
|
+
createdAt: z.ZodDate;
|
|
53
|
+
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
54
|
+
expiresAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
52
55
|
userId: z.ZodString;
|
|
53
56
|
provider: z.ZodString;
|
|
54
57
|
accountType: z.ZodString;
|
|
@@ -58,13 +61,10 @@ declare const connectListOutputSchema: z.ZodArray<z.ZodObject<{
|
|
|
58
61
|
avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
59
62
|
tokenType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
60
63
|
scope: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
61
|
-
expiresAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
62
64
|
parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
63
65
|
metadataJson: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
64
66
|
revokedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
65
67
|
lastRefreshedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
66
|
-
createdAt: z.ZodDate;
|
|
67
|
-
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
68
68
|
}, z.core.$strip>>;
|
|
69
69
|
declare const connectDeleteInputSchema: z.ZodObject<{
|
|
70
70
|
id: z.ZodString;
|
|
@@ -25,6 +25,9 @@ declare const connectSelectSchema: z.ZodObject<{
|
|
|
25
25
|
type ConnectSelectSchema = z.infer<typeof connectSelectSchema>;
|
|
26
26
|
declare const connectSelectOutputSchema: z.ZodObject<{
|
|
27
27
|
id: z.ZodString;
|
|
28
|
+
createdAt: z.ZodDate;
|
|
29
|
+
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
30
|
+
expiresAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
28
31
|
userId: z.ZodString;
|
|
29
32
|
provider: z.ZodString;
|
|
30
33
|
accountType: z.ZodString;
|
|
@@ -34,13 +37,10 @@ declare const connectSelectOutputSchema: z.ZodObject<{
|
|
|
34
37
|
avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
35
38
|
tokenType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
36
39
|
scope: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
37
|
-
expiresAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
38
40
|
parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
39
41
|
metadataJson: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
40
42
|
revokedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
41
43
|
lastRefreshedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
42
|
-
createdAt: z.ZodDate;
|
|
43
|
-
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
44
44
|
}, z.core.$strip>;
|
|
45
45
|
declare const connectListInputSchema: z.ZodObject<{
|
|
46
46
|
providers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -49,6 +49,9 @@ declare const connectListInputSchema: z.ZodObject<{
|
|
|
49
49
|
type ConnectListInputSchema = z.infer<typeof connectListInputSchema>;
|
|
50
50
|
declare const connectListOutputSchema: z.ZodArray<z.ZodObject<{
|
|
51
51
|
id: z.ZodString;
|
|
52
|
+
createdAt: z.ZodDate;
|
|
53
|
+
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
54
|
+
expiresAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
52
55
|
userId: z.ZodString;
|
|
53
56
|
provider: z.ZodString;
|
|
54
57
|
accountType: z.ZodString;
|
|
@@ -58,13 +61,10 @@ declare const connectListOutputSchema: z.ZodArray<z.ZodObject<{
|
|
|
58
61
|
avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
59
62
|
tokenType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
60
63
|
scope: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
61
|
-
expiresAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
62
64
|
parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
63
65
|
metadataJson: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
64
66
|
revokedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
65
67
|
lastRefreshedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
66
|
-
createdAt: z.ZodDate;
|
|
67
|
-
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
68
68
|
}, z.core.$strip>>;
|
|
69
69
|
declare const connectDeleteInputSchema: z.ZodObject<{
|
|
70
70
|
id: z.ZodString;
|
|
@@ -394,6 +394,9 @@ declare class ConnectRepository extends BaseTableRepository<Orm, Schema, Record<
|
|
|
394
394
|
}[]>>;
|
|
395
395
|
upsert(data: ConnectInsert, tx?: Orm): Promise<ServerResult<{
|
|
396
396
|
id: string;
|
|
397
|
+
createdAt: Date;
|
|
398
|
+
updatedAt: Date | null;
|
|
399
|
+
expiresAt: Date | null;
|
|
397
400
|
userId: string;
|
|
398
401
|
provider: string;
|
|
399
402
|
accountType: string;
|
|
@@ -405,13 +408,10 @@ declare class ConnectRepository extends BaseTableRepository<Orm, Schema, Record<
|
|
|
405
408
|
refreshToken: string | null;
|
|
406
409
|
tokenType: string | null;
|
|
407
410
|
scope: string | null;
|
|
408
|
-
expiresAt: Date | null;
|
|
409
411
|
parentId: string | null;
|
|
410
412
|
metadataJson: unknown;
|
|
411
413
|
revokedAt: Date | null;
|
|
412
414
|
lastRefreshedAt: Date | null;
|
|
413
|
-
createdAt: Date;
|
|
414
|
-
updatedAt: Date | null;
|
|
415
415
|
}>>;
|
|
416
416
|
}
|
|
417
417
|
//#endregion
|
|
@@ -394,6 +394,9 @@ declare class ConnectRepository extends BaseTableRepository<Orm, Schema, Record<
|
|
|
394
394
|
}[]>>;
|
|
395
395
|
upsert(data: ConnectInsert, tx?: Orm): Promise<ServerResult<{
|
|
396
396
|
id: string;
|
|
397
|
+
createdAt: Date;
|
|
398
|
+
updatedAt: Date | null;
|
|
399
|
+
expiresAt: Date | null;
|
|
397
400
|
userId: string;
|
|
398
401
|
provider: string;
|
|
399
402
|
accountType: string;
|
|
@@ -405,13 +408,10 @@ declare class ConnectRepository extends BaseTableRepository<Orm, Schema, Record<
|
|
|
405
408
|
refreshToken: string | null;
|
|
406
409
|
tokenType: string | null;
|
|
407
410
|
scope: string | null;
|
|
408
|
-
expiresAt: Date | null;
|
|
409
411
|
parentId: string | null;
|
|
410
412
|
metadataJson: unknown;
|
|
411
413
|
revokedAt: Date | null;
|
|
412
414
|
lastRefreshedAt: Date | null;
|
|
413
|
-
createdAt: Date;
|
|
414
|
-
updatedAt: Date | null;
|
|
415
415
|
}>>;
|
|
416
416
|
}
|
|
417
417
|
//#endregion
|
|
@@ -20,6 +20,9 @@ declare class ConnectService extends BaseService<{
|
|
|
20
20
|
}>;
|
|
21
21
|
handleCallback(user: User, sessionId: string, providerId: string, code: string, state: string): Promise<ServerResult<{
|
|
22
22
|
id: string;
|
|
23
|
+
createdAt: Date;
|
|
24
|
+
updatedAt: Date | null;
|
|
25
|
+
expiresAt: Date | null;
|
|
23
26
|
userId: string;
|
|
24
27
|
provider: string;
|
|
25
28
|
accountType: string;
|
|
@@ -31,16 +34,16 @@ declare class ConnectService extends BaseService<{
|
|
|
31
34
|
refreshToken: string | null;
|
|
32
35
|
tokenType: string | null;
|
|
33
36
|
scope: string | null;
|
|
34
|
-
expiresAt: Date | null;
|
|
35
37
|
parentId: string | null;
|
|
36
38
|
metadataJson: unknown;
|
|
37
39
|
revokedAt: Date | null;
|
|
38
40
|
lastRefreshedAt: Date | null;
|
|
39
|
-
createdAt: Date;
|
|
40
|
-
updatedAt: Date | null;
|
|
41
41
|
}>>;
|
|
42
42
|
refreshToken(connectionId: string): Promise<ServerResult<{
|
|
43
43
|
id: string;
|
|
44
|
+
createdAt: Date;
|
|
45
|
+
updatedAt: Date | null;
|
|
46
|
+
expiresAt: Date | null;
|
|
44
47
|
userId: string;
|
|
45
48
|
provider: string;
|
|
46
49
|
accountType: string;
|
|
@@ -52,13 +55,10 @@ declare class ConnectService extends BaseService<{
|
|
|
52
55
|
refreshToken: string | null;
|
|
53
56
|
tokenType: string | null;
|
|
54
57
|
scope: string | null;
|
|
55
|
-
expiresAt: Date | null;
|
|
56
58
|
parentId: string | null;
|
|
57
59
|
metadataJson: unknown;
|
|
58
60
|
revokedAt: Date | null;
|
|
59
61
|
lastRefreshedAt: Date | null;
|
|
60
|
-
createdAt: Date;
|
|
61
|
-
updatedAt: Date | null;
|
|
62
62
|
}>>;
|
|
63
63
|
readonly list: ServiceProcedure<{
|
|
64
64
|
providers?: string[] | undefined;
|
|
@@ -20,6 +20,9 @@ declare class ConnectService extends BaseService<{
|
|
|
20
20
|
}>;
|
|
21
21
|
handleCallback(user: User, sessionId: string, providerId: string, code: string, state: string): Promise<ServerResult<{
|
|
22
22
|
id: string;
|
|
23
|
+
createdAt: Date;
|
|
24
|
+
updatedAt: Date | null;
|
|
25
|
+
expiresAt: Date | null;
|
|
23
26
|
userId: string;
|
|
24
27
|
provider: string;
|
|
25
28
|
accountType: string;
|
|
@@ -31,16 +34,16 @@ declare class ConnectService extends BaseService<{
|
|
|
31
34
|
refreshToken: string | null;
|
|
32
35
|
tokenType: string | null;
|
|
33
36
|
scope: string | null;
|
|
34
|
-
expiresAt: Date | null;
|
|
35
37
|
parentId: string | null;
|
|
36
38
|
metadataJson: unknown;
|
|
37
39
|
revokedAt: Date | null;
|
|
38
40
|
lastRefreshedAt: Date | null;
|
|
39
|
-
createdAt: Date;
|
|
40
|
-
updatedAt: Date | null;
|
|
41
41
|
}>>;
|
|
42
42
|
refreshToken(connectionId: string): Promise<ServerResult<{
|
|
43
43
|
id: string;
|
|
44
|
+
createdAt: Date;
|
|
45
|
+
updatedAt: Date | null;
|
|
46
|
+
expiresAt: Date | null;
|
|
44
47
|
userId: string;
|
|
45
48
|
provider: string;
|
|
46
49
|
accountType: string;
|
|
@@ -52,13 +55,10 @@ declare class ConnectService extends BaseService<{
|
|
|
52
55
|
refreshToken: string | null;
|
|
53
56
|
tokenType: string | null;
|
|
54
57
|
scope: string | null;
|
|
55
|
-
expiresAt: Date | null;
|
|
56
58
|
parentId: string | null;
|
|
57
59
|
metadataJson: unknown;
|
|
58
60
|
revokedAt: Date | null;
|
|
59
61
|
lastRefreshedAt: Date | null;
|
|
60
|
-
createdAt: Date;
|
|
61
|
-
updatedAt: Date | null;
|
|
62
62
|
}>>;
|
|
63
63
|
readonly list: ServiceProcedure<{
|
|
64
64
|
providers?: string[] | undefined;
|
|
@@ -19,22 +19,22 @@ declare function createConnectTRPC({
|
|
|
19
19
|
};
|
|
20
20
|
output: {
|
|
21
21
|
id: string;
|
|
22
|
+
createdAt: Date;
|
|
22
23
|
userId: string;
|
|
23
24
|
provider: string;
|
|
24
25
|
accountType: string;
|
|
25
26
|
providerAccountId: string;
|
|
26
|
-
|
|
27
|
+
updatedAt?: Date | null | undefined;
|
|
28
|
+
expiresAt?: Date | null | undefined;
|
|
27
29
|
handle?: string | null | undefined;
|
|
28
30
|
displayName?: string | null | undefined;
|
|
29
31
|
avatarUrl?: string | null | undefined;
|
|
30
32
|
tokenType?: string | null | undefined;
|
|
31
33
|
scope?: string | null | undefined;
|
|
32
|
-
expiresAt?: Date | null | undefined;
|
|
33
34
|
parentId?: string | null | undefined;
|
|
34
35
|
metadataJson?: unknown;
|
|
35
36
|
revokedAt?: Date | null | undefined;
|
|
36
37
|
lastRefreshedAt?: Date | null | undefined;
|
|
37
|
-
updatedAt?: Date | null | undefined;
|
|
38
38
|
}[];
|
|
39
39
|
meta: any;
|
|
40
40
|
}>;
|
|
@@ -19,22 +19,22 @@ declare function createConnectTRPC({
|
|
|
19
19
|
};
|
|
20
20
|
output: {
|
|
21
21
|
id: string;
|
|
22
|
+
createdAt: Date;
|
|
22
23
|
userId: string;
|
|
23
24
|
provider: string;
|
|
24
25
|
accountType: string;
|
|
25
26
|
providerAccountId: string;
|
|
26
|
-
|
|
27
|
+
updatedAt?: Date | null | undefined;
|
|
28
|
+
expiresAt?: Date | null | undefined;
|
|
27
29
|
handle?: string | null | undefined;
|
|
28
30
|
displayName?: string | null | undefined;
|
|
29
31
|
avatarUrl?: string | null | undefined;
|
|
30
32
|
tokenType?: string | null | undefined;
|
|
31
33
|
scope?: string | null | undefined;
|
|
32
|
-
expiresAt?: Date | null | undefined;
|
|
33
34
|
parentId?: string | null | undefined;
|
|
34
35
|
metadataJson?: unknown;
|
|
35
36
|
revokedAt?: Date | null | undefined;
|
|
36
37
|
lastRefreshedAt?: Date | null | undefined;
|
|
37
|
-
updatedAt?: Date | null | undefined;
|
|
38
38
|
}[];
|
|
39
39
|
meta: any;
|
|
40
40
|
}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
const require_src_modules_base_base_service = require("../base/base.service.cjs");
|
|
4
|
+
let mammoth = require("mammoth");
|
|
5
|
+
mammoth = require_runtime.__toESM(mammoth);
|
|
6
|
+
let turndown = require("turndown");
|
|
7
|
+
turndown = require_runtime.__toESM(turndown);
|
|
8
|
+
//#region src/modules/docx/docx.service.ts
|
|
9
|
+
var DocxService = class extends require_src_modules_base_base_service.BaseService {
|
|
10
|
+
async convertToMarkdown(buffer) {
|
|
11
|
+
return this.throwableAsync(async () => {
|
|
12
|
+
const turndown$1 = new turndown.default();
|
|
13
|
+
const { value: html } = await mammoth.default.convertToHtml({ buffer });
|
|
14
|
+
return turndown$1.turndown(html);
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
exports.DocxService = DocxService;
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=docx.service.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docx.service.cjs","names":["BaseService","turndown","TurndownService"],"sources":["../../../../src/modules/docx/docx.service.ts"],"sourcesContent":["import mammoth from \"mammoth\";\r\nimport TurndownService from \"turndown\";\r\nimport type { ServerResultAsync } from \"../base/base.dto\";\r\nimport { BaseService } from \"../base/base.service\";\r\n\r\nexport class DocxService extends BaseService<never, never> {\r\n async convertToMarkdown(buffer: Buffer): ServerResultAsync<string> {\r\n return this.throwableAsync(async () => {\r\n const turndown = new TurndownService();\r\n const { value: html } = await mammoth.convertToHtml({ buffer });\r\n const markdown = turndown.turndown(html);\r\n return markdown;\r\n });\r\n }\r\n}\r\n"],"mappings":";;;;;;;;AAKA,IAAa,cAAb,cAAiCA,sCAAAA,YAA0B;CACzD,MAAM,kBAAkB,QAA2C;AACjE,SAAO,KAAK,eAAe,YAAY;GACrC,MAAMC,aAAW,IAAIC,SAAAA,SAAiB;GACtC,MAAM,EAAE,OAAO,SAAS,MAAM,QAAA,QAAQ,cAAc,EAAE,QAAQ,CAAC;AAE/D,UADiBD,WAAS,SAAS,KAAK;IAExC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ServerResultAsync } from "../base/base.dto.cjs";
|
|
2
|
+
import { BaseService } from "../base/base.service.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/modules/docx/docx.service.d.ts
|
|
5
|
+
declare class DocxService extends BaseService<never, never> {
|
|
6
|
+
convertToMarkdown(buffer: Buffer): ServerResultAsync<string>;
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { DocxService };
|
|
10
|
+
//# sourceMappingURL=docx.service.d.cts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ServerResultAsync } from "../base/base.dto.mjs";
|
|
2
|
+
import { BaseService } from "../base/base.service.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/modules/docx/docx.service.d.ts
|
|
5
|
+
declare class DocxService extends BaseService<never, never> {
|
|
6
|
+
convertToMarkdown(buffer: Buffer): ServerResultAsync<string>;
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { DocxService };
|
|
10
|
+
//# sourceMappingURL=docx.service.d.mts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseService } from "../base/base.service.mjs";
|
|
2
|
+
import mammoth from "mammoth";
|
|
3
|
+
import TurndownService from "turndown";
|
|
4
|
+
//#region src/modules/docx/docx.service.ts
|
|
5
|
+
var DocxService = class extends BaseService {
|
|
6
|
+
async convertToMarkdown(buffer) {
|
|
7
|
+
return this.throwableAsync(async () => {
|
|
8
|
+
const turndown = new TurndownService();
|
|
9
|
+
const { value: html } = await mammoth.convertToHtml({ buffer });
|
|
10
|
+
return turndown.turndown(html);
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { DocxService };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=docx.service.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docx.service.mjs","names":[],"sources":["../../../../src/modules/docx/docx.service.ts"],"sourcesContent":["import mammoth from \"mammoth\";\r\nimport TurndownService from \"turndown\";\r\nimport type { ServerResultAsync } from \"../base/base.dto\";\r\nimport { BaseService } from \"../base/base.service\";\r\n\r\nexport class DocxService extends BaseService<never, never> {\r\n async convertToMarkdown(buffer: Buffer): ServerResultAsync<string> {\r\n return this.throwableAsync(async () => {\r\n const turndown = new TurndownService();\r\n const { value: html } = await mammoth.convertToHtml({ buffer });\r\n const markdown = turndown.turndown(html);\r\n return markdown;\r\n });\r\n }\r\n}\r\n"],"mappings":";;;;AAKA,IAAa,cAAb,cAAiC,YAA0B;CACzD,MAAM,kBAAkB,QAA2C;AACjE,SAAO,KAAK,eAAe,YAAY;GACrC,MAAM,WAAW,IAAI,iBAAiB;GACtC,MAAM,EAAE,OAAO,SAAS,MAAM,QAAQ,cAAc,EAAE,QAAQ,CAAC;AAE/D,UADiB,SAAS,SAAS,KAAK;IAExC"}
|
|
@@ -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: "intersect" | "contains" | "starts_with" | "ends_with" | "equals" | "greater_than" | "less_than" | "
|
|
21
|
+
method: "intersect" | "on" | "contains" | "starts_with" | "ends_with" | "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,11 +30,11 @@ declare class RecurrenceService extends BaseService<{
|
|
|
30
30
|
actor: UserActor;
|
|
31
31
|
}, {
|
|
32
32
|
rows: {
|
|
33
|
-
id: string;
|
|
34
33
|
name: string | null;
|
|
35
|
-
|
|
34
|
+
id: string;
|
|
36
35
|
createdAt: Date;
|
|
37
36
|
updatedAt: Date;
|
|
37
|
+
userId: string | null;
|
|
38
38
|
metadata: Record<string, any> | null;
|
|
39
39
|
organizationId: string | null;
|
|
40
40
|
teamId: string | null;
|
|
@@ -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: "intersect" | "contains" | "starts_with" | "ends_with" | "equals" | "greater_than" | "less_than" | "
|
|
21
|
+
method: "intersect" | "on" | "contains" | "starts_with" | "ends_with" | "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,11 +30,11 @@ declare class RecurrenceService extends BaseService<{
|
|
|
30
30
|
actor: UserActor;
|
|
31
31
|
}, {
|
|
32
32
|
rows: {
|
|
33
|
-
id: string;
|
|
34
33
|
name: string | null;
|
|
35
|
-
|
|
34
|
+
id: string;
|
|
36
35
|
createdAt: Date;
|
|
37
36
|
updatedAt: Date;
|
|
37
|
+
userId: string | null;
|
|
38
38
|
metadata: Record<string, any> | null;
|
|
39
39
|
organizationId: string | null;
|
|
40
40
|
teamId: string | null;
|
|
@@ -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: "intersect" | "contains" | "starts_with" | "ends_with" | "equals" | "greater_than" | "less_than" | "
|
|
24
|
+
method: "intersect" | "on" | "contains" | "starts_with" | "ends_with" | "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: "intersect" | "contains" | "starts_with" | "ends_with" | "equals" | "greater_than" | "less_than" | "
|
|
24
|
+
method: "intersect" | "on" | "contains" | "starts_with" | "ends_with" | "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 createTagTRPC({
|
|
|
21
21
|
filters?: {
|
|
22
22
|
columnId: string;
|
|
23
23
|
type: "string" | "number" | "boolean" | "date" | "enum" | "jsonArray";
|
|
24
|
-
method: "intersect" | "contains" | "starts_with" | "ends_with" | "equals" | "greater_than" | "less_than" | "
|
|
24
|
+
method: "intersect" | "on" | "contains" | "starts_with" | "ends_with" | "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: "intersect" | "contains" | "starts_with" | "ends_with" | "equals" | "greater_than" | "less_than" | "
|
|
58
|
+
method: "intersect" | "on" | "contains" | "starts_with" | "ends_with" | "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: "intersect" | "contains" | "starts_with" | "ends_with" | "equals" | "greater_than" | "less_than" | "
|
|
24
|
+
method: "intersect" | "on" | "contains" | "starts_with" | "ends_with" | "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: "intersect" | "contains" | "starts_with" | "ends_with" | "equals" | "greater_than" | "less_than" | "
|
|
58
|
+
method: "intersect" | "on" | "contains" | "starts_with" | "ends_with" | "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;
|
package/dist/src/types.d.cts
CHANGED
|
@@ -60,10 +60,10 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
|
|
|
60
60
|
input: void;
|
|
61
61
|
output: {
|
|
62
62
|
id: string;
|
|
63
|
-
expiresAt: Date | null;
|
|
64
63
|
createdAt: Date;
|
|
65
64
|
updatedAt: Date | null;
|
|
66
65
|
status: string;
|
|
66
|
+
expiresAt: Date | null;
|
|
67
67
|
claimUserId: string | null;
|
|
68
68
|
claimedAt: Date | null;
|
|
69
69
|
claimedEmail: string | null;
|
|
@@ -77,10 +77,10 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
|
|
|
77
77
|
};
|
|
78
78
|
output: {
|
|
79
79
|
id: string;
|
|
80
|
-
userId: string;
|
|
81
|
-
expiresAt: Date | null;
|
|
82
|
-
createdAt: Date;
|
|
83
80
|
email: string;
|
|
81
|
+
createdAt: Date;
|
|
82
|
+
expiresAt: Date | null;
|
|
83
|
+
userId: string;
|
|
84
84
|
claimId: string;
|
|
85
85
|
url: string;
|
|
86
86
|
};
|
|
@@ -92,10 +92,10 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
|
|
|
92
92
|
};
|
|
93
93
|
output: {
|
|
94
94
|
id: string;
|
|
95
|
-
userId: string;
|
|
96
|
-
expiresAt: Date | null;
|
|
97
|
-
createdAt: Date;
|
|
98
95
|
email: string;
|
|
96
|
+
createdAt: Date;
|
|
97
|
+
expiresAt: Date | null;
|
|
98
|
+
userId: string;
|
|
99
99
|
claimId: string;
|
|
100
100
|
url: string;
|
|
101
101
|
}[];
|
|
@@ -149,11 +149,11 @@ 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
|
+
email: string | null;
|
|
154
155
|
createdAt: Date;
|
|
155
156
|
updatedAt: Date | null;
|
|
156
|
-
email: string | null;
|
|
157
157
|
status: string;
|
|
158
158
|
}[];
|
|
159
159
|
meta: any;
|
|
@@ -163,11 +163,11 @@ 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
|
+
email: string | null;
|
|
168
169
|
createdAt: Date;
|
|
169
170
|
updatedAt: Date | null;
|
|
170
|
-
email: string | null;
|
|
171
171
|
status: string;
|
|
172
172
|
};
|
|
173
173
|
meta: any;
|
|
@@ -194,11 +194,11 @@ 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
|
+
email: string | null;
|
|
199
200
|
createdAt: Date;
|
|
200
201
|
updatedAt: Date | null;
|
|
201
|
-
email: string | null;
|
|
202
202
|
status: string;
|
|
203
203
|
};
|
|
204
204
|
meta: any;
|
|
@@ -208,11 +208,11 @@ 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
|
+
email: string | null;
|
|
213
214
|
createdAt: Date;
|
|
214
215
|
updatedAt: Date | null;
|
|
215
|
-
email: string | null;
|
|
216
216
|
status: string;
|
|
217
217
|
};
|
|
218
218
|
meta: any;
|
|
@@ -222,11 +222,11 @@ 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
|
+
email: string | null;
|
|
227
228
|
createdAt: Date;
|
|
228
229
|
updatedAt: Date | null;
|
|
229
|
-
email: string | null;
|
|
230
230
|
status: string;
|
|
231
231
|
};
|
|
232
232
|
meta: any;
|