@rulebricks/sdk 1.5.2 → 2.0.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/Client.d.ts +3 -0
- package/Client.js +17 -12
- package/api/resources/assets/client/Client.d.ts +55 -1
- package/api/resources/assets/client/Client.js +135 -0
- package/api/resources/assets/client/index.d.ts +1 -1
- package/api/resources/assets/client/index.js +15 -0
- package/api/resources/assets/client/requests/ExportManifestRequest.d.ts +23 -0
- package/api/resources/assets/client/requests/ExportManifestRequest.js +3 -0
- package/api/resources/assets/client/requests/ImportManifestRequest.d.ts +48 -0
- package/api/resources/assets/client/requests/ImportManifestRequest.js +3 -0
- package/api/resources/assets/client/requests/index.d.ts +2 -0
- package/api/resources/assets/client/requests/index.js +2 -0
- package/api/resources/assets/index.d.ts +1 -0
- package/api/resources/assets/index.js +1 -0
- package/api/resources/assets/types/ExportAssetsResponse.d.ts +2 -0
- package/api/resources/assets/types/ExportAssetsResponse.js +3 -0
- package/api/resources/assets/types/index.d.ts +1 -0
- package/api/resources/assets/types/index.js +17 -0
- package/api/resources/contexts/client/Client.d.ts +167 -0
- package/api/resources/contexts/client/Client.js +563 -0
- package/api/resources/contexts/client/index.d.ts +1 -0
- package/api/resources/contexts/client/index.js +17 -0
- package/api/resources/contexts/client/requests/CascadeContextRequest.d.ts +15 -0
- package/api/resources/contexts/client/requests/CascadeContextRequest.js +3 -0
- package/api/resources/contexts/client/requests/DeleteInstanceContextsRequest.d.ts +13 -0
- package/api/resources/contexts/client/requests/DeleteInstanceContextsRequest.js +3 -0
- package/api/resources/contexts/client/requests/GetHistoryContextsRequest.d.ts +17 -0
- package/api/resources/contexts/client/requests/GetHistoryContextsRequest.js +3 -0
- package/api/resources/contexts/client/requests/GetInstanceContextsRequest.d.ts +13 -0
- package/api/resources/contexts/client/requests/GetInstanceContextsRequest.js +3 -0
- package/api/resources/contexts/client/requests/GetPendingContextsRequest.d.ts +13 -0
- package/api/resources/contexts/client/requests/GetPendingContextsRequest.js +3 -0
- package/api/resources/contexts/client/requests/SolveContextFlowRequest.d.ts +20 -0
- package/api/resources/contexts/client/requests/SolveContextFlowRequest.js +3 -0
- package/api/resources/contexts/client/requests/SolveContextRuleRequest.d.ts +20 -0
- package/api/resources/contexts/client/requests/SolveContextRuleRequest.js +3 -0
- package/api/resources/contexts/client/requests/SubmitContextsRequest.d.ts +19 -0
- package/api/resources/contexts/client/requests/SubmitContextsRequest.js +3 -0
- package/api/resources/contexts/client/requests/index.d.ts +8 -0
- package/api/resources/contexts/client/requests/index.js +2 -0
- package/api/resources/contexts/index.d.ts +2 -0
- package/api/resources/contexts/index.js +18 -0
- package/api/resources/contexts/resources/admin/client/Client.d.ts +102 -0
- package/api/resources/contexts/resources/admin/client/Client.js +353 -0
- package/api/resources/contexts/resources/admin/client/index.d.ts +1 -0
- package/api/resources/contexts/resources/admin/client/index.js +17 -0
- package/api/resources/contexts/resources/admin/client/requests/CreateContextRequest.d.ts +55 -0
- package/api/resources/contexts/resources/admin/client/requests/CreateContextRequest.js +12 -0
- package/api/resources/contexts/resources/admin/client/requests/DeleteAdminRequest.d.ts +10 -0
- package/api/resources/contexts/resources/admin/client/requests/DeleteAdminRequest.js +3 -0
- package/api/resources/contexts/resources/admin/client/requests/GetAdminRequest.d.ts +10 -0
- package/api/resources/contexts/resources/admin/client/requests/GetAdminRequest.js +3 -0
- package/api/resources/contexts/resources/admin/client/requests/UpdateContextRequest.d.ts +49 -0
- package/api/resources/contexts/resources/admin/client/requests/UpdateContextRequest.js +12 -0
- package/api/resources/contexts/resources/admin/client/requests/index.d.ts +4 -0
- package/api/resources/contexts/resources/admin/client/requests/index.js +2 -0
- package/api/resources/contexts/resources/admin/index.d.ts +1 -0
- package/api/resources/contexts/resources/admin/index.js +17 -0
- package/api/resources/contexts/resources/index.d.ts +4 -0
- package/api/resources/contexts/resources/index.js +43 -0
- package/api/resources/contexts/resources/relationships/client/Client.d.ts +67 -0
- package/api/resources/contexts/resources/relationships/client/Client.js +252 -0
- package/api/resources/contexts/resources/relationships/client/index.d.ts +1 -0
- package/api/resources/contexts/resources/relationships/client/index.js +17 -0
- package/api/resources/contexts/resources/relationships/client/requests/CreateRelationshipRequest.d.ts +33 -0
- package/api/resources/contexts/resources/relationships/client/requests/CreateRelationshipRequest.js +13 -0
- package/api/resources/contexts/resources/relationships/client/requests/DeleteRelationshipsRequest.d.ts +13 -0
- package/api/resources/contexts/resources/relationships/client/requests/DeleteRelationshipsRequest.js +3 -0
- package/api/resources/contexts/resources/relationships/client/requests/ListRelationshipsRequest.d.ts +10 -0
- package/api/resources/contexts/resources/relationships/client/requests/ListRelationshipsRequest.js +3 -0
- package/api/resources/contexts/resources/relationships/client/requests/index.d.ts +3 -0
- package/api/resources/contexts/resources/relationships/client/requests/index.js +2 -0
- package/api/resources/contexts/resources/relationships/index.d.ts +1 -0
- package/api/resources/contexts/resources/relationships/index.js +17 -0
- package/api/resources/index.d.ts +4 -0
- package/api/resources/index.js +8 -4
- package/api/resources/users/client/Client.d.ts +3 -3
- package/api/resources/users/client/Client.js +3 -3
- package/api/resources/users/client/requests/CreateUserRequest.d.ts +3 -3
- package/api/resources/users/client/requests/UserInviteRequest.d.ts +6 -6
- package/api/resources/values/client/Client.d.ts +3 -3
- package/api/resources/values/client/Client.js +3 -3
- package/api/resources/values/client/requests/UpdateValuesRequest.d.ts +6 -6
- package/api/types/CascadeContextResponse.d.ts +10 -0
- package/api/types/CascadeContextResponse.js +3 -0
- package/api/types/CascadeResult.d.ts +29 -0
- package/api/types/CascadeResult.js +12 -0
- package/api/types/ContextBase.d.ts +33 -0
- package/api/types/ContextBase.js +12 -0
- package/api/types/ContextDetail.d.ts +58 -0
- package/api/types/ContextDetail.js +3 -0
- package/api/types/ContextInstanceHistory.d.ts +10 -0
- package/api/types/ContextInstanceHistory.js +3 -0
- package/api/types/ContextInstanceHistoryEntry.d.ts +9 -0
- package/api/types/ContextInstanceHistoryEntry.js +3 -0
- package/api/types/ContextInstancePendingEvaluation.d.ts +29 -0
- package/api/types/ContextInstancePendingEvaluation.js +12 -0
- package/api/types/ContextInstancePendingResponse.d.ts +8 -0
- package/api/types/ContextInstancePendingResponse.js +3 -0
- package/api/types/ContextInstanceState.d.ts +31 -0
- package/api/types/ContextInstanceState.js +12 -0
- package/api/types/ContextListResponse.d.ts +2 -0
- package/api/types/ContextListResponse.js +3 -0
- package/api/types/ContextRelationshipBase.d.ts +21 -0
- package/api/types/ContextRelationshipBase.js +13 -0
- package/api/types/ContextRelationshipIncoming.d.ts +11 -0
- package/api/types/ContextRelationshipIncoming.js +3 -0
- package/api/types/ContextRelationshipOutgoing.d.ts +11 -0
- package/api/types/ContextRelationshipOutgoing.js +3 -0
- package/api/types/ContextRelationshipsResponse.d.ts +5 -0
- package/api/types/ContextRelationshipsResponse.js +3 -0
- package/api/types/ContextSchema.d.ts +10 -0
- package/api/types/ContextSchema.js +3 -0
- package/api/types/ContextSchemaField.d.ts +35 -0
- package/api/types/ContextSchemaField.js +16 -0
- package/api/types/CreateContextResponse.d.ts +2 -0
- package/api/types/CreateContextResponse.js +3 -0
- package/api/types/CreateRelationshipResponse.d.ts +2 -0
- package/api/types/CreateRelationshipResponse.js +3 -0
- package/api/types/CreateUserResponse.d.ts +3 -3
- package/api/types/DeleteContextInstanceResponse.d.ts +9 -0
- package/api/types/DeleteContextInstanceResponse.js +3 -0
- package/api/types/DeleteContextResponse.d.ts +13 -0
- package/api/types/DeleteContextResponse.js +3 -0
- package/api/types/DeleteRelationshipResponse.d.ts +4 -0
- package/api/types/DeleteRelationshipResponse.js +3 -0
- package/api/types/DynamicValue.d.ts +9 -3
- package/api/types/ExportManifestPreviewResponse.d.ts +51 -0
- package/api/types/ExportManifestPreviewResponse.js +3 -0
- package/api/types/ExportManifestResponse.d.ts +9 -0
- package/api/types/ExportManifestResponse.js +3 -0
- package/api/types/FlowDetail.d.ts +28 -0
- package/api/types/Folder.d.ts +1 -1
- package/api/types/ImportManifestResponse.d.ts +38 -0
- package/api/types/ImportManifestResponse.js +3 -0
- package/api/types/RuleDetail.d.ts +17 -0
- package/api/types/SolveContextFlowResponse.d.ts +23 -0
- package/api/types/SolveContextFlowResponse.js +12 -0
- package/api/types/SolveContextRuleResponse.d.ts +26 -0
- package/api/types/SolveContextRuleResponse.js +12 -0
- package/api/types/SubmitContextDataRequest.d.ts +4 -0
- package/api/types/SubmitContextDataRequest.js +3 -0
- package/api/types/SubmitContextDataResponse.d.ts +30 -0
- package/api/types/SubmitContextDataResponse.js +12 -0
- package/api/types/UpdateContextResponse.d.ts +2 -0
- package/api/types/UpdateContextResponse.js +3 -0
- package/api/types/UserDetail.d.ts +4 -4
- package/api/types/UserInviteResponse.d.ts +2 -2
- package/api/types/index.d.ts +29 -0
- package/api/types/index.js +29 -0
- package/dist/Client.d.ts +3 -0
- package/dist/Client.js +17 -12
- package/dist/api/resources/assets/client/Client.d.ts +55 -1
- package/dist/api/resources/assets/client/Client.js +135 -0
- package/dist/api/resources/assets/client/index.d.ts +1 -1
- package/dist/api/resources/assets/client/index.js +15 -0
- package/dist/api/resources/assets/client/requests/ExportManifestRequest.d.ts +23 -0
- package/dist/api/resources/assets/client/requests/ExportManifestRequest.js +3 -0
- package/dist/api/resources/assets/client/requests/ImportManifestRequest.d.ts +48 -0
- package/dist/api/resources/assets/client/requests/ImportManifestRequest.js +3 -0
- package/dist/api/resources/assets/client/requests/index.d.ts +2 -0
- package/dist/api/resources/assets/client/requests/index.js +2 -0
- package/dist/api/resources/assets/index.d.ts +1 -0
- package/dist/api/resources/assets/index.js +1 -0
- package/dist/api/resources/assets/types/ExportAssetsResponse.d.ts +2 -0
- package/dist/api/resources/assets/types/ExportAssetsResponse.js +3 -0
- package/dist/api/resources/assets/types/index.d.ts +1 -0
- package/dist/api/resources/assets/types/index.js +17 -0
- package/dist/api/resources/contexts/client/Client.d.ts +167 -0
- package/dist/api/resources/contexts/client/Client.js +563 -0
- package/dist/api/resources/contexts/client/index.d.ts +1 -0
- package/dist/api/resources/contexts/client/index.js +17 -0
- package/dist/api/resources/contexts/client/requests/CascadeContextRequest.d.ts +15 -0
- package/dist/api/resources/contexts/client/requests/CascadeContextRequest.js +3 -0
- package/dist/api/resources/contexts/client/requests/DeleteInstanceContextsRequest.d.ts +13 -0
- package/dist/api/resources/contexts/client/requests/DeleteInstanceContextsRequest.js +3 -0
- package/dist/api/resources/contexts/client/requests/GetHistoryContextsRequest.d.ts +17 -0
- package/dist/api/resources/contexts/client/requests/GetHistoryContextsRequest.js +3 -0
- package/dist/api/resources/contexts/client/requests/GetInstanceContextsRequest.d.ts +13 -0
- package/dist/api/resources/contexts/client/requests/GetInstanceContextsRequest.js +3 -0
- package/dist/api/resources/contexts/client/requests/GetPendingContextsRequest.d.ts +13 -0
- package/dist/api/resources/contexts/client/requests/GetPendingContextsRequest.js +3 -0
- package/dist/api/resources/contexts/client/requests/SolveContextFlowRequest.d.ts +20 -0
- package/dist/api/resources/contexts/client/requests/SolveContextFlowRequest.js +3 -0
- package/dist/api/resources/contexts/client/requests/SolveContextRuleRequest.d.ts +20 -0
- package/dist/api/resources/contexts/client/requests/SolveContextRuleRequest.js +3 -0
- package/dist/api/resources/contexts/client/requests/SubmitContextsRequest.d.ts +19 -0
- package/dist/api/resources/contexts/client/requests/SubmitContextsRequest.js +3 -0
- package/dist/api/resources/contexts/client/requests/index.d.ts +8 -0
- package/dist/api/resources/contexts/client/requests/index.js +2 -0
- package/dist/api/resources/contexts/index.d.ts +2 -0
- package/dist/api/resources/contexts/index.js +18 -0
- package/dist/api/resources/contexts/resources/admin/client/Client.d.ts +102 -0
- package/dist/api/resources/contexts/resources/admin/client/Client.js +353 -0
- package/dist/api/resources/contexts/resources/admin/client/index.d.ts +1 -0
- package/dist/api/resources/contexts/resources/admin/client/index.js +17 -0
- package/dist/api/resources/contexts/resources/admin/client/requests/CreateContextRequest.d.ts +55 -0
- package/dist/api/resources/contexts/resources/admin/client/requests/CreateContextRequest.js +12 -0
- package/dist/api/resources/contexts/resources/admin/client/requests/DeleteAdminRequest.d.ts +10 -0
- package/dist/api/resources/contexts/resources/admin/client/requests/DeleteAdminRequest.js +3 -0
- package/dist/api/resources/contexts/resources/admin/client/requests/GetAdminRequest.d.ts +10 -0
- package/dist/api/resources/contexts/resources/admin/client/requests/GetAdminRequest.js +3 -0
- package/dist/api/resources/contexts/resources/admin/client/requests/UpdateContextRequest.d.ts +49 -0
- package/dist/api/resources/contexts/resources/admin/client/requests/UpdateContextRequest.js +12 -0
- package/dist/api/resources/contexts/resources/admin/client/requests/index.d.ts +4 -0
- package/dist/api/resources/contexts/resources/admin/client/requests/index.js +2 -0
- package/dist/api/resources/contexts/resources/admin/index.d.ts +1 -0
- package/dist/api/resources/contexts/resources/admin/index.js +17 -0
- package/dist/api/resources/contexts/resources/index.d.ts +4 -0
- package/dist/api/resources/contexts/resources/index.js +43 -0
- package/dist/api/resources/contexts/resources/relationships/client/Client.d.ts +67 -0
- package/dist/api/resources/contexts/resources/relationships/client/Client.js +252 -0
- package/dist/api/resources/contexts/resources/relationships/client/index.d.ts +1 -0
- package/dist/api/resources/contexts/resources/relationships/client/index.js +17 -0
- package/dist/api/resources/contexts/resources/relationships/client/requests/CreateRelationshipRequest.d.ts +33 -0
- package/dist/api/resources/contexts/resources/relationships/client/requests/CreateRelationshipRequest.js +13 -0
- package/dist/api/resources/contexts/resources/relationships/client/requests/DeleteRelationshipsRequest.d.ts +13 -0
- package/dist/api/resources/contexts/resources/relationships/client/requests/DeleteRelationshipsRequest.js +3 -0
- package/dist/api/resources/contexts/resources/relationships/client/requests/ListRelationshipsRequest.d.ts +10 -0
- package/dist/api/resources/contexts/resources/relationships/client/requests/ListRelationshipsRequest.js +3 -0
- package/dist/api/resources/contexts/resources/relationships/client/requests/index.d.ts +3 -0
- package/dist/api/resources/contexts/resources/relationships/client/requests/index.js +2 -0
- package/dist/api/resources/contexts/resources/relationships/index.d.ts +1 -0
- package/dist/api/resources/contexts/resources/relationships/index.js +17 -0
- package/dist/api/resources/index.d.ts +4 -0
- package/dist/api/resources/index.js +8 -4
- package/dist/api/resources/users/client/Client.d.ts +3 -3
- package/dist/api/resources/users/client/Client.js +3 -3
- package/dist/api/resources/users/client/requests/CreateUserRequest.d.ts +3 -3
- package/dist/api/resources/users/client/requests/UserInviteRequest.d.ts +6 -6
- package/dist/api/resources/values/client/Client.d.ts +3 -3
- package/dist/api/resources/values/client/Client.js +3 -3
- package/dist/api/resources/values/client/requests/UpdateValuesRequest.d.ts +6 -6
- package/dist/api/types/CascadeContextResponse.d.ts +10 -0
- package/dist/api/types/CascadeContextResponse.js +3 -0
- package/dist/api/types/CascadeResult.d.ts +29 -0
- package/dist/api/types/CascadeResult.js +12 -0
- package/dist/api/types/ContextBase.d.ts +33 -0
- package/dist/api/types/ContextBase.js +12 -0
- package/dist/api/types/ContextDetail.d.ts +58 -0
- package/dist/api/types/ContextDetail.js +3 -0
- package/dist/api/types/ContextInstanceHistory.d.ts +10 -0
- package/dist/api/types/ContextInstanceHistory.js +3 -0
- package/dist/api/types/ContextInstanceHistoryEntry.d.ts +9 -0
- package/dist/api/types/ContextInstanceHistoryEntry.js +3 -0
- package/dist/api/types/ContextInstancePendingEvaluation.d.ts +29 -0
- package/dist/api/types/ContextInstancePendingEvaluation.js +12 -0
- package/dist/api/types/ContextInstancePendingResponse.d.ts +8 -0
- package/dist/api/types/ContextInstancePendingResponse.js +3 -0
- package/dist/api/types/ContextInstanceState.d.ts +31 -0
- package/dist/api/types/ContextInstanceState.js +12 -0
- package/dist/api/types/ContextListResponse.d.ts +2 -0
- package/dist/api/types/ContextListResponse.js +3 -0
- package/dist/api/types/ContextRelationshipBase.d.ts +21 -0
- package/dist/api/types/ContextRelationshipBase.js +13 -0
- package/dist/api/types/ContextRelationshipIncoming.d.ts +11 -0
- package/dist/api/types/ContextRelationshipIncoming.js +3 -0
- package/dist/api/types/ContextRelationshipOutgoing.d.ts +11 -0
- package/dist/api/types/ContextRelationshipOutgoing.js +3 -0
- package/dist/api/types/ContextRelationshipsResponse.d.ts +5 -0
- package/dist/api/types/ContextRelationshipsResponse.js +3 -0
- package/dist/api/types/ContextSchema.d.ts +10 -0
- package/dist/api/types/ContextSchema.js +3 -0
- package/dist/api/types/ContextSchemaField.d.ts +35 -0
- package/dist/api/types/ContextSchemaField.js +16 -0
- package/dist/api/types/CreateContextResponse.d.ts +2 -0
- package/dist/api/types/CreateContextResponse.js +3 -0
- package/dist/api/types/CreateRelationshipResponse.d.ts +2 -0
- package/dist/api/types/CreateRelationshipResponse.js +3 -0
- package/dist/api/types/CreateUserResponse.d.ts +3 -3
- package/dist/api/types/DeleteContextInstanceResponse.d.ts +9 -0
- package/dist/api/types/DeleteContextInstanceResponse.js +3 -0
- package/dist/api/types/DeleteContextResponse.d.ts +13 -0
- package/dist/api/types/DeleteContextResponse.js +3 -0
- package/dist/api/types/DeleteRelationshipResponse.d.ts +4 -0
- package/dist/api/types/DeleteRelationshipResponse.js +3 -0
- package/dist/api/types/DynamicValue.d.ts +9 -3
- package/dist/api/types/ExportManifestPreviewResponse.d.ts +51 -0
- package/dist/api/types/ExportManifestPreviewResponse.js +3 -0
- package/dist/api/types/ExportManifestResponse.d.ts +9 -0
- package/dist/api/types/ExportManifestResponse.js +3 -0
- package/dist/api/types/FlowDetail.d.ts +28 -0
- package/dist/api/types/Folder.d.ts +1 -1
- package/dist/api/types/ImportManifestResponse.d.ts +38 -0
- package/dist/api/types/ImportManifestResponse.js +3 -0
- package/dist/api/types/RuleDetail.d.ts +17 -0
- package/dist/api/types/SolveContextFlowResponse.d.ts +23 -0
- package/dist/api/types/SolveContextFlowResponse.js +12 -0
- package/dist/api/types/SolveContextRuleResponse.d.ts +26 -0
- package/dist/api/types/SolveContextRuleResponse.js +12 -0
- package/dist/api/types/SubmitContextDataRequest.d.ts +4 -0
- package/dist/api/types/SubmitContextDataRequest.js +3 -0
- package/dist/api/types/SubmitContextDataResponse.d.ts +30 -0
- package/dist/api/types/SubmitContextDataResponse.js +12 -0
- package/dist/api/types/UpdateContextResponse.d.ts +2 -0
- package/dist/api/types/UpdateContextResponse.js +3 -0
- package/dist/api/types/UserDetail.d.ts +4 -4
- package/dist/api/types/UserInviteResponse.d.ts +2 -2
- package/dist/api/types/index.d.ts +29 -0
- package/dist/api/types/index.js +29 -0
- package/dist/forge/values.d.ts +1 -1
- package/dist/forge/values.js +2 -2
- package/forge/values.d.ts +1 -1
- package/forge/values.js +2 -2
- package/package.json +1 -2
package/Client.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AssetsClient } from "./api/resources/assets/client/Client.js";
|
|
2
|
+
import { ContextsClient } from "./api/resources/contexts/client/Client.js";
|
|
2
3
|
import { DecisionsClient } from "./api/resources/decisions/client/Client.js";
|
|
3
4
|
import { FlowsClient } from "./api/resources/flows/client/Client.js";
|
|
4
5
|
import { RulesClient } from "./api/resources/rules/client/Client.js";
|
|
@@ -20,6 +21,7 @@ export declare class RulebricksClient {
|
|
|
20
21
|
protected _users: UsersClient | undefined;
|
|
21
22
|
protected _assets: AssetsClient | undefined;
|
|
22
23
|
protected _values: ValuesClient | undefined;
|
|
24
|
+
protected _contexts: ContextsClient | undefined;
|
|
23
25
|
protected _tests: TestsClient | undefined;
|
|
24
26
|
constructor(options: RulebricksClient.Options);
|
|
25
27
|
get rules(): RulesClient;
|
|
@@ -28,5 +30,6 @@ export declare class RulebricksClient {
|
|
|
28
30
|
get users(): UsersClient;
|
|
29
31
|
get assets(): AssetsClient;
|
|
30
32
|
get values(): ValuesClient;
|
|
33
|
+
get contexts(): ContextsClient;
|
|
31
34
|
get tests(): TestsClient;
|
|
32
35
|
}
|
package/Client.js
CHANGED
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.RulebricksClient = void 0;
|
|
5
5
|
const Client_js_1 = require("./api/resources/assets/client/Client.js");
|
|
6
|
-
const Client_js_2 = require("./api/resources/
|
|
7
|
-
const Client_js_3 = require("./api/resources/
|
|
8
|
-
const Client_js_4 = require("./api/resources/
|
|
9
|
-
const Client_js_5 = require("./api/resources/
|
|
10
|
-
const Client_js_6 = require("./api/resources/
|
|
11
|
-
const Client_js_7 = require("./api/resources/
|
|
6
|
+
const Client_js_2 = require("./api/resources/contexts/client/Client.js");
|
|
7
|
+
const Client_js_3 = require("./api/resources/decisions/client/Client.js");
|
|
8
|
+
const Client_js_4 = require("./api/resources/flows/client/Client.js");
|
|
9
|
+
const Client_js_5 = require("./api/resources/rules/client/Client.js");
|
|
10
|
+
const Client_js_6 = require("./api/resources/tests/client/Client.js");
|
|
11
|
+
const Client_js_7 = require("./api/resources/users/client/Client.js");
|
|
12
|
+
const Client_js_8 = require("./api/resources/values/client/Client.js");
|
|
12
13
|
const BaseClient_js_1 = require("./BaseClient.js");
|
|
13
14
|
class RulebricksClient {
|
|
14
15
|
constructor(options) {
|
|
@@ -16,19 +17,19 @@ class RulebricksClient {
|
|
|
16
17
|
}
|
|
17
18
|
get rules() {
|
|
18
19
|
var _a;
|
|
19
|
-
return ((_a = this._rules) !== null && _a !== void 0 ? _a : (this._rules = new
|
|
20
|
+
return ((_a = this._rules) !== null && _a !== void 0 ? _a : (this._rules = new Client_js_5.RulesClient(this._options)));
|
|
20
21
|
}
|
|
21
22
|
get flows() {
|
|
22
23
|
var _a;
|
|
23
|
-
return ((_a = this._flows) !== null && _a !== void 0 ? _a : (this._flows = new
|
|
24
|
+
return ((_a = this._flows) !== null && _a !== void 0 ? _a : (this._flows = new Client_js_4.FlowsClient(this._options)));
|
|
24
25
|
}
|
|
25
26
|
get decisions() {
|
|
26
27
|
var _a;
|
|
27
|
-
return ((_a = this._decisions) !== null && _a !== void 0 ? _a : (this._decisions = new
|
|
28
|
+
return ((_a = this._decisions) !== null && _a !== void 0 ? _a : (this._decisions = new Client_js_3.DecisionsClient(this._options)));
|
|
28
29
|
}
|
|
29
30
|
get users() {
|
|
30
31
|
var _a;
|
|
31
|
-
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new
|
|
32
|
+
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_js_7.UsersClient(this._options)));
|
|
32
33
|
}
|
|
33
34
|
get assets() {
|
|
34
35
|
var _a;
|
|
@@ -36,11 +37,15 @@ class RulebricksClient {
|
|
|
36
37
|
}
|
|
37
38
|
get values() {
|
|
38
39
|
var _a;
|
|
39
|
-
return ((_a = this._values) !== null && _a !== void 0 ? _a : (this._values = new
|
|
40
|
+
return ((_a = this._values) !== null && _a !== void 0 ? _a : (this._values = new Client_js_8.ValuesClient(this._options)));
|
|
41
|
+
}
|
|
42
|
+
get contexts() {
|
|
43
|
+
var _a;
|
|
44
|
+
return ((_a = this._contexts) !== null && _a !== void 0 ? _a : (this._contexts = new Client_js_2.ContextsClient(this._options)));
|
|
40
45
|
}
|
|
41
46
|
get tests() {
|
|
42
47
|
var _a;
|
|
43
|
-
return ((_a = this._tests) !== null && _a !== void 0 ? _a : (this._tests = new
|
|
48
|
+
return ((_a = this._tests) !== null && _a !== void 0 ? _a : (this._tests = new Client_js_6.TestsClient(this._options)));
|
|
44
49
|
}
|
|
45
50
|
}
|
|
46
51
|
exports.RulebricksClient = RulebricksClient;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
2
|
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
3
3
|
import * as core from "../../../../core/index.js";
|
|
4
|
-
import
|
|
4
|
+
import * as Rulebricks from "../../../index.js";
|
|
5
5
|
import { FlowsClient } from "../resources/flows/client/Client.js";
|
|
6
6
|
import { FoldersClient } from "../resources/folders/client/Client.js";
|
|
7
7
|
import { RulesClient } from "../resources/rules/client/Client.js";
|
|
@@ -32,4 +32,58 @@ export declare class AssetsClient {
|
|
|
32
32
|
*/
|
|
33
33
|
getUsage(requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<Rulebricks.UsageStatistics>;
|
|
34
34
|
private __getUsage;
|
|
35
|
+
/**
|
|
36
|
+
* Import rules, flows, contexts, and values from an RBM manifest file.
|
|
37
|
+
*
|
|
38
|
+
* @param {Rulebricks.ImportManifestRequest} request
|
|
39
|
+
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
40
|
+
*
|
|
41
|
+
* @throws {@link Rulebricks.BadRequestError}
|
|
42
|
+
* @throws {@link Rulebricks.InternalServerError}
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* await client.assets.import({
|
|
46
|
+
* manifest: {
|
|
47
|
+
* version: "1.0",
|
|
48
|
+
* rules: [{
|
|
49
|
+
* "name": "Pricing Rule",
|
|
50
|
+
* "slug": "pricing-rule"
|
|
51
|
+
* }],
|
|
52
|
+
* flows: [{
|
|
53
|
+
* "name": "Onboarding Flow",
|
|
54
|
+
* "slug": "onboarding-flow"
|
|
55
|
+
* }],
|
|
56
|
+
* contexts: [{
|
|
57
|
+
* "name": "Customer",
|
|
58
|
+
* "slug": "customer"
|
|
59
|
+
* }],
|
|
60
|
+
* values: [{
|
|
61
|
+
* "key": "tax_rate",
|
|
62
|
+
* "value": 0.08
|
|
63
|
+
* }]
|
|
64
|
+
* },
|
|
65
|
+
* overwrite: false
|
|
66
|
+
* })
|
|
67
|
+
*/
|
|
68
|
+
import(request: Rulebricks.ImportManifestRequest, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<Rulebricks.ImportManifestResponse>;
|
|
69
|
+
private __import;
|
|
70
|
+
/**
|
|
71
|
+
* Export selected rules, flows, contexts, and values to an RBM manifest file.
|
|
72
|
+
*
|
|
73
|
+
* @param {Rulebricks.ExportManifestRequest} request
|
|
74
|
+
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
75
|
+
*
|
|
76
|
+
* @throws {@link Rulebricks.BadRequestError}
|
|
77
|
+
* @throws {@link Rulebricks.InternalServerError}
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* await client.assets.export({
|
|
81
|
+
* rules: ["pricing-rule", "eligibility-check"],
|
|
82
|
+
* flows: ["onboarding-flow"],
|
|
83
|
+
* contexts: ["customer"],
|
|
84
|
+
* values: ["tax_rate", "discount_threshold"]
|
|
85
|
+
* })
|
|
86
|
+
*/
|
|
87
|
+
export(request?: Rulebricks.ExportManifestRequest, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<Rulebricks.ExportAssetsResponse>;
|
|
88
|
+
private __export;
|
|
35
89
|
}
|
|
@@ -50,6 +50,7 @@ const core = __importStar(require("../../../../core/index.js"));
|
|
|
50
50
|
const environments = __importStar(require("../../../../environments.js"));
|
|
51
51
|
const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
|
|
52
52
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
53
|
+
const Rulebricks = __importStar(require("../../../index.js"));
|
|
53
54
|
const Client_js_1 = require("../resources/flows/client/Client.js");
|
|
54
55
|
const Client_js_2 = require("../resources/folders/client/Client.js");
|
|
55
56
|
const Client_js_3 = require("../resources/rules/client/Client.js");
|
|
@@ -112,5 +113,139 @@ class AssetsClient {
|
|
|
112
113
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/admin/usage");
|
|
113
114
|
});
|
|
114
115
|
}
|
|
116
|
+
/**
|
|
117
|
+
* Import rules, flows, contexts, and values from an RBM manifest file.
|
|
118
|
+
*
|
|
119
|
+
* @param {Rulebricks.ImportManifestRequest} request
|
|
120
|
+
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
121
|
+
*
|
|
122
|
+
* @throws {@link Rulebricks.BadRequestError}
|
|
123
|
+
* @throws {@link Rulebricks.InternalServerError}
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* await client.assets.import({
|
|
127
|
+
* manifest: {
|
|
128
|
+
* version: "1.0",
|
|
129
|
+
* rules: [{
|
|
130
|
+
* "name": "Pricing Rule",
|
|
131
|
+
* "slug": "pricing-rule"
|
|
132
|
+
* }],
|
|
133
|
+
* flows: [{
|
|
134
|
+
* "name": "Onboarding Flow",
|
|
135
|
+
* "slug": "onboarding-flow"
|
|
136
|
+
* }],
|
|
137
|
+
* contexts: [{
|
|
138
|
+
* "name": "Customer",
|
|
139
|
+
* "slug": "customer"
|
|
140
|
+
* }],
|
|
141
|
+
* values: [{
|
|
142
|
+
* "key": "tax_rate",
|
|
143
|
+
* "value": 0.08
|
|
144
|
+
* }]
|
|
145
|
+
* },
|
|
146
|
+
* overwrite: false
|
|
147
|
+
* })
|
|
148
|
+
*/
|
|
149
|
+
import(request, requestOptions) {
|
|
150
|
+
return core.HttpResponsePromise.fromPromise(this.__import(request, requestOptions));
|
|
151
|
+
}
|
|
152
|
+
__import(request, requestOptions) {
|
|
153
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
154
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
155
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
156
|
+
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);
|
|
157
|
+
const _response = yield core.fetcher({
|
|
158
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.RulebricksEnvironment.Default, "admin/import"),
|
|
159
|
+
method: "POST",
|
|
160
|
+
headers: _headers,
|
|
161
|
+
contentType: "application/json",
|
|
162
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
163
|
+
requestType: "json",
|
|
164
|
+
body: request,
|
|
165
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
166
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
167
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
168
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
169
|
+
logging: this._options.logging,
|
|
170
|
+
});
|
|
171
|
+
if (_response.ok) {
|
|
172
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
173
|
+
}
|
|
174
|
+
if (_response.error.reason === "status-code") {
|
|
175
|
+
switch (_response.error.statusCode) {
|
|
176
|
+
case 400:
|
|
177
|
+
throw new Rulebricks.BadRequestError(_response.error.body, _response.rawResponse);
|
|
178
|
+
case 500:
|
|
179
|
+
throw new Rulebricks.InternalServerError(_response.error.body, _response.rawResponse);
|
|
180
|
+
default:
|
|
181
|
+
throw new errors.RulebricksError({
|
|
182
|
+
statusCode: _response.error.statusCode,
|
|
183
|
+
body: _response.error.body,
|
|
184
|
+
rawResponse: _response.rawResponse,
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/admin/import");
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Export selected rules, flows, contexts, and values to an RBM manifest file.
|
|
193
|
+
*
|
|
194
|
+
* @param {Rulebricks.ExportManifestRequest} request
|
|
195
|
+
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
196
|
+
*
|
|
197
|
+
* @throws {@link Rulebricks.BadRequestError}
|
|
198
|
+
* @throws {@link Rulebricks.InternalServerError}
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* await client.assets.export({
|
|
202
|
+
* rules: ["pricing-rule", "eligibility-check"],
|
|
203
|
+
* flows: ["onboarding-flow"],
|
|
204
|
+
* contexts: ["customer"],
|
|
205
|
+
* values: ["tax_rate", "discount_threshold"]
|
|
206
|
+
* })
|
|
207
|
+
*/
|
|
208
|
+
export(request = {}, requestOptions) {
|
|
209
|
+
return core.HttpResponsePromise.fromPromise(this.__export(request, requestOptions));
|
|
210
|
+
}
|
|
211
|
+
__export() {
|
|
212
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
213
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
214
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
215
|
+
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);
|
|
216
|
+
const _response = yield core.fetcher({
|
|
217
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.RulebricksEnvironment.Default, "admin/export"),
|
|
218
|
+
method: "POST",
|
|
219
|
+
headers: _headers,
|
|
220
|
+
contentType: "application/json",
|
|
221
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
222
|
+
requestType: "json",
|
|
223
|
+
body: request,
|
|
224
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
225
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
226
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
227
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
228
|
+
logging: this._options.logging,
|
|
229
|
+
});
|
|
230
|
+
if (_response.ok) {
|
|
231
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
232
|
+
}
|
|
233
|
+
if (_response.error.reason === "status-code") {
|
|
234
|
+
switch (_response.error.statusCode) {
|
|
235
|
+
case 400:
|
|
236
|
+
throw new Rulebricks.BadRequestError(_response.error.body, _response.rawResponse);
|
|
237
|
+
case 500:
|
|
238
|
+
throw new Rulebricks.InternalServerError(_response.error.body, _response.rawResponse);
|
|
239
|
+
default:
|
|
240
|
+
throw new errors.RulebricksError({
|
|
241
|
+
statusCode: _response.error.statusCode,
|
|
242
|
+
body: _response.error.body,
|
|
243
|
+
rawResponse: _response.rawResponse,
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/admin/export");
|
|
248
|
+
});
|
|
249
|
+
}
|
|
115
250
|
}
|
|
116
251
|
exports.AssetsClient = AssetsClient;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./requests/index.js";
|
|
@@ -1,2 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests/index.js"), exports);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* rules: ["pricing-rule", "eligibility-check"],
|
|
5
|
+
* flows: ["onboarding-flow"],
|
|
6
|
+
* contexts: ["customer"],
|
|
7
|
+
* values: ["tax_rate", "discount_threshold"]
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface ExportManifestRequest {
|
|
11
|
+
/** Rule IDs or slugs to export. */
|
|
12
|
+
rules?: string[];
|
|
13
|
+
/** Flow IDs or slugs to export. */
|
|
14
|
+
flows?: string[];
|
|
15
|
+
/** Context IDs or slugs to export. */
|
|
16
|
+
contexts?: string[];
|
|
17
|
+
/** Value IDs or names to export. */
|
|
18
|
+
values?: string[];
|
|
19
|
+
/** Export all assets of specified types. */
|
|
20
|
+
includeAll?: boolean;
|
|
21
|
+
/** Return a preview of what would be exported without the full data. */
|
|
22
|
+
preview?: boolean;
|
|
23
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* manifest: {
|
|
5
|
+
* version: "1.0",
|
|
6
|
+
* rules: [{
|
|
7
|
+
* "name": "Pricing Rule",
|
|
8
|
+
* "slug": "pricing-rule"
|
|
9
|
+
* }],
|
|
10
|
+
* flows: [{
|
|
11
|
+
* "name": "Onboarding Flow",
|
|
12
|
+
* "slug": "onboarding-flow"
|
|
13
|
+
* }],
|
|
14
|
+
* contexts: [{
|
|
15
|
+
* "name": "Customer",
|
|
16
|
+
* "slug": "customer"
|
|
17
|
+
* }],
|
|
18
|
+
* values: [{
|
|
19
|
+
* "key": "tax_rate",
|
|
20
|
+
* "value": 0.08
|
|
21
|
+
* }]
|
|
22
|
+
* },
|
|
23
|
+
* overwrite: false
|
|
24
|
+
* }
|
|
25
|
+
*/
|
|
26
|
+
export interface ImportManifestRequest {
|
|
27
|
+
/** The RBM manifest object containing assets to import. */
|
|
28
|
+
manifest: ImportManifestRequest.Manifest;
|
|
29
|
+
/** Whether to overwrite existing assets with the same ID/slug. */
|
|
30
|
+
overwrite?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export declare namespace ImportManifestRequest {
|
|
33
|
+
/**
|
|
34
|
+
* The RBM manifest object containing assets to import.
|
|
35
|
+
*/
|
|
36
|
+
interface Manifest {
|
|
37
|
+
/** Manifest format version. */
|
|
38
|
+
version?: string;
|
|
39
|
+
/** Rules to import. */
|
|
40
|
+
rules?: Record<string, unknown>[];
|
|
41
|
+
/** Flows to import. */
|
|
42
|
+
flows?: Record<string, unknown>[];
|
|
43
|
+
/** Contexts (entities) to import. */
|
|
44
|
+
contexts?: Record<string, unknown>[];
|
|
45
|
+
/** Dynamic values to import. */
|
|
46
|
+
values?: Record<string, unknown>[];
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./client/index.js"), exports);
|
|
18
18
|
__exportStar(require("./resources/index.js"), exports);
|
|
19
|
+
__exportStar(require("./types/index.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ExportAssetsResponse.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ExportAssetsResponse.js"), exports);
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
3
|
+
import * as core from "../../../../core/index.js";
|
|
4
|
+
import * as Rulebricks from "../../../index.js";
|
|
5
|
+
import { AdminClient } from "../resources/admin/client/Client.js";
|
|
6
|
+
import { RelationshipsClient } from "../resources/relationships/client/Client.js";
|
|
7
|
+
export declare namespace ContextsClient {
|
|
8
|
+
type Options = BaseClientOptions;
|
|
9
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Operations for managing and interacting with Contexts (Entities) and their instances
|
|
14
|
+
*/
|
|
15
|
+
export declare class ContextsClient {
|
|
16
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<ContextsClient.Options>;
|
|
17
|
+
protected _admin: AdminClient | undefined;
|
|
18
|
+
protected _relationships: RelationshipsClient | undefined;
|
|
19
|
+
constructor(options: ContextsClient.Options);
|
|
20
|
+
get admin(): AdminClient;
|
|
21
|
+
get relationships(): RelationshipsClient;
|
|
22
|
+
/**
|
|
23
|
+
* Retrieve the current state of a context instance.
|
|
24
|
+
*
|
|
25
|
+
* @param {Rulebricks.GetInstanceContextsRequest} request
|
|
26
|
+
* @param {ContextsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
|
+
*
|
|
28
|
+
* @throws {@link Rulebricks.NotFoundError}
|
|
29
|
+
* @throws {@link Rulebricks.InternalServerError}
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* await client.contexts.getInstance({
|
|
33
|
+
* slug: "customer",
|
|
34
|
+
* instance: "cust-12345"
|
|
35
|
+
* })
|
|
36
|
+
*/
|
|
37
|
+
getInstance(request: Rulebricks.GetInstanceContextsRequest, requestOptions?: ContextsClient.RequestOptions): core.HttpResponsePromise<Rulebricks.ContextInstanceState>;
|
|
38
|
+
private __getInstance;
|
|
39
|
+
/**
|
|
40
|
+
* Submit data to a context instance, creating it if it doesn't exist. May trigger bound rule/flow evaluations.
|
|
41
|
+
*
|
|
42
|
+
* @param {Rulebricks.SubmitContextsRequest} request
|
|
43
|
+
* @param {ContextsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
44
|
+
*
|
|
45
|
+
* @throws {@link Rulebricks.BadRequestError}
|
|
46
|
+
* @throws {@link Rulebricks.NotFoundError}
|
|
47
|
+
* @throws {@link Rulebricks.InternalServerError}
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* await client.contexts.submit({
|
|
51
|
+
* slug: "customer",
|
|
52
|
+
* instance: "cust-12345",
|
|
53
|
+
* body: {
|
|
54
|
+
* "email": "customer@example.com",
|
|
55
|
+
* "age": 30
|
|
56
|
+
* }
|
|
57
|
+
* })
|
|
58
|
+
*/
|
|
59
|
+
submit(request: Rulebricks.SubmitContextsRequest, requestOptions?: ContextsClient.RequestOptions): core.HttpResponsePromise<Rulebricks.SubmitContextDataResponse>;
|
|
60
|
+
private __submit;
|
|
61
|
+
/**
|
|
62
|
+
* Delete a specific context instance and its history.
|
|
63
|
+
*
|
|
64
|
+
* @param {Rulebricks.DeleteInstanceContextsRequest} request
|
|
65
|
+
* @param {ContextsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
66
|
+
*
|
|
67
|
+
* @throws {@link Rulebricks.NotFoundError}
|
|
68
|
+
* @throws {@link Rulebricks.InternalServerError}
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* await client.contexts.deleteInstance({
|
|
72
|
+
* slug: "customer",
|
|
73
|
+
* instance: "cust-12345"
|
|
74
|
+
* })
|
|
75
|
+
*/
|
|
76
|
+
deleteInstance(request: Rulebricks.DeleteInstanceContextsRequest, requestOptions?: ContextsClient.RequestOptions): core.HttpResponsePromise<Rulebricks.DeleteContextInstanceResponse>;
|
|
77
|
+
private __deleteInstance;
|
|
78
|
+
/**
|
|
79
|
+
* Retrieve the change history for a context instance.
|
|
80
|
+
*
|
|
81
|
+
* @param {Rulebricks.GetHistoryContextsRequest} request
|
|
82
|
+
* @param {ContextsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
83
|
+
*
|
|
84
|
+
* @throws {@link Rulebricks.NotFoundError}
|
|
85
|
+
* @throws {@link Rulebricks.InternalServerError}
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* await client.contexts.getHistory({
|
|
89
|
+
* slug: "customer",
|
|
90
|
+
* instance: "cust-12345"
|
|
91
|
+
* })
|
|
92
|
+
*/
|
|
93
|
+
getHistory(request: Rulebricks.GetHistoryContextsRequest, requestOptions?: ContextsClient.RequestOptions): core.HttpResponsePromise<Rulebricks.ContextInstanceHistory>;
|
|
94
|
+
private __getHistory;
|
|
95
|
+
/**
|
|
96
|
+
* Get list of rules/flows that need to be evaluated for this instance.
|
|
97
|
+
*
|
|
98
|
+
* @param {Rulebricks.GetPendingContextsRequest} request
|
|
99
|
+
* @param {ContextsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
100
|
+
*
|
|
101
|
+
* @throws {@link Rulebricks.NotFoundError}
|
|
102
|
+
* @throws {@link Rulebricks.InternalServerError}
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* await client.contexts.getPending({
|
|
106
|
+
* slug: "customer",
|
|
107
|
+
* instance: "cust-12345"
|
|
108
|
+
* })
|
|
109
|
+
*/
|
|
110
|
+
getPending(request: Rulebricks.GetPendingContextsRequest, requestOptions?: ContextsClient.RequestOptions): core.HttpResponsePromise<Rulebricks.ContextInstancePendingResponse>;
|
|
111
|
+
private __getPending;
|
|
112
|
+
/**
|
|
113
|
+
* Execute a specific rule using the context instance's state as input.
|
|
114
|
+
*
|
|
115
|
+
* @param {Rulebricks.SolveContextRuleRequest} request
|
|
116
|
+
* @param {ContextsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
117
|
+
*
|
|
118
|
+
* @throws {@link Rulebricks.BadRequestError}
|
|
119
|
+
* @throws {@link Rulebricks.NotFoundError}
|
|
120
|
+
* @throws {@link Rulebricks.InternalServerError}
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* await client.contexts.solve({
|
|
124
|
+
* slug: "customer",
|
|
125
|
+
* instance: "cust-12345",
|
|
126
|
+
* ruleSlug: "eligibility-check"
|
|
127
|
+
* })
|
|
128
|
+
*/
|
|
129
|
+
solve(request: Rulebricks.SolveContextRuleRequest, requestOptions?: ContextsClient.RequestOptions): core.HttpResponsePromise<Rulebricks.SolveContextRuleResponse>;
|
|
130
|
+
private __solve;
|
|
131
|
+
/**
|
|
132
|
+
* Trigger re-evaluation of all bound rules and flows for the instance.
|
|
133
|
+
*
|
|
134
|
+
* @param {Rulebricks.CascadeContextRequest} request
|
|
135
|
+
* @param {ContextsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
136
|
+
*
|
|
137
|
+
* @throws {@link Rulebricks.NotFoundError}
|
|
138
|
+
* @throws {@link Rulebricks.InternalServerError}
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* await client.contexts.cascade({
|
|
142
|
+
* slug: "customer",
|
|
143
|
+
* instance: "cust-12345"
|
|
144
|
+
* })
|
|
145
|
+
*/
|
|
146
|
+
cascade(request: Rulebricks.CascadeContextRequest, requestOptions?: ContextsClient.RequestOptions): core.HttpResponsePromise<Rulebricks.CascadeContextResponse>;
|
|
147
|
+
private __cascade;
|
|
148
|
+
/**
|
|
149
|
+
* Execute a specific flow using the context instance's state as input.
|
|
150
|
+
*
|
|
151
|
+
* @param {Rulebricks.SolveContextFlowRequest} request
|
|
152
|
+
* @param {ContextsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
153
|
+
*
|
|
154
|
+
* @throws {@link Rulebricks.BadRequestError}
|
|
155
|
+
* @throws {@link Rulebricks.NotFoundError}
|
|
156
|
+
* @throws {@link Rulebricks.InternalServerError}
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
* await client.contexts.execute({
|
|
160
|
+
* slug: "customer",
|
|
161
|
+
* instance: "cust-12345",
|
|
162
|
+
* flowSlug: "onboarding-flow"
|
|
163
|
+
* })
|
|
164
|
+
*/
|
|
165
|
+
execute(request: Rulebricks.SolveContextFlowRequest, requestOptions?: ContextsClient.RequestOptions): core.HttpResponsePromise<Rulebricks.SolveContextFlowResponse>;
|
|
166
|
+
private __execute;
|
|
167
|
+
}
|