@rulebricks/sdk 2.0.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/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/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/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/RuleDetail.d.ts +6 -2
- package/api/types/RuleImportConditionRow.d.ts +11 -0
- package/api/types/RuleImportPayload.d.ts +60 -0
- package/api/types/RuleImportRequestCell.d.ts +11 -0
- package/api/types/RuleImportResponseCell.d.ts +8 -0
- package/api/types/RuleImportRowSettings.d.ts +17 -0
- package/api/types/RuleImportSchemaField.d.ts +36 -0
- package/api/types/RuleImportSchemaField.js +17 -0
- 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/SolveContextRuleRequest.js +3 -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 +10 -0
- package/api/types/index.js +10 -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/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/resources/assets/types/ExportRbmAssetsResponse.d.ts +2 -0
- package/dist/api/resources/assets/types/ExportRbmAssetsResponse.js +3 -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/dist/api/resources/contexts/client/requests/CascadeContextsRequest.js +3 -0
- package/{api/resources/contexts/client/requests/DeleteInstanceContextsRequest.d.ts → dist/api/resources/contexts/client/requests/DeleteContextsRequest.d.ts} +1 -1
- package/dist/api/resources/contexts/client/requests/DeleteContextsRequest.js +3 -0
- 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/ExecuteContextsRequest.js +3 -0
- 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/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/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 +10 -0
- package/dist/api/types/index.js +10 -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/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/DeleteInstanceContextsRequest.js → api/types/RuleImportConditionRow.js} +0 -0
- /package/{dist/api/resources/contexts/client/requests/GetInstanceContextsRequest.js → api/types/RuleImportPayload.js} +0 -0
- /package/{dist/api/resources/contexts/client/requests/SolveContextFlowRequest.js → api/types/RuleImportRequestCell.js} +0 -0
- /package/{dist/api/resources/contexts/client/requests/SolveContextRuleRequest.js → api/types/RuleImportResponseCell.js} +0 -0
- /package/{dist/api/resources/contexts/resources/admin/client/requests/DeleteAdminRequest.js → api/types/RuleImportRowSettings.js} +0 -0
- /package/{dist/api/resources/contexts/resources/admin/client/requests/GetAdminRequest.js → api/types/SolveContextFlowRequest.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
|
@@ -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
|
}
|
|
@@ -4,12 +4,16 @@ export interface RuleDetail extends Rulebricks.RuleBase {
|
|
|
4
4
|
created_at?: string;
|
|
5
5
|
/** The date this rule was last updated. */
|
|
6
6
|
updated_at?: string;
|
|
7
|
+
/** Whether the rule is currently published. */
|
|
8
|
+
published?: boolean;
|
|
9
|
+
/** Optional user-defined metadata for API-first integrations. */
|
|
10
|
+
metadata?: Record<string, unknown>;
|
|
7
11
|
folder?: Rulebricks.Folder;
|
|
8
12
|
/** The context this rule is bound to (if any). Rules bound to a context have their inputs/outputs mapped to context fields. */
|
|
9
13
|
context?: RuleDetail.Context | null;
|
|
10
|
-
/** The
|
|
14
|
+
/** The request schema for the rule. Uses published schema when published, otherwise draft schema. */
|
|
11
15
|
request_schema?: Rulebricks.SchemaField[];
|
|
12
|
-
/** The
|
|
16
|
+
/** The response schema for the rule. Uses published schema when published, otherwise draft schema. */
|
|
13
17
|
response_schema?: Rulebricks.SchemaField[];
|
|
14
18
|
}
|
|
15
19
|
export declare namespace RuleDetail {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as Rulebricks from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* A single rule row containing request conditions and response output.
|
|
4
|
+
*/
|
|
5
|
+
export interface RuleImportConditionRow {
|
|
6
|
+
/** Request-side cells keyed by request schema field key. */
|
|
7
|
+
request: Record<string, Rulebricks.RuleImportRequestCell>;
|
|
8
|
+
/** Response-side cells keyed by response schema field key. */
|
|
9
|
+
response: Record<string, Rulebricks.RuleImportResponseCell>;
|
|
10
|
+
settings: Rulebricks.RuleImportRowSettings;
|
|
11
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type * as Rulebricks from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Rule object accepted by /admin/rules/import. Existing rule IDs allow partial updates; creating a new rule ID requires the full legacy import shape.
|
|
4
|
+
*/
|
|
5
|
+
export interface RuleImportPayload {
|
|
6
|
+
/** Rule ID to create or update. */
|
|
7
|
+
id: string;
|
|
8
|
+
/** Optional stable ID for cross-workspace import/export identity. */
|
|
9
|
+
stable_id?: string;
|
|
10
|
+
/** Rule slug. */
|
|
11
|
+
slug?: string;
|
|
12
|
+
/** Rule name. */
|
|
13
|
+
name?: string;
|
|
14
|
+
/** Rule description. */
|
|
15
|
+
description?: string;
|
|
16
|
+
/** Creation timestamp. */
|
|
17
|
+
createdAt?: string;
|
|
18
|
+
/** Last update timestamp. */
|
|
19
|
+
updatedAt?: string;
|
|
20
|
+
/** Current publish state. Set with `_publish`/`_unpublish` to control publish transitions on import. */
|
|
21
|
+
published?: boolean;
|
|
22
|
+
/** Optional user-defined metadata for external IDs or implementation mappings. */
|
|
23
|
+
metadata?: Record<string, unknown>;
|
|
24
|
+
/** If true, backend publishes this rule and snapshots published_* fields from draft fields. */
|
|
25
|
+
_publish?: boolean;
|
|
26
|
+
/** If true, backend unpublishes this rule. */
|
|
27
|
+
_unpublish?: boolean;
|
|
28
|
+
/** Draft request schema. */
|
|
29
|
+
requestSchema?: Rulebricks.RuleImportSchemaField[];
|
|
30
|
+
/** Draft response schema. */
|
|
31
|
+
responseSchema?: Rulebricks.RuleImportSchemaField[];
|
|
32
|
+
/** Sample request JSON. */
|
|
33
|
+
sampleRequest?: Record<string, unknown>;
|
|
34
|
+
/** Request payload used by editor test tab. */
|
|
35
|
+
testRequest?: Record<string, unknown>;
|
|
36
|
+
/** Sample response JSON. */
|
|
37
|
+
sampleResponse?: Record<string, unknown>;
|
|
38
|
+
/** Draft condition rows. */
|
|
39
|
+
conditions?: Rulebricks.RuleImportConditionRow[];
|
|
40
|
+
/** Optional row grouping definitions. */
|
|
41
|
+
groups?: Record<string, Record<string, unknown>>;
|
|
42
|
+
/** Optional rule-level settings. */
|
|
43
|
+
settings?: Record<string, unknown>;
|
|
44
|
+
/** Optional rule test suite. */
|
|
45
|
+
testSuite?: Record<string, unknown>[];
|
|
46
|
+
/** Rule history entries. */
|
|
47
|
+
history?: Record<string, unknown>[];
|
|
48
|
+
/** Publish timestamp. */
|
|
49
|
+
publishedAt?: string | null;
|
|
50
|
+
/** Optional published request schema override. */
|
|
51
|
+
published_requestSchema?: Rulebricks.RuleImportSchemaField[] | null;
|
|
52
|
+
/** Optional published response schema override. */
|
|
53
|
+
published_responseSchema?: Rulebricks.RuleImportSchemaField[] | null;
|
|
54
|
+
/** Optional published conditions override. */
|
|
55
|
+
published_conditions?: Rulebricks.RuleImportConditionRow[] | null;
|
|
56
|
+
/** Optional published groups override. */
|
|
57
|
+
published_groups?: Record<string, Record<string, unknown> | null> | null;
|
|
58
|
+
/** Accepts any additional properties */
|
|
59
|
+
[key: string]: any;
|
|
60
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A request cell in a condition row.
|
|
3
|
+
*/
|
|
4
|
+
export interface RuleImportRequestCell {
|
|
5
|
+
/** Operator name for this request comparison. */
|
|
6
|
+
op: string;
|
|
7
|
+
/** Operator arguments. */
|
|
8
|
+
args: unknown[];
|
|
9
|
+
/** Accepts any additional properties */
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Execution settings for a condition row.
|
|
3
|
+
*/
|
|
4
|
+
export interface RuleImportRowSettings {
|
|
5
|
+
/** Whether this row is active. */
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
/** Optional group ID for grouped aggregation. */
|
|
8
|
+
groupId: string | null;
|
|
9
|
+
/** Row priority when multiple rows match. */
|
|
10
|
+
priority: number;
|
|
11
|
+
/** Optional schedule constraints for this row. */
|
|
12
|
+
schedule: Record<string, unknown>[];
|
|
13
|
+
/** When true, request cells in this row are evaluated with OR semantics. */
|
|
14
|
+
or?: boolean;
|
|
15
|
+
/** Accepts any additional properties */
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A request or response schema field used when importing a rule.
|
|
3
|
+
*/
|
|
4
|
+
export interface RuleImportSchemaField {
|
|
5
|
+
/** Unique key for this field. */
|
|
6
|
+
key: string;
|
|
7
|
+
/** Whether this field is shown in the editor table. */
|
|
8
|
+
show: boolean;
|
|
9
|
+
/** Display name for this field. */
|
|
10
|
+
name: string;
|
|
11
|
+
/** Optional field description. */
|
|
12
|
+
description?: string;
|
|
13
|
+
/** Data type for this field. */
|
|
14
|
+
type: RuleImportSchemaField.Type;
|
|
15
|
+
/** Optional default value for this field. */
|
|
16
|
+
defaultValue?: unknown | null;
|
|
17
|
+
/** When true, this field should only accept values from a value collection. */
|
|
18
|
+
valuesOnly?: boolean;
|
|
19
|
+
/** Prefix used to scope available dynamic values for this field. */
|
|
20
|
+
valuesPrefix?: string;
|
|
21
|
+
/** Accepts any additional properties */
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
}
|
|
24
|
+
export declare namespace RuleImportSchemaField {
|
|
25
|
+
/** Data type for this field. */
|
|
26
|
+
const Type: {
|
|
27
|
+
readonly String: "string";
|
|
28
|
+
readonly Number: "number";
|
|
29
|
+
readonly Boolean: "boolean";
|
|
30
|
+
readonly Date: "date";
|
|
31
|
+
readonly List: "list";
|
|
32
|
+
readonly Object: "object";
|
|
33
|
+
readonly Function: "function";
|
|
34
|
+
};
|
|
35
|
+
type Type = (typeof Type)[keyof typeof Type];
|
|
36
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.RuleImportSchemaField = void 0;
|
|
5
|
+
var RuleImportSchemaField;
|
|
6
|
+
(function (RuleImportSchemaField) {
|
|
7
|
+
/** Data type for this field. */
|
|
8
|
+
RuleImportSchemaField.Type = {
|
|
9
|
+
String: "string",
|
|
10
|
+
Number: "number",
|
|
11
|
+
Boolean: "boolean",
|
|
12
|
+
Date: "date",
|
|
13
|
+
List: "list",
|
|
14
|
+
Object: "object",
|
|
15
|
+
Function: "function",
|
|
16
|
+
};
|
|
17
|
+
})(RuleImportSchemaField || (exports.RuleImportSchemaField = RuleImportSchemaField = {}));
|
|
@@ -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";
|
|
@@ -43,10 +45,18 @@ export * from "./ParallelSolveResponse.js";
|
|
|
43
45
|
export * from "./RuleBase.js";
|
|
44
46
|
export * from "./RuleDetail.js";
|
|
45
47
|
export * from "./RuleExport.js";
|
|
48
|
+
export * from "./RuleImportConditionRow.js";
|
|
49
|
+
export * from "./RuleImportPayload.js";
|
|
50
|
+
export * from "./RuleImportRequestCell.js";
|
|
51
|
+
export * from "./RuleImportResponseCell.js";
|
|
52
|
+
export * from "./RuleImportRowSettings.js";
|
|
53
|
+
export * from "./RuleImportSchemaField.js";
|
|
46
54
|
export * from "./RuleListResponse.js";
|
|
47
55
|
export * from "./RuleUsage.js";
|
|
48
56
|
export * from "./SchemaField.js";
|
|
57
|
+
export * from "./SolveContextFlowRequest.js";
|
|
49
58
|
export * from "./SolveContextFlowResponse.js";
|
|
59
|
+
export * from "./SolveContextRuleRequest.js";
|
|
50
60
|
export * from "./SolveContextRuleResponse.js";
|
|
51
61
|
export * from "./SubmitContextDataRequest.js";
|
|
52
62
|
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);
|
|
@@ -59,10 +61,18 @@ __exportStar(require("./ParallelSolveResponse.js"), exports);
|
|
|
59
61
|
__exportStar(require("./RuleBase.js"), exports);
|
|
60
62
|
__exportStar(require("./RuleDetail.js"), exports);
|
|
61
63
|
__exportStar(require("./RuleExport.js"), exports);
|
|
64
|
+
__exportStar(require("./RuleImportConditionRow.js"), exports);
|
|
65
|
+
__exportStar(require("./RuleImportPayload.js"), exports);
|
|
66
|
+
__exportStar(require("./RuleImportRequestCell.js"), exports);
|
|
67
|
+
__exportStar(require("./RuleImportResponseCell.js"), exports);
|
|
68
|
+
__exportStar(require("./RuleImportRowSettings.js"), exports);
|
|
69
|
+
__exportStar(require("./RuleImportSchemaField.js"), exports);
|
|
62
70
|
__exportStar(require("./RuleListResponse.js"), exports);
|
|
63
71
|
__exportStar(require("./RuleUsage.js"), exports);
|
|
64
72
|
__exportStar(require("./SchemaField.js"), exports);
|
|
73
|
+
__exportStar(require("./SolveContextFlowRequest.js"), exports);
|
|
65
74
|
__exportStar(require("./SolveContextFlowResponse.js"), exports);
|
|
75
|
+
__exportStar(require("./SolveContextRuleRequest.js"), exports);
|
|
66
76
|
__exportStar(require("./SolveContextRuleResponse.js"), exports);
|
|
67
77
|
__exportStar(require("./SubmitContextDataRequest.js"), exports);
|
|
68
78
|
__exportStar(require("./SubmitContextDataResponse.js"), exports);
|