Skip to content

Commit 3cdcc08

Browse files
committed
refactor: update documentation links to use the correct markdown format
1 parent 91445e0 commit 3cdcc08

File tree

6 files changed

+49
-44
lines changed

6 files changed

+49
-44
lines changed

src/constants/supportedTransforms.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @link https://imagekit.io/docs/transformations
2+
* {@link https://imagekit.io/docs/transformations}
33
*/
44
export const supportedTransforms: { [key: string]: string } = {
55
// Basic sizing & layout

src/index.ts

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,27 +55,16 @@ class ImageKit {
5555
}
5656

5757
/**
58-
* You can add multiple origins in the same ImageKit.io account.
59-
* URL endpoints allow you to configure which origins are accessible through your account and set their preference order as well.
60-
*
61-
* @see {@link https://github.com/imagekit-developer/imagekit-nodejs#url-generation}
62-
* @see {@link https://docs.imagekit.io/integration/url-endpoints}
63-
*
64-
* @param urlOptions
58+
* A utility function to generate asset URL. It applies the specified transformations and other parameters to the URL.
6559
*/
6660
url(urlOptions: UrlOptions): string {
6761
return url(urlOptions, this.options);
6862
}
6963

7064
/**
71-
* You can upload files to ImageKit.io media library from your server-side using private API key authentication.
72-
*
73-
* File size limit
74-
* The maximum upload file size is limited to 25MB.
75-
*
76-
* @see {@link https://docs.imagekit.io/api-reference/upload-file-api/server-side-file-upload}
65+
* For uploading files directly from the browser to ImageKit.io.
7766
*
78-
* @param uploadOptions
67+
* {@link https://imagekit.io/docs/api-reference/upload-file/upload-file#how-to-implement-client-side-file-upload}
7968
*/
8069
upload(uploadOptions: UploadOptions, options?: Partial<ImageKitOptions>): Promise<IKResponse<UploadResponse>>
8170
upload(uploadOptions: UploadOptions, callback: (err: Error | null, response: IKResponse<UploadResponse> | null) => void, options?: Partial<ImageKitOptions>): void;

src/interfaces/Transformation.ts

Lines changed: 37 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ export type TransformationPosition = "path" | "query";
33
/**
44
* The SDK provides easy to use names for transformations. These names are converted to the corresponding transformation string before being added to the URL.
55
* SDKs are updated regularly to support new transformations. If you want to use a transformation that is not supported by the SDK, you can use the `raw` parameter to pass the transformation string directly.
6-
* @link https://imagekit.io/docs/transformations
6+
*
7+
* {@link https://imagekit.io/docs/transformations}
78
*/
89
export interface Transformation {
910
/**
@@ -42,24 +43,26 @@ export interface Transformation {
4243
border?: string;
4344

4445
/**
45-
* @link https://imagekit.io/docs/image-resize-and-crop#crop-crop-modes--focus
46+
* {@link https://imagekit.io/docs/image-resize-and-crop#crop-crop-modes--focus}
4647
*/
4748
crop?: "force" | "at_max" | "at_max_enlarge" | "at_least" | "maintain_ratio";
4849

4950
/**
50-
* @link https://imagekit.io/docs/image-resize-and-crop#crop-crop-modes--focus
51+
* {@link https://imagekit.io/docs/image-resize-and-crop#crop-crop-modes--focus}
5152
*/
5253
cropMode?: "pad_resize" | "extract" | "pad_extract";
5354

5455
/**
5556
* Possible values 0.1 to 5 or `auto` for automatic DPR calculation.
56-
* @link https://imagekit.io/docs/image-resize-and-crop#dpr---dpr
57+
*
58+
* {@link https://imagekit.io/docs/image-resize-and-crop#dpr---dpr}
5759
*/
5860
dpr?: number
5961

6062
/**
6163
* This parameter can be used along with pad resize, maintain ratio, or extract crop to change the behavior of padding or cropping
62-
* @link https://imagekit.io/docs/image-resize-and-crop#focus---fo
64+
*
65+
* {@link https://imagekit.io/docs/image-resize-and-crop#focus---fo}
6366
*/
6467
focus?: string;
6568

@@ -69,22 +72,22 @@ export interface Transformation {
6972
quality?: number;
7073

7174
/**
72-
* @link https://imagekit.io/docs/image-resize-and-crop#example---focus-using-cropped-image-coordinates
75+
* {@link https://imagekit.io/docs/image-resize-and-crop#example---focus-using-cropped-image-coordinates}
7376
*/
7477
x?: number | string;
7578

7679
/**
77-
* @link https://imagekit.io/docs/image-resize-and-crop#example---focus-using-cropped-image-coordinates
80+
* {@link https://imagekit.io/docs/image-resize-and-crop#example---focus-using-cropped-image-coordinates}
7881
*/
7982
xCenter?: number | string;
8083

8184
/**
82-
* @link https://imagekit.io/docs/image-resize-and-crop#example---focus-using-cropped-image-coordinates
85+
* {@link https://imagekit.io/docs/image-resize-and-crop#example---focus-using-cropped-image-coordinates}
8386
*/
8487
y?: number | string;
8588

8689
/**
87-
* @link https://imagekit.io/docs/image-resize-and-crop#example---focus-using-cropped-image-coordinates
90+
* {@link https://imagekit.io/docs/image-resize-and-crop#example---focus-using-cropped-image-coordinates}
8891
*/
8992
yCenter?: number | string;
9093

@@ -122,13 +125,14 @@ export interface Transformation {
122125
blur?: number;
123126

124127
/**
125-
* @link https://imagekit.io/docs/transformations#named-transformations
128+
* {@link https://imagekit.io/docs/transformations#named-transformations}
126129
*/
127130
named?: string;
128131

129132
/**
130133
* Fallback image if the resource is not found, e.g., a URL or path.
131-
* @link https://imagekit.io/docs/image-transformation#default-image---di
134+
*
135+
* {@link https://imagekit.io/docs/image-transformation#default-image---di}
132136
*/
133137
defaultImage?: string;
134138

@@ -166,7 +170,8 @@ export interface Transformation {
166170
/**
167171
* Resolutions for adaptive bitrate streaming (videos).
168172
* e.g., `240_360_480_720_1080` will generate 5 representations and manifest.
169-
* @link https://imagekit.io/docs/adaptive-bitrate-streaming
173+
*
174+
* {@link https://imagekit.io/docs/adaptive-bitrate-streaming}
170175
*/
171176
streamingResolutions?: string;
172177

@@ -199,7 +204,8 @@ export interface Transformation {
199204
/**
200205
* Add an AI-based drop shadow around a foreground object on a transparent or removed background.
201206
* You can control the direction, elevation, and saturation of the light source. E.g. change light direction `az-45`.
202-
* @link https://imagekit.io/docs/ai-transformations#ai-drop-shadow-e-dropshadow
207+
*
208+
* {@link https://imagekit.io/docs/ai-transformations#ai-drop-shadow-e-dropshadow}
203209
*/
204210
aiDropShadow?: string
205211

@@ -219,24 +225,28 @@ export interface Transformation {
219225
contrastStretch?: true
220226

221227
/**
222-
* Add a drop shadow under non-transparent pixels (non-AI method). Check `eDropshadow` for AI-based shadows.
223-
* @link https://imagekit.io/docs/effects-and-enhancements#shadow---e-shadow
228+
* This adds a shadow under solid objects in an input image with a transparent background. Check `eDropshadow` for AI-based shadows.
229+
*
230+
* {@link https://imagekit.io/docs/effects-and-enhancements#shadow---e-shadow}
224231
*/
225232
shadow?: string
226233

227234
/**
228-
* Sharpen the image or specify intensity, e.g., `e-sharpen-10`.
235+
* It is used to sharpen the input image. It is useful when highlighting the edges and finer details within an image.
236+
*
237+
* {@link https://imagekit.io/docs/effects-and-enhancements#sharpen---e-sharpen}
229238
*/
230239
sharpen?: true | number
231240

232241
/**
233-
* Unsharp mask for advanced sharpening, e.g., `"2-2-0.8-0.024"`.
242+
* Unsharp Masking (USM) is an image sharpening technique. This transform allows you to apply and control unsharp masks on your images.
234243
*/
235244
unsharpMask?: string;
236245

237246
/**
238-
* Add a linear gradient overlay. e.g.,
239-
* @link https://imagekit.io/docs/effects-and-enhancements#gradient---e-gradient
247+
* The gradient formed is a linear gradient containing two colors, and it can be customized.
248+
*
249+
* {@link https://imagekit.io/docs/effects-and-enhancements#gradient---e-gradient}
240250
*/
241251
gradient?: string;
242252

@@ -262,28 +272,32 @@ export interface Transformation {
262272

263273
/**
264274
* It is used to specify the opacity level of the output image.
265-
* @link https://imagekit.io/docs/effects-and-enhancements#opacity---o
275+
*
276+
* {@link https://imagekit.io/docs/effects-and-enhancements#opacity---o}
266277
*/
267278
opacity?: number;
268279

269280
/**
270281
* Useful with images that have a solid or nearly solid background with the object in the center. This parameter trims the background from the image, leaving only the central object in the output image.
271-
* @link https://imagekit.io/docs/effects-and-enhancements#trim-edges---t
282+
*
283+
* {@link https://imagekit.io/docs/effects-and-enhancements#trim-edges---t}
272284
*/
273285
trim?: true | number;
274286

275287
/**
276288
* This parameter accepts a number that determines how much to zoom in or out of the cropped area.
277289
* It must be used along with fo-face or fo-<object_name>
278-
* @link https://imagekit.io/docs/image-resize-and-crop#zoom---z
290+
*
291+
* {@link https://imagekit.io/docs/image-resize-and-crop#zoom---z}
279292
*/
280293
zoom?: number;
281294

282295
/**
283296
* Extract specific page/frame from multi-page or layered files (PDF, PSD, AI),
284297
* Pick by number e.g., `2`. Or 2nd and 3rd layers combined using `3-4`.
285298
* Or pick a layer from PSD by name, e.g., `name-layer-4`.
286-
* @link https://imagekit.io/docs/vector-and-animated-images#get-thumbnail-from-psd-pdf-ai-eps-and-animated-files
299+
*
300+
* {@link https://imagekit.io/docs/vector-and-animated-images#get-thumbnail-from-psd-pdf-ai-eps-and-animated-files}
287301
*/
288302
page?: number | string;
289303

src/interfaces/UploadOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ interface Transformation{
2323
/**
2424
* Options used when uploading a file
2525
*
26-
* @link https://docs.imagekit.io/api-reference/upload-file-api/server-side-file-upload#request-structure-multipart-form-data
26+
* {@link https://imagekit.io/docs/api-reference/upload-file/upload-file#Request}
2727
*/
2828
export interface UploadOptions {
2929
/**

src/interfaces/UploadResponse.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
* image - only search in image type files
55
* non-image - only search in files which are not image, e.g., JS or CSS or video files.
66
*
7-
* @link https://docs.imagekit.io/api-reference/media-api/list-and-search-files
7+
* {@link https://imagekit.io/docs/api-reference/digital-asset-management-dam/list-and-search-assets}
88
*/
99
export type FileType = "all" | "image" | "non-image";
1010

1111
/**
1212
* Metadata object structure
13-
* @link https://docs.imagekit.io/api-reference/metadata-api#metadata-object-structure
13+
*
14+
* {@link https://imagekit.io/docs/api-reference/file-metadata/get-uploaded-file-metadata#Responses}
1415
*
1516
* Contents of Object
1617
*
@@ -96,7 +97,7 @@ export interface Metadata {
9697
/**
9798
* Response from uploading a file
9899
*
99-
* @link https://docs.imagekit.io/api-reference/upload-file-api/server-side-file-upload#response-code-and-structure-json
100+
* {@link https://imagekit.io/docs/api-reference/upload-file/upload-file#Responses}
100101
*/
101102
export interface UploadResponse {
102103
/**

src/interfaces/UrlOptions.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ export interface UrlOptionsBase {
55
/**
66
* An array of objects specifying the transformations to be applied in the URL.
77
* The transformation name and the value should be specified as a key-value pair in each object.
8-
* @link https://docs.imagekit.io/features/image-transformations/chained-transformations
8+
*
9+
* {@link https://imagekit.io/docs/transformations#chained-transformations}
910
*/
1011
transformation?: Array<Transformation>;
1112
/**
@@ -49,6 +50,6 @@ export interface UrlOptionsPath extends UrlOptionsBase {
4950
/**
5051
* Options for generating an URL
5152
*
52-
* @link https://github.com/imagekit-developer/imagekit-javascript#url-generation
53+
* {@link https://github.com/imagekit-developer/imagekit-javascript#url-generation}
5354
*/
5455
export type UrlOptions = UrlOptionsSrc | UrlOptionsPath;

0 commit comments

Comments
 (0)