@rulebricks/sdk 1.2.0 → 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 +8 -7
- package/api/resources/decisions/client/Client.js +15 -14
- package/{dist/api/resources/decisions/client/requests/QueryDecisionsRequest.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 +8 -7
- package/api/resources/flows/client/Client.js +15 -14
- 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 +18 -17
- package/api/resources/values/client/Client.js +41 -40
- package/api/resources/values/client/requests/UpdateValuesRequest.d.ts +2 -2
- package/{dist/api/resources/values/client/requests/DeleteDynamicValueRequest.d.ts → api/resources/values/client/requests/ValuesDeleteRequest.d.ts} +1 -1
- package/{dist/api/resources/values/client/requests/ListDynamicValuesRequest.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/ListValueValueItem.d.ts +4 -0
- 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/api/types/index.d.ts +1 -0
- package/api/types/index.js +1 -0
- 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 +8 -7
- package/dist/api/resources/decisions/client/Client.js +15 -14
- package/{api/resources/decisions/client/requests/QueryDecisionsRequest.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 +8 -7
- package/dist/api/resources/flows/client/Client.js +15 -14
- 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 +18 -17
- package/dist/api/resources/values/client/Client.js +41 -40
- package/dist/api/resources/values/client/requests/UpdateValuesRequest.d.ts +2 -2
- package/{api/resources/values/client/requests/DeleteDynamicValueRequest.d.ts → dist/api/resources/values/client/requests/ValuesDeleteRequest.d.ts} +1 -1
- package/{api/resources/values/client/requests/ListDynamicValuesRequest.d.ts → dist/api/resources/values/client/requests/ValuesListRequest.d.ts} +2 -2
- package/dist/api/resources/values/client/requests/ValuesListRequest.js +5 -0
- 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/ListValueValueItem.d.ts +4 -0
- package/dist/api/types/ListValueValueItem.js +5 -0
- 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/api/types/index.d.ts +1 -0
- package/dist/api/types/index.js +1 -0
- 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/forge/values.js +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 +4 -3
- package/dist/serialization/types/ListValue.js +2 -1
- package/dist/serialization/types/ListValueValueItem.d.ts +10 -0
- package/dist/serialization/types/ListValueValueItem.js +37 -0
- 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/dist/serialization/types/index.d.ts +1 -0
- package/dist/serialization/types/index.js +1 -0
- 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/forge/values.js +2 -2
- package/index.d.ts +4 -3
- package/index.js +7 -5
- package/package.json +2 -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 +4 -3
- package/serialization/types/ListValue.js +2 -1
- package/serialization/types/ListValueValueItem.d.ts +10 -0
- package/serialization/types/ListValueValueItem.js +37 -0
- 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/serialization/types/index.d.ts +1 -0
- package/serialization/types/index.js +1 -0
- 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/{QueryDecisionsRequest.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/{DeleteDynamicValueRequest.js → ValuesDeleteRequest.js} +0 -0
- /package/api/resources/values/client/requests/{ListDynamicValuesRequest.js → ValuesListRequest.js} +0 -0
- /package/{dist/api/resources/assets/client/requests/DeleteFolderRequest.js → api/types/ListValueValueItem.js} +0 -0
- /package/dist/api/resources/assets/{client → resources/folders/client}/requests/DeleteFolderRequest.d.ts +0 -0
- /package/dist/api/resources/assets/{client/requests/DeleteRuleRequest.js → 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/requests/ExportRuleRequest.js → 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/ListRulesRequest.js → resources/rules/client/requests/RulesListRequest.js} +0 -0
- /package/dist/api/resources/{decisions/client/requests/QueryDecisionsRequest.js → assets/resources/rules/client/requests/RulesPullRequest.js} +0 -0
- /package/dist/api/resources/{users/client/requests/CreateUserGroupRequest.js → decisions/client/requests/DecisionsQueryRequest.js} +0 -0
- /package/dist/api/resources/users/{client → resources/groups/client}/requests/CreateUserGroupRequest.d.ts +0 -0
- /package/dist/api/resources/{values/client/requests/DeleteDynamicValueRequest.js → users/resources/groups/client/requests/CreateUserGroupRequest.js} +0 -0
- /package/dist/api/resources/values/client/requests/{ListDynamicValuesRequest.js → ValuesDeleteRequest.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client";
|
|
@@ -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("./client"), exports);
|
|
@@ -1,11 +1,13 @@
|
|
|
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";
|
|
7
|
+
import { Groups } from "../resources/groups/client/Client";
|
|
6
8
|
export declare namespace Users {
|
|
7
9
|
interface Options {
|
|
8
|
-
environment
|
|
10
|
+
environment?: core.Supplier<environments.RulebricksEnvironment | string>;
|
|
9
11
|
/** Specify a custom URL to connect the client to. */
|
|
10
12
|
baseUrl?: core.Supplier<string>;
|
|
11
13
|
apiKey: core.Supplier<string>;
|
|
@@ -26,58 +28,33 @@ export declare namespace Users {
|
|
|
26
28
|
*/
|
|
27
29
|
export declare class Users {
|
|
28
30
|
protected readonly _options: Users.Options;
|
|
31
|
+
protected _groups: Groups | undefined;
|
|
29
32
|
constructor(_options: Users.Options);
|
|
33
|
+
get groups(): Groups;
|
|
30
34
|
/**
|
|
31
35
|
* Invite a new user to the organization or update role or access group data for an existing user.
|
|
32
36
|
*
|
|
33
|
-
* @param {
|
|
37
|
+
* @param {Rulebricks.UserInviteRequest} request
|
|
34
38
|
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
35
39
|
*
|
|
36
|
-
* @throws {@link
|
|
37
|
-
* @throws {@link
|
|
40
|
+
* @throws {@link Rulebricks.BadRequestError}
|
|
41
|
+
* @throws {@link Rulebricks.InternalServerError}
|
|
38
42
|
*
|
|
39
43
|
* @example
|
|
40
|
-
* await client.users.
|
|
44
|
+
* await client.users.invite({
|
|
41
45
|
* email: "newuser@example.com",
|
|
42
46
|
* role: "developer",
|
|
43
47
|
* accessGroups: ["group1", "group2"]
|
|
44
48
|
* })
|
|
45
49
|
*
|
|
46
50
|
* @example
|
|
47
|
-
* await client.users.
|
|
51
|
+
* await client.users.invite({
|
|
48
52
|
* email: "existinguser@example.com",
|
|
49
53
|
* role: "custom-role",
|
|
50
54
|
* accessGroups: ["group1"]
|
|
51
55
|
* })
|
|
52
56
|
*/
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* List all user groups available in your Rulebricks organization.
|
|
56
|
-
*
|
|
57
|
-
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
58
|
-
*
|
|
59
|
-
* @throws {@link RulebricksApi.InternalServerError}
|
|
60
|
-
*
|
|
61
|
-
* @example
|
|
62
|
-
* await client.users.listGroups()
|
|
63
|
-
*/
|
|
64
|
-
listGroups(requestOptions?: Users.RequestOptions): Promise<RulebricksApi.UserGroupListResponse>;
|
|
65
|
-
/**
|
|
66
|
-
* Create a new user group in your Rulebricks organization.
|
|
67
|
-
*
|
|
68
|
-
* @param {RulebricksApi.CreateUserGroupRequest} request
|
|
69
|
-
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
70
|
-
*
|
|
71
|
-
* @throws {@link RulebricksApi.BadRequestError}
|
|
72
|
-
* @throws {@link RulebricksApi.InternalServerError}
|
|
73
|
-
*
|
|
74
|
-
* @example
|
|
75
|
-
* await client.users.createGroup({
|
|
76
|
-
* name: "NewGroup",
|
|
77
|
-
* description: "Description of the new group."
|
|
78
|
-
* })
|
|
79
|
-
*/
|
|
80
|
-
createGroup(request: RulebricksApi.CreateUserGroupRequest, requestOptions?: Users.RequestOptions): Promise<RulebricksApi.UserGroup>;
|
|
57
|
+
invite(request: Rulebricks.UserInviteRequest, requestOptions?: Users.RequestOptions): Promise<Rulebricks.UserInviteResponse>;
|
|
81
58
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
82
59
|
"x-api-key": string;
|
|
83
60
|
}>;
|
|
@@ -39,11 +39,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
39
39
|
};
|
|
40
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
41
|
exports.Users = 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 serializers = __importStar(require("../../../../serialization/index"));
|
|
45
46
|
const url_join_1 = __importDefault(require("url-join"));
|
|
46
47
|
const errors = __importStar(require("../../../../errors/index"));
|
|
48
|
+
const Client_1 = require("../resources/groups/client/Client");
|
|
47
49
|
/**
|
|
48
50
|
* Operations for managing users on your team and their permissions
|
|
49
51
|
*/
|
|
@@ -51,34 +53,38 @@ class Users {
|
|
|
51
53
|
constructor(_options) {
|
|
52
54
|
this._options = _options;
|
|
53
55
|
}
|
|
56
|
+
get groups() {
|
|
57
|
+
var _a;
|
|
58
|
+
return ((_a = this._groups) !== null && _a !== void 0 ? _a : (this._groups = new Client_1.Groups(this._options)));
|
|
59
|
+
}
|
|
54
60
|
/**
|
|
55
61
|
* Invite a new user to the organization or update role or access group data for an existing user.
|
|
56
62
|
*
|
|
57
|
-
* @param {
|
|
63
|
+
* @param {Rulebricks.UserInviteRequest} request
|
|
58
64
|
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
59
65
|
*
|
|
60
|
-
* @throws {@link
|
|
61
|
-
* @throws {@link
|
|
66
|
+
* @throws {@link Rulebricks.BadRequestError}
|
|
67
|
+
* @throws {@link Rulebricks.InternalServerError}
|
|
62
68
|
*
|
|
63
69
|
* @example
|
|
64
|
-
* await client.users.
|
|
70
|
+
* await client.users.invite({
|
|
65
71
|
* email: "newuser@example.com",
|
|
66
72
|
* role: "developer",
|
|
67
73
|
* accessGroups: ["group1", "group2"]
|
|
68
74
|
* })
|
|
69
75
|
*
|
|
70
76
|
* @example
|
|
71
|
-
* await client.users.
|
|
77
|
+
* await client.users.invite({
|
|
72
78
|
* email: "existinguser@example.com",
|
|
73
79
|
* role: "custom-role",
|
|
74
80
|
* accessGroups: ["group1"]
|
|
75
81
|
* })
|
|
76
82
|
*/
|
|
77
|
-
|
|
78
|
-
var _a;
|
|
83
|
+
invite(request, requestOptions) {
|
|
84
|
+
var _a, _b;
|
|
79
85
|
return __awaiter(this, void 0, void 0, function* () {
|
|
80
86
|
const _response = yield core.fetcher({
|
|
81
|
-
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)), "
|
|
87
|
+
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, "admin/users/invite"),
|
|
82
88
|
method: "POST",
|
|
83
89
|
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),
|
|
84
90
|
contentType: "application/json",
|
|
@@ -99,133 +105,11 @@ class Users {
|
|
|
99
105
|
if (_response.error.reason === "status-code") {
|
|
100
106
|
switch (_response.error.statusCode) {
|
|
101
107
|
case 400:
|
|
102
|
-
throw new
|
|
103
|
-
case 500:
|
|
104
|
-
throw new RulebricksApi.InternalServerError(_response.error.body);
|
|
105
|
-
default:
|
|
106
|
-
throw new errors.RulebricksApiError({
|
|
107
|
-
statusCode: _response.error.statusCode,
|
|
108
|
-
body: _response.error.body,
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
switch (_response.error.reason) {
|
|
113
|
-
case "non-json":
|
|
114
|
-
throw new errors.RulebricksApiError({
|
|
115
|
-
statusCode: _response.error.statusCode,
|
|
116
|
-
body: _response.error.rawBody,
|
|
117
|
-
});
|
|
118
|
-
case "timeout":
|
|
119
|
-
throw new errors.RulebricksApiTimeoutError("Timeout exceeded when calling POST /api/v1/admin/users/invite.");
|
|
120
|
-
case "unknown":
|
|
121
|
-
throw new errors.RulebricksApiError({
|
|
122
|
-
message: _response.error.errorMessage,
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* List all user groups available in your Rulebricks organization.
|
|
129
|
-
*
|
|
130
|
-
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
131
|
-
*
|
|
132
|
-
* @throws {@link RulebricksApi.InternalServerError}
|
|
133
|
-
*
|
|
134
|
-
* @example
|
|
135
|
-
* await client.users.listGroups()
|
|
136
|
-
*/
|
|
137
|
-
listGroups(requestOptions) {
|
|
138
|
-
var _a;
|
|
139
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
140
|
-
const _response = yield core.fetcher({
|
|
141
|
-
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)), "api/v1/admin/users/groups"),
|
|
142
|
-
method: "GET",
|
|
143
|
-
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),
|
|
144
|
-
contentType: "application/json",
|
|
145
|
-
requestType: "json",
|
|
146
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
147
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
148
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
149
|
-
});
|
|
150
|
-
if (_response.ok) {
|
|
151
|
-
return serializers.UserGroupListResponse.parseOrThrow(_response.body, {
|
|
152
|
-
unrecognizedObjectKeys: "passthrough",
|
|
153
|
-
allowUnrecognizedUnionMembers: true,
|
|
154
|
-
allowUnrecognizedEnumValues: true,
|
|
155
|
-
breadcrumbsPrefix: ["response"],
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
if (_response.error.reason === "status-code") {
|
|
159
|
-
switch (_response.error.statusCode) {
|
|
160
|
-
case 500:
|
|
161
|
-
throw new RulebricksApi.InternalServerError(_response.error.body);
|
|
162
|
-
default:
|
|
163
|
-
throw new errors.RulebricksApiError({
|
|
164
|
-
statusCode: _response.error.statusCode,
|
|
165
|
-
body: _response.error.body,
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
switch (_response.error.reason) {
|
|
170
|
-
case "non-json":
|
|
171
|
-
throw new errors.RulebricksApiError({
|
|
172
|
-
statusCode: _response.error.statusCode,
|
|
173
|
-
body: _response.error.rawBody,
|
|
174
|
-
});
|
|
175
|
-
case "timeout":
|
|
176
|
-
throw new errors.RulebricksApiTimeoutError("Timeout exceeded when calling GET /api/v1/admin/users/groups.");
|
|
177
|
-
case "unknown":
|
|
178
|
-
throw new errors.RulebricksApiError({
|
|
179
|
-
message: _response.error.errorMessage,
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* Create a new user group in your Rulebricks organization.
|
|
186
|
-
*
|
|
187
|
-
* @param {RulebricksApi.CreateUserGroupRequest} request
|
|
188
|
-
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
189
|
-
*
|
|
190
|
-
* @throws {@link RulebricksApi.BadRequestError}
|
|
191
|
-
* @throws {@link RulebricksApi.InternalServerError}
|
|
192
|
-
*
|
|
193
|
-
* @example
|
|
194
|
-
* await client.users.createGroup({
|
|
195
|
-
* name: "NewGroup",
|
|
196
|
-
* description: "Description of the new group."
|
|
197
|
-
* })
|
|
198
|
-
*/
|
|
199
|
-
createGroup(request, requestOptions) {
|
|
200
|
-
var _a;
|
|
201
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
202
|
-
const _response = yield core.fetcher({
|
|
203
|
-
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)), "api/v1/admin/users/groups"),
|
|
204
|
-
method: "POST",
|
|
205
|
-
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),
|
|
206
|
-
contentType: "application/json",
|
|
207
|
-
requestType: "json",
|
|
208
|
-
body: serializers.CreateUserGroupRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
209
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
210
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
211
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
212
|
-
});
|
|
213
|
-
if (_response.ok) {
|
|
214
|
-
return serializers.UserGroup.parseOrThrow(_response.body, {
|
|
215
|
-
unrecognizedObjectKeys: "passthrough",
|
|
216
|
-
allowUnrecognizedUnionMembers: true,
|
|
217
|
-
allowUnrecognizedEnumValues: true,
|
|
218
|
-
breadcrumbsPrefix: ["response"],
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
if (_response.error.reason === "status-code") {
|
|
222
|
-
switch (_response.error.statusCode) {
|
|
223
|
-
case 400:
|
|
224
|
-
throw new RulebricksApi.BadRequestError(_response.error.body);
|
|
108
|
+
throw new Rulebricks.BadRequestError(_response.error.body);
|
|
225
109
|
case 500:
|
|
226
|
-
throw new
|
|
110
|
+
throw new Rulebricks.InternalServerError(_response.error.body);
|
|
227
111
|
default:
|
|
228
|
-
throw new errors.
|
|
112
|
+
throw new errors.RulebricksError({
|
|
229
113
|
statusCode: _response.error.statusCode,
|
|
230
114
|
body: _response.error.body,
|
|
231
115
|
});
|
|
@@ -233,14 +117,14 @@ class Users {
|
|
|
233
117
|
}
|
|
234
118
|
switch (_response.error.reason) {
|
|
235
119
|
case "non-json":
|
|
236
|
-
throw new errors.
|
|
120
|
+
throw new errors.RulebricksError({
|
|
237
121
|
statusCode: _response.error.statusCode,
|
|
238
122
|
body: _response.error.rawBody,
|
|
239
123
|
});
|
|
240
124
|
case "timeout":
|
|
241
|
-
throw new errors.
|
|
125
|
+
throw new errors.RulebricksTimeoutError("Timeout exceeded when calling POST /admin/users/invite.");
|
|
242
126
|
case "unknown":
|
|
243
|
-
throw new errors.
|
|
127
|
+
throw new errors.RulebricksError({
|
|
244
128
|
message: _response.error.errorMessage,
|
|
245
129
|
});
|
|
246
130
|
}
|
|
@@ -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
|
* {
|
|
@@ -35,7 +35,7 @@ export interface UserInviteRequest {
|
|
|
35
35
|
/** Email of the user to invite. */
|
|
36
36
|
email: string;
|
|
37
37
|
/** System or custom role ID to assign to the user. Available system roles include 'admin', 'editor', and 'developer'. */
|
|
38
|
-
role?:
|
|
38
|
+
role?: Rulebricks.UserInviteRequestRole;
|
|
39
39
|
/** List of access group names or IDs to assign to the user. All specified groups must exist in your organization. */
|
|
40
40
|
accessGroups?: string[];
|
|
41
41
|
}
|
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./types"), exports);
|
|
18
18
|
__exportStar(require("./client"), exports);
|
|
19
|
+
__exportStar(require("./resources"), exports);
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../../../environments";
|
|
5
|
+
import * as core from "../../../../../../core";
|
|
6
|
+
import * as Rulebricks from "../../../../../index";
|
|
7
|
+
export declare namespace Groups {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.RulebricksEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
12
|
+
apiKey: core.Supplier<string>;
|
|
13
|
+
}
|
|
14
|
+
interface RequestOptions {
|
|
15
|
+
/** The maximum time to wait for a response in seconds. */
|
|
16
|
+
timeoutInSeconds?: number;
|
|
17
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
18
|
+
maxRetries?: number;
|
|
19
|
+
/** A hook to abort the request. */
|
|
20
|
+
abortSignal?: AbortSignal;
|
|
21
|
+
/** Additional headers to include in the request. */
|
|
22
|
+
headers?: Record<string, string>;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export declare class Groups {
|
|
26
|
+
protected readonly _options: Groups.Options;
|
|
27
|
+
constructor(_options: Groups.Options);
|
|
28
|
+
/**
|
|
29
|
+
* List all user groups available in your Rulebricks organization.
|
|
30
|
+
*
|
|
31
|
+
* @param {Groups.RequestOptions} requestOptions - Request-specific configuration.
|
|
32
|
+
*
|
|
33
|
+
* @throws {@link Rulebricks.InternalServerError}
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* await client.users.groups.list()
|
|
37
|
+
*/
|
|
38
|
+
list(requestOptions?: Groups.RequestOptions): Promise<Rulebricks.UserGroupListResponse>;
|
|
39
|
+
/**
|
|
40
|
+
* Create a new user group in your Rulebricks organization.
|
|
41
|
+
*
|
|
42
|
+
* @param {Rulebricks.users.CreateUserGroupRequest} request
|
|
43
|
+
* @param {Groups.RequestOptions} requestOptions - Request-specific configuration.
|
|
44
|
+
*
|
|
45
|
+
* @throws {@link Rulebricks.BadRequestError}
|
|
46
|
+
* @throws {@link Rulebricks.InternalServerError}
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* await client.users.groups.create({
|
|
50
|
+
* name: "NewGroup",
|
|
51
|
+
* description: "Description of the new group."
|
|
52
|
+
* })
|
|
53
|
+
*/
|
|
54
|
+
create(request: Rulebricks.users.CreateUserGroupRequest, requestOptions?: Groups.RequestOptions): Promise<Rulebricks.UserGroup>;
|
|
55
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
56
|
+
"x-api-key": string;
|
|
57
|
+
}>;
|
|
58
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
38
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
39
|
+
};
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.Groups = void 0;
|
|
42
|
+
const environments = __importStar(require("../../../../../../environments"));
|
|
43
|
+
const core = __importStar(require("../../../../../../core"));
|
|
44
|
+
const Rulebricks = __importStar(require("../../../../../index"));
|
|
45
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
46
|
+
const serializers = __importStar(require("../../../../../../serialization/index"));
|
|
47
|
+
const errors = __importStar(require("../../../../../../errors/index"));
|
|
48
|
+
class Groups {
|
|
49
|
+
constructor(_options) {
|
|
50
|
+
this._options = _options;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* List all user groups available in your Rulebricks organization.
|
|
54
|
+
*
|
|
55
|
+
* @param {Groups.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
|
+
*
|
|
57
|
+
* @throws {@link Rulebricks.InternalServerError}
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* await client.users.groups.list()
|
|
61
|
+
*/
|
|
62
|
+
list(requestOptions) {
|
|
63
|
+
var _a, _b;
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
const _response = yield core.fetcher({
|
|
66
|
+
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, "admin/users/groups"),
|
|
67
|
+
method: "GET",
|
|
68
|
+
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),
|
|
69
|
+
contentType: "application/json",
|
|
70
|
+
requestType: "json",
|
|
71
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
72
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
73
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
74
|
+
});
|
|
75
|
+
if (_response.ok) {
|
|
76
|
+
return serializers.UserGroupListResponse.parseOrThrow(_response.body, {
|
|
77
|
+
unrecognizedObjectKeys: "passthrough",
|
|
78
|
+
allowUnrecognizedUnionMembers: true,
|
|
79
|
+
allowUnrecognizedEnumValues: true,
|
|
80
|
+
breadcrumbsPrefix: ["response"],
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
if (_response.error.reason === "status-code") {
|
|
84
|
+
switch (_response.error.statusCode) {
|
|
85
|
+
case 500:
|
|
86
|
+
throw new Rulebricks.InternalServerError(_response.error.body);
|
|
87
|
+
default:
|
|
88
|
+
throw new errors.RulebricksError({
|
|
89
|
+
statusCode: _response.error.statusCode,
|
|
90
|
+
body: _response.error.body,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
switch (_response.error.reason) {
|
|
95
|
+
case "non-json":
|
|
96
|
+
throw new errors.RulebricksError({
|
|
97
|
+
statusCode: _response.error.statusCode,
|
|
98
|
+
body: _response.error.rawBody,
|
|
99
|
+
});
|
|
100
|
+
case "timeout":
|
|
101
|
+
throw new errors.RulebricksTimeoutError("Timeout exceeded when calling GET /admin/users/groups.");
|
|
102
|
+
case "unknown":
|
|
103
|
+
throw new errors.RulebricksError({
|
|
104
|
+
message: _response.error.errorMessage,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Create a new user group in your Rulebricks organization.
|
|
111
|
+
*
|
|
112
|
+
* @param {Rulebricks.users.CreateUserGroupRequest} request
|
|
113
|
+
* @param {Groups.RequestOptions} requestOptions - Request-specific configuration.
|
|
114
|
+
*
|
|
115
|
+
* @throws {@link Rulebricks.BadRequestError}
|
|
116
|
+
* @throws {@link Rulebricks.InternalServerError}
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* await client.users.groups.create({
|
|
120
|
+
* name: "NewGroup",
|
|
121
|
+
* description: "Description of the new group."
|
|
122
|
+
* })
|
|
123
|
+
*/
|
|
124
|
+
create(request, requestOptions) {
|
|
125
|
+
var _a, _b;
|
|
126
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
const _response = yield core.fetcher({
|
|
128
|
+
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, "admin/users/groups"),
|
|
129
|
+
method: "POST",
|
|
130
|
+
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),
|
|
131
|
+
contentType: "application/json",
|
|
132
|
+
requestType: "json",
|
|
133
|
+
body: serializers.users.CreateUserGroupRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
134
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
135
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
136
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
137
|
+
});
|
|
138
|
+
if (_response.ok) {
|
|
139
|
+
return serializers.UserGroup.parseOrThrow(_response.body, {
|
|
140
|
+
unrecognizedObjectKeys: "passthrough",
|
|
141
|
+
allowUnrecognizedUnionMembers: true,
|
|
142
|
+
allowUnrecognizedEnumValues: true,
|
|
143
|
+
breadcrumbsPrefix: ["response"],
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
if (_response.error.reason === "status-code") {
|
|
147
|
+
switch (_response.error.statusCode) {
|
|
148
|
+
case 400:
|
|
149
|
+
throw new Rulebricks.BadRequestError(_response.error.body);
|
|
150
|
+
case 500:
|
|
151
|
+
throw new Rulebricks.InternalServerError(_response.error.body);
|
|
152
|
+
default:
|
|
153
|
+
throw new errors.RulebricksError({
|
|
154
|
+
statusCode: _response.error.statusCode,
|
|
155
|
+
body: _response.error.body,
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
switch (_response.error.reason) {
|
|
160
|
+
case "non-json":
|
|
161
|
+
throw new errors.RulebricksError({
|
|
162
|
+
statusCode: _response.error.statusCode,
|
|
163
|
+
body: _response.error.rawBody,
|
|
164
|
+
});
|
|
165
|
+
case "timeout":
|
|
166
|
+
throw new errors.RulebricksTimeoutError("Timeout exceeded when calling POST /admin/users/groups.");
|
|
167
|
+
case "unknown":
|
|
168
|
+
throw new errors.RulebricksError({
|
|
169
|
+
message: _response.error.errorMessage,
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
_getCustomAuthorizationHeaders() {
|
|
175
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
176
|
+
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
177
|
+
return { "x-api-key": apiKeyValue };
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
exports.Groups = Groups;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests";
|
|
@@ -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("./requests"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type CreateUserGroupRequest } from "./CreateUserGroupRequest";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client";
|
|
@@ -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("./client"), exports);
|