@rulebricks/sdk 1.2.1 → 1.3.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 +12 -11
- package/Client.js +15 -15
- package/api/errors/BadRequestError.d.ts +1 -1
- package/api/errors/BadRequestError.js +1 -1
- package/api/errors/ForbiddenError.d.ts +3 -3
- package/api/errors/ForbiddenError.js +1 -1
- package/api/errors/InternalServerError.d.ts +1 -1
- package/api/errors/InternalServerError.js +1 -1
- package/api/errors/NotFoundError.d.ts +1 -1
- package/api/errors/NotFoundError.js +1 -1
- package/api/resources/assets/client/Client.d.ts +13 -120
- package/api/resources/assets/client/Client.js +17 -526
- package/api/resources/assets/client/index.d.ts +1 -1
- package/api/resources/assets/client/index.js +0 -15
- package/api/resources/assets/index.d.ts +1 -0
- package/api/resources/assets/index.js +1 -0
- package/api/resources/assets/resources/flows/client/Client.d.ts +42 -0
- package/api/resources/assets/resources/flows/client/Client.js +116 -0
- package/api/resources/assets/resources/flows/client/index.d.ts +1 -0
- package/api/resources/assets/resources/flows/index.d.ts +1 -0
- package/api/resources/assets/resources/flows/index.js +17 -0
- package/api/resources/assets/resources/folders/client/Client.d.ts +74 -0
- package/api/resources/assets/resources/folders/client/Client.js +248 -0
- package/api/resources/assets/resources/folders/client/requests/index.d.ts +2 -0
- package/api/resources/assets/resources/folders/index.d.ts +1 -0
- package/api/resources/assets/resources/folders/index.js +17 -0
- package/api/resources/assets/resources/index.d.ts +5 -0
- package/api/resources/assets/resources/index.js +34 -0
- package/api/resources/assets/resources/rules/client/Client.d.ts +94 -0
- package/api/resources/assets/resources/rules/client/Client.js +337 -0
- package/{dist/api/resources/assets/client/requests/ListRulesRequest.d.ts → api/resources/assets/resources/rules/client/requests/RulesListRequest.d.ts} +1 -1
- package/{dist/api/resources/assets/client/requests/ExportRuleRequest.d.ts → api/resources/assets/resources/rules/client/requests/RulesPullRequest.d.ts} +1 -1
- package/api/resources/assets/resources/rules/client/requests/index.d.ts +4 -0
- package/api/resources/assets/resources/rules/client/requests/index.js +2 -0
- package/api/resources/assets/resources/rules/index.d.ts +1 -0
- package/api/resources/assets/resources/rules/index.js +17 -0
- package/api/resources/decisions/client/Client.d.ts +7 -6
- package/api/resources/decisions/client/Client.js +13 -12
- package/{dist/api/resources/decisions/client/requests/QueryRequest.d.ts → api/resources/decisions/client/requests/DecisionsQueryRequest.d.ts} +1 -1
- package/api/resources/decisions/client/requests/index.d.ts +1 -1
- package/api/resources/flows/client/Client.d.ts +7 -6
- package/api/resources/flows/client/Client.js +13 -12
- package/api/resources/index.d.ts +0 -1
- package/api/resources/index.js +0 -1
- package/api/resources/rules/client/Client.d.ts +15 -14
- package/api/resources/rules/client/Client.js +35 -34
- package/api/resources/tests/client/Client.d.ts +8 -120
- package/api/resources/tests/client/Client.js +6 -441
- package/api/resources/tests/index.d.ts +1 -0
- package/api/resources/tests/index.js +1 -0
- package/api/resources/tests/resources/flows/client/Client.d.ts +82 -0
- package/api/resources/tests/resources/flows/client/Client.js +257 -0
- package/api/resources/tests/resources/flows/client/index.d.ts +1 -0
- package/api/resources/tests/resources/flows/client/index.js +2 -0
- package/api/resources/tests/resources/flows/index.d.ts +1 -0
- package/api/resources/tests/resources/flows/index.js +17 -0
- package/api/resources/tests/resources/index.d.ts +2 -0
- package/api/resources/tests/resources/index.js +28 -0
- package/api/resources/tests/resources/rules/client/Client.d.ts +82 -0
- package/api/resources/tests/resources/rules/client/Client.js +257 -0
- package/api/resources/tests/resources/rules/client/index.d.ts +1 -0
- package/api/resources/tests/resources/rules/client/index.js +2 -0
- package/api/resources/tests/resources/rules/index.d.ts +1 -0
- package/api/resources/tests/resources/rules/index.js +17 -0
- package/api/resources/users/client/Client.d.ts +12 -35
- package/api/resources/users/client/Client.js +21 -137
- package/api/resources/users/client/requests/UserInviteRequest.d.ts +2 -2
- package/api/resources/users/client/requests/index.d.ts +0 -1
- package/api/resources/users/index.d.ts +1 -0
- package/api/resources/users/index.js +1 -0
- package/api/resources/users/resources/groups/client/Client.d.ts +58 -0
- package/api/resources/users/resources/groups/client/Client.js +181 -0
- package/api/resources/users/resources/groups/client/index.d.ts +1 -0
- package/api/resources/users/resources/groups/client/index.js +17 -0
- package/api/resources/users/resources/groups/client/requests/index.d.ts +1 -0
- package/api/resources/users/resources/groups/client/requests/index.js +2 -0
- package/api/resources/users/resources/groups/index.d.ts +1 -0
- package/api/resources/users/resources/groups/index.js +17 -0
- package/api/resources/users/resources/index.d.ts +2 -0
- package/api/resources/users/resources/index.js +31 -0
- package/api/resources/values/client/Client.d.ts +15 -14
- package/api/resources/values/client/Client.js +35 -34
- package/api/resources/values/client/requests/UpdateValuesRequest.d.ts +2 -2
- package/{dist/api/resources/values/client/requests/DeleteRequest.d.ts → api/resources/values/client/requests/ValuesDeleteRequest.d.ts} +1 -1
- package/{dist/api/resources/values/client/requests/ListRequest.d.ts → api/resources/values/client/requests/ValuesListRequest.d.ts} +2 -2
- package/api/resources/values/client/requests/index.d.ts +2 -2
- package/api/types/BooleanValue.d.ts +2 -2
- package/api/types/BulkRuleResponseItem.d.ts +2 -2
- package/api/types/DecisionLog.d.ts +4 -4
- package/api/types/DecisionLogDecision.d.ts +2 -2
- package/api/types/DecisionLogResponse.d.ts +2 -2
- package/api/types/DynamicValue.d.ts +6 -6
- package/api/types/DynamicValueBase.d.ts +2 -2
- package/api/types/DynamicValueListResponse.d.ts +2 -2
- package/api/types/FlowDetail.d.ts +2 -2
- package/api/types/FlowListResponse.d.ts +2 -2
- package/api/types/FolderListResponse.d.ts +2 -2
- package/api/types/ListValue.d.ts +3 -3
- package/api/types/NumberValue.d.ts +2 -2
- package/api/types/ParallelSolveRequest.d.ts +2 -2
- package/api/types/ParallelSolveResponse.d.ts +2 -2
- package/api/types/RuleDetail.d.ts +5 -5
- package/api/types/RuleListResponse.d.ts +2 -2
- package/api/types/SchemaField.d.ts +3 -3
- package/api/types/StringValue.d.ts +2 -2
- package/api/types/Test.d.ts +2 -2
- package/api/types/TestListResponse.d.ts +2 -2
- package/api/types/TestTestState.d.ts +3 -3
- package/api/types/UserGroupListResponse.d.ts +2 -2
- package/api/types/UserInviteResponse.d.ts +2 -2
- package/dist/Client.d.ts +12 -11
- package/dist/Client.js +15 -15
- package/dist/api/errors/BadRequestError.d.ts +1 -1
- package/dist/api/errors/BadRequestError.js +1 -1
- package/dist/api/errors/ForbiddenError.d.ts +3 -3
- package/dist/api/errors/ForbiddenError.js +1 -1
- package/dist/api/errors/InternalServerError.d.ts +1 -1
- package/dist/api/errors/InternalServerError.js +1 -1
- package/dist/api/errors/NotFoundError.d.ts +1 -1
- package/dist/api/errors/NotFoundError.js +1 -1
- package/dist/api/resources/assets/client/Client.d.ts +13 -120
- package/dist/api/resources/assets/client/Client.js +17 -526
- package/dist/api/resources/assets/client/index.d.ts +1 -1
- package/dist/api/resources/assets/client/index.js +0 -15
- package/dist/api/resources/assets/index.d.ts +1 -0
- package/dist/api/resources/assets/index.js +1 -0
- package/dist/api/resources/assets/resources/flows/client/Client.d.ts +42 -0
- package/dist/api/resources/assets/resources/flows/client/Client.js +116 -0
- package/dist/api/resources/assets/resources/flows/client/index.d.ts +1 -0
- package/dist/api/resources/assets/resources/flows/client/index.js +2 -0
- package/dist/api/resources/assets/resources/flows/index.d.ts +1 -0
- package/dist/api/resources/assets/resources/flows/index.js +17 -0
- package/dist/api/resources/assets/resources/folders/client/Client.d.ts +74 -0
- package/dist/api/resources/assets/resources/folders/client/Client.js +248 -0
- package/dist/api/resources/assets/resources/folders/client/index.d.ts +1 -0
- package/dist/api/resources/assets/resources/folders/client/index.js +17 -0
- package/dist/api/resources/assets/resources/folders/client/requests/index.d.ts +2 -0
- package/dist/api/resources/assets/resources/folders/client/requests/index.js +2 -0
- package/dist/api/resources/assets/resources/folders/index.d.ts +1 -0
- package/dist/api/resources/assets/resources/folders/index.js +17 -0
- package/dist/api/resources/assets/resources/index.d.ts +5 -0
- package/dist/api/resources/assets/resources/index.js +34 -0
- package/dist/api/resources/assets/resources/rules/client/Client.d.ts +94 -0
- package/dist/api/resources/assets/resources/rules/client/Client.js +337 -0
- package/dist/api/resources/assets/resources/rules/client/index.d.ts +1 -0
- package/dist/api/resources/assets/resources/rules/client/index.js +17 -0
- package/{api/resources/assets/client/requests/ListRulesRequest.d.ts → dist/api/resources/assets/resources/rules/client/requests/RulesListRequest.d.ts} +1 -1
- package/{api/resources/assets/client/requests/ExportRuleRequest.d.ts → dist/api/resources/assets/resources/rules/client/requests/RulesPullRequest.d.ts} +1 -1
- package/dist/api/resources/assets/resources/rules/client/requests/index.d.ts +4 -0
- package/dist/api/resources/assets/resources/rules/client/requests/index.js +2 -0
- package/dist/api/resources/assets/resources/rules/index.d.ts +1 -0
- package/dist/api/resources/assets/resources/rules/index.js +17 -0
- package/dist/api/resources/decisions/client/Client.d.ts +7 -6
- package/dist/api/resources/decisions/client/Client.js +13 -12
- package/{api/resources/decisions/client/requests/QueryRequest.d.ts → dist/api/resources/decisions/client/requests/DecisionsQueryRequest.d.ts} +1 -1
- package/dist/api/resources/decisions/client/requests/index.d.ts +1 -1
- package/dist/api/resources/flows/client/Client.d.ts +7 -6
- package/dist/api/resources/flows/client/Client.js +13 -12
- package/dist/api/resources/index.d.ts +0 -1
- package/dist/api/resources/index.js +0 -1
- package/dist/api/resources/rules/client/Client.d.ts +15 -14
- package/dist/api/resources/rules/client/Client.js +35 -34
- package/dist/api/resources/tests/client/Client.d.ts +8 -120
- package/dist/api/resources/tests/client/Client.js +6 -441
- package/dist/api/resources/tests/index.d.ts +1 -0
- package/dist/api/resources/tests/index.js +1 -0
- package/dist/api/resources/tests/resources/flows/client/Client.d.ts +82 -0
- package/dist/api/resources/tests/resources/flows/client/Client.js +257 -0
- package/dist/api/resources/tests/resources/flows/client/index.d.ts +1 -0
- package/dist/api/resources/tests/resources/flows/client/index.js +2 -0
- package/dist/api/resources/tests/resources/flows/index.d.ts +1 -0
- package/dist/api/resources/tests/resources/flows/index.js +17 -0
- package/dist/api/resources/tests/resources/index.d.ts +2 -0
- package/dist/api/resources/tests/resources/index.js +28 -0
- package/dist/api/resources/tests/resources/rules/client/Client.d.ts +82 -0
- package/dist/api/resources/tests/resources/rules/client/Client.js +257 -0
- package/dist/api/resources/tests/resources/rules/client/index.d.ts +1 -0
- package/dist/api/resources/tests/resources/rules/client/index.js +2 -0
- package/dist/api/resources/tests/resources/rules/index.d.ts +1 -0
- package/dist/api/resources/tests/resources/rules/index.js +17 -0
- package/dist/api/resources/users/client/Client.d.ts +12 -35
- package/dist/api/resources/users/client/Client.js +21 -137
- package/dist/api/resources/users/client/requests/UserInviteRequest.d.ts +2 -2
- package/dist/api/resources/users/client/requests/index.d.ts +0 -1
- package/dist/api/resources/users/index.d.ts +1 -0
- package/dist/api/resources/users/index.js +1 -0
- package/dist/api/resources/users/resources/groups/client/Client.d.ts +58 -0
- package/dist/api/resources/users/resources/groups/client/Client.js +181 -0
- package/dist/api/resources/users/resources/groups/client/index.d.ts +1 -0
- package/dist/api/resources/users/resources/groups/client/index.js +17 -0
- package/dist/api/resources/users/resources/groups/client/requests/index.d.ts +1 -0
- package/dist/api/resources/users/resources/groups/client/requests/index.js +2 -0
- package/dist/api/resources/users/resources/groups/index.d.ts +1 -0
- package/dist/api/resources/users/resources/groups/index.js +17 -0
- package/dist/api/resources/users/resources/index.d.ts +2 -0
- package/dist/api/resources/users/resources/index.js +31 -0
- package/dist/api/resources/values/client/Client.d.ts +15 -14
- package/dist/api/resources/values/client/Client.js +35 -34
- package/dist/api/resources/values/client/requests/UpdateValuesRequest.d.ts +2 -2
- package/{api/resources/values/client/requests/DeleteRequest.d.ts → dist/api/resources/values/client/requests/ValuesDeleteRequest.d.ts} +1 -1
- package/{api/resources/values/client/requests/ListRequest.d.ts → dist/api/resources/values/client/requests/ValuesListRequest.d.ts} +2 -2
- package/dist/api/resources/values/client/requests/index.d.ts +2 -2
- package/dist/api/types/BooleanValue.d.ts +2 -2
- package/dist/api/types/BulkRuleResponseItem.d.ts +2 -2
- package/dist/api/types/DecisionLog.d.ts +4 -4
- package/dist/api/types/DecisionLogDecision.d.ts +2 -2
- package/dist/api/types/DecisionLogResponse.d.ts +2 -2
- package/dist/api/types/DynamicValue.d.ts +6 -6
- package/dist/api/types/DynamicValueBase.d.ts +2 -2
- package/dist/api/types/DynamicValueListResponse.d.ts +2 -2
- package/dist/api/types/FlowDetail.d.ts +2 -2
- package/dist/api/types/FlowListResponse.d.ts +2 -2
- package/dist/api/types/FolderListResponse.d.ts +2 -2
- package/dist/api/types/ListValue.d.ts +3 -3
- package/dist/api/types/NumberValue.d.ts +2 -2
- package/dist/api/types/ParallelSolveRequest.d.ts +2 -2
- package/dist/api/types/ParallelSolveResponse.d.ts +2 -2
- package/dist/api/types/RuleDetail.d.ts +5 -5
- package/dist/api/types/RuleListResponse.d.ts +2 -2
- package/dist/api/types/SchemaField.d.ts +3 -3
- package/dist/api/types/StringValue.d.ts +2 -2
- package/dist/api/types/Test.d.ts +2 -2
- package/dist/api/types/TestListResponse.d.ts +2 -2
- package/dist/api/types/TestTestState.d.ts +3 -3
- package/dist/api/types/UserGroupListResponse.d.ts +2 -2
- package/dist/api/types/UserInviteResponse.d.ts +2 -2
- package/dist/environments.d.ts +7 -0
- package/dist/environments.js +9 -0
- package/dist/errors/{RulebricksApiError.d.ts → RulebricksError.d.ts} +1 -1
- package/dist/errors/{RulebricksApiError.js → RulebricksError.js} +4 -4
- package/dist/errors/{RulebricksApiTimeoutError.d.ts → RulebricksTimeoutError.d.ts} +1 -1
- package/dist/errors/RulebricksTimeoutError.js +13 -0
- package/dist/errors/index.d.ts +2 -2
- package/dist/errors/index.js +5 -5
- package/dist/forge/rule.d.ts +2 -2
- package/dist/forge/rule.js +8 -8
- package/dist/forge/values.d.ts +2 -2
- package/dist/index.d.ts +4 -3
- package/dist/index.js +7 -5
- package/dist/serialization/resources/assets/index.d.ts +1 -1
- package/dist/serialization/resources/assets/index.js +1 -1
- package/dist/serialization/resources/assets/resources/folders/client/index.d.ts +1 -0
- package/dist/serialization/resources/assets/resources/folders/client/index.js +17 -0
- package/dist/serialization/resources/assets/resources/folders/client/requests/DeleteFolderRequest.d.ts +12 -0
- package/dist/serialization/resources/assets/{client → resources/folders/client}/requests/DeleteFolderRequest.js +1 -1
- package/{serialization/resources/assets → dist/serialization/resources/assets/resources/folders}/client/requests/UpsertFolderRequest.d.ts +4 -4
- package/{serialization/resources/assets → dist/serialization/resources/assets/resources/folders}/client/requests/UpsertFolderRequest.js +1 -1
- package/{serialization/resources/assets → dist/serialization/resources/assets/resources/folders}/client/requests/index.d.ts +0 -2
- package/dist/serialization/resources/assets/resources/folders/client/requests/index.js +7 -0
- package/dist/serialization/resources/assets/resources/folders/index.d.ts +1 -0
- package/dist/serialization/resources/assets/resources/folders/index.js +17 -0
- package/dist/serialization/resources/assets/resources/index.d.ts +4 -0
- package/dist/serialization/resources/assets/resources/index.js +33 -0
- package/dist/serialization/resources/assets/resources/rules/client/index.d.ts +1 -0
- package/dist/serialization/resources/assets/resources/rules/client/index.js +17 -0
- package/dist/serialization/resources/assets/resources/rules/client/requests/DeleteRuleRequest.d.ts +12 -0
- package/{serialization/resources/assets → dist/serialization/resources/assets/resources/rules}/client/requests/DeleteRuleRequest.js +1 -1
- package/dist/serialization/resources/assets/resources/rules/client/requests/ImportRuleRequest.d.ts +12 -0
- package/{serialization/resources/assets → dist/serialization/resources/assets/resources/rules}/client/requests/ImportRuleRequest.js +1 -1
- package/dist/serialization/resources/assets/resources/rules/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/assets/resources/rules/client/requests/index.js +7 -0
- package/dist/serialization/resources/assets/resources/rules/index.d.ts +1 -0
- package/dist/serialization/resources/assets/resources/rules/index.js +17 -0
- package/dist/serialization/resources/index.d.ts +1 -2
- package/dist/serialization/resources/index.js +1 -2
- package/dist/serialization/resources/rules/client/bulkSolve.d.ts +3 -3
- package/dist/serialization/resources/users/client/requests/UserInviteRequest.d.ts +2 -2
- package/dist/serialization/resources/users/client/requests/index.d.ts +0 -1
- package/dist/serialization/resources/users/client/requests/index.js +1 -3
- package/dist/serialization/resources/users/index.d.ts +1 -0
- package/dist/serialization/resources/users/index.js +1 -0
- package/dist/serialization/resources/users/resources/groups/client/index.d.ts +1 -0
- package/dist/serialization/resources/users/resources/groups/client/index.js +17 -0
- package/dist/serialization/resources/users/{client → resources/groups/client}/requests/CreateUserGroupRequest.d.ts +4 -4
- package/dist/serialization/resources/users/{client → resources/groups/client}/requests/CreateUserGroupRequest.js +1 -1
- package/dist/serialization/resources/users/resources/groups/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/users/resources/groups/client/requests/index.js +5 -0
- package/dist/serialization/resources/users/resources/groups/index.d.ts +1 -0
- package/dist/serialization/resources/users/resources/groups/index.js +17 -0
- package/dist/serialization/resources/users/resources/index.d.ts +2 -0
- package/dist/serialization/resources/users/resources/index.js +31 -0
- package/dist/serialization/resources/users/types/UserInviteRequestRole.d.ts +2 -2
- package/dist/serialization/resources/values/client/requests/UpdateValuesRequest.d.ts +2 -2
- package/dist/serialization/resources/values/types/UpdateValuesRequestValuesValue.d.ts +2 -2
- package/dist/serialization/types/BooleanValue.d.ts +2 -2
- package/dist/serialization/types/BulkRuleResponseItem.d.ts +2 -2
- package/dist/serialization/types/BulkRuleResponseItemError.d.ts +2 -2
- package/dist/serialization/types/CreateTestRequest.d.ts +2 -2
- package/dist/serialization/types/DecisionLog.d.ts +2 -2
- package/dist/serialization/types/DecisionLogDecision.d.ts +2 -2
- package/dist/serialization/types/DecisionLogDecisionConditionsItemValue.d.ts +2 -2
- package/dist/serialization/types/DecisionLogRequest.d.ts +2 -2
- package/dist/serialization/types/DecisionLogResponse.d.ts +2 -2
- package/dist/serialization/types/DynamicRequestPayload.d.ts +2 -2
- package/dist/serialization/types/DynamicResponsePayload.d.ts +2 -2
- package/dist/serialization/types/DynamicValue.d.ts +2 -2
- package/dist/serialization/types/DynamicValueBase.d.ts +2 -2
- package/dist/serialization/types/DynamicValueListResponse.d.ts +2 -2
- package/dist/serialization/types/Error_.d.ts +2 -2
- package/dist/serialization/types/FlowBase.d.ts +2 -2
- package/dist/serialization/types/FlowDetail.d.ts +2 -2
- package/dist/serialization/types/FlowExecutionError.d.ts +2 -2
- package/dist/serialization/types/FlowListResponse.d.ts +2 -2
- package/dist/serialization/types/Folder.d.ts +2 -2
- package/dist/serialization/types/FolderListResponse.d.ts +2 -2
- package/dist/serialization/types/ListValue.d.ts +2 -2
- package/dist/serialization/types/ListValueValueItem.d.ts +2 -2
- package/dist/serialization/types/NumberValue.d.ts +2 -2
- package/dist/serialization/types/ParallelSolveRequest.d.ts +2 -2
- package/dist/serialization/types/ParallelSolveRequestValue.d.ts +2 -2
- package/dist/serialization/types/ParallelSolveResponse.d.ts +2 -2
- package/dist/serialization/types/RuleBase.d.ts +2 -2
- package/dist/serialization/types/RuleDetail.d.ts +2 -2
- package/dist/serialization/types/RuleExport.d.ts +2 -2
- package/dist/serialization/types/RuleListResponse.d.ts +2 -2
- package/dist/serialization/types/RuleUsage.d.ts +2 -2
- package/dist/serialization/types/SchemaField.d.ts +2 -2
- package/dist/serialization/types/SchemaFieldDefaultValue.d.ts +2 -2
- package/dist/serialization/types/SchemaFieldType.d.ts +2 -2
- package/dist/serialization/types/StringValue.d.ts +2 -2
- package/dist/serialization/types/SuccessMessage.d.ts +2 -2
- package/dist/serialization/types/Test.d.ts +2 -2
- package/dist/serialization/types/TestListResponse.d.ts +2 -2
- package/dist/serialization/types/TestTestState.d.ts +2 -2
- package/dist/serialization/types/TestTestStateConditionsItemValue.d.ts +2 -2
- package/dist/serialization/types/TestTestStateEvaluationError.d.ts +2 -2
- package/dist/serialization/types/UsageStatistics.d.ts +2 -2
- package/dist/serialization/types/UserGroup.d.ts +2 -2
- package/dist/serialization/types/UserGroupListResponse.d.ts +2 -2
- package/dist/serialization/types/UserInviteResponse.d.ts +2 -2
- package/dist/serialization/types/UserInviteResponseUser.d.ts +2 -2
- package/dist/serialization/types/ValueLimits.d.ts +2 -2
- package/environments.d.ts +7 -0
- package/environments.js +9 -0
- package/errors/{RulebricksApiError.d.ts → RulebricksError.d.ts} +1 -1
- package/errors/{RulebricksApiError.js → RulebricksError.js} +4 -4
- package/errors/{RulebricksApiTimeoutError.d.ts → RulebricksTimeoutError.d.ts} +1 -1
- package/errors/RulebricksTimeoutError.js +13 -0
- package/errors/index.d.ts +2 -2
- package/errors/index.js +5 -5
- package/forge/rule.d.ts +2 -2
- package/forge/rule.js +8 -8
- package/forge/values.d.ts +2 -2
- package/index.d.ts +4 -3
- package/index.js +7 -5
- package/package.json +1 -1
- package/serialization/resources/assets/index.d.ts +1 -1
- package/serialization/resources/assets/index.js +1 -1
- package/serialization/resources/assets/resources/folders/client/index.d.ts +1 -0
- package/serialization/resources/assets/resources/folders/client/index.js +17 -0
- package/serialization/resources/assets/resources/folders/client/requests/DeleteFolderRequest.d.ts +12 -0
- package/serialization/resources/assets/{client → resources/folders/client}/requests/DeleteFolderRequest.js +1 -1
- package/{dist/serialization/resources/assets → serialization/resources/assets/resources/folders}/client/requests/UpsertFolderRequest.d.ts +4 -4
- package/{dist/serialization/resources/assets → serialization/resources/assets/resources/folders}/client/requests/UpsertFolderRequest.js +1 -1
- package/{dist/serialization/resources/assets → serialization/resources/assets/resources/folders}/client/requests/index.d.ts +0 -2
- package/serialization/resources/assets/resources/folders/client/requests/index.js +7 -0
- package/serialization/resources/assets/resources/folders/index.d.ts +1 -0
- package/serialization/resources/assets/resources/folders/index.js +17 -0
- package/serialization/resources/assets/resources/index.d.ts +4 -0
- package/serialization/resources/assets/resources/index.js +33 -0
- package/serialization/resources/assets/resources/rules/client/index.d.ts +1 -0
- package/serialization/resources/assets/resources/rules/client/index.js +17 -0
- package/serialization/resources/assets/resources/rules/client/requests/DeleteRuleRequest.d.ts +12 -0
- package/{dist/serialization/resources/assets → serialization/resources/assets/resources/rules}/client/requests/DeleteRuleRequest.js +1 -1
- package/serialization/resources/assets/resources/rules/client/requests/ImportRuleRequest.d.ts +12 -0
- package/{dist/serialization/resources/assets → serialization/resources/assets/resources/rules}/client/requests/ImportRuleRequest.js +1 -1
- package/serialization/resources/assets/resources/rules/client/requests/index.d.ts +2 -0
- package/serialization/resources/assets/resources/rules/client/requests/index.js +7 -0
- package/serialization/resources/assets/resources/rules/index.d.ts +1 -0
- package/serialization/resources/assets/resources/rules/index.js +17 -0
- package/serialization/resources/index.d.ts +1 -2
- package/serialization/resources/index.js +1 -2
- package/serialization/resources/rules/client/bulkSolve.d.ts +3 -3
- package/serialization/resources/users/client/requests/UserInviteRequest.d.ts +2 -2
- package/serialization/resources/users/client/requests/index.d.ts +0 -1
- package/serialization/resources/users/client/requests/index.js +1 -3
- package/serialization/resources/users/index.d.ts +1 -0
- package/serialization/resources/users/index.js +1 -0
- package/serialization/resources/users/resources/groups/client/index.d.ts +1 -0
- package/serialization/resources/users/resources/groups/client/index.js +17 -0
- package/serialization/resources/users/{client → resources/groups/client}/requests/CreateUserGroupRequest.d.ts +4 -4
- package/serialization/resources/users/{client → resources/groups/client}/requests/CreateUserGroupRequest.js +1 -1
- package/serialization/resources/users/resources/groups/client/requests/index.d.ts +1 -0
- package/serialization/resources/users/resources/groups/client/requests/index.js +5 -0
- package/serialization/resources/users/resources/groups/index.d.ts +1 -0
- package/serialization/resources/users/resources/groups/index.js +17 -0
- package/serialization/resources/users/resources/index.d.ts +2 -0
- package/serialization/resources/users/resources/index.js +31 -0
- package/serialization/resources/users/types/UserInviteRequestRole.d.ts +2 -2
- package/serialization/resources/values/client/requests/UpdateValuesRequest.d.ts +2 -2
- package/serialization/resources/values/types/UpdateValuesRequestValuesValue.d.ts +2 -2
- package/serialization/types/BooleanValue.d.ts +2 -2
- package/serialization/types/BulkRuleResponseItem.d.ts +2 -2
- package/serialization/types/BulkRuleResponseItemError.d.ts +2 -2
- package/serialization/types/CreateTestRequest.d.ts +2 -2
- package/serialization/types/DecisionLog.d.ts +2 -2
- package/serialization/types/DecisionLogDecision.d.ts +2 -2
- package/serialization/types/DecisionLogDecisionConditionsItemValue.d.ts +2 -2
- package/serialization/types/DecisionLogRequest.d.ts +2 -2
- package/serialization/types/DecisionLogResponse.d.ts +2 -2
- package/serialization/types/DynamicRequestPayload.d.ts +2 -2
- package/serialization/types/DynamicResponsePayload.d.ts +2 -2
- package/serialization/types/DynamicValue.d.ts +2 -2
- package/serialization/types/DynamicValueBase.d.ts +2 -2
- package/serialization/types/DynamicValueListResponse.d.ts +2 -2
- package/serialization/types/Error_.d.ts +2 -2
- package/serialization/types/FlowBase.d.ts +2 -2
- package/serialization/types/FlowDetail.d.ts +2 -2
- package/serialization/types/FlowExecutionError.d.ts +2 -2
- package/serialization/types/FlowListResponse.d.ts +2 -2
- package/serialization/types/Folder.d.ts +2 -2
- package/serialization/types/FolderListResponse.d.ts +2 -2
- package/serialization/types/ListValue.d.ts +2 -2
- package/serialization/types/ListValueValueItem.d.ts +2 -2
- package/serialization/types/NumberValue.d.ts +2 -2
- package/serialization/types/ParallelSolveRequest.d.ts +2 -2
- package/serialization/types/ParallelSolveRequestValue.d.ts +2 -2
- package/serialization/types/ParallelSolveResponse.d.ts +2 -2
- package/serialization/types/RuleBase.d.ts +2 -2
- package/serialization/types/RuleDetail.d.ts +2 -2
- package/serialization/types/RuleExport.d.ts +2 -2
- package/serialization/types/RuleListResponse.d.ts +2 -2
- package/serialization/types/RuleUsage.d.ts +2 -2
- package/serialization/types/SchemaField.d.ts +2 -2
- package/serialization/types/SchemaFieldDefaultValue.d.ts +2 -2
- package/serialization/types/SchemaFieldType.d.ts +2 -2
- package/serialization/types/StringValue.d.ts +2 -2
- package/serialization/types/SuccessMessage.d.ts +2 -2
- package/serialization/types/Test.d.ts +2 -2
- package/serialization/types/TestListResponse.d.ts +2 -2
- package/serialization/types/TestTestState.d.ts +2 -2
- package/serialization/types/TestTestStateConditionsItemValue.d.ts +2 -2
- package/serialization/types/TestTestStateEvaluationError.d.ts +2 -2
- package/serialization/types/UsageStatistics.d.ts +2 -2
- package/serialization/types/UserGroup.d.ts +2 -2
- package/serialization/types/UserGroupListResponse.d.ts +2 -2
- package/serialization/types/UserInviteResponse.d.ts +2 -2
- package/serialization/types/UserInviteResponseUser.d.ts +2 -2
- package/serialization/types/ValueLimits.d.ts +2 -2
- package/api/resources/assets/client/requests/index.d.ts +0 -6
- package/dist/api/resources/assets/client/requests/index.d.ts +0 -6
- package/dist/errors/RulebricksApiTimeoutError.js +0 -13
- package/dist/serialization/resources/assets/client/requests/DeleteFolderRequest.d.ts +0 -12
- package/dist/serialization/resources/assets/client/requests/DeleteRuleRequest.d.ts +0 -12
- package/dist/serialization/resources/assets/client/requests/ImportRuleRequest.d.ts +0 -12
- package/dist/serialization/resources/assets/client/requests/index.js +0 -11
- package/errors/RulebricksApiTimeoutError.js +0 -13
- package/serialization/resources/assets/client/requests/DeleteFolderRequest.d.ts +0 -12
- package/serialization/resources/assets/client/requests/DeleteRuleRequest.d.ts +0 -12
- package/serialization/resources/assets/client/requests/ImportRuleRequest.d.ts +0 -12
- package/serialization/resources/assets/client/requests/index.js +0 -11
- /package/api/resources/assets/{client/requests → resources/flows/client}/index.js +0 -0
- /package/{dist/serialization/resources/assets → api/resources/assets/resources/folders}/client/index.d.ts +0 -0
- /package/{dist/serialization/resources/assets → api/resources/assets/resources/folders}/client/index.js +0 -0
- /package/api/resources/assets/{client → resources/folders/client}/requests/DeleteFolderRequest.d.ts +0 -0
- /package/api/resources/assets/{client → resources/folders/client}/requests/DeleteFolderRequest.js +0 -0
- /package/api/resources/assets/{client → resources/folders/client}/requests/UpsertFolderRequest.d.ts +0 -0
- /package/api/resources/assets/{client → resources/folders/client}/requests/UpsertFolderRequest.js +0 -0
- /package/{dist/api/resources/assets → api/resources/assets/resources/folders}/client/requests/index.js +0 -0
- /package/{serialization/resources/assets → api/resources/assets/resources/rules}/client/index.d.ts +0 -0
- /package/{serialization/resources/assets → api/resources/assets/resources/rules}/client/index.js +0 -0
- /package/api/resources/assets/{client → resources/rules/client}/requests/DeleteRuleRequest.d.ts +0 -0
- /package/api/resources/assets/{client → resources/rules/client}/requests/DeleteRuleRequest.js +0 -0
- /package/api/resources/assets/{client → resources/rules/client}/requests/ImportRuleRequest.d.ts +0 -0
- /package/api/resources/assets/{client → resources/rules/client}/requests/ImportRuleRequest.js +0 -0
- /package/api/resources/assets/{client/requests/ExportRuleRequest.js → resources/rules/client/requests/RulesListRequest.js} +0 -0
- /package/api/resources/assets/{client/requests/ListRulesRequest.js → resources/rules/client/requests/RulesPullRequest.js} +0 -0
- /package/api/resources/decisions/client/requests/{QueryRequest.js → DecisionsQueryRequest.js} +0 -0
- /package/api/resources/users/{client → resources/groups/client}/requests/CreateUserGroupRequest.d.ts +0 -0
- /package/api/resources/users/{client → resources/groups/client}/requests/CreateUserGroupRequest.js +0 -0
- /package/api/resources/values/client/requests/{DeleteRequest.js → ValuesDeleteRequest.js} +0 -0
- /package/api/resources/values/client/requests/{ListRequest.js → ValuesListRequest.js} +0 -0
- /package/dist/api/resources/assets/{client → resources/folders/client}/requests/DeleteFolderRequest.d.ts +0 -0
- /package/dist/api/resources/assets/{client → resources/folders/client}/requests/DeleteFolderRequest.js +0 -0
- /package/dist/api/resources/assets/{client → resources/folders/client}/requests/UpsertFolderRequest.d.ts +0 -0
- /package/dist/api/resources/assets/{client → resources/folders/client}/requests/UpsertFolderRequest.js +0 -0
- /package/dist/api/resources/assets/{client → resources/rules/client}/requests/DeleteRuleRequest.d.ts +0 -0
- /package/dist/api/resources/assets/{client → resources/rules/client}/requests/DeleteRuleRequest.js +0 -0
- /package/dist/api/resources/assets/{client → resources/rules/client}/requests/ImportRuleRequest.d.ts +0 -0
- /package/dist/api/resources/assets/{client → resources/rules/client}/requests/ImportRuleRequest.js +0 -0
- /package/dist/api/resources/assets/{client/requests/ExportRuleRequest.js → resources/rules/client/requests/RulesListRequest.js} +0 -0
- /package/dist/api/resources/assets/{client/requests/ListRulesRequest.js → resources/rules/client/requests/RulesPullRequest.js} +0 -0
- /package/dist/api/resources/decisions/client/requests/{QueryRequest.js → DecisionsQueryRequest.js} +0 -0
- /package/dist/api/resources/users/{client → resources/groups/client}/requests/CreateUserGroupRequest.d.ts +0 -0
- /package/dist/api/resources/users/{client → resources/groups/client}/requests/CreateUserGroupRequest.js +0 -0
- /package/dist/api/resources/values/client/requests/{DeleteRequest.js → ValuesDeleteRequest.js} +0 -0
- /package/dist/api/resources/values/client/requests/{ListRequest.js → ValuesListRequest.js} +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.groups = void 0;
|
|
30
|
+
exports.groups = __importStar(require("./groups"));
|
|
31
|
+
__exportStar(require("./groups/client/requests"), exports);
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as environments from "../../../../environments";
|
|
4
5
|
import * as core from "../../../../core";
|
|
5
|
-
import * as
|
|
6
|
+
import * as Rulebricks from "../../../index";
|
|
6
7
|
export declare namespace Values {
|
|
7
8
|
interface Options {
|
|
8
|
-
environment
|
|
9
|
+
environment?: core.Supplier<environments.RulebricksEnvironment | string>;
|
|
9
10
|
/** Specify a custom URL to connect the client to. */
|
|
10
11
|
baseUrl?: core.Supplier<string>;
|
|
11
12
|
apiKey: core.Supplier<string>;
|
|
@@ -30,23 +31,23 @@ export declare class Values {
|
|
|
30
31
|
/**
|
|
31
32
|
* Retrieve all dynamic values for the authenticated user.
|
|
32
33
|
*
|
|
33
|
-
* @param {
|
|
34
|
+
* @param {Rulebricks.ValuesListRequest} request
|
|
34
35
|
* @param {Values.RequestOptions} requestOptions - Request-specific configuration.
|
|
35
36
|
*
|
|
36
|
-
* @throws {@link
|
|
37
|
+
* @throws {@link Rulebricks.InternalServerError}
|
|
37
38
|
*
|
|
38
39
|
* @example
|
|
39
40
|
* await client.values.list()
|
|
40
41
|
*/
|
|
41
|
-
list(request?:
|
|
42
|
+
list(request?: Rulebricks.ValuesListRequest, requestOptions?: Values.RequestOptions): Promise<Rulebricks.DynamicValueListResponse>;
|
|
42
43
|
/**
|
|
43
44
|
* Update existing dynamic values or add new ones for the authenticated user.
|
|
44
45
|
*
|
|
45
|
-
* @param {
|
|
46
|
+
* @param {Rulebricks.UpdateValuesRequest} request
|
|
46
47
|
* @param {Values.RequestOptions} requestOptions - Request-specific configuration.
|
|
47
48
|
*
|
|
48
|
-
* @throws {@link
|
|
49
|
-
* @throws {@link
|
|
49
|
+
* @throws {@link Rulebricks.BadRequestError}
|
|
50
|
+
* @throws {@link Rulebricks.InternalServerError}
|
|
50
51
|
*
|
|
51
52
|
* @example
|
|
52
53
|
* await client.values.update({
|
|
@@ -59,23 +60,23 @@ export declare class Values {
|
|
|
59
60
|
* accessGroups: ["marketing", "developers"]
|
|
60
61
|
* })
|
|
61
62
|
*/
|
|
62
|
-
update(request:
|
|
63
|
+
update(request: Rulebricks.UpdateValuesRequest, requestOptions?: Values.RequestOptions): Promise<Rulebricks.DynamicValueListResponse>;
|
|
63
64
|
/**
|
|
64
65
|
* Delete a specific dynamic value for the authenticated user by its ID.
|
|
65
66
|
*
|
|
66
|
-
* @param {
|
|
67
|
+
* @param {Rulebricks.ValuesDeleteRequest} request
|
|
67
68
|
* @param {Values.RequestOptions} requestOptions - Request-specific configuration.
|
|
68
69
|
*
|
|
69
|
-
* @throws {@link
|
|
70
|
-
* @throws {@link
|
|
71
|
-
* @throws {@link
|
|
70
|
+
* @throws {@link Rulebricks.BadRequestError}
|
|
71
|
+
* @throws {@link Rulebricks.NotFoundError}
|
|
72
|
+
* @throws {@link Rulebricks.InternalServerError}
|
|
72
73
|
*
|
|
73
74
|
* @example
|
|
74
75
|
* await client.values.delete({
|
|
75
76
|
* id: "id"
|
|
76
77
|
* })
|
|
77
78
|
*/
|
|
78
|
-
delete(request:
|
|
79
|
+
delete(request: Rulebricks.ValuesDeleteRequest, requestOptions?: Values.RequestOptions): Promise<Rulebricks.SuccessMessage>;
|
|
79
80
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
80
81
|
"x-api-key": string;
|
|
81
82
|
}>;
|
|
@@ -39,8 +39,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
39
39
|
};
|
|
40
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
41
|
exports.Values = void 0;
|
|
42
|
+
const environments = __importStar(require("../../../../environments"));
|
|
42
43
|
const core = __importStar(require("../../../../core"));
|
|
43
|
-
const
|
|
44
|
+
const Rulebricks = __importStar(require("../../../index"));
|
|
44
45
|
const url_join_1 = __importDefault(require("url-join"));
|
|
45
46
|
const serializers = __importStar(require("../../../../serialization/index"));
|
|
46
47
|
const errors = __importStar(require("../../../../errors/index"));
|
|
@@ -54,16 +55,16 @@ class Values {
|
|
|
54
55
|
/**
|
|
55
56
|
* Retrieve all dynamic values for the authenticated user.
|
|
56
57
|
*
|
|
57
|
-
* @param {
|
|
58
|
+
* @param {Rulebricks.ValuesListRequest} request
|
|
58
59
|
* @param {Values.RequestOptions} requestOptions - Request-specific configuration.
|
|
59
60
|
*
|
|
60
|
-
* @throws {@link
|
|
61
|
+
* @throws {@link Rulebricks.InternalServerError}
|
|
61
62
|
*
|
|
62
63
|
* @example
|
|
63
64
|
* await client.values.list()
|
|
64
65
|
*/
|
|
65
66
|
list(request = {}, requestOptions) {
|
|
66
|
-
var _a;
|
|
67
|
+
var _a, _b;
|
|
67
68
|
return __awaiter(this, void 0, void 0, function* () {
|
|
68
69
|
const { name } = request;
|
|
69
70
|
const _queryParams = {};
|
|
@@ -71,7 +72,7 @@ class Values {
|
|
|
71
72
|
_queryParams["name"] = name;
|
|
72
73
|
}
|
|
73
74
|
const _response = yield core.fetcher({
|
|
74
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), "
|
|
75
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.RulebricksEnvironment.Default, "values"),
|
|
75
76
|
method: "GET",
|
|
76
77
|
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
77
78
|
contentType: "application/json",
|
|
@@ -92,9 +93,9 @@ class Values {
|
|
|
92
93
|
if (_response.error.reason === "status-code") {
|
|
93
94
|
switch (_response.error.statusCode) {
|
|
94
95
|
case 500:
|
|
95
|
-
throw new
|
|
96
|
+
throw new Rulebricks.InternalServerError(_response.error.body);
|
|
96
97
|
default:
|
|
97
|
-
throw new errors.
|
|
98
|
+
throw new errors.RulebricksError({
|
|
98
99
|
statusCode: _response.error.statusCode,
|
|
99
100
|
body: _response.error.body,
|
|
100
101
|
});
|
|
@@ -102,14 +103,14 @@ class Values {
|
|
|
102
103
|
}
|
|
103
104
|
switch (_response.error.reason) {
|
|
104
105
|
case "non-json":
|
|
105
|
-
throw new errors.
|
|
106
|
+
throw new errors.RulebricksError({
|
|
106
107
|
statusCode: _response.error.statusCode,
|
|
107
108
|
body: _response.error.rawBody,
|
|
108
109
|
});
|
|
109
110
|
case "timeout":
|
|
110
|
-
throw new errors.
|
|
111
|
+
throw new errors.RulebricksTimeoutError("Timeout exceeded when calling GET /values.");
|
|
111
112
|
case "unknown":
|
|
112
|
-
throw new errors.
|
|
113
|
+
throw new errors.RulebricksError({
|
|
113
114
|
message: _response.error.errorMessage,
|
|
114
115
|
});
|
|
115
116
|
}
|
|
@@ -118,11 +119,11 @@ class Values {
|
|
|
118
119
|
/**
|
|
119
120
|
* Update existing dynamic values or add new ones for the authenticated user.
|
|
120
121
|
*
|
|
121
|
-
* @param {
|
|
122
|
+
* @param {Rulebricks.UpdateValuesRequest} request
|
|
122
123
|
* @param {Values.RequestOptions} requestOptions - Request-specific configuration.
|
|
123
124
|
*
|
|
124
|
-
* @throws {@link
|
|
125
|
-
* @throws {@link
|
|
125
|
+
* @throws {@link Rulebricks.BadRequestError}
|
|
126
|
+
* @throws {@link Rulebricks.InternalServerError}
|
|
126
127
|
*
|
|
127
128
|
* @example
|
|
128
129
|
* await client.values.update({
|
|
@@ -136,10 +137,10 @@ class Values {
|
|
|
136
137
|
* })
|
|
137
138
|
*/
|
|
138
139
|
update(request, requestOptions) {
|
|
139
|
-
var _a;
|
|
140
|
+
var _a, _b;
|
|
140
141
|
return __awaiter(this, void 0, void 0, function* () {
|
|
141
142
|
const _response = yield core.fetcher({
|
|
142
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), "
|
|
143
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.RulebricksEnvironment.Default, "values"),
|
|
143
144
|
method: "POST",
|
|
144
145
|
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
145
146
|
contentType: "application/json",
|
|
@@ -160,11 +161,11 @@ class Values {
|
|
|
160
161
|
if (_response.error.reason === "status-code") {
|
|
161
162
|
switch (_response.error.statusCode) {
|
|
162
163
|
case 400:
|
|
163
|
-
throw new
|
|
164
|
+
throw new Rulebricks.BadRequestError(_response.error.body);
|
|
164
165
|
case 500:
|
|
165
|
-
throw new
|
|
166
|
+
throw new Rulebricks.InternalServerError(_response.error.body);
|
|
166
167
|
default:
|
|
167
|
-
throw new errors.
|
|
168
|
+
throw new errors.RulebricksError({
|
|
168
169
|
statusCode: _response.error.statusCode,
|
|
169
170
|
body: _response.error.body,
|
|
170
171
|
});
|
|
@@ -172,14 +173,14 @@ class Values {
|
|
|
172
173
|
}
|
|
173
174
|
switch (_response.error.reason) {
|
|
174
175
|
case "non-json":
|
|
175
|
-
throw new errors.
|
|
176
|
+
throw new errors.RulebricksError({
|
|
176
177
|
statusCode: _response.error.statusCode,
|
|
177
178
|
body: _response.error.rawBody,
|
|
178
179
|
});
|
|
179
180
|
case "timeout":
|
|
180
|
-
throw new errors.
|
|
181
|
+
throw new errors.RulebricksTimeoutError("Timeout exceeded when calling POST /values.");
|
|
181
182
|
case "unknown":
|
|
182
|
-
throw new errors.
|
|
183
|
+
throw new errors.RulebricksError({
|
|
183
184
|
message: _response.error.errorMessage,
|
|
184
185
|
});
|
|
185
186
|
}
|
|
@@ -188,12 +189,12 @@ class Values {
|
|
|
188
189
|
/**
|
|
189
190
|
* Delete a specific dynamic value for the authenticated user by its ID.
|
|
190
191
|
*
|
|
191
|
-
* @param {
|
|
192
|
+
* @param {Rulebricks.ValuesDeleteRequest} request
|
|
192
193
|
* @param {Values.RequestOptions} requestOptions - Request-specific configuration.
|
|
193
194
|
*
|
|
194
|
-
* @throws {@link
|
|
195
|
-
* @throws {@link
|
|
196
|
-
* @throws {@link
|
|
195
|
+
* @throws {@link Rulebricks.BadRequestError}
|
|
196
|
+
* @throws {@link Rulebricks.NotFoundError}
|
|
197
|
+
* @throws {@link Rulebricks.InternalServerError}
|
|
197
198
|
*
|
|
198
199
|
* @example
|
|
199
200
|
* await client.values.delete({
|
|
@@ -201,13 +202,13 @@ class Values {
|
|
|
201
202
|
* })
|
|
202
203
|
*/
|
|
203
204
|
delete(request, requestOptions) {
|
|
204
|
-
var _a;
|
|
205
|
+
var _a, _b;
|
|
205
206
|
return __awaiter(this, void 0, void 0, function* () {
|
|
206
207
|
const { id } = request;
|
|
207
208
|
const _queryParams = {};
|
|
208
209
|
_queryParams["id"] = id;
|
|
209
210
|
const _response = yield core.fetcher({
|
|
210
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), "
|
|
211
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.RulebricksEnvironment.Default, "values"),
|
|
211
212
|
method: "DELETE",
|
|
212
213
|
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
213
214
|
contentType: "application/json",
|
|
@@ -228,13 +229,13 @@ class Values {
|
|
|
228
229
|
if (_response.error.reason === "status-code") {
|
|
229
230
|
switch (_response.error.statusCode) {
|
|
230
231
|
case 400:
|
|
231
|
-
throw new
|
|
232
|
+
throw new Rulebricks.BadRequestError(_response.error.body);
|
|
232
233
|
case 404:
|
|
233
|
-
throw new
|
|
234
|
+
throw new Rulebricks.NotFoundError(_response.error.body);
|
|
234
235
|
case 500:
|
|
235
|
-
throw new
|
|
236
|
+
throw new Rulebricks.InternalServerError(_response.error.body);
|
|
236
237
|
default:
|
|
237
|
-
throw new errors.
|
|
238
|
+
throw new errors.RulebricksError({
|
|
238
239
|
statusCode: _response.error.statusCode,
|
|
239
240
|
body: _response.error.body,
|
|
240
241
|
});
|
|
@@ -242,14 +243,14 @@ class Values {
|
|
|
242
243
|
}
|
|
243
244
|
switch (_response.error.reason) {
|
|
244
245
|
case "non-json":
|
|
245
|
-
throw new errors.
|
|
246
|
+
throw new errors.RulebricksError({
|
|
246
247
|
statusCode: _response.error.statusCode,
|
|
247
248
|
body: _response.error.rawBody,
|
|
248
249
|
});
|
|
249
250
|
case "timeout":
|
|
250
|
-
throw new errors.
|
|
251
|
+
throw new errors.RulebricksTimeoutError("Timeout exceeded when calling DELETE /values.");
|
|
251
252
|
case "unknown":
|
|
252
|
-
throw new errors.
|
|
253
|
+
throw new errors.RulebricksError({
|
|
253
254
|
message: _response.error.errorMessage,
|
|
254
255
|
});
|
|
255
256
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
4
|
+
import * as Rulebricks from "../../../../index";
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
@@ -16,7 +16,7 @@ import * as RulebricksApi from "../../../../index";
|
|
|
16
16
|
*/
|
|
17
17
|
export interface UpdateValuesRequest {
|
|
18
18
|
/** A flat dictionary of keys and values to update or add. */
|
|
19
|
-
values: Record<string,
|
|
19
|
+
values: Record<string, Rulebricks.UpdateValuesRequestValuesValue>;
|
|
20
20
|
/** Optional array of access group names or IDs. If omitted and user belongs to access groups, values will be assigned to all user's access groups. Required if values should be restricted to specific access groups. */
|
|
21
21
|
accessGroups?: string[];
|
|
22
22
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { type
|
|
1
|
+
export { type ValuesListRequest } from "./ValuesListRequest";
|
|
2
2
|
export { type UpdateValuesRequest } from "./UpdateValuesRequest";
|
|
3
|
-
export { type
|
|
3
|
+
export { type ValuesDeleteRequest } from "./ValuesDeleteRequest";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
5
|
-
export interface BooleanValue extends
|
|
4
|
+
import * as Rulebricks from "../index";
|
|
5
|
+
export interface BooleanValue extends Rulebricks.DynamicValueBase {
|
|
6
6
|
/** The boolean value */
|
|
7
7
|
value?: boolean;
|
|
8
8
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
4
|
+
import * as Rulebricks from "../index";
|
|
5
5
|
/**
|
|
6
6
|
* Individual response item from a bulk rule execution
|
|
7
7
|
*/
|
|
8
|
-
export declare type BulkRuleResponseItem =
|
|
8
|
+
export declare type BulkRuleResponseItem = Rulebricks.DynamicResponsePayload | Rulebricks.BulkRuleResponseItemError;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
4
|
+
import * as Rulebricks from "../index";
|
|
5
5
|
export interface DecisionLog {
|
|
6
|
-
request?:
|
|
7
|
-
response?:
|
|
8
|
-
decision?:
|
|
6
|
+
request?: Rulebricks.DecisionLogRequest;
|
|
7
|
+
response?: Rulebricks.DecisionLogResponse;
|
|
8
|
+
decision?: Rulebricks.DecisionLogDecision;
|
|
9
9
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
4
|
+
import * as Rulebricks from "../index";
|
|
5
5
|
export interface DecisionLogDecision {
|
|
6
|
-
conditions?: Record<string,
|
|
6
|
+
conditions?: Record<string, Rulebricks.DecisionLogDecisionConditionsItemValue>[];
|
|
7
7
|
successIdxs?: number[];
|
|
8
8
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
4
|
+
import * as Rulebricks from "../index";
|
|
5
5
|
export interface DecisionLogResponse {
|
|
6
|
-
data?:
|
|
6
|
+
data?: Rulebricks.DecisionLog[];
|
|
7
7
|
/** Pagination cursor for next page */
|
|
8
8
|
cursor?: string;
|
|
9
9
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
5
|
-
export declare type DynamicValue =
|
|
4
|
+
import * as Rulebricks from "../index";
|
|
5
|
+
export declare type DynamicValue = Rulebricks.DynamicValue.String | Rulebricks.DynamicValue.Number | Rulebricks.DynamicValue.Boolean | Rulebricks.DynamicValue.List;
|
|
6
6
|
export declare namespace DynamicValue {
|
|
7
|
-
interface String extends
|
|
7
|
+
interface String extends Rulebricks.StringValue {
|
|
8
8
|
type: "string";
|
|
9
9
|
}
|
|
10
|
-
interface Number extends
|
|
10
|
+
interface Number extends Rulebricks.NumberValue {
|
|
11
11
|
type: "number";
|
|
12
12
|
}
|
|
13
|
-
interface Boolean extends
|
|
13
|
+
interface Boolean extends Rulebricks.BooleanValue {
|
|
14
14
|
type: "boolean";
|
|
15
15
|
}
|
|
16
|
-
interface List extends
|
|
16
|
+
interface List extends Rulebricks.ListValue {
|
|
17
17
|
type: "list";
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
4
|
+
import * as Rulebricks from "../index";
|
|
5
5
|
export interface DynamicValueBase {
|
|
6
6
|
/** Unique identifier for the dynamic value. */
|
|
7
7
|
id?: string;
|
|
8
8
|
/** Name of the dynamic value. */
|
|
9
9
|
name?: string;
|
|
10
10
|
/** Rules that use this dynamic value. */
|
|
11
|
-
usages?:
|
|
11
|
+
usages?: Rulebricks.RuleUsage[];
|
|
12
12
|
/** Access groups assigned to this value. */
|
|
13
13
|
accessGroups?: string[];
|
|
14
14
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
5
|
-
export declare type DynamicValueListResponse =
|
|
4
|
+
import * as Rulebricks from "../index";
|
|
5
|
+
export declare type DynamicValueListResponse = Rulebricks.DynamicValue[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
5
|
-
export interface FlowDetail extends
|
|
4
|
+
import * as Rulebricks from "../index";
|
|
5
|
+
export interface FlowDetail extends Rulebricks.FlowBase {
|
|
6
6
|
/** Whether the flow is published. */
|
|
7
7
|
published?: boolean;
|
|
8
8
|
/** The date this flow was last updated. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
5
|
-
export declare type FlowListResponse =
|
|
4
|
+
import * as Rulebricks from "../index";
|
|
5
|
+
export declare type FlowListResponse = Rulebricks.FlowDetail[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
5
|
-
export declare type FolderListResponse =
|
|
4
|
+
import * as Rulebricks from "../index";
|
|
5
|
+
export declare type FolderListResponse = Rulebricks.Folder[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
5
|
-
export interface ListValue extends
|
|
4
|
+
import * as Rulebricks from "../index";
|
|
5
|
+
export interface ListValue extends Rulebricks.DynamicValueBase {
|
|
6
6
|
/** The list value */
|
|
7
|
-
value?:
|
|
7
|
+
value?: Rulebricks.ListValueValueItem[];
|
|
8
8
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
5
|
-
export interface NumberValue extends
|
|
4
|
+
import * as Rulebricks from "../index";
|
|
5
|
+
export interface NumberValue extends Rulebricks.DynamicValueBase {
|
|
6
6
|
/** The numeric value */
|
|
7
7
|
value?: number;
|
|
8
8
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
4
|
+
import * as Rulebricks from "../index";
|
|
5
5
|
/**
|
|
6
6
|
* A request containing multiple rule/flow executions to be run in parallel.
|
|
7
7
|
*/
|
|
8
|
-
export declare type ParallelSolveRequest = Record<string,
|
|
8
|
+
export declare type ParallelSolveRequest = Record<string, Rulebricks.ParallelSolveRequestValue>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
4
|
+
import * as Rulebricks from "../index";
|
|
5
5
|
/**
|
|
6
6
|
* Response from parallel rule/flow execution with results from each execution.
|
|
7
7
|
*/
|
|
8
|
-
export declare type ParallelSolveResponse = Record<string,
|
|
8
|
+
export declare type ParallelSolveResponse = Record<string, Rulebricks.DynamicResponsePayload>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
5
|
-
export interface RuleDetail extends
|
|
4
|
+
import * as Rulebricks from "../index";
|
|
5
|
+
export interface RuleDetail extends Rulebricks.RuleBase {
|
|
6
6
|
/** The date this rule was created. */
|
|
7
7
|
createdAt?: Date;
|
|
8
|
-
folder?:
|
|
8
|
+
folder?: Rulebricks.Folder;
|
|
9
9
|
/** The published request schema for the rule. */
|
|
10
|
-
requestSchema?:
|
|
10
|
+
requestSchema?: Rulebricks.SchemaField[];
|
|
11
11
|
/** The published response schema for the rule. */
|
|
12
|
-
responseSchema?:
|
|
12
|
+
responseSchema?: Rulebricks.SchemaField[];
|
|
13
13
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
5
|
-
export declare type RuleListResponse =
|
|
4
|
+
import * as Rulebricks from "../index";
|
|
5
|
+
export declare type RuleListResponse = Rulebricks.RuleDetail[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
4
|
+
import * as Rulebricks from "../index";
|
|
5
5
|
export interface SchemaField {
|
|
6
6
|
/** The unique key for this field. */
|
|
7
7
|
key?: string;
|
|
@@ -12,9 +12,9 @@ export interface SchemaField {
|
|
|
12
12
|
/** Description of this field. */
|
|
13
13
|
description?: string;
|
|
14
14
|
/** Data type of this field. */
|
|
15
|
-
type?:
|
|
15
|
+
type?: Rulebricks.SchemaFieldType;
|
|
16
16
|
/** Default value for this field. */
|
|
17
|
-
defaultValue?:
|
|
17
|
+
defaultValue?: Rulebricks.SchemaFieldDefaultValue;
|
|
18
18
|
/** Computed default value for this field. */
|
|
19
19
|
defaultComputedValue?: string;
|
|
20
20
|
/** Transformation expression to apply to this field. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
5
|
-
export interface StringValue extends
|
|
4
|
+
import * as Rulebricks from "../index";
|
|
5
|
+
export interface StringValue extends Rulebricks.DynamicValueBase {
|
|
6
6
|
/** The string value */
|
|
7
7
|
value?: string;
|
|
8
8
|
}
|
package/dist/api/types/Test.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
4
|
+
import * as Rulebricks from "../index";
|
|
5
5
|
export interface Test {
|
|
6
6
|
/** Unique identifier for the test. */
|
|
7
7
|
id: string;
|
|
@@ -18,7 +18,7 @@ export interface Test {
|
|
|
18
18
|
/** Indicates if the test was successful. */
|
|
19
19
|
success: boolean;
|
|
20
20
|
/** The state of the test after execution. */
|
|
21
|
-
testState?:
|
|
21
|
+
testState?: Rulebricks.TestTestState;
|
|
22
22
|
/** The timestamp when the test was last executed. */
|
|
23
23
|
lastExecuted?: Date;
|
|
24
24
|
}
|