@abcagency/hire-control-sdk 1.1.6 → 1.1.7
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.
|
@@ -9,12 +9,12 @@ class MediaController {
|
|
|
9
9
|
* Upload a new media file.
|
|
10
10
|
* @param {Media} media - The media file to upload.
|
|
11
11
|
* @param {string | null} authToken - Optional auth token.
|
|
12
|
-
* @returns {Promise<
|
|
12
|
+
* @returns {Promise<Media>} - The uploaded media payload.
|
|
13
13
|
*/
|
|
14
14
|
async uploadMedia(
|
|
15
15
|
media: Media,
|
|
16
16
|
authToken: string | null = null
|
|
17
|
-
): Promise<
|
|
17
|
+
): Promise<Media> {
|
|
18
18
|
return fetchHandler.post<any, any>(
|
|
19
19
|
"/media/upload",
|
|
20
20
|
media,
|
|
@@ -28,12 +28,12 @@ class MediaController {
|
|
|
28
28
|
* Upload a profileImage.
|
|
29
29
|
* @param {Media} media - The profileImage to upload.
|
|
30
30
|
* @param {string | null} authToken - Optional auth token.
|
|
31
|
-
* @returns {Promise<
|
|
31
|
+
* @returns {Promise<Media>} - The uploaded media payload.
|
|
32
32
|
*/
|
|
33
33
|
async uploadProfileImage(
|
|
34
34
|
media: Media,
|
|
35
35
|
authToken: string | null = null
|
|
36
|
-
): Promise<
|
|
36
|
+
): Promise<Media> {
|
|
37
37
|
return fetchHandler.post<any, any>(
|
|
38
38
|
"/media/upload-profile-image",
|
|
39
39
|
media,
|
|
@@ -4,20 +4,16 @@ declare class MediaController {
|
|
|
4
4
|
* Upload a new media file.
|
|
5
5
|
* @param {Media} media - The media file to upload.
|
|
6
6
|
* @param {string | null} authToken - Optional auth token.
|
|
7
|
-
* @returns {Promise<
|
|
7
|
+
* @returns {Promise<Media>} - The uploaded media payload.
|
|
8
8
|
*/
|
|
9
|
-
uploadMedia(media: Media, authToken?: string | null): Promise<
|
|
10
|
-
Url: string;
|
|
11
|
-
}>;
|
|
9
|
+
uploadMedia(media: Media, authToken?: string | null): Promise<Media>;
|
|
12
10
|
/**
|
|
13
11
|
* Upload a profileImage.
|
|
14
12
|
* @param {Media} media - The profileImage to upload.
|
|
15
13
|
* @param {string | null} authToken - Optional auth token.
|
|
16
|
-
* @returns {Promise<
|
|
14
|
+
* @returns {Promise<Media>} - The uploaded media payload.
|
|
17
15
|
*/
|
|
18
|
-
uploadProfileImage(media: Media, authToken?: string | null): Promise<
|
|
19
|
-
Url: string;
|
|
20
|
-
}>;
|
|
16
|
+
uploadProfileImage(media: Media, authToken?: string | null): Promise<Media>;
|
|
21
17
|
/**
|
|
22
18
|
* List all media in a folder.
|
|
23
19
|
* @param {string} folderKey - The folder key to retrieve media from.
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
+
type MediaVariantType = {
|
|
2
|
+
variant?: string;
|
|
3
|
+
fileName?: string;
|
|
4
|
+
fileUrl?: string;
|
|
5
|
+
fileSize: number;
|
|
6
|
+
width?: number;
|
|
7
|
+
height?: number;
|
|
8
|
+
contentType?: string;
|
|
9
|
+
};
|
|
1
10
|
type MediaType = {
|
|
2
11
|
fileName: string;
|
|
3
12
|
fileUrl: string;
|
|
4
13
|
fileSize: number;
|
|
5
14
|
createdDate: string;
|
|
15
|
+
originalFileUrl?: string;
|
|
16
|
+
originalFileSize?: number;
|
|
17
|
+
variants?: MediaVariantType[];
|
|
6
18
|
};
|
|
7
19
|
export default MediaType;
|
package/package.json
CHANGED
package/types/formSubmission.ts
CHANGED
package/types/media/media.ts
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
|
+
type MediaVariantType = {
|
|
2
|
+
variant?: string;
|
|
3
|
+
fileName?: string;
|
|
4
|
+
fileUrl?: string;
|
|
5
|
+
fileSize: number;
|
|
6
|
+
width?: number;
|
|
7
|
+
height?: number;
|
|
8
|
+
contentType?: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
1
11
|
type MediaType = {
|
|
2
12
|
fileName: string;
|
|
3
13
|
fileUrl: string;
|
|
4
14
|
fileSize: number;
|
|
5
15
|
createdDate: string;
|
|
16
|
+
originalFileUrl?: string;
|
|
17
|
+
originalFileSize?: number;
|
|
18
|
+
variants?: MediaVariantType[];
|
|
6
19
|
};
|
|
7
20
|
|
|
8
21
|
export default MediaType;
|