@@ -89,6 +89,17 @@ export interface DownloadFileParams {
8989 */
9090 cacheTtl404 ?: number ;
9191
92+ /**
93+ * Expires the URL at the given Unix epoch timestamp.
94+ *
95+ * The value can be provided in either milliseconds or seconds since January 1, 1970, 00:00:00 UTC.
96+ *
97+ * Must less than 7 days in the future.
98+ *
99+ * See: Secure URLs
100+ */
101+ exp ?: number ;
102+
92103 /**
93104 * Downloads the latest version of your file (if you have overwritten it) when added to the URL with a unique value.
94105 *
@@ -115,6 +126,19 @@ export interface ProcessFileParams {
115126 */
116127 transformation : string ;
117128
129+ /**
130+ * Each File Processing API requires additional query string parameters to specify the desired transformation behavior.
131+ *
132+ * For details, refer to the relevant documentation:
133+ *
134+ * - https://www.bytescale.com/docs/image-processing-api
135+ * - https://www.bytescale.com/docs/video-processing-api
136+ * - https://www.bytescale.com/docs/audio-processing-api
137+ * - https://www.bytescale.com/docs/archive-processing-api
138+ * - https://www.bytescale.com/docs/antivirus-api
139+ */
140+ transformationParams ?: TransformationParams ;
141+
118142 /**
119143 * Some transformations output multiple files, called artifacts.
120144 *
@@ -127,7 +151,7 @@ export interface ProcessFileParams {
127151 *
128152 * If set to `false` the transformation will be executed on every request.
129153 *
130- * *Recommendation:* instead of disabling the cache, a more performant solution is to use the `version` parameter and to increment it each time you require an updated result.
154+ * *Recommendation:* instead of disabling the cache, a more performant solution is to use the `version` or `v` parameter and to increment it each time you require an updated result.
131155 *
132156 * Default: true
133157 */
@@ -151,7 +175,7 @@ export interface ProcessFileParams {
151175 *
152176 * When `cache=false` this parameter is automatically set to `false`.
153177 *
154- * When `cache_perm =auto` the perma-cache will only be used for files that take more than 1000ms to process.
178+ * When `cache-perm =auto` the perma-cache will only be used for files that take more than 500ms to process.
155179 *
156180 * When the perma-cache is used, approximately 200ms of latency is added to the initial request. Thereafter, files will be served from the Bytescale CDN's edge cache or perma-cache, so will have minimal latency.
157181 *
@@ -166,7 +190,7 @@ export interface ProcessFileParams {
166190 *
167191 * If the file is not perma-cached, then the file will be reprocessed on edge cache misses.
168192 *
169- * For more information on perma-caching, see: `cache_perm `
193+ * For more information on perma-caching, see: `cache-perm `
170194 *
171195 * Default: Please refer to your account's default cache settings in the Bytescale Dashboard.
172196 */
@@ -180,16 +204,15 @@ export interface ProcessFileParams {
180204 cacheTtl404 ?: number ;
181205
182206 /**
183- * Parameters to submit to the File Processing API (e.g. the Image Processing API) .
207+ * Expires the URL at the given Unix epoch timestamp .
184208 *
185- * Please see the documentation for each File Processing API to determine which values can appear here:
209+ * The value can be provided in either milliseconds or seconds since January 1, 1970, 00:00:00 UTC.
186210 *
187- * - https://www.bytescale.com/docs/image-processing-api
188- * - https://www.bytescale.com/docs/video-processing-api
189- * - https://www.bytescale.com/docs/audio-processing-api
190- * - https://www.bytescale.com/docs/archive-processing-api
211+ * Must less than 7 days in the future.
212+ *
213+ * See: Secure URLs
191214 */
192- transformationParams ?: TransformationParams ;
215+ exp ?: number ;
193216
194217 /**
195218 * Add this parameter and increment its value to force the file to be reprocessed.
@@ -219,14 +242,15 @@ export interface ProcessFileAndSaveOperationParams {
219242 processFileAndSaveRequest : ProcessFileAndSaveRequest ;
220243
221244 /**
222- * Parameters to submit to the File Processing API (e.g. the Image Processing API) .
245+ * Each File Processing API requires additional query string parameters to specify the desired transformation behavior .
223246 *
224- * Please see the documentation for each File Processing API to determine which values can appear here :
247+ * For details, refer to the relevant documentation :
225248 *
226249 * - https://www.bytescale.com/docs/image-processing-api
227250 * - https://www.bytescale.com/docs/video-processing-api
228251 * - https://www.bytescale.com/docs/audio-processing-api
229252 * - https://www.bytescale.com/docs/archive-processing-api
253+ * - https://www.bytescale.com/docs/antivirus-api
230254 */
231255 transformationParams ?: TransformationParams ;
232256}
@@ -246,7 +270,7 @@ export class FileApi extends runtime.BaseAPI {
246270 path : `/v2/accounts/{accountId}/files/copy` . replace (
247271 `{${ "accountId" } }` ,
248272 // @ts -ignore
249- this . encodeParam ( "accountId" , params . accountId )
273+ this . encodePathParam ( "accountId" , params . accountId )
250274 ) ,
251275 method : "POST" ,
252276 headers,
@@ -274,7 +298,7 @@ export class FileApi extends runtime.BaseAPI {
274298 path : `/v2/accounts/{accountId}/files/copy/batch` . replace (
275299 `{${ "accountId" } }` ,
276300 // @ts -ignore
277- this . encodeParam ( "accountId" , params . accountId )
301+ this . encodePathParam ( "accountId" , params . accountId )
278302 ) ,
279303 method : "POST" ,
280304 headers,
@@ -304,7 +328,7 @@ export class FileApi extends runtime.BaseAPI {
304328 path : `/v2/accounts/{accountId}/files` . replace (
305329 `{${ "accountId" } }` ,
306330 // @ts -ignore
307- this . encodeParam ( "accountId" , params . accountId )
331+ this . encodePathParam ( "accountId" , params . accountId )
308332 ) ,
309333 method : "DELETE" ,
310334 headers,
@@ -331,7 +355,7 @@ export class FileApi extends runtime.BaseAPI {
331355 path : `/v2/accounts/{accountId}/files/batch` . replace (
332356 `{${ "accountId" } }` ,
333357 // @ts -ignore
334- this . encodeParam ( "accountId" , params . accountId )
358+ this . encodePathParam ( "accountId" , params . accountId )
335359 ) ,
336360 method : "DELETE" ,
337361 headers,
@@ -355,11 +379,15 @@ export class FileApi extends runtime.BaseAPI {
355379 }
356380
357381 if ( params . cacheTtl !== undefined ) {
358- query [ "cache_ttl " ] = params . cacheTtl ;
382+ query [ "cache-ttl " ] = params . cacheTtl ;
359383 }
360384
361385 if ( params . cacheTtl404 !== undefined ) {
362- query [ "cache_ttl_404" ] = params . cacheTtl404 ;
386+ query [ "cache-ttl-404" ] = params . cacheTtl404 ;
387+ }
388+
389+ if ( params . exp !== undefined ) {
390+ query [ "exp" ] = params . exp ;
363391 }
364392
365393 if ( params . version !== undefined ) {
@@ -374,12 +402,12 @@ export class FileApi extends runtime.BaseAPI {
374402 . replace (
375403 `{${ "accountId" } }` ,
376404 // @ts -ignore
377- this . encodeParam ( "accountId" , params . accountId )
405+ this . encodePathParam ( "accountId" , params . accountId )
378406 )
379407 . replace (
380408 `{${ "filePath" } }` ,
381409 // @ts -ignore
382- this . encodeParam ( "filePath" , params . filePath )
410+ this . encodePathParam ( "filePath" , params . filePath )
383411 ) ,
384412 method : "GET" ,
385413 headers,
@@ -408,7 +436,7 @@ export class FileApi extends runtime.BaseAPI {
408436 path : `/v2/accounts/{accountId}/files/details` . replace (
409437 `{${ "accountId" } }` ,
410438 // @ts -ignore
411- this . encodeParam ( "accountId" , params . accountId )
439+ this . encodePathParam ( "accountId" , params . accountId )
412440 ) ,
413441 method : "GET" ,
414442 headers,
@@ -426,6 +454,10 @@ export class FileApi extends runtime.BaseAPI {
426454 */
427455 async processFile ( params : ProcessFileParams ) : Promise < runtime . BinaryResult > {
428456 const query : any = { } ;
457+ if ( params . transformationParams !== undefined ) {
458+ query [ "<transformation-params>" ] = params . transformationParams ;
459+ }
460+
429461 if ( params . artifact !== undefined ) {
430462 query [ "artifact" ] = params . artifact ;
431463 }
@@ -435,23 +467,23 @@ export class FileApi extends runtime.BaseAPI {
435467 }
436468
437469 if ( params . cacheOnly !== undefined ) {
438- query [ "cache_only " ] = params . cacheOnly ;
470+ query [ "cache-only " ] = params . cacheOnly ;
439471 }
440472
441473 if ( params . cachePerm !== undefined ) {
442- query [ "cache_perm " ] = params . cachePerm ;
474+ query [ "cache-perm " ] = params . cachePerm ;
443475 }
444476
445477 if ( params . cacheTtl !== undefined ) {
446- query [ "cache_ttl " ] = params . cacheTtl ;
478+ query [ "cache-ttl " ] = params . cacheTtl ;
447479 }
448480
449481 if ( params . cacheTtl404 !== undefined ) {
450- query [ "cache_ttl_404 " ] = params . cacheTtl404 ;
482+ query [ "cache-ttl-404 " ] = params . cacheTtl404 ;
451483 }
452484
453- if ( params . transformationParams !== undefined ) {
454- query [ "transformationParams " ] = params . transformationParams ;
485+ if ( params . exp !== undefined ) {
486+ query [ "exp " ] = params . exp ;
455487 }
456488
457489 if ( params . version !== undefined ) {
@@ -466,17 +498,17 @@ export class FileApi extends runtime.BaseAPI {
466498 . replace (
467499 `{${ "accountId" } }` ,
468500 // @ts -ignore
469- this . encodeParam ( "accountId" , params . accountId )
501+ this . encodePathParam ( "accountId" , params . accountId )
470502 )
471503 . replace (
472504 `{${ "filePath" } }` ,
473505 // @ts -ignore
474- this . encodeParam ( "filePath" , params . filePath )
506+ this . encodePathParam ( "filePath" , params . filePath )
475507 )
476508 . replace (
477509 `{${ "transformation" } }` ,
478510 // @ts -ignore
479- this . encodeParam ( "transformation" , params . transformation )
511+ this . encodePathParam ( "transformation" , params . transformation )
480512 ) ,
481513 method : "GET" ,
482514 headers,
@@ -495,7 +527,7 @@ export class FileApi extends runtime.BaseAPI {
495527 async processFileAndSave ( params : ProcessFileAndSaveOperationParams ) : Promise < ProcessFileAndSaveResponse > {
496528 const query : any = { } ;
497529 if ( params . transformationParams !== undefined ) {
498- query [ "transformationParams " ] = params . transformationParams ;
530+ query [ "<transformation-params> " ] = params . transformationParams ;
499531 }
500532
501533 const headers : runtime . HTTPHeaders = { } ;
@@ -508,17 +540,17 @@ export class FileApi extends runtime.BaseAPI {
508540 . replace (
509541 `{${ "accountId" } }` ,
510542 // @ts -ignore
511- this . encodeParam ( "accountId" , params . accountId )
543+ this . encodePathParam ( "accountId" , params . accountId )
512544 )
513545 . replace (
514546 `{${ "filePath" } }` ,
515547 // @ts -ignore
516- this . encodeParam ( "filePath" , params . filePath )
548+ this . encodePathParam ( "filePath" , params . filePath )
517549 )
518550 . replace (
519551 `{${ "transformation" } }` ,
520552 // @ts -ignore
521- this . encodeParam ( "transformation" , params . transformation )
553+ this . encodePathParam ( "transformation" , params . transformation )
522554 ) ,
523555 method : "POST" ,
524556 headers,
0 commit comments