@@ -24,9 +24,32 @@ export const SEO_TYPES: Record<string, string> = {
2424 "video/upload" : "videos"
2525} ;
2626
27+ /**
28+ * Supported delivery type options.
29+ */
30+ type DELIVERY_TYPE =
31+ 'key' |
32+ 'upload' |
33+ 'private_delivery' |
34+ 'public_delivery' |
35+ 'authenticated' |
36+ 'fetch' |
37+ 'sprite' |
38+ 'text' |
39+ 'multi' |
40+ 'facebook' |
41+ 'twitter' |
42+ 'twitter_name' |
43+ 'gravatar' |
44+ 'youtube' |
45+ 'hulu' |
46+ 'vimeo' |
47+ 'animoto' |
48+ 'worldstarhiphop' |
49+ 'dailymotion' ;
2750
2851/**
29- * @desc Cloudinary file without a transformation
52+ * @descriptionCloudinary file without a transformation
3053 * @summary SDK
3154 * @memberOf SDK
3255 */
@@ -55,7 +78,7 @@ class CloudinaryFile {
5578 }
5679
5780 /**
58- * @desc Sets the public ID of the asset.
81+ * @description Sets the public ID of the asset.
5982 * @param {string } publicID The public ID of the asset.
6083 * @return {this }
6184 */
@@ -66,18 +89,17 @@ class CloudinaryFile {
6689 }
6790
6891 /**
69- * @desc Sets the storage type of the asset.
70- * @param {string } newType The type of the asset. Supported values are key, image,
71- * video, raw, auto, all.
92+ * @description Sets the delivery type of the asset.
93+ * @param {DELIVERY_TYPE | string } newType The type of the asset.
7294 * @return {this }
7395 */
74- setStorageType ( newType : string ) : this {
96+ setDeliveryType ( newType : DELIVERY_TYPE | string ) : this {
7597 this . storageType = newType ;
7698 return this ;
7799 }
78100
79101 /**
80- * @desc Sets the URL SEO suffix of the asset.
102+ * @description Sets the URL SEO suffix of the asset.
81103 * @param {string } newSuffix The SEO suffix.
82104 * @return {this }
83105 */
@@ -87,7 +109,7 @@ class CloudinaryFile {
87109 }
88110
89111 /**
90- * @desc Sets the signature of the asset.
112+ * @description Sets the signature of the asset.
91113 * @param {string } signature The signature.
92114 * @return {this }
93115 */
@@ -97,7 +119,7 @@ class CloudinaryFile {
97119 }
98120
99121 /**
100- * @desc Sets the version of the asset.
122+ * @description Sets the version of the asset.
101123 * @param {string } newVersion The version of the asset.
102124 * @return {this }
103125 */
@@ -109,12 +131,11 @@ class CloudinaryFile {
109131 }
110132
111133 /**
112- * @desc Sets the asset type.
113- * @param {string } newType The type of the asset. Supported values are key, image,
114- * video, raw, auto, all.
134+ * @description Sets the asset type.
135+ * @param {string } newType The type of the asset.
115136 * @return {this }
116137 */
117- setAssetType ( newType : string ) : this {
138+ setAssetType ( newType : 'key' | 'image' | 'video' | 'raw' | 'auto' | 'all' | string ) : this {
118139 if ( newType ) {
119140 this . assetType = newType ;
120141 }
@@ -125,6 +146,10 @@ class CloudinaryFile {
125146 return this ;
126147 }
127148
149+ /**
150+ * @description Serializes to URL string
151+ * @param overwriteOptions
152+ */
128153 toURL ( overwriteOptions : { trackedAnalytics ?: Partial < ITrackedPropertiesThroughAnalytics > } = { } ) : string {
129154 return this . createCloudinaryURL ( null , overwriteOptions . trackedAnalytics ) ;
130155 }
0 commit comments