Skip to content

Commit ab17742

Browse files
chore: dts chores
1 parent 13f5822 commit ab17742

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

types/cloudinary_ts_spec.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,11 +520,25 @@ cloudinary.v2.api.resources_by_tag("mytag",
520520
console.log(result, error);
521521
});
522522

523+
// $ExpectType Promise<ResourceApiResponse>
523524
cloudinary.v2.api.restore(["image1", "image2"],
524525
function (error, result) {
525526
console.log(result, error);
526527
});
527528

529+
// $ExpectType Promise<ResourceApiResponse>
530+
cloudinary.v2.api.restore_by_asset_ids(["abcd1234", "defg5678"],
531+
{ content_type: 'json' },
532+
function (error, result) {
533+
console.log(result, error);
534+
});
535+
536+
// $ExpectType Promise<ResourceApiResponse>
537+
cloudinary.v2.api.restore_by_asset_ids(["abcd1234", "defg5678"],
538+
function (error, result) {
539+
console.log(result, error);
540+
});
541+
528542
// $ExpectType Promise<any>
529543
cloudinary.v2.api.root_folders(function (err, res) {
530544
console.log(err);

types/index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,6 +1104,8 @@ declare module 'cloudinary' {
11041104

11051105
function restore_by_asset_ids(asset_ids: string[], options?: AdminAndResourceOptions, callback?: ResponseCallback): Promise<ResourceApiResponse>;
11061106

1107+
function restore_by_asset_ids(asset_ids: string[], callback?: ResponseCallback): Promise<ResourceApiResponse>;
1108+
11071109
function root_folders(callback?: ResponseCallback, options?: AdminApiOptions): Promise<any>;
11081110

11091111
function search(params: string, options?: AdminApiOptions, callback?: ResponseCallback): Promise<any>;

0 commit comments

Comments
 (0)