@rulebricks/sdk 1.5.0 → 1.5.2
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/BaseClient.d.ts +39 -0
- package/BaseClient.js +59 -0
- package/Client.d.ts +27 -43
- package/Client.js +18 -19
- package/api/errors/BadRequestError.d.ts +3 -5
- package/api/errors/BadRequestError.js +26 -13
- package/api/errors/ForbiddenError.d.ts +3 -5
- package/api/errors/ForbiddenError.js +26 -13
- package/api/errors/InternalServerError.d.ts +3 -5
- package/api/errors/InternalServerError.js +26 -13
- package/api/errors/NotFoundError.d.ts +3 -5
- package/api/errors/NotFoundError.js +26 -13
- package/api/errors/index.d.ts +4 -4
- package/api/errors/index.js +4 -4
- package/api/index.d.ts +3 -3
- package/api/index.js +3 -3
- package/api/resources/assets/client/Client.d.ts +22 -39
- package/api/resources/assets/client/Client.js +52 -62
- package/api/resources/assets/index.d.ts +2 -2
- package/api/resources/assets/index.js +2 -2
- package/api/resources/assets/resources/flows/client/Client.d.ts +13 -30
- package/api/resources/assets/resources/flows/client/Client.js +48 -58
- package/api/resources/assets/resources/flows/index.d.ts +1 -1
- package/api/resources/assets/resources/flows/index.js +1 -1
- package/api/resources/assets/resources/folders/client/Client.d.ts +19 -34
- package/api/resources/assets/resources/folders/client/Client.js +89 -115
- package/api/resources/assets/resources/folders/client/index.d.ts +1 -1
- package/api/resources/assets/resources/folders/client/index.js +1 -1
- package/api/resources/assets/resources/folders/client/requests/DeleteFolderRequest.d.ts +0 -3
- package/api/resources/assets/resources/folders/client/requests/DeleteFolderRequest.js +1 -3
- package/api/resources/assets/resources/folders/client/requests/UpsertFolderRequest.d.ts +0 -3
- package/api/resources/assets/resources/folders/client/requests/UpsertFolderRequest.js +1 -3
- package/api/resources/assets/resources/folders/client/requests/index.d.ts +2 -2
- package/api/resources/assets/resources/folders/index.d.ts +1 -1
- package/api/resources/assets/resources/folders/index.js +1 -1
- package/api/resources/assets/resources/index.d.ts +5 -5
- package/api/resources/assets/resources/index.js +23 -13
- package/api/resources/assets/resources/rules/client/Client.d.ts +31 -42
- package/api/resources/assets/resources/rules/client/Client.js +123 -158
- package/api/resources/assets/resources/rules/client/index.d.ts +1 -1
- package/api/resources/assets/resources/rules/client/index.js +1 -1
- package/api/resources/assets/resources/rules/client/requests/DeleteRuleRequest.d.ts +1 -4
- package/api/resources/assets/resources/rules/client/requests/DeleteRuleRequest.js +1 -3
- package/api/resources/assets/resources/rules/client/requests/ImportRuleRequest.d.ts +2 -4
- package/api/resources/assets/resources/rules/client/requests/ImportRuleRequest.js +1 -3
- package/api/resources/assets/resources/rules/client/requests/ListRulesRequest.d.ts +10 -0
- package/api/resources/assets/resources/rules/client/requests/ListRulesRequest.js +3 -0
- package/api/resources/assets/resources/rules/client/requests/PullRulesRequest.d.ts +10 -0
- package/api/resources/assets/resources/rules/client/requests/PullRulesRequest.js +3 -0
- package/api/resources/assets/resources/rules/client/requests/index.d.ts +4 -4
- package/api/resources/assets/resources/rules/index.d.ts +1 -1
- package/api/resources/assets/resources/rules/index.js +1 -1
- package/api/resources/decisions/client/Client.d.ts +19 -34
- package/api/resources/decisions/client/Client.js +79 -74
- package/api/resources/decisions/client/index.d.ts +1 -1
- package/api/resources/decisions/client/index.js +1 -1
- package/api/resources/decisions/client/requests/QueryDecisionsRequest.d.ts +36 -0
- package/api/resources/decisions/client/requests/QueryDecisionsRequest.js +3 -0
- package/api/resources/decisions/client/requests/index.d.ts +1 -1
- package/api/resources/decisions/index.d.ts +2 -1
- package/api/resources/decisions/index.js +2 -1
- package/api/resources/decisions/types/QueryDecisionsRequestCount.d.ts +5 -0
- package/api/resources/decisions/types/QueryDecisionsRequestCount.js +8 -0
- package/api/resources/decisions/types/index.d.ts +1 -0
- package/api/resources/{users → decisions}/types/index.js +1 -1
- package/api/resources/flows/client/Client.d.ts +23 -36
- package/api/resources/flows/client/Client.js +62 -65
- package/api/resources/flows/client/index.d.ts +1 -1
- package/api/resources/flows/client/index.js +15 -0
- package/api/resources/flows/client/requests/ExecuteFlowsRequest.d.ts +19 -0
- package/api/resources/flows/client/requests/ExecuteFlowsRequest.js +3 -0
- package/api/resources/flows/client/requests/index.d.ts +1 -0
- package/api/resources/flows/index.d.ts +1 -1
- package/api/resources/flows/index.js +1 -1
- package/api/resources/index.d.ts +13 -11
- package/api/resources/index.js +31 -19
- package/api/resources/rules/client/Client.d.ts +55 -56
- package/api/resources/rules/client/Client.js +130 -138
- package/api/resources/rules/client/index.d.ts +1 -1
- package/api/resources/rules/client/index.js +15 -0
- package/api/resources/rules/client/requests/BulkSolveRulesRequest.d.ts +21 -0
- package/api/resources/rules/client/requests/BulkSolveRulesRequest.js +3 -0
- package/api/resources/rules/client/requests/SolveRulesRequest.d.ts +19 -0
- package/api/resources/rules/client/requests/SolveRulesRequest.js +3 -0
- package/api/resources/rules/client/requests/index.d.ts +2 -0
- package/api/resources/rules/index.d.ts +1 -1
- package/api/resources/rules/index.js +1 -1
- package/api/resources/tests/client/Client.d.ts +13 -21
- package/api/resources/tests/client/Client.js +11 -12
- package/api/resources/tests/index.d.ts +2 -2
- package/api/resources/tests/index.js +2 -2
- package/api/resources/tests/resources/flows/client/Client.d.ts +41 -50
- package/api/resources/tests/resources/flows/client/Client.js +117 -136
- package/api/resources/tests/resources/flows/client/index.d.ts +1 -1
- package/api/resources/tests/resources/flows/client/index.js +15 -0
- package/api/resources/tests/resources/flows/client/requests/CreateFlowsRequest.d.ts +22 -0
- package/api/resources/tests/resources/flows/client/requests/CreateFlowsRequest.js +3 -0
- package/api/resources/tests/resources/flows/client/requests/DeleteFlowsRequest.d.ts +13 -0
- package/api/resources/tests/resources/flows/client/requests/DeleteFlowsRequest.js +3 -0
- package/api/resources/tests/resources/flows/client/requests/ListFlowsRequest.d.ts +10 -0
- package/api/resources/tests/resources/flows/client/requests/ListFlowsRequest.js +3 -0
- package/api/resources/tests/resources/flows/client/requests/index.d.ts +3 -0
- package/api/resources/tests/resources/flows/index.d.ts +1 -1
- package/api/resources/tests/resources/flows/index.js +1 -1
- package/api/resources/tests/resources/index.d.ts +4 -2
- package/api/resources/tests/resources/index.js +24 -9
- package/api/resources/tests/resources/rules/client/Client.d.ts +41 -50
- package/api/resources/tests/resources/rules/client/Client.js +117 -136
- package/api/resources/tests/resources/rules/client/index.d.ts +1 -1
- package/api/resources/tests/resources/rules/client/index.js +15 -0
- package/api/resources/tests/resources/rules/client/requests/CreateRulesRequest.d.ts +22 -0
- package/api/resources/tests/resources/rules/client/requests/CreateRulesRequest.js +3 -0
- package/api/resources/tests/resources/rules/client/requests/DeleteRulesRequest.d.ts +13 -0
- package/api/resources/tests/resources/rules/client/requests/DeleteRulesRequest.js +3 -0
- package/api/resources/tests/resources/rules/client/requests/ListRulesRequest.d.ts +10 -0
- package/api/resources/tests/resources/rules/client/requests/ListRulesRequest.js +3 -0
- package/api/resources/tests/resources/rules/client/requests/index.d.ts +3 -0
- package/api/resources/tests/resources/rules/index.d.ts +1 -1
- package/api/resources/tests/resources/rules/index.js +1 -1
- package/api/resources/users/client/Client.d.ts +55 -33
- package/api/resources/users/client/Client.js +164 -56
- package/api/resources/users/client/index.d.ts +1 -1
- package/api/resources/users/client/index.js +1 -1
- package/api/resources/users/client/requests/CreateUserRequest.d.ts +28 -0
- package/api/resources/users/client/requests/CreateUserRequest.js +3 -0
- package/api/resources/users/client/requests/UserInviteRequest.d.ts +11 -5
- package/api/resources/users/client/requests/UserInviteRequest.js +12 -3
- package/api/resources/users/client/requests/index.d.ts +2 -1
- package/api/resources/users/index.d.ts +2 -3
- package/api/resources/users/index.js +2 -3
- package/api/resources/users/resources/groups/client/Client.d.ts +16 -32
- package/api/resources/users/resources/groups/client/Client.js +68 -86
- package/api/resources/users/resources/groups/client/index.d.ts +1 -1
- package/api/resources/users/resources/groups/client/index.js +1 -1
- package/api/resources/users/resources/groups/client/requests/CreateUserGroupRequest.d.ts +0 -3
- package/api/resources/users/resources/groups/client/requests/CreateUserGroupRequest.js +1 -3
- package/api/resources/users/resources/groups/client/requests/index.d.ts +1 -1
- package/api/resources/users/resources/groups/index.d.ts +1 -1
- package/api/resources/users/resources/groups/index.js +1 -1
- package/api/resources/users/resources/index.d.ts +2 -2
- package/api/resources/users/resources/index.js +19 -9
- package/api/resources/values/client/Client.d.ts +21 -36
- package/api/resources/values/client/Client.js +96 -126
- package/api/resources/values/client/index.d.ts +1 -1
- package/api/resources/values/client/index.js +1 -1
- package/api/resources/values/client/requests/DeleteValuesRequest.d.ts +10 -0
- package/api/resources/values/client/requests/DeleteValuesRequest.js +3 -0
- package/api/resources/values/client/requests/ListValuesRequest.d.ts +17 -0
- package/api/resources/values/client/requests/ListValuesRequest.js +3 -0
- package/api/resources/values/client/requests/UpdateValuesRequest.d.ts +0 -3
- package/api/resources/values/client/requests/UpdateValuesRequest.js +1 -3
- package/api/resources/values/client/requests/index.d.ts +3 -3
- package/api/resources/values/index.d.ts +1 -1
- package/api/resources/values/index.js +1 -1
- package/api/types/BulkRuleResponseItem.d.ts +4 -5
- package/api/types/BulkRuleResponseItem.js +1 -3
- package/api/types/CreateTestRequest.d.ts +0 -3
- package/api/types/CreateTestRequest.js +1 -3
- package/api/types/CreateUserResponse.d.ts +26 -0
- package/api/types/CreateUserResponse.js +3 -0
- package/api/types/DecisionLog.d.ts +21 -5
- package/api/types/DecisionLog.js +1 -3
- package/api/types/DecisionLogResponse.d.ts +7 -4
- package/api/types/DecisionLogResponse.js +1 -3
- package/api/types/DynamicRequestPayload.d.ts +1 -4
- package/api/types/DynamicRequestPayload.js +1 -3
- package/api/types/DynamicResponsePayload.d.ts +1 -4
- package/api/types/DynamicResponsePayload.js +1 -3
- package/api/types/DynamicValue.d.ts +2 -4
- package/api/types/DynamicValue.js +1 -3
- package/api/types/DynamicValueListResponse.d.ts +2 -5
- package/api/types/DynamicValueListResponse.js +1 -3
- package/api/types/Error_.d.ts +0 -3
- package/api/types/Error_.js +1 -3
- package/api/types/FlowBase.d.ts +0 -3
- package/api/types/FlowBase.js +1 -3
- package/api/types/FlowDetail.d.ts +2 -5
- package/api/types/FlowDetail.js +1 -3
- package/api/types/FlowExecutionError.d.ts +0 -3
- package/api/types/FlowExecutionError.js +1 -3
- package/api/types/FlowListResponse.d.ts +2 -5
- package/api/types/FlowListResponse.js +1 -3
- package/api/types/Folder.d.ts +1 -4
- package/api/types/Folder.js +1 -3
- package/api/types/FolderListResponse.d.ts +2 -5
- package/api/types/FolderListResponse.js +1 -3
- package/api/types/ParallelSolveRequest.d.ts +11 -5
- package/api/types/ParallelSolveRequest.js +1 -3
- package/api/types/ParallelSolveResponse.d.ts +2 -5
- package/api/types/ParallelSolveResponse.js +1 -3
- package/api/types/RuleBase.d.ts +0 -3
- package/api/types/RuleBase.js +1 -3
- package/api/types/RuleDetail.d.ts +4 -7
- package/api/types/RuleDetail.js +1 -3
- package/api/types/RuleExport.d.ts +1 -4
- package/api/types/RuleExport.js +1 -3
- package/api/types/RuleListResponse.d.ts +2 -5
- package/api/types/RuleListResponse.js +1 -3
- package/api/types/RuleUsage.d.ts +1 -4
- package/api/types/RuleUsage.js +1 -3
- package/api/types/SchemaField.d.ts +18 -7
- package/api/types/SchemaField.js +13 -3
- package/api/types/SuccessMessage.d.ts +0 -3
- package/api/types/SuccessMessage.js +1 -3
- package/api/types/Test.d.ts +25 -6
- package/api/types/Test.js +1 -3
- package/api/types/TestListResponse.d.ts +2 -5
- package/api/types/TestListResponse.js +1 -3
- package/api/types/UsageStatistics.d.ts +5 -8
- package/api/types/UsageStatistics.js +1 -3
- package/api/types/UserDetail.d.ts +19 -0
- package/api/types/UserDetail.js +3 -0
- package/api/types/UserGroup.d.ts +0 -3
- package/api/types/UserGroup.js +1 -3
- package/api/types/UserGroupListResponse.d.ts +2 -5
- package/api/types/UserGroupListResponse.js +1 -3
- package/api/types/UserInviteResponse.d.ts +11 -5
- package/api/types/UserInviteResponse.js +1 -3
- package/api/types/UserListResponse.d.ts +5 -0
- package/api/types/UserListResponse.js +3 -0
- package/api/types/ValueLimits.d.ts +4 -7
- package/api/types/ValueLimits.js +1 -3
- package/api/types/index.d.ts +34 -39
- package/api/types/index.js +34 -39
- package/auth/HeaderAuthProvider.d.ts +16 -0
- package/auth/HeaderAuthProvider.js +71 -0
- package/auth/index.d.ts +1 -0
- package/auth/index.js +5 -0
- package/core/auth/AuthProvider.d.ts +7 -0
- package/core/auth/AuthRequest.d.ts +9 -0
- package/core/auth/BasicAuth.d.ts +8 -0
- package/core/auth/BasicAuth.js +27 -0
- package/core/auth/BearerToken.d.ts +7 -0
- package/core/auth/BearerToken.js +16 -0
- package/core/auth/NoOpAuthProvider.d.ts +5 -0
- package/core/auth/NoOpAuthProvider.js +9 -0
- package/core/auth/index.d.ts +5 -0
- package/core/auth/index.js +9 -0
- package/core/base64.d.ts +2 -0
- package/core/base64.js +26 -0
- package/core/exports.d.ts +1 -0
- package/core/exports.js +17 -0
- package/core/fetcher/APIResponse.d.ts +11 -1
- package/core/fetcher/BinaryResponse.d.ts +19 -0
- package/core/fetcher/BinaryResponse.js +17 -0
- package/core/fetcher/EndpointMetadata.d.ts +13 -0
- package/core/fetcher/EndpointSupplier.d.ts +12 -0
- package/core/fetcher/EndpointSupplier.js +22 -0
- package/core/fetcher/Fetcher.d.ts +17 -7
- package/core/fetcher/Fetcher.js +244 -28
- package/core/fetcher/Headers.d.ts +2 -0
- package/core/fetcher/Headers.js +84 -0
- package/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/core/fetcher/HttpResponsePromise.js +103 -0
- package/core/fetcher/RawResponse.d.ts +29 -0
- package/core/fetcher/RawResponse.js +44 -0
- package/core/fetcher/Supplier.d.ts +1 -1
- package/core/fetcher/createRequestUrl.d.ts +1 -1
- package/core/fetcher/createRequestUrl.js +4 -9
- package/core/fetcher/getErrorResponseBody.d.ts +1 -0
- package/core/fetcher/getErrorResponseBody.js +45 -0
- package/core/fetcher/getFetchFn.d.ts +1 -4
- package/core/fetcher/getFetchFn.js +2 -44
- package/core/fetcher/getHeader.js +1 -2
- package/core/fetcher/getRequestBody.d.ts +1 -1
- package/core/fetcher/getRequestBody.js +9 -6
- package/core/fetcher/getResponseBody.js +43 -29
- package/core/fetcher/index.d.ts +11 -5
- package/core/fetcher/index.js +15 -7
- package/core/fetcher/makeRequest.d.ts +1 -1
- package/core/fetcher/makeRequest.js +4 -6
- package/core/fetcher/requestWithRetries.js +38 -12
- package/core/fetcher/signals.d.ts +1 -8
- package/core/fetcher/signals.js +2 -15
- package/core/headers.d.ts +2 -0
- package/core/headers.js +31 -0
- package/core/index.d.ts +6 -3
- package/core/index.js +24 -11
- package/core/json.d.ts +1 -1
- package/core/json.js +2 -2
- package/core/logging/exports.d.ts +18 -0
- package/core/logging/exports.js +45 -0
- package/core/logging/index.d.ts +1 -0
- package/{dist/core/schemas → core/logging}/index.js +1 -1
- package/core/logging/logger.d.ts +126 -0
- package/core/logging/logger.js +144 -0
- package/core/runtime/index.d.ts +1 -1
- package/core/runtime/index.js +2 -2
- package/core/runtime/runtime.js +11 -11
- package/core/url/encodePathParam.d.ts +1 -0
- package/core/url/encodePathParam.js +21 -0
- package/core/url/index.d.ts +3 -0
- package/core/url/index.js +9 -0
- package/core/url/join.d.ts +1 -0
- package/core/url/join.js +68 -0
- package/core/url/qs.d.ts +6 -0
- package/core/url/qs.js +64 -0
- package/dist/BaseClient.d.ts +39 -0
- package/dist/BaseClient.js +59 -0
- package/dist/Client.d.ts +27 -43
- package/dist/Client.js +18 -19
- package/dist/api/errors/BadRequestError.d.ts +3 -5
- package/dist/api/errors/BadRequestError.js +26 -13
- package/dist/api/errors/ForbiddenError.d.ts +3 -5
- package/dist/api/errors/ForbiddenError.js +26 -13
- package/dist/api/errors/InternalServerError.d.ts +3 -5
- package/dist/api/errors/InternalServerError.js +26 -13
- package/dist/api/errors/NotFoundError.d.ts +3 -5
- package/dist/api/errors/NotFoundError.js +26 -13
- package/dist/api/errors/index.d.ts +4 -4
- package/dist/api/errors/index.js +4 -4
- package/dist/api/index.d.ts +3 -3
- package/dist/api/index.js +3 -3
- package/dist/api/resources/assets/client/Client.d.ts +22 -39
- package/dist/api/resources/assets/client/Client.js +52 -62
- package/dist/api/resources/assets/index.d.ts +2 -2
- package/dist/api/resources/assets/index.js +2 -2
- package/dist/api/resources/assets/resources/flows/client/Client.d.ts +13 -30
- package/dist/api/resources/assets/resources/flows/client/Client.js +48 -58
- package/dist/api/resources/assets/resources/flows/index.d.ts +1 -1
- package/dist/api/resources/assets/resources/flows/index.js +1 -1
- package/dist/api/resources/assets/resources/folders/client/Client.d.ts +19 -34
- package/dist/api/resources/assets/resources/folders/client/Client.js +89 -115
- package/dist/api/resources/assets/resources/folders/client/index.d.ts +1 -1
- package/dist/api/resources/assets/resources/folders/client/index.js +1 -1
- package/dist/api/resources/assets/resources/folders/client/requests/DeleteFolderRequest.d.ts +0 -3
- package/dist/api/resources/assets/resources/folders/client/requests/DeleteFolderRequest.js +1 -3
- package/dist/api/resources/assets/resources/folders/client/requests/UpsertFolderRequest.d.ts +0 -3
- package/dist/api/resources/assets/resources/folders/client/requests/UpsertFolderRequest.js +1 -3
- package/dist/api/resources/assets/resources/folders/client/requests/index.d.ts +2 -2
- package/dist/api/resources/assets/resources/folders/index.d.ts +1 -1
- package/dist/api/resources/assets/resources/folders/index.js +1 -1
- package/dist/api/resources/assets/resources/index.d.ts +5 -5
- package/dist/api/resources/assets/resources/index.js +23 -13
- package/dist/api/resources/assets/resources/rules/client/Client.d.ts +31 -42
- package/dist/api/resources/assets/resources/rules/client/Client.js +123 -158
- package/dist/api/resources/assets/resources/rules/client/index.d.ts +1 -1
- package/dist/api/resources/assets/resources/rules/client/index.js +1 -1
- package/dist/api/resources/assets/resources/rules/client/requests/DeleteRuleRequest.d.ts +1 -4
- package/dist/api/resources/assets/resources/rules/client/requests/DeleteRuleRequest.js +1 -3
- package/dist/api/resources/assets/resources/rules/client/requests/ImportRuleRequest.d.ts +2 -4
- package/dist/api/resources/assets/resources/rules/client/requests/ImportRuleRequest.js +1 -3
- package/dist/api/resources/assets/resources/rules/client/requests/ListRulesRequest.d.ts +10 -0
- package/dist/api/resources/assets/resources/rules/client/requests/ListRulesRequest.js +3 -0
- package/dist/api/resources/assets/resources/rules/client/requests/PullRulesRequest.d.ts +10 -0
- package/dist/api/resources/assets/resources/rules/client/requests/PullRulesRequest.js +3 -0
- package/dist/api/resources/assets/resources/rules/client/requests/index.d.ts +4 -4
- package/dist/api/resources/assets/resources/rules/index.d.ts +1 -1
- package/dist/api/resources/assets/resources/rules/index.js +1 -1
- package/dist/api/resources/decisions/client/Client.d.ts +19 -34
- package/dist/api/resources/decisions/client/Client.js +79 -74
- package/dist/api/resources/decisions/client/index.d.ts +1 -1
- package/dist/api/resources/decisions/client/index.js +1 -1
- package/dist/api/resources/decisions/client/requests/QueryDecisionsRequest.d.ts +36 -0
- package/dist/api/resources/decisions/client/requests/QueryDecisionsRequest.js +3 -0
- package/dist/api/resources/decisions/client/requests/index.d.ts +1 -1
- package/dist/api/resources/decisions/index.d.ts +2 -1
- package/dist/api/resources/decisions/index.js +2 -1
- package/dist/api/resources/decisions/types/QueryDecisionsRequestCount.d.ts +5 -0
- package/dist/api/resources/decisions/types/QueryDecisionsRequestCount.js +8 -0
- package/dist/api/resources/decisions/types/index.d.ts +1 -0
- package/dist/api/resources/{users → decisions}/types/index.js +1 -1
- package/dist/api/resources/flows/client/Client.d.ts +23 -36
- package/dist/api/resources/flows/client/Client.js +62 -65
- package/dist/api/resources/flows/client/index.d.ts +1 -1
- package/dist/api/resources/flows/client/index.js +15 -0
- package/dist/api/resources/flows/client/requests/ExecuteFlowsRequest.d.ts +19 -0
- package/dist/api/resources/flows/client/requests/ExecuteFlowsRequest.js +3 -0
- package/dist/api/resources/flows/client/requests/index.d.ts +1 -0
- package/dist/api/resources/flows/index.d.ts +1 -1
- package/dist/api/resources/flows/index.js +1 -1
- package/dist/api/resources/index.d.ts +13 -11
- package/dist/api/resources/index.js +31 -19
- package/dist/api/resources/rules/client/Client.d.ts +55 -56
- package/dist/api/resources/rules/client/Client.js +130 -138
- package/dist/api/resources/rules/client/index.d.ts +1 -1
- package/dist/api/resources/rules/client/index.js +15 -0
- package/dist/api/resources/rules/client/requests/BulkSolveRulesRequest.d.ts +21 -0
- package/dist/api/resources/rules/client/requests/BulkSolveRulesRequest.js +3 -0
- package/dist/api/resources/rules/client/requests/SolveRulesRequest.d.ts +19 -0
- package/dist/api/resources/rules/client/requests/SolveRulesRequest.js +3 -0
- package/dist/api/resources/rules/client/requests/index.d.ts +2 -0
- package/dist/api/resources/rules/index.d.ts +1 -1
- package/dist/api/resources/rules/index.js +1 -1
- package/dist/api/resources/tests/client/Client.d.ts +13 -21
- package/dist/api/resources/tests/client/Client.js +11 -12
- package/dist/api/resources/tests/index.d.ts +2 -2
- package/dist/api/resources/tests/index.js +2 -2
- package/dist/api/resources/tests/resources/flows/client/Client.d.ts +41 -50
- package/dist/api/resources/tests/resources/flows/client/Client.js +117 -136
- package/dist/api/resources/tests/resources/flows/client/index.d.ts +1 -1
- package/dist/api/resources/tests/resources/flows/client/index.js +15 -0
- package/dist/api/resources/tests/resources/flows/client/requests/CreateFlowsRequest.d.ts +22 -0
- package/dist/api/resources/tests/resources/flows/client/requests/CreateFlowsRequest.js +3 -0
- package/dist/api/resources/tests/resources/flows/client/requests/DeleteFlowsRequest.d.ts +13 -0
- package/dist/api/resources/tests/resources/flows/client/requests/DeleteFlowsRequest.js +3 -0
- package/dist/api/resources/tests/resources/flows/client/requests/ListFlowsRequest.d.ts +10 -0
- package/dist/api/resources/tests/resources/flows/client/requests/ListFlowsRequest.js +3 -0
- package/dist/api/resources/tests/resources/flows/client/requests/index.d.ts +3 -0
- package/dist/api/resources/tests/resources/flows/index.d.ts +1 -1
- package/dist/api/resources/tests/resources/flows/index.js +1 -1
- package/dist/api/resources/tests/resources/index.d.ts +4 -2
- package/dist/api/resources/tests/resources/index.js +24 -9
- package/dist/api/resources/tests/resources/rules/client/Client.d.ts +41 -50
- package/dist/api/resources/tests/resources/rules/client/Client.js +117 -136
- package/dist/api/resources/tests/resources/rules/client/index.d.ts +1 -1
- package/dist/api/resources/tests/resources/rules/client/index.js +15 -0
- package/dist/api/resources/tests/resources/rules/client/requests/CreateRulesRequest.d.ts +22 -0
- package/dist/api/resources/tests/resources/rules/client/requests/CreateRulesRequest.js +3 -0
- package/dist/api/resources/tests/resources/rules/client/requests/DeleteRulesRequest.d.ts +13 -0
- package/dist/api/resources/tests/resources/rules/client/requests/DeleteRulesRequest.js +3 -0
- package/dist/api/resources/tests/resources/rules/client/requests/ListRulesRequest.d.ts +10 -0
- package/dist/api/resources/tests/resources/rules/client/requests/ListRulesRequest.js +3 -0
- package/dist/api/resources/tests/resources/rules/client/requests/index.d.ts +3 -0
- package/dist/api/resources/tests/resources/rules/index.d.ts +1 -1
- package/dist/api/resources/tests/resources/rules/index.js +1 -1
- package/dist/api/resources/users/client/Client.d.ts +55 -33
- package/dist/api/resources/users/client/Client.js +164 -56
- package/dist/api/resources/users/client/index.d.ts +1 -1
- package/dist/api/resources/users/client/index.js +1 -1
- package/dist/api/resources/users/client/requests/CreateUserRequest.d.ts +28 -0
- package/dist/api/resources/users/client/requests/CreateUserRequest.js +3 -0
- package/dist/api/resources/users/client/requests/UserInviteRequest.d.ts +11 -5
- package/dist/api/resources/users/client/requests/UserInviteRequest.js +12 -3
- package/dist/api/resources/users/client/requests/index.d.ts +2 -1
- package/dist/api/resources/users/index.d.ts +2 -3
- package/dist/api/resources/users/index.js +2 -3
- package/dist/api/resources/users/resources/groups/client/Client.d.ts +16 -32
- package/dist/api/resources/users/resources/groups/client/Client.js +68 -86
- package/dist/api/resources/users/resources/groups/client/index.d.ts +1 -1
- package/dist/api/resources/users/resources/groups/client/index.js +1 -1
- package/dist/api/resources/users/resources/groups/client/requests/CreateUserGroupRequest.d.ts +0 -3
- package/dist/api/resources/users/resources/groups/client/requests/CreateUserGroupRequest.js +1 -3
- package/dist/api/resources/users/resources/groups/client/requests/index.d.ts +1 -1
- package/dist/api/resources/users/resources/groups/index.d.ts +1 -1
- package/dist/api/resources/users/resources/groups/index.js +1 -1
- package/dist/api/resources/users/resources/index.d.ts +2 -2
- package/dist/api/resources/users/resources/index.js +19 -9
- package/dist/api/resources/values/client/Client.d.ts +21 -36
- package/dist/api/resources/values/client/Client.js +96 -126
- package/dist/api/resources/values/client/index.d.ts +1 -1
- package/dist/api/resources/values/client/index.js +1 -1
- package/dist/api/resources/values/client/requests/DeleteValuesRequest.d.ts +10 -0
- package/dist/api/resources/values/client/requests/DeleteValuesRequest.js +3 -0
- package/dist/api/resources/values/client/requests/ListValuesRequest.d.ts +17 -0
- package/dist/api/resources/values/client/requests/ListValuesRequest.js +3 -0
- package/dist/api/resources/values/client/requests/UpdateValuesRequest.d.ts +0 -3
- package/dist/api/resources/values/client/requests/UpdateValuesRequest.js +1 -3
- package/dist/api/resources/values/client/requests/index.d.ts +3 -3
- package/dist/api/resources/values/index.d.ts +1 -1
- package/dist/api/resources/values/index.js +1 -1
- package/dist/api/types/BulkRuleResponseItem.d.ts +4 -5
- package/dist/api/types/BulkRuleResponseItem.js +1 -3
- package/dist/api/types/CreateTestRequest.d.ts +0 -3
- package/dist/api/types/CreateTestRequest.js +1 -3
- package/dist/api/types/CreateUserResponse.d.ts +26 -0
- package/dist/api/types/CreateUserResponse.js +3 -0
- package/dist/api/types/DecisionLog.d.ts +21 -5
- package/dist/api/types/DecisionLog.js +1 -3
- package/dist/api/types/DecisionLogResponse.d.ts +7 -4
- package/dist/api/types/DecisionLogResponse.js +1 -3
- package/dist/api/types/DynamicRequestPayload.d.ts +1 -4
- package/dist/api/types/DynamicRequestPayload.js +1 -3
- package/dist/api/types/DynamicResponsePayload.d.ts +1 -4
- package/dist/api/types/DynamicResponsePayload.js +1 -3
- package/dist/api/types/DynamicValue.d.ts +2 -4
- package/dist/api/types/DynamicValue.js +1 -3
- package/dist/api/types/DynamicValueListResponse.d.ts +2 -5
- package/dist/api/types/DynamicValueListResponse.js +1 -3
- package/dist/api/types/Error_.d.ts +0 -3
- package/dist/api/types/Error_.js +1 -3
- package/dist/api/types/FlowBase.d.ts +0 -3
- package/dist/api/types/FlowBase.js +1 -3
- package/dist/api/types/FlowDetail.d.ts +2 -5
- package/dist/api/types/FlowDetail.js +1 -3
- package/dist/api/types/FlowExecutionError.d.ts +0 -3
- package/dist/api/types/FlowExecutionError.js +1 -3
- package/dist/api/types/FlowListResponse.d.ts +2 -5
- package/dist/api/types/FlowListResponse.js +1 -3
- package/dist/api/types/Folder.d.ts +1 -4
- package/dist/api/types/Folder.js +1 -3
- package/dist/api/types/FolderListResponse.d.ts +2 -5
- package/dist/api/types/FolderListResponse.js +1 -3
- package/dist/api/types/ParallelSolveRequest.d.ts +11 -5
- package/dist/api/types/ParallelSolveRequest.js +1 -3
- package/dist/api/types/ParallelSolveResponse.d.ts +2 -5
- package/dist/api/types/ParallelSolveResponse.js +1 -3
- package/dist/api/types/RuleBase.d.ts +0 -3
- package/dist/api/types/RuleBase.js +1 -3
- package/dist/api/types/RuleDetail.d.ts +4 -7
- package/dist/api/types/RuleDetail.js +1 -3
- package/dist/api/types/RuleExport.d.ts +1 -4
- package/dist/api/types/RuleExport.js +1 -3
- package/dist/api/types/RuleListResponse.d.ts +2 -5
- package/dist/api/types/RuleListResponse.js +1 -3
- package/dist/api/types/RuleUsage.d.ts +1 -4
- package/dist/api/types/RuleUsage.js +1 -3
- package/dist/api/types/SchemaField.d.ts +18 -7
- package/dist/api/types/SchemaField.js +13 -3
- package/dist/api/types/SuccessMessage.d.ts +0 -3
- package/dist/api/types/SuccessMessage.js +1 -3
- package/dist/api/types/Test.d.ts +25 -6
- package/dist/api/types/Test.js +1 -3
- package/dist/api/types/TestListResponse.d.ts +2 -5
- package/dist/api/types/TestListResponse.js +1 -3
- package/dist/api/types/UsageStatistics.d.ts +5 -8
- package/dist/api/types/UsageStatistics.js +1 -3
- package/dist/api/types/UserDetail.d.ts +19 -0
- package/dist/api/types/UserDetail.js +3 -0
- package/dist/api/types/UserGroup.d.ts +0 -3
- package/dist/api/types/UserGroup.js +1 -3
- package/dist/api/types/UserGroupListResponse.d.ts +2 -5
- package/dist/api/types/UserGroupListResponse.js +1 -3
- package/dist/api/types/UserInviteResponse.d.ts +11 -5
- package/dist/api/types/UserInviteResponse.js +1 -3
- package/dist/api/types/UserListResponse.d.ts +5 -0
- package/dist/api/types/UserListResponse.js +3 -0
- package/dist/api/types/ValueLimits.d.ts +4 -7
- package/dist/api/types/ValueLimits.js +1 -3
- package/dist/api/types/index.d.ts +34 -39
- package/dist/api/types/index.js +34 -39
- package/dist/auth/HeaderAuthProvider.d.ts +16 -0
- package/dist/auth/HeaderAuthProvider.js +71 -0
- package/dist/auth/index.d.ts +1 -0
- package/dist/auth/index.js +5 -0
- package/dist/core/auth/AuthProvider.d.ts +7 -0
- package/dist/core/auth/AuthRequest.d.ts +9 -0
- package/dist/core/auth/BasicAuth.d.ts +8 -0
- package/dist/core/auth/BasicAuth.js +27 -0
- package/dist/core/auth/BearerToken.d.ts +7 -0
- package/dist/core/auth/BearerToken.js +16 -0
- package/dist/core/auth/NoOpAuthProvider.d.ts +5 -0
- package/dist/core/auth/NoOpAuthProvider.js +9 -0
- package/dist/core/auth/index.d.ts +5 -0
- package/dist/core/auth/index.js +9 -0
- package/dist/core/base64.d.ts +2 -0
- package/dist/core/base64.js +26 -0
- package/dist/core/exports.d.ts +1 -0
- package/dist/core/exports.js +17 -0
- package/dist/core/fetcher/APIResponse.d.ts +11 -1
- package/dist/core/fetcher/BinaryResponse.d.ts +19 -0
- package/dist/core/fetcher/BinaryResponse.js +17 -0
- package/dist/core/fetcher/EndpointMetadata.d.ts +13 -0
- package/dist/core/fetcher/EndpointSupplier.d.ts +12 -0
- package/dist/core/fetcher/EndpointSupplier.js +22 -0
- package/dist/core/fetcher/Fetcher.d.ts +17 -7
- package/dist/core/fetcher/Fetcher.js +244 -28
- package/dist/core/fetcher/Headers.d.ts +2 -0
- package/dist/core/fetcher/Headers.js +84 -0
- package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/dist/core/fetcher/HttpResponsePromise.js +103 -0
- package/dist/core/fetcher/RawResponse.d.ts +29 -0
- package/dist/core/fetcher/RawResponse.js +44 -0
- package/dist/core/fetcher/Supplier.d.ts +1 -1
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -1
- package/dist/core/fetcher/createRequestUrl.js +4 -9
- package/dist/core/fetcher/getErrorResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getErrorResponseBody.js +45 -0
- package/dist/core/fetcher/getFetchFn.d.ts +1 -4
- package/dist/core/fetcher/getFetchFn.js +2 -44
- package/dist/core/fetcher/getHeader.js +1 -2
- package/dist/core/fetcher/getRequestBody.d.ts +1 -1
- package/dist/core/fetcher/getRequestBody.js +9 -6
- package/dist/core/fetcher/getResponseBody.js +43 -29
- package/dist/core/fetcher/index.d.ts +11 -5
- package/dist/core/fetcher/index.js +15 -7
- package/dist/core/fetcher/makeRequest.d.ts +1 -1
- package/dist/core/fetcher/makeRequest.js +4 -6
- package/dist/core/fetcher/requestWithRetries.js +38 -12
- package/dist/core/fetcher/signals.d.ts +1 -8
- package/dist/core/fetcher/signals.js +2 -15
- package/dist/core/headers.d.ts +2 -0
- package/dist/core/headers.js +31 -0
- package/dist/core/index.d.ts +6 -3
- package/dist/core/index.js +24 -11
- package/dist/core/json.d.ts +1 -1
- package/dist/core/json.js +2 -2
- package/dist/core/logging/exports.d.ts +18 -0
- package/dist/core/logging/exports.js +45 -0
- package/dist/core/logging/index.d.ts +1 -0
- package/dist/{serialization/resources/assets → core/logging}/index.js +1 -1
- package/dist/core/logging/logger.d.ts +126 -0
- package/dist/core/logging/logger.js +144 -0
- package/dist/core/runtime/index.d.ts +1 -1
- package/dist/core/runtime/index.js +2 -2
- package/dist/core/runtime/runtime.js +11 -11
- package/dist/core/url/encodePathParam.d.ts +1 -0
- package/dist/core/url/encodePathParam.js +21 -0
- package/dist/core/url/index.d.ts +3 -0
- package/dist/core/url/index.js +9 -0
- package/dist/core/url/join.d.ts +1 -0
- package/dist/core/url/join.js +68 -0
- package/dist/core/url/qs.d.ts +6 -0
- package/dist/core/url/qs.js +64 -0
- package/dist/environments.d.ts +2 -5
- package/dist/environments.js +2 -4
- package/dist/errors/RulebricksError.d.ts +4 -4
- package/dist/errors/RulebricksError.js +12 -13
- package/dist/errors/RulebricksTimeoutError.d.ts +0 -3
- package/dist/errors/RulebricksTimeoutError.js +6 -4
- package/dist/errors/handleNonStatusCodeError.d.ts +2 -0
- package/dist/errors/handleNonStatusCodeError.js +65 -0
- package/dist/errors/index.d.ts +2 -2
- package/dist/errors/index.js +4 -4
- package/dist/exports.d.ts +1 -0
- package/{core/schemas/index.js → dist/exports.js} +1 -1
- package/dist/forge/operators.d.ts +1 -1
- package/dist/forge/rule.js +4 -4
- package/dist/forge/types.d.ts +1 -1
- package/dist/forge/types.js +2 -2
- package/dist/forge/values.js +2 -2
- package/dist/index.d.ts +6 -5
- package/dist/index.js +29 -16
- package/environments.d.ts +2 -5
- package/environments.js +2 -4
- package/errors/RulebricksError.d.ts +4 -4
- package/errors/RulebricksError.js +12 -13
- package/errors/RulebricksTimeoutError.d.ts +0 -3
- package/errors/RulebricksTimeoutError.js +6 -4
- package/errors/handleNonStatusCodeError.d.ts +2 -0
- package/errors/handleNonStatusCodeError.js +65 -0
- package/errors/index.d.ts +2 -2
- package/errors/index.js +4 -4
- package/exports.d.ts +1 -0
- package/{dist/serialization/resources/assets/resources/folders/client/index.js → exports.js} +1 -1
- package/forge/operators.d.ts +1 -1
- package/forge/rule.js +4 -4
- package/forge/types.d.ts +1 -1
- package/forge/types.js +2 -2
- package/forge/values.js +2 -2
- package/index.d.ts +6 -5
- package/index.js +29 -16
- package/package.json +44 -39
- package/api/resources/assets/resources/rules/client/requests/RulesListRequest.d.ts +0 -13
- package/api/resources/assets/resources/rules/client/requests/RulesListRequest.js +0 -5
- package/api/resources/assets/resources/rules/client/requests/RulesPullRequest.d.ts +0 -15
- package/api/resources/assets/resources/rules/client/requests/RulesPullRequest.js +0 -5
- package/api/resources/decisions/client/requests/DecisionsQueryRequest.d.ts +0 -31
- package/api/resources/decisions/client/requests/DecisionsQueryRequest.js +0 -5
- package/api/resources/users/types/UserInviteRequestRole.d.ts +0 -13
- package/api/resources/users/types/UserInviteRequestRole.js +0 -12
- package/api/resources/users/types/index.d.ts +0 -1
- package/api/resources/values/client/requests/ValuesDeleteRequest.d.ts +0 -15
- package/api/resources/values/client/requests/ValuesDeleteRequest.js +0 -5
- package/api/resources/values/client/requests/ValuesListRequest.d.ts +0 -24
- package/api/resources/values/client/requests/ValuesListRequest.js +0 -5
- package/api/types/BulkRuleResponseItemError.d.ts +0 -7
- package/api/types/BulkRuleResponseItemError.js +0 -5
- package/api/types/ParallelSolveRequestValue.d.ts +0 -11
- package/api/types/ParallelSolveRequestValue.js +0 -5
- package/api/types/SchemaFieldDefaultValue.d.ts +0 -7
- package/api/types/SchemaFieldDefaultValue.js +0 -5
- package/api/types/SchemaFieldType.d.ts +0 -14
- package/api/types/SchemaFieldType.js +0 -13
- package/api/types/TestTestState.d.ts +0 -19
- package/api/types/TestTestState.js +0 -5
- package/api/types/TestTestStateConditionsItemValue.d.ts +0 -7
- package/api/types/TestTestStateConditionsItemValue.js +0 -5
- package/api/types/TestTestStateEvaluationError.d.ts +0 -7
- package/api/types/TestTestStateEvaluationError.js +0 -5
- package/api/types/UserInviteResponseUser.d.ts +0 -11
- package/api/types/UserInviteResponseUser.js +0 -5
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -247
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -22
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -124
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -229
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -50
- package/core/schemas/Schema.d.ts +0 -87
- package/core/schemas/Schema.js +0 -24
- package/core/schemas/builders/bigint/bigint.d.ts +0 -2
- package/core/schemas/builders/bigint/bigint.js +0 -54
- package/core/schemas/builders/bigint/index.d.ts +0 -1
- package/core/schemas/builders/bigint/index.js +0 -5
- package/core/schemas/builders/date/date.d.ts +0 -2
- package/core/schemas/builders/date/date.js +0 -63
- package/core/schemas/builders/date/index.d.ts +0 -1
- package/core/schemas/builders/date/index.js +0 -5
- package/core/schemas/builders/enum/enum.d.ts +0 -2
- package/core/schemas/builders/enum/enum.js +0 -39
- package/core/schemas/builders/enum/index.d.ts +0 -1
- package/core/schemas/builders/enum/index.js +0 -5
- package/core/schemas/builders/index.d.ts +0 -14
- package/core/schemas/builders/index.js +0 -30
- package/core/schemas/builders/lazy/index.d.ts +0 -3
- package/core/schemas/builders/lazy/index.js +0 -7
- package/core/schemas/builders/lazy/lazy.d.ts +0 -5
- package/core/schemas/builders/lazy/lazy.js +0 -25
- package/core/schemas/builders/lazy/lazyObject.d.ts +0 -3
- package/core/schemas/builders/lazy/lazyObject.js +0 -12
- package/core/schemas/builders/list/index.d.ts +0 -1
- package/core/schemas/builders/list/index.js +0 -5
- package/core/schemas/builders/list/list.d.ts +0 -2
- package/core/schemas/builders/list/list.js +0 -55
- package/core/schemas/builders/literals/booleanLiteral.d.ts +0 -2
- package/core/schemas/builders/literals/booleanLiteral.js +0 -29
- package/core/schemas/builders/literals/index.d.ts +0 -2
- package/core/schemas/builders/literals/index.js +0 -7
- package/core/schemas/builders/literals/stringLiteral.d.ts +0 -2
- package/core/schemas/builders/literals/stringLiteral.js +0 -29
- package/core/schemas/builders/object/index.d.ts +0 -6
- package/core/schemas/builders/object/index.js +0 -11
- package/core/schemas/builders/object/object.d.ts +0 -3
- package/core/schemas/builders/object/object.js +0 -262
- package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +0 -6
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +0 -8
- package/core/schemas/builders/object/property.d.ts +0 -8
- package/core/schemas/builders/object/property.js +0 -16
- package/core/schemas/builders/object/types.d.ts +0 -31
- package/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +0 -9
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +0 -54
- package/core/schemas/builders/object-like/index.d.ts +0 -2
- package/core/schemas/builders/object-like/index.js +0 -6
- package/core/schemas/builders/object-like/types.d.ts +0 -7
- package/core/schemas/builders/primitives/any.d.ts +0 -1
- package/core/schemas/builders/primitives/any.js +0 -6
- package/core/schemas/builders/primitives/boolean.d.ts +0 -1
- package/core/schemas/builders/primitives/boolean.js +0 -25
- package/core/schemas/builders/primitives/index.d.ts +0 -5
- package/core/schemas/builders/primitives/index.js +0 -13
- package/core/schemas/builders/primitives/number.d.ts +0 -1
- package/core/schemas/builders/primitives/number.js +0 -25
- package/core/schemas/builders/primitives/string.d.ts +0 -1
- package/core/schemas/builders/primitives/string.js +0 -25
- package/core/schemas/builders/primitives/unknown.d.ts +0 -1
- package/core/schemas/builders/primitives/unknown.js +0 -6
- package/core/schemas/builders/record/index.d.ts +0 -2
- package/core/schemas/builders/record/index.js +0 -5
- package/core/schemas/builders/record/record.d.ts +0 -3
- package/core/schemas/builders/record/record.js +0 -94
- package/core/schemas/builders/record/types.d.ts +0 -4
- package/core/schemas/builders/schema-utils/JsonError.d.ts +0 -5
- package/core/schemas/builders/schema-utils/JsonError.js +0 -12
- package/core/schemas/builders/schema-utils/ParseError.d.ts +0 -5
- package/core/schemas/builders/schema-utils/ParseError.js +0 -12
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +0 -21
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +0 -146
- package/core/schemas/builders/schema-utils/index.d.ts +0 -4
- package/core/schemas/builders/schema-utils/index.js +0 -11
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +0 -2
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +0 -10
- package/core/schemas/builders/set/index.d.ts +0 -1
- package/core/schemas/builders/set/index.js +0 -5
- package/core/schemas/builders/set/set.d.ts +0 -2
- package/core/schemas/builders/set/set.js +0 -44
- package/core/schemas/builders/undiscriminated-union/index.d.ts +0 -2
- package/core/schemas/builders/undiscriminated-union/index.js +0 -5
- package/core/schemas/builders/undiscriminated-union/types.d.ts +0 -4
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +0 -3
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +0 -40
- package/core/schemas/builders/union/discriminant.d.ts +0 -5
- package/core/schemas/builders/union/discriminant.js +0 -10
- package/core/schemas/builders/union/index.d.ts +0 -4
- package/core/schemas/builders/union/index.js +0 -7
- package/core/schemas/builders/union/types.d.ts +0 -13
- package/core/schemas/builders/union/union.d.ts +0 -4
- package/core/schemas/builders/union/union.js +0 -130
- package/core/schemas/index.d.ts +0 -2
- package/core/schemas/utils/MaybePromise.d.ts +0 -1
- package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +0 -7
- package/core/schemas/utils/createIdentitySchemaCreator.d.ts +0 -2
- package/core/schemas/utils/createIdentitySchemaCreator.js +0 -16
- package/core/schemas/utils/entries.d.ts +0 -1
- package/core/schemas/utils/entries.js +0 -7
- package/core/schemas/utils/filterObject.d.ts +0 -1
- package/core/schemas/utils/filterObject.js +0 -14
- package/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +0 -1
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +0 -28
- package/core/schemas/utils/isPlainObject.d.ts +0 -1
- package/core/schemas/utils/isPlainObject.js +0 -18
- package/core/schemas/utils/keys.d.ts +0 -1
- package/core/schemas/utils/keys.js +0 -7
- package/core/schemas/utils/maybeSkipValidation.d.ts +0 -2
- package/core/schemas/utils/maybeSkipValidation.js +0 -28
- package/core/schemas/utils/partition.d.ts +0 -1
- package/core/schemas/utils/partition.js +0 -16
- package/dist/api/resources/assets/resources/rules/client/requests/RulesListRequest.d.ts +0 -13
- package/dist/api/resources/assets/resources/rules/client/requests/RulesListRequest.js +0 -5
- package/dist/api/resources/assets/resources/rules/client/requests/RulesPullRequest.d.ts +0 -15
- package/dist/api/resources/assets/resources/rules/client/requests/RulesPullRequest.js +0 -5
- package/dist/api/resources/decisions/client/requests/DecisionsQueryRequest.d.ts +0 -31
- package/dist/api/resources/decisions/client/requests/DecisionsQueryRequest.js +0 -5
- package/dist/api/resources/users/types/UserInviteRequestRole.d.ts +0 -13
- package/dist/api/resources/users/types/UserInviteRequestRole.js +0 -12
- package/dist/api/resources/users/types/index.d.ts +0 -1
- package/dist/api/resources/values/client/requests/ValuesDeleteRequest.d.ts +0 -15
- package/dist/api/resources/values/client/requests/ValuesDeleteRequest.js +0 -5
- package/dist/api/resources/values/client/requests/ValuesListRequest.d.ts +0 -24
- package/dist/api/resources/values/client/requests/ValuesListRequest.js +0 -5
- package/dist/api/types/BulkRuleResponseItemError.d.ts +0 -7
- package/dist/api/types/BulkRuleResponseItemError.js +0 -5
- package/dist/api/types/ParallelSolveRequestValue.d.ts +0 -11
- package/dist/api/types/ParallelSolveRequestValue.js +0 -5
- package/dist/api/types/SchemaFieldDefaultValue.d.ts +0 -7
- package/dist/api/types/SchemaFieldDefaultValue.js +0 -5
- package/dist/api/types/SchemaFieldType.d.ts +0 -14
- package/dist/api/types/SchemaFieldType.js +0 -13
- package/dist/api/types/TestTestState.d.ts +0 -19
- package/dist/api/types/TestTestState.js +0 -5
- package/dist/api/types/TestTestStateConditionsItemValue.d.ts +0 -7
- package/dist/api/types/TestTestStateConditionsItemValue.js +0 -5
- package/dist/api/types/TestTestStateEvaluationError.d.ts +0 -7
- package/dist/api/types/TestTestStateEvaluationError.js +0 -5
- package/dist/api/types/UserInviteResponseUser.d.ts +0 -11
- package/dist/api/types/UserInviteResponseUser.js +0 -5
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -247
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -22
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -124
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -229
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -50
- package/dist/core/schemas/Schema.d.ts +0 -87
- package/dist/core/schemas/Schema.js +0 -24
- package/dist/core/schemas/builders/bigint/bigint.d.ts +0 -2
- package/dist/core/schemas/builders/bigint/bigint.js +0 -54
- package/dist/core/schemas/builders/bigint/index.d.ts +0 -1
- package/dist/core/schemas/builders/bigint/index.js +0 -5
- package/dist/core/schemas/builders/date/date.d.ts +0 -2
- package/dist/core/schemas/builders/date/date.js +0 -63
- package/dist/core/schemas/builders/date/index.d.ts +0 -1
- package/dist/core/schemas/builders/date/index.js +0 -5
- package/dist/core/schemas/builders/enum/enum.d.ts +0 -2
- package/dist/core/schemas/builders/enum/enum.js +0 -39
- package/dist/core/schemas/builders/enum/index.d.ts +0 -1
- package/dist/core/schemas/builders/enum/index.js +0 -5
- package/dist/core/schemas/builders/index.d.ts +0 -14
- package/dist/core/schemas/builders/index.js +0 -30
- package/dist/core/schemas/builders/lazy/index.d.ts +0 -3
- package/dist/core/schemas/builders/lazy/index.js +0 -7
- package/dist/core/schemas/builders/lazy/lazy.d.ts +0 -5
- package/dist/core/schemas/builders/lazy/lazy.js +0 -25
- package/dist/core/schemas/builders/lazy/lazyObject.d.ts +0 -3
- package/dist/core/schemas/builders/lazy/lazyObject.js +0 -12
- package/dist/core/schemas/builders/list/index.d.ts +0 -1
- package/dist/core/schemas/builders/list/index.js +0 -5
- package/dist/core/schemas/builders/list/list.d.ts +0 -2
- package/dist/core/schemas/builders/list/list.js +0 -55
- package/dist/core/schemas/builders/literals/booleanLiteral.d.ts +0 -2
- package/dist/core/schemas/builders/literals/booleanLiteral.js +0 -29
- package/dist/core/schemas/builders/literals/index.d.ts +0 -2
- package/dist/core/schemas/builders/literals/index.js +0 -7
- package/dist/core/schemas/builders/literals/stringLiteral.d.ts +0 -2
- package/dist/core/schemas/builders/literals/stringLiteral.js +0 -29
- package/dist/core/schemas/builders/object/index.d.ts +0 -6
- package/dist/core/schemas/builders/object/index.js +0 -11
- package/dist/core/schemas/builders/object/object.d.ts +0 -3
- package/dist/core/schemas/builders/object/object.js +0 -262
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +0 -6
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +0 -8
- package/dist/core/schemas/builders/object/property.d.ts +0 -8
- package/dist/core/schemas/builders/object/property.js +0 -16
- package/dist/core/schemas/builders/object/types.d.ts +0 -31
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +0 -9
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +0 -54
- package/dist/core/schemas/builders/object-like/index.d.ts +0 -2
- package/dist/core/schemas/builders/object-like/index.js +0 -6
- package/dist/core/schemas/builders/object-like/types.d.ts +0 -7
- package/dist/core/schemas/builders/primitives/any.d.ts +0 -1
- package/dist/core/schemas/builders/primitives/any.js +0 -6
- package/dist/core/schemas/builders/primitives/boolean.d.ts +0 -1
- package/dist/core/schemas/builders/primitives/boolean.js +0 -25
- package/dist/core/schemas/builders/primitives/index.d.ts +0 -5
- package/dist/core/schemas/builders/primitives/index.js +0 -13
- package/dist/core/schemas/builders/primitives/number.d.ts +0 -1
- package/dist/core/schemas/builders/primitives/number.js +0 -25
- package/dist/core/schemas/builders/primitives/string.d.ts +0 -1
- package/dist/core/schemas/builders/primitives/string.js +0 -25
- package/dist/core/schemas/builders/primitives/unknown.d.ts +0 -1
- package/dist/core/schemas/builders/primitives/unknown.js +0 -6
- package/dist/core/schemas/builders/record/index.d.ts +0 -2
- package/dist/core/schemas/builders/record/index.js +0 -5
- package/dist/core/schemas/builders/record/record.d.ts +0 -3
- package/dist/core/schemas/builders/record/record.js +0 -94
- package/dist/core/schemas/builders/record/types.d.ts +0 -4
- package/dist/core/schemas/builders/schema-utils/JsonError.d.ts +0 -5
- package/dist/core/schemas/builders/schema-utils/JsonError.js +0 -12
- package/dist/core/schemas/builders/schema-utils/ParseError.d.ts +0 -5
- package/dist/core/schemas/builders/schema-utils/ParseError.js +0 -12
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +0 -21
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +0 -146
- package/dist/core/schemas/builders/schema-utils/index.d.ts +0 -4
- package/dist/core/schemas/builders/schema-utils/index.js +0 -11
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +0 -2
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +0 -10
- package/dist/core/schemas/builders/set/index.d.ts +0 -1
- package/dist/core/schemas/builders/set/index.js +0 -5
- package/dist/core/schemas/builders/set/set.d.ts +0 -2
- package/dist/core/schemas/builders/set/set.js +0 -44
- package/dist/core/schemas/builders/undiscriminated-union/index.d.ts +0 -2
- package/dist/core/schemas/builders/undiscriminated-union/index.js +0 -5
- package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +0 -4
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +0 -3
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +0 -40
- package/dist/core/schemas/builders/union/discriminant.d.ts +0 -5
- package/dist/core/schemas/builders/union/discriminant.js +0 -10
- package/dist/core/schemas/builders/union/index.d.ts +0 -4
- package/dist/core/schemas/builders/union/index.js +0 -7
- package/dist/core/schemas/builders/union/types.d.ts +0 -13
- package/dist/core/schemas/builders/union/union.d.ts +0 -4
- package/dist/core/schemas/builders/union/union.js +0 -130
- package/dist/core/schemas/index.d.ts +0 -2
- package/dist/core/schemas/utils/MaybePromise.d.ts +0 -1
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +0 -7
- package/dist/core/schemas/utils/createIdentitySchemaCreator.d.ts +0 -2
- package/dist/core/schemas/utils/createIdentitySchemaCreator.js +0 -16
- package/dist/core/schemas/utils/entries.d.ts +0 -1
- package/dist/core/schemas/utils/entries.js +0 -7
- package/dist/core/schemas/utils/filterObject.d.ts +0 -1
- package/dist/core/schemas/utils/filterObject.js +0 -14
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +0 -1
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +0 -28
- package/dist/core/schemas/utils/isPlainObject.d.ts +0 -1
- package/dist/core/schemas/utils/isPlainObject.js +0 -18
- package/dist/core/schemas/utils/keys.d.ts +0 -1
- package/dist/core/schemas/utils/keys.js +0 -7
- package/dist/core/schemas/utils/maybeSkipValidation.d.ts +0 -2
- package/dist/core/schemas/utils/maybeSkipValidation.js +0 -28
- package/dist/core/schemas/utils/partition.d.ts +0 -1
- package/dist/core/schemas/utils/partition.js +0 -16
- package/dist/serialization/index.d.ts +0 -2
- package/dist/serialization/index.js +0 -18
- package/dist/serialization/resources/assets/index.d.ts +0 -1
- package/dist/serialization/resources/assets/resources/folders/client/index.d.ts +0 -1
- package/dist/serialization/resources/assets/resources/folders/client/requests/DeleteFolderRequest.d.ts +0 -12
- package/dist/serialization/resources/assets/resources/folders/client/requests/DeleteFolderRequest.js +0 -33
- package/dist/serialization/resources/assets/resources/folders/client/requests/UpsertFolderRequest.d.ts +0 -14
- package/dist/serialization/resources/assets/resources/folders/client/requests/UpsertFolderRequest.js +0 -35
- package/dist/serialization/resources/assets/resources/folders/client/requests/index.d.ts +0 -2
- package/dist/serialization/resources/assets/resources/folders/client/requests/index.js +0 -7
- package/dist/serialization/resources/assets/resources/folders/index.d.ts +0 -1
- package/dist/serialization/resources/assets/resources/folders/index.js +0 -17
- package/dist/serialization/resources/assets/resources/index.d.ts +0 -4
- package/dist/serialization/resources/assets/resources/index.js +0 -33
- package/dist/serialization/resources/assets/resources/rules/client/index.d.ts +0 -1
- package/dist/serialization/resources/assets/resources/rules/client/index.js +0 -17
- package/dist/serialization/resources/assets/resources/rules/client/requests/DeleteRuleRequest.d.ts +0 -12
- package/dist/serialization/resources/assets/resources/rules/client/requests/DeleteRuleRequest.js +0 -33
- package/dist/serialization/resources/assets/resources/rules/client/requests/ImportRuleRequest.d.ts +0 -12
- package/dist/serialization/resources/assets/resources/rules/client/requests/ImportRuleRequest.js +0 -33
- package/dist/serialization/resources/assets/resources/rules/client/requests/index.d.ts +0 -2
- package/dist/serialization/resources/assets/resources/rules/client/requests/index.js +0 -7
- package/dist/serialization/resources/assets/resources/rules/index.d.ts +0 -1
- package/dist/serialization/resources/assets/resources/rules/index.js +0 -17
- package/dist/serialization/resources/index.d.ts +0 -7
- package/dist/serialization/resources/index.js +0 -36
- package/dist/serialization/resources/rules/client/bulkSolve.d.ts +0 -16
- package/dist/serialization/resources/rules/client/bulkSolve.js +0 -34
- package/dist/serialization/resources/rules/client/index.d.ts +0 -1
- package/dist/serialization/resources/rules/client/index.js +0 -27
- package/dist/serialization/resources/rules/index.d.ts +0 -1
- package/dist/serialization/resources/rules/index.js +0 -17
- package/dist/serialization/resources/users/client/index.d.ts +0 -1
- package/dist/serialization/resources/users/client/index.js +0 -17
- package/dist/serialization/resources/users/client/requests/UserInviteRequest.d.ts +0 -15
- package/dist/serialization/resources/users/client/requests/UserInviteRequest.js +0 -36
- package/dist/serialization/resources/users/client/requests/index.d.ts +0 -1
- package/dist/serialization/resources/users/client/requests/index.js +0 -5
- package/dist/serialization/resources/users/index.d.ts +0 -3
- package/dist/serialization/resources/users/index.js +0 -19
- package/dist/serialization/resources/users/resources/groups/client/index.d.ts +0 -1
- package/dist/serialization/resources/users/resources/groups/client/index.js +0 -17
- package/dist/serialization/resources/users/resources/groups/client/requests/CreateUserGroupRequest.d.ts +0 -13
- package/dist/serialization/resources/users/resources/groups/client/requests/CreateUserGroupRequest.js +0 -34
- package/dist/serialization/resources/users/resources/groups/client/requests/index.d.ts +0 -1
- package/dist/serialization/resources/users/resources/groups/client/requests/index.js +0 -5
- package/dist/serialization/resources/users/resources/groups/index.d.ts +0 -1
- package/dist/serialization/resources/users/resources/groups/index.js +0 -17
- package/dist/serialization/resources/users/resources/index.d.ts +0 -2
- package/dist/serialization/resources/users/resources/index.js +0 -31
- package/dist/serialization/resources/users/types/UserInviteRequestRole.d.ts +0 -10
- package/dist/serialization/resources/users/types/UserInviteRequestRole.js +0 -31
- package/dist/serialization/resources/users/types/index.d.ts +0 -1
- package/dist/serialization/resources/users/types/index.js +0 -17
- package/dist/serialization/resources/values/client/index.d.ts +0 -1
- package/dist/serialization/resources/values/client/index.js +0 -17
- package/dist/serialization/resources/values/client/requests/UpdateValuesRequest.d.ts +0 -13
- package/dist/serialization/resources/values/client/requests/UpdateValuesRequest.js +0 -34
- package/dist/serialization/resources/values/client/requests/index.d.ts +0 -1
- package/dist/serialization/resources/values/client/requests/index.js +0 -5
- package/dist/serialization/resources/values/index.d.ts +0 -1
- package/dist/serialization/resources/values/index.js +0 -17
- package/dist/serialization/types/BulkRuleResponseItem.d.ts +0 -12
- package/dist/serialization/types/BulkRuleResponseItem.js +0 -33
- package/dist/serialization/types/BulkRuleResponseItemError.d.ts +0 -12
- package/dist/serialization/types/BulkRuleResponseItemError.js +0 -33
- package/dist/serialization/types/CreateTestRequest.d.ts +0 -15
- package/dist/serialization/types/CreateTestRequest.js +0 -36
- package/dist/serialization/types/DecisionLog.d.ts +0 -10
- package/dist/serialization/types/DecisionLog.js +0 -31
- package/dist/serialization/types/DecisionLogResponse.d.ts +0 -14
- package/dist/serialization/types/DecisionLogResponse.js +0 -35
- package/dist/serialization/types/DynamicRequestPayload.d.ts +0 -10
- package/dist/serialization/types/DynamicRequestPayload.js +0 -31
- package/dist/serialization/types/DynamicResponsePayload.d.ts +0 -10
- package/dist/serialization/types/DynamicResponsePayload.js +0 -31
- package/dist/serialization/types/DynamicValue.d.ts +0 -18
- package/dist/serialization/types/DynamicValue.js +0 -39
- package/dist/serialization/types/DynamicValueListResponse.d.ts +0 -11
- package/dist/serialization/types/DynamicValueListResponse.js +0 -32
- package/dist/serialization/types/Error_.d.ts +0 -12
- package/dist/serialization/types/Error_.js +0 -33
- package/dist/serialization/types/FlowBase.d.ts +0 -15
- package/dist/serialization/types/FlowBase.js +0 -36
- package/dist/serialization/types/FlowDetail.d.ts +0 -14
- package/dist/serialization/types/FlowDetail.js +0 -37
- package/dist/serialization/types/FlowExecutionError.d.ts +0 -14
- package/dist/serialization/types/FlowExecutionError.js +0 -35
- package/dist/serialization/types/FlowListResponse.d.ts +0 -11
- package/dist/serialization/types/FlowListResponse.js +0 -32
- package/dist/serialization/types/Folder.d.ts +0 -15
- package/dist/serialization/types/Folder.js +0 -36
- package/dist/serialization/types/FolderListResponse.d.ts +0 -11
- package/dist/serialization/types/FolderListResponse.js +0 -32
- package/dist/serialization/types/ParallelSolveRequest.d.ts +0 -11
- package/dist/serialization/types/ParallelSolveRequest.js +0 -32
- package/dist/serialization/types/ParallelSolveRequestValue.d.ts +0 -14
- package/dist/serialization/types/ParallelSolveRequestValue.js +0 -36
- package/dist/serialization/types/ParallelSolveResponse.d.ts +0 -11
- package/dist/serialization/types/ParallelSolveResponse.js +0 -32
- package/dist/serialization/types/RuleBase.d.ts +0 -15
- package/dist/serialization/types/RuleBase.js +0 -36
- package/dist/serialization/types/RuleDetail.d.ts +0 -18
- package/dist/serialization/types/RuleDetail.js +0 -41
- package/dist/serialization/types/RuleExport.d.ts +0 -10
- package/dist/serialization/types/RuleExport.js +0 -31
- package/dist/serialization/types/RuleListResponse.d.ts +0 -11
- package/dist/serialization/types/RuleListResponse.js +0 -32
- package/dist/serialization/types/RuleUsage.d.ts +0 -17
- package/dist/serialization/types/RuleUsage.js +0 -38
- package/dist/serialization/types/SchemaField.d.ts +0 -21
- package/dist/serialization/types/SchemaField.js +0 -42
- package/dist/serialization/types/SchemaFieldDefaultValue.d.ts +0 -10
- package/dist/serialization/types/SchemaFieldDefaultValue.js +0 -37
- package/dist/serialization/types/SchemaFieldType.d.ts +0 -10
- package/dist/serialization/types/SchemaFieldType.js +0 -31
- package/dist/serialization/types/SuccessMessage.d.ts +0 -12
- package/dist/serialization/types/SuccessMessage.js +0 -33
- package/dist/serialization/types/Test.d.ts +0 -21
- package/dist/serialization/types/Test.js +0 -42
- package/dist/serialization/types/TestListResponse.d.ts +0 -11
- package/dist/serialization/types/TestListResponse.js +0 -32
- package/dist/serialization/types/TestTestState.d.ts +0 -19
- package/dist/serialization/types/TestTestState.js +0 -42
- package/dist/serialization/types/TestTestStateConditionsItemValue.d.ts +0 -13
- package/dist/serialization/types/TestTestStateConditionsItemValue.js +0 -34
- package/dist/serialization/types/TestTestStateEvaluationError.d.ts +0 -10
- package/dist/serialization/types/TestTestStateEvaluationError.js +0 -31
- package/dist/serialization/types/UsageStatistics.d.ts +0 -17
- package/dist/serialization/types/UsageStatistics.js +0 -38
- package/dist/serialization/types/UserGroup.d.ts +0 -15
- package/dist/serialization/types/UserGroup.js +0 -36
- package/dist/serialization/types/UserGroupListResponse.d.ts +0 -11
- package/dist/serialization/types/UserGroupListResponse.js +0 -32
- package/dist/serialization/types/UserInviteResponse.d.ts +0 -14
- package/dist/serialization/types/UserInviteResponse.js +0 -35
- package/dist/serialization/types/UserInviteResponseUser.d.ts +0 -14
- package/dist/serialization/types/UserInviteResponseUser.js +0 -35
- package/dist/serialization/types/ValueLimits.d.ts +0 -15
- package/dist/serialization/types/ValueLimits.js +0 -36
- package/dist/serialization/types/index.d.ts +0 -39
- package/dist/serialization/types/index.js +0 -55
- package/serialization/index.d.ts +0 -2
- package/serialization/index.js +0 -18
- package/serialization/resources/assets/index.d.ts +0 -1
- package/serialization/resources/assets/index.js +0 -17
- package/serialization/resources/assets/resources/folders/client/index.d.ts +0 -1
- package/serialization/resources/assets/resources/folders/client/index.js +0 -17
- package/serialization/resources/assets/resources/folders/client/requests/DeleteFolderRequest.d.ts +0 -12
- package/serialization/resources/assets/resources/folders/client/requests/DeleteFolderRequest.js +0 -33
- package/serialization/resources/assets/resources/folders/client/requests/UpsertFolderRequest.d.ts +0 -14
- package/serialization/resources/assets/resources/folders/client/requests/UpsertFolderRequest.js +0 -35
- package/serialization/resources/assets/resources/folders/client/requests/index.d.ts +0 -2
- package/serialization/resources/assets/resources/folders/client/requests/index.js +0 -7
- package/serialization/resources/assets/resources/folders/index.d.ts +0 -1
- package/serialization/resources/assets/resources/folders/index.js +0 -17
- package/serialization/resources/assets/resources/index.d.ts +0 -4
- package/serialization/resources/assets/resources/index.js +0 -33
- package/serialization/resources/assets/resources/rules/client/index.d.ts +0 -1
- package/serialization/resources/assets/resources/rules/client/index.js +0 -17
- package/serialization/resources/assets/resources/rules/client/requests/DeleteRuleRequest.d.ts +0 -12
- package/serialization/resources/assets/resources/rules/client/requests/DeleteRuleRequest.js +0 -33
- package/serialization/resources/assets/resources/rules/client/requests/ImportRuleRequest.d.ts +0 -12
- package/serialization/resources/assets/resources/rules/client/requests/ImportRuleRequest.js +0 -33
- package/serialization/resources/assets/resources/rules/client/requests/index.d.ts +0 -2
- package/serialization/resources/assets/resources/rules/client/requests/index.js +0 -7
- package/serialization/resources/assets/resources/rules/index.d.ts +0 -1
- package/serialization/resources/assets/resources/rules/index.js +0 -17
- package/serialization/resources/index.d.ts +0 -7
- package/serialization/resources/index.js +0 -36
- package/serialization/resources/rules/client/bulkSolve.d.ts +0 -16
- package/serialization/resources/rules/client/bulkSolve.js +0 -34
- package/serialization/resources/rules/client/index.d.ts +0 -1
- package/serialization/resources/rules/client/index.js +0 -27
- package/serialization/resources/rules/index.d.ts +0 -1
- package/serialization/resources/rules/index.js +0 -17
- package/serialization/resources/users/client/index.d.ts +0 -1
- package/serialization/resources/users/client/index.js +0 -17
- package/serialization/resources/users/client/requests/UserInviteRequest.d.ts +0 -15
- package/serialization/resources/users/client/requests/UserInviteRequest.js +0 -36
- package/serialization/resources/users/client/requests/index.d.ts +0 -1
- package/serialization/resources/users/client/requests/index.js +0 -5
- package/serialization/resources/users/index.d.ts +0 -3
- package/serialization/resources/users/index.js +0 -19
- package/serialization/resources/users/resources/groups/client/index.d.ts +0 -1
- package/serialization/resources/users/resources/groups/client/index.js +0 -17
- package/serialization/resources/users/resources/groups/client/requests/CreateUserGroupRequest.d.ts +0 -13
- package/serialization/resources/users/resources/groups/client/requests/CreateUserGroupRequest.js +0 -34
- package/serialization/resources/users/resources/groups/client/requests/index.d.ts +0 -1
- package/serialization/resources/users/resources/groups/client/requests/index.js +0 -5
- package/serialization/resources/users/resources/groups/index.d.ts +0 -1
- package/serialization/resources/users/resources/groups/index.js +0 -17
- package/serialization/resources/users/resources/index.d.ts +0 -2
- package/serialization/resources/users/resources/index.js +0 -31
- package/serialization/resources/users/types/UserInviteRequestRole.d.ts +0 -10
- package/serialization/resources/users/types/UserInviteRequestRole.js +0 -31
- package/serialization/resources/users/types/index.d.ts +0 -1
- package/serialization/resources/users/types/index.js +0 -17
- package/serialization/resources/values/client/index.d.ts +0 -1
- package/serialization/resources/values/client/index.js +0 -17
- package/serialization/resources/values/client/requests/UpdateValuesRequest.d.ts +0 -13
- package/serialization/resources/values/client/requests/UpdateValuesRequest.js +0 -34
- package/serialization/resources/values/client/requests/index.d.ts +0 -1
- package/serialization/resources/values/client/requests/index.js +0 -5
- package/serialization/resources/values/index.d.ts +0 -1
- package/serialization/resources/values/index.js +0 -17
- package/serialization/types/BulkRuleResponseItem.d.ts +0 -12
- package/serialization/types/BulkRuleResponseItem.js +0 -33
- package/serialization/types/BulkRuleResponseItemError.d.ts +0 -12
- package/serialization/types/BulkRuleResponseItemError.js +0 -33
- package/serialization/types/CreateTestRequest.d.ts +0 -15
- package/serialization/types/CreateTestRequest.js +0 -36
- package/serialization/types/DecisionLog.d.ts +0 -10
- package/serialization/types/DecisionLog.js +0 -31
- package/serialization/types/DecisionLogResponse.d.ts +0 -14
- package/serialization/types/DecisionLogResponse.js +0 -35
- package/serialization/types/DynamicRequestPayload.d.ts +0 -10
- package/serialization/types/DynamicRequestPayload.js +0 -31
- package/serialization/types/DynamicResponsePayload.d.ts +0 -10
- package/serialization/types/DynamicResponsePayload.js +0 -31
- package/serialization/types/DynamicValue.d.ts +0 -18
- package/serialization/types/DynamicValue.js +0 -39
- package/serialization/types/DynamicValueListResponse.d.ts +0 -11
- package/serialization/types/DynamicValueListResponse.js +0 -32
- package/serialization/types/Error_.d.ts +0 -12
- package/serialization/types/Error_.js +0 -33
- package/serialization/types/FlowBase.d.ts +0 -15
- package/serialization/types/FlowBase.js +0 -36
- package/serialization/types/FlowDetail.d.ts +0 -14
- package/serialization/types/FlowDetail.js +0 -37
- package/serialization/types/FlowExecutionError.d.ts +0 -14
- package/serialization/types/FlowExecutionError.js +0 -35
- package/serialization/types/FlowListResponse.d.ts +0 -11
- package/serialization/types/FlowListResponse.js +0 -32
- package/serialization/types/Folder.d.ts +0 -15
- package/serialization/types/Folder.js +0 -36
- package/serialization/types/FolderListResponse.d.ts +0 -11
- package/serialization/types/FolderListResponse.js +0 -32
- package/serialization/types/ParallelSolveRequest.d.ts +0 -11
- package/serialization/types/ParallelSolveRequest.js +0 -32
- package/serialization/types/ParallelSolveRequestValue.d.ts +0 -14
- package/serialization/types/ParallelSolveRequestValue.js +0 -36
- package/serialization/types/ParallelSolveResponse.d.ts +0 -11
- package/serialization/types/ParallelSolveResponse.js +0 -32
- package/serialization/types/RuleBase.d.ts +0 -15
- package/serialization/types/RuleBase.js +0 -36
- package/serialization/types/RuleDetail.d.ts +0 -18
- package/serialization/types/RuleDetail.js +0 -41
- package/serialization/types/RuleExport.d.ts +0 -10
- package/serialization/types/RuleExport.js +0 -31
- package/serialization/types/RuleListResponse.d.ts +0 -11
- package/serialization/types/RuleListResponse.js +0 -32
- package/serialization/types/RuleUsage.d.ts +0 -17
- package/serialization/types/RuleUsage.js +0 -38
- package/serialization/types/SchemaField.d.ts +0 -21
- package/serialization/types/SchemaField.js +0 -42
- package/serialization/types/SchemaFieldDefaultValue.d.ts +0 -10
- package/serialization/types/SchemaFieldDefaultValue.js +0 -37
- package/serialization/types/SchemaFieldType.d.ts +0 -10
- package/serialization/types/SchemaFieldType.js +0 -31
- package/serialization/types/SuccessMessage.d.ts +0 -12
- package/serialization/types/SuccessMessage.js +0 -33
- package/serialization/types/Test.d.ts +0 -21
- package/serialization/types/Test.js +0 -42
- package/serialization/types/TestListResponse.d.ts +0 -11
- package/serialization/types/TestListResponse.js +0 -32
- package/serialization/types/TestTestState.d.ts +0 -19
- package/serialization/types/TestTestState.js +0 -42
- package/serialization/types/TestTestStateConditionsItemValue.d.ts +0 -13
- package/serialization/types/TestTestStateConditionsItemValue.js +0 -34
- package/serialization/types/TestTestStateEvaluationError.d.ts +0 -10
- package/serialization/types/TestTestStateEvaluationError.js +0 -31
- package/serialization/types/UsageStatistics.d.ts +0 -17
- package/serialization/types/UsageStatistics.js +0 -38
- package/serialization/types/UserGroup.d.ts +0 -15
- package/serialization/types/UserGroup.js +0 -36
- package/serialization/types/UserGroupListResponse.d.ts +0 -11
- package/serialization/types/UserGroupListResponse.js +0 -32
- package/serialization/types/UserInviteResponse.d.ts +0 -14
- package/serialization/types/UserInviteResponse.js +0 -35
- package/serialization/types/UserInviteResponseUser.d.ts +0 -14
- package/serialization/types/UserInviteResponseUser.js +0 -35
- package/serialization/types/ValueLimits.d.ts +0 -15
- package/serialization/types/ValueLimits.js +0 -36
- package/serialization/types/index.d.ts +0 -39
- package/serialization/types/index.js +0 -55
- /package/{core/schemas/builders/object-like/types.js → api/resources/flows/client/requests/index.js} +0 -0
- /package/{core/schemas/builders/object/types.js → api/resources/rules/client/requests/index.js} +0 -0
- /package/{core/schemas/builders/record/types.js → api/resources/tests/resources/flows/client/requests/index.js} +0 -0
- /package/{core/schemas/builders/undiscriminated-union/types.js → api/resources/tests/resources/rules/client/requests/index.js} +0 -0
- /package/core/{schemas/builders/union/types.js → auth/AuthProvider.js} +0 -0
- /package/core/{schemas/utils/MaybePromise.js → auth/AuthRequest.js} +0 -0
- /package/core/{schemas/utils/addQuestionMarksToNullableProperties.js → fetcher/EndpointMetadata.js} +0 -0
- /package/dist/{core/schemas/builders/object-like/types.js → api/resources/flows/client/requests/index.js} +0 -0
- /package/dist/{core/schemas/builders/object/types.js → api/resources/rules/client/requests/index.js} +0 -0
- /package/dist/{core/schemas/builders/record/types.js → api/resources/tests/resources/flows/client/requests/index.js} +0 -0
- /package/dist/{core/schemas/builders/undiscriminated-union/types.js → api/resources/tests/resources/rules/client/requests/index.js} +0 -0
- /package/dist/core/{schemas/builders/union/types.js → auth/AuthProvider.js} +0 -0
- /package/dist/core/{schemas/utils/MaybePromise.js → auth/AuthRequest.js} +0 -0
- /package/dist/core/{schemas/utils/addQuestionMarksToNullableProperties.js → fetcher/EndpointMetadata.js} +0 -0
|
@@ -9,92 +9,308 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.fetcher =
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
|
|
12
|
+
exports.fetcher = void 0;
|
|
13
|
+
exports.fetcherImpl = fetcherImpl;
|
|
14
|
+
const json_js_1 = require("../json.js");
|
|
15
|
+
const logger_js_1 = require("../logging/logger.js");
|
|
16
|
+
const createRequestUrl_js_1 = require("./createRequestUrl.js");
|
|
17
|
+
const EndpointSupplier_js_1 = require("./EndpointSupplier.js");
|
|
18
|
+
const getErrorResponseBody_js_1 = require("./getErrorResponseBody.js");
|
|
19
|
+
const getFetchFn_js_1 = require("./getFetchFn.js");
|
|
20
|
+
const getRequestBody_js_1 = require("./getRequestBody.js");
|
|
21
|
+
const getResponseBody_js_1 = require("./getResponseBody.js");
|
|
22
|
+
const Headers_js_1 = require("./Headers.js");
|
|
23
|
+
const makeRequest_js_1 = require("./makeRequest.js");
|
|
24
|
+
const RawResponse_js_1 = require("./RawResponse.js");
|
|
25
|
+
const requestWithRetries_js_1 = require("./requestWithRetries.js");
|
|
26
|
+
const SENSITIVE_HEADERS = new Set([
|
|
27
|
+
"authorization",
|
|
28
|
+
"www-authenticate",
|
|
29
|
+
"x-api-key",
|
|
30
|
+
"api-key",
|
|
31
|
+
"apikey",
|
|
32
|
+
"x-api-token",
|
|
33
|
+
"x-auth-token",
|
|
34
|
+
"auth-token",
|
|
35
|
+
"cookie",
|
|
36
|
+
"set-cookie",
|
|
37
|
+
"proxy-authorization",
|
|
38
|
+
"proxy-authenticate",
|
|
39
|
+
"x-csrf-token",
|
|
40
|
+
"x-xsrf-token",
|
|
41
|
+
"x-session-token",
|
|
42
|
+
"x-access-token",
|
|
43
|
+
]);
|
|
44
|
+
function redactHeaders(headers) {
|
|
45
|
+
const filtered = {};
|
|
46
|
+
for (const [key, value] of headers instanceof Headers_js_1.Headers ? headers.entries() : Object.entries(headers)) {
|
|
47
|
+
if (SENSITIVE_HEADERS.has(key.toLowerCase())) {
|
|
48
|
+
filtered[key] = "[REDACTED]";
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
filtered[key] = value;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return filtered;
|
|
55
|
+
}
|
|
56
|
+
const SENSITIVE_QUERY_PARAMS = new Set([
|
|
57
|
+
"api_key",
|
|
58
|
+
"api-key",
|
|
59
|
+
"apikey",
|
|
60
|
+
"token",
|
|
61
|
+
"access_token",
|
|
62
|
+
"access-token",
|
|
63
|
+
"auth_token",
|
|
64
|
+
"auth-token",
|
|
65
|
+
"password",
|
|
66
|
+
"passwd",
|
|
67
|
+
"secret",
|
|
68
|
+
"api_secret",
|
|
69
|
+
"api-secret",
|
|
70
|
+
"apisecret",
|
|
71
|
+
"key",
|
|
72
|
+
"session",
|
|
73
|
+
"session_id",
|
|
74
|
+
"session-id",
|
|
75
|
+
]);
|
|
76
|
+
function redactQueryParameters(queryParameters) {
|
|
77
|
+
if (queryParameters == null) {
|
|
78
|
+
return queryParameters;
|
|
79
|
+
}
|
|
80
|
+
const redacted = {};
|
|
81
|
+
for (const [key, value] of Object.entries(queryParameters)) {
|
|
82
|
+
if (SENSITIVE_QUERY_PARAMS.has(key.toLowerCase())) {
|
|
83
|
+
redacted[key] = "[REDACTED]";
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
redacted[key] = value;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return redacted;
|
|
90
|
+
}
|
|
91
|
+
function redactUrl(url) {
|
|
92
|
+
const protocolIndex = url.indexOf("://");
|
|
93
|
+
if (protocolIndex === -1)
|
|
94
|
+
return url;
|
|
95
|
+
const afterProtocol = protocolIndex + 3;
|
|
96
|
+
// Find the first delimiter that marks the end of the authority section
|
|
97
|
+
const pathStart = url.indexOf("/", afterProtocol);
|
|
98
|
+
let queryStart = url.indexOf("?", afterProtocol);
|
|
99
|
+
let fragmentStart = url.indexOf("#", afterProtocol);
|
|
100
|
+
const firstDelimiter = Math.min(pathStart === -1 ? url.length : pathStart, queryStart === -1 ? url.length : queryStart, fragmentStart === -1 ? url.length : fragmentStart);
|
|
101
|
+
// Find the LAST @ before the delimiter (handles multiple @ in credentials)
|
|
102
|
+
let atIndex = -1;
|
|
103
|
+
for (let i = afterProtocol; i < firstDelimiter; i++) {
|
|
104
|
+
if (url[i] === "@") {
|
|
105
|
+
atIndex = i;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if (atIndex !== -1) {
|
|
109
|
+
url = `${url.slice(0, afterProtocol)}[REDACTED]@${url.slice(atIndex + 1)}`;
|
|
110
|
+
}
|
|
111
|
+
// Recalculate queryStart since url might have changed
|
|
112
|
+
queryStart = url.indexOf("?");
|
|
113
|
+
if (queryStart === -1)
|
|
114
|
+
return url;
|
|
115
|
+
fragmentStart = url.indexOf("#", queryStart);
|
|
116
|
+
const queryEnd = fragmentStart !== -1 ? fragmentStart : url.length;
|
|
117
|
+
const queryString = url.slice(queryStart + 1, queryEnd);
|
|
118
|
+
if (queryString.length === 0)
|
|
119
|
+
return url;
|
|
120
|
+
// FAST PATH: Quick check if any sensitive keywords present
|
|
121
|
+
// Using indexOf is faster than regex for simple substring matching
|
|
122
|
+
const lower = queryString.toLowerCase();
|
|
123
|
+
const hasSensitive = lower.includes("token") ||
|
|
124
|
+
lower.includes("key") ||
|
|
125
|
+
lower.includes("password") ||
|
|
126
|
+
lower.includes("passwd") ||
|
|
127
|
+
lower.includes("secret") ||
|
|
128
|
+
lower.includes("session") ||
|
|
129
|
+
lower.includes("auth");
|
|
130
|
+
if (!hasSensitive) {
|
|
131
|
+
return url;
|
|
132
|
+
}
|
|
133
|
+
// SLOW PATH: Parse and redact
|
|
134
|
+
const redactedParams = [];
|
|
135
|
+
const params = queryString.split("&");
|
|
136
|
+
for (const param of params) {
|
|
137
|
+
const equalIndex = param.indexOf("=");
|
|
138
|
+
if (equalIndex === -1) {
|
|
139
|
+
redactedParams.push(param);
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
const key = param.slice(0, equalIndex);
|
|
143
|
+
let shouldRedact = SENSITIVE_QUERY_PARAMS.has(key.toLowerCase());
|
|
144
|
+
if (!shouldRedact && key.includes("%")) {
|
|
145
|
+
try {
|
|
146
|
+
const decodedKey = decodeURIComponent(key);
|
|
147
|
+
shouldRedact = SENSITIVE_QUERY_PARAMS.has(decodedKey.toLowerCase());
|
|
148
|
+
}
|
|
149
|
+
catch (_a) { }
|
|
150
|
+
}
|
|
151
|
+
redactedParams.push(shouldRedact ? `${key}=[REDACTED]` : param);
|
|
152
|
+
}
|
|
153
|
+
return url.slice(0, queryStart + 1) + redactedParams.join("&") + url.slice(queryEnd);
|
|
154
|
+
}
|
|
155
|
+
function getHeaders(args) {
|
|
21
156
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
|
|
157
|
+
var _a;
|
|
158
|
+
const newHeaders = new Headers_js_1.Headers();
|
|
159
|
+
newHeaders.set("Accept", args.responseType === "json" ? "application/json" : args.responseType === "text" ? "text/plain" : "*/*");
|
|
23
160
|
if (args.body !== undefined && args.contentType != null) {
|
|
24
|
-
|
|
161
|
+
newHeaders.set("Content-Type", args.contentType);
|
|
25
162
|
}
|
|
26
|
-
if (args.headers
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
163
|
+
if (args.headers == null) {
|
|
164
|
+
return newHeaders;
|
|
165
|
+
}
|
|
166
|
+
for (const [key, value] of Object.entries(args.headers)) {
|
|
167
|
+
const result = yield EndpointSupplier_js_1.EndpointSupplier.get(value, { endpointMetadata: (_a = args.endpointMetadata) !== null && _a !== void 0 ? _a : {} });
|
|
168
|
+
if (typeof result === "string") {
|
|
169
|
+
newHeaders.set(key, result);
|
|
170
|
+
continue;
|
|
31
171
|
}
|
|
172
|
+
if (result == null) {
|
|
173
|
+
continue;
|
|
174
|
+
}
|
|
175
|
+
newHeaders.set(key, `${result}`);
|
|
32
176
|
}
|
|
33
|
-
|
|
34
|
-
|
|
177
|
+
return newHeaders;
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
function fetcherImpl(args) {
|
|
181
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
182
|
+
var _a, _b, _c;
|
|
183
|
+
const url = (0, createRequestUrl_js_1.createRequestUrl)(args.url, args.queryParameters);
|
|
184
|
+
const requestBody = yield (0, getRequestBody_js_1.getRequestBody)({
|
|
35
185
|
body: args.body,
|
|
36
|
-
type: args.requestType
|
|
186
|
+
type: (_a = args.requestType) !== null && _a !== void 0 ? _a : "other",
|
|
37
187
|
});
|
|
38
|
-
const fetchFn = yield (0,
|
|
188
|
+
const fetchFn = (_b = args.fetchFn) !== null && _b !== void 0 ? _b : (yield (0, getFetchFn_js_1.getFetchFn)());
|
|
189
|
+
const headers = yield getHeaders(args);
|
|
190
|
+
const logger = (0, logger_js_1.createLogger)(args.logging);
|
|
191
|
+
if (logger.isDebug()) {
|
|
192
|
+
const metadata = {
|
|
193
|
+
method: args.method,
|
|
194
|
+
url: redactUrl(url),
|
|
195
|
+
headers: redactHeaders(headers),
|
|
196
|
+
queryParameters: redactQueryParameters(args.queryParameters),
|
|
197
|
+
hasBody: requestBody != null,
|
|
198
|
+
};
|
|
199
|
+
logger.debug("Making HTTP request", metadata);
|
|
200
|
+
}
|
|
39
201
|
try {
|
|
40
|
-
const response = yield (0,
|
|
41
|
-
return (0,
|
|
202
|
+
const response = yield (0, requestWithRetries_js_1.requestWithRetries)(() => __awaiter(this, void 0, void 0, function* () {
|
|
203
|
+
return (0, makeRequest_js_1.makeRequest)(fetchFn, url, args.method, headers, requestBody, args.timeoutMs, args.abortSignal, args.withCredentials, args.duplex);
|
|
42
204
|
}), args.maxRetries);
|
|
43
|
-
const responseBody = yield (0, getResponseBody_1.getResponseBody)(response, args.responseType);
|
|
44
205
|
if (response.status >= 200 && response.status < 400) {
|
|
206
|
+
if (logger.isDebug()) {
|
|
207
|
+
const metadata = {
|
|
208
|
+
method: args.method,
|
|
209
|
+
url: redactUrl(url),
|
|
210
|
+
statusCode: response.status,
|
|
211
|
+
responseHeaders: redactHeaders(response.headers),
|
|
212
|
+
};
|
|
213
|
+
logger.debug("HTTP request succeeded", metadata);
|
|
214
|
+
}
|
|
215
|
+
const body = yield (0, getResponseBody_js_1.getResponseBody)(response, args.responseType);
|
|
45
216
|
return {
|
|
46
217
|
ok: true,
|
|
47
|
-
body:
|
|
218
|
+
body: body,
|
|
48
219
|
headers: response.headers,
|
|
220
|
+
rawResponse: (0, RawResponse_js_1.toRawResponse)(response),
|
|
49
221
|
};
|
|
50
222
|
}
|
|
51
223
|
else {
|
|
224
|
+
if (logger.isError()) {
|
|
225
|
+
const metadata = {
|
|
226
|
+
method: args.method,
|
|
227
|
+
url: redactUrl(url),
|
|
228
|
+
statusCode: response.status,
|
|
229
|
+
responseHeaders: redactHeaders(Object.fromEntries(response.headers.entries())),
|
|
230
|
+
};
|
|
231
|
+
logger.error("HTTP request failed with error status", metadata);
|
|
232
|
+
}
|
|
52
233
|
return {
|
|
53
234
|
ok: false,
|
|
54
235
|
error: {
|
|
55
236
|
reason: "status-code",
|
|
56
237
|
statusCode: response.status,
|
|
57
|
-
body:
|
|
238
|
+
body: yield (0, getErrorResponseBody_js_1.getErrorResponseBody)(response),
|
|
58
239
|
},
|
|
240
|
+
rawResponse: (0, RawResponse_js_1.toRawResponse)(response),
|
|
59
241
|
};
|
|
60
242
|
}
|
|
61
243
|
}
|
|
62
244
|
catch (error) {
|
|
63
|
-
if (args.abortSignal
|
|
245
|
+
if ((_c = args.abortSignal) === null || _c === void 0 ? void 0 : _c.aborted) {
|
|
246
|
+
if (logger.isError()) {
|
|
247
|
+
const metadata = {
|
|
248
|
+
method: args.method,
|
|
249
|
+
url: redactUrl(url),
|
|
250
|
+
};
|
|
251
|
+
logger.error("HTTP request was aborted", metadata);
|
|
252
|
+
}
|
|
64
253
|
return {
|
|
65
254
|
ok: false,
|
|
66
255
|
error: {
|
|
67
256
|
reason: "unknown",
|
|
68
257
|
errorMessage: "The user aborted a request",
|
|
69
258
|
},
|
|
259
|
+
rawResponse: RawResponse_js_1.abortRawResponse,
|
|
70
260
|
};
|
|
71
261
|
}
|
|
72
262
|
else if (error instanceof Error && error.name === "AbortError") {
|
|
263
|
+
if (logger.isError()) {
|
|
264
|
+
const metadata = {
|
|
265
|
+
method: args.method,
|
|
266
|
+
url: redactUrl(url),
|
|
267
|
+
timeoutMs: args.timeoutMs,
|
|
268
|
+
};
|
|
269
|
+
logger.error("HTTP request timed out", metadata);
|
|
270
|
+
}
|
|
73
271
|
return {
|
|
74
272
|
ok: false,
|
|
75
273
|
error: {
|
|
76
274
|
reason: "timeout",
|
|
77
275
|
},
|
|
276
|
+
rawResponse: RawResponse_js_1.abortRawResponse,
|
|
78
277
|
};
|
|
79
278
|
}
|
|
80
279
|
else if (error instanceof Error) {
|
|
280
|
+
if (logger.isError()) {
|
|
281
|
+
const metadata = {
|
|
282
|
+
method: args.method,
|
|
283
|
+
url: redactUrl(url),
|
|
284
|
+
errorMessage: error.message,
|
|
285
|
+
};
|
|
286
|
+
logger.error("HTTP request failed with error", metadata);
|
|
287
|
+
}
|
|
81
288
|
return {
|
|
82
289
|
ok: false,
|
|
83
290
|
error: {
|
|
84
291
|
reason: "unknown",
|
|
85
292
|
errorMessage: error.message,
|
|
86
293
|
},
|
|
294
|
+
rawResponse: RawResponse_js_1.unknownRawResponse,
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
if (logger.isError()) {
|
|
298
|
+
const metadata = {
|
|
299
|
+
method: args.method,
|
|
300
|
+
url: redactUrl(url),
|
|
301
|
+
error: (0, json_js_1.toJson)(error),
|
|
87
302
|
};
|
|
303
|
+
logger.error("HTTP request failed with unknown error", metadata);
|
|
88
304
|
}
|
|
89
305
|
return {
|
|
90
306
|
ok: false,
|
|
91
307
|
error: {
|
|
92
308
|
reason: "unknown",
|
|
93
|
-
errorMessage: (0,
|
|
309
|
+
errorMessage: (0, json_js_1.toJson)(error),
|
|
94
310
|
},
|
|
311
|
+
rawResponse: RawResponse_js_1.unknownRawResponse,
|
|
95
312
|
};
|
|
96
313
|
}
|
|
97
314
|
});
|
|
98
315
|
}
|
|
99
|
-
exports.fetcherImpl = fetcherImpl;
|
|
100
316
|
exports.fetcher = fetcherImpl;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Headers = void 0;
|
|
4
|
+
let Headers;
|
|
5
|
+
if (typeof globalThis.Headers !== "undefined") {
|
|
6
|
+
exports.Headers = Headers = globalThis.Headers;
|
|
7
|
+
}
|
|
8
|
+
else {
|
|
9
|
+
exports.Headers = Headers = class Headers {
|
|
10
|
+
constructor(init) {
|
|
11
|
+
this.headers = new Map();
|
|
12
|
+
if (init) {
|
|
13
|
+
if (init instanceof Headers) {
|
|
14
|
+
init.forEach((value, key) => this.append(key, value));
|
|
15
|
+
}
|
|
16
|
+
else if (Array.isArray(init)) {
|
|
17
|
+
for (const [key, value] of init) {
|
|
18
|
+
if (typeof key === "string" && typeof value === "string") {
|
|
19
|
+
this.append(key, value);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
throw new TypeError("Each header entry must be a [string, string] tuple");
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
for (const [key, value] of Object.entries(init)) {
|
|
28
|
+
if (typeof value === "string") {
|
|
29
|
+
this.append(key, value);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
throw new TypeError("Header values must be strings");
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
append(name, value) {
|
|
39
|
+
const key = name.toLowerCase();
|
|
40
|
+
const existing = this.headers.get(key) || [];
|
|
41
|
+
this.headers.set(key, [...existing, value]);
|
|
42
|
+
}
|
|
43
|
+
delete(name) {
|
|
44
|
+
const key = name.toLowerCase();
|
|
45
|
+
this.headers.delete(key);
|
|
46
|
+
}
|
|
47
|
+
get(name) {
|
|
48
|
+
const key = name.toLowerCase();
|
|
49
|
+
const values = this.headers.get(key);
|
|
50
|
+
return values ? values.join(", ") : null;
|
|
51
|
+
}
|
|
52
|
+
has(name) {
|
|
53
|
+
const key = name.toLowerCase();
|
|
54
|
+
return this.headers.has(key);
|
|
55
|
+
}
|
|
56
|
+
set(name, value) {
|
|
57
|
+
const key = name.toLowerCase();
|
|
58
|
+
this.headers.set(key, [value]);
|
|
59
|
+
}
|
|
60
|
+
forEach(callbackfn, thisArg) {
|
|
61
|
+
const boundCallback = thisArg ? callbackfn.bind(thisArg) : callbackfn;
|
|
62
|
+
this.headers.forEach((values, key) => boundCallback(values.join(", "), key, this));
|
|
63
|
+
}
|
|
64
|
+
getSetCookie() {
|
|
65
|
+
return this.headers.get("set-cookie") || [];
|
|
66
|
+
}
|
|
67
|
+
*entries() {
|
|
68
|
+
for (const [key, values] of this.headers.entries()) {
|
|
69
|
+
yield [key, values.join(", ")];
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
*keys() {
|
|
73
|
+
yield* this.headers.keys();
|
|
74
|
+
}
|
|
75
|
+
*values() {
|
|
76
|
+
for (const values of this.headers.values()) {
|
|
77
|
+
yield values.join(", ");
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
[Symbol.iterator]() {
|
|
81
|
+
return this.entries();
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { WithRawResponse } from "./RawResponse.js";
|
|
2
|
+
/**
|
|
3
|
+
* A promise that returns the parsed response and lets you retrieve the raw response too.
|
|
4
|
+
*/
|
|
5
|
+
export declare class HttpResponsePromise<T> extends Promise<T> {
|
|
6
|
+
private innerPromise;
|
|
7
|
+
private unwrappedPromise;
|
|
8
|
+
private constructor();
|
|
9
|
+
/**
|
|
10
|
+
* Creates an `HttpResponsePromise` from a function that returns a promise.
|
|
11
|
+
*
|
|
12
|
+
* @param fn - A function that returns a promise resolving to a `WithRawResponse` object.
|
|
13
|
+
* @param args - Arguments to pass to the function.
|
|
14
|
+
* @returns An `HttpResponsePromise` instance.
|
|
15
|
+
*/
|
|
16
|
+
static fromFunction<F extends (...args: never[]) => Promise<WithRawResponse<T>>, T>(fn: F, ...args: Parameters<F>): HttpResponsePromise<T>;
|
|
17
|
+
/**
|
|
18
|
+
* Creates a function that returns an `HttpResponsePromise` from a function that returns a promise.
|
|
19
|
+
*
|
|
20
|
+
* @param fn - A function that returns a promise resolving to a `WithRawResponse` object.
|
|
21
|
+
* @returns A function that returns an `HttpResponsePromise` instance.
|
|
22
|
+
*/
|
|
23
|
+
static interceptFunction<F extends (...args: never[]) => Promise<WithRawResponse<T>>, T = Awaited<ReturnType<F>>["data"]>(fn: F): (...args: Parameters<F>) => HttpResponsePromise<T>;
|
|
24
|
+
/**
|
|
25
|
+
* Creates an `HttpResponsePromise` from an existing promise.
|
|
26
|
+
*
|
|
27
|
+
* @param promise - A promise resolving to a `WithRawResponse` object.
|
|
28
|
+
* @returns An `HttpResponsePromise` instance.
|
|
29
|
+
*/
|
|
30
|
+
static fromPromise<T>(promise: Promise<WithRawResponse<T>>): HttpResponsePromise<T>;
|
|
31
|
+
/**
|
|
32
|
+
* Creates an `HttpResponsePromise` from an executor function.
|
|
33
|
+
*
|
|
34
|
+
* @param executor - A function that takes resolve and reject callbacks to create a promise.
|
|
35
|
+
* @returns An `HttpResponsePromise` instance.
|
|
36
|
+
*/
|
|
37
|
+
static fromExecutor<T>(executor: (resolve: (value: WithRawResponse<T>) => void, reject: (reason?: unknown) => void) => void): HttpResponsePromise<T>;
|
|
38
|
+
/**
|
|
39
|
+
* Creates an `HttpResponsePromise` from a resolved result.
|
|
40
|
+
*
|
|
41
|
+
* @param result - A `WithRawResponse` object to resolve immediately.
|
|
42
|
+
* @returns An `HttpResponsePromise` instance.
|
|
43
|
+
*/
|
|
44
|
+
static fromResult<T>(result: WithRawResponse<T>): HttpResponsePromise<T>;
|
|
45
|
+
private unwrap;
|
|
46
|
+
/** @inheritdoc */
|
|
47
|
+
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
|
|
48
|
+
/** @inheritdoc */
|
|
49
|
+
catch<TResult = never>(onrejected?: ((reason: unknown) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult>;
|
|
50
|
+
/** @inheritdoc */
|
|
51
|
+
finally(onfinally?: (() => void) | null): Promise<T>;
|
|
52
|
+
/**
|
|
53
|
+
* Retrieves the data and raw response.
|
|
54
|
+
*
|
|
55
|
+
* @returns A promise resolving to a `WithRawResponse` object.
|
|
56
|
+
*/
|
|
57
|
+
withRawResponse(): Promise<WithRawResponse<T>>;
|
|
58
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.HttpResponsePromise = void 0;
|
|
13
|
+
/**
|
|
14
|
+
* A promise that returns the parsed response and lets you retrieve the raw response too.
|
|
15
|
+
*/
|
|
16
|
+
class HttpResponsePromise extends Promise {
|
|
17
|
+
constructor(promise) {
|
|
18
|
+
// Initialize with a no-op to avoid premature parsing
|
|
19
|
+
super((resolve) => {
|
|
20
|
+
resolve(undefined);
|
|
21
|
+
});
|
|
22
|
+
this.innerPromise = promise;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Creates an `HttpResponsePromise` from a function that returns a promise.
|
|
26
|
+
*
|
|
27
|
+
* @param fn - A function that returns a promise resolving to a `WithRawResponse` object.
|
|
28
|
+
* @param args - Arguments to pass to the function.
|
|
29
|
+
* @returns An `HttpResponsePromise` instance.
|
|
30
|
+
*/
|
|
31
|
+
static fromFunction(fn, ...args) {
|
|
32
|
+
return new HttpResponsePromise(fn(...args));
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Creates a function that returns an `HttpResponsePromise` from a function that returns a promise.
|
|
36
|
+
*
|
|
37
|
+
* @param fn - A function that returns a promise resolving to a `WithRawResponse` object.
|
|
38
|
+
* @returns A function that returns an `HttpResponsePromise` instance.
|
|
39
|
+
*/
|
|
40
|
+
static interceptFunction(fn) {
|
|
41
|
+
return (...args) => {
|
|
42
|
+
return HttpResponsePromise.fromPromise(fn(...args));
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Creates an `HttpResponsePromise` from an existing promise.
|
|
47
|
+
*
|
|
48
|
+
* @param promise - A promise resolving to a `WithRawResponse` object.
|
|
49
|
+
* @returns An `HttpResponsePromise` instance.
|
|
50
|
+
*/
|
|
51
|
+
static fromPromise(promise) {
|
|
52
|
+
return new HttpResponsePromise(promise);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Creates an `HttpResponsePromise` from an executor function.
|
|
56
|
+
*
|
|
57
|
+
* @param executor - A function that takes resolve and reject callbacks to create a promise.
|
|
58
|
+
* @returns An `HttpResponsePromise` instance.
|
|
59
|
+
*/
|
|
60
|
+
static fromExecutor(executor) {
|
|
61
|
+
const promise = new Promise(executor);
|
|
62
|
+
return new HttpResponsePromise(promise);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Creates an `HttpResponsePromise` from a resolved result.
|
|
66
|
+
*
|
|
67
|
+
* @param result - A `WithRawResponse` object to resolve immediately.
|
|
68
|
+
* @returns An `HttpResponsePromise` instance.
|
|
69
|
+
*/
|
|
70
|
+
static fromResult(result) {
|
|
71
|
+
const promise = Promise.resolve(result);
|
|
72
|
+
return new HttpResponsePromise(promise);
|
|
73
|
+
}
|
|
74
|
+
unwrap() {
|
|
75
|
+
if (!this.unwrappedPromise) {
|
|
76
|
+
this.unwrappedPromise = this.innerPromise.then(({ data }) => data);
|
|
77
|
+
}
|
|
78
|
+
return this.unwrappedPromise;
|
|
79
|
+
}
|
|
80
|
+
/** @inheritdoc */
|
|
81
|
+
then(onfulfilled, onrejected) {
|
|
82
|
+
return this.unwrap().then(onfulfilled, onrejected);
|
|
83
|
+
}
|
|
84
|
+
/** @inheritdoc */
|
|
85
|
+
catch(onrejected) {
|
|
86
|
+
return this.unwrap().catch(onrejected);
|
|
87
|
+
}
|
|
88
|
+
/** @inheritdoc */
|
|
89
|
+
finally(onfinally) {
|
|
90
|
+
return this.unwrap().finally(onfinally);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Retrieves the data and raw response.
|
|
94
|
+
*
|
|
95
|
+
* @returns A promise resolving to a `WithRawResponse` object.
|
|
96
|
+
*/
|
|
97
|
+
withRawResponse() {
|
|
98
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
return yield this.innerPromise;
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
exports.HttpResponsePromise = HttpResponsePromise;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The raw response from the fetch call excluding the body.
|
|
3
|
+
*/
|
|
4
|
+
export type RawResponse = Omit<{
|
|
5
|
+
[K in keyof Response as Response[K] extends Function ? never : K]: Response[K];
|
|
6
|
+
}, "ok" | "body" | "bodyUsed">;
|
|
7
|
+
/**
|
|
8
|
+
* A raw response indicating that the request was aborted.
|
|
9
|
+
*/
|
|
10
|
+
export declare const abortRawResponse: RawResponse;
|
|
11
|
+
/**
|
|
12
|
+
* A raw response indicating an unknown error.
|
|
13
|
+
*/
|
|
14
|
+
export declare const unknownRawResponse: RawResponse;
|
|
15
|
+
/**
|
|
16
|
+
* Converts a `RawResponse` object into a `RawResponse` by extracting its properties,
|
|
17
|
+
* excluding the `body` and `bodyUsed` fields.
|
|
18
|
+
*
|
|
19
|
+
* @param response - The `RawResponse` object to convert.
|
|
20
|
+
* @returns A `RawResponse` object containing the extracted properties of the input response.
|
|
21
|
+
*/
|
|
22
|
+
export declare function toRawResponse(response: Response): RawResponse;
|
|
23
|
+
/**
|
|
24
|
+
* Creates a `RawResponse` from a standard `Response` object.
|
|
25
|
+
*/
|
|
26
|
+
export interface WithRawResponse<T> {
|
|
27
|
+
readonly data: T;
|
|
28
|
+
readonly rawResponse: RawResponse;
|
|
29
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.unknownRawResponse = exports.abortRawResponse = void 0;
|
|
4
|
+
exports.toRawResponse = toRawResponse;
|
|
5
|
+
const Headers_js_1 = require("./Headers.js");
|
|
6
|
+
/**
|
|
7
|
+
* A raw response indicating that the request was aborted.
|
|
8
|
+
*/
|
|
9
|
+
exports.abortRawResponse = {
|
|
10
|
+
headers: new Headers_js_1.Headers(),
|
|
11
|
+
redirected: false,
|
|
12
|
+
status: 499,
|
|
13
|
+
statusText: "Client Closed Request",
|
|
14
|
+
type: "error",
|
|
15
|
+
url: "",
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* A raw response indicating an unknown error.
|
|
19
|
+
*/
|
|
20
|
+
exports.unknownRawResponse = {
|
|
21
|
+
headers: new Headers_js_1.Headers(),
|
|
22
|
+
redirected: false,
|
|
23
|
+
status: 0,
|
|
24
|
+
statusText: "Unknown Error",
|
|
25
|
+
type: "error",
|
|
26
|
+
url: "",
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Converts a `RawResponse` object into a `RawResponse` by extracting its properties,
|
|
30
|
+
* excluding the `body` and `bodyUsed` fields.
|
|
31
|
+
*
|
|
32
|
+
* @param response - The `RawResponse` object to convert.
|
|
33
|
+
* @returns A `RawResponse` object containing the extracted properties of the input response.
|
|
34
|
+
*/
|
|
35
|
+
function toRawResponse(response) {
|
|
36
|
+
return {
|
|
37
|
+
headers: response.headers,
|
|
38
|
+
redirected: response.redirected,
|
|
39
|
+
status: response.status,
|
|
40
|
+
statusText: response.statusText,
|
|
41
|
+
type: response.type,
|
|
42
|
+
url: response.url,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function createRequestUrl(baseUrl: string, queryParameters?: Record<string,
|
|
1
|
+
export declare function createRequestUrl(baseUrl: string, queryParameters?: Record<string, unknown>): string;
|