Skip to content

Commit

Permalink
Fix/update metadata field params default disabled (#680)
Browse files Browse the repository at this point in the history
* fix: add support for default_disabled for update_metadata_field method

* fix: ts interface for MetadataFieldApiOptions
  • Loading branch information
cloudinary-pkoniu authored Jul 29, 2024
1 parent 4f71872 commit 69923e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ exports.metadata_field_by_field_id = function metadata_field_by_field_id(externa
* @return {Object}
*/
exports.update_metadata_field = function update_metadata_field(external_id, field, callback, options = {}) {
const params = pickOnlyExistingValues(field, "external_id", "type", "label", "mandatory", "default_value", "validation", "datasource", "restrictions");
const params = pickOnlyExistingValues(field, "external_id", "type", "label", "mandatory", "default_value", "validation", "datasource", "restrictions", "default_disabled");
options.content_type = "json";
return call_api("put", ["metadata_fields", external_id], params, callback, options);
};
Expand Down
1 change: 1 addition & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,7 @@ declare module 'cloudinary' {
default_value?: number;
validation?: object; //there are 4 types, we need to discuss documentation team about it before implementing.
datasource?: DatasourceEntry;
default_disabled?: boolean;

[futureKey: string]: any;
}
Expand Down

0 comments on commit 69923e3

Please sign in to comment.