@rulebricks/sdk 2.0.0 → 2.5.0
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/client/Client.d.ts +14 -15
- package/api/resources/assets/client/Client.js +17 -18
- package/api/resources/assets/client/requests/ExportManifestRequest.d.ts +25 -16
- package/api/resources/assets/client/requests/ExportManifestRequest.js +11 -0
- package/api/resources/assets/client/requests/ImportManifestRequest.d.ts +31 -7
- package/api/resources/assets/client/requests/ImportManifestRequest.js +20 -0
- package/api/resources/assets/types/ExportRbmAssetsResponse.d.ts +2 -0
- package/api/resources/assets/types/index.d.ts +1 -1
- package/api/resources/assets/types/index.js +1 -1
- package/api/resources/contexts/client/Client.d.ts +24 -21
- package/api/resources/contexts/client/Client.js +26 -34
- package/api/resources/contexts/client/requests/{CascadeContextRequest.d.ts → CascadeContextsRequest.d.ts} +5 -4
- package/api/resources/contexts/client/requests/{GetInstanceContextsRequest.d.ts → DeleteContextsRequest.d.ts} +1 -1
- package/{dist/api/resources/contexts/client/requests/SolveContextFlowRequest.d.ts → api/resources/contexts/client/requests/ExecuteContextsRequest.d.ts} +5 -6
- package/{dist/api/resources/contexts/client/requests/GetInstanceContextsRequest.d.ts → api/resources/contexts/client/requests/GetContextsRequest.d.ts} +1 -1
- package/api/resources/contexts/client/requests/{SolveContextRuleRequest.d.ts → SolveContextsRequest.d.ts} +5 -6
- package/api/resources/contexts/client/requests/index.d.ts +5 -5
- package/api/resources/contexts/resources/index.d.ts +2 -2
- package/api/resources/contexts/resources/index.js +3 -3
- package/api/resources/contexts/resources/{admin → objects}/client/Client.d.ts +25 -24
- package/api/resources/contexts/resources/{admin → objects}/client/Client.js +19 -18
- package/{dist/api/resources/contexts/resources/admin → api/resources/contexts/resources/objects}/client/requests/CreateContextRequest.d.ts +7 -4
- package/{dist/api/resources/contexts/resources/admin/client/requests/DeleteAdminRequest.d.ts → api/resources/contexts/resources/objects/client/requests/DeleteObjectsRequest.d.ts} +1 -1
- package/{dist/api/resources/contexts/resources/admin/client/requests/GetAdminRequest.d.ts → api/resources/contexts/resources/objects/client/requests/GetObjectsRequest.d.ts} +1 -1
- package/api/resources/contexts/resources/{admin → objects}/client/requests/UpdateContextRequest.d.ts +1 -1
- package/api/resources/contexts/resources/{admin → objects}/client/requests/index.d.ts +2 -2
- package/api/resources/contexts/resources/relationships/client/Client.d.ts +3 -3
- package/api/resources/contexts/resources/relationships/client/Client.js +3 -3
- package/api/resources/contexts/resources/relationships/client/requests/CreateRelationshipRequest.d.ts +11 -11
- package/api/resources/contexts/resources/relationships/client/requests/CreateRelationshipRequest.js +4 -4
- package/api/resources/users/client/Client.d.ts +2 -2
- package/api/resources/users/client/Client.js +2 -2
- package/api/resources/values/client/requests/UpdateValuesRequest.d.ts +1 -1
- package/api/types/CascadeContextRequest.d.ts +4 -0
- package/api/types/ContextInstancePendingEvaluation.d.ts +10 -2
- package/api/types/ContextListItem.d.ts +24 -0
- package/api/types/ContextListResponse.d.ts +1 -1
- package/api/types/ContextRelationshipBase.d.ts +6 -4
- package/api/types/ContextRelationshipBase.js +3 -3
- package/api/types/ContextRelationshipIncoming.d.ts +1 -1
- package/api/types/ContextRelationshipOutgoing.d.ts +1 -1
- package/api/types/ContextRelationshipsResponse.d.ts +12 -0
- package/api/types/ContextSchemaField.d.ts +4 -4
- package/api/types/DecisionLog.d.ts +13 -4
- package/api/types/DecisionLogResponse.d.ts +4 -4
- package/api/types/DeleteRelationshipResponse.d.ts +2 -0
- package/api/types/ExportManifestPreviewResponse.d.ts +53 -40
- package/api/types/ExportManifestResponse.d.ts +28 -7
- package/api/types/Folder.d.ts +4 -0
- package/api/types/ImportManifestResponse.d.ts +52 -24
- package/api/types/SchemaField.d.ts +2 -2
- package/api/types/SolveContextFlowRequest.d.ts +4 -0
- package/api/types/SolveContextRuleRequest.d.ts +4 -0
- package/api/types/Test.d.ts +9 -9
- package/api/types/UpdateContextResponse.d.ts +13 -2
- package/api/types/UsageStatistics.d.ts +10 -4
- package/api/types/UserGroup.d.ts +2 -0
- package/api/types/index.d.ts +4 -0
- package/api/types/index.js +4 -0
- package/dist/api/resources/assets/client/Client.d.ts +14 -15
- package/dist/api/resources/assets/client/Client.js +17 -18
- package/dist/api/resources/assets/client/requests/ExportManifestRequest.d.ts +25 -16
- package/dist/api/resources/assets/client/requests/ExportManifestRequest.js +11 -0
- package/dist/api/resources/assets/client/requests/ImportManifestRequest.d.ts +31 -7
- package/dist/api/resources/assets/client/requests/ImportManifestRequest.js +20 -0
- package/dist/api/resources/assets/types/ExportRbmAssetsResponse.d.ts +2 -0
- package/dist/api/resources/assets/types/index.d.ts +1 -1
- package/dist/api/resources/assets/types/index.js +1 -1
- package/dist/api/resources/contexts/client/Client.d.ts +24 -21
- package/dist/api/resources/contexts/client/Client.js +26 -34
- package/dist/api/resources/contexts/client/requests/{CascadeContextRequest.d.ts → CascadeContextsRequest.d.ts} +5 -4
- package/{api/resources/contexts/client/requests/DeleteInstanceContextsRequest.d.ts → dist/api/resources/contexts/client/requests/DeleteContextsRequest.d.ts} +1 -1
- package/{api/resources/contexts/client/requests/SolveContextFlowRequest.d.ts → dist/api/resources/contexts/client/requests/ExecuteContextsRequest.d.ts} +5 -6
- package/dist/api/resources/contexts/client/requests/{DeleteInstanceContextsRequest.d.ts → GetContextsRequest.d.ts} +1 -1
- package/dist/api/resources/contexts/client/requests/GetContextsRequest.js +3 -0
- package/dist/api/resources/contexts/client/requests/{SolveContextRuleRequest.d.ts → SolveContextsRequest.d.ts} +5 -6
- package/dist/api/resources/contexts/client/requests/SolveContextsRequest.js +3 -0
- package/dist/api/resources/contexts/client/requests/index.d.ts +5 -5
- package/dist/api/resources/contexts/resources/index.d.ts +2 -2
- package/dist/api/resources/contexts/resources/index.js +3 -3
- package/dist/api/resources/contexts/resources/{admin → objects}/client/Client.d.ts +25 -24
- package/dist/api/resources/contexts/resources/{admin → objects}/client/Client.js +19 -18
- package/{api/resources/contexts/resources/admin → dist/api/resources/contexts/resources/objects}/client/requests/CreateContextRequest.d.ts +7 -4
- package/{api/resources/contexts/resources/admin/client/requests/DeleteAdminRequest.d.ts → dist/api/resources/contexts/resources/objects/client/requests/DeleteObjectsRequest.d.ts} +1 -1
- package/dist/api/resources/contexts/resources/objects/client/requests/DeleteObjectsRequest.js +3 -0
- package/{api/resources/contexts/resources/admin/client/requests/GetAdminRequest.d.ts → dist/api/resources/contexts/resources/objects/client/requests/GetObjectsRequest.d.ts} +1 -1
- package/dist/api/resources/contexts/resources/objects/client/requests/GetObjectsRequest.js +3 -0
- package/dist/api/resources/contexts/resources/{admin → objects}/client/requests/UpdateContextRequest.d.ts +1 -1
- package/dist/api/resources/contexts/resources/{admin → objects}/client/requests/index.d.ts +2 -2
- package/dist/api/resources/contexts/resources/relationships/client/Client.d.ts +3 -3
- package/dist/api/resources/contexts/resources/relationships/client/Client.js +3 -3
- package/dist/api/resources/contexts/resources/relationships/client/requests/CreateRelationshipRequest.d.ts +11 -11
- package/dist/api/resources/contexts/resources/relationships/client/requests/CreateRelationshipRequest.js +4 -4
- package/dist/api/resources/users/client/Client.d.ts +2 -2
- package/dist/api/resources/users/client/Client.js +2 -2
- package/dist/api/resources/values/client/requests/UpdateValuesRequest.d.ts +1 -1
- package/dist/api/types/CascadeContextRequest.d.ts +4 -0
- package/dist/api/types/CascadeContextRequest.js +3 -0
- package/dist/api/types/ContextInstancePendingEvaluation.d.ts +10 -2
- package/dist/api/types/ContextListItem.d.ts +24 -0
- package/dist/api/types/ContextListItem.js +3 -0
- package/dist/api/types/ContextListResponse.d.ts +1 -1
- package/dist/api/types/ContextRelationshipBase.d.ts +6 -4
- package/dist/api/types/ContextRelationshipBase.js +3 -3
- package/dist/api/types/ContextRelationshipIncoming.d.ts +1 -1
- package/dist/api/types/ContextRelationshipOutgoing.d.ts +1 -1
- package/dist/api/types/ContextRelationshipsResponse.d.ts +12 -0
- package/dist/api/types/ContextSchemaField.d.ts +4 -4
- package/dist/api/types/DecisionLog.d.ts +13 -4
- package/dist/api/types/DecisionLogResponse.d.ts +4 -4
- package/dist/api/types/DeleteRelationshipResponse.d.ts +2 -0
- package/dist/api/types/ExportManifestPreviewResponse.d.ts +53 -40
- package/dist/api/types/ExportManifestResponse.d.ts +28 -7
- package/dist/api/types/Folder.d.ts +4 -0
- package/dist/api/types/ImportManifestResponse.d.ts +52 -24
- package/dist/api/types/SchemaField.d.ts +2 -2
- package/dist/api/types/SolveContextFlowRequest.d.ts +4 -0
- package/dist/api/types/SolveContextFlowRequest.js +3 -0
- package/dist/api/types/SolveContextRuleRequest.d.ts +4 -0
- package/dist/api/types/SolveContextRuleRequest.js +3 -0
- package/dist/api/types/Test.d.ts +9 -9
- package/dist/api/types/UpdateContextResponse.d.ts +13 -2
- package/dist/api/types/UsageStatistics.d.ts +10 -4
- package/dist/api/types/UserGroup.d.ts +2 -0
- package/dist/api/types/index.d.ts +4 -0
- package/dist/api/types/index.js +4 -0
- package/package.json +1 -1
- package/api/resources/assets/types/ExportAssetsResponse.d.ts +0 -2
- package/dist/api/resources/assets/types/ExportAssetsResponse.d.ts +0 -2
- /package/api/resources/assets/types/{ExportAssetsResponse.js → ExportRbmAssetsResponse.js} +0 -0
- /package/api/resources/contexts/client/requests/{CascadeContextRequest.js → CascadeContextsRequest.js} +0 -0
- /package/api/resources/contexts/client/requests/{DeleteInstanceContextsRequest.js → DeleteContextsRequest.js} +0 -0
- /package/api/resources/contexts/client/requests/{GetInstanceContextsRequest.js → ExecuteContextsRequest.js} +0 -0
- /package/api/resources/contexts/client/requests/{SolveContextFlowRequest.js → GetContextsRequest.js} +0 -0
- /package/api/resources/contexts/client/requests/{SolveContextRuleRequest.js → SolveContextsRequest.js} +0 -0
- /package/api/resources/contexts/resources/{admin → objects}/client/index.d.ts +0 -0
- /package/api/resources/contexts/resources/{admin → objects}/client/index.js +0 -0
- /package/api/resources/contexts/resources/{admin → objects}/client/requests/CreateContextRequest.js +0 -0
- /package/api/resources/contexts/resources/{admin/client/requests/DeleteAdminRequest.js → objects/client/requests/DeleteObjectsRequest.js} +0 -0
- /package/api/resources/contexts/resources/{admin/client/requests/GetAdminRequest.js → objects/client/requests/GetObjectsRequest.js} +0 -0
- /package/api/resources/contexts/resources/{admin → objects}/client/requests/UpdateContextRequest.js +0 -0
- /package/api/resources/contexts/resources/{admin → objects}/client/requests/index.js +0 -0
- /package/api/resources/contexts/resources/{admin → objects}/index.d.ts +0 -0
- /package/api/resources/contexts/resources/{admin → objects}/index.js +0 -0
- /package/{dist/api/resources/contexts/client/requests → api/types}/CascadeContextRequest.js +0 -0
- /package/{dist/api/resources/assets/types/ExportAssetsResponse.js → api/types/ContextListItem.js} +0 -0
- /package/{dist/api/resources/contexts/client/requests → api/types}/SolveContextFlowRequest.js +0 -0
- /package/{dist/api/resources/contexts/client/requests → api/types}/SolveContextRuleRequest.js +0 -0
- /package/dist/api/resources/{contexts/client/requests/DeleteInstanceContextsRequest.js → assets/types/ExportRbmAssetsResponse.js} +0 -0
- /package/dist/api/resources/contexts/client/requests/{GetInstanceContextsRequest.js → CascadeContextsRequest.js} +0 -0
- /package/dist/api/resources/contexts/{resources/admin/client/requests/DeleteAdminRequest.js → client/requests/DeleteContextsRequest.js} +0 -0
- /package/dist/api/resources/contexts/{resources/admin/client/requests/GetAdminRequest.js → client/requests/ExecuteContextsRequest.js} +0 -0
- /package/dist/api/resources/contexts/resources/{admin → objects}/client/index.d.ts +0 -0
- /package/dist/api/resources/contexts/resources/{admin → objects}/client/index.js +0 -0
- /package/dist/api/resources/contexts/resources/{admin → objects}/client/requests/CreateContextRequest.js +0 -0
- /package/dist/api/resources/contexts/resources/{admin → objects}/client/requests/UpdateContextRequest.js +0 -0
- /package/dist/api/resources/contexts/resources/{admin → objects}/client/requests/index.js +0 -0
- /package/dist/api/resources/contexts/resources/{admin → objects}/index.d.ts +0 -0
- /package/dist/api/resources/contexts/resources/{admin → objects}/index.js +0 -0
|
@@ -4,18 +4,20 @@ export interface ContextRelationshipBase {
|
|
|
4
4
|
/** The type of relationship. */
|
|
5
5
|
type?: ContextRelationshipBase.Type;
|
|
6
6
|
/** The field key used as the foreign key. */
|
|
7
|
-
|
|
7
|
+
foreign_key?: string;
|
|
8
8
|
/** Display name for the relationship. */
|
|
9
9
|
name?: string;
|
|
10
10
|
/** Description of the relationship. */
|
|
11
11
|
description?: string;
|
|
12
|
+
/** When the relationship was created. */
|
|
13
|
+
created_at?: string;
|
|
12
14
|
}
|
|
13
15
|
export declare namespace ContextRelationshipBase {
|
|
14
16
|
/** The type of relationship. */
|
|
15
17
|
const Type: {
|
|
16
|
-
readonly
|
|
17
|
-
readonly
|
|
18
|
-
readonly
|
|
18
|
+
readonly HasMany: "has_many";
|
|
19
|
+
readonly HasOne: "has_one";
|
|
20
|
+
readonly BelongsTo: "belongs_to";
|
|
19
21
|
};
|
|
20
22
|
type Type = (typeof Type)[keyof typeof Type];
|
|
21
23
|
}
|
|
@@ -6,8 +6,8 @@ var ContextRelationshipBase;
|
|
|
6
6
|
(function (ContextRelationshipBase) {
|
|
7
7
|
/** The type of relationship. */
|
|
8
8
|
ContextRelationshipBase.Type = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
HasMany: "has_many",
|
|
10
|
+
HasOne: "has_one",
|
|
11
|
+
BelongsTo: "belongs_to",
|
|
12
12
|
};
|
|
13
13
|
})(ContextRelationshipBase || (exports.ContextRelationshipBase = ContextRelationshipBase = {}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as Rulebricks from "../index.js";
|
|
2
2
|
export interface ContextRelationshipIncoming extends Rulebricks.ContextRelationshipBase {
|
|
3
|
-
|
|
3
|
+
source_context?: ContextRelationshipIncoming.SourceContext;
|
|
4
4
|
}
|
|
5
5
|
export declare namespace ContextRelationshipIncoming {
|
|
6
6
|
interface SourceContext {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as Rulebricks from "../index.js";
|
|
2
2
|
export interface ContextRelationshipOutgoing extends Rulebricks.ContextRelationshipBase {
|
|
3
|
-
|
|
3
|
+
target_context?: ContextRelationshipOutgoing.TargetContext;
|
|
4
4
|
}
|
|
5
5
|
export declare namespace ContextRelationshipOutgoing {
|
|
6
6
|
interface TargetContext {
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import type * as Rulebricks from "../index.js";
|
|
2
2
|
export interface ContextRelationshipsResponse {
|
|
3
|
+
/** The context these relationships belong to. */
|
|
4
|
+
context?: ContextRelationshipsResponse.Context;
|
|
3
5
|
outgoing?: Rulebricks.ContextRelationshipOutgoing[];
|
|
4
6
|
incoming?: Rulebricks.ContextRelationshipIncoming[];
|
|
5
7
|
}
|
|
8
|
+
export declare namespace ContextRelationshipsResponse {
|
|
9
|
+
/**
|
|
10
|
+
* The context these relationships belong to.
|
|
11
|
+
*/
|
|
12
|
+
interface Context {
|
|
13
|
+
id?: string;
|
|
14
|
+
name?: string;
|
|
15
|
+
slug?: string;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -11,15 +11,15 @@ export interface ContextSchemaField {
|
|
|
11
11
|
/** Data type of this field. 'function' type fields compute values dynamically. */
|
|
12
12
|
type?: ContextSchemaField.Type;
|
|
13
13
|
/** Default value for this field. */
|
|
14
|
-
|
|
14
|
+
default_value?: unknown | null;
|
|
15
15
|
/** Whether this field is derived from rule/flow outputs. */
|
|
16
16
|
derived?: boolean;
|
|
17
17
|
/** The rule ID that derives this field (if derived). */
|
|
18
|
-
|
|
18
|
+
source_rule?: string | null;
|
|
19
19
|
/** The flow ID that derives this field (if derived). */
|
|
20
|
-
|
|
20
|
+
source_flow?: string | null;
|
|
21
21
|
/** The source field key in the rule/flow output. */
|
|
22
|
-
|
|
22
|
+
source_field?: string | null;
|
|
23
23
|
}
|
|
24
24
|
export declare namespace ContextSchemaField {
|
|
25
25
|
/** Data type of this field. 'function' type fields compute values dynamically. */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as Rulebricks from "../index.js";
|
|
1
2
|
/**
|
|
2
3
|
* Rule/flow execution log entry with request, response, and decision details.
|
|
3
4
|
*/
|
|
@@ -10,14 +11,22 @@ export interface DecisionLog {
|
|
|
10
11
|
endpoint?: string | null;
|
|
11
12
|
/** HTTP status code of the response. */
|
|
12
13
|
status?: number | null;
|
|
13
|
-
/** The request payload sent to the rule/flow. */
|
|
14
|
-
request?:
|
|
15
|
-
/** The response payload returned by the rule/flow. */
|
|
16
|
-
response?:
|
|
14
|
+
/** The request payload sent to the rule/flow. Can be an object for single requests or an array for bulk operations. */
|
|
15
|
+
request?: DecisionLog.Request | null;
|
|
16
|
+
/** The response payload returned by the rule/flow. Can be an object for single responses or an array for bulk operations. */
|
|
17
|
+
response?: Rulebricks.DecisionLogResponse | null;
|
|
17
18
|
/** Decision details including matched conditions, rows, and evaluation metadata. */
|
|
18
19
|
decision?: Record<string, unknown> | null;
|
|
19
20
|
/** Error message if the execution failed. */
|
|
20
21
|
error?: string | null;
|
|
21
22
|
/** Whether the request/response data was truncated due to size limits. */
|
|
22
23
|
abbreviated?: boolean;
|
|
24
|
+
/** Accepts any additional properties */
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
}
|
|
27
|
+
export declare namespace DecisionLog {
|
|
28
|
+
/**
|
|
29
|
+
* The request payload sent to the rule/flow. Can be an object for single requests or an array for bulk operations.
|
|
30
|
+
*/
|
|
31
|
+
type Request = Record<string, unknown> | Record<string, unknown>[];
|
|
23
32
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type * as Rulebricks from "../index.js";
|
|
2
2
|
/**
|
|
3
|
-
* Response containing decision logs or a count.
|
|
3
|
+
* Response containing decision logs or a count. Returns either {data, cursor} for log queries OR {count} for count queries - these are mutually exclusive based on the count parameter.
|
|
4
4
|
*/
|
|
5
5
|
export interface DecisionLogResponse {
|
|
6
|
-
/** Array of decision log entries
|
|
6
|
+
/** Array of decision log entries. Only present when count parameter is not 'true'. */
|
|
7
7
|
data?: Rulebricks.DecisionLog[];
|
|
8
|
-
/** Pagination cursor for fetching the next page. Null if no more results. */
|
|
8
|
+
/** Pagination cursor for fetching the next page. Null if no more results. Only present when count parameter is not 'true'. */
|
|
9
9
|
cursor?: string | null;
|
|
10
|
-
/** Total count of matching logs
|
|
10
|
+
/** Total count of matching logs. Only present when count parameter is 'true'. When this is returned, data and cursor are not included. */
|
|
11
11
|
count?: number;
|
|
12
12
|
}
|
|
@@ -1,50 +1,63 @@
|
|
|
1
1
|
export interface ExportManifestPreviewResponse {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/** Whether the preview completed successfully. */
|
|
3
|
+
success?: boolean;
|
|
4
|
+
/** Preview of assets that would be exported. */
|
|
5
|
+
preview?: ExportManifestPreviewResponse.Preview;
|
|
6
|
+
/** Error message if preview failed. */
|
|
7
|
+
error?: string;
|
|
4
8
|
}
|
|
5
9
|
export declare namespace ExportManifestPreviewResponse {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Preview of assets that would be exported.
|
|
12
|
+
*/
|
|
13
|
+
interface Preview {
|
|
14
|
+
counts?: Preview.Counts;
|
|
15
|
+
items?: Preview.Items;
|
|
11
16
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
namespace Items {
|
|
19
|
-
type Rules = Rules.Item[];
|
|
20
|
-
namespace Rules {
|
|
21
|
-
interface Item {
|
|
22
|
-
id?: string;
|
|
23
|
-
name?: string;
|
|
24
|
-
slug?: string;
|
|
25
|
-
}
|
|
17
|
+
namespace Preview {
|
|
18
|
+
interface Counts {
|
|
19
|
+
rules?: number;
|
|
20
|
+
flows?: number;
|
|
21
|
+
contexts?: number;
|
|
22
|
+
values?: number;
|
|
26
23
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
slug?: string;
|
|
33
|
-
}
|
|
24
|
+
interface Items {
|
|
25
|
+
rules?: Items.Rules.Item[];
|
|
26
|
+
flows?: Items.Flows.Item[];
|
|
27
|
+
contexts?: Items.Contexts.Item[];
|
|
28
|
+
values?: Items.Values.Item[];
|
|
34
29
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
30
|
+
namespace Items {
|
|
31
|
+
type Rules = Rules.Item[];
|
|
32
|
+
namespace Rules {
|
|
33
|
+
interface Item {
|
|
34
|
+
id?: string;
|
|
35
|
+
name?: string;
|
|
36
|
+
slug?: string;
|
|
37
|
+
}
|
|
41
38
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
39
|
+
type Flows = Flows.Item[];
|
|
40
|
+
namespace Flows {
|
|
41
|
+
interface Item {
|
|
42
|
+
id?: string;
|
|
43
|
+
name?: string;
|
|
44
|
+
slug?: string;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
type Contexts = Contexts.Item[];
|
|
48
|
+
namespace Contexts {
|
|
49
|
+
interface Item {
|
|
50
|
+
id?: string;
|
|
51
|
+
name?: string;
|
|
52
|
+
slug?: string;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
type Values = Values.Item[];
|
|
56
|
+
namespace Values {
|
|
57
|
+
interface Item {
|
|
58
|
+
id?: string;
|
|
59
|
+
name?: string;
|
|
60
|
+
}
|
|
48
61
|
}
|
|
49
62
|
}
|
|
50
63
|
}
|
|
@@ -1,9 +1,30 @@
|
|
|
1
1
|
export interface ExportManifestResponse {
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
/** Whether the export completed successfully. */
|
|
3
|
+
success?: boolean;
|
|
4
|
+
/** The exported manifest data. */
|
|
5
|
+
manifest?: ExportManifestResponse.Manifest;
|
|
6
|
+
/** Error message if export failed. */
|
|
7
|
+
error?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare namespace ExportManifestResponse {
|
|
10
|
+
/**
|
|
11
|
+
* The exported manifest data.
|
|
12
|
+
*/
|
|
13
|
+
interface Manifest {
|
|
14
|
+
/** Manifest format version. */
|
|
15
|
+
version?: string;
|
|
16
|
+
/** Manifest name. */
|
|
17
|
+
name?: string;
|
|
18
|
+
/** Manifest description. */
|
|
19
|
+
description?: string;
|
|
20
|
+
exported_at?: string;
|
|
21
|
+
/** Exported contexts. */
|
|
22
|
+
contexts?: Record<string, unknown>[];
|
|
23
|
+
/** Exported dynamic values. */
|
|
24
|
+
values?: Record<string, unknown>[];
|
|
25
|
+
/** Exported rules. */
|
|
26
|
+
rules?: Record<string, unknown>[];
|
|
27
|
+
/** Exported flows. */
|
|
28
|
+
flows?: Record<string, unknown>[];
|
|
29
|
+
}
|
|
9
30
|
}
|
package/api/types/Folder.d.ts
CHANGED
|
@@ -5,6 +5,10 @@ export interface Folder {
|
|
|
5
5
|
name?: string;
|
|
6
6
|
/** Description of the folder. */
|
|
7
7
|
description?: string;
|
|
8
|
+
/** Timestamp of when the folder was created. */
|
|
9
|
+
created_at?: string;
|
|
8
10
|
/** Timestamp of when the folder was last updated. */
|
|
9
11
|
updated_at?: string;
|
|
12
|
+
/** User groups that can view this folder. */
|
|
13
|
+
user_groups?: string[];
|
|
10
14
|
}
|
|
@@ -1,38 +1,66 @@
|
|
|
1
1
|
export interface ImportManifestResponse {
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
|
|
2
|
+
/** Whether the import completed successfully. */
|
|
3
|
+
success?: boolean;
|
|
4
|
+
/** Assets that were created during import. */
|
|
5
|
+
created?: ImportManifestResponse.Created.Item[];
|
|
6
|
+
/** Assets that were updated during import. */
|
|
7
|
+
updated?: ImportManifestResponse.Updated.Item[];
|
|
8
|
+
/** Assets that were skipped during import. */
|
|
9
|
+
skipped?: ImportManifestResponse.Skipped.Item[];
|
|
8
10
|
/** Any errors encountered during import. */
|
|
9
11
|
errors?: ImportManifestResponse.Errors.Item[];
|
|
12
|
+
/** Non-fatal warnings from import validation. */
|
|
13
|
+
warnings?: string[];
|
|
14
|
+
/** IDs of any organizational folders created during import. */
|
|
15
|
+
organization_created?: ImportManifestResponse.OrganizationCreated | null;
|
|
10
16
|
}
|
|
11
17
|
export declare namespace ImportManifestResponse {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
type Created = Created.Item[];
|
|
19
|
+
namespace Created {
|
|
20
|
+
interface Item {
|
|
21
|
+
/** Asset type (context, value, rule, flow, relationship). */
|
|
22
|
+
type?: string;
|
|
23
|
+
/** Stable ID of asset. */
|
|
24
|
+
stable_id?: string;
|
|
25
|
+
/** Database ID of asset. */
|
|
26
|
+
db_id?: string;
|
|
27
|
+
/** Import status. */
|
|
28
|
+
status?: string;
|
|
29
|
+
}
|
|
20
30
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
type Updated = Updated.Item[];
|
|
32
|
+
namespace Updated {
|
|
33
|
+
interface Item {
|
|
34
|
+
type?: string;
|
|
35
|
+
stable_id?: string;
|
|
36
|
+
db_id?: string;
|
|
37
|
+
status?: string;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
type Skipped = Skipped.Item[];
|
|
41
|
+
namespace Skipped {
|
|
42
|
+
interface Item {
|
|
43
|
+
type?: string;
|
|
44
|
+
stable_id?: string;
|
|
45
|
+
status?: string;
|
|
46
|
+
reason?: string;
|
|
47
|
+
}
|
|
29
48
|
}
|
|
30
49
|
type Errors = Errors.Item[];
|
|
31
50
|
namespace Errors {
|
|
32
51
|
interface Item {
|
|
33
52
|
type?: string;
|
|
34
|
-
|
|
35
|
-
|
|
53
|
+
stable_id?: string;
|
|
54
|
+
status?: string;
|
|
55
|
+
reason?: string;
|
|
36
56
|
}
|
|
37
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* IDs of any organizational folders created during import.
|
|
60
|
+
*/
|
|
61
|
+
interface OrganizationCreated {
|
|
62
|
+
entity_set_id?: string | null;
|
|
63
|
+
rule_tag_id?: string | null;
|
|
64
|
+
flow_tag_id?: string | null;
|
|
65
|
+
}
|
|
38
66
|
}
|
|
@@ -10,9 +10,9 @@ export interface SchemaField {
|
|
|
10
10
|
/** Data type of this field. */
|
|
11
11
|
type?: SchemaField.Type;
|
|
12
12
|
/** Default value for this field. */
|
|
13
|
-
|
|
13
|
+
default_value?: SchemaField.DefaultValue | null;
|
|
14
14
|
/** Computed default value for this field. */
|
|
15
|
-
|
|
15
|
+
default_computed_value?: string | null;
|
|
16
16
|
/** Transformation expression to apply to this field. */
|
|
17
17
|
transform?: string;
|
|
18
18
|
}
|
package/api/types/Test.d.ts
CHANGED
|
@@ -9,14 +9,14 @@ export interface Test {
|
|
|
9
9
|
response: Record<string, unknown>;
|
|
10
10
|
/** Indicates whether the test is critical. */
|
|
11
11
|
critical: boolean;
|
|
12
|
-
/** Indicates if the test resulted in an error. */
|
|
13
|
-
error
|
|
14
|
-
/** Indicates if the test was successful. */
|
|
15
|
-
success
|
|
12
|
+
/** Indicates if the test resulted in an error. Null if test has not been executed. */
|
|
13
|
+
error?: boolean | null;
|
|
14
|
+
/** Indicates if the test was successful. Null if test has not been executed. */
|
|
15
|
+
success?: boolean | null;
|
|
16
16
|
/** The state of the test after execution. */
|
|
17
|
-
|
|
17
|
+
test_state?: Test.TestState | null;
|
|
18
18
|
/** The timestamp when the test was last executed. */
|
|
19
|
-
|
|
19
|
+
last_executed?: string | null;
|
|
20
20
|
}
|
|
21
21
|
export declare namespace Test {
|
|
22
22
|
/**
|
|
@@ -29,10 +29,10 @@ export declare namespace Test {
|
|
|
29
29
|
response?: Record<string, unknown> | null;
|
|
30
30
|
conditions?: Record<string, unknown>[];
|
|
31
31
|
/** HTTP status code returned */
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
http_status?: number;
|
|
33
|
+
success_idxs?: number[];
|
|
34
34
|
/** Error message or flag indicating if evaluation error occurred */
|
|
35
|
-
|
|
35
|
+
evaluation_error?: TestState.EvaluationError;
|
|
36
36
|
}
|
|
37
37
|
namespace TestState {
|
|
38
38
|
/**
|
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Response after updating a context.
|
|
3
|
+
*/
|
|
4
|
+
export interface UpdateContextResponse {
|
|
5
|
+
/** The unique identifier of the updated context. */
|
|
6
|
+
id?: string;
|
|
7
|
+
/** The slug of the updated context. */
|
|
8
|
+
slug?: string;
|
|
9
|
+
/** The name of the updated context. */
|
|
10
|
+
name?: string;
|
|
11
|
+
/** Timestamp of when the context was updated. */
|
|
12
|
+
updated_at?: string;
|
|
13
|
+
}
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
export interface UsageStatistics {
|
|
2
2
|
/** The current plan of the organization. */
|
|
3
3
|
plan?: string;
|
|
4
|
-
/** The start date of the current monthly period. */
|
|
4
|
+
/** The start date of the current monthly period (MM-DD-YYYY). */
|
|
5
5
|
monthly_period_start?: string;
|
|
6
|
-
/** The end date of the current monthly period. */
|
|
6
|
+
/** The end date of the current monthly period (MM-DD-YYYY). */
|
|
7
7
|
monthly_period_end?: string;
|
|
8
8
|
/** The number of rule executions used this month. */
|
|
9
9
|
monthly_executions_usage?: number;
|
|
10
|
-
/** The total number of rule executions allowed this month. */
|
|
10
|
+
/** The total number of rule executions allowed this month. -1 indicates unlimited. */
|
|
11
11
|
monthly_executions_limit?: number;
|
|
12
|
-
/** The number of rule executions remaining this month. */
|
|
12
|
+
/** The number of rule executions remaining this month. -1 indicates unlimited. */
|
|
13
13
|
monthly_executions_remaining?: number;
|
|
14
|
+
/** Whether the plan has unlimited executions (true when monthly_executions_limit is -1). */
|
|
15
|
+
unlimited_plan?: boolean;
|
|
16
|
+
/** Number of days remaining in the current billing period. */
|
|
17
|
+
days_remaining_in_period?: number;
|
|
18
|
+
/** Average number of executions per day in the current period. */
|
|
19
|
+
daily_average_usage?: number;
|
|
14
20
|
}
|
package/api/types/UserGroup.d.ts
CHANGED
package/api/types/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from "./BulkRuleResponseItem.js";
|
|
2
|
+
export * from "./CascadeContextRequest.js";
|
|
2
3
|
export * from "./CascadeContextResponse.js";
|
|
3
4
|
export * from "./CascadeResult.js";
|
|
4
5
|
export * from "./ContextBase.js";
|
|
@@ -8,6 +9,7 @@ export * from "./ContextInstanceHistoryEntry.js";
|
|
|
8
9
|
export * from "./ContextInstancePendingEvaluation.js";
|
|
9
10
|
export * from "./ContextInstancePendingResponse.js";
|
|
10
11
|
export * from "./ContextInstanceState.js";
|
|
12
|
+
export * from "./ContextListItem.js";
|
|
11
13
|
export * from "./ContextListResponse.js";
|
|
12
14
|
export * from "./ContextRelationshipBase.js";
|
|
13
15
|
export * from "./ContextRelationshipIncoming.js";
|
|
@@ -46,7 +48,9 @@ export * from "./RuleExport.js";
|
|
|
46
48
|
export * from "./RuleListResponse.js";
|
|
47
49
|
export * from "./RuleUsage.js";
|
|
48
50
|
export * from "./SchemaField.js";
|
|
51
|
+
export * from "./SolveContextFlowRequest.js";
|
|
49
52
|
export * from "./SolveContextFlowResponse.js";
|
|
53
|
+
export * from "./SolveContextRuleRequest.js";
|
|
50
54
|
export * from "./SolveContextRuleResponse.js";
|
|
51
55
|
export * from "./SubmitContextDataRequest.js";
|
|
52
56
|
export * from "./SubmitContextDataResponse.js";
|
package/api/types/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./BulkRuleResponseItem.js"), exports);
|
|
18
|
+
__exportStar(require("./CascadeContextRequest.js"), exports);
|
|
18
19
|
__exportStar(require("./CascadeContextResponse.js"), exports);
|
|
19
20
|
__exportStar(require("./CascadeResult.js"), exports);
|
|
20
21
|
__exportStar(require("./ContextBase.js"), exports);
|
|
@@ -24,6 +25,7 @@ __exportStar(require("./ContextInstanceHistoryEntry.js"), exports);
|
|
|
24
25
|
__exportStar(require("./ContextInstancePendingEvaluation.js"), exports);
|
|
25
26
|
__exportStar(require("./ContextInstancePendingResponse.js"), exports);
|
|
26
27
|
__exportStar(require("./ContextInstanceState.js"), exports);
|
|
28
|
+
__exportStar(require("./ContextListItem.js"), exports);
|
|
27
29
|
__exportStar(require("./ContextListResponse.js"), exports);
|
|
28
30
|
__exportStar(require("./ContextRelationshipBase.js"), exports);
|
|
29
31
|
__exportStar(require("./ContextRelationshipIncoming.js"), exports);
|
|
@@ -62,7 +64,9 @@ __exportStar(require("./RuleExport.js"), exports);
|
|
|
62
64
|
__exportStar(require("./RuleListResponse.js"), exports);
|
|
63
65
|
__exportStar(require("./RuleUsage.js"), exports);
|
|
64
66
|
__exportStar(require("./SchemaField.js"), exports);
|
|
67
|
+
__exportStar(require("./SolveContextFlowRequest.js"), exports);
|
|
65
68
|
__exportStar(require("./SolveContextFlowResponse.js"), exports);
|
|
69
|
+
__exportStar(require("./SolveContextRuleRequest.js"), exports);
|
|
66
70
|
__exportStar(require("./SolveContextRuleResponse.js"), exports);
|
|
67
71
|
__exportStar(require("./SubmitContextDataRequest.js"), exports);
|
|
68
72
|
__exportStar(require("./SubmitContextDataResponse.js"), exports);
|
|
@@ -33,7 +33,7 @@ export declare class AssetsClient {
|
|
|
33
33
|
getUsage(requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<Rulebricks.UsageStatistics>;
|
|
34
34
|
private __getUsage;
|
|
35
35
|
/**
|
|
36
|
-
* Import rules, flows, contexts, and values from an
|
|
36
|
+
* Import rules, flows, contexts, and values from an Rulebricks manifest file (*.rbm).
|
|
37
37
|
*
|
|
38
38
|
* @param {Rulebricks.ImportManifestRequest} request
|
|
39
39
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -42,7 +42,7 @@ export declare class AssetsClient {
|
|
|
42
42
|
* @throws {@link Rulebricks.InternalServerError}
|
|
43
43
|
*
|
|
44
44
|
* @example
|
|
45
|
-
* await client.assets.
|
|
45
|
+
* await client.assets.importRbm({
|
|
46
46
|
* manifest: {
|
|
47
47
|
* version: "1.0",
|
|
48
48
|
* rules: [{
|
|
@@ -53,22 +53,22 @@ export declare class AssetsClient {
|
|
|
53
53
|
* "name": "Onboarding Flow",
|
|
54
54
|
* "slug": "onboarding-flow"
|
|
55
55
|
* }],
|
|
56
|
-
*
|
|
56
|
+
* entities: [{
|
|
57
57
|
* "name": "Customer",
|
|
58
58
|
* "slug": "customer"
|
|
59
59
|
* }],
|
|
60
60
|
* values: [{
|
|
61
|
-
* "
|
|
61
|
+
* "name": "tax_rate",
|
|
62
62
|
* "value": 0.08
|
|
63
63
|
* }]
|
|
64
64
|
* },
|
|
65
|
-
*
|
|
65
|
+
* conflict_strategy: "update"
|
|
66
66
|
* })
|
|
67
67
|
*/
|
|
68
|
-
|
|
69
|
-
private
|
|
68
|
+
importRbm(request: Rulebricks.ImportManifestRequest, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<Rulebricks.ImportManifestResponse>;
|
|
69
|
+
private __importRbm;
|
|
70
70
|
/**
|
|
71
|
-
* Export selected rules, flows, contexts, and values to an
|
|
71
|
+
* Export selected rules, flows, contexts, and values to an Rulebricks manifest file (*.rbm).
|
|
72
72
|
*
|
|
73
73
|
* @param {Rulebricks.ExportManifestRequest} request
|
|
74
74
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -77,13 +77,12 @@ export declare class AssetsClient {
|
|
|
77
77
|
* @throws {@link Rulebricks.InternalServerError}
|
|
78
78
|
*
|
|
79
79
|
* @example
|
|
80
|
-
* await client.assets.
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
* values: ["tax_rate", "discount_threshold"]
|
|
80
|
+
* await client.assets.exportRbm({
|
|
81
|
+
* root_type: "rule",
|
|
82
|
+
* root_ids: ["pricing-rule", "eligibility-check"],
|
|
83
|
+
* include_downstream: false
|
|
85
84
|
* })
|
|
86
85
|
*/
|
|
87
|
-
|
|
88
|
-
private
|
|
86
|
+
exportRbm(request: Rulebricks.ExportManifestRequest, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<Rulebricks.ExportRbmAssetsResponse>;
|
|
87
|
+
private __exportRbm;
|
|
89
88
|
}
|