0.6.0 • Published 11 months ago
brease-sdk v0.6.0
brease-sdk
SDK Installation
NPM
npm add brease-sdk
Yarn
yarn add brease-sdk
SDK Example Usage
import { SDK } from "brease-sdk";
import { AddRuleResponse } from "brease-sdk/dist/sdk/models/operations";
import { ConditionType } from "brease-sdk/dist/sdk/models/shared";
const sdk = new SDK();
sdk.contextID.addRule({
addRuleInput: {
rule: {
action: "corrupti",
description: "provident",
expression: {
condition: {
base: {
ref: {
dst: "unde",
src: "nulla",
},
},
parameter: false,
type: ConditionType.Rgx,
},
},
id: "69a674e0-f467-4cc8-b96e-d151a05dfc2d",
target: {
target: "at",
targetValue: "maiores",
type: "molestiae",
},
},
},
contextID: "quod",
}, {
apiToken: "",
}).then((res: AddRuleResponse) => {
if (res.statusCode == 200) {
// handle response
}
});
Available Resources and Operations
contextID
- addRule - Adds a new rule to the context
- evaluateRules - Evaluate rules within a context on the provided object
- getAllRules - Returns all rules with the context
- removeRule - Removes a rule from the context
- replaceRule - Replaces an existing rule within the context
Maturity
This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.
Contributions
While we value open-source contributions to this SDK, this library is generated programmatically. Feel free to open a PR or a Github issue as a proof of concept and we'll do our best to include it in a future release !