@rakun-kit/core 1.3.5 → 1.3.8
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/cjs/api/routes/manager/get.js +5 -0
- package/dist/cjs/api/routes/manager/get.js.map +1 -1
- package/dist/cjs/api/routes/manager/list.js +7 -1
- package/dist/cjs/api/routes/manager/list.js.map +1 -1
- package/dist/cjs/api/routes/manager/media/finalizeUpload.js +4 -18
- package/dist/cjs/api/routes/manager/media/finalizeUpload.js.map +1 -1
- package/dist/cjs/api/routes/manager/media/resolveMediaRecordUrls.js +63 -0
- package/dist/cjs/api/routes/manager/media/resolveMediaRecordUrls.js.map +1 -0
- package/dist/cjs/api/routes/web/page.js +69 -69
- package/dist/cjs/api/routes/web/page.js.map +1 -1
- package/dist/cjs/api/utils/populates/populateRelations.js +3 -0
- package/dist/cjs/api/utils/populates/populateRelations.js.map +1 -1
- package/dist/cjs/lib/ContentType.js +62 -80
- package/dist/cjs/lib/ContentType.js.map +1 -1
- package/dist/cjs/lib/fields/File.js +3 -0
- package/dist/cjs/lib/fields/File.js.map +1 -1
- package/dist/cjs/orm/index.js +0 -6
- package/dist/cjs/orm/index.js.map +1 -1
- package/dist/esm/api/operations/index.d.ts +32 -14
- package/dist/esm/api/operations/index.d.ts.map +1 -1
- package/dist/esm/api/operations/manager-contract.d.ts +9 -9
- package/dist/esm/api/operations/manager.d.ts +9 -9
- package/dist/esm/api/operations/web-contract.d.ts +23 -5
- package/dist/esm/api/operations/web-contract.d.ts.map +1 -1
- package/dist/esm/api/operations/web.d.ts +23 -5
- package/dist/esm/api/operations/web.d.ts.map +1 -1
- package/dist/esm/api/proxies/index.d.ts +2 -2
- package/dist/esm/api/routes/manager/auth/getSession.d.ts +2 -2
- package/dist/esm/api/routes/manager/auth/markTourSeen.d.ts +2 -2
- package/dist/esm/api/routes/manager/auth/updateAccount.d.ts +2 -2
- package/dist/esm/api/routes/manager/auth/updateTutorialPreferences.d.ts +2 -2
- package/dist/esm/api/routes/manager/create.d.ts +2 -2
- package/dist/esm/api/routes/manager/duplicate.d.ts +2 -2
- package/dist/esm/api/routes/manager/get.d.ts +1 -16
- package/dist/esm/api/routes/manager/get.d.ts.map +1 -1
- package/dist/esm/api/routes/manager/get.js +5 -0
- package/dist/esm/api/routes/manager/get.js.map +1 -1
- package/dist/esm/api/routes/manager/languages.d.ts +2 -2
- package/dist/esm/api/routes/manager/list.d.ts.map +1 -1
- package/dist/esm/api/routes/manager/list.js +7 -1
- package/dist/esm/api/routes/manager/list.js.map +1 -1
- package/dist/esm/api/routes/manager/media/finalizeUpload.d.ts.map +1 -1
- package/dist/esm/api/routes/manager/media/finalizeUpload.js +4 -18
- package/dist/esm/api/routes/manager/media/finalizeUpload.js.map +1 -1
- package/dist/esm/api/routes/manager/media/resolveMediaRecordUrls.d.ts +2 -0
- package/dist/esm/api/routes/manager/media/resolveMediaRecordUrls.d.ts.map +1 -0
- package/dist/esm/api/routes/manager/media/resolveMediaRecordUrls.js +59 -0
- package/dist/esm/api/routes/manager/media/resolveMediaRecordUrls.js.map +1 -0
- package/dist/esm/api/routes/manager/update.d.ts +2 -2
- package/dist/esm/api/routes/web/page.d.ts.map +1 -1
- package/dist/esm/api/routes/web/page.js +69 -69
- package/dist/esm/api/routes/web/page.js.map +1 -1
- package/dist/esm/api/routes/web/previewPage.d.ts +11 -2
- package/dist/esm/api/routes/web/previewPage.d.ts.map +1 -1
- package/dist/esm/api/utils/getLanguages.d.ts +2 -2
- package/dist/esm/api/utils/getUser.d.ts +2 -2
- package/dist/esm/api/utils/populates/populateRelations.js +3 -0
- package/dist/esm/api/utils/populates/populateRelations.js.map +1 -1
- package/dist/esm/internal-content-types/ManagerUser.d.ts +7 -7
- package/dist/esm/internal-content-types/MfaChallenge.d.ts +28 -28
- package/dist/esm/internal-content-types/Page.d.ts +227 -8
- package/dist/esm/internal-content-types/Page.d.ts.map +1 -1
- package/dist/esm/internal-content-types/RouteSettings.d.ts +227 -8
- package/dist/esm/internal-content-types/RouteSettings.d.ts.map +1 -1
- package/dist/esm/internal-content-types/Seo.d.ts +78 -0
- package/dist/esm/internal-content-types/Seo.d.ts.map +1 -1
- package/dist/esm/internal-content-types/SeoSettings.d.ts +78 -0
- package/dist/esm/internal-content-types/SeoSettings.d.ts.map +1 -1
- package/dist/esm/internal-content-types/Session.d.ts +28 -28
- package/dist/esm/internal-content-types/UserMfa.d.ts +28 -28
- package/dist/esm/internal-content-types/WebAuthnCredential.d.ts +28 -28
- package/dist/esm/internal-content-types/WebAuthnRegChallenge.d.ts +28 -28
- package/dist/esm/lib/ContentType.d.ts +58 -82
- package/dist/esm/lib/ContentType.d.ts.map +1 -1
- package/dist/esm/lib/ContentType.js +62 -80
- package/dist/esm/lib/ContentType.js.map +1 -1
- package/dist/esm/lib/fields/File.d.ts +6 -0
- package/dist/esm/lib/fields/File.d.ts.map +1 -1
- package/dist/esm/lib/fields/File.js +3 -0
- package/dist/esm/lib/fields/File.js.map +1 -1
- package/dist/esm/manager.d.ts +36 -36
- package/dist/esm/orm/index.d.ts.map +1 -1
- package/dist/esm/orm/index.js +0 -6
- package/dist/esm/orm/index.js.map +1 -1
- package/dist/esm/schemas/web/page.d.ts +84 -12
- package/dist/esm/schemas/web/page.d.ts.map +1 -1
- package/dist/esm/schemas/web/previewPage.d.ts +44 -8
- package/dist/esm/schemas/web/previewPage.d.ts.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -32,8 +32,8 @@ export declare const createManagerOperationDefinitions: () => {
|
|
|
32
32
|
_visibility?: import("../..").DocumentVisibility | undefined;
|
|
33
33
|
_visibilityBeforeTrash?: Exclude<import("../..").DocumentVisibility, "trash"> | undefined;
|
|
34
34
|
_trashed?: boolean | undefined;
|
|
35
|
-
trashedAt?: Date | undefined;
|
|
36
35
|
_revision?: number | undefined;
|
|
36
|
+
trashedAt?: Date | undefined;
|
|
37
37
|
createdAt?: Date | undefined;
|
|
38
38
|
updatedAt?: Date | undefined;
|
|
39
39
|
}[], "query", "get", "auth">;
|
|
@@ -518,8 +518,8 @@ export declare const createManagerOperationDefinitions: () => {
|
|
|
518
518
|
_visibility?: import("../..").DocumentVisibility | undefined;
|
|
519
519
|
_visibilityBeforeTrash?: Exclude<import("../..").DocumentVisibility, "trash"> | undefined;
|
|
520
520
|
_trashed?: boolean | undefined;
|
|
521
|
-
trashedAt?: Date | undefined;
|
|
522
521
|
_revision?: number | undefined;
|
|
522
|
+
trashedAt?: Date | undefined;
|
|
523
523
|
createdAt?: Date | undefined;
|
|
524
524
|
updatedAt?: Date | undefined;
|
|
525
525
|
};
|
|
@@ -538,8 +538,8 @@ export declare const createManagerOperationDefinitions: () => {
|
|
|
538
538
|
_visibility?: import("../..").DocumentVisibility | undefined;
|
|
539
539
|
_visibilityBeforeTrash?: Exclude<import("../..").DocumentVisibility, "trash"> | undefined;
|
|
540
540
|
_trashed?: boolean | undefined;
|
|
541
|
-
trashedAt?: Date | undefined;
|
|
542
541
|
_revision?: number | undefined;
|
|
542
|
+
trashedAt?: Date | undefined;
|
|
543
543
|
createdAt?: Date | undefined;
|
|
544
544
|
updatedAt?: Date | undefined;
|
|
545
545
|
} | null, "query", "get", "public">;
|
|
@@ -569,8 +569,8 @@ export declare const createManagerOperationDefinitions: () => {
|
|
|
569
569
|
_visibility?: import("../..").DocumentVisibility | undefined;
|
|
570
570
|
_visibilityBeforeTrash?: Exclude<import("../..").DocumentVisibility, "trash"> | undefined;
|
|
571
571
|
_trashed?: boolean | undefined;
|
|
572
|
-
trashedAt?: Date | undefined;
|
|
573
572
|
_revision?: number | undefined;
|
|
573
|
+
trashedAt?: Date | undefined;
|
|
574
574
|
createdAt?: Date | undefined;
|
|
575
575
|
updatedAt?: Date | undefined;
|
|
576
576
|
};
|
|
@@ -589,8 +589,8 @@ export declare const createManagerOperationDefinitions: () => {
|
|
|
589
589
|
_visibility?: import("../..").DocumentVisibility | undefined;
|
|
590
590
|
_visibilityBeforeTrash?: Exclude<import("../..").DocumentVisibility, "trash"> | undefined;
|
|
591
591
|
_trashed?: boolean | undefined;
|
|
592
|
-
trashedAt?: Date | undefined;
|
|
593
592
|
_revision?: number | undefined;
|
|
593
|
+
trashedAt?: Date | undefined;
|
|
594
594
|
createdAt?: Date | undefined;
|
|
595
595
|
updatedAt?: Date | undefined;
|
|
596
596
|
}, "mutation", "post", "auth">;
|
|
@@ -608,8 +608,8 @@ export declare const createManagerOperationDefinitions: () => {
|
|
|
608
608
|
_visibility?: import("../..").DocumentVisibility | undefined;
|
|
609
609
|
_visibilityBeforeTrash?: Exclude<import("../..").DocumentVisibility, "trash"> | undefined;
|
|
610
610
|
_trashed?: boolean | undefined;
|
|
611
|
-
trashedAt?: Date | undefined;
|
|
612
611
|
_revision?: number | undefined;
|
|
612
|
+
trashedAt?: Date | undefined;
|
|
613
613
|
createdAt?: Date | undefined;
|
|
614
614
|
updatedAt?: Date | undefined;
|
|
615
615
|
};
|
|
@@ -628,8 +628,8 @@ export declare const createManagerOperationDefinitions: () => {
|
|
|
628
628
|
_visibility?: import("../..").DocumentVisibility | undefined;
|
|
629
629
|
_visibilityBeforeTrash?: Exclude<import("../..").DocumentVisibility, "trash"> | undefined;
|
|
630
630
|
_trashed?: boolean | undefined;
|
|
631
|
-
trashedAt?: Date | undefined;
|
|
632
631
|
_revision?: number | undefined;
|
|
632
|
+
trashedAt?: Date | undefined;
|
|
633
633
|
createdAt?: Date | undefined;
|
|
634
634
|
updatedAt?: Date | undefined;
|
|
635
635
|
}, "mutation", "post", "auth">;
|
|
@@ -647,8 +647,8 @@ export declare const createManagerOperationDefinitions: () => {
|
|
|
647
647
|
_visibility?: import("../..").DocumentVisibility | undefined;
|
|
648
648
|
_visibilityBeforeTrash?: Exclude<import("../..").DocumentVisibility, "trash"> | undefined;
|
|
649
649
|
_trashed?: boolean | undefined;
|
|
650
|
-
trashedAt?: Date | undefined;
|
|
651
650
|
_revision?: number | undefined;
|
|
651
|
+
trashedAt?: Date | undefined;
|
|
652
652
|
createdAt?: Date | undefined;
|
|
653
653
|
updatedAt?: Date | undefined;
|
|
654
654
|
};
|
|
@@ -667,8 +667,8 @@ export declare const createManagerOperationDefinitions: () => {
|
|
|
667
667
|
_visibility?: import("../..").DocumentVisibility | undefined;
|
|
668
668
|
_visibilityBeforeTrash?: Exclude<import("../..").DocumentVisibility, "trash"> | undefined;
|
|
669
669
|
_trashed?: boolean | undefined;
|
|
670
|
-
trashedAt?: Date | undefined;
|
|
671
670
|
_revision?: number | undefined;
|
|
671
|
+
trashedAt?: Date | undefined;
|
|
672
672
|
createdAt?: Date | undefined;
|
|
673
673
|
updatedAt?: Date | undefined;
|
|
674
674
|
}, "mutation", "post", "auth">;
|
|
@@ -10,8 +10,8 @@ export declare const createWebOperationContracts: () => {
|
|
|
10
10
|
_visibility?: import("../..").DocumentVisibility | undefined;
|
|
11
11
|
_visibilityBeforeTrash?: Exclude<import("../..").DocumentVisibility, "trash"> | undefined;
|
|
12
12
|
_trashed?: boolean | undefined;
|
|
13
|
-
trashedAt?: Date | undefined;
|
|
14
13
|
_revision?: number | undefined;
|
|
14
|
+
trashedAt?: Date | undefined;
|
|
15
15
|
createdAt?: Date | undefined;
|
|
16
16
|
updatedAt?: Date | undefined;
|
|
17
17
|
}[], "query", "get", "public">;
|
|
@@ -58,6 +58,9 @@ export declare const createWebOperationContracts: () => {
|
|
|
58
58
|
height: number | null;
|
|
59
59
|
size: number;
|
|
60
60
|
orientation: "portrait" | "landscape" | null;
|
|
61
|
+
key?: string | undefined;
|
|
62
|
+
access?: "public" | "private" | undefined;
|
|
63
|
+
previewKey?: string | null | undefined;
|
|
61
64
|
title?: string | undefined;
|
|
62
65
|
alt?: string | null | undefined;
|
|
63
66
|
sizes?: {
|
|
@@ -87,6 +90,9 @@ export declare const createWebOperationContracts: () => {
|
|
|
87
90
|
height: number | null;
|
|
88
91
|
size: number;
|
|
89
92
|
orientation: "portrait" | "landscape" | null;
|
|
93
|
+
key?: string | undefined;
|
|
94
|
+
access?: "public" | "private" | undefined;
|
|
95
|
+
previewKey?: string | null | undefined;
|
|
90
96
|
title?: string | undefined;
|
|
91
97
|
alt?: string | null | undefined;
|
|
92
98
|
sizes?: {
|
|
@@ -113,6 +119,9 @@ export declare const createWebOperationContracts: () => {
|
|
|
113
119
|
height: number | null;
|
|
114
120
|
size: number;
|
|
115
121
|
orientation: "portrait" | "landscape" | null;
|
|
122
|
+
key?: string | undefined;
|
|
123
|
+
access?: "public" | "private" | undefined;
|
|
124
|
+
previewKey?: string | null | undefined;
|
|
116
125
|
title?: string | undefined;
|
|
117
126
|
alt?: string | null | undefined;
|
|
118
127
|
sizes?: {
|
|
@@ -130,8 +139,8 @@ export declare const createWebOperationContracts: () => {
|
|
|
130
139
|
_visibility?: import("../..").DocumentVisibility | undefined;
|
|
131
140
|
_visibilityBeforeTrash?: Exclude<import("../..").DocumentVisibility, "trash"> | undefined;
|
|
132
141
|
_trashed?: boolean | undefined;
|
|
133
|
-
trashedAt?: Date | undefined;
|
|
134
142
|
_revision?: number | undefined;
|
|
143
|
+
trashedAt?: Date | undefined;
|
|
135
144
|
createdAt?: Date | undefined;
|
|
136
145
|
updatedAt?: Date | undefined;
|
|
137
146
|
} & {
|
|
@@ -150,8 +159,8 @@ export declare const createWebOperationContracts: () => {
|
|
|
150
159
|
_visibility?: import("../..").DocumentVisibility | undefined;
|
|
151
160
|
_visibilityBeforeTrash?: Exclude<import("../..").DocumentVisibility, "trash"> | undefined;
|
|
152
161
|
_trashed?: boolean | undefined;
|
|
153
|
-
trashedAt?: Date | undefined;
|
|
154
162
|
_revision?: number | undefined;
|
|
163
|
+
trashedAt?: Date | undefined;
|
|
155
164
|
createdAt?: Date | undefined;
|
|
156
165
|
updatedAt?: Date | undefined;
|
|
157
166
|
} | undefined;
|
|
@@ -205,6 +214,9 @@ export declare const createWebOperationContracts: () => {
|
|
|
205
214
|
height: number | null;
|
|
206
215
|
size: number;
|
|
207
216
|
orientation: "portrait" | "landscape" | null;
|
|
217
|
+
key?: string | undefined;
|
|
218
|
+
access?: "public" | "private" | undefined;
|
|
219
|
+
previewKey?: string | null | undefined;
|
|
208
220
|
title?: string | undefined;
|
|
209
221
|
alt?: string | null | undefined;
|
|
210
222
|
sizes?: {
|
|
@@ -234,6 +246,9 @@ export declare const createWebOperationContracts: () => {
|
|
|
234
246
|
height: number | null;
|
|
235
247
|
size: number;
|
|
236
248
|
orientation: "portrait" | "landscape" | null;
|
|
249
|
+
key?: string | undefined;
|
|
250
|
+
access?: "public" | "private" | undefined;
|
|
251
|
+
previewKey?: string | null | undefined;
|
|
237
252
|
title?: string | undefined;
|
|
238
253
|
alt?: string | null | undefined;
|
|
239
254
|
sizes?: {
|
|
@@ -260,6 +275,9 @@ export declare const createWebOperationContracts: () => {
|
|
|
260
275
|
height: number | null;
|
|
261
276
|
size: number;
|
|
262
277
|
orientation: "portrait" | "landscape" | null;
|
|
278
|
+
key?: string | undefined;
|
|
279
|
+
access?: "public" | "private" | undefined;
|
|
280
|
+
previewKey?: string | null | undefined;
|
|
263
281
|
title?: string | undefined;
|
|
264
282
|
alt?: string | null | undefined;
|
|
265
283
|
sizes?: {
|
|
@@ -277,8 +295,8 @@ export declare const createWebOperationContracts: () => {
|
|
|
277
295
|
_visibility?: import("../..").DocumentVisibility | undefined;
|
|
278
296
|
_visibilityBeforeTrash?: Exclude<import("../..").DocumentVisibility, "trash"> | undefined;
|
|
279
297
|
_trashed?: boolean | undefined;
|
|
280
|
-
trashedAt?: Date | undefined;
|
|
281
298
|
_revision?: number | undefined;
|
|
299
|
+
trashedAt?: Date | undefined;
|
|
282
300
|
createdAt?: Date | undefined;
|
|
283
301
|
updatedAt?: Date | undefined;
|
|
284
302
|
} & {
|
|
@@ -297,8 +315,8 @@ export declare const createWebOperationContracts: () => {
|
|
|
297
315
|
_visibility?: import("../..").DocumentVisibility | undefined;
|
|
298
316
|
_visibilityBeforeTrash?: Exclude<import("../..").DocumentVisibility, "trash"> | undefined;
|
|
299
317
|
_trashed?: boolean | undefined;
|
|
300
|
-
trashedAt?: Date | undefined;
|
|
301
318
|
_revision?: number | undefined;
|
|
319
|
+
trashedAt?: Date | undefined;
|
|
302
320
|
createdAt?: Date | undefined;
|
|
303
321
|
updatedAt?: Date | undefined;
|
|
304
322
|
} | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-contract.d.ts","sourceRoot":"","sources":["../../../../src/api/operations/web-contract.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,2BAA2B
|
|
1
|
+
{"version":3,"file":"web-contract.d.ts","sourceRoot":"","sources":["../../../../src/api/operations/web-contract.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+CA,CAAC"}
|
|
@@ -10,8 +10,8 @@ export declare const createWebOperationDefinitions: () => {
|
|
|
10
10
|
_visibility?: import("../..").DocumentVisibility | undefined;
|
|
11
11
|
_visibilityBeforeTrash?: Exclude<import("../..").DocumentVisibility, "trash"> | undefined;
|
|
12
12
|
_trashed?: boolean | undefined;
|
|
13
|
-
trashedAt?: Date | undefined;
|
|
14
13
|
_revision?: number | undefined;
|
|
14
|
+
trashedAt?: Date | undefined;
|
|
15
15
|
createdAt?: Date | undefined;
|
|
16
16
|
updatedAt?: Date | undefined;
|
|
17
17
|
}[], "query", "get", "public">;
|
|
@@ -58,6 +58,9 @@ export declare const createWebOperationDefinitions: () => {
|
|
|
58
58
|
height: number | null;
|
|
59
59
|
size: number;
|
|
60
60
|
orientation: "portrait" | "landscape" | null;
|
|
61
|
+
key?: string | undefined;
|
|
62
|
+
access?: "public" | "private" | undefined;
|
|
63
|
+
previewKey?: string | null | undefined;
|
|
61
64
|
title?: string | undefined;
|
|
62
65
|
alt?: string | null | undefined;
|
|
63
66
|
sizes?: {
|
|
@@ -87,6 +90,9 @@ export declare const createWebOperationDefinitions: () => {
|
|
|
87
90
|
height: number | null;
|
|
88
91
|
size: number;
|
|
89
92
|
orientation: "portrait" | "landscape" | null;
|
|
93
|
+
key?: string | undefined;
|
|
94
|
+
access?: "public" | "private" | undefined;
|
|
95
|
+
previewKey?: string | null | undefined;
|
|
90
96
|
title?: string | undefined;
|
|
91
97
|
alt?: string | null | undefined;
|
|
92
98
|
sizes?: {
|
|
@@ -113,6 +119,9 @@ export declare const createWebOperationDefinitions: () => {
|
|
|
113
119
|
height: number | null;
|
|
114
120
|
size: number;
|
|
115
121
|
orientation: "portrait" | "landscape" | null;
|
|
122
|
+
key?: string | undefined;
|
|
123
|
+
access?: "public" | "private" | undefined;
|
|
124
|
+
previewKey?: string | null | undefined;
|
|
116
125
|
title?: string | undefined;
|
|
117
126
|
alt?: string | null | undefined;
|
|
118
127
|
sizes?: {
|
|
@@ -130,8 +139,8 @@ export declare const createWebOperationDefinitions: () => {
|
|
|
130
139
|
_visibility?: import("../..").DocumentVisibility | undefined;
|
|
131
140
|
_visibilityBeforeTrash?: Exclude<import("../..").DocumentVisibility, "trash"> | undefined;
|
|
132
141
|
_trashed?: boolean | undefined;
|
|
133
|
-
trashedAt?: Date | undefined;
|
|
134
142
|
_revision?: number | undefined;
|
|
143
|
+
trashedAt?: Date | undefined;
|
|
135
144
|
createdAt?: Date | undefined;
|
|
136
145
|
updatedAt?: Date | undefined;
|
|
137
146
|
} & {
|
|
@@ -150,8 +159,8 @@ export declare const createWebOperationDefinitions: () => {
|
|
|
150
159
|
_visibility?: import("../..").DocumentVisibility | undefined;
|
|
151
160
|
_visibilityBeforeTrash?: Exclude<import("../..").DocumentVisibility, "trash"> | undefined;
|
|
152
161
|
_trashed?: boolean | undefined;
|
|
153
|
-
trashedAt?: Date | undefined;
|
|
154
162
|
_revision?: number | undefined;
|
|
163
|
+
trashedAt?: Date | undefined;
|
|
155
164
|
createdAt?: Date | undefined;
|
|
156
165
|
updatedAt?: Date | undefined;
|
|
157
166
|
} | undefined;
|
|
@@ -205,6 +214,9 @@ export declare const createWebOperationDefinitions: () => {
|
|
|
205
214
|
height: number | null;
|
|
206
215
|
size: number;
|
|
207
216
|
orientation: "portrait" | "landscape" | null;
|
|
217
|
+
key?: string | undefined;
|
|
218
|
+
access?: "public" | "private" | undefined;
|
|
219
|
+
previewKey?: string | null | undefined;
|
|
208
220
|
title?: string | undefined;
|
|
209
221
|
alt?: string | null | undefined;
|
|
210
222
|
sizes?: {
|
|
@@ -234,6 +246,9 @@ export declare const createWebOperationDefinitions: () => {
|
|
|
234
246
|
height: number | null;
|
|
235
247
|
size: number;
|
|
236
248
|
orientation: "portrait" | "landscape" | null;
|
|
249
|
+
key?: string | undefined;
|
|
250
|
+
access?: "public" | "private" | undefined;
|
|
251
|
+
previewKey?: string | null | undefined;
|
|
237
252
|
title?: string | undefined;
|
|
238
253
|
alt?: string | null | undefined;
|
|
239
254
|
sizes?: {
|
|
@@ -260,6 +275,9 @@ export declare const createWebOperationDefinitions: () => {
|
|
|
260
275
|
height: number | null;
|
|
261
276
|
size: number;
|
|
262
277
|
orientation: "portrait" | "landscape" | null;
|
|
278
|
+
key?: string | undefined;
|
|
279
|
+
access?: "public" | "private" | undefined;
|
|
280
|
+
previewKey?: string | null | undefined;
|
|
263
281
|
title?: string | undefined;
|
|
264
282
|
alt?: string | null | undefined;
|
|
265
283
|
sizes?: {
|
|
@@ -277,8 +295,8 @@ export declare const createWebOperationDefinitions: () => {
|
|
|
277
295
|
_visibility?: import("../..").DocumentVisibility | undefined;
|
|
278
296
|
_visibilityBeforeTrash?: Exclude<import("../..").DocumentVisibility, "trash"> | undefined;
|
|
279
297
|
_trashed?: boolean | undefined;
|
|
280
|
-
trashedAt?: Date | undefined;
|
|
281
298
|
_revision?: number | undefined;
|
|
299
|
+
trashedAt?: Date | undefined;
|
|
282
300
|
createdAt?: Date | undefined;
|
|
283
301
|
updatedAt?: Date | undefined;
|
|
284
302
|
} & {
|
|
@@ -297,8 +315,8 @@ export declare const createWebOperationDefinitions: () => {
|
|
|
297
315
|
_visibility?: import("../..").DocumentVisibility | undefined;
|
|
298
316
|
_visibilityBeforeTrash?: Exclude<import("../..").DocumentVisibility, "trash"> | undefined;
|
|
299
317
|
_trashed?: boolean | undefined;
|
|
300
|
-
trashedAt?: Date | undefined;
|
|
301
318
|
_revision?: number | undefined;
|
|
319
|
+
trashedAt?: Date | undefined;
|
|
302
320
|
createdAt?: Date | undefined;
|
|
303
321
|
updatedAt?: Date | undefined;
|
|
304
322
|
} | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../../../../src/api/operations/web.ts"],"names":[],"mappings":"AAsCA,eAAO,MAAM,6BAA6B
|
|
1
|
+
{"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../../../../src/api/operations/web.ts"],"names":[],"mappings":"AAsCA,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAqCzC,CAAC"}
|
|
@@ -24,8 +24,8 @@ export declare const ProxyOutput: (item: DataPopulated<ContentType>) => {
|
|
|
24
24
|
_visibility?: import("../..").DocumentVisibility | undefined;
|
|
25
25
|
_visibilityBeforeTrash?: Exclude<import("../..").DocumentVisibility, "trash"> | undefined;
|
|
26
26
|
_trashed?: boolean | undefined;
|
|
27
|
-
trashedAt?: Date | undefined;
|
|
28
27
|
_revision?: number | undefined;
|
|
28
|
+
trashedAt?: Date | undefined;
|
|
29
29
|
createdAt?: Date | undefined;
|
|
30
30
|
updatedAt?: Date | undefined;
|
|
31
31
|
trashedBy?: string | undefined;
|
|
@@ -37,8 +37,8 @@ export declare const ProxyOutput: (item: DataPopulated<ContentType>) => {
|
|
|
37
37
|
_visibility?: import("../..").DocumentVisibility | undefined;
|
|
38
38
|
_visibilityBeforeTrash?: Exclude<import("../..").DocumentVisibility, "trash"> | undefined;
|
|
39
39
|
_trashed?: boolean | undefined;
|
|
40
|
-
trashedAt?: Date | undefined;
|
|
41
40
|
_revision?: number | undefined;
|
|
41
|
+
trashedAt?: Date | undefined;
|
|
42
42
|
createdAt?: Date | undefined;
|
|
43
43
|
updatedAt?: Date | undefined;
|
|
44
44
|
trashedBy?: string | undefined;
|
|
@@ -13,8 +13,8 @@ export declare const getSessionHandler: ({ ctx, }: {
|
|
|
13
13
|
_visibility?: import("../../../..").DocumentVisibility | undefined;
|
|
14
14
|
_visibilityBeforeTrash?: Exclude<import("../../../..").DocumentVisibility, "trash"> | undefined;
|
|
15
15
|
_trashed?: boolean | undefined;
|
|
16
|
-
trashedAt?: Date | undefined;
|
|
17
16
|
_revision?: number | undefined;
|
|
17
|
+
trashedAt?: Date | undefined;
|
|
18
18
|
createdAt?: Date | undefined;
|
|
19
19
|
updatedAt?: Date | undefined;
|
|
20
20
|
};
|
|
@@ -33,8 +33,8 @@ export declare const getSessionHandler: ({ ctx, }: {
|
|
|
33
33
|
_visibility?: import("../../../..").DocumentVisibility | undefined;
|
|
34
34
|
_visibilityBeforeTrash?: Exclude<import("../../../..").DocumentVisibility, "trash"> | undefined;
|
|
35
35
|
_trashed?: boolean | undefined;
|
|
36
|
-
trashedAt?: Date | undefined;
|
|
37
36
|
_revision?: number | undefined;
|
|
37
|
+
trashedAt?: Date | undefined;
|
|
38
38
|
createdAt?: Date | undefined;
|
|
39
39
|
updatedAt?: Date | undefined;
|
|
40
40
|
trashedBy?: string | undefined;
|
|
@@ -16,9 +16,9 @@ export declare const markTourSeenHandler: ({ input, ctx, }: {
|
|
|
16
16
|
_visibility?: import("../../../..").DocumentVisibility | undefined;
|
|
17
17
|
_visibilityBeforeTrash?: Exclude<import("../../../..").DocumentVisibility, "trash"> | undefined;
|
|
18
18
|
_trashed?: boolean | undefined;
|
|
19
|
+
_revision?: number | undefined;
|
|
19
20
|
trashedAt?: Date | undefined;
|
|
20
21
|
trashedBy?: string | undefined;
|
|
21
|
-
_revision?: number | undefined;
|
|
22
22
|
createdAt?: Date | undefined;
|
|
23
23
|
updatedAt?: Date | undefined;
|
|
24
24
|
createdBy?: string | undefined;
|
|
@@ -39,9 +39,9 @@ export declare const markTourSeenHandler: ({ input, ctx, }: {
|
|
|
39
39
|
_visibility?: import("../../../..").DocumentVisibility | undefined;
|
|
40
40
|
_visibilityBeforeTrash?: Exclude<import("../../../..").DocumentVisibility, "trash"> | undefined;
|
|
41
41
|
_trashed?: boolean | undefined;
|
|
42
|
+
_revision?: number | undefined;
|
|
42
43
|
trashedAt?: Date | undefined;
|
|
43
44
|
trashedBy?: string | undefined;
|
|
44
|
-
_revision?: number | undefined;
|
|
45
45
|
createdAt?: Date | undefined;
|
|
46
46
|
updatedAt?: Date | undefined;
|
|
47
47
|
createdBy?: string | undefined;
|
|
@@ -16,9 +16,9 @@ export declare const updateAccountHandler: ({ input, ctx, }: {
|
|
|
16
16
|
_visibility?: import("../../../..").DocumentVisibility | undefined;
|
|
17
17
|
_visibilityBeforeTrash?: Exclude<import("../../../..").DocumentVisibility, "trash"> | undefined;
|
|
18
18
|
_trashed?: boolean | undefined;
|
|
19
|
+
_revision?: number | undefined;
|
|
19
20
|
trashedAt?: Date | undefined;
|
|
20
21
|
trashedBy?: string | undefined;
|
|
21
|
-
_revision?: number | undefined;
|
|
22
22
|
createdAt?: Date | undefined;
|
|
23
23
|
updatedAt?: Date | undefined;
|
|
24
24
|
createdBy?: string | undefined;
|
|
@@ -39,9 +39,9 @@ export declare const updateAccountHandler: ({ input, ctx, }: {
|
|
|
39
39
|
_visibility?: import("../../../..").DocumentVisibility | undefined;
|
|
40
40
|
_visibilityBeforeTrash?: Exclude<import("../../../..").DocumentVisibility, "trash"> | undefined;
|
|
41
41
|
_trashed?: boolean | undefined;
|
|
42
|
+
_revision?: number | undefined;
|
|
42
43
|
trashedAt?: Date | undefined;
|
|
43
44
|
trashedBy?: string | undefined;
|
|
44
|
-
_revision?: number | undefined;
|
|
45
45
|
createdAt?: Date | undefined;
|
|
46
46
|
updatedAt?: Date | undefined;
|
|
47
47
|
createdBy?: string | undefined;
|
|
@@ -16,9 +16,9 @@ export declare const updateTutorialPreferencesHandler: ({ input, ctx, }: {
|
|
|
16
16
|
_visibility?: import("../../../..").DocumentVisibility | undefined;
|
|
17
17
|
_visibilityBeforeTrash?: Exclude<import("../../../..").DocumentVisibility, "trash"> | undefined;
|
|
18
18
|
_trashed?: boolean | undefined;
|
|
19
|
+
_revision?: number | undefined;
|
|
19
20
|
trashedAt?: Date | undefined;
|
|
20
21
|
trashedBy?: string | undefined;
|
|
21
|
-
_revision?: number | undefined;
|
|
22
22
|
createdAt?: Date | undefined;
|
|
23
23
|
updatedAt?: Date | undefined;
|
|
24
24
|
createdBy?: string | undefined;
|
|
@@ -39,9 +39,9 @@ export declare const updateTutorialPreferencesHandler: ({ input, ctx, }: {
|
|
|
39
39
|
_visibility?: import("../../../..").DocumentVisibility | undefined;
|
|
40
40
|
_visibilityBeforeTrash?: Exclude<import("../../../..").DocumentVisibility, "trash"> | undefined;
|
|
41
41
|
_trashed?: boolean | undefined;
|
|
42
|
+
_revision?: number | undefined;
|
|
42
43
|
trashedAt?: Date | undefined;
|
|
43
44
|
trashedBy?: string | undefined;
|
|
44
|
-
_revision?: number | undefined;
|
|
45
45
|
createdAt?: Date | undefined;
|
|
46
46
|
updatedAt?: Date | undefined;
|
|
47
47
|
createdBy?: string | undefined;
|
|
@@ -5,15 +5,15 @@ export declare const createHandler: ({ input, ctx, }: {
|
|
|
5
5
|
ctx: RakunRequestContext;
|
|
6
6
|
}) => Promise<{
|
|
7
7
|
[x: string]: unknown;
|
|
8
|
-
_id: string;
|
|
9
8
|
_type: string;
|
|
9
|
+
_id: string;
|
|
10
10
|
_schemaVersion?: number | undefined;
|
|
11
11
|
_visibility?: import("../../..").DocumentVisibility | undefined;
|
|
12
12
|
_visibilityBeforeTrash?: Exclude<import("../../..").DocumentVisibility, "trash"> | undefined;
|
|
13
13
|
_trashed?: boolean | undefined;
|
|
14
|
+
_revision?: number | undefined;
|
|
14
15
|
trashedAt?: Date | undefined;
|
|
15
16
|
trashedBy?: string | undefined;
|
|
16
|
-
_revision?: number | undefined;
|
|
17
17
|
createdAt?: Date | undefined;
|
|
18
18
|
updatedAt?: Date | undefined;
|
|
19
19
|
createdBy?: string | undefined;
|
|
@@ -5,15 +5,15 @@ export declare const duplicateHandler: ({ input, ctx, }: {
|
|
|
5
5
|
ctx: RakunRequestContext;
|
|
6
6
|
}) => Promise<{
|
|
7
7
|
[x: string]: unknown;
|
|
8
|
-
_id: string;
|
|
9
8
|
_type: string;
|
|
9
|
+
_id: string;
|
|
10
10
|
_schemaVersion?: number | undefined;
|
|
11
11
|
_visibility?: import("../../..").DocumentVisibility | undefined;
|
|
12
12
|
_visibilityBeforeTrash?: Exclude<import("../../..").DocumentVisibility, "trash"> | undefined;
|
|
13
13
|
_trashed?: boolean | undefined;
|
|
14
|
+
_revision?: number | undefined;
|
|
14
15
|
trashedAt?: Date | undefined;
|
|
15
16
|
trashedBy?: string | undefined;
|
|
16
|
-
_revision?: number | undefined;
|
|
17
17
|
createdAt?: Date | undefined;
|
|
18
18
|
updatedAt?: Date | undefined;
|
|
19
19
|
createdBy?: string | undefined;
|
|
@@ -3,20 +3,5 @@ import { GetInput } from "../../../schemas/manager/get";
|
|
|
3
3
|
export declare const getHandler: ({ input, ctx, }: {
|
|
4
4
|
input: GetInput;
|
|
5
5
|
ctx: RakunRequestContext;
|
|
6
|
-
}) => Promise<
|
|
7
|
-
[x: string]: unknown;
|
|
8
|
-
_id: string;
|
|
9
|
-
_type: string;
|
|
10
|
-
_schemaVersion?: number | undefined;
|
|
11
|
-
_visibility?: import("../../..").DocumentVisibility | undefined;
|
|
12
|
-
_visibilityBeforeTrash?: Exclude<import("../../..").DocumentVisibility, "trash"> | undefined;
|
|
13
|
-
_trashed?: boolean | undefined;
|
|
14
|
-
trashedAt?: Date | undefined;
|
|
15
|
-
trashedBy?: string | undefined;
|
|
16
|
-
_revision?: number | undefined;
|
|
17
|
-
createdAt?: Date | undefined;
|
|
18
|
-
updatedAt?: Date | undefined;
|
|
19
|
-
createdBy?: string | undefined;
|
|
20
|
-
updatedBy?: string | undefined;
|
|
21
|
-
}>;
|
|
6
|
+
}) => Promise<Record<string, unknown>>;
|
|
22
7
|
//# sourceMappingURL=get.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../../../src/api/routes/manager/get.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../../../src/api/routes/manager/get.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAMxD,eAAO,MAAM,UAAU,GAAU,iBAG9B;IACD,KAAK,EAAE,QAAQ,CAAC;IAChB,GAAG,EAAE,mBAAmB,CAAC;CAC1B,qCA6BA,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { throwAppError } from "../../../lib/errors";
|
|
2
2
|
import { Logger } from "../../../lib/Logger";
|
|
3
|
+
import { Media } from "../../../internal-content-types";
|
|
3
4
|
import { getMongoService } from "../../../orm";
|
|
4
5
|
import { checkOwnership } from "../../utils/checkOwnership";
|
|
5
6
|
import { requireContentType } from "../../utils/requireContentType";
|
|
6
7
|
import { syncConfiguredRoutes } from "../../utils/routes/syncConfiguredRoutes";
|
|
8
|
+
import { resolveMediaRecordUrls } from "./media/resolveMediaRecordUrls";
|
|
7
9
|
export const getHandler = async ({ input, ctx, }) => {
|
|
8
10
|
const db = await getMongoService();
|
|
9
11
|
const { contentType: contentTypeName, id } = input;
|
|
@@ -20,6 +22,9 @@ export const getHandler = async ({ input, ctx, }) => {
|
|
|
20
22
|
try {
|
|
21
23
|
const item = await db.get(contentType, id);
|
|
22
24
|
Logger.addTrace("manager.get: db get success", { found: !!item });
|
|
25
|
+
if (contentType.name === Media.name) {
|
|
26
|
+
return resolveMediaRecordUrls(item);
|
|
27
|
+
}
|
|
23
28
|
return item;
|
|
24
29
|
}
|
|
25
30
|
catch (_) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../../../src/api/routes/manager/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/C,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../../../src/api/routes/manager/get.ts"],"names":[],"mapp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ACd,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,aAAa,CAAC,WAAW,EAAE;YACzB,QAAQ,EAAE,eAAe;YACzB,EAAE;SACH,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -2,16 +2,16 @@ export declare const languagesHandler: () => Promise<{
|
|
|
2
2
|
code: string;
|
|
3
3
|
name: string;
|
|
4
4
|
default: boolean;
|
|
5
|
-
_id: string;
|
|
6
5
|
_type: "Language";
|
|
6
|
+
_id: string;
|
|
7
7
|
parent?: import("../../..").SelfRelationValue<string> | undefined;
|
|
8
8
|
_schemaVersion?: number | undefined;
|
|
9
9
|
_visibility?: import("../../..").DocumentVisibility | undefined;
|
|
10
10
|
_visibilityBeforeTrash?: Exclude<import("../../..").DocumentVisibility, "trash"> | undefined;
|
|
11
11
|
_trashed?: boolean | undefined;
|
|
12
|
+
_revision?: number | undefined;
|
|
12
13
|
trashedAt?: Date | undefined;
|
|
13
14
|
trashedBy?: string | undefined;
|
|
14
|
-
_revision?: number | undefined;
|
|
15
15
|
createdAt?: Date | undefined;
|
|
16
16
|
updatedAt?: Date | undefined;
|
|
17
17
|
createdBy?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../../src/api/routes/manager/list.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../../src/api/routes/manager/list.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAO1D,eAAO,MAAM,WAAW,GAAU,iBAG/B;IACD,KAAK,EAAE,SAAS,CAAC;IACjB,GAAG,EAAE,mBAAmB,CAAC;CAC1B;;;;aA6CQ,MAAM;;EAWd,CAAC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Logger } from "../../../lib/Logger";
|
|
2
2
|
import { hasPermissions } from "../../../lib/Permissions";
|
|
3
|
+
import { Media } from "../../../internal-content-types";
|
|
3
4
|
import { getMongoService } from "../../../orm";
|
|
4
5
|
import { checkAnyPermissions } from "../../utils/checkPermissions";
|
|
5
6
|
import { populateRelations } from "../../utils/populates/populateRelations";
|
|
6
7
|
import { requireContentType } from "../../utils/requireContentType";
|
|
7
8
|
import { syncConfiguredRoutes } from "../../utils/routes/syncConfiguredRoutes";
|
|
9
|
+
import { resolveMediaRecordUrls } from "./media/resolveMediaRecordUrls";
|
|
8
10
|
export const listHandler = async ({ input, ctx, }) => {
|
|
9
11
|
const db = await getMongoService();
|
|
10
12
|
const { contentType: contentTypeName, query } = input;
|
|
@@ -36,9 +38,13 @@ export const listHandler = async ({ input, ctx, }) => {
|
|
|
36
38
|
Logger.addTrace("manager.list: db list success", {
|
|
37
39
|
totalItems: raw.totalItems,
|
|
38
40
|
});
|
|
41
|
+
const items = (await Promise.all(raw.items.map((item) => populateRelations(item))));
|
|
42
|
+
const resolvedItems = contentType.name === Media.name
|
|
43
|
+
? await Promise.all(items.map((item) => resolveMediaRecordUrls(item)))
|
|
44
|
+
: items;
|
|
39
45
|
return {
|
|
40
46
|
totalItems: raw.totalItems,
|
|
41
|
-
items:
|
|
47
|
+
items: resolvedItems,
|
|
42
48
|
};
|
|
43
49
|
};
|
|
44
50
|
//# sourceMappingURL=list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../../src/api/routes/manager/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAc,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;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1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"finalizeUpload.d.ts","sourceRoot":"","sources":["../../../../../../src/api/routes/manager/media/finalizeUpload.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,kDAAkD,CAAC;
|
|
1
|
+
{"version":3,"file":"finalizeUpload.d.ts","sourceRoot":"","sources":["../../../../../../src/api/routes/manager/media/finalizeUpload.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,kDAAkD,CAAC;AAyJ1D,eAAO,MAAM,qBAAqB,GAAU,iBAGzC;IACD,KAAK,EAAE,mBAAmB,CAAC;IAC3B,GAAG,EAAE,mBAAmB,CAAC;CAC1B,KAAG,OAAO,CAAC,oBAAoB,CAgK/B,CAAC"}
|