* Returns a Hash of parameters used to create an archive * @private * @param {object} options * @return {object} Archive API parameters
(options = {})
| 1495 | */ |
| 1496 | |
| 1497 | function archive_params(options = {}) { |
| 1498 | return { |
| 1499 | allow_missing: exports.as_safe_bool(options.allow_missing), |
| 1500 | async: exports.as_safe_bool(options.async), |
| 1501 | expires_at: options.expires_at, |
| 1502 | flatten_folders: exports.as_safe_bool(options.flatten_folders), |
| 1503 | flatten_transformations: exports.as_safe_bool(options.flatten_transformations), |
| 1504 | keep_derived: exports.as_safe_bool(options.keep_derived), |
| 1505 | mode: options.mode, |
| 1506 | notification_url: options.notification_url, |
| 1507 | prefixes: options.prefixes && toArray(options.prefixes), |
| 1508 | fully_qualified_public_ids: options.fully_qualified_public_ids && toArray(options.fully_qualified_public_ids), |
| 1509 | public_ids: options.public_ids && toArray(options.public_ids), |
| 1510 | skip_transformation_name: exports.as_safe_bool(options.skip_transformation_name), |
| 1511 | tags: options.tags && toArray(options.tags), |
| 1512 | target_format: options.target_format, |
| 1513 | target_public_id: options.target_public_id, |
| 1514 | target_asset_folder: options.target_asset_folder, |
| 1515 | target_tags: options.target_tags && toArray(options.target_tags), |
| 1516 | timestamp: options.timestamp || exports.timestamp(), |
| 1517 | transformations: utils.build_eager(options.transformations), |
| 1518 | type: options.type, |
| 1519 | use_original_filename: exports.as_safe_bool(options.use_original_filename) |
| 1520 | }; |
| 1521 | } |
| 1522 | |
| 1523 | exports.process_layer = process_layer; |
| 1524 |