@@ -185,13 +185,36 @@ export interface SrcOptions {
185
185
*/
186
186
urlEndpoint : string ;
187
187
188
+ /**
189
+ * When you want the signed URL to expire, specified in seconds. If `expiresIn` is
190
+ * anything above 0, the URL will always be signed even if `signed` is set to
191
+ * false. If not specified and `signed` is `true`, the signed URL will not expire
192
+ * (valid indefinitely).
193
+ *
194
+ * Example: Setting `expiresIn: 3600` will make the URL expire 1 hour from
195
+ * generation time. After the expiry time, the signed URL will no longer be valid
196
+ * and ImageKit will return a 401 Unauthorized status code.
197
+ *
198
+ * [Learn more](https://imagekit.io/docs/media-delivery-basic-security#how-to-generate-signed-urls).
199
+ */
200
+ expiresIn ?: number ;
201
+
188
202
/**
189
203
* These are additional query parameters that you want to add to the final URL.
190
204
* They can be any query parameters and not necessarily related to ImageKit. This
191
205
* is especially useful if you want to add a versioning parameter to your URLs.
192
206
*/
193
207
queryParameters ?: { [ key : string ] : string } ;
194
208
209
+ /**
210
+ * Whether to sign the URL or not. Set this to `true` if you want to generate a
211
+ * signed URL. If `signed` is `true` and `expiresIn` is not specified, the signed
212
+ * URL will not expire (valid indefinitely). Note: If `expiresIn` is set to any
213
+ * value above 0, the URL will always be signed regardless of this setting.
214
+ * [Learn more](https://imagekit.io/docs/media-delivery-basic-security#how-to-generate-signed-urls).
215
+ */
216
+ signed ?: boolean ;
217
+
195
218
/**
196
219
* An array of objects specifying the transformations to be applied in the URL. If
197
220
* more than one transformation is specified, they are applied in the order they
0 commit comments