@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
|
@@ -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
|
}
|
|
@@ -114,7 +114,7 @@ class AssetsClient {
|
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
116
|
/**
|
|
117
|
-
* Import rules, flows, contexts, and values from an
|
|
117
|
+
* Import rules, flows, contexts, and values from an Rulebricks manifest file (*.rbm).
|
|
118
118
|
*
|
|
119
119
|
* @param {Rulebricks.ImportManifestRequest} request
|
|
120
120
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -123,7 +123,7 @@ class AssetsClient {
|
|
|
123
123
|
* @throws {@link Rulebricks.InternalServerError}
|
|
124
124
|
*
|
|
125
125
|
* @example
|
|
126
|
-
* await client.assets.
|
|
126
|
+
* await client.assets.importRbm({
|
|
127
127
|
* manifest: {
|
|
128
128
|
* version: "1.0",
|
|
129
129
|
* rules: [{
|
|
@@ -134,22 +134,22 @@ class AssetsClient {
|
|
|
134
134
|
* "name": "Onboarding Flow",
|
|
135
135
|
* "slug": "onboarding-flow"
|
|
136
136
|
* }],
|
|
137
|
-
*
|
|
137
|
+
* entities: [{
|
|
138
138
|
* "name": "Customer",
|
|
139
139
|
* "slug": "customer"
|
|
140
140
|
* }],
|
|
141
141
|
* values: [{
|
|
142
|
-
* "
|
|
142
|
+
* "name": "tax_rate",
|
|
143
143
|
* "value": 0.08
|
|
144
144
|
* }]
|
|
145
145
|
* },
|
|
146
|
-
*
|
|
146
|
+
* conflict_strategy: "update"
|
|
147
147
|
* })
|
|
148
148
|
*/
|
|
149
|
-
|
|
150
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
149
|
+
importRbm(request, requestOptions) {
|
|
150
|
+
return core.HttpResponsePromise.fromPromise(this.__importRbm(request, requestOptions));
|
|
151
151
|
}
|
|
152
|
-
|
|
152
|
+
__importRbm(request, requestOptions) {
|
|
153
153
|
return __awaiter(this, void 0, void 0, function* () {
|
|
154
154
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
155
155
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
@@ -189,7 +189,7 @@ class AssetsClient {
|
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
191
|
/**
|
|
192
|
-
* Export selected rules, flows, contexts, and values to an
|
|
192
|
+
* Export selected rules, flows, contexts, and values to an Rulebricks manifest file (*.rbm).
|
|
193
193
|
*
|
|
194
194
|
* @param {Rulebricks.ExportManifestRequest} request
|
|
195
195
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -198,18 +198,17 @@ class AssetsClient {
|
|
|
198
198
|
* @throws {@link Rulebricks.InternalServerError}
|
|
199
199
|
*
|
|
200
200
|
* @example
|
|
201
|
-
* await client.assets.
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
* values: ["tax_rate", "discount_threshold"]
|
|
201
|
+
* await client.assets.exportRbm({
|
|
202
|
+
* root_type: "rule",
|
|
203
|
+
* root_ids: ["pricing-rule", "eligibility-check"],
|
|
204
|
+
* include_downstream: false
|
|
206
205
|
* })
|
|
207
206
|
*/
|
|
208
|
-
|
|
209
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
207
|
+
exportRbm(request, requestOptions) {
|
|
208
|
+
return core.HttpResponsePromise.fromPromise(this.__exportRbm(request, requestOptions));
|
|
210
209
|
}
|
|
211
|
-
|
|
212
|
-
return __awaiter(this,
|
|
210
|
+
__exportRbm(request, requestOptions) {
|
|
211
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
213
212
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
214
213
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
215
214
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
@@ -1,23 +1,32 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* values: ["tax_rate", "discount_threshold"]
|
|
4
|
+
* root_type: "rule",
|
|
5
|
+
* root_ids: ["pricing-rule", "eligibility-check"],
|
|
6
|
+
* include_downstream: false
|
|
8
7
|
* }
|
|
9
8
|
*/
|
|
10
9
|
export interface ExportManifestRequest {
|
|
11
|
-
/**
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
|
|
10
|
+
/** The type of root asset to export. All dependencies will be included. */
|
|
11
|
+
root_type: ExportManifestRequest.RootType;
|
|
12
|
+
/** Array of IDs for the root assets to export. Dependencies are automatically resolved. */
|
|
13
|
+
root_ids: string[];
|
|
14
|
+
/** For context exports, whether to include rules and flows bound to the context. */
|
|
15
|
+
include_downstream?: boolean;
|
|
16
|
+
/** Optional name for the exported manifest. */
|
|
17
|
+
manifest_name?: string;
|
|
18
|
+
/** Optional description for the exported manifest. */
|
|
19
|
+
manifest_description?: string;
|
|
20
|
+
/** If true, returns a preview of what would be exported without the full data. */
|
|
21
|
+
preview_only?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare namespace ExportManifestRequest {
|
|
24
|
+
/** The type of root asset to export. All dependencies will be included. */
|
|
25
|
+
const RootType: {
|
|
26
|
+
readonly Rule: "rule";
|
|
27
|
+
readonly Flow: "flow";
|
|
28
|
+
readonly Context: "context";
|
|
29
|
+
readonly Value: "value";
|
|
30
|
+
};
|
|
31
|
+
type RootType = (typeof RootType)[keyof typeof RootType];
|
|
23
32
|
}
|
|
@@ -1,3 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ExportManifestRequest = void 0;
|
|
5
|
+
var ExportManifestRequest;
|
|
6
|
+
(function (ExportManifestRequest) {
|
|
7
|
+
/** The type of root asset to export. All dependencies will be included. */
|
|
8
|
+
ExportManifestRequest.RootType = {
|
|
9
|
+
Rule: "rule",
|
|
10
|
+
Flow: "flow",
|
|
11
|
+
Context: "context",
|
|
12
|
+
Value: "value",
|
|
13
|
+
};
|
|
14
|
+
})(ExportManifestRequest || (exports.ExportManifestRequest = ExportManifestRequest = {}));
|
|
@@ -11,23 +11,27 @@
|
|
|
11
11
|
* "name": "Onboarding Flow",
|
|
12
12
|
* "slug": "onboarding-flow"
|
|
13
13
|
* }],
|
|
14
|
-
*
|
|
14
|
+
* entities: [{
|
|
15
15
|
* "name": "Customer",
|
|
16
16
|
* "slug": "customer"
|
|
17
17
|
* }],
|
|
18
18
|
* values: [{
|
|
19
|
-
* "
|
|
19
|
+
* "name": "tax_rate",
|
|
20
20
|
* "value": 0.08
|
|
21
21
|
* }]
|
|
22
22
|
* },
|
|
23
|
-
*
|
|
23
|
+
* conflict_strategy: "update"
|
|
24
24
|
* }
|
|
25
25
|
*/
|
|
26
26
|
export interface ImportManifestRequest {
|
|
27
27
|
/** The RBM manifest object containing assets to import. */
|
|
28
28
|
manifest: ImportManifestRequest.Manifest;
|
|
29
|
-
/**
|
|
30
|
-
|
|
29
|
+
/** How to handle conflicts with existing assets. 'update' overwrites, 'skip' ignores, 'error' fails. */
|
|
30
|
+
conflict_strategy?: ImportManifestRequest.ConflictStrategy;
|
|
31
|
+
/** Optional folder name to place imported assets into. Created if it doesn't exist. */
|
|
32
|
+
target_folder_name?: string;
|
|
33
|
+
/** Optional mapping for legacy flow imports to reuse existing rules. */
|
|
34
|
+
legacy_rule_mapping?: Record<string, ImportManifestRequest.LegacyRuleMapping.Value>;
|
|
31
35
|
}
|
|
32
36
|
export declare namespace ImportManifestRequest {
|
|
33
37
|
/**
|
|
@@ -40,9 +44,29 @@ export declare namespace ImportManifestRequest {
|
|
|
40
44
|
rules?: Record<string, unknown>[];
|
|
41
45
|
/** Flows to import. */
|
|
42
46
|
flows?: Record<string, unknown>[];
|
|
43
|
-
/** Contexts
|
|
44
|
-
|
|
47
|
+
/** Contexts to import. */
|
|
48
|
+
entities?: Record<string, unknown>[];
|
|
45
49
|
/** Dynamic values to import. */
|
|
46
50
|
values?: Record<string, unknown>[];
|
|
47
51
|
}
|
|
52
|
+
/** How to handle conflicts with existing assets. 'update' overwrites, 'skip' ignores, 'error' fails. */
|
|
53
|
+
const ConflictStrategy: {
|
|
54
|
+
readonly Update: "update";
|
|
55
|
+
readonly Skip: "skip";
|
|
56
|
+
readonly Error: "error";
|
|
57
|
+
};
|
|
58
|
+
type ConflictStrategy = (typeof ConflictStrategy)[keyof typeof ConflictStrategy];
|
|
59
|
+
namespace LegacyRuleMapping {
|
|
60
|
+
interface Value {
|
|
61
|
+
action?: Value.Action;
|
|
62
|
+
rule_id?: string;
|
|
63
|
+
}
|
|
64
|
+
namespace Value {
|
|
65
|
+
const Action: {
|
|
66
|
+
readonly Reuse: "reuse";
|
|
67
|
+
readonly Create: "create";
|
|
68
|
+
};
|
|
69
|
+
type Action = (typeof Action)[keyof typeof Action];
|
|
70
|
+
}
|
|
71
|
+
}
|
|
48
72
|
}
|
|
@@ -1,3 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ImportManifestRequest = void 0;
|
|
5
|
+
var ImportManifestRequest;
|
|
6
|
+
(function (ImportManifestRequest) {
|
|
7
|
+
/** How to handle conflicts with existing assets. 'update' overwrites, 'skip' ignores, 'error' fails. */
|
|
8
|
+
ImportManifestRequest.ConflictStrategy = {
|
|
9
|
+
Update: "update",
|
|
10
|
+
Skip: "skip",
|
|
11
|
+
Error: "error",
|
|
12
|
+
};
|
|
13
|
+
let LegacyRuleMapping;
|
|
14
|
+
(function (LegacyRuleMapping) {
|
|
15
|
+
let Value;
|
|
16
|
+
(function (Value) {
|
|
17
|
+
Value.Action = {
|
|
18
|
+
Reuse: "reuse",
|
|
19
|
+
Create: "create",
|
|
20
|
+
};
|
|
21
|
+
})(Value = LegacyRuleMapping.Value || (LegacyRuleMapping.Value = {}));
|
|
22
|
+
})(LegacyRuleMapping = ImportManifestRequest.LegacyRuleMapping || (ImportManifestRequest.LegacyRuleMapping = {}));
|
|
23
|
+
})(ImportManifestRequest || (exports.ImportManifestRequest = ImportManifestRequest = {}));
|
|
@@ -45,7 +45,7 @@ export declare class RulesClient {
|
|
|
45
45
|
pull(request: Rulebricks.assets.PullRulesRequest, requestOptions?: RulesClient.RequestOptions): core.HttpResponsePromise<Rulebricks.RuleExport>;
|
|
46
46
|
private __pull;
|
|
47
47
|
/**
|
|
48
|
-
* Import a rule
|
|
48
|
+
* Import or update a rule. Existing rule IDs support partial updates; new rule IDs require a full rule payload.
|
|
49
49
|
*
|
|
50
50
|
* @param {Rulebricks.assets.ImportRuleRequest} request
|
|
51
51
|
* @param {RulesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -57,8 +57,123 @@ export declare class RulesClient {
|
|
|
57
57
|
* @example
|
|
58
58
|
* await client.assets.rules.push({
|
|
59
59
|
* rule: {
|
|
60
|
-
*
|
|
61
|
-
*
|
|
60
|
+
* id: "11111111-2222-4333-8444-555555555555",
|
|
61
|
+
* slug: "basic-pricing-rule",
|
|
62
|
+
* name: "Basic Pricing Rule",
|
|
63
|
+
* description: "",
|
|
64
|
+
* createdAt: "2026-02-12T01:29:23.000Z",
|
|
65
|
+
* updatedAt: "2026-02-12T01:29:23.000Z",
|
|
66
|
+
* published: false,
|
|
67
|
+
* _publish: true,
|
|
68
|
+
* testRequest: {
|
|
69
|
+
* "customer_tier": "STANDARD",
|
|
70
|
+
* "order_total": 250,
|
|
71
|
+
* "expedited": false
|
|
72
|
+
* },
|
|
73
|
+
* sampleRequest: {
|
|
74
|
+
* "customer_tier": "STANDARD",
|
|
75
|
+
* "order_total": 250,
|
|
76
|
+
* "expedited": false
|
|
77
|
+
* },
|
|
78
|
+
* sampleResponse: {
|
|
79
|
+
* "discount_rate": 0,
|
|
80
|
+
* "approval_status": "standard"
|
|
81
|
+
* },
|
|
82
|
+
* requestSchema: [{
|
|
83
|
+
* key: "customer_tier",
|
|
84
|
+
* show: true,
|
|
85
|
+
* name: "Customer Tier",
|
|
86
|
+
* type: "string"
|
|
87
|
+
* }, {
|
|
88
|
+
* key: "order_total",
|
|
89
|
+
* show: true,
|
|
90
|
+
* name: "Order Total",
|
|
91
|
+
* type: "number"
|
|
92
|
+
* }, {
|
|
93
|
+
* key: "expedited",
|
|
94
|
+
* show: true,
|
|
95
|
+
* name: "Expedited",
|
|
96
|
+
* type: "boolean"
|
|
97
|
+
* }],
|
|
98
|
+
* responseSchema: [{
|
|
99
|
+
* key: "discount_rate",
|
|
100
|
+
* show: true,
|
|
101
|
+
* name: "Discount Rate",
|
|
102
|
+
* type: "number"
|
|
103
|
+
* }, {
|
|
104
|
+
* key: "approval_status",
|
|
105
|
+
* show: true,
|
|
106
|
+
* name: "Approval Status",
|
|
107
|
+
* type: "string"
|
|
108
|
+
* }],
|
|
109
|
+
* conditions: [{
|
|
110
|
+
* request: {
|
|
111
|
+
* "customer_tier": {
|
|
112
|
+
* op: "equals",
|
|
113
|
+
* args: ["VIP"]
|
|
114
|
+
* }
|
|
115
|
+
* },
|
|
116
|
+
* response: {
|
|
117
|
+
* "discount_rate": {
|
|
118
|
+
* value: 0.2
|
|
119
|
+
* },
|
|
120
|
+
* "approval_status": {
|
|
121
|
+
* value: "priority"
|
|
122
|
+
* }
|
|
123
|
+
* },
|
|
124
|
+
* settings: {
|
|
125
|
+
* enabled: true,
|
|
126
|
+
* groupId: null,
|
|
127
|
+
* priority: 0,
|
|
128
|
+
* schedule: []
|
|
129
|
+
* }
|
|
130
|
+
* }, {
|
|
131
|
+
* request: {
|
|
132
|
+
* "expedited": {
|
|
133
|
+
* op: "equals",
|
|
134
|
+
* args: [true]
|
|
135
|
+
* }
|
|
136
|
+
* },
|
|
137
|
+
* response: {
|
|
138
|
+
* "discount_rate": {
|
|
139
|
+
* value: 0.05
|
|
140
|
+
* },
|
|
141
|
+
* "approval_status": {
|
|
142
|
+
* value: "expedited"
|
|
143
|
+
* }
|
|
144
|
+
* },
|
|
145
|
+
* settings: {
|
|
146
|
+
* enabled: true,
|
|
147
|
+
* groupId: null,
|
|
148
|
+
* priority: 1,
|
|
149
|
+
* schedule: []
|
|
150
|
+
* }
|
|
151
|
+
* }, {
|
|
152
|
+
* request: {},
|
|
153
|
+
* response: {
|
|
154
|
+
* "discount_rate": {
|
|
155
|
+
* value: 0
|
|
156
|
+
* },
|
|
157
|
+
* "approval_status": {
|
|
158
|
+
* value: "standard"
|
|
159
|
+
* }
|
|
160
|
+
* },
|
|
161
|
+
* settings: {
|
|
162
|
+
* enabled: true,
|
|
163
|
+
* groupId: null,
|
|
164
|
+
* priority: 2,
|
|
165
|
+
* schedule: []
|
|
166
|
+
* }
|
|
167
|
+
* }],
|
|
168
|
+
* history: []
|
|
169
|
+
* }
|
|
170
|
+
* })
|
|
171
|
+
*
|
|
172
|
+
* @example
|
|
173
|
+
* await client.assets.rules.push({
|
|
174
|
+
* rule: {
|
|
175
|
+
* id: "11111111-2222-4333-8444-555555555555",
|
|
176
|
+
* name: "Updated Rule Name"
|
|
62
177
|
* }
|
|
63
178
|
* })
|
|
64
179
|
*/
|
|
@@ -174,7 +174,7 @@ class RulesClient {
|
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
176
|
/**
|
|
177
|
-
* Import a rule
|
|
177
|
+
* Import or update a rule. Existing rule IDs support partial updates; new rule IDs require a full rule payload.
|
|
178
178
|
*
|
|
179
179
|
* @param {Rulebricks.assets.ImportRuleRequest} request
|
|
180
180
|
* @param {RulesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -186,8 +186,123 @@ class RulesClient {
|
|
|
186
186
|
* @example
|
|
187
187
|
* await client.assets.rules.push({
|
|
188
188
|
* rule: {
|
|
189
|
-
*
|
|
190
|
-
*
|
|
189
|
+
* id: "11111111-2222-4333-8444-555555555555",
|
|
190
|
+
* slug: "basic-pricing-rule",
|
|
191
|
+
* name: "Basic Pricing Rule",
|
|
192
|
+
* description: "",
|
|
193
|
+
* createdAt: "2026-02-12T01:29:23.000Z",
|
|
194
|
+
* updatedAt: "2026-02-12T01:29:23.000Z",
|
|
195
|
+
* published: false,
|
|
196
|
+
* _publish: true,
|
|
197
|
+
* testRequest: {
|
|
198
|
+
* "customer_tier": "STANDARD",
|
|
199
|
+
* "order_total": 250,
|
|
200
|
+
* "expedited": false
|
|
201
|
+
* },
|
|
202
|
+
* sampleRequest: {
|
|
203
|
+
* "customer_tier": "STANDARD",
|
|
204
|
+
* "order_total": 250,
|
|
205
|
+
* "expedited": false
|
|
206
|
+
* },
|
|
207
|
+
* sampleResponse: {
|
|
208
|
+
* "discount_rate": 0,
|
|
209
|
+
* "approval_status": "standard"
|
|
210
|
+
* },
|
|
211
|
+
* requestSchema: [{
|
|
212
|
+
* key: "customer_tier",
|
|
213
|
+
* show: true,
|
|
214
|
+
* name: "Customer Tier",
|
|
215
|
+
* type: "string"
|
|
216
|
+
* }, {
|
|
217
|
+
* key: "order_total",
|
|
218
|
+
* show: true,
|
|
219
|
+
* name: "Order Total",
|
|
220
|
+
* type: "number"
|
|
221
|
+
* }, {
|
|
222
|
+
* key: "expedited",
|
|
223
|
+
* show: true,
|
|
224
|
+
* name: "Expedited",
|
|
225
|
+
* type: "boolean"
|
|
226
|
+
* }],
|
|
227
|
+
* responseSchema: [{
|
|
228
|
+
* key: "discount_rate",
|
|
229
|
+
* show: true,
|
|
230
|
+
* name: "Discount Rate",
|
|
231
|
+
* type: "number"
|
|
232
|
+
* }, {
|
|
233
|
+
* key: "approval_status",
|
|
234
|
+
* show: true,
|
|
235
|
+
* name: "Approval Status",
|
|
236
|
+
* type: "string"
|
|
237
|
+
* }],
|
|
238
|
+
* conditions: [{
|
|
239
|
+
* request: {
|
|
240
|
+
* "customer_tier": {
|
|
241
|
+
* op: "equals",
|
|
242
|
+
* args: ["VIP"]
|
|
243
|
+
* }
|
|
244
|
+
* },
|
|
245
|
+
* response: {
|
|
246
|
+
* "discount_rate": {
|
|
247
|
+
* value: 0.2
|
|
248
|
+
* },
|
|
249
|
+
* "approval_status": {
|
|
250
|
+
* value: "priority"
|
|
251
|
+
* }
|
|
252
|
+
* },
|
|
253
|
+
* settings: {
|
|
254
|
+
* enabled: true,
|
|
255
|
+
* groupId: null,
|
|
256
|
+
* priority: 0,
|
|
257
|
+
* schedule: []
|
|
258
|
+
* }
|
|
259
|
+
* }, {
|
|
260
|
+
* request: {
|
|
261
|
+
* "expedited": {
|
|
262
|
+
* op: "equals",
|
|
263
|
+
* args: [true]
|
|
264
|
+
* }
|
|
265
|
+
* },
|
|
266
|
+
* response: {
|
|
267
|
+
* "discount_rate": {
|
|
268
|
+
* value: 0.05
|
|
269
|
+
* },
|
|
270
|
+
* "approval_status": {
|
|
271
|
+
* value: "expedited"
|
|
272
|
+
* }
|
|
273
|
+
* },
|
|
274
|
+
* settings: {
|
|
275
|
+
* enabled: true,
|
|
276
|
+
* groupId: null,
|
|
277
|
+
* priority: 1,
|
|
278
|
+
* schedule: []
|
|
279
|
+
* }
|
|
280
|
+
* }, {
|
|
281
|
+
* request: {},
|
|
282
|
+
* response: {
|
|
283
|
+
* "discount_rate": {
|
|
284
|
+
* value: 0
|
|
285
|
+
* },
|
|
286
|
+
* "approval_status": {
|
|
287
|
+
* value: "standard"
|
|
288
|
+
* }
|
|
289
|
+
* },
|
|
290
|
+
* settings: {
|
|
291
|
+
* enabled: true,
|
|
292
|
+
* groupId: null,
|
|
293
|
+
* priority: 2,
|
|
294
|
+
* schedule: []
|
|
295
|
+
* }
|
|
296
|
+
* }],
|
|
297
|
+
* history: []
|
|
298
|
+
* }
|
|
299
|
+
* })
|
|
300
|
+
*
|
|
301
|
+
* @example
|
|
302
|
+
* await client.assets.rules.push({
|
|
303
|
+
* rule: {
|
|
304
|
+
* id: "11111111-2222-4333-8444-555555555555",
|
|
305
|
+
* name: "Updated Rule Name"
|
|
191
306
|
* }
|
|
192
307
|
* })
|
|
193
308
|
*/
|