cloudinary
Advanced tools
Comparing version 1.26.2 to 1.26.3
@@ -0,1 +1,7 @@ | ||
1.26.3 / 2021-08-01 | ||
================== | ||
* Add update_metada type to upload api (#500) | ||
* Return structured metadata in resources APIs (#503) | ||
1.26.2 / 2021-07-04 | ||
@@ -2,0 +8,0 @@ ================== |
@@ -57,3 +57,3 @@ "use strict"; | ||
} | ||
return call_api("get", uri, pickOnlyExistingValues(options, "next_cursor", "max_results", "prefix", "tags", "context", "direction", "moderations", "start_at"), callback, options); | ||
return call_api("get", uri, pickOnlyExistingValues(options, "next_cursor", "max_results", "prefix", "tags", "context", "direction", "moderations", "start_at", "metadata"), callback, options); | ||
}; | ||
@@ -68,3 +68,3 @@ | ||
uri = ["resources", resource_type, "tags", tag]; | ||
return call_api("get", uri, pickOnlyExistingValues(options, "next_cursor", "max_results", "tags", "context", "direction", "moderations"), callback, options); | ||
return call_api("get", uri, pickOnlyExistingValues(options, "next_cursor", "max_results", "tags", "context", "direction", "moderations", "metadata"), callback, options); | ||
}; | ||
@@ -80,3 +80,3 @@ | ||
uri = ["resources", resource_type, "context"]; | ||
params = pickOnlyExistingValues(options, "next_cursor", "max_results", "tags", "context", "direction", "moderations"); | ||
params = pickOnlyExistingValues(options, "next_cursor", "max_results", "tags", "context", "direction", "moderations", "metadata"); | ||
params.key = key; | ||
@@ -96,3 +96,3 @@ if (value != null) { | ||
uri = ["resources", resource_type, "moderations", kind, status]; | ||
return call_api("get", uri, pickOnlyExistingValues(options, "next_cursor", "max_results", "tags", "context", "direction", "moderations"), callback, options); | ||
return call_api("get", uri, pickOnlyExistingValues(options, "next_cursor", "max_results", "tags", "context", "direction", "moderations", "metadata"), callback, options); | ||
}; | ||
@@ -708,8 +708,8 @@ | ||
*/ | ||
exports.sort_metadata_field_datasource = function sort_metadata_field_datasource(field_external_id, sort_by, direction, callback) { | ||
exports.order_metadata_field_datasource = function order_metadata_field_datasource(field_external_id, sort_by, direction, callback) { | ||
var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; | ||
options.content_type = "json"; | ||
var params = { sort_by: sort_by, direction: direction }; | ||
return call_api("post", ["metadata_fields", field_external_id, "datasource", "sort"], params, callback, options); | ||
var params = { order_by: sort_by, direction: direction }; | ||
return call_api("post", ["metadata_fields", field_external_id, "datasource", "order"], params, callback, options); | ||
}; |
@@ -1264,3 +1264,3 @@ "use strict"; | ||
function escapeQuotes(value) { | ||
return isString(value) ? value.replace('"', '"').replace("'", ''') : value; | ||
return isString(value) ? value.replace(/\"/g, '"').replace(/\'/g, ''') : value; | ||
} | ||
@@ -1267,0 +1267,0 @@ |
@@ -64,3 +64,3 @@ 'use strict'; | ||
restore_metadata_field_datasource: 2, | ||
sort_metadata_field_datasource: 3 | ||
order_metadata_field_datasource: 3 | ||
}); |
@@ -41,3 +41,3 @@ const utils = require("./utils"); | ||
} | ||
return call_api("get", uri, pickOnlyExistingValues(options, "next_cursor", "max_results", "prefix", "tags", "context", "direction", "moderations", "start_at"), callback, options); | ||
return call_api("get", uri, pickOnlyExistingValues(options, "next_cursor", "max_results", "prefix", "tags", "context", "direction", "moderations", "start_at", "metadata"), callback, options); | ||
}; | ||
@@ -49,3 +49,3 @@ | ||
uri = ["resources", resource_type, "tags", tag]; | ||
return call_api("get", uri, pickOnlyExistingValues(options, "next_cursor", "max_results", "tags", "context", "direction", "moderations"), callback, options); | ||
return call_api("get", uri, pickOnlyExistingValues(options, "next_cursor", "max_results", "tags", "context", "direction", "moderations", "metadata"), callback, options); | ||
}; | ||
@@ -57,3 +57,3 @@ | ||
uri = ["resources", resource_type, "context"]; | ||
params = pickOnlyExistingValues(options, "next_cursor", "max_results", "tags", "context", "direction", "moderations"); | ||
params = pickOnlyExistingValues(options, "next_cursor", "max_results", "tags", "context", "direction", "moderations", "metadata"); | ||
params.key = key; | ||
@@ -70,3 +70,3 @@ if (value != null) { | ||
uri = ["resources", resource_type, "moderations", kind, status]; | ||
return call_api("get", uri, pickOnlyExistingValues(options, "next_cursor", "max_results", "tags", "context", "direction", "moderations"), callback, options); | ||
return call_api("get", uri, pickOnlyExistingValues(options, "next_cursor", "max_results", "tags", "context", "direction", "moderations", "metadata"), callback, options); | ||
}; | ||
@@ -569,6 +569,6 @@ | ||
*/ | ||
exports.sort_metadata_field_datasource = function sort_metadata_field_datasource(field_external_id, sort_by, direction, callback, options = {}) { | ||
exports.order_metadata_field_datasource = function order_metadata_field_datasource(field_external_id, sort_by, direction, callback, options = {}) { | ||
options.content_type = "json"; | ||
const params = { sort_by: sort_by, direction: direction}; | ||
return call_api("post", ["metadata_fields", field_external_id, "datasource", "sort"], params, callback, options); | ||
const params = { order_by: sort_by, direction: direction}; | ||
return call_api("post", ["metadata_fields", field_external_id, "datasource", "order"], params, callback, options); | ||
}; |
@@ -1161,3 +1161,3 @@ /** | ||
function escapeQuotes(value) { | ||
return isString(value) ? value.replace('"', '"').replace("'", ''') : value; | ||
return isString(value) ? value.replace(/\"/g, '"').replace(/\'/g, ''') : value; | ||
} | ||
@@ -1164,0 +1164,0 @@ |
@@ -62,3 +62,3 @@ const api = require('../api'); | ||
restore_metadata_field_datasource: 2, | ||
sort_metadata_field_datasource: 3 | ||
order_metadata_field_datasource: 3 | ||
}); |
@@ -5,3 +5,3 @@ { | ||
"description": "Cloudinary NPM for node.js integration", | ||
"version": "1.26.2", | ||
"version": "1.26.3", | ||
"homepage": "http://cloudinary.com", | ||
@@ -8,0 +8,0 @@ "license": "MIT", |
@@ -1045,2 +1045,8 @@ import { Transform } from 'stream'; | ||
function upload_url(options?: ConfigOptions): Promise<any>; | ||
/****************************** Structured Metadata API V2 Methods *************************************/ | ||
function update_metadata(metadata: string | object, public_ids: string[], options?:UploadApiOptions, callback?: ResponseCallback): Promise<MetadataFieldApiResponse>; | ||
function update_metadata(metadata: string| object, public_ids: string[], callback?: ResponseCallback): Promise<MetadataFieldApiResponse>; | ||
} | ||
@@ -1047,0 +1053,0 @@ |
448628
10168