@rulebricks/sdk 2.5.0 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/resources/assets/resources/rules/client/Client.d.ts +118 -3
- package/api/resources/assets/resources/rules/client/Client.js +118 -3
- package/api/resources/assets/resources/rules/client/requests/ImportRuleRequest.d.ts +119 -4
- package/api/types/RuleDetail.d.ts +6 -2
- package/api/types/RuleImportConditionRow.d.ts +11 -0
- package/api/types/RuleImportConditionRow.js +3 -0
- package/api/types/RuleImportPayload.d.ts +60 -0
- package/api/types/RuleImportPayload.js +3 -0
- package/api/types/RuleImportRequestCell.d.ts +11 -0
- package/api/types/RuleImportRequestCell.js +3 -0
- package/api/types/RuleImportResponseCell.d.ts +8 -0
- package/api/types/RuleImportResponseCell.js +3 -0
- package/api/types/RuleImportRowSettings.d.ts +17 -0
- package/api/types/RuleImportRowSettings.js +3 -0
- package/api/types/RuleImportSchemaField.d.ts +36 -0
- package/api/types/RuleImportSchemaField.js +17 -0
- package/api/types/index.d.ts +6 -0
- package/api/types/index.js +6 -0
- package/dist/api/resources/assets/resources/rules/client/Client.d.ts +118 -3
- package/dist/api/resources/assets/resources/rules/client/Client.js +118 -3
- package/dist/api/resources/assets/resources/rules/client/requests/ImportRuleRequest.d.ts +119 -4
- package/dist/api/types/RuleDetail.d.ts +6 -2
- package/dist/api/types/RuleImportConditionRow.d.ts +11 -0
- package/dist/api/types/RuleImportConditionRow.js +3 -0
- package/dist/api/types/RuleImportPayload.d.ts +60 -0
- package/dist/api/types/RuleImportPayload.js +3 -0
- package/dist/api/types/RuleImportRequestCell.d.ts +11 -0
- package/dist/api/types/RuleImportRequestCell.js +3 -0
- package/dist/api/types/RuleImportResponseCell.d.ts +8 -0
- package/dist/api/types/RuleImportResponseCell.js +3 -0
- package/dist/api/types/RuleImportRowSettings.d.ts +17 -0
- package/dist/api/types/RuleImportRowSettings.js +3 -0
- package/dist/api/types/RuleImportSchemaField.d.ts +36 -0
- package/dist/api/types/RuleImportSchemaField.js +17 -0
- package/dist/api/types/index.d.ts +6 -0
- package/dist/api/types/index.js +6 -0
- package/dist/forge/rule.d.ts +4 -3
- package/dist/forge/rule.js +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -10
- package/forge/rule.d.ts +4 -3
- package/forge/rule.js +1 -1
- package/index.d.ts +0 -1
- package/index.js +1 -10
- package/package.json +1 -1
package/dist/forge/rule.js
CHANGED
|
@@ -581,7 +581,7 @@ class Rule {
|
|
|
581
581
|
createdAt: this.createdAt,
|
|
582
582
|
updatedAt: this.updatedAt,
|
|
583
583
|
updatedBy: this.updatedBy,
|
|
584
|
-
settings: this.settings,
|
|
584
|
+
settings: Object.assign({}, this.settings),
|
|
585
585
|
accessGroups: this.accessGroups,
|
|
586
586
|
requestSchema: fields,
|
|
587
587
|
responseSchema: responseFields,
|
package/dist/index.d.ts
CHANGED
|
@@ -4,4 +4,3 @@ export { RulebricksClient } from "./Client.js";
|
|
|
4
4
|
export { RulebricksEnvironment } from "./environments.js";
|
|
5
5
|
export { RulebricksError, RulebricksTimeoutError } from "./errors/index.js";
|
|
6
6
|
export * from "./exports.js";
|
|
7
|
-
export { Rule, Condition, DynamicValue, DynamicValues, DynamicValueType, DynamicValueNotFoundError, TypeMismatchError, RuleTest, RuleSettings, } from "./forge";
|
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.RulebricksTimeoutError = exports.RulebricksError = exports.RulebricksEnvironment = exports.RulebricksClient = exports.Rulebricks = void 0;
|
|
40
40
|
exports.Rulebricks = __importStar(require("./api/index.js"));
|
|
41
41
|
var Client_js_1 = require("./Client.js");
|
|
42
42
|
Object.defineProperty(exports, "RulebricksClient", { enumerable: true, get: function () { return Client_js_1.RulebricksClient; } });
|
|
@@ -46,12 +46,3 @@ var index_js_1 = require("./errors/index.js");
|
|
|
46
46
|
Object.defineProperty(exports, "RulebricksError", { enumerable: true, get: function () { return index_js_1.RulebricksError; } });
|
|
47
47
|
Object.defineProperty(exports, "RulebricksTimeoutError", { enumerable: true, get: function () { return index_js_1.RulebricksTimeoutError; } });
|
|
48
48
|
__exportStar(require("./exports.js"), exports);
|
|
49
|
-
var forge_1 = require("./forge");
|
|
50
|
-
Object.defineProperty(exports, "Rule", { enumerable: true, get: function () { return forge_1.Rule; } });
|
|
51
|
-
Object.defineProperty(exports, "Condition", { enumerable: true, get: function () { return forge_1.Condition; } });
|
|
52
|
-
Object.defineProperty(exports, "DynamicValue", { enumerable: true, get: function () { return forge_1.DynamicValue; } });
|
|
53
|
-
Object.defineProperty(exports, "DynamicValues", { enumerable: true, get: function () { return forge_1.DynamicValues; } });
|
|
54
|
-
Object.defineProperty(exports, "DynamicValueType", { enumerable: true, get: function () { return forge_1.DynamicValueType; } });
|
|
55
|
-
Object.defineProperty(exports, "DynamicValueNotFoundError", { enumerable: true, get: function () { return forge_1.DynamicValueNotFoundError; } });
|
|
56
|
-
Object.defineProperty(exports, "TypeMismatchError", { enumerable: true, get: function () { return forge_1.TypeMismatchError; } });
|
|
57
|
-
Object.defineProperty(exports, "RuleTest", { enumerable: true, get: function () { return forge_1.RuleTest; } });
|
package/forge/rule.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { RulebricksClient } from "../Client.js";
|
|
2
|
+
import type { RuleImportPayload } from "../api/types/RuleImportPayload.js";
|
|
2
3
|
import { Field, RuleSettings, OperatorResult } from "./types.js";
|
|
3
4
|
import { BooleanField, NumberField, StringField, DateField, ListField } from "./operators.js";
|
|
4
5
|
export declare class RuleTest {
|
|
@@ -32,9 +33,9 @@ export declare class Condition {
|
|
|
32
33
|
}>;
|
|
33
34
|
settings: {
|
|
34
35
|
enabled: boolean;
|
|
35
|
-
groupId
|
|
36
|
+
groupId: string | null;
|
|
36
37
|
priority: number;
|
|
37
|
-
schedule:
|
|
38
|
+
schedule: Record<string, unknown>[];
|
|
38
39
|
or?: boolean;
|
|
39
40
|
};
|
|
40
41
|
constructor(rule: Rule, conditions?: Record<string, [string, any[]]>, index?: number | null, settings?: Partial<Condition["settings"]>);
|
|
@@ -120,7 +121,7 @@ export declare class Rule {
|
|
|
120
121
|
update(): Promise<Rule>;
|
|
121
122
|
publish(): Promise<Rule>;
|
|
122
123
|
fromWorkspace(ruleId: string): Promise<Rule>;
|
|
123
|
-
toDict():
|
|
124
|
+
toDict(): RuleImportPayload;
|
|
124
125
|
toJSON(): string;
|
|
125
126
|
static fromJSON(data: string | Record<string, any>): Rule;
|
|
126
127
|
getEditorUrl(): string;
|
package/forge/rule.js
CHANGED
|
@@ -581,7 +581,7 @@ class Rule {
|
|
|
581
581
|
createdAt: this.createdAt,
|
|
582
582
|
updatedAt: this.updatedAt,
|
|
583
583
|
updatedBy: this.updatedBy,
|
|
584
|
-
settings: this.settings,
|
|
584
|
+
settings: Object.assign({}, this.settings),
|
|
585
585
|
accessGroups: this.accessGroups,
|
|
586
586
|
requestSchema: fields,
|
|
587
587
|
responseSchema: responseFields,
|
package/index.d.ts
CHANGED
|
@@ -4,4 +4,3 @@ export { RulebricksClient } from "./Client.js";
|
|
|
4
4
|
export { RulebricksEnvironment } from "./environments.js";
|
|
5
5
|
export { RulebricksError, RulebricksTimeoutError } from "./errors/index.js";
|
|
6
6
|
export * from "./exports.js";
|
|
7
|
-
export { Rule, Condition, DynamicValue, DynamicValues, DynamicValueType, DynamicValueNotFoundError, TypeMismatchError, RuleTest, RuleSettings, } from "./forge";
|
package/index.js
CHANGED
|
@@ -36,7 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.RulebricksTimeoutError = exports.RulebricksError = exports.RulebricksEnvironment = exports.RulebricksClient = exports.Rulebricks = void 0;
|
|
40
40
|
exports.Rulebricks = __importStar(require("./api/index.js"));
|
|
41
41
|
var Client_js_1 = require("./Client.js");
|
|
42
42
|
Object.defineProperty(exports, "RulebricksClient", { enumerable: true, get: function () { return Client_js_1.RulebricksClient; } });
|
|
@@ -46,12 +46,3 @@ var index_js_1 = require("./errors/index.js");
|
|
|
46
46
|
Object.defineProperty(exports, "RulebricksError", { enumerable: true, get: function () { return index_js_1.RulebricksError; } });
|
|
47
47
|
Object.defineProperty(exports, "RulebricksTimeoutError", { enumerable: true, get: function () { return index_js_1.RulebricksTimeoutError; } });
|
|
48
48
|
__exportStar(require("./exports.js"), exports);
|
|
49
|
-
var forge_1 = require("./forge");
|
|
50
|
-
Object.defineProperty(exports, "Rule", { enumerable: true, get: function () { return forge_1.Rule; } });
|
|
51
|
-
Object.defineProperty(exports, "Condition", { enumerable: true, get: function () { return forge_1.Condition; } });
|
|
52
|
-
Object.defineProperty(exports, "DynamicValue", { enumerable: true, get: function () { return forge_1.DynamicValue; } });
|
|
53
|
-
Object.defineProperty(exports, "DynamicValues", { enumerable: true, get: function () { return forge_1.DynamicValues; } });
|
|
54
|
-
Object.defineProperty(exports, "DynamicValueType", { enumerable: true, get: function () { return forge_1.DynamicValueType; } });
|
|
55
|
-
Object.defineProperty(exports, "DynamicValueNotFoundError", { enumerable: true, get: function () { return forge_1.DynamicValueNotFoundError; } });
|
|
56
|
-
Object.defineProperty(exports, "TypeMismatchError", { enumerable: true, get: function () { return forge_1.TypeMismatchError; } });
|
|
57
|
-
Object.defineProperty(exports, "RuleTest", { enumerable: true, get: function () { return forge_1.RuleTest; } });
|