@rulebricks/sdk 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +46 -25
- package/api/errors/BadRequestError.d.ts +6 -6
- package/api/errors/BadRequestError.js +14 -32
- package/api/errors/ForbiddenError.d.ts +7 -6
- package/api/errors/ForbiddenError.js +14 -32
- package/api/errors/InternalServerError.d.ts +6 -6
- package/api/errors/InternalServerError.js +14 -32
- package/api/errors/NotFoundError.d.ts +6 -6
- package/api/errors/NotFoundError.js +14 -32
- package/api/errors/index.d.ts +4 -1
- package/api/errors/index.js +7 -11
- package/api/index.d.ts +3 -1
- package/api/index.js +7 -11
- package/api/resources/assets/client/Client.d.ts +38 -14
- package/api/resources/assets/client/Client.js +27 -55
- package/api/resources/assets/client/index.d.ts +1 -1
- package/api/resources/assets/client/index.js +7 -11
- package/api/resources/assets/client/requests/DeleteFolderRequest.d.ts +13 -1
- package/api/resources/assets/client/requests/DeleteRuleRequest.d.ts +13 -1
- package/api/resources/assets/client/requests/ExportRuleRequest.d.ts +15 -1
- package/api/resources/assets/client/requests/ImportRuleRequest.d.ts +15 -1
- package/api/resources/assets/client/requests/ListRulesRequest.d.ts +13 -1
- package/api/resources/assets/client/requests/UpsertFolderRequest.d.ts +18 -1
- package/api/resources/assets/client/requests/index.d.ts +6 -1
- package/api/resources/assets/index.d.ts +1 -1
- package/api/resources/assets/index.js +7 -11
- package/api/resources/decisions/client/Client.d.ts +30 -6
- package/api/resources/decisions/client/Client.js +17 -45
- package/api/resources/decisions/client/index.d.ts +1 -1
- package/api/resources/decisions/client/index.js +7 -11
- package/api/resources/decisions/client/requests/QueryDecisionsRequest.d.ts +31 -1
- package/api/resources/decisions/client/requests/index.d.ts +1 -1
- package/api/resources/decisions/index.d.ts +1 -1
- package/api/resources/decisions/index.js +7 -11
- package/api/resources/flows/client/Client.d.ts +30 -6
- package/api/resources/flows/client/Client.js +17 -45
- package/api/resources/flows/client/index.d.ts +1 -1
- package/api/resources/flows/index.d.ts +1 -1
- package/api/resources/flows/index.js +7 -11
- package/api/resources/index.d.ts +13 -8
- package/api/resources/index.js +16 -36
- package/api/resources/rules/client/Client.d.ts +32 -8
- package/api/resources/rules/client/Client.js +19 -47
- package/api/resources/rules/client/index.d.ts +1 -1
- package/api/resources/rules/index.d.ts +1 -1
- package/api/resources/rules/index.js +7 -11
- package/api/resources/tests/client/Client.d.ts +35 -11
- package/api/resources/tests/client/Client.js +22 -50
- package/api/resources/tests/client/index.d.ts +1 -1
- package/api/resources/tests/index.d.ts +1 -1
- package/api/resources/tests/index.js +7 -11
- package/api/resources/users/client/Client.d.ts +32 -8
- package/api/resources/users/client/Client.js +19 -47
- package/api/resources/users/client/index.d.ts +1 -1
- package/api/resources/users/client/index.js +7 -11
- package/api/resources/users/client/requests/CreateUserGroupRequest.d.ts +16 -1
- package/api/resources/users/client/requests/UserInviteRequest.d.ts +41 -1
- package/api/resources/users/client/requests/index.d.ts +2 -1
- package/api/resources/users/index.d.ts +2 -1
- package/api/resources/users/index.js +7 -11
- package/api/resources/users/types/UserInviteRequestRole.d.ts +13 -7
- package/api/resources/users/types/index.d.ts +1 -1
- package/api/resources/users/types/index.js +7 -11
- package/api/resources/values/client/Client.d.ts +32 -8
- package/api/resources/values/client/Client.js +21 -49
- package/api/resources/values/client/index.d.ts +1 -1
- package/api/resources/values/client/index.js +7 -11
- package/api/resources/values/client/requests/DeleteDynamicValueRequest.d.ts +15 -1
- package/api/resources/values/client/requests/ListDynamicValuesRequest.d.ts +13 -1
- package/api/resources/values/client/requests/UpdateValuesRequest.d.ts +22 -1
- package/api/resources/values/client/requests/index.d.ts +3 -1
- package/api/resources/values/index.d.ts +2 -1
- package/api/resources/values/index.js +7 -11
- package/api/resources/values/types/UpdateValuesRequestValuesValue.d.ts +4 -1
- package/api/resources/values/types/index.d.ts +1 -1
- package/api/resources/values/types/index.js +7 -11
- package/api/types/BooleanValue.d.ts +8 -1
- package/api/types/BulkRuleResponseItem.d.ts +8 -1
- package/api/types/BulkRuleResponseItemError.d.ts +7 -1
- package/api/types/CreateTestRequest.d.ts +13 -1
- package/api/types/DecisionLog.d.ts +9 -1
- package/api/types/DecisionLogDecision.d.ts +8 -1
- package/api/types/DecisionLogDecisionConditionsItemValue.d.ts +7 -1
- package/api/types/DecisionLogRequest.d.ts +15 -1
- package/api/types/DecisionLogResponse.d.ts +9 -1
- package/api/types/DynamicRequestPayload.d.ts +7 -1
- package/api/types/DynamicResponsePayload.d.ts +7 -1
- package/api/types/DynamicValue.d.ts +19 -1
- package/api/types/DynamicValueBase.d.ts +14 -1
- package/api/types/DynamicValueListResponse.d.ts +5 -1
- package/api/types/Error_.d.ts +7 -1
- package/api/types/FlowBase.d.ts +13 -1
- package/api/types/FlowDetail.d.ts +10 -1
- package/api/types/FlowExecutionError.d.ts +14 -1
- package/api/types/FlowListResponse.d.ts +5 -1
- package/api/types/Folder.d.ts +13 -1
- package/api/types/FolderListResponse.d.ts +5 -1
- package/api/types/ListValue.d.ts +8 -1
- package/api/types/NumberValue.d.ts +8 -1
- package/api/types/ParallelSolveRequest.d.ts +8 -1
- package/api/types/ParallelSolveRequestValue.d.ts +11 -1
- package/api/types/ParallelSolveResponse.d.ts +8 -1
- package/api/types/RuleBase.d.ts +13 -1
- package/api/types/RuleDetail.d.ts +13 -1
- package/api/types/RuleExport.d.ts +7 -1
- package/api/types/RuleListResponse.d.ts +5 -1
- package/api/types/RuleUsage.d.ts +17 -1
- package/api/types/SchemaField.d.ts +22 -1
- package/api/types/SchemaFieldDefaultValue.d.ts +7 -1
- package/api/types/SchemaFieldType.d.ts +14 -8
- package/api/types/StringValue.d.ts +8 -1
- package/api/types/SuccessMessage.d.ts +7 -1
- package/api/types/Test.d.ts +24 -1
- package/api/types/TestListResponse.d.ts +5 -1
- package/api/types/TestTestState.d.ts +19 -1
- package/api/types/TestTestStateConditionsItemValue.d.ts +7 -1
- package/api/types/TestTestStateEvaluationError.d.ts +7 -1
- package/api/types/UsageStatistics.d.ts +17 -1
- package/api/types/UserGroup.d.ts +13 -1
- package/api/types/UserGroupListResponse.d.ts +5 -1
- package/api/types/UserInviteResponse.d.ts +9 -1
- package/api/types/UserInviteResponseUser.d.ts +11 -1
- package/api/types/ValueLimits.d.ts +16 -1
- package/api/types/index.d.ts +47 -1
- package/api/types/index.js +7 -11
- package/core/fetcher/APIResponse.d.ts +10 -1
- package/core/fetcher/Fetcher.d.ts +39 -3
- package/core/fetcher/Fetcher.js +4 -14
- package/core/fetcher/Supplier.d.ts +4 -4
- package/core/fetcher/Supplier.js +2 -12
- package/core/fetcher/createRequestUrl.d.ts +1 -2
- package/core/fetcher/createRequestUrl.js +2 -1
- package/core/fetcher/getFetchFn.d.ts +1 -2
- package/core/fetcher/getFetchFn.js +18 -45
- package/core/fetcher/getHeader.d.ts +1 -2
- package/core/fetcher/getHeader.js +2 -1
- package/core/fetcher/getRequestBody.d.ts +7 -2
- package/core/fetcher/getRequestBody.js +6 -15
- package/core/fetcher/getResponseBody.d.ts +1 -2
- package/core/fetcher/getResponseBody.js +4 -13
- package/core/fetcher/index.d.ts +5 -9
- package/core/fetcher/makeRequest.d.ts +1 -2
- package/core/fetcher/makeRequest.js +2 -12
- package/core/fetcher/requestWithRetries.d.ts +1 -2
- package/core/fetcher/requestWithRetries.js +6 -15
- package/core/fetcher/signals.d.ts +3 -3
- package/core/fetcher/signals.js +3 -2
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +26 -36
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +2 -12
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +19 -20
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +10 -29
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +27 -36
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +2 -12
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -2
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -45
- package/core/index.d.ts +3 -2
- package/core/index.js +16 -36
- package/core/json.d.ts +8 -9
- package/core/json.js +2 -2
- package/core/runtime/index.d.ts +1 -3
- package/core/runtime/runtime.d.ts +9 -14
- package/core/schemas/Schema.d.ts +86 -21
- package/core/schemas/builders/bigint/bigint.d.ts +2 -4
- package/core/schemas/builders/bigint/bigint.js +2 -1
- package/core/schemas/builders/bigint/index.d.ts +1 -3
- package/core/schemas/builders/date/date.d.ts +2 -4
- package/core/schemas/builders/date/date.js +2 -1
- package/core/schemas/builders/date/index.d.ts +1 -3
- package/core/schemas/builders/enum/enum.d.ts +2 -3
- package/core/schemas/builders/enum/enum.js +2 -1
- package/core/schemas/builders/enum/index.d.ts +1 -3
- package/core/schemas/builders/index.d.ts +14 -1
- package/core/schemas/builders/index.js +7 -11
- package/core/schemas/builders/lazy/index.d.ts +3 -5
- package/core/schemas/builders/lazy/lazy.d.ts +5 -13
- package/core/schemas/builders/lazy/lazy.js +4 -3
- package/core/schemas/builders/lazy/lazyObject.d.ts +3 -8
- package/core/schemas/builders/lazy/lazyObject.js +2 -1
- package/core/schemas/builders/list/index.d.ts +1 -3
- package/core/schemas/builders/list/list.d.ts +2 -7
- package/core/schemas/builders/list/list.js +2 -1
- package/core/schemas/builders/literals/booleanLiteral.d.ts +2 -3
- package/core/schemas/builders/literals/booleanLiteral.js +2 -1
- package/core/schemas/builders/literals/index.d.ts +2 -5
- package/core/schemas/builders/literals/stringLiteral.d.ts +2 -3
- package/core/schemas/builders/literals/stringLiteral.js +2 -1
- package/core/schemas/builders/object/index.d.ts +6 -9
- package/core/schemas/builders/object/object.d.ts +3 -68
- package/core/schemas/builders/object/object.js +3 -2
- package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -2
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +2 -1
- package/core/schemas/builders/object/property.d.ts +8 -7
- package/core/schemas/builders/object/property.js +3 -2
- package/core/schemas/builders/object/types.d.ts +31 -1
- package/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +6 -20
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -2
- package/core/schemas/builders/object-like/index.d.ts +2 -4
- package/core/schemas/builders/object-like/types.d.ts +7 -1
- package/core/schemas/builders/primitives/any.d.ts +1 -3
- package/core/schemas/builders/primitives/boolean.d.ts +1 -3
- package/core/schemas/builders/primitives/index.d.ts +5 -6
- package/core/schemas/builders/primitives/number.d.ts +1 -3
- package/core/schemas/builders/primitives/string.d.ts +1 -3
- package/core/schemas/builders/primitives/unknown.d.ts +1 -3
- package/core/schemas/builders/record/index.d.ts +2 -3
- package/core/schemas/builders/record/record.d.ts +3 -4
- package/core/schemas/builders/record/record.js +2 -1
- package/core/schemas/builders/record/types.d.ts +4 -1
- package/core/schemas/builders/schema-utils/JsonError.d.ts +4 -4
- package/core/schemas/builders/schema-utils/ParseError.d.ts +4 -4
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +18 -137
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +6 -5
- package/core/schemas/builders/schema-utils/index.d.ts +4 -9
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +2 -2
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +2 -1
- package/core/schemas/builders/set/index.d.ts +1 -3
- package/core/schemas/builders/set/set.d.ts +2 -4
- package/core/schemas/builders/set/set.js +2 -1
- package/core/schemas/builders/undiscriminated-union/index.d.ts +2 -3
- package/core/schemas/builders/undiscriminated-union/types.d.ts +4 -1
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +3 -7
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +2 -1
- package/core/schemas/builders/union/discriminant.d.ts +5 -5
- package/core/schemas/builders/union/discriminant.js +2 -1
- package/core/schemas/builders/union/index.d.ts +4 -5
- package/core/schemas/builders/union/types.d.ts +13 -1
- package/core/schemas/builders/union/union.d.ts +4 -8
- package/core/schemas/builders/union/union.js +4 -4
- package/core/schemas/index.d.ts +2 -1
- package/core/schemas/index.js +7 -11
- package/core/schemas/utils/MaybePromise.d.ts +1 -1
- package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +7 -1
- package/core/schemas/utils/createIdentitySchemaCreator.d.ts +2 -7
- package/core/schemas/utils/createIdentitySchemaCreator.js +2 -1
- package/core/schemas/utils/entries.d.ts +1 -2
- package/core/schemas/utils/entries.js +2 -1
- package/core/schemas/utils/filterObject.d.ts +1 -2
- package/core/schemas/utils/filterObject.js +2 -1
- package/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +1 -2
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +2 -1
- package/core/schemas/utils/isPlainObject.d.ts +1 -2
- package/core/schemas/utils/isPlainObject.js +2 -1
- package/core/schemas/utils/keys.d.ts +1 -2
- package/core/schemas/utils/keys.js +2 -1
- package/core/schemas/utils/maybeSkipValidation.d.ts +2 -2
- package/core/schemas/utils/maybeSkipValidation.js +2 -1
- package/core/schemas/utils/partition.d.ts +1 -2
- package/core/schemas/utils/partition.js +2 -1
- package/dist/Client.d.ts +46 -25
- package/dist/api/errors/BadRequestError.d.ts +6 -6
- package/dist/api/errors/BadRequestError.js +14 -32
- package/dist/api/errors/ForbiddenError.d.ts +7 -6
- package/dist/api/errors/ForbiddenError.js +14 -32
- package/dist/api/errors/InternalServerError.d.ts +6 -6
- package/dist/api/errors/InternalServerError.js +14 -32
- package/dist/api/errors/NotFoundError.d.ts +6 -6
- package/dist/api/errors/NotFoundError.js +14 -32
- package/dist/api/errors/index.d.ts +4 -1
- package/dist/api/errors/index.js +7 -11
- package/dist/api/index.d.ts +3 -1
- package/dist/api/index.js +7 -11
- package/dist/api/resources/assets/client/Client.d.ts +38 -14
- package/dist/api/resources/assets/client/Client.js +27 -55
- package/dist/api/resources/assets/client/index.d.ts +1 -1
- package/dist/api/resources/assets/client/index.js +7 -11
- package/dist/api/resources/assets/client/requests/DeleteFolderRequest.d.ts +13 -1
- package/dist/api/resources/assets/client/requests/DeleteRuleRequest.d.ts +13 -1
- package/dist/api/resources/assets/client/requests/ExportRuleRequest.d.ts +15 -1
- package/dist/api/resources/assets/client/requests/ImportRuleRequest.d.ts +15 -1
- package/dist/api/resources/assets/client/requests/ListRulesRequest.d.ts +13 -1
- package/dist/api/resources/assets/client/requests/UpsertFolderRequest.d.ts +18 -1
- package/dist/api/resources/assets/client/requests/index.d.ts +6 -1
- package/dist/api/resources/assets/index.d.ts +1 -1
- package/dist/api/resources/assets/index.js +7 -11
- package/dist/api/resources/decisions/client/Client.d.ts +30 -6
- package/dist/api/resources/decisions/client/Client.js +17 -45
- package/dist/api/resources/decisions/client/index.d.ts +1 -1
- package/dist/api/resources/decisions/client/index.js +7 -11
- package/dist/api/resources/decisions/client/requests/QueryDecisionsRequest.d.ts +31 -1
- package/dist/api/resources/decisions/client/requests/index.d.ts +1 -1
- package/dist/api/resources/decisions/index.d.ts +1 -1
- package/dist/api/resources/decisions/index.js +7 -11
- package/dist/api/resources/flows/client/Client.d.ts +30 -6
- package/dist/api/resources/flows/client/Client.js +17 -45
- package/dist/api/resources/flows/client/index.d.ts +1 -1
- package/dist/api/resources/flows/index.d.ts +1 -1
- package/dist/api/resources/flows/index.js +7 -11
- package/dist/api/resources/index.d.ts +13 -8
- package/dist/api/resources/index.js +16 -36
- package/dist/api/resources/rules/client/Client.d.ts +32 -8
- package/dist/api/resources/rules/client/Client.js +19 -47
- package/dist/api/resources/rules/client/index.d.ts +1 -1
- package/dist/api/resources/rules/index.d.ts +1 -1
- package/dist/api/resources/rules/index.js +7 -11
- package/dist/api/resources/tests/client/Client.d.ts +35 -11
- package/dist/api/resources/tests/client/Client.js +22 -50
- package/dist/api/resources/tests/client/index.d.ts +1 -1
- package/dist/api/resources/tests/index.d.ts +1 -1
- package/dist/api/resources/tests/index.js +7 -11
- package/dist/api/resources/users/client/Client.d.ts +32 -8
- package/dist/api/resources/users/client/Client.js +19 -47
- package/dist/api/resources/users/client/index.d.ts +1 -1
- package/dist/api/resources/users/client/index.js +7 -11
- package/dist/api/resources/users/client/requests/CreateUserGroupRequest.d.ts +16 -1
- package/dist/api/resources/users/client/requests/UserInviteRequest.d.ts +41 -1
- package/dist/api/resources/users/client/requests/index.d.ts +2 -1
- package/dist/api/resources/users/index.d.ts +2 -1
- package/dist/api/resources/users/index.js +7 -11
- package/dist/api/resources/users/types/UserInviteRequestRole.d.ts +13 -7
- package/dist/api/resources/users/types/index.d.ts +1 -1
- package/dist/api/resources/users/types/index.js +7 -11
- package/dist/api/resources/values/client/Client.d.ts +32 -8
- package/dist/api/resources/values/client/Client.js +21 -49
- package/dist/api/resources/values/client/index.d.ts +1 -1
- package/dist/api/resources/values/client/index.js +7 -11
- package/dist/api/resources/values/client/requests/DeleteDynamicValueRequest.d.ts +15 -1
- package/dist/api/resources/values/client/requests/ListDynamicValuesRequest.d.ts +13 -1
- package/dist/api/resources/values/client/requests/UpdateValuesRequest.d.ts +22 -1
- package/dist/api/resources/values/client/requests/index.d.ts +3 -1
- package/dist/api/resources/values/index.d.ts +2 -1
- package/dist/api/resources/values/index.js +7 -11
- package/dist/api/resources/values/types/UpdateValuesRequestValuesValue.d.ts +4 -1
- package/dist/api/resources/values/types/index.d.ts +1 -1
- package/dist/api/resources/values/types/index.js +7 -11
- package/dist/api/types/BooleanValue.d.ts +8 -1
- package/dist/api/types/BulkRuleResponseItem.d.ts +8 -1
- package/dist/api/types/BulkRuleResponseItemError.d.ts +7 -1
- package/dist/api/types/CreateTestRequest.d.ts +13 -1
- package/dist/api/types/DecisionLog.d.ts +9 -1
- package/dist/api/types/DecisionLogDecision.d.ts +8 -1
- package/dist/api/types/DecisionLogDecisionConditionsItemValue.d.ts +7 -1
- package/dist/api/types/DecisionLogRequest.d.ts +15 -1
- package/dist/api/types/DecisionLogResponse.d.ts +9 -1
- package/dist/api/types/DynamicRequestPayload.d.ts +7 -1
- package/dist/api/types/DynamicResponsePayload.d.ts +7 -1
- package/dist/api/types/DynamicValue.d.ts +19 -1
- package/dist/api/types/DynamicValueBase.d.ts +14 -1
- package/dist/api/types/DynamicValueListResponse.d.ts +5 -1
- package/dist/api/types/Error_.d.ts +7 -1
- package/dist/api/types/FlowBase.d.ts +13 -1
- package/dist/api/types/FlowDetail.d.ts +10 -1
- package/dist/api/types/FlowExecutionError.d.ts +14 -1
- package/dist/api/types/FlowListResponse.d.ts +5 -1
- package/dist/api/types/Folder.d.ts +13 -1
- package/dist/api/types/FolderListResponse.d.ts +5 -1
- package/dist/api/types/ListValue.d.ts +8 -1
- package/dist/api/types/NumberValue.d.ts +8 -1
- package/dist/api/types/ParallelSolveRequest.d.ts +8 -1
- package/dist/api/types/ParallelSolveRequestValue.d.ts +11 -1
- package/dist/api/types/ParallelSolveResponse.d.ts +8 -1
- package/dist/api/types/RuleBase.d.ts +13 -1
- package/dist/api/types/RuleDetail.d.ts +13 -1
- package/dist/api/types/RuleExport.d.ts +7 -1
- package/dist/api/types/RuleListResponse.d.ts +5 -1
- package/dist/api/types/RuleUsage.d.ts +17 -1
- package/dist/api/types/SchemaField.d.ts +22 -1
- package/dist/api/types/SchemaFieldDefaultValue.d.ts +7 -1
- package/dist/api/types/SchemaFieldType.d.ts +14 -8
- package/dist/api/types/StringValue.d.ts +8 -1
- package/dist/api/types/SuccessMessage.d.ts +7 -1
- package/dist/api/types/Test.d.ts +24 -1
- package/dist/api/types/TestListResponse.d.ts +5 -1
- package/dist/api/types/TestTestState.d.ts +19 -1
- package/dist/api/types/TestTestStateConditionsItemValue.d.ts +7 -1
- package/dist/api/types/TestTestStateEvaluationError.d.ts +7 -1
- package/dist/api/types/UsageStatistics.d.ts +17 -1
- package/dist/api/types/UserGroup.d.ts +13 -1
- package/dist/api/types/UserGroupListResponse.d.ts +5 -1
- package/dist/api/types/UserInviteResponse.d.ts +9 -1
- package/dist/api/types/UserInviteResponseUser.d.ts +11 -1
- package/dist/api/types/ValueLimits.d.ts +16 -1
- package/dist/api/types/index.d.ts +47 -1
- package/dist/api/types/index.js +7 -11
- package/dist/core/fetcher/APIResponse.d.ts +10 -1
- package/dist/core/fetcher/Fetcher.d.ts +39 -3
- package/dist/core/fetcher/Fetcher.js +4 -14
- package/dist/core/fetcher/Supplier.d.ts +4 -4
- package/dist/core/fetcher/Supplier.js +2 -12
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -2
- package/dist/core/fetcher/createRequestUrl.js +2 -1
- package/dist/core/fetcher/getFetchFn.d.ts +1 -2
- package/dist/core/fetcher/getFetchFn.js +18 -45
- package/dist/core/fetcher/getHeader.d.ts +1 -2
- package/dist/core/fetcher/getHeader.js +2 -1
- package/dist/core/fetcher/getRequestBody.d.ts +7 -2
- package/dist/core/fetcher/getRequestBody.js +6 -15
- package/dist/core/fetcher/getResponseBody.d.ts +1 -2
- package/dist/core/fetcher/getResponseBody.js +4 -13
- package/dist/core/fetcher/index.d.ts +5 -9
- package/dist/core/fetcher/makeRequest.d.ts +1 -2
- package/dist/core/fetcher/makeRequest.js +2 -12
- package/dist/core/fetcher/requestWithRetries.d.ts +1 -2
- package/dist/core/fetcher/requestWithRetries.js +6 -15
- package/dist/core/fetcher/signals.d.ts +3 -3
- package/dist/core/fetcher/signals.js +3 -2
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +26 -36
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +2 -12
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +19 -20
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +10 -29
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +27 -36
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +2 -12
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -2
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -45
- package/dist/core/index.d.ts +3 -2
- package/dist/core/index.js +16 -36
- package/dist/core/json.d.ts +8 -9
- package/dist/core/json.js +2 -2
- package/dist/core/runtime/index.d.ts +1 -3
- package/dist/core/runtime/runtime.d.ts +9 -14
- package/dist/core/schemas/Schema.d.ts +86 -21
- package/dist/core/schemas/builders/bigint/bigint.d.ts +2 -4
- package/dist/core/schemas/builders/bigint/bigint.js +2 -1
- package/dist/core/schemas/builders/bigint/index.d.ts +1 -3
- package/dist/core/schemas/builders/date/date.d.ts +2 -4
- package/dist/core/schemas/builders/date/date.js +2 -1
- package/dist/core/schemas/builders/date/index.d.ts +1 -3
- package/dist/core/schemas/builders/enum/enum.d.ts +2 -3
- package/dist/core/schemas/builders/enum/enum.js +2 -1
- package/dist/core/schemas/builders/enum/index.d.ts +1 -3
- package/dist/core/schemas/builders/index.d.ts +14 -1
- package/dist/core/schemas/builders/index.js +7 -11
- package/dist/core/schemas/builders/lazy/index.d.ts +3 -5
- package/dist/core/schemas/builders/lazy/lazy.d.ts +5 -13
- package/dist/core/schemas/builders/lazy/lazy.js +4 -3
- package/dist/core/schemas/builders/lazy/lazyObject.d.ts +3 -8
- package/dist/core/schemas/builders/lazy/lazyObject.js +2 -1
- package/dist/core/schemas/builders/list/index.d.ts +1 -3
- package/dist/core/schemas/builders/list/list.d.ts +2 -7
- package/dist/core/schemas/builders/list/list.js +2 -1
- package/dist/core/schemas/builders/literals/booleanLiteral.d.ts +2 -3
- package/dist/core/schemas/builders/literals/booleanLiteral.js +2 -1
- package/dist/core/schemas/builders/literals/index.d.ts +2 -5
- package/dist/core/schemas/builders/literals/stringLiteral.d.ts +2 -3
- package/dist/core/schemas/builders/literals/stringLiteral.js +2 -1
- package/dist/core/schemas/builders/object/index.d.ts +6 -9
- package/dist/core/schemas/builders/object/object.d.ts +3 -68
- package/dist/core/schemas/builders/object/object.js +3 -2
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -2
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +2 -1
- package/dist/core/schemas/builders/object/property.d.ts +8 -7
- package/dist/core/schemas/builders/object/property.js +3 -2
- package/dist/core/schemas/builders/object/types.d.ts +31 -1
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +6 -20
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -2
- package/dist/core/schemas/builders/object-like/index.d.ts +2 -4
- package/dist/core/schemas/builders/object-like/types.d.ts +7 -1
- package/dist/core/schemas/builders/primitives/any.d.ts +1 -3
- package/dist/core/schemas/builders/primitives/boolean.d.ts +1 -3
- package/dist/core/schemas/builders/primitives/index.d.ts +5 -6
- package/dist/core/schemas/builders/primitives/number.d.ts +1 -3
- package/dist/core/schemas/builders/primitives/string.d.ts +1 -3
- package/dist/core/schemas/builders/primitives/unknown.d.ts +1 -3
- package/dist/core/schemas/builders/record/index.d.ts +2 -3
- package/dist/core/schemas/builders/record/record.d.ts +3 -4
- package/dist/core/schemas/builders/record/record.js +2 -1
- package/dist/core/schemas/builders/record/types.d.ts +4 -1
- package/dist/core/schemas/builders/schema-utils/JsonError.d.ts +4 -4
- package/dist/core/schemas/builders/schema-utils/ParseError.d.ts +4 -4
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +18 -137
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +6 -5
- package/dist/core/schemas/builders/schema-utils/index.d.ts +4 -9
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +2 -2
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +2 -1
- package/dist/core/schemas/builders/set/index.d.ts +1 -3
- package/dist/core/schemas/builders/set/set.d.ts +2 -4
- package/dist/core/schemas/builders/set/set.js +2 -1
- package/dist/core/schemas/builders/undiscriminated-union/index.d.ts +2 -3
- package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +4 -1
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +3 -7
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +2 -1
- package/dist/core/schemas/builders/union/discriminant.d.ts +5 -5
- package/dist/core/schemas/builders/union/discriminant.js +2 -1
- package/dist/core/schemas/builders/union/index.d.ts +4 -5
- package/dist/core/schemas/builders/union/types.d.ts +13 -1
- package/dist/core/schemas/builders/union/union.d.ts +4 -8
- package/dist/core/schemas/builders/union/union.js +4 -4
- package/dist/core/schemas/index.d.ts +2 -1
- package/dist/core/schemas/index.js +7 -11
- package/dist/core/schemas/utils/MaybePromise.d.ts +1 -1
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +7 -1
- package/dist/core/schemas/utils/createIdentitySchemaCreator.d.ts +2 -7
- package/dist/core/schemas/utils/createIdentitySchemaCreator.js +2 -1
- package/dist/core/schemas/utils/entries.d.ts +1 -2
- package/dist/core/schemas/utils/entries.js +2 -1
- package/dist/core/schemas/utils/filterObject.d.ts +1 -2
- package/dist/core/schemas/utils/filterObject.js +2 -1
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +1 -2
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +2 -1
- package/dist/core/schemas/utils/isPlainObject.d.ts +1 -2
- package/dist/core/schemas/utils/isPlainObject.js +2 -1
- package/dist/core/schemas/utils/keys.d.ts +1 -2
- package/dist/core/schemas/utils/keys.js +2 -1
- package/dist/core/schemas/utils/maybeSkipValidation.d.ts +2 -2
- package/dist/core/schemas/utils/maybeSkipValidation.js +2 -1
- package/dist/core/schemas/utils/partition.d.ts +1 -2
- package/dist/core/schemas/utils/partition.js +2 -1
- package/dist/errors/RulebricksApiError.d.ts +9 -7
- package/dist/errors/RulebricksApiTimeoutError.d.ts +5 -3
- package/dist/errors/index.d.ts +2 -5
- package/dist/forge/index.d.ts +4 -0
- package/dist/forge/index.js +31 -0
- package/dist/forge/operators.d.ts +136 -0
- package/dist/forge/operators.js +938 -0
- package/dist/forge/rule.d.ts +129 -0
- package/dist/forge/rule.js +702 -0
- package/dist/forge/types.d.ts +53 -0
- package/dist/forge/types.js +34 -0
- package/dist/forge/values.d.ts +20 -0
- package/dist/forge/values.js +88 -0
- package/dist/index.d.ts +5 -15
- package/dist/index.js +36 -123
- package/dist/serialization/index.d.ts +2 -1
- package/dist/serialization/index.js +7 -11
- package/dist/serialization/resources/assets/client/index.d.ts +1 -1
- package/dist/serialization/resources/assets/client/index.js +7 -11
- package/dist/serialization/resources/assets/client/requests/DeleteFolderRequest.d.ts +12 -2
- package/dist/serialization/resources/assets/client/requests/DeleteFolderRequest.js +14 -32
- package/dist/serialization/resources/assets/client/requests/DeleteRuleRequest.d.ts +12 -2
- package/dist/serialization/resources/assets/client/requests/DeleteRuleRequest.js +14 -32
- package/dist/serialization/resources/assets/client/requests/ImportRuleRequest.d.ts +12 -2
- package/dist/serialization/resources/assets/client/requests/ImportRuleRequest.js +14 -32
- package/dist/serialization/resources/assets/client/requests/UpsertFolderRequest.d.ts +14 -2
- package/dist/serialization/resources/assets/client/requests/UpsertFolderRequest.js +14 -32
- package/dist/serialization/resources/assets/client/requests/index.d.ts +4 -9
- package/dist/serialization/resources/assets/index.d.ts +1 -1
- package/dist/serialization/resources/assets/index.js +7 -11
- package/dist/serialization/resources/index.d.ts +9 -5
- package/dist/serialization/resources/index.js +16 -36
- package/dist/serialization/resources/rules/client/bulkSolve.d.ts +16 -3
- package/dist/serialization/resources/rules/client/bulkSolve.js +14 -32
- package/dist/serialization/resources/rules/client/index.d.ts +1 -2
- package/dist/serialization/resources/rules/client/index.js +14 -32
- package/dist/serialization/resources/rules/index.d.ts +1 -1
- package/dist/serialization/resources/rules/index.js +7 -11
- package/dist/serialization/resources/users/client/index.d.ts +1 -1
- package/dist/serialization/resources/users/client/index.js +7 -11
- package/dist/serialization/resources/users/client/requests/CreateUserGroupRequest.d.ts +13 -2
- package/dist/serialization/resources/users/client/requests/CreateUserGroupRequest.js +14 -32
- package/dist/serialization/resources/users/client/requests/UserInviteRequest.d.ts +15 -2
- package/dist/serialization/resources/users/client/requests/UserInviteRequest.js +14 -32
- package/dist/serialization/resources/users/client/requests/index.d.ts +2 -5
- package/dist/serialization/resources/users/index.d.ts +2 -1
- package/dist/serialization/resources/users/index.js +7 -11
- package/dist/serialization/resources/users/types/UserInviteRequestRole.d.ts +10 -2
- package/dist/serialization/resources/users/types/UserInviteRequestRole.js +14 -32
- package/dist/serialization/resources/users/types/index.d.ts +1 -1
- package/dist/serialization/resources/users/types/index.js +7 -11
- package/dist/serialization/resources/values/client/index.d.ts +1 -1
- package/dist/serialization/resources/values/client/index.js +7 -11
- package/dist/serialization/resources/values/client/requests/UpdateValuesRequest.d.ts +14 -2
- package/dist/serialization/resources/values/client/requests/UpdateValuesRequest.js +14 -32
- package/dist/serialization/resources/values/client/requests/index.d.ts +1 -3
- package/dist/serialization/resources/values/index.d.ts +2 -1
- package/dist/serialization/resources/values/index.js +7 -11
- package/dist/serialization/resources/values/types/UpdateValuesRequestValuesValue.d.ts +10 -2
- package/dist/serialization/resources/values/types/UpdateValuesRequestValuesValue.js +14 -32
- package/dist/serialization/resources/values/types/index.d.ts +1 -1
- package/dist/serialization/resources/values/types/index.js +7 -11
- package/dist/serialization/types/BooleanValue.d.ts +13 -2
- package/dist/serialization/types/BooleanValue.js +14 -32
- package/dist/serialization/types/BulkRuleResponseItem.d.ts +12 -2
- package/dist/serialization/types/BulkRuleResponseItem.js +14 -32
- package/dist/serialization/types/BulkRuleResponseItemError.d.ts +12 -2
- package/dist/serialization/types/BulkRuleResponseItemError.js +14 -32
- package/dist/serialization/types/CreateTestRequest.d.ts +15 -2
- package/dist/serialization/types/CreateTestRequest.js +14 -32
- package/dist/serialization/types/DecisionLog.d.ts +16 -2
- package/dist/serialization/types/DecisionLog.js +14 -32
- package/dist/serialization/types/DecisionLogDecision.d.ts +14 -2
- package/dist/serialization/types/DecisionLogDecision.js +14 -32
- package/dist/serialization/types/DecisionLogDecisionConditionsItemValue.d.ts +13 -2
- package/dist/serialization/types/DecisionLogDecisionConditionsItemValue.js +14 -32
- package/dist/serialization/types/DecisionLogRequest.d.ts +17 -2
- package/dist/serialization/types/DecisionLogRequest.js +14 -32
- package/dist/serialization/types/DecisionLogResponse.d.ts +13 -2
- package/dist/serialization/types/DecisionLogResponse.js +14 -32
- package/dist/serialization/types/DynamicRequestPayload.d.ts +10 -2
- package/dist/serialization/types/DynamicRequestPayload.js +14 -32
- package/dist/serialization/types/DynamicResponsePayload.d.ts +10 -2
- package/dist/serialization/types/DynamicResponsePayload.js +14 -32
- package/dist/serialization/types/DynamicValue.d.ts +26 -2
- package/dist/serialization/types/DynamicValue.js +14 -32
- package/dist/serialization/types/DynamicValueBase.d.ts +16 -2
- package/dist/serialization/types/DynamicValueBase.js +14 -32
- package/dist/serialization/types/DynamicValueListResponse.d.ts +11 -2
- package/dist/serialization/types/DynamicValueListResponse.js +14 -32
- package/dist/serialization/types/Error_.d.ts +12 -2
- package/dist/serialization/types/Error_.js +14 -32
- package/dist/serialization/types/FlowBase.d.ts +15 -2
- package/dist/serialization/types/FlowBase.js +14 -32
- package/dist/serialization/types/FlowDetail.d.ts +14 -2
- package/dist/serialization/types/FlowDetail.js +14 -32
- package/dist/serialization/types/FlowExecutionError.d.ts +14 -2
- package/dist/serialization/types/FlowExecutionError.js +14 -32
- package/dist/serialization/types/FlowListResponse.d.ts +11 -2
- package/dist/serialization/types/FlowListResponse.js +14 -32
- package/dist/serialization/types/Folder.d.ts +15 -2
- package/dist/serialization/types/Folder.js +14 -32
- package/dist/serialization/types/FolderListResponse.d.ts +11 -2
- package/dist/serialization/types/FolderListResponse.js +14 -32
- package/dist/serialization/types/ListValue.d.ts +13 -2
- package/dist/serialization/types/ListValue.js +14 -32
- package/dist/serialization/types/NumberValue.d.ts +13 -2
- package/dist/serialization/types/NumberValue.js +14 -32
- package/dist/serialization/types/ParallelSolveRequest.d.ts +11 -2
- package/dist/serialization/types/ParallelSolveRequest.js +14 -32
- package/dist/serialization/types/ParallelSolveRequestValue.d.ts +14 -2
- package/dist/serialization/types/ParallelSolveRequestValue.js +14 -32
- package/dist/serialization/types/ParallelSolveResponse.d.ts +11 -2
- package/dist/serialization/types/ParallelSolveResponse.js +14 -32
- package/dist/serialization/types/RuleBase.d.ts +15 -2
- package/dist/serialization/types/RuleBase.js +14 -32
- package/dist/serialization/types/RuleDetail.d.ts +18 -2
- package/dist/serialization/types/RuleDetail.js +14 -32
- package/dist/serialization/types/RuleExport.d.ts +10 -2
- package/dist/serialization/types/RuleExport.js +14 -32
- package/dist/serialization/types/RuleListResponse.d.ts +11 -2
- package/dist/serialization/types/RuleListResponse.js +14 -32
- package/dist/serialization/types/RuleUsage.d.ts +17 -2
- package/dist/serialization/types/RuleUsage.js +14 -32
- package/dist/serialization/types/SchemaField.d.ts +21 -2
- package/dist/serialization/types/SchemaField.js +14 -32
- package/dist/serialization/types/SchemaFieldDefaultValue.d.ts +10 -2
- package/dist/serialization/types/SchemaFieldDefaultValue.js +14 -32
- package/dist/serialization/types/SchemaFieldType.d.ts +10 -2
- package/dist/serialization/types/SchemaFieldType.js +14 -32
- package/dist/serialization/types/StringValue.d.ts +13 -2
- package/dist/serialization/types/StringValue.js +14 -32
- package/dist/serialization/types/SuccessMessage.d.ts +12 -2
- package/dist/serialization/types/SuccessMessage.js +14 -32
- package/dist/serialization/types/Test.d.ts +21 -2
- package/dist/serialization/types/Test.js +14 -32
- package/dist/serialization/types/TestListResponse.d.ts +11 -2
- package/dist/serialization/types/TestListResponse.js +14 -32
- package/dist/serialization/types/TestTestState.d.ts +19 -2
- package/dist/serialization/types/TestTestState.js +14 -32
- package/dist/serialization/types/TestTestStateConditionsItemValue.d.ts +13 -2
- package/dist/serialization/types/TestTestStateConditionsItemValue.js +14 -32
- package/dist/serialization/types/TestTestStateEvaluationError.d.ts +10 -2
- package/dist/serialization/types/TestTestStateEvaluationError.js +14 -32
- package/dist/serialization/types/UsageStatistics.d.ts +17 -2
- package/dist/serialization/types/UsageStatistics.js +14 -32
- package/dist/serialization/types/UserGroup.d.ts +15 -2
- package/dist/serialization/types/UserGroup.js +14 -32
- package/dist/serialization/types/UserGroupListResponse.d.ts +11 -2
- package/dist/serialization/types/UserGroupListResponse.js +14 -32
- package/dist/serialization/types/UserInviteResponse.d.ts +14 -2
- package/dist/serialization/types/UserInviteResponse.js +14 -32
- package/dist/serialization/types/UserInviteResponseUser.d.ts +14 -2
- package/dist/serialization/types/UserInviteResponseUser.js +14 -32
- package/dist/serialization/types/ValueLimits.d.ts +15 -2
- package/dist/serialization/types/ValueLimits.js +14 -32
- package/dist/serialization/types/index.d.ts +47 -1
- package/dist/serialization/types/index.js +7 -11
- package/errors/RulebricksApiError.d.ts +9 -7
- package/errors/RulebricksApiTimeoutError.d.ts +5 -3
- package/errors/index.d.ts +2 -5
- package/forge/index.d.ts +4 -0
- package/forge/index.js +31 -0
- package/forge/operators.d.ts +136 -0
- package/forge/operators.js +938 -0
- package/forge/rule.d.ts +129 -0
- package/forge/rule.js +702 -0
- package/forge/types.d.ts +53 -0
- package/forge/types.js +34 -0
- package/forge/values.d.ts +20 -0
- package/forge/values.js +88 -0
- package/index.d.ts +5 -15
- package/index.js +36 -123
- package/package.json +6 -4
- package/serialization/index.d.ts +2 -1
- package/serialization/index.js +7 -11
- package/serialization/resources/assets/client/index.d.ts +1 -1
- package/serialization/resources/assets/client/index.js +7 -11
- package/serialization/resources/assets/client/requests/DeleteFolderRequest.d.ts +12 -2
- package/serialization/resources/assets/client/requests/DeleteFolderRequest.js +14 -32
- package/serialization/resources/assets/client/requests/DeleteRuleRequest.d.ts +12 -2
- package/serialization/resources/assets/client/requests/DeleteRuleRequest.js +14 -32
- package/serialization/resources/assets/client/requests/ImportRuleRequest.d.ts +12 -2
- package/serialization/resources/assets/client/requests/ImportRuleRequest.js +14 -32
- package/serialization/resources/assets/client/requests/UpsertFolderRequest.d.ts +14 -2
- package/serialization/resources/assets/client/requests/UpsertFolderRequest.js +14 -32
- package/serialization/resources/assets/client/requests/index.d.ts +4 -9
- package/serialization/resources/assets/index.d.ts +1 -1
- package/serialization/resources/assets/index.js +7 -11
- package/serialization/resources/index.d.ts +9 -5
- package/serialization/resources/index.js +16 -36
- package/serialization/resources/rules/client/bulkSolve.d.ts +16 -3
- package/serialization/resources/rules/client/bulkSolve.js +14 -32
- package/serialization/resources/rules/client/index.d.ts +1 -2
- package/serialization/resources/rules/client/index.js +14 -32
- package/serialization/resources/rules/index.d.ts +1 -1
- package/serialization/resources/rules/index.js +7 -11
- package/serialization/resources/users/client/index.d.ts +1 -1
- package/serialization/resources/users/client/index.js +7 -11
- package/serialization/resources/users/client/requests/CreateUserGroupRequest.d.ts +13 -2
- package/serialization/resources/users/client/requests/CreateUserGroupRequest.js +14 -32
- package/serialization/resources/users/client/requests/UserInviteRequest.d.ts +15 -2
- package/serialization/resources/users/client/requests/UserInviteRequest.js +14 -32
- package/serialization/resources/users/client/requests/index.d.ts +2 -5
- package/serialization/resources/users/index.d.ts +2 -1
- package/serialization/resources/users/index.js +7 -11
- package/serialization/resources/users/types/UserInviteRequestRole.d.ts +10 -2
- package/serialization/resources/users/types/UserInviteRequestRole.js +14 -32
- package/serialization/resources/users/types/index.d.ts +1 -1
- package/serialization/resources/users/types/index.js +7 -11
- package/serialization/resources/values/client/index.d.ts +1 -1
- package/serialization/resources/values/client/index.js +7 -11
- package/serialization/resources/values/client/requests/UpdateValuesRequest.d.ts +14 -2
- package/serialization/resources/values/client/requests/UpdateValuesRequest.js +14 -32
- package/serialization/resources/values/client/requests/index.d.ts +1 -3
- package/serialization/resources/values/index.d.ts +2 -1
- package/serialization/resources/values/index.js +7 -11
- package/serialization/resources/values/types/UpdateValuesRequestValuesValue.d.ts +10 -2
- package/serialization/resources/values/types/UpdateValuesRequestValuesValue.js +14 -32
- package/serialization/resources/values/types/index.d.ts +1 -1
- package/serialization/resources/values/types/index.js +7 -11
- package/serialization/types/BooleanValue.d.ts +13 -2
- package/serialization/types/BooleanValue.js +14 -32
- package/serialization/types/BulkRuleResponseItem.d.ts +12 -2
- package/serialization/types/BulkRuleResponseItem.js +14 -32
- package/serialization/types/BulkRuleResponseItemError.d.ts +12 -2
- package/serialization/types/BulkRuleResponseItemError.js +14 -32
- package/serialization/types/CreateTestRequest.d.ts +15 -2
- package/serialization/types/CreateTestRequest.js +14 -32
- package/serialization/types/DecisionLog.d.ts +16 -2
- package/serialization/types/DecisionLog.js +14 -32
- package/serialization/types/DecisionLogDecision.d.ts +14 -2
- package/serialization/types/DecisionLogDecision.js +14 -32
- package/serialization/types/DecisionLogDecisionConditionsItemValue.d.ts +13 -2
- package/serialization/types/DecisionLogDecisionConditionsItemValue.js +14 -32
- package/serialization/types/DecisionLogRequest.d.ts +17 -2
- package/serialization/types/DecisionLogRequest.js +14 -32
- package/serialization/types/DecisionLogResponse.d.ts +13 -2
- package/serialization/types/DecisionLogResponse.js +14 -32
- package/serialization/types/DynamicRequestPayload.d.ts +10 -2
- package/serialization/types/DynamicRequestPayload.js +14 -32
- package/serialization/types/DynamicResponsePayload.d.ts +10 -2
- package/serialization/types/DynamicResponsePayload.js +14 -32
- package/serialization/types/DynamicValue.d.ts +26 -2
- package/serialization/types/DynamicValue.js +14 -32
- package/serialization/types/DynamicValueBase.d.ts +16 -2
- package/serialization/types/DynamicValueBase.js +14 -32
- package/serialization/types/DynamicValueListResponse.d.ts +11 -2
- package/serialization/types/DynamicValueListResponse.js +14 -32
- package/serialization/types/Error_.d.ts +12 -2
- package/serialization/types/Error_.js +14 -32
- package/serialization/types/FlowBase.d.ts +15 -2
- package/serialization/types/FlowBase.js +14 -32
- package/serialization/types/FlowDetail.d.ts +14 -2
- package/serialization/types/FlowDetail.js +14 -32
- package/serialization/types/FlowExecutionError.d.ts +14 -2
- package/serialization/types/FlowExecutionError.js +14 -32
- package/serialization/types/FlowListResponse.d.ts +11 -2
- package/serialization/types/FlowListResponse.js +14 -32
- package/serialization/types/Folder.d.ts +15 -2
- package/serialization/types/Folder.js +14 -32
- package/serialization/types/FolderListResponse.d.ts +11 -2
- package/serialization/types/FolderListResponse.js +14 -32
- package/serialization/types/ListValue.d.ts +13 -2
- package/serialization/types/ListValue.js +14 -32
- package/serialization/types/NumberValue.d.ts +13 -2
- package/serialization/types/NumberValue.js +14 -32
- package/serialization/types/ParallelSolveRequest.d.ts +11 -2
- package/serialization/types/ParallelSolveRequest.js +14 -32
- package/serialization/types/ParallelSolveRequestValue.d.ts +14 -2
- package/serialization/types/ParallelSolveRequestValue.js +14 -32
- package/serialization/types/ParallelSolveResponse.d.ts +11 -2
- package/serialization/types/ParallelSolveResponse.js +14 -32
- package/serialization/types/RuleBase.d.ts +15 -2
- package/serialization/types/RuleBase.js +14 -32
- package/serialization/types/RuleDetail.d.ts +18 -2
- package/serialization/types/RuleDetail.js +14 -32
- package/serialization/types/RuleExport.d.ts +10 -2
- package/serialization/types/RuleExport.js +14 -32
- package/serialization/types/RuleListResponse.d.ts +11 -2
- package/serialization/types/RuleListResponse.js +14 -32
- package/serialization/types/RuleUsage.d.ts +17 -2
- package/serialization/types/RuleUsage.js +14 -32
- package/serialization/types/SchemaField.d.ts +21 -2
- package/serialization/types/SchemaField.js +14 -32
- package/serialization/types/SchemaFieldDefaultValue.d.ts +10 -2
- package/serialization/types/SchemaFieldDefaultValue.js +14 -32
- package/serialization/types/SchemaFieldType.d.ts +10 -2
- package/serialization/types/SchemaFieldType.js +14 -32
- package/serialization/types/StringValue.d.ts +13 -2
- package/serialization/types/StringValue.js +14 -32
- package/serialization/types/SuccessMessage.d.ts +12 -2
- package/serialization/types/SuccessMessage.js +14 -32
- package/serialization/types/Test.d.ts +21 -2
- package/serialization/types/Test.js +14 -32
- package/serialization/types/TestListResponse.d.ts +11 -2
- package/serialization/types/TestListResponse.js +14 -32
- package/serialization/types/TestTestState.d.ts +19 -2
- package/serialization/types/TestTestState.js +14 -32
- package/serialization/types/TestTestStateConditionsItemValue.d.ts +13 -2
- package/serialization/types/TestTestStateConditionsItemValue.js +14 -32
- package/serialization/types/TestTestStateEvaluationError.d.ts +10 -2
- package/serialization/types/TestTestStateEvaluationError.js +14 -32
- package/serialization/types/UsageStatistics.d.ts +17 -2
- package/serialization/types/UsageStatistics.js +14 -32
- package/serialization/types/UserGroup.d.ts +15 -2
- package/serialization/types/UserGroup.js +14 -32
- package/serialization/types/UserGroupListResponse.d.ts +11 -2
- package/serialization/types/UserGroupListResponse.js +14 -32
- package/serialization/types/UserInviteResponse.d.ts +14 -2
- package/serialization/types/UserInviteResponse.js +14 -32
- package/serialization/types/UserInviteResponseUser.d.ts +14 -2
- package/serialization/types/UserInviteResponseUser.js +14 -32
- package/serialization/types/ValueLimits.d.ts +15 -2
- package/serialization/types/ValueLimits.js +14 -32
- package/serialization/types/index.d.ts +47 -1
- package/serialization/types/index.js +7 -11
|
@@ -1,66 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function
|
|
3
|
-
if (k2 === undefined)
|
|
4
|
-
k2 = k;
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
5
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
5
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
7
|
}
|
|
9
8
|
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function
|
|
11
|
-
if (k2 === undefined)
|
|
12
|
-
k2 = k;
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
13
11
|
o[k2] = m[k];
|
|
14
12
|
}));
|
|
15
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
14
|
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
-
}) : function
|
|
15
|
+
}) : function(o, v) {
|
|
18
16
|
o["default"] = v;
|
|
19
17
|
});
|
|
20
|
-
var __importStar = (this && this.__importStar) ||
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return ar;
|
|
28
|
-
};
|
|
29
|
-
return ownKeys(o);
|
|
30
|
-
};
|
|
31
|
-
return function (mod) {
|
|
32
|
-
if (mod && mod.__esModule)
|
|
33
|
-
return mod;
|
|
34
|
-
var result = {};
|
|
35
|
-
if (mod != null)
|
|
36
|
-
for (var k = ownKeys(mod), i = 0; i < k.length; i++)
|
|
37
|
-
if (k[i] !== "default")
|
|
38
|
-
__createBinding(result, mod, k[i]);
|
|
39
|
-
__setModuleDefault(result, mod);
|
|
40
|
-
return result;
|
|
41
|
-
};
|
|
42
|
-
})();
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
43
25
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
44
26
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
45
27
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
46
|
-
function fulfilled(value) { try {
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
catch (e) {
|
|
50
|
-
reject(e);
|
|
51
|
-
} }
|
|
52
|
-
function rejected(value) { try {
|
|
53
|
-
step(generator["throw"](value));
|
|
54
|
-
}
|
|
55
|
-
catch (e) {
|
|
56
|
-
reject(e);
|
|
57
|
-
} }
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
58
30
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
59
31
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
60
32
|
});
|
|
61
33
|
};
|
|
62
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
63
|
-
exports.getFetchFn =
|
|
35
|
+
exports.getFetchFn = void 0;
|
|
64
36
|
const runtime_1 = require("../runtime");
|
|
65
37
|
/**
|
|
66
38
|
* Returns a fetch function based on the runtime
|
|
@@ -84,3 +56,4 @@ function getFetchFn() {
|
|
|
84
56
|
return (yield Promise.resolve().then(() => __importStar(require("node-fetch")))).default;
|
|
85
57
|
});
|
|
86
58
|
}
|
|
59
|
+
exports.getFetchFn = getFetchFn;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export function getHeader(headers: any, header: any): any;
|
|
1
|
+
export declare function getHeader(headers: Record<string, any>, header: string): string | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getHeader =
|
|
3
|
+
exports.getHeader = void 0;
|
|
4
4
|
function getHeader(headers, header) {
|
|
5
5
|
for (const [headerKey, headerValue] of Object.entries(headers)) {
|
|
6
6
|
if (headerKey.toLowerCase() === header.toLowerCase()) {
|
|
@@ -9,3 +9,4 @@ function getHeader(headers, header) {
|
|
|
9
9
|
}
|
|
10
10
|
return undefined;
|
|
11
11
|
}
|
|
12
|
+
exports.getHeader = getHeader;
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
1
|
+
export declare namespace GetRequestBody {
|
|
2
|
+
interface Args {
|
|
3
|
+
body: unknown;
|
|
4
|
+
type: "json" | "file" | "bytes" | "other";
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export declare function getRequestBody({ body, type }: GetRequestBody.Args): Promise<BodyInit | undefined>;
|
|
@@ -2,27 +2,17 @@
|
|
|
2
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try {
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
catch (e) {
|
|
9
|
-
reject(e);
|
|
10
|
-
} }
|
|
11
|
-
function rejected(value) { try {
|
|
12
|
-
step(generator["throw"](value));
|
|
13
|
-
}
|
|
14
|
-
catch (e) {
|
|
15
|
-
reject(e);
|
|
16
|
-
} }
|
|
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); } }
|
|
17
7
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
9
|
});
|
|
20
10
|
};
|
|
21
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.getRequestBody =
|
|
12
|
+
exports.getRequestBody = void 0;
|
|
23
13
|
const json_1 = require("../json");
|
|
24
|
-
function getRequestBody(
|
|
25
|
-
return __awaiter(this,
|
|
14
|
+
function getRequestBody({ body, type }) {
|
|
15
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
16
|
if (type.includes("json")) {
|
|
27
17
|
return (0, json_1.toJson)(body);
|
|
28
18
|
}
|
|
@@ -31,3 +21,4 @@ function getRequestBody(_a) {
|
|
|
31
21
|
}
|
|
32
22
|
});
|
|
33
23
|
}
|
|
24
|
+
exports.getRequestBody = getRequestBody;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export function getResponseBody(response: any, responseType: any): any;
|
|
1
|
+
export declare function getResponseBody(response: Response, responseType?: string): Promise<unknown>;
|
|
@@ -2,24 +2,14 @@
|
|
|
2
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try {
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
catch (e) {
|
|
9
|
-
reject(e);
|
|
10
|
-
} }
|
|
11
|
-
function rejected(value) { try {
|
|
12
|
-
step(generator["throw"](value));
|
|
13
|
-
}
|
|
14
|
-
catch (e) {
|
|
15
|
-
reject(e);
|
|
16
|
-
} }
|
|
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); } }
|
|
17
7
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
9
|
});
|
|
20
10
|
};
|
|
21
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.getResponseBody =
|
|
12
|
+
exports.getResponseBody = void 0;
|
|
23
13
|
const chooseStreamWrapper_1 = require("./stream-wrappers/chooseStreamWrapper");
|
|
24
14
|
function getResponseBody(response, responseType) {
|
|
25
15
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -62,3 +52,4 @@ function getResponseBody(response, responseType) {
|
|
|
62
52
|
}
|
|
63
53
|
});
|
|
64
54
|
}
|
|
55
|
+
exports.getResponseBody = getResponseBody;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
import Fetcher_1 = require("./Fetcher");
|
|
8
|
-
import getHeader_1 = require("./getHeader");
|
|
9
|
-
import Supplier_1 = require("./Supplier");
|
|
1
|
+
export type { APIResponse } from "./APIResponse";
|
|
2
|
+
export { fetcher } from "./Fetcher";
|
|
3
|
+
export type { Fetcher, FetchFunction } from "./Fetcher";
|
|
4
|
+
export { getHeader } from "./getHeader";
|
|
5
|
+
export { Supplier } from "./Supplier";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export function makeRequest(fetchFn: any, url: any, method: any, headers: any, requestBody: any, timeoutMs: any, abortSignal: any, withCredentials: any, duplex: any): any;
|
|
1
|
+
export declare const makeRequest: (fetchFn: (url: string, init: RequestInit) => Promise<Response>, url: string, method: string, headers: Record<string, string>, requestBody: BodyInit | undefined, timeoutMs?: number | undefined, abortSignal?: AbortSignal | undefined, withCredentials?: boolean | undefined, duplex?: "half" | undefined) => Promise<Response>;
|
|
@@ -2,18 +2,8 @@
|
|
|
2
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try {
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
catch (e) {
|
|
9
|
-
reject(e);
|
|
10
|
-
} }
|
|
11
|
-
function rejected(value) { try {
|
|
12
|
-
step(generator["throw"](value));
|
|
13
|
-
}
|
|
14
|
-
catch (e) {
|
|
15
|
-
reject(e);
|
|
16
|
-
} }
|
|
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); } }
|
|
17
7
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
9
|
});
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export function requestWithRetries(requestFn_1: any, ...args: any[]): any;
|
|
1
|
+
export declare function requestWithRetries(requestFn: () => Promise<Response>, maxRetries?: number): Promise<Response>;
|
|
@@ -2,24 +2,14 @@
|
|
|
2
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try {
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
catch (e) {
|
|
9
|
-
reject(e);
|
|
10
|
-
} }
|
|
11
|
-
function rejected(value) { try {
|
|
12
|
-
step(generator["throw"](value));
|
|
13
|
-
}
|
|
14
|
-
catch (e) {
|
|
15
|
-
reject(e);
|
|
16
|
-
} }
|
|
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); } }
|
|
17
7
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
9
|
});
|
|
20
10
|
};
|
|
21
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.requestWithRetries =
|
|
12
|
+
exports.requestWithRetries = void 0;
|
|
23
13
|
const INITIAL_RETRY_DELAY = 1000; // in milliseconds
|
|
24
14
|
const MAX_RETRY_DELAY = 60000; // in milliseconds
|
|
25
15
|
const DEFAULT_MAX_RETRIES = 2;
|
|
@@ -29,8 +19,8 @@ function addJitter(delay) {
|
|
|
29
19
|
const jitterMultiplier = 1 + (Math.random() * 2 - 1) * JITTER_FACTOR;
|
|
30
20
|
return delay * jitterMultiplier;
|
|
31
21
|
}
|
|
32
|
-
function requestWithRetries(
|
|
33
|
-
return __awaiter(this,
|
|
22
|
+
function requestWithRetries(requestFn, maxRetries = DEFAULT_MAX_RETRIES) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
24
|
let response = yield requestFn();
|
|
35
25
|
for (let i = 0; i < maxRetries; ++i) {
|
|
36
26
|
if ([408, 429].includes(response.status) || response.status >= 500) {
|
|
@@ -48,3 +38,4 @@ function requestWithRetries(requestFn_1) {
|
|
|
48
38
|
return response;
|
|
49
39
|
});
|
|
50
40
|
}
|
|
41
|
+
exports.requestWithRetries = requestWithRetries;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export function getTimeoutSignal(timeoutMs:
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
export declare function getTimeoutSignal(timeoutMs: number): {
|
|
3
3
|
signal: AbortSignal;
|
|
4
4
|
abortId: NodeJS.Timeout;
|
|
5
5
|
};
|
|
@@ -9,4 +9,4 @@ export function getTimeoutSignal(timeoutMs: any): {
|
|
|
9
9
|
*
|
|
10
10
|
* Requires at least node.js 18.
|
|
11
11
|
*/
|
|
12
|
-
export function anySignal(...args:
|
|
12
|
+
export declare function anySignal(...args: AbortSignal[] | [AbortSignal[]]): AbortSignal;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getTimeoutSignal =
|
|
4
|
-
exports.anySignal = anySignal;
|
|
3
|
+
exports.anySignal = exports.getTimeoutSignal = void 0;
|
|
5
4
|
const TIMEOUT = "timeout";
|
|
6
5
|
function getTimeoutSignal(timeoutMs) {
|
|
7
6
|
const controller = new AbortController();
|
|
8
7
|
const abortId = setTimeout(() => controller.abort(TIMEOUT), timeoutMs);
|
|
9
8
|
return { signal: controller.signal, abortId };
|
|
10
9
|
}
|
|
10
|
+
exports.getTimeoutSignal = getTimeoutSignal;
|
|
11
11
|
/**
|
|
12
12
|
* Returns an abort signal that is getting aborted when
|
|
13
13
|
* at least one of the specified abort signals is aborted.
|
|
@@ -34,3 +34,4 @@ function anySignal(...args) {
|
|
|
34
34
|
}
|
|
35
35
|
return controller.signal;
|
|
36
36
|
}
|
|
37
|
+
exports.anySignal = anySignal;
|
|
@@ -1,40 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
readableStream
|
|
5
|
-
reader
|
|
6
|
-
events
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
encoding: any;
|
|
18
|
-
on(event: any, callback: any): void;
|
|
19
|
-
off(event: any, callback: any): void;
|
|
20
|
-
pipe(dest: any): any;
|
|
21
|
-
pipeTo(dest: any): any;
|
|
22
|
-
unpipe(dest: any): void;
|
|
23
|
-
destroy(error: any): void;
|
|
1
|
+
import type { Writable } from "readable-stream";
|
|
2
|
+
import { EventCallback, StreamWrapper } from "./chooseStreamWrapper";
|
|
3
|
+
export declare class Node18UniversalStreamWrapper<ReadFormat extends Uint8Array | Uint16Array | Uint32Array> implements StreamWrapper<Node18UniversalStreamWrapper<ReadFormat> | Writable | WritableStream<ReadFormat>, ReadFormat> {
|
|
4
|
+
private readableStream;
|
|
5
|
+
private reader;
|
|
6
|
+
private events;
|
|
7
|
+
private paused;
|
|
8
|
+
private resumeCallback;
|
|
9
|
+
private encoding;
|
|
10
|
+
constructor(readableStream: ReadableStream<ReadFormat>);
|
|
11
|
+
on(event: string, callback: EventCallback): void;
|
|
12
|
+
off(event: string, callback: EventCallback): void;
|
|
13
|
+
pipe(dest: Node18UniversalStreamWrapper<ReadFormat> | Writable | WritableStream<ReadFormat>): Node18UniversalStreamWrapper<ReadFormat> | Writable | WritableStream<ReadFormat>;
|
|
14
|
+
pipeTo(dest: Node18UniversalStreamWrapper<ReadFormat> | Writable | WritableStream<ReadFormat>): Node18UniversalStreamWrapper<ReadFormat> | Writable | WritableStream<ReadFormat>;
|
|
15
|
+
unpipe(dest: Node18UniversalStreamWrapper<ReadFormat> | Writable | WritableStream<ReadFormat>): void;
|
|
16
|
+
destroy(error?: Error): void;
|
|
24
17
|
pause(): void;
|
|
25
18
|
resume(): void;
|
|
26
19
|
get isPaused(): boolean;
|
|
27
|
-
read():
|
|
28
|
-
setEncoding(encoding:
|
|
29
|
-
text():
|
|
30
|
-
json():
|
|
31
|
-
_write
|
|
32
|
-
_end
|
|
33
|
-
_error
|
|
34
|
-
_emit
|
|
35
|
-
_startReading
|
|
36
|
-
[Symbol.asyncIterator]():
|
|
37
|
-
next: () => any;
|
|
38
|
-
[Symbol.asyncIterator](): any;
|
|
39
|
-
};
|
|
20
|
+
read(): Promise<ReadFormat | undefined>;
|
|
21
|
+
setEncoding(encoding: string): void;
|
|
22
|
+
text(): Promise<string>;
|
|
23
|
+
json<T>(): Promise<T>;
|
|
24
|
+
private _write;
|
|
25
|
+
private _end;
|
|
26
|
+
private _error;
|
|
27
|
+
private _emit;
|
|
28
|
+
private _startReading;
|
|
29
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<ReadFormat>;
|
|
40
30
|
}
|
|
@@ -2,18 +2,8 @@
|
|
|
2
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try {
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
catch (e) {
|
|
9
|
-
reject(e);
|
|
10
|
-
} }
|
|
11
|
-
function rejected(value) { try {
|
|
12
|
-
step(generator["throw"](value));
|
|
13
|
-
}
|
|
14
|
-
catch (e) {
|
|
15
|
-
reject(e);
|
|
16
|
-
} }
|
|
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); } }
|
|
17
7
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
9
|
});
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type { Readable, Writable } from "readable-stream";
|
|
3
|
+
import { EventCallback, StreamWrapper } from "./chooseStreamWrapper";
|
|
4
|
+
export declare class NodePre18StreamWrapper implements StreamWrapper<Writable, Buffer> {
|
|
5
|
+
private readableStream;
|
|
6
|
+
private encoding;
|
|
7
|
+
constructor(readableStream: Readable);
|
|
8
|
+
on(event: string, callback: EventCallback): void;
|
|
9
|
+
off(event: string, callback: EventCallback): void;
|
|
10
|
+
pipe(dest: Writable): Writable;
|
|
11
|
+
pipeTo(dest: Writable): Writable;
|
|
12
|
+
unpipe(dest?: Writable): void;
|
|
13
|
+
destroy(error?: Error): void;
|
|
11
14
|
pause(): void;
|
|
12
15
|
resume(): void;
|
|
13
|
-
get isPaused():
|
|
14
|
-
read():
|
|
15
|
-
setEncoding(encoding
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
[Symbol.asyncIterator](): {
|
|
20
|
-
next(): any;
|
|
21
|
-
[Symbol.asyncIterator](): any;
|
|
22
|
-
};
|
|
16
|
+
get isPaused(): boolean;
|
|
17
|
+
read(): Promise<Buffer | undefined>;
|
|
18
|
+
setEncoding(encoding?: string): void;
|
|
19
|
+
text(): Promise<string>;
|
|
20
|
+
json<T>(): Promise<T>;
|
|
21
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<Buffer>;
|
|
23
22
|
}
|
|
@@ -2,29 +2,18 @@
|
|
|
2
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try {
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
catch (e) {
|
|
9
|
-
reject(e);
|
|
10
|
-
} }
|
|
11
|
-
function rejected(value) { try {
|
|
12
|
-
step(generator["throw"](value));
|
|
13
|
-
}
|
|
14
|
-
catch (e) {
|
|
15
|
-
reject(e);
|
|
16
|
-
} }
|
|
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); } }
|
|
17
7
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
9
|
});
|
|
20
10
|
};
|
|
21
11
|
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
22
|
-
if (!Symbol.asyncIterator)
|
|
23
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
12
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
24
13
|
var m = o[Symbol.asyncIterator], i;
|
|
25
14
|
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
26
15
|
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
27
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function
|
|
16
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
28
17
|
};
|
|
29
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
19
|
exports.NodePre18StreamWrapper = void 0;
|
|
@@ -87,31 +76,23 @@ class NodePre18StreamWrapper {
|
|
|
87
76
|
this.encoding = encoding;
|
|
88
77
|
}
|
|
89
78
|
text() {
|
|
79
|
+
var e_1, _a;
|
|
90
80
|
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
-
var _a, e_1, _b, _c;
|
|
92
81
|
const chunks = [];
|
|
93
82
|
const encoder = new TextEncoder();
|
|
94
83
|
this.readableStream.setEncoding((this.encoding || "utf-8"));
|
|
95
84
|
try {
|
|
96
|
-
for (var
|
|
97
|
-
|
|
98
|
-
_d = false;
|
|
99
|
-
const chunk = _c;
|
|
85
|
+
for (var _b = __asyncValues(this.readableStream), _c; _c = yield _b.next(), !_c.done;) {
|
|
86
|
+
const chunk = _c.value;
|
|
100
87
|
chunks.push(encoder.encode(chunk));
|
|
101
88
|
}
|
|
102
89
|
}
|
|
103
|
-
catch (e_1_1) {
|
|
104
|
-
e_1 = { error: e_1_1 };
|
|
105
|
-
}
|
|
90
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
106
91
|
finally {
|
|
107
92
|
try {
|
|
108
|
-
if (
|
|
109
|
-
yield _b.call(_e);
|
|
110
|
-
}
|
|
111
|
-
finally {
|
|
112
|
-
if (e_1)
|
|
113
|
-
throw e_1.error;
|
|
93
|
+
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
|
114
94
|
}
|
|
95
|
+
finally { if (e_1) throw e_1.error; }
|
|
115
96
|
}
|
|
116
97
|
const decoder = new TextDecoder(this.encoding || "utf-8");
|
|
117
98
|
return decoder.decode(Buffer.concat(chunks));
|
|
@@ -1,40 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
readableStream
|
|
5
|
-
reader
|
|
6
|
-
events
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
encoding: any;
|
|
18
|
-
on(event: any, callback: any): void;
|
|
19
|
-
off(event: any, callback: any): void;
|
|
20
|
-
pipe(dest: any): any;
|
|
21
|
-
pipeTo(dest: any): any;
|
|
22
|
-
unpipe(dest: any): void;
|
|
23
|
-
destroy(error: any): void;
|
|
1
|
+
import { StreamWrapper } from "./chooseStreamWrapper";
|
|
2
|
+
declare type EventCallback = (data?: any) => void;
|
|
3
|
+
export declare class UndiciStreamWrapper<ReadFormat extends Uint8Array | Uint16Array | Uint32Array> implements StreamWrapper<UndiciStreamWrapper<ReadFormat> | WritableStream<ReadFormat>, ReadFormat> {
|
|
4
|
+
private readableStream;
|
|
5
|
+
private reader;
|
|
6
|
+
private events;
|
|
7
|
+
private paused;
|
|
8
|
+
private resumeCallback;
|
|
9
|
+
private encoding;
|
|
10
|
+
constructor(readableStream: ReadableStream<ReadFormat>);
|
|
11
|
+
on(event: string, callback: EventCallback): void;
|
|
12
|
+
off(event: string, callback: EventCallback): void;
|
|
13
|
+
pipe(dest: UndiciStreamWrapper<ReadFormat> | WritableStream<ReadFormat>): UndiciStreamWrapper<ReadFormat> | WritableStream<ReadFormat>;
|
|
14
|
+
pipeTo(dest: UndiciStreamWrapper<ReadFormat> | WritableStream<ReadFormat>): UndiciStreamWrapper<ReadFormat> | WritableStream<ReadFormat>;
|
|
15
|
+
unpipe(dest: UndiciStreamWrapper<ReadFormat> | WritableStream): void;
|
|
16
|
+
destroy(error?: Error): void;
|
|
24
17
|
pause(): void;
|
|
25
18
|
resume(): void;
|
|
26
19
|
get isPaused(): boolean;
|
|
27
|
-
read():
|
|
28
|
-
setEncoding(encoding:
|
|
29
|
-
text():
|
|
30
|
-
json():
|
|
31
|
-
_write
|
|
32
|
-
_end
|
|
33
|
-
_error
|
|
34
|
-
_emit
|
|
35
|
-
_startReading
|
|
36
|
-
[Symbol.asyncIterator]():
|
|
37
|
-
next: () => any;
|
|
38
|
-
[Symbol.asyncIterator](): any;
|
|
39
|
-
};
|
|
20
|
+
read(): Promise<ReadFormat | undefined>;
|
|
21
|
+
setEncoding(encoding: string): void;
|
|
22
|
+
text(): Promise<string>;
|
|
23
|
+
json<T>(): Promise<T>;
|
|
24
|
+
private _write;
|
|
25
|
+
private _end;
|
|
26
|
+
private _error;
|
|
27
|
+
private _emit;
|
|
28
|
+
private _startReading;
|
|
29
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<ReadFormat>;
|
|
40
30
|
}
|
|
31
|
+
export {};
|
|
@@ -2,18 +2,8 @@
|
|
|
2
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try {
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
catch (e) {
|
|
9
|
-
reject(e);
|
|
10
|
-
} }
|
|
11
|
-
function rejected(value) { try {
|
|
12
|
-
step(generator["throw"](value));
|
|
13
|
-
}
|
|
14
|
-
catch (e) {
|
|
15
|
-
reject(e);
|
|
16
|
-
} }
|
|
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); } }
|
|
17
7
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
9
|
});
|
|
@@ -1,2 +1,18 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export declare type EventCallback = (data?: any) => void;
|
|
2
|
+
export interface StreamWrapper<WritableStream, ReadFormat> {
|
|
3
|
+
setEncoding(encoding?: string): void;
|
|
4
|
+
on(event: string, callback: EventCallback): void;
|
|
5
|
+
off(event: string, callback: EventCallback): void;
|
|
6
|
+
pipe(dest: WritableStream): WritableStream;
|
|
7
|
+
pipeTo(dest: WritableStream): WritableStream;
|
|
8
|
+
unpipe(dest?: WritableStream): void;
|
|
9
|
+
destroy(error?: Error): void;
|
|
10
|
+
pause(): void;
|
|
11
|
+
resume(): void;
|
|
12
|
+
get isPaused(): boolean;
|
|
13
|
+
read(): Promise<ReadFormat | undefined>;
|
|
14
|
+
text(): Promise<string>;
|
|
15
|
+
json<T>(): Promise<T>;
|
|
16
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<ReadFormat>;
|
|
17
|
+
}
|
|
18
|
+
export declare function chooseStreamWrapper(responseBody: any): Promise<Promise<StreamWrapper<any, any>>>;
|