import BaseDeleterApiConsumer from '../base-deleter-api-consumer/base-deleter-api-consumer';
export default class SdkDeleterApiConsumer extends BaseDeleterApiConsumer {
    constructor(SDKMethod) {
        super();
        this.SDKMethod = SDKMethod;
    }
    deleteItem({ id }) {
        return this._deleteItem([id]);
    }
    deleteNestedItem({ parentId, id }) {
        return this._deleteItem([parentId, id]);
    }
    async _deleteItem(args) {
        try {
            return this.SDKMethod(...args);
        }
        catch (err) {
            throw err;
        }
    }
}
//# sourceMappingURL=sdk-deleter-api-consumer.js.map