New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@space-runners/ablo-ts-sdk

Package Overview
Dependencies
Maintainers
0
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@space-runners/ablo-ts-sdk - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

4

lib/index.js

@@ -40,4 +40,4 @@ "use strict";

this.photoTransformer = new photo_transformer_1.PhotoTransformerService(this.axios, this.storage);
this.imageMaker = new image_maker_1.ImageMakerService(this.axios);
this.fontMaker = new font_maker_1.FontMakerService(this.axios);
this.imageMaker = new image_maker_1.ImageMakerService(this.axios, this.storage);
this.fontMaker = new font_maker_1.FontMakerService(this.axios, this.storage);
this.upscale = new upscale_1.UpscaleService(this.axios);

@@ -44,0 +44,0 @@ this.removeBackground = new background_removal_1.BackgroundRemoverService(this.axios);

import { AxiosInstance } from 'axios';
import { IFontMakerRequest } from './font-maker-request.interface';
import { IImageGenerationResponse } from '../../interfaces/image-generation-response.interface';
import { StorageService } from '../storage';
export declare class FontMakerService {
private readonly axios;
constructor(axios: AxiosInstance);
private readonly storageService;
constructor(axios: AxiosInstance, storageService: StorageService);
/**

@@ -12,3 +14,3 @@ * Generates a FontMaker image based on the provided request.

*/
run: (params: IFontMakerRequest) => Promise<IImageGenerationResponse>;
run: (params: IFontMakerRequest, referenceImageContentType?: string) => Promise<IImageGenerationResponse>;
}

@@ -14,4 +14,5 @@ "use strict";

class FontMakerService {
constructor(axios) {
constructor(axios, storageService) {
this.axios = axios;
this.storageService = storageService;
/**

@@ -22,3 +23,11 @@ * Generates a FontMaker image based on the provided request.

*/
this.run = (params) => __awaiter(this, void 0, void 0, function* () {
this.run = (params, referenceImageContentType) => __awaiter(this, void 0, void 0, function* () {
// Handle reference image
if (params.referenceImageFile) {
if (!referenceImageContentType) {
throw new Error('Reference image content type is required');
}
params.referenceImageUrl = yield this.storageService.uploadBlob(params.referenceImageFile, referenceImageContentType);
delete params.referenceImageFile;
}
const { data } = yield this.axios.post('/fontmaker', params, {

@@ -25,0 +34,0 @@ headers: {

import { AxiosInstance } from 'axios';
import { IImageMakerRequest } from './image-maker-request.interface';
import { IImageGenerationResponse } from '../../interfaces/image-generation-response.interface';
import { StorageService } from '../storage';
export declare class ImageMakerService {
private readonly axios;
constructor(axios: AxiosInstance);
private readonly storageService;
constructor(axios: AxiosInstance, storageService: StorageService);
/**

@@ -12,3 +14,3 @@ * Generates an image based on the provided text.

*/
run: (params: IImageMakerRequest) => Promise<IImageGenerationResponse>;
run: (params: IImageMakerRequest, referenceImageContentType?: string) => Promise<IImageGenerationResponse>;
}

@@ -14,4 +14,5 @@ "use strict";

class ImageMakerService {
constructor(axios) {
constructor(axios, storageService) {
this.axios = axios;
this.storageService = storageService;
/**

@@ -22,3 +23,11 @@ * Generates an image based on the provided text.

*/
this.run = (params) => __awaiter(this, void 0, void 0, function* () {
this.run = (params, referenceImageContentType) => __awaiter(this, void 0, void 0, function* () {
// Handle reference image
if (params.referenceImageFile) {
if (!referenceImageContentType) {
throw new Error('Reference image content type is required');
}
params.referenceImageUrl = yield this.storageService.uploadBlob(params.referenceImageFile, referenceImageContentType);
delete params.referenceImageFile;
}
const { data } = yield this.axios.post('/image-maker', params, {

@@ -25,0 +34,0 @@ headers: {

@@ -6,3 +6,3 @@ {

},
"version": "1.0.3",
"version": "1.0.4",
"description": "A TypeScript SDK for Ablo Services",

@@ -9,0 +9,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc