@updraft-solutions/mcrit-sdk 0.1.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/README.md +240 -0
- package/dist/chunk-2DRKSYW4.cjs +99 -0
- package/dist/chunk-2M32EOYI.js +145 -0
- package/dist/chunk-AN55SAGU.js +1189 -0
- package/dist/chunk-D5DUVW34.js +176 -0
- package/dist/chunk-HQSF3WGF.cjs +14 -0
- package/dist/chunk-JGIAOBZI.js +99 -0
- package/dist/chunk-JRVRIKNM.cjs +168 -0
- package/dist/chunk-LVTDNDWE.cjs +124 -0
- package/dist/chunk-LXNCAKJZ.js +0 -0
- package/dist/chunk-MF7G76QS.cjs +176 -0
- package/dist/chunk-MI4YBENQ.cjs +145 -0
- package/dist/chunk-MOOGM3DW.cjs +1 -0
- package/dist/chunk-NQV2D3FJ.js +14 -0
- package/dist/chunk-TJXWL42D.js +124 -0
- package/dist/chunk-VYT5KQWF.js +168 -0
- package/dist/chunk-XKZQ5W7E.cjs +1189 -0
- package/dist/courses/index.cjs +7 -0
- package/dist/courses/index.d.cts +58 -0
- package/dist/courses/index.d.ts +58 -0
- package/dist/courses/index.js +7 -0
- package/dist/crew/index.cjs +10 -0
- package/dist/crew/index.d.cts +102 -0
- package/dist/crew/index.d.ts +102 -0
- package/dist/crew/index.js +10 -0
- package/dist/crew/vue.cjs +34 -0
- package/dist/crew/vue.d.cts +31 -0
- package/dist/crew/vue.d.ts +31 -0
- package/dist/crew/vue.js +34 -0
- package/dist/format/index.cjs +44 -0
- package/dist/format/index.d.cts +69 -0
- package/dist/format/index.d.ts +69 -0
- package/dist/format/index.js +44 -0
- package/dist/index.cjs +261 -0
- package/dist/index.d.cts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +261 -0
- package/dist/media/index.cjs +30 -0
- package/dist/media/index.d.cts +89 -0
- package/dist/media/index.d.ts +89 -0
- package/dist/media/index.js +30 -0
- package/dist/models-CY3MmvCg.d.cts +33801 -0
- package/dist/models-CY3MmvCg.d.ts +33801 -0
- package/dist/money/index.cjs +18 -0
- package/dist/money/index.d.cts +66 -0
- package/dist/money/index.d.ts +66 -0
- package/dist/money/index.js +18 -0
- package/dist/pagination/index.cjs +6 -0
- package/dist/pagination/index.d.cts +16 -0
- package/dist/pagination/index.d.ts +16 -0
- package/dist/pagination/index.js +6 -0
- package/dist/schemas/index.cjs +158 -0
- package/dist/schemas/index.d.cts +1019 -0
- package/dist/schemas/index.d.ts +1019 -0
- package/dist/schemas/index.js +158 -0
- package/dist/types/index.cjs +1 -0
- package/dist/types/index.d.cts +143 -0
- package/dist/types/index.d.ts +143 -0
- package/dist/types/index.js +1 -0
- package/package.json +171 -0
- package/src/courses/index.ts +202 -0
- package/src/crew/index.ts +255 -0
- package/src/crew/vue.ts +70 -0
- package/src/format/index.ts +265 -0
- package/src/index.ts +76 -0
- package/src/media/index.ts +224 -0
- package/src/money/index.ts +168 -0
- package/src/pagination/index.ts +27 -0
- package/src/schemas/common.ts +73 -0
- package/src/schemas/faq.ts +94 -0
- package/src/schemas/fee.ts +37 -0
- package/src/schemas/index.ts +6 -0
- package/src/schemas/models.ts +996 -0
- package/src/schemas/report.ts +306 -0
- package/src/schemas/safety-report.ts +163 -0
- package/src/types/api.ts +37 -0
- package/src/types/compliance.ts +44 -0
- package/src/types/index.ts +3 -0
- package/src/types/models.ts +124 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
var _chunkJRVRIKNMcjs = require('../chunk-JRVRIKNM.cjs');
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
exports.AvatarConversion = _chunkJRVRIKNMcjs.AvatarConversion; exports.DocumentConversion = _chunkJRVRIKNMcjs.DocumentConversion; exports.HeaderConversion = _chunkJRVRIKNMcjs.HeaderConversion; exports.ImageConversion = _chunkJRVRIKNMcjs.ImageConversion; exports.MediaType = _chunkJRVRIKNMcjs.MediaType; exports.MimeTypes = _chunkJRVRIKNMcjs.MimeTypes; exports.ThumbnailConversion = _chunkJRVRIKNMcjs.ThumbnailConversion; exports.canPreview = _chunkJRVRIKNMcjs.canPreview; exports.getDocumentIcon = _chunkJRVRIKNMcjs.getDocumentIcon; exports.getMediaDisplayName = _chunkJRVRIKNMcjs.getMediaDisplayName; exports.getMediaIcon = _chunkJRVRIKNMcjs.getMediaIcon; exports.getMediaType = _chunkJRVRIKNMcjs.getMediaType; exports.mapMediaConversions = _chunkJRVRIKNMcjs.mapMediaConversions;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Media conversion + classification helpers for spatie/laravel-medialibrary
|
|
3
|
+
* payloads. All functions are pure and locale-agnostic.
|
|
4
|
+
*/
|
|
5
|
+
/** Header conversion keys produced by the backend. */
|
|
6
|
+
declare const HeaderConversion: {
|
|
7
|
+
readonly Dense: "header_dense";
|
|
8
|
+
readonly Large: "header_large";
|
|
9
|
+
};
|
|
10
|
+
/** Image conversion keys. */
|
|
11
|
+
declare const ImageConversion: {
|
|
12
|
+
readonly GalleryMedium: "gallery_medium";
|
|
13
|
+
readonly GalleryFull: "gallery_large";
|
|
14
|
+
readonly Thumb: "thumb";
|
|
15
|
+
};
|
|
16
|
+
/** Document conversion keys. */
|
|
17
|
+
declare const DocumentConversion: {
|
|
18
|
+
readonly Preview: "document_preview";
|
|
19
|
+
};
|
|
20
|
+
/** Thumbnail conversion keys. */
|
|
21
|
+
declare const ThumbnailConversion: {
|
|
22
|
+
readonly Square: "thumb";
|
|
23
|
+
};
|
|
24
|
+
/** Avatar conversion keys. */
|
|
25
|
+
declare const AvatarConversion: {
|
|
26
|
+
readonly Square: "thumb";
|
|
27
|
+
};
|
|
28
|
+
declare const MediaType: {
|
|
29
|
+
readonly IMAGE: "image";
|
|
30
|
+
readonly DOCUMENT: "document";
|
|
31
|
+
readonly VIDEO: "video";
|
|
32
|
+
readonly AUDIO: "audio";
|
|
33
|
+
readonly UNKNOWN: "unknown";
|
|
34
|
+
};
|
|
35
|
+
type MediaTypeValue = (typeof MediaType)[keyof typeof MediaType];
|
|
36
|
+
declare const MimeTypes: {
|
|
37
|
+
readonly IMAGES: readonly ["image/jpeg", "image/jpg", "image/png", "image/gif", "image/webp", "image/svg+xml", "image/bmp", "image/tiff"];
|
|
38
|
+
readonly DOCUMENTS: readonly ["application/pdf", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "text/plain", "text/csv", "application/rtf"];
|
|
39
|
+
readonly VIDEOS: readonly ["video/mp4", "video/webm", "video/ogg", "video/avi", "video/mov", "video/wmv", "video/flv", "video/x-matroska"];
|
|
40
|
+
readonly AUDIO: readonly ["audio/mpeg", "audio/wav", "audio/ogg", "audio/aac", "audio/flac", "audio/mp3"];
|
|
41
|
+
};
|
|
42
|
+
/** Map a MIME type to its broad category. */
|
|
43
|
+
declare function getMediaType(mimeType: string | null | undefined): MediaTypeValue;
|
|
44
|
+
/** Pick a specific MDI icon name for a document MIME type. */
|
|
45
|
+
declare function getDocumentIcon(mimeType: string | null | undefined): string;
|
|
46
|
+
/** Pick an MDI icon name for any media MIME type. */
|
|
47
|
+
declare function getMediaIcon(mimeType: string | null | undefined): string;
|
|
48
|
+
/** True if the media type can be previewed inline (images, video, audio). */
|
|
49
|
+
declare function canPreview(mimeType: string | null | undefined): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Localized label for a media type. Pass `labels` to override (for i18n).
|
|
52
|
+
* Defaults to German since that's the only locale currently in use in MCRIT.
|
|
53
|
+
*/
|
|
54
|
+
declare function getMediaDisplayName(mimeType: string | null | undefined, labels?: Partial<Record<MediaTypeValue, string>>): string;
|
|
55
|
+
/** Permissive Media shape — accepts spatie/laravel-medialibrary payloads. */
|
|
56
|
+
interface MediaLike {
|
|
57
|
+
url?: string;
|
|
58
|
+
mime_type?: string;
|
|
59
|
+
file_name?: string;
|
|
60
|
+
name?: string;
|
|
61
|
+
size?: number;
|
|
62
|
+
alt?: string;
|
|
63
|
+
description?: string;
|
|
64
|
+
title?: string;
|
|
65
|
+
conversions?: Record<string, string>;
|
|
66
|
+
}
|
|
67
|
+
interface MappedMedia {
|
|
68
|
+
href: string | undefined;
|
|
69
|
+
src: string | undefined;
|
|
70
|
+
thumbnail: string | undefined;
|
|
71
|
+
documentPreview: string | null;
|
|
72
|
+
mediaType: MediaTypeValue;
|
|
73
|
+
mimeType: string | undefined;
|
|
74
|
+
icon: string;
|
|
75
|
+
previewable: boolean;
|
|
76
|
+
fileName: string | undefined;
|
|
77
|
+
size: number | undefined;
|
|
78
|
+
alt: string | undefined;
|
|
79
|
+
title: string | undefined;
|
|
80
|
+
original: MediaLike;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Normalize a media field (single object or array) into a uniform array
|
|
84
|
+
* of gallery-ready entries with conversions resolved. Returns `[]` for
|
|
85
|
+
* `null`/`undefined`.
|
|
86
|
+
*/
|
|
87
|
+
declare function mapMediaConversions(media: MediaLike | MediaLike[] | null | undefined): MappedMedia[];
|
|
88
|
+
|
|
89
|
+
export { AvatarConversion, DocumentConversion, HeaderConversion, ImageConversion, type MappedMedia, type MediaLike, MediaType, type MediaTypeValue, MimeTypes, ThumbnailConversion, canPreview, getDocumentIcon, getMediaDisplayName, getMediaIcon, getMediaType, mapMediaConversions };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Media conversion + classification helpers for spatie/laravel-medialibrary
|
|
3
|
+
* payloads. All functions are pure and locale-agnostic.
|
|
4
|
+
*/
|
|
5
|
+
/** Header conversion keys produced by the backend. */
|
|
6
|
+
declare const HeaderConversion: {
|
|
7
|
+
readonly Dense: "header_dense";
|
|
8
|
+
readonly Large: "header_large";
|
|
9
|
+
};
|
|
10
|
+
/** Image conversion keys. */
|
|
11
|
+
declare const ImageConversion: {
|
|
12
|
+
readonly GalleryMedium: "gallery_medium";
|
|
13
|
+
readonly GalleryFull: "gallery_large";
|
|
14
|
+
readonly Thumb: "thumb";
|
|
15
|
+
};
|
|
16
|
+
/** Document conversion keys. */
|
|
17
|
+
declare const DocumentConversion: {
|
|
18
|
+
readonly Preview: "document_preview";
|
|
19
|
+
};
|
|
20
|
+
/** Thumbnail conversion keys. */
|
|
21
|
+
declare const ThumbnailConversion: {
|
|
22
|
+
readonly Square: "thumb";
|
|
23
|
+
};
|
|
24
|
+
/** Avatar conversion keys. */
|
|
25
|
+
declare const AvatarConversion: {
|
|
26
|
+
readonly Square: "thumb";
|
|
27
|
+
};
|
|
28
|
+
declare const MediaType: {
|
|
29
|
+
readonly IMAGE: "image";
|
|
30
|
+
readonly DOCUMENT: "document";
|
|
31
|
+
readonly VIDEO: "video";
|
|
32
|
+
readonly AUDIO: "audio";
|
|
33
|
+
readonly UNKNOWN: "unknown";
|
|
34
|
+
};
|
|
35
|
+
type MediaTypeValue = (typeof MediaType)[keyof typeof MediaType];
|
|
36
|
+
declare const MimeTypes: {
|
|
37
|
+
readonly IMAGES: readonly ["image/jpeg", "image/jpg", "image/png", "image/gif", "image/webp", "image/svg+xml", "image/bmp", "image/tiff"];
|
|
38
|
+
readonly DOCUMENTS: readonly ["application/pdf", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "text/plain", "text/csv", "application/rtf"];
|
|
39
|
+
readonly VIDEOS: readonly ["video/mp4", "video/webm", "video/ogg", "video/avi", "video/mov", "video/wmv", "video/flv", "video/x-matroska"];
|
|
40
|
+
readonly AUDIO: readonly ["audio/mpeg", "audio/wav", "audio/ogg", "audio/aac", "audio/flac", "audio/mp3"];
|
|
41
|
+
};
|
|
42
|
+
/** Map a MIME type to its broad category. */
|
|
43
|
+
declare function getMediaType(mimeType: string | null | undefined): MediaTypeValue;
|
|
44
|
+
/** Pick a specific MDI icon name for a document MIME type. */
|
|
45
|
+
declare function getDocumentIcon(mimeType: string | null | undefined): string;
|
|
46
|
+
/** Pick an MDI icon name for any media MIME type. */
|
|
47
|
+
declare function getMediaIcon(mimeType: string | null | undefined): string;
|
|
48
|
+
/** True if the media type can be previewed inline (images, video, audio). */
|
|
49
|
+
declare function canPreview(mimeType: string | null | undefined): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Localized label for a media type. Pass `labels` to override (for i18n).
|
|
52
|
+
* Defaults to German since that's the only locale currently in use in MCRIT.
|
|
53
|
+
*/
|
|
54
|
+
declare function getMediaDisplayName(mimeType: string | null | undefined, labels?: Partial<Record<MediaTypeValue, string>>): string;
|
|
55
|
+
/** Permissive Media shape — accepts spatie/laravel-medialibrary payloads. */
|
|
56
|
+
interface MediaLike {
|
|
57
|
+
url?: string;
|
|
58
|
+
mime_type?: string;
|
|
59
|
+
file_name?: string;
|
|
60
|
+
name?: string;
|
|
61
|
+
size?: number;
|
|
62
|
+
alt?: string;
|
|
63
|
+
description?: string;
|
|
64
|
+
title?: string;
|
|
65
|
+
conversions?: Record<string, string>;
|
|
66
|
+
}
|
|
67
|
+
interface MappedMedia {
|
|
68
|
+
href: string | undefined;
|
|
69
|
+
src: string | undefined;
|
|
70
|
+
thumbnail: string | undefined;
|
|
71
|
+
documentPreview: string | null;
|
|
72
|
+
mediaType: MediaTypeValue;
|
|
73
|
+
mimeType: string | undefined;
|
|
74
|
+
icon: string;
|
|
75
|
+
previewable: boolean;
|
|
76
|
+
fileName: string | undefined;
|
|
77
|
+
size: number | undefined;
|
|
78
|
+
alt: string | undefined;
|
|
79
|
+
title: string | undefined;
|
|
80
|
+
original: MediaLike;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Normalize a media field (single object or array) into a uniform array
|
|
84
|
+
* of gallery-ready entries with conversions resolved. Returns `[]` for
|
|
85
|
+
* `null`/`undefined`.
|
|
86
|
+
*/
|
|
87
|
+
declare function mapMediaConversions(media: MediaLike | MediaLike[] | null | undefined): MappedMedia[];
|
|
88
|
+
|
|
89
|
+
export { AvatarConversion, DocumentConversion, HeaderConversion, ImageConversion, type MappedMedia, type MediaLike, MediaType, type MediaTypeValue, MimeTypes, ThumbnailConversion, canPreview, getDocumentIcon, getMediaDisplayName, getMediaIcon, getMediaType, mapMediaConversions };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AvatarConversion,
|
|
3
|
+
DocumentConversion,
|
|
4
|
+
HeaderConversion,
|
|
5
|
+
ImageConversion,
|
|
6
|
+
MediaType,
|
|
7
|
+
MimeTypes,
|
|
8
|
+
ThumbnailConversion,
|
|
9
|
+
canPreview,
|
|
10
|
+
getDocumentIcon,
|
|
11
|
+
getMediaDisplayName,
|
|
12
|
+
getMediaIcon,
|
|
13
|
+
getMediaType,
|
|
14
|
+
mapMediaConversions
|
|
15
|
+
} from "../chunk-VYT5KQWF.js";
|
|
16
|
+
export {
|
|
17
|
+
AvatarConversion,
|
|
18
|
+
DocumentConversion,
|
|
19
|
+
HeaderConversion,
|
|
20
|
+
ImageConversion,
|
|
21
|
+
MediaType,
|
|
22
|
+
MimeTypes,
|
|
23
|
+
ThumbnailConversion,
|
|
24
|
+
canPreview,
|
|
25
|
+
getDocumentIcon,
|
|
26
|
+
getMediaDisplayName,
|
|
27
|
+
getMediaIcon,
|
|
28
|
+
getMediaType,
|
|
29
|
+
mapMediaConversions
|
|
30
|
+
};
|