@space-runners/ablo-ts-sdk
Advanced tools
Comparing version 1.0.7 to 1.0.8
@@ -12,8 +12,2 @@ import { AxiosInstance } from 'axios'; | ||
byUrl: (imageUrl: string) => Promise<IBackgroundRemovalResponse>; | ||
/** | ||
* Removes the background from an image file. | ||
* @param imageFile - The image file to remove the background from. | ||
* @returns | ||
*/ | ||
byFile: (imageFile: string) => Promise<IBackgroundRemovalResponse>; | ||
} |
@@ -27,19 +27,4 @@ "use strict"; | ||
}); | ||
/** | ||
* Removes the background from an image file. | ||
* @param imageFile - The image file to remove the background from. | ||
* @returns | ||
*/ | ||
this.byFile = (imageFile) => __awaiter(this, void 0, void 0, function* () { | ||
const { data } = yield this.axios.post('/background-removal/remove-background-by-image', { | ||
imageFile, | ||
}, { | ||
headers: { | ||
'Content-Type': 'multipart/form-data', | ||
}, | ||
}); | ||
return { imageUrl: data.image, creditsRemaining: data.creditsRemaining }; | ||
}); | ||
} | ||
} | ||
exports.BackgroundRemoverService = BackgroundRemoverService; |
@@ -31,7 +31,3 @@ "use strict"; | ||
} | ||
const { data } = yield this.axios.post('/fontmaker', params, { | ||
headers: { | ||
'Content-Type': 'multipart/form-data', | ||
}, | ||
}); | ||
const { data } = yield this.axios.post('/fontmaker', params); | ||
return data; | ||
@@ -38,0 +34,0 @@ }); |
@@ -31,7 +31,3 @@ "use strict"; | ||
} | ||
const { data } = yield this.axios.post('/image-maker', params, { | ||
headers: { | ||
'Content-Type': 'multipart/form-data', | ||
}, | ||
}); | ||
const { data } = yield this.axios.post('/image-maker', params); | ||
return data; | ||
@@ -38,0 +34,0 @@ }); |
@@ -14,11 +14,2 @@ import { AxiosInstance } from 'axios'; | ||
}>; | ||
/** | ||
* Upscales an image file to a specified scale. | ||
* @param imageFile - The image file to be upscaled. | ||
* @param scale - The scale factor for upscaling the image. | ||
* @returns | ||
*/ | ||
fromFile: (imageFile: File, scale: number) => Promise<{ | ||
imageUrl: string; | ||
}>; | ||
} |
@@ -29,21 +29,4 @@ "use strict"; | ||
}); | ||
/** | ||
* Upscales an image file to a specified scale. | ||
* @param imageFile - The image file to be upscaled. | ||
* @param scale - The scale factor for upscaling the image. | ||
* @returns | ||
*/ | ||
this.fromFile = (imageFile, scale) => __awaiter(this, void 0, void 0, function* () { | ||
const { data } = yield this.axios.post('/upscale/file', { | ||
image: imageFile, | ||
scale, | ||
}, { | ||
headers: { | ||
'Content-Type': 'multipart/form-data', | ||
}, | ||
}); | ||
return { imageUrl: data.image }; | ||
}); | ||
} | ||
} | ||
exports.UpscaleService = UpscaleService; |
@@ -6,3 +6,3 @@ { | ||
}, | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "A TypeScript SDK for Ablo Services", | ||
@@ -9,0 +9,0 @@ "main": "lib/index.js", |
40279
804