How to use the @serafin/pipeline.notImplementedError function in @serafin/pipeline

To help you get started, we’ve selected a few @serafin/pipeline examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github serafin-labs / serafin / src / pipe / NotImplemented.ts View on Github external
public async create(next, resources, options?) {
        if (this.notImplementedMethods.indexOf("create") !== -1) {
            throw notImplementedError("create", Object.getPrototypeOf(this).constructor.name);
        }
        return next(resources, options)
    }
github serafin-labs / serafin / src / pipe / NotImplemented.ts View on Github external
public async read(next, query?, options?) {
        if (this.notImplementedMethods.indexOf("read") !== -1) {
            throw notImplementedError("read", Object.getPrototypeOf(this).constructor.name);
        }
        return next(query, options)
    }
github serafin-labs / serafin / src / pipe / NotImplemented.ts View on Github external
public async replace(next, id, values, options?) {
        if (this.notImplementedMethods.indexOf("replace") !== -1) {
            throw notImplementedError("replace", Object.getPrototypeOf(this).constructor.name);
        }
        return next(id, values, options)
    }
github serafin-labs / serafin / src / pipe / NotImplemented.ts View on Github external
public async delete(next, query, options?) {
        if (this.notImplementedMethods.indexOf("delete") !== -1) {
            throw notImplementedError("delete", Object.getPrototypeOf(this).constructor.name);
        }
        return next(query, options)
    }
}
github serafin-labs / serafin / src / pipe / NotImplemented.ts View on Github external
public async patch(next, query, values, options?) {
        if (this.notImplementedMethods.indexOf("patch") !== -1) {
            throw notImplementedError("patch", Object.getPrototypeOf(this).constructor.name);
        }
        return next(query, values, options)
    }