@rulebricks/sdk 1.0.0 → 1.1.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/README.md +2 -2
- package/api/errors/BadRequestError.js +24 -12
- package/api/errors/ForbiddenError.js +24 -12
- package/api/errors/InternalServerError.js +24 -12
- package/api/errors/NotFoundError.js +24 -12
- package/api/resources/assets/client/Client.d.ts +53 -18
- package/api/resources/assets/client/Client.js +147 -95
- package/api/resources/assets/index.js +0 -1
- package/api/resources/decisions/client/Client.d.ts +7 -2
- package/api/resources/decisions/client/Client.js +45 -23
- package/api/resources/decisions/index.js +0 -1
- package/api/resources/flows/client/Client.d.ts +8 -2
- package/api/resources/flows/client/Client.js +47 -24
- package/api/resources/index.d.ts +3 -3
- package/api/resources/index.js +27 -19
- package/api/resources/rules/client/Client.d.ts +23 -14
- package/api/resources/rules/client/Client.js +75 -51
- package/api/resources/tests/client/Client.d.ts +41 -12
- package/api/resources/tests/client/Client.js +110 -64
- package/api/resources/tests/client/index.js +0 -19
- package/api/resources/tests/index.js +0 -1
- package/api/resources/users/client/Client.d.ts +22 -24
- package/api/resources/users/client/Client.js +74 -59
- package/api/resources/users/types/UserInviteRequestRole.d.ts +7 -0
- package/api/resources/users/types/{InviteRequestRole.js → UserInviteRequestRole.js} +4 -2
- package/api/resources/users/types/index.js +1 -4
- package/api/resources/values/client/Client.d.ts +27 -6
- package/api/resources/values/client/Client.js +80 -42
- package/api/resources/values/types/index.js +1 -9
- package/{dist/api/resources/values/types/ListDynamicValuesResponseItemType.d.ts → api/types/SchemaFieldType.d.ts} +3 -2
- package/api/{resources/values/types/UpdateResponseItemType.js → types/SchemaFieldType.js} +4 -3
- package/api/types/index.js +47 -4
- package/core/fetcher/Fetcher.d.ts +1 -1
- package/core/fetcher/Fetcher.js +30 -81
- package/core/fetcher/createRequestUrl.d.ts +2 -0
- package/core/fetcher/createRequestUrl.js +12 -0
- package/core/fetcher/getFetchFn.d.ts +5 -0
- package/core/fetcher/getFetchFn.js +86 -0
- package/core/fetcher/getHeader.js +1 -2
- package/core/fetcher/getRequestBody.d.ts +2 -0
- package/core/fetcher/getRequestBody.js +33 -0
- package/core/fetcher/getResponseBody.d.ts +2 -0
- package/core/fetcher/getResponseBody.js +64 -0
- package/core/fetcher/makeRequest.d.ts +2 -0
- package/core/fetcher/makeRequest.js +52 -0
- package/core/fetcher/requestWithRetries.d.ts +2 -0
- package/core/fetcher/requestWithRetries.js +50 -0
- package/core/fetcher/signals.d.ts +12 -0
- package/core/fetcher/signals.js +36 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +40 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +257 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +23 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +143 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +40 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +239 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +2 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +77 -0
- package/core/index.js +24 -11
- package/core/json.d.ts +16 -0
- package/core/json.js +24 -0
- package/core/runtime/index.d.ts +3 -0
- package/core/runtime/index.js +5 -0
- package/core/runtime/runtime.d.ts +14 -0
- package/core/runtime/runtime.js +103 -0
- package/core/schemas/Schema.d.ts +3 -0
- package/core/schemas/Schema.js +3 -0
- package/core/schemas/builders/bigint/bigint.d.ts +4 -0
- package/core/schemas/builders/bigint/bigint.js +53 -0
- package/core/schemas/builders/bigint/index.d.ts +3 -0
- package/core/schemas/builders/bigint/index.js +5 -0
- package/core/schemas/builders/date/date.js +1 -2
- package/core/schemas/builders/enum/enum.js +1 -2
- package/core/schemas/builders/index.js +1 -0
- package/core/schemas/builders/lazy/lazy.js +11 -33
- package/core/schemas/builders/lazy/lazyObject.js +2 -22
- package/core/schemas/builders/list/list.js +32 -56
- package/core/schemas/builders/literals/booleanLiteral.js +1 -2
- package/core/schemas/builders/literals/stringLiteral.js +1 -2
- package/core/schemas/builders/object/object.d.ts +48 -7
- package/core/schemas/builders/object/object.js +132 -139
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
- package/core/schemas/builders/object/property.js +2 -3
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +5 -25
- package/core/schemas/builders/record/record.d.ts +2 -5
- package/core/schemas/builders/record/record.js +49 -72
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +86 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +85 -35
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
- package/core/schemas/builders/set/set.d.ts +2 -5
- package/core/schemas/builders/set/set.js +7 -27
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +22 -44
- package/core/schemas/builders/union/discriminant.js +1 -2
- package/core/schemas/builders/union/union.js +52 -74
- package/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
- package/core/schemas/utils/entries.js +1 -2
- package/core/schemas/utils/filterObject.js +1 -2
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +5 -2
- package/core/schemas/utils/isPlainObject.js +1 -2
- package/core/schemas/utils/keys.js +1 -2
- package/core/schemas/utils/maybeSkipValidation.js +4 -24
- package/core/schemas/utils/partition.js +1 -2
- package/dist/api/errors/BadRequestError.js +24 -12
- package/dist/api/errors/ForbiddenError.js +24 -12
- package/dist/api/errors/InternalServerError.js +24 -12
- package/dist/api/errors/NotFoundError.js +24 -12
- package/dist/api/resources/assets/client/Client.d.ts +53 -18
- package/dist/api/resources/assets/client/Client.js +147 -95
- package/dist/api/resources/assets/index.js +0 -1
- package/dist/api/resources/decisions/client/Client.d.ts +7 -2
- package/dist/api/resources/decisions/client/Client.js +45 -23
- package/dist/api/resources/decisions/index.js +0 -1
- package/dist/api/resources/flows/client/Client.d.ts +8 -2
- package/dist/api/resources/flows/client/Client.js +47 -24
- package/dist/api/resources/index.d.ts +3 -3
- package/dist/api/resources/index.js +27 -19
- package/dist/api/resources/rules/client/Client.d.ts +23 -14
- package/dist/api/resources/rules/client/Client.js +75 -51
- package/dist/api/resources/tests/client/Client.d.ts +41 -12
- package/dist/api/resources/tests/client/Client.js +110 -64
- package/dist/api/resources/tests/client/index.js +0 -19
- package/dist/api/resources/tests/index.js +0 -1
- package/dist/api/resources/users/client/Client.d.ts +22 -24
- package/dist/api/resources/users/client/Client.js +74 -59
- package/dist/api/resources/users/types/UserInviteRequestRole.d.ts +7 -0
- package/dist/api/resources/users/types/{InviteRequestRole.js → UserInviteRequestRole.js} +4 -2
- package/dist/api/resources/users/types/index.js +1 -4
- package/dist/api/resources/values/client/Client.d.ts +27 -6
- package/dist/api/resources/values/client/Client.js +80 -42
- package/dist/api/resources/values/types/index.js +1 -9
- package/dist/api/types/DynamicValueBase.js +5 -0
- package/dist/api/types/DynamicValueListResponse.js +5 -0
- package/dist/api/types/Error_.js +5 -0
- package/dist/api/types/FlowBase.js +5 -0
- package/dist/api/types/FlowDetail.js +5 -0
- package/dist/api/types/FlowExecutionError.js +5 -0
- package/dist/api/types/FlowListResponse.js +5 -0
- package/dist/api/types/Folder.js +5 -0
- package/dist/api/types/FolderListResponse.js +5 -0
- package/dist/api/types/ListValue.js +5 -0
- package/dist/api/types/NumberValue.js +5 -0
- package/dist/api/types/ParallelSolveRequest.js +5 -0
- package/dist/api/types/ParallelSolveRequestValue.js +5 -0
- package/dist/api/types/ParallelSolveResponse.js +5 -0
- package/dist/api/types/RuleBase.js +5 -0
- package/dist/api/types/RuleDetail.js +5 -0
- package/dist/api/types/RuleExport.js +5 -0
- package/dist/api/types/RuleListResponse.js +5 -0
- package/dist/api/types/RuleUsage.js +5 -0
- package/dist/api/types/SchemaField.js +5 -0
- package/dist/api/types/SchemaFieldDefaultValue.d.ts +1 -0
- package/dist/api/types/SchemaFieldDefaultValue.js +5 -0
- package/{api/resources/values/types/ListDynamicValuesResponseItemType.d.ts → dist/api/types/SchemaFieldType.d.ts} +3 -2
- package/dist/api/{resources/values/types/UpdateResponseItemType.js → types/SchemaFieldType.js} +4 -3
- package/dist/api/types/StringValue.d.ts +1 -0
- package/dist/api/types/StringValue.js +5 -0
- package/dist/api/types/SuccessMessage.d.ts +1 -0
- package/dist/api/types/SuccessMessage.js +5 -0
- package/dist/api/types/Test.d.ts +1 -0
- package/dist/api/types/Test.js +5 -0
- package/dist/api/types/TestListResponse.d.ts +1 -0
- package/dist/api/types/TestListResponse.js +5 -0
- package/dist/api/types/TestTestState.d.ts +1 -0
- package/dist/api/types/TestTestState.js +5 -0
- package/dist/api/types/TestTestStateConditionsItemValue.d.ts +1 -0
- package/dist/api/types/TestTestStateConditionsItemValue.js +5 -0
- package/dist/api/types/TestTestStateEvaluationError.d.ts +1 -0
- package/dist/api/types/TestTestStateEvaluationError.js +5 -0
- package/dist/api/types/UsageStatistics.d.ts +1 -0
- package/dist/api/types/UsageStatistics.js +5 -0
- package/dist/api/types/UserGroup.d.ts +1 -0
- package/dist/api/types/UserGroup.js +5 -0
- package/dist/api/types/UserGroupListResponse.d.ts +1 -0
- package/dist/api/types/UserGroupListResponse.js +5 -0
- package/dist/api/types/UserInviteResponse.d.ts +1 -0
- package/dist/api/types/UserInviteResponse.js +5 -0
- package/dist/api/types/UserInviteResponseUser.d.ts +1 -0
- package/dist/api/types/UserInviteResponseUser.js +5 -0
- package/dist/api/types/ValueLimits.d.ts +1 -0
- package/dist/api/types/ValueLimits.js +5 -0
- package/dist/api/types/index.js +47 -4
- package/dist/core/fetcher/Fetcher.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.js +30 -81
- package/dist/core/fetcher/createRequestUrl.d.ts +2 -0
- package/dist/core/fetcher/createRequestUrl.js +12 -0
- package/dist/core/fetcher/getFetchFn.d.ts +5 -0
- package/dist/core/fetcher/getFetchFn.js +86 -0
- package/dist/core/fetcher/getHeader.js +1 -2
- package/dist/core/fetcher/getRequestBody.d.ts +2 -0
- package/dist/core/fetcher/getRequestBody.js +33 -0
- package/dist/core/fetcher/getResponseBody.d.ts +2 -0
- package/dist/core/fetcher/getResponseBody.js +64 -0
- package/dist/core/fetcher/makeRequest.d.ts +2 -0
- package/dist/core/fetcher/makeRequest.js +52 -0
- package/dist/core/fetcher/requestWithRetries.d.ts +2 -0
- package/dist/core/fetcher/requestWithRetries.js +50 -0
- package/dist/core/fetcher/signals.d.ts +12 -0
- package/dist/core/fetcher/signals.js +36 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +40 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +257 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +23 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +143 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +40 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +239 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +2 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +77 -0
- package/dist/core/index.js +24 -11
- package/dist/core/json.d.ts +16 -0
- package/dist/core/json.js +24 -0
- package/dist/core/runtime/index.d.ts +3 -0
- package/dist/core/runtime/index.js +5 -0
- package/dist/core/runtime/runtime.d.ts +14 -0
- package/dist/core/runtime/runtime.js +103 -0
- package/dist/core/schemas/Schema.d.ts +3 -0
- package/dist/core/schemas/Schema.js +3 -0
- package/dist/core/schemas/builders/bigint/bigint.d.ts +4 -0
- package/dist/core/schemas/builders/bigint/bigint.js +53 -0
- package/dist/core/schemas/builders/bigint/index.d.ts +3 -0
- package/dist/core/schemas/builders/bigint/index.js +5 -0
- package/dist/core/schemas/builders/date/date.js +1 -2
- package/dist/core/schemas/builders/enum/enum.js +1 -2
- package/dist/core/schemas/builders/index.js +1 -0
- package/dist/core/schemas/builders/lazy/lazy.js +11 -33
- package/dist/core/schemas/builders/lazy/lazyObject.js +2 -22
- package/dist/core/schemas/builders/list/list.js +32 -56
- package/dist/core/schemas/builders/literals/booleanLiteral.js +1 -2
- package/dist/core/schemas/builders/literals/stringLiteral.js +1 -2
- package/dist/core/schemas/builders/object/object.d.ts +48 -7
- package/dist/core/schemas/builders/object/object.js +132 -139
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
- package/dist/core/schemas/builders/object/property.js +2 -3
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +5 -25
- package/dist/core/schemas/builders/record/record.d.ts +2 -5
- package/dist/core/schemas/builders/record/record.js +49 -72
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +86 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +85 -35
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
- package/dist/core/schemas/builders/set/set.d.ts +2 -5
- package/dist/core/schemas/builders/set/set.js +7 -27
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +22 -44
- package/dist/core/schemas/builders/union/discriminant.js +1 -2
- package/dist/core/schemas/builders/union/union.js +52 -74
- package/dist/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
- package/dist/core/schemas/utils/entries.js +1 -2
- package/dist/core/schemas/utils/filterObject.js +1 -2
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +5 -2
- package/dist/core/schemas/utils/isPlainObject.js +1 -2
- package/dist/core/schemas/utils/keys.js +1 -2
- package/dist/core/schemas/utils/maybeSkipValidation.js +4 -24
- package/dist/core/schemas/utils/partition.js +1 -2
- package/dist/errors/RulebricksApiError.js +2 -1
- package/dist/errors/RulebricksApiTimeoutError.d.ts +1 -1
- package/dist/errors/RulebricksApiTimeoutError.js +2 -2
- package/dist/index.d.ts +8 -8
- package/dist/index.js +32 -16
- package/dist/serialization/resources/assets/client/index.d.ts +0 -5
- package/dist/serialization/resources/assets/client/index.js +0 -22
- package/dist/serialization/resources/assets/client/requests/DeleteFolderRequest.js +23 -11
- package/dist/serialization/resources/assets/client/requests/DeleteRuleRequest.js +24 -12
- package/dist/serialization/resources/assets/client/requests/ImportRuleRequest.js +23 -11
- package/dist/serialization/resources/assets/client/requests/UpsertFolderRequest.js +23 -11
- package/dist/serialization/resources/assets/index.js +0 -1
- package/dist/serialization/resources/index.d.ts +1 -4
- package/dist/serialization/resources/index.js +26 -20
- package/dist/serialization/resources/rules/client/bulkSolve.js +27 -13
- package/dist/serialization/resources/rules/client/index.d.ts +0 -2
- package/dist/serialization/resources/rules/client/index.js +24 -14
- package/dist/serialization/resources/users/client/index.d.ts +0 -1
- package/dist/serialization/resources/users/client/index.js +0 -18
- package/dist/serialization/resources/users/client/requests/CreateUserGroupRequest.d.ts +2 -0
- package/{serialization/resources/users/client/requests/CreateGroupRequest.js → dist/serialization/resources/users/client/requests/CreateUserGroupRequest.js} +25 -13
- package/dist/serialization/resources/users/client/requests/UserInviteRequest.d.ts +2 -0
- package/dist/serialization/resources/users/client/requests/UserInviteRequest.js +54 -0
- package/dist/serialization/resources/users/client/requests/index.d.ts +4 -4
- package/dist/serialization/resources/users/client/requests/index.js +5 -5
- package/dist/serialization/resources/users/types/UserInviteRequestRole.d.ts +2 -0
- package/dist/serialization/resources/{assets/types/DeleteRuleResponse.js → users/types/UserInviteRequestRole.js} +25 -15
- package/dist/serialization/resources/users/types/index.js +1 -4
- package/dist/serialization/resources/values/client/index.d.ts +0 -2
- package/dist/serialization/resources/values/client/index.js +5 -18
- package/dist/serialization/resources/values/client/requests/UpdateValuesRequest.d.ts +2 -0
- package/dist/serialization/resources/values/client/requests/UpdateValuesRequest.js +53 -0
- package/dist/serialization/resources/values/client/requests/index.d.ts +3 -0
- package/dist/serialization/resources/values/client/requests/index.js +5 -0
- package/dist/serialization/resources/values/types/UpdateValuesRequestValuesValue.d.ts +2 -0
- package/{serialization/resources/values/types/ListDynamicValuesResponseItemValue.js → dist/serialization/resources/values/types/UpdateValuesRequestValuesValue.js} +26 -14
- package/dist/serialization/resources/values/types/index.js +1 -9
- package/dist/serialization/types/BooleanValue.d.ts +2 -0
- package/dist/serialization/types/BooleanValue.js +54 -0
- package/dist/serialization/types/BulkRuleResponseItem.d.ts +2 -0
- package/dist/serialization/types/BulkRuleResponseItem.js +51 -0
- package/dist/serialization/types/BulkRuleResponseItemError.d.ts +2 -0
- package/dist/serialization/types/{ForbiddenErrorBody.js → BulkRuleResponseItemError.js} +25 -13
- package/dist/serialization/types/CreateTestRequest.d.ts +2 -0
- package/dist/serialization/{resources/tests/client/requests/CreateFlowTestRequest.js → types/CreateTestRequest.js} +26 -14
- package/dist/serialization/types/DecisionLog.d.ts +2 -0
- package/dist/serialization/types/DecisionLog.js +56 -0
- package/dist/serialization/types/DecisionLogDecision.d.ts +2 -0
- package/dist/serialization/types/DecisionLogDecision.js +55 -0
- package/dist/serialization/types/DecisionLogDecisionConditionsItemValue.d.ts +2 -0
- package/dist/serialization/types/DecisionLogDecisionConditionsItemValue.js +52 -0
- package/dist/serialization/types/DecisionLogRequest.d.ts +2 -0
- package/dist/serialization/types/DecisionLogRequest.js +58 -0
- package/dist/serialization/types/DecisionLogResponse.d.ts +2 -0
- package/dist/serialization/types/DecisionLogResponse.js +53 -0
- package/dist/serialization/types/DynamicRequestPayload.d.ts +2 -0
- package/dist/serialization/types/DynamicRequestPayload.js +49 -0
- package/dist/serialization/types/DynamicResponsePayload.d.ts +2 -0
- package/dist/serialization/types/DynamicResponsePayload.js +49 -0
- package/dist/serialization/types/DynamicValue.d.ts +2 -0
- package/dist/serialization/types/DynamicValue.js +63 -0
- package/dist/serialization/types/DynamicValueBase.d.ts +2 -0
- package/dist/serialization/types/DynamicValueBase.js +55 -0
- package/dist/serialization/types/DynamicValueListResponse.d.ts +2 -0
- package/dist/serialization/types/DynamicValueListResponse.js +50 -0
- package/dist/serialization/types/Error_.d.ts +2 -0
- package/dist/serialization/types/{NotFoundErrorBody.js → Error_.js} +25 -13
- package/dist/serialization/types/FlowBase.d.ts +2 -0
- package/{serialization/resources/assets/types/ListFlowsResponseItem.js → dist/serialization/types/FlowBase.js} +26 -16
- package/dist/serialization/types/FlowDetail.d.ts +2 -0
- package/dist/serialization/types/FlowDetail.js +55 -0
- package/dist/serialization/types/FlowExecutionError.d.ts +2 -0
- package/dist/serialization/types/FlowExecutionError.js +53 -0
- package/dist/serialization/types/FlowListResponse.d.ts +2 -0
- package/dist/serialization/types/FlowListResponse.js +50 -0
- package/dist/serialization/types/Folder.d.ts +2 -0
- package/dist/serialization/{resources/assets/types/DeleteFolderResponse.js → types/Folder.js} +26 -14
- package/dist/serialization/types/FolderListResponse.d.ts +2 -0
- package/dist/serialization/types/FolderListResponse.js +50 -0
- package/dist/serialization/types/ListValue.d.ts +2 -0
- package/dist/serialization/types/ListValue.js +54 -0
- package/dist/serialization/types/NumberValue.d.ts +2 -0
- package/dist/serialization/types/NumberValue.js +54 -0
- package/dist/serialization/types/ParallelSolveRequest.d.ts +2 -0
- package/dist/serialization/types/ParallelSolveRequest.js +50 -0
- package/dist/serialization/types/ParallelSolveRequestValue.d.ts +2 -0
- package/dist/serialization/types/ParallelSolveRequestValue.js +54 -0
- package/dist/serialization/types/ParallelSolveResponse.d.ts +2 -0
- package/dist/serialization/types/ParallelSolveResponse.js +50 -0
- package/dist/serialization/types/RuleBase.d.ts +2 -0
- package/{serialization/resources/values/types/ListDynamicValuesResponseItemUsagesItem.js → dist/serialization/types/RuleBase.js} +26 -16
- package/dist/serialization/types/RuleDetail.d.ts +2 -0
- package/dist/serialization/types/RuleDetail.js +59 -0
- package/dist/serialization/types/RuleExport.d.ts +2 -0
- package/dist/serialization/types/RuleExport.js +49 -0
- package/dist/serialization/types/RuleListResponse.d.ts +2 -0
- package/dist/serialization/types/RuleListResponse.js +50 -0
- package/dist/serialization/types/RuleUsage.d.ts +2 -0
- package/dist/serialization/{resources/values/types/ListDynamicValuesResponseItemUsagesItem.js → types/RuleUsage.js} +28 -16
- package/dist/serialization/types/SchemaField.d.ts +2 -0
- package/dist/serialization/types/SchemaField.js +60 -0
- package/dist/serialization/types/SchemaFieldDefaultValue.d.ts +2 -0
- package/{serialization/resources/values/types/UpdateResponseItemValue.js → dist/serialization/types/SchemaFieldDefaultValue.js} +27 -14
- package/dist/serialization/types/SchemaFieldType.d.ts +2 -0
- package/dist/serialization/types/SchemaFieldType.js +49 -0
- package/dist/serialization/types/StringValue.d.ts +2 -0
- package/dist/serialization/types/StringValue.js +54 -0
- package/dist/serialization/types/SuccessMessage.d.ts +2 -0
- package/{serialization/resources/values/types/DeleteDynamicValueResponse.js → dist/serialization/types/SuccessMessage.js} +26 -14
- package/dist/serialization/types/Test.d.ts +2 -0
- package/dist/serialization/{resources/tests/types/DeleteFlowTestResponse.js → types/Test.js} +28 -15
- package/dist/serialization/types/TestListResponse.d.ts +2 -0
- package/dist/serialization/types/TestListResponse.js +50 -0
- package/dist/serialization/types/TestTestState.d.ts +2 -0
- package/dist/serialization/types/TestTestState.js +60 -0
- package/dist/serialization/types/TestTestStateConditionsItemValue.d.ts +2 -0
- package/dist/serialization/types/TestTestStateConditionsItemValue.js +52 -0
- package/dist/serialization/types/TestTestStateEvaluationError.d.ts +2 -0
- package/dist/serialization/types/TestTestStateEvaluationError.js +49 -0
- package/dist/serialization/types/UsageStatistics.d.ts +2 -0
- package/dist/serialization/{resources/assets/types/UsageResponse.js → types/UsageStatistics.js} +26 -14
- package/dist/serialization/types/UserGroup.d.ts +2 -0
- package/dist/serialization/{resources/users/types/CreateGroupResponse.js → types/UserGroup.js} +26 -14
- package/dist/serialization/types/UserGroupListResponse.d.ts +2 -0
- package/dist/serialization/types/UserGroupListResponse.js +50 -0
- package/dist/serialization/types/UserInviteResponse.d.ts +2 -0
- package/dist/serialization/types/UserInviteResponse.js +53 -0
- package/dist/serialization/types/UserInviteResponseUser.d.ts +2 -0
- package/dist/serialization/types/UserInviteResponseUser.js +53 -0
- package/dist/serialization/types/ValueLimits.d.ts +2 -0
- package/dist/serialization/types/ValueLimits.js +54 -0
- package/dist/serialization/types/index.js +47 -4
- package/errors/RulebricksApiError.js +2 -1
- package/errors/RulebricksApiTimeoutError.d.ts +1 -1
- package/errors/RulebricksApiTimeoutError.js +2 -2
- package/index.d.ts +8 -8
- package/index.js +32 -16
- package/package.json +1 -1
- package/serialization/resources/assets/client/index.d.ts +0 -5
- package/serialization/resources/assets/client/index.js +0 -22
- package/serialization/resources/assets/client/requests/DeleteFolderRequest.js +23 -11
- package/serialization/resources/assets/client/requests/DeleteRuleRequest.js +24 -12
- package/serialization/resources/assets/client/requests/ImportRuleRequest.js +23 -11
- package/serialization/resources/assets/client/requests/UpsertFolderRequest.js +23 -11
- package/serialization/resources/assets/index.js +0 -1
- package/serialization/resources/index.d.ts +1 -4
- package/serialization/resources/index.js +26 -20
- package/serialization/resources/rules/client/bulkSolve.js +27 -13
- package/serialization/resources/rules/client/index.d.ts +0 -2
- package/serialization/resources/rules/client/index.js +24 -14
- package/serialization/resources/users/client/index.d.ts +0 -1
- package/serialization/resources/users/client/index.js +0 -18
- package/serialization/resources/users/client/requests/CreateUserGroupRequest.d.ts +2 -0
- package/{dist/serialization/resources/users/client/requests/CreateGroupRequest.js → serialization/resources/users/client/requests/CreateUserGroupRequest.js} +25 -13
- package/serialization/resources/users/client/requests/UserInviteRequest.d.ts +2 -0
- package/serialization/resources/users/client/requests/UserInviteRequest.js +54 -0
- package/serialization/resources/users/client/requests/index.d.ts +4 -4
- package/serialization/resources/users/client/requests/index.js +5 -5
- package/serialization/resources/users/types/UserInviteRequestRole.d.ts +2 -0
- package/{dist/serialization/resources/assets/client/importRule.js → serialization/resources/users/types/UserInviteRequestRole.js} +25 -13
- package/serialization/resources/users/types/index.js +1 -4
- package/serialization/resources/values/client/index.d.ts +0 -2
- package/serialization/resources/values/client/index.js +5 -18
- package/serialization/resources/values/client/requests/UpdateValuesRequest.d.ts +2 -0
- package/serialization/resources/values/client/requests/UpdateValuesRequest.js +53 -0
- package/serialization/resources/values/client/requests/index.d.ts +3 -0
- package/serialization/resources/values/client/requests/index.js +5 -0
- package/serialization/resources/values/types/UpdateValuesRequestValuesValue.d.ts +2 -0
- package/{dist/serialization/resources/values/types/ListDynamicValuesResponseItemValue.js → serialization/resources/values/types/UpdateValuesRequestValuesValue.js} +26 -14
- package/serialization/resources/values/types/index.js +1 -9
- package/serialization/types/BooleanValue.d.ts +2 -0
- package/serialization/types/BooleanValue.js +54 -0
- package/serialization/types/BulkRuleResponseItem.d.ts +2 -0
- package/serialization/types/BulkRuleResponseItem.js +51 -0
- package/serialization/types/BulkRuleResponseItemError.d.ts +2 -0
- package/{dist/serialization/types/InternalServerErrorBody.js → serialization/types/BulkRuleResponseItemError.js} +25 -13
- package/serialization/types/CreateTestRequest.d.ts +2 -0
- package/{dist/serialization/resources/tests/client/requests/CreateRuleTestRequest.js → serialization/types/CreateTestRequest.js} +26 -14
- package/serialization/types/DecisionLog.d.ts +2 -0
- package/serialization/types/DecisionLog.js +56 -0
- package/serialization/types/DecisionLogDecision.d.ts +2 -0
- package/serialization/types/DecisionLogDecision.js +55 -0
- package/serialization/types/DecisionLogDecisionConditionsItemValue.d.ts +2 -0
- package/serialization/types/DecisionLogDecisionConditionsItemValue.js +52 -0
- package/serialization/types/DecisionLogRequest.d.ts +2 -0
- package/serialization/types/DecisionLogRequest.js +58 -0
- package/serialization/types/DecisionLogResponse.d.ts +2 -0
- package/serialization/types/DecisionLogResponse.js +53 -0
- package/serialization/types/DynamicRequestPayload.d.ts +2 -0
- package/serialization/types/DynamicRequestPayload.js +49 -0
- package/serialization/types/DynamicResponsePayload.d.ts +2 -0
- package/serialization/types/DynamicResponsePayload.js +49 -0
- package/serialization/types/DynamicValue.d.ts +2 -0
- package/serialization/types/DynamicValue.js +63 -0
- package/serialization/types/DynamicValueBase.d.ts +2 -0
- package/serialization/types/DynamicValueBase.js +55 -0
- package/serialization/types/DynamicValueListResponse.d.ts +2 -0
- package/serialization/types/DynamicValueListResponse.js +50 -0
- package/serialization/types/Error_.d.ts +2 -0
- package/{dist/serialization/types/BadRequestErrorBody.js → serialization/types/Error_.js} +25 -13
- package/serialization/types/FlowBase.d.ts +2 -0
- package/serialization/types/FlowBase.js +54 -0
- package/serialization/types/FlowDetail.d.ts +2 -0
- package/serialization/types/FlowDetail.js +55 -0
- package/serialization/types/FlowExecutionError.d.ts +2 -0
- package/serialization/types/FlowExecutionError.js +53 -0
- package/serialization/types/FlowListResponse.d.ts +2 -0
- package/serialization/types/FlowListResponse.js +50 -0
- package/serialization/types/Folder.d.ts +2 -0
- package/{dist/serialization/resources/assets/types/UpsertFolderResponse.js → serialization/types/Folder.js} +26 -14
- package/serialization/types/FolderListResponse.d.ts +2 -0
- package/serialization/types/FolderListResponse.js +50 -0
- package/serialization/types/ListValue.d.ts +2 -0
- package/serialization/types/ListValue.js +54 -0
- package/serialization/types/NumberValue.d.ts +2 -0
- package/serialization/types/NumberValue.js +54 -0
- package/serialization/types/ParallelSolveRequest.d.ts +2 -0
- package/serialization/types/ParallelSolveRequest.js +50 -0
- package/serialization/types/ParallelSolveRequestValue.d.ts +2 -0
- package/serialization/types/ParallelSolveRequestValue.js +54 -0
- package/serialization/types/ParallelSolveResponse.d.ts +2 -0
- package/serialization/types/ParallelSolveResponse.js +50 -0
- package/serialization/types/RuleBase.d.ts +2 -0
- package/serialization/types/RuleBase.js +54 -0
- package/serialization/types/RuleDetail.d.ts +2 -0
- package/serialization/types/RuleDetail.js +59 -0
- package/serialization/types/RuleExport.d.ts +2 -0
- package/serialization/types/RuleExport.js +49 -0
- package/serialization/types/RuleListResponse.d.ts +2 -0
- package/serialization/types/RuleListResponse.js +50 -0
- package/serialization/types/RuleUsage.d.ts +2 -0
- package/{dist/serialization/resources/assets/types/ListFlowsResponseItem.js → serialization/types/RuleUsage.js} +28 -16
- package/serialization/types/SchemaField.d.ts +2 -0
- package/serialization/types/SchemaField.js +60 -0
- package/serialization/types/SchemaFieldDefaultValue.d.ts +2 -0
- package/{dist/serialization/resources/values/types/UpdateResponseItemValue.js → serialization/types/SchemaFieldDefaultValue.js} +27 -14
- package/serialization/types/SchemaFieldType.d.ts +2 -0
- package/serialization/types/SchemaFieldType.js +49 -0
- package/serialization/types/StringValue.d.ts +2 -0
- package/serialization/types/StringValue.js +54 -0
- package/serialization/types/SuccessMessage.d.ts +2 -0
- package/{dist/serialization/resources/values/types/DeleteDynamicValueResponse.js → serialization/types/SuccessMessage.js} +26 -14
- package/serialization/types/Test.d.ts +2 -0
- package/{dist/serialization/resources/tests/types/DeleteRuleTestResponse.js → serialization/types/Test.js} +28 -15
- package/serialization/types/TestListResponse.d.ts +2 -0
- package/serialization/types/TestListResponse.js +50 -0
- package/serialization/types/TestTestState.d.ts +2 -0
- package/serialization/types/TestTestState.js +60 -0
- package/serialization/types/TestTestStateConditionsItemValue.d.ts +2 -0
- package/serialization/types/TestTestStateConditionsItemValue.js +52 -0
- package/serialization/types/TestTestStateEvaluationError.d.ts +2 -0
- package/serialization/types/TestTestStateEvaluationError.js +49 -0
- package/serialization/types/UsageStatistics.d.ts +2 -0
- package/serialization/{resources/assets/types/UsageResponse.js → types/UsageStatistics.js} +26 -14
- package/serialization/types/UserGroup.d.ts +2 -0
- package/{dist/serialization/resources/users/types/ListGroupsResponseItem.js → serialization/types/UserGroup.js} +26 -14
- package/serialization/types/UserGroupListResponse.d.ts +2 -0
- package/serialization/types/UserGroupListResponse.js +50 -0
- package/serialization/types/UserInviteResponse.d.ts +2 -0
- package/serialization/types/UserInviteResponse.js +53 -0
- package/serialization/types/UserInviteResponseUser.d.ts +2 -0
- package/serialization/types/UserInviteResponseUser.js +53 -0
- package/serialization/types/ValueLimits.d.ts +2 -0
- package/serialization/types/ValueLimits.js +54 -0
- package/serialization/types/index.js +47 -4
- package/api/resources/assets/types/index.js +0 -28
- package/api/resources/decisions/types/index.js +0 -21
- package/api/resources/tests/client/requests/index.js +0 -2
- package/api/resources/tests/types/index.js +0 -26
- package/api/resources/users/types/InviteRequestRole.d.ts +0 -5
- package/api/resources/values/types/ListDynamicValuesResponseItemType.js +0 -12
- package/api/resources/values/types/UpdateResponseItemType.d.ts +0 -7
- package/dist/api/resources/assets/types/index.js +0 -28
- package/dist/api/resources/decisions/types/index.js +0 -21
- package/dist/api/resources/tests/client/requests/index.js +0 -2
- package/dist/api/resources/tests/types/index.js +0 -26
- package/dist/api/resources/users/types/InviteRequestRole.d.ts +0 -5
- package/dist/api/resources/values/types/ListDynamicValuesResponseItemType.js +0 -12
- package/dist/api/resources/values/types/UpdateResponseItemType.d.ts +0 -7
- package/dist/forge/index.d.ts +0 -4
- package/dist/forge/index.js +0 -31
- package/dist/forge/operators.d.ts +0 -136
- package/dist/forge/operators.js +0 -938
- package/dist/forge/rule.d.ts +0 -129
- package/dist/forge/rule.js +0 -702
- package/dist/forge/types.d.ts +0 -53
- package/dist/forge/types.js +0 -34
- package/dist/forge/values.d.ts +0 -21
- package/dist/forge/values.js +0 -88
- package/dist/serialization/resources/assets/client/exportRule.d.ts +0 -2
- package/dist/serialization/resources/assets/client/exportRule.js +0 -37
- package/dist/serialization/resources/assets/client/importRule.d.ts +0 -2
- package/dist/serialization/resources/assets/client/listFlows.d.ts +0 -2
- package/dist/serialization/resources/assets/client/listFlows.js +0 -56
- package/dist/serialization/resources/assets/client/listFolders.d.ts +0 -2
- package/dist/serialization/resources/assets/client/listFolders.js +0 -56
- package/dist/serialization/resources/assets/client/listRules.d.ts +0 -2
- package/dist/serialization/resources/assets/client/listRules.js +0 -56
- package/dist/serialization/resources/assets/types/DeleteFolderResponse.d.ts +0 -2
- package/dist/serialization/resources/assets/types/DeleteRuleResponse.d.ts +0 -2
- package/dist/serialization/resources/assets/types/ListFlowsResponseItem.d.ts +0 -2
- package/dist/serialization/resources/assets/types/ListFoldersResponseItem.d.ts +0 -2
- package/dist/serialization/resources/assets/types/ListFoldersResponseItem.js +0 -42
- package/dist/serialization/resources/assets/types/ListRulesResponseItem.d.ts +0 -2
- package/dist/serialization/resources/assets/types/ListRulesResponseItem.js +0 -67
- package/dist/serialization/resources/assets/types/ListRulesResponseItemFolder.d.ts +0 -2
- package/dist/serialization/resources/assets/types/ListRulesResponseItemFolder.js +0 -42
- package/dist/serialization/resources/assets/types/UpsertFolderResponse.d.ts +0 -2
- package/dist/serialization/resources/assets/types/UsageResponse.d.ts +0 -2
- package/dist/serialization/resources/assets/types/index.js +0 -28
- package/dist/serialization/resources/decisions/index.js +0 -21
- package/dist/serialization/resources/decisions/types/QueryResponse.d.ts +0 -2
- package/dist/serialization/resources/decisions/types/QueryResponse.js +0 -42
- package/dist/serialization/resources/decisions/types/index.js +0 -21
- package/dist/serialization/resources/flows/client/execute.d.ts +0 -3
- package/dist/serialization/resources/flows/client/execute.js +0 -38
- package/dist/serialization/resources/flows/client/index.d.ts +0 -2
- package/dist/serialization/resources/flows/client/index.js +0 -33
- package/dist/serialization/resources/flows/index.js +0 -21
- package/dist/serialization/resources/rules/client/parallelSolve.d.ts +0 -3
- package/dist/serialization/resources/rules/client/parallelSolve.js +0 -38
- package/dist/serialization/resources/rules/client/solve.d.ts +0 -3
- package/dist/serialization/resources/rules/client/solve.js +0 -38
- package/dist/serialization/resources/tests/client/index.d.ts +0 -3
- package/dist/serialization/resources/tests/client/index.js +0 -40
- package/dist/serialization/resources/tests/client/listFlowTests.d.ts +0 -2
- package/dist/serialization/resources/tests/client/listFlowTests.js +0 -56
- package/dist/serialization/resources/tests/client/listRuleTests.d.ts +0 -2
- package/dist/serialization/resources/tests/client/listRuleTests.js +0 -56
- package/dist/serialization/resources/tests/client/requests/CreateFlowTestRequest.d.ts +0 -2
- package/dist/serialization/resources/tests/client/requests/CreateRuleTestRequest.d.ts +0 -2
- package/dist/serialization/resources/tests/client/requests/index.d.ts +0 -5
- package/dist/serialization/resources/tests/client/requests/index.js +0 -7
- package/dist/serialization/resources/tests/index.js +0 -22
- package/dist/serialization/resources/tests/types/CreateFlowTestResponse.d.ts +0 -2
- package/dist/serialization/resources/tests/types/CreateFlowTestResponse.js +0 -47
- package/dist/serialization/resources/tests/types/CreateRuleTestResponse.d.ts +0 -2
- package/dist/serialization/resources/tests/types/CreateRuleTestResponse.js +0 -47
- package/dist/serialization/resources/tests/types/DeleteFlowTestResponse.d.ts +0 -2
- package/dist/serialization/resources/tests/types/DeleteRuleTestResponse.d.ts +0 -2
- package/dist/serialization/resources/tests/types/ListFlowTestsResponseItem.d.ts +0 -2
- package/dist/serialization/resources/tests/types/ListFlowTestsResponseItem.js +0 -47
- package/dist/serialization/resources/tests/types/ListRuleTestsResponseItem.d.ts +0 -2
- package/dist/serialization/resources/tests/types/ListRuleTestsResponseItem.js +0 -47
- package/dist/serialization/resources/tests/types/index.js +0 -26
- package/dist/serialization/resources/users/client/listGroups.d.ts +0 -2
- package/dist/serialization/resources/users/client/listGroups.js +0 -56
- package/dist/serialization/resources/users/client/requests/CreateGroupRequest.d.ts +0 -2
- package/dist/serialization/resources/users/client/requests/InviteRequest.d.ts +0 -2
- package/dist/serialization/resources/users/client/requests/InviteRequest.js +0 -60
- package/dist/serialization/resources/users/types/CreateGroupResponse.d.ts +0 -2
- package/dist/serialization/resources/users/types/InviteRequestRole.d.ts +0 -2
- package/dist/serialization/resources/users/types/InviteRequestRole.js +0 -37
- package/dist/serialization/resources/users/types/InviteResponse.d.ts +0 -2
- package/dist/serialization/resources/users/types/InviteResponse.js +0 -39
- package/dist/serialization/resources/users/types/ListGroupsResponseItem.d.ts +0 -2
- package/dist/serialization/resources/values/client/listDynamicValues.d.ts +0 -2
- package/dist/serialization/resources/values/client/listDynamicValues.js +0 -56
- package/dist/serialization/resources/values/client/update.d.ts +0 -3
- package/dist/serialization/resources/values/client/update.js +0 -57
- package/dist/serialization/resources/values/types/DeleteDynamicValueResponse.d.ts +0 -2
- package/dist/serialization/resources/values/types/ListDynamicValuesResponseItem.d.ts +0 -2
- package/dist/serialization/resources/values/types/ListDynamicValuesResponseItem.js +0 -66
- package/dist/serialization/resources/values/types/ListDynamicValuesResponseItemType.d.ts +0 -2
- package/dist/serialization/resources/values/types/ListDynamicValuesResponseItemType.js +0 -37
- package/dist/serialization/resources/values/types/ListDynamicValuesResponseItemUsagesItem.d.ts +0 -2
- package/dist/serialization/resources/values/types/ListDynamicValuesResponseItemValue.d.ts +0 -2
- package/dist/serialization/resources/values/types/UpdateRequestValue.d.ts +0 -2
- package/dist/serialization/resources/values/types/UpdateRequestValue.js +0 -42
- package/dist/serialization/resources/values/types/UpdateResponseItem.d.ts +0 -2
- package/dist/serialization/resources/values/types/UpdateResponseItem.js +0 -61
- package/dist/serialization/resources/values/types/UpdateResponseItemType.d.ts +0 -2
- package/dist/serialization/resources/values/types/UpdateResponseItemType.js +0 -37
- package/dist/serialization/resources/values/types/UpdateResponseItemValue.d.ts +0 -2
- package/dist/serialization/types/BadRequestErrorBody.d.ts +0 -2
- package/dist/serialization/types/ForbiddenErrorBody.d.ts +0 -2
- package/dist/serialization/types/InternalServerErrorBody.d.ts +0 -2
- package/dist/serialization/types/NotFoundErrorBody.d.ts +0 -2
- package/forge/index.d.ts +0 -4
- package/forge/index.js +0 -31
- package/forge/operators.d.ts +0 -136
- package/forge/operators.js +0 -938
- package/forge/rule.d.ts +0 -129
- package/forge/rule.js +0 -702
- package/forge/types.d.ts +0 -53
- package/forge/types.js +0 -34
- package/forge/values.d.ts +0 -21
- package/forge/values.js +0 -88
- package/serialization/resources/assets/client/exportRule.d.ts +0 -2
- package/serialization/resources/assets/client/exportRule.js +0 -37
- package/serialization/resources/assets/client/importRule.d.ts +0 -2
- package/serialization/resources/assets/client/importRule.js +0 -37
- package/serialization/resources/assets/client/listFlows.d.ts +0 -2
- package/serialization/resources/assets/client/listFlows.js +0 -56
- package/serialization/resources/assets/client/listFolders.d.ts +0 -2
- package/serialization/resources/assets/client/listFolders.js +0 -56
- package/serialization/resources/assets/client/listRules.d.ts +0 -2
- package/serialization/resources/assets/client/listRules.js +0 -56
- package/serialization/resources/assets/types/DeleteFolderResponse.d.ts +0 -2
- package/serialization/resources/assets/types/DeleteFolderResponse.js +0 -42
- package/serialization/resources/assets/types/DeleteRuleResponse.d.ts +0 -2
- package/serialization/resources/assets/types/DeleteRuleResponse.js +0 -39
- package/serialization/resources/assets/types/ListFlowsResponseItem.d.ts +0 -2
- package/serialization/resources/assets/types/ListFoldersResponseItem.d.ts +0 -2
- package/serialization/resources/assets/types/ListFoldersResponseItem.js +0 -42
- package/serialization/resources/assets/types/ListRulesResponseItem.d.ts +0 -2
- package/serialization/resources/assets/types/ListRulesResponseItem.js +0 -67
- package/serialization/resources/assets/types/ListRulesResponseItemFolder.d.ts +0 -2
- package/serialization/resources/assets/types/ListRulesResponseItemFolder.js +0 -42
- package/serialization/resources/assets/types/UpsertFolderResponse.d.ts +0 -2
- package/serialization/resources/assets/types/UpsertFolderResponse.js +0 -42
- package/serialization/resources/assets/types/UsageResponse.d.ts +0 -2
- package/serialization/resources/assets/types/index.js +0 -28
- package/serialization/resources/decisions/index.js +0 -21
- package/serialization/resources/decisions/types/QueryResponse.d.ts +0 -2
- package/serialization/resources/decisions/types/QueryResponse.js +0 -42
- package/serialization/resources/decisions/types/index.js +0 -21
- package/serialization/resources/flows/client/execute.d.ts +0 -3
- package/serialization/resources/flows/client/execute.js +0 -38
- package/serialization/resources/flows/client/index.d.ts +0 -2
- package/serialization/resources/flows/client/index.js +0 -33
- package/serialization/resources/flows/index.js +0 -21
- package/serialization/resources/rules/client/parallelSolve.d.ts +0 -3
- package/serialization/resources/rules/client/parallelSolve.js +0 -38
- package/serialization/resources/rules/client/solve.d.ts +0 -3
- package/serialization/resources/rules/client/solve.js +0 -38
- package/serialization/resources/tests/client/index.d.ts +0 -3
- package/serialization/resources/tests/client/index.js +0 -40
- package/serialization/resources/tests/client/listFlowTests.d.ts +0 -2
- package/serialization/resources/tests/client/listFlowTests.js +0 -56
- package/serialization/resources/tests/client/listRuleTests.d.ts +0 -2
- package/serialization/resources/tests/client/listRuleTests.js +0 -56
- package/serialization/resources/tests/client/requests/CreateFlowTestRequest.d.ts +0 -2
- package/serialization/resources/tests/client/requests/CreateFlowTestRequest.js +0 -42
- package/serialization/resources/tests/client/requests/CreateRuleTestRequest.d.ts +0 -2
- package/serialization/resources/tests/client/requests/CreateRuleTestRequest.js +0 -42
- package/serialization/resources/tests/client/requests/index.d.ts +0 -5
- package/serialization/resources/tests/client/requests/index.js +0 -7
- package/serialization/resources/tests/index.js +0 -22
- package/serialization/resources/tests/types/CreateFlowTestResponse.d.ts +0 -2
- package/serialization/resources/tests/types/CreateFlowTestResponse.js +0 -47
- package/serialization/resources/tests/types/CreateRuleTestResponse.d.ts +0 -2
- package/serialization/resources/tests/types/CreateRuleTestResponse.js +0 -47
- package/serialization/resources/tests/types/DeleteFlowTestResponse.d.ts +0 -2
- package/serialization/resources/tests/types/DeleteFlowTestResponse.js +0 -47
- package/serialization/resources/tests/types/DeleteRuleTestResponse.d.ts +0 -2
- package/serialization/resources/tests/types/DeleteRuleTestResponse.js +0 -47
- package/serialization/resources/tests/types/ListFlowTestsResponseItem.d.ts +0 -2
- package/serialization/resources/tests/types/ListFlowTestsResponseItem.js +0 -47
- package/serialization/resources/tests/types/ListRuleTestsResponseItem.d.ts +0 -2
- package/serialization/resources/tests/types/ListRuleTestsResponseItem.js +0 -47
- package/serialization/resources/tests/types/index.js +0 -26
- package/serialization/resources/users/client/listGroups.d.ts +0 -2
- package/serialization/resources/users/client/listGroups.js +0 -56
- package/serialization/resources/users/client/requests/CreateGroupRequest.d.ts +0 -2
- package/serialization/resources/users/client/requests/InviteRequest.d.ts +0 -2
- package/serialization/resources/users/client/requests/InviteRequest.js +0 -60
- package/serialization/resources/users/types/CreateGroupResponse.d.ts +0 -2
- package/serialization/resources/users/types/CreateGroupResponse.js +0 -42
- package/serialization/resources/users/types/InviteRequestRole.d.ts +0 -2
- package/serialization/resources/users/types/InviteRequestRole.js +0 -37
- package/serialization/resources/users/types/InviteResponse.d.ts +0 -2
- package/serialization/resources/users/types/InviteResponse.js +0 -39
- package/serialization/resources/users/types/ListGroupsResponseItem.d.ts +0 -2
- package/serialization/resources/users/types/ListGroupsResponseItem.js +0 -42
- package/serialization/resources/values/client/listDynamicValues.d.ts +0 -2
- package/serialization/resources/values/client/listDynamicValues.js +0 -56
- package/serialization/resources/values/client/update.d.ts +0 -3
- package/serialization/resources/values/client/update.js +0 -57
- package/serialization/resources/values/types/DeleteDynamicValueResponse.d.ts +0 -2
- package/serialization/resources/values/types/ListDynamicValuesResponseItem.d.ts +0 -2
- package/serialization/resources/values/types/ListDynamicValuesResponseItem.js +0 -66
- package/serialization/resources/values/types/ListDynamicValuesResponseItemType.d.ts +0 -2
- package/serialization/resources/values/types/ListDynamicValuesResponseItemType.js +0 -37
- package/serialization/resources/values/types/ListDynamicValuesResponseItemUsagesItem.d.ts +0 -2
- package/serialization/resources/values/types/ListDynamicValuesResponseItemValue.d.ts +0 -2
- package/serialization/resources/values/types/UpdateRequestValue.d.ts +0 -2
- package/serialization/resources/values/types/UpdateRequestValue.js +0 -42
- package/serialization/resources/values/types/UpdateResponseItem.d.ts +0 -2
- package/serialization/resources/values/types/UpdateResponseItem.js +0 -61
- package/serialization/resources/values/types/UpdateResponseItemType.d.ts +0 -2
- package/serialization/resources/values/types/UpdateResponseItemType.js +0 -37
- package/serialization/resources/values/types/UpdateResponseItemValue.d.ts +0 -2
- package/serialization/types/BadRequestErrorBody.d.ts +0 -2
- package/serialization/types/BadRequestErrorBody.js +0 -39
- package/serialization/types/ForbiddenErrorBody.d.ts +0 -2
- package/serialization/types/ForbiddenErrorBody.js +0 -39
- package/serialization/types/InternalServerErrorBody.d.ts +0 -2
- package/serialization/types/InternalServerErrorBody.js +0 -39
- package/serialization/types/NotFoundErrorBody.d.ts +0 -2
- package/serialization/types/NotFoundErrorBody.js +0 -39
- /package/api/resources/{assets/types/DeleteFolderResponse.d.ts → decisions/client/requests/QueryDecisionsRequest.d.ts} +0 -0
- /package/api/resources/{assets/types/DeleteFolderResponse.js → decisions/client/requests/QueryDecisionsRequest.js} +0 -0
- /package/api/resources/{assets/types/DeleteRuleResponse.d.ts → users/client/requests/CreateUserGroupRequest.d.ts} +0 -0
- /package/api/resources/{assets/types/DeleteRuleResponse.js → users/client/requests/CreateUserGroupRequest.js} +0 -0
- /package/api/resources/{assets/types/ListFlowsResponseItem.d.ts → users/client/requests/UserInviteRequest.d.ts} +0 -0
- /package/api/resources/{assets/types/ListFlowsResponseItem.js → users/client/requests/UserInviteRequest.js} +0 -0
- /package/api/resources/{assets/types/ListFoldersResponseItem.d.ts → values/client/requests/UpdateValuesRequest.d.ts} +0 -0
- /package/api/resources/{assets/types/ListFoldersResponseItem.js → values/client/requests/UpdateValuesRequest.js} +0 -0
- /package/api/resources/{assets/types/ListRulesResponseItem.d.ts → values/types/UpdateValuesRequestValuesValue.d.ts} +0 -0
- /package/api/resources/{assets/types/ListRulesResponseItem.js → values/types/UpdateValuesRequestValuesValue.js} +0 -0
- /package/api/{resources/assets/types/ListRulesResponseItemFolder.d.ts → types/BooleanValue.d.ts} +0 -0
- /package/api/{resources/assets/types/ListRulesResponseItemFolder.js → types/BooleanValue.js} +0 -0
- /package/api/{resources/assets/types/UpsertFolderResponse.d.ts → types/BulkRuleResponseItem.d.ts} +0 -0
- /package/api/{resources/assets/types/UpsertFolderResponse.js → types/BulkRuleResponseItem.js} +0 -0
- /package/api/{resources/assets/types/UsageResponse.d.ts → types/BulkRuleResponseItemError.d.ts} +0 -0
- /package/api/{resources/assets/types/UsageResponse.js → types/BulkRuleResponseItemError.js} +0 -0
- /package/api/{resources/assets/types/index.d.ts → types/CreateTestRequest.d.ts} +0 -0
- /package/api/{resources/decisions/client/requests/QueryRequest.js → types/CreateTestRequest.js} +0 -0
- /package/api/{resources/decisions/client/requests/QueryRequest.d.ts → types/DecisionLog.d.ts} +0 -0
- /package/api/{resources/decisions/types/QueryResponse.js → types/DecisionLog.js} +0 -0
- /package/api/{resources/decisions/types/QueryResponse.d.ts → types/DecisionLogDecision.d.ts} +0 -0
- /package/api/{resources/tests/client/requests/CreateFlowTestRequest.js → types/DecisionLogDecision.js} +0 -0
- /package/api/{resources/decisions/types/index.d.ts → types/DecisionLogDecisionConditionsItemValue.d.ts} +0 -0
- /package/api/{resources/tests/client/requests/CreateRuleTestRequest.js → types/DecisionLogDecisionConditionsItemValue.js} +0 -0
- /package/api/{resources/tests/client/requests/CreateFlowTestRequest.d.ts → types/DecisionLogRequest.d.ts} +0 -0
- /package/api/{resources/tests/types/CreateFlowTestResponse.js → types/DecisionLogRequest.js} +0 -0
- /package/api/{resources/tests/client/requests/CreateRuleTestRequest.d.ts → types/DecisionLogResponse.d.ts} +0 -0
- /package/api/{resources/tests/types/CreateRuleTestResponse.js → types/DecisionLogResponse.js} +0 -0
- /package/api/{resources/tests/client/requests/index.d.ts → types/DynamicRequestPayload.d.ts} +0 -0
- /package/api/{resources/tests/types/DeleteFlowTestResponse.js → types/DynamicRequestPayload.js} +0 -0
- /package/api/{resources/tests/types/CreateFlowTestResponse.d.ts → types/DynamicResponsePayload.d.ts} +0 -0
- /package/api/{resources/tests/types/DeleteRuleTestResponse.js → types/DynamicResponsePayload.js} +0 -0
- /package/api/{resources/tests/types/CreateRuleTestResponse.d.ts → types/DynamicValue.d.ts} +0 -0
- /package/api/{resources/tests/types/ListFlowTestsResponseItem.js → types/DynamicValue.js} +0 -0
- /package/api/{resources/tests/types/DeleteFlowTestResponse.d.ts → types/DynamicValueBase.d.ts} +0 -0
- /package/api/{resources/tests/types/ListRuleTestsResponseItem.js → types/DynamicValueBase.js} +0 -0
- /package/api/{resources/tests/types/DeleteRuleTestResponse.d.ts → types/DynamicValueListResponse.d.ts} +0 -0
- /package/api/{resources/users/client/requests/CreateGroupRequest.js → types/DynamicValueListResponse.js} +0 -0
- /package/api/{resources/tests/types/ListFlowTestsResponseItem.d.ts → types/Error_.d.ts} +0 -0
- /package/api/{resources/users/client/requests/InviteRequest.js → types/Error_.js} +0 -0
- /package/api/{resources/tests/types/ListRuleTestsResponseItem.d.ts → types/FlowBase.d.ts} +0 -0
- /package/api/{resources/users/types/CreateGroupResponse.js → types/FlowBase.js} +0 -0
- /package/api/{resources/tests/types/index.d.ts → types/FlowDetail.d.ts} +0 -0
- /package/api/{resources/users/types/InviteResponse.js → types/FlowDetail.js} +0 -0
- /package/api/{resources/users/client/requests/CreateGroupRequest.d.ts → types/FlowExecutionError.d.ts} +0 -0
- /package/api/{resources/users/types/ListGroupsResponseItem.js → types/FlowExecutionError.js} +0 -0
- /package/api/{resources/users/client/requests/InviteRequest.d.ts → types/FlowListResponse.d.ts} +0 -0
- /package/api/{resources/values/types/DeleteDynamicValueResponse.js → types/FlowListResponse.js} +0 -0
- /package/api/{resources/users/types/CreateGroupResponse.d.ts → types/Folder.d.ts} +0 -0
- /package/api/{resources/values/types/ListDynamicValuesResponseItem.js → types/Folder.js} +0 -0
- /package/api/{resources/users/types/InviteResponse.d.ts → types/FolderListResponse.d.ts} +0 -0
- /package/api/{resources/values/types/ListDynamicValuesResponseItemUsagesItem.js → types/FolderListResponse.js} +0 -0
- /package/api/{resources/users/types/ListGroupsResponseItem.d.ts → types/ListValue.d.ts} +0 -0
- /package/api/{resources/values/types/ListDynamicValuesResponseItemValue.js → types/ListValue.js} +0 -0
- /package/api/{resources/values/types/DeleteDynamicValueResponse.d.ts → types/NumberValue.d.ts} +0 -0
- /package/api/{resources/values/types/UpdateRequestValue.js → types/NumberValue.js} +0 -0
- /package/api/{resources/values/types/ListDynamicValuesResponseItem.d.ts → types/ParallelSolveRequest.d.ts} +0 -0
- /package/api/{resources/values/types/UpdateResponseItem.js → types/ParallelSolveRequest.js} +0 -0
- /package/api/{resources/values/types/ListDynamicValuesResponseItemUsagesItem.d.ts → types/ParallelSolveRequestValue.d.ts} +0 -0
- /package/api/{resources/values/types/UpdateResponseItemValue.js → types/ParallelSolveRequestValue.js} +0 -0
- /package/api/{resources/values/types/ListDynamicValuesResponseItemValue.d.ts → types/ParallelSolveResponse.d.ts} +0 -0
- /package/api/types/{BadRequestErrorBody.js → ParallelSolveResponse.js} +0 -0
- /package/api/{resources/values/types/UpdateRequestValue.d.ts → types/RuleBase.d.ts} +0 -0
- /package/api/types/{ForbiddenErrorBody.js → RuleBase.js} +0 -0
- /package/api/{resources/values/types/UpdateResponseItem.d.ts → types/RuleDetail.d.ts} +0 -0
- /package/api/types/{InternalServerErrorBody.js → RuleDetail.js} +0 -0
- /package/api/{resources/values/types/UpdateResponseItemValue.d.ts → types/RuleExport.d.ts} +0 -0
- /package/api/types/{NotFoundErrorBody.js → RuleExport.js} +0 -0
- /package/api/types/{BadRequestErrorBody.d.ts → RuleListResponse.d.ts} +0 -0
- /package/{dist/api/resources/assets/types/DeleteFolderResponse.js → api/types/RuleListResponse.js} +0 -0
- /package/api/types/{ForbiddenErrorBody.d.ts → RuleUsage.d.ts} +0 -0
- /package/{dist/api/resources/assets/types/DeleteRuleResponse.js → api/types/RuleUsage.js} +0 -0
- /package/api/types/{InternalServerErrorBody.d.ts → SchemaField.d.ts} +0 -0
- /package/{dist/api/resources/assets/types/ListFlowsResponseItem.js → api/types/SchemaField.js} +0 -0
- /package/api/types/{NotFoundErrorBody.d.ts → SchemaFieldDefaultValue.d.ts} +0 -0
- /package/{dist/api/resources/assets/types/ListFoldersResponseItem.js → api/types/SchemaFieldDefaultValue.js} +0 -0
- /package/{dist/api/resources/assets/types/DeleteFolderResponse.d.ts → api/types/StringValue.d.ts} +0 -0
- /package/{dist/api/resources/assets/types/ListRulesResponseItem.js → api/types/StringValue.js} +0 -0
- /package/{dist/api/resources/assets/types/DeleteRuleResponse.d.ts → api/types/SuccessMessage.d.ts} +0 -0
- /package/{dist/api/resources/assets/types/ListRulesResponseItemFolder.js → api/types/SuccessMessage.js} +0 -0
- /package/{dist/api/resources/assets/types/ListFlowsResponseItem.d.ts → api/types/Test.d.ts} +0 -0
- /package/{dist/api/resources/assets/types/UpsertFolderResponse.js → api/types/Test.js} +0 -0
- /package/{dist/api/resources/assets/types/ListFoldersResponseItem.d.ts → api/types/TestListResponse.d.ts} +0 -0
- /package/{dist/api/resources/assets/types/UsageResponse.js → api/types/TestListResponse.js} +0 -0
- /package/{dist/api/resources/assets/types/ListRulesResponseItem.d.ts → api/types/TestTestState.d.ts} +0 -0
- /package/{dist/api/resources/decisions/client/requests/QueryRequest.js → api/types/TestTestState.js} +0 -0
- /package/{dist/api/resources/assets/types/ListRulesResponseItemFolder.d.ts → api/types/TestTestStateConditionsItemValue.d.ts} +0 -0
- /package/{dist/api/resources/decisions/types/QueryResponse.js → api/types/TestTestStateConditionsItemValue.js} +0 -0
- /package/{dist/api/resources/assets/types/UpsertFolderResponse.d.ts → api/types/TestTestStateEvaluationError.d.ts} +0 -0
- /package/{dist/api/resources/tests/client/requests/CreateFlowTestRequest.js → api/types/TestTestStateEvaluationError.js} +0 -0
- /package/{dist/api/resources/assets/types/UsageResponse.d.ts → api/types/UsageStatistics.d.ts} +0 -0
- /package/{dist/api/resources/tests/client/requests/CreateRuleTestRequest.js → api/types/UsageStatistics.js} +0 -0
- /package/{dist/api/resources/assets/types/index.d.ts → api/types/UserGroup.d.ts} +0 -0
- /package/{dist/api/resources/tests/types/CreateFlowTestResponse.js → api/types/UserGroup.js} +0 -0
- /package/{dist/api/resources/decisions/client/requests/QueryRequest.d.ts → api/types/UserGroupListResponse.d.ts} +0 -0
- /package/{dist/api/resources/tests/types/CreateRuleTestResponse.js → api/types/UserGroupListResponse.js} +0 -0
- /package/{dist/api/resources/decisions/types/QueryResponse.d.ts → api/types/UserInviteResponse.d.ts} +0 -0
- /package/{dist/api/resources/tests/types/DeleteFlowTestResponse.js → api/types/UserInviteResponse.js} +0 -0
- /package/{dist/api/resources/decisions/types/index.d.ts → api/types/UserInviteResponseUser.d.ts} +0 -0
- /package/{dist/api/resources/tests/types/DeleteRuleTestResponse.js → api/types/UserInviteResponseUser.js} +0 -0
- /package/{dist/api/resources/tests/client/requests/CreateFlowTestRequest.d.ts → api/types/ValueLimits.d.ts} +0 -0
- /package/{dist/api/resources/tests/types/ListFlowTestsResponseItem.js → api/types/ValueLimits.js} +0 -0
- /package/dist/api/resources/{tests/client/requests/CreateRuleTestRequest.d.ts → decisions/client/requests/QueryDecisionsRequest.d.ts} +0 -0
- /package/dist/api/resources/{tests/types/ListRuleTestsResponseItem.js → decisions/client/requests/QueryDecisionsRequest.js} +0 -0
- /package/dist/api/resources/{tests/client/requests/index.d.ts → users/client/requests/CreateUserGroupRequest.d.ts} +0 -0
- /package/dist/api/resources/users/client/requests/{CreateGroupRequest.js → CreateUserGroupRequest.js} +0 -0
- /package/dist/api/resources/{tests/types/CreateFlowTestResponse.d.ts → users/client/requests/UserInviteRequest.d.ts} +0 -0
- /package/dist/api/resources/users/client/requests/{InviteRequest.js → UserInviteRequest.js} +0 -0
- /package/dist/api/resources/{tests/types/CreateRuleTestResponse.d.ts → values/client/requests/UpdateValuesRequest.d.ts} +0 -0
- /package/dist/api/resources/{users/types/CreateGroupResponse.js → values/client/requests/UpdateValuesRequest.js} +0 -0
- /package/dist/api/resources/{tests/types/DeleteFlowTestResponse.d.ts → values/types/UpdateValuesRequestValuesValue.d.ts} +0 -0
- /package/dist/api/resources/{users/types/InviteResponse.js → values/types/UpdateValuesRequestValuesValue.js} +0 -0
- /package/dist/api/{resources/tests/types/DeleteRuleTestResponse.d.ts → types/BooleanValue.d.ts} +0 -0
- /package/dist/api/{resources/users/types/ListGroupsResponseItem.js → types/BooleanValue.js} +0 -0
- /package/dist/api/{resources/tests/types/ListFlowTestsResponseItem.d.ts → types/BulkRuleResponseItem.d.ts} +0 -0
- /package/dist/api/{resources/values/types/DeleteDynamicValueResponse.js → types/BulkRuleResponseItem.js} +0 -0
- /package/dist/api/{resources/tests/types/ListRuleTestsResponseItem.d.ts → types/BulkRuleResponseItemError.d.ts} +0 -0
- /package/dist/api/{resources/values/types/ListDynamicValuesResponseItem.js → types/BulkRuleResponseItemError.js} +0 -0
- /package/dist/api/{resources/tests/types/index.d.ts → types/CreateTestRequest.d.ts} +0 -0
- /package/dist/api/{resources/values/types/ListDynamicValuesResponseItemUsagesItem.js → types/CreateTestRequest.js} +0 -0
- /package/dist/api/{resources/users/client/requests/CreateGroupRequest.d.ts → types/DecisionLog.d.ts} +0 -0
- /package/dist/api/{resources/values/types/ListDynamicValuesResponseItemValue.js → types/DecisionLog.js} +0 -0
- /package/dist/api/{resources/users/client/requests/InviteRequest.d.ts → types/DecisionLogDecision.d.ts} +0 -0
- /package/dist/api/{resources/values/types/UpdateRequestValue.js → types/DecisionLogDecision.js} +0 -0
- /package/dist/api/{resources/users/types/CreateGroupResponse.d.ts → types/DecisionLogDecisionConditionsItemValue.d.ts} +0 -0
- /package/dist/api/{resources/values/types/UpdateResponseItem.js → types/DecisionLogDecisionConditionsItemValue.js} +0 -0
- /package/dist/api/{resources/users/types/InviteResponse.d.ts → types/DecisionLogRequest.d.ts} +0 -0
- /package/dist/api/{resources/values/types/UpdateResponseItemValue.js → types/DecisionLogRequest.js} +0 -0
- /package/dist/api/{resources/users/types/ListGroupsResponseItem.d.ts → types/DecisionLogResponse.d.ts} +0 -0
- /package/dist/api/types/{BadRequestErrorBody.js → DecisionLogResponse.js} +0 -0
- /package/dist/api/{resources/values/types/DeleteDynamicValueResponse.d.ts → types/DynamicRequestPayload.d.ts} +0 -0
- /package/dist/api/types/{ForbiddenErrorBody.js → DynamicRequestPayload.js} +0 -0
- /package/dist/api/{resources/values/types/ListDynamicValuesResponseItem.d.ts → types/DynamicResponsePayload.d.ts} +0 -0
- /package/dist/api/types/{InternalServerErrorBody.js → DynamicResponsePayload.js} +0 -0
- /package/dist/api/{resources/values/types/ListDynamicValuesResponseItemUsagesItem.d.ts → types/DynamicValue.d.ts} +0 -0
- /package/dist/api/types/{NotFoundErrorBody.js → DynamicValue.js} +0 -0
- /package/dist/api/{resources/values/types/ListDynamicValuesResponseItemValue.d.ts → types/DynamicValueBase.d.ts} +0 -0
- /package/dist/api/{resources/values/types/UpdateRequestValue.d.ts → types/DynamicValueListResponse.d.ts} +0 -0
- /package/dist/api/{resources/values/types/UpdateResponseItem.d.ts → types/Error_.d.ts} +0 -0
- /package/dist/api/{resources/values/types/UpdateResponseItemValue.d.ts → types/FlowBase.d.ts} +0 -0
- /package/dist/api/types/{BadRequestErrorBody.d.ts → FlowDetail.d.ts} +0 -0
- /package/dist/api/types/{ForbiddenErrorBody.d.ts → FlowExecutionError.d.ts} +0 -0
- /package/dist/api/types/{InternalServerErrorBody.d.ts → FlowListResponse.d.ts} +0 -0
- /package/dist/api/types/{NotFoundErrorBody.d.ts → Folder.d.ts} +0 -0
- /package/dist/{serialization/resources/assets/types/index.d.ts → api/types/FolderListResponse.d.ts} +0 -0
- /package/dist/{serialization/resources/decisions/index.d.ts → api/types/ListValue.d.ts} +0 -0
- /package/dist/{serialization/resources/decisions/types/index.d.ts → api/types/NumberValue.d.ts} +0 -0
- /package/dist/{serialization/resources/flows/index.d.ts → api/types/ParallelSolveRequest.d.ts} +0 -0
- /package/dist/{serialization/resources/tests/index.d.ts → api/types/ParallelSolveRequestValue.d.ts} +0 -0
- /package/dist/{serialization/resources/tests/types/index.d.ts → api/types/ParallelSolveResponse.d.ts} +0 -0
- /package/{serialization/resources/assets/types/index.d.ts → dist/api/types/RuleBase.d.ts} +0 -0
- /package/{serialization/resources/decisions/index.d.ts → dist/api/types/RuleDetail.d.ts} +0 -0
- /package/{serialization/resources/decisions/types/index.d.ts → dist/api/types/RuleExport.d.ts} +0 -0
- /package/{serialization/resources/flows/index.d.ts → dist/api/types/RuleListResponse.d.ts} +0 -0
- /package/{serialization/resources/tests/index.d.ts → dist/api/types/RuleUsage.d.ts} +0 -0
- /package/{serialization/resources/tests/types/index.d.ts → dist/api/types/SchemaField.d.ts} +0 -0
package/forge/operators.js
DELETED
|
@@ -1,938 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ListField = exports.StringField = exports.DateField = exports.NumberField = exports.BooleanField = exports.Argument = void 0;
|
|
4
|
-
const types_js_1 = require("./types.js");
|
|
5
|
-
const values_js_1 = require("./values.js");
|
|
6
|
-
class Argument {
|
|
7
|
-
constructor(value, expectedType) {
|
|
8
|
-
this.value = value;
|
|
9
|
-
this.expectedType = expectedType;
|
|
10
|
-
this.validateType();
|
|
11
|
-
}
|
|
12
|
-
validateType() {
|
|
13
|
-
if (this.value instanceof values_js_1.DynamicValue) {
|
|
14
|
-
if (this.value.valueType !== this.expectedType) {
|
|
15
|
-
throw new types_js_1.TypeMismatchError(`Dynamic value '${this.value.name}' has type ${this.value.valueType}, ` +
|
|
16
|
-
`but ${this.expectedType} was expected`);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
const expectedJsType = this.getExpectedJsType();
|
|
21
|
-
if (!(typeof this.value === expectedJsType || (expectedJsType === "object" && Array.isArray(this.value)))) {
|
|
22
|
-
const actualType = typeof this.value;
|
|
23
|
-
throw new types_js_1.TypeMismatchError(`Value ${this.value} has type ${actualType}, ` + `but ${this.expectedType} was expected`);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
getExpectedJsType() {
|
|
28
|
-
switch (this.expectedType) {
|
|
29
|
-
case types_js_1.DynamicValueType.STRING:
|
|
30
|
-
return "string";
|
|
31
|
-
case types_js_1.DynamicValueType.NUMBER:
|
|
32
|
-
return "number";
|
|
33
|
-
case types_js_1.DynamicValueType.BOOLEAN:
|
|
34
|
-
return "boolean";
|
|
35
|
-
case types_js_1.DynamicValueType.DATE:
|
|
36
|
-
return "object";
|
|
37
|
-
case types_js_1.DynamicValueType.LIST:
|
|
38
|
-
case types_js_1.DynamicValueType.OBJECT:
|
|
39
|
-
return "object";
|
|
40
|
-
default:
|
|
41
|
-
throw new Error(`Unknown type: ${this.expectedType}`);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
toDict() {
|
|
45
|
-
if (this.value instanceof values_js_1.DynamicValue) {
|
|
46
|
-
return this.value.toDict();
|
|
47
|
-
}
|
|
48
|
-
return this.value;
|
|
49
|
-
}
|
|
50
|
-
static process(arg, expectedType) {
|
|
51
|
-
if (arg instanceof Argument) {
|
|
52
|
-
return arg.toDict();
|
|
53
|
-
}
|
|
54
|
-
else if (arg instanceof values_js_1.DynamicValue) {
|
|
55
|
-
return arg.toDict();
|
|
56
|
-
}
|
|
57
|
-
else if (Array.isArray(arg)) {
|
|
58
|
-
return arg.map((item) => this.process(item, expectedType));
|
|
59
|
-
}
|
|
60
|
-
else if (typeof arg === "object" && arg !== null) {
|
|
61
|
-
const result = {};
|
|
62
|
-
for (const [key, value] of Object.entries(arg)) {
|
|
63
|
-
result[key] = this.process(value, expectedType);
|
|
64
|
-
}
|
|
65
|
-
return result;
|
|
66
|
-
}
|
|
67
|
-
return arg;
|
|
68
|
-
}
|
|
69
|
-
toString() {
|
|
70
|
-
if (this.value instanceof values_js_1.DynamicValue) {
|
|
71
|
-
return `<${this.value.name.toUpperCase()}>`;
|
|
72
|
-
}
|
|
73
|
-
return `${this.value}`;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
exports.Argument = Argument;
|
|
77
|
-
class BooleanField {
|
|
78
|
-
constructor(name, description = "", defaultValue = false) {
|
|
79
|
-
this.type = types_js_1.RuleType.BOOLEAN;
|
|
80
|
-
this.name = name;
|
|
81
|
-
this.description = description;
|
|
82
|
-
this.defaultValue = defaultValue;
|
|
83
|
-
this.operators = {
|
|
84
|
-
any: { name: "any", args: [], description: "Match any boolean value", skipTypecheck: true },
|
|
85
|
-
is_true: { name: "is true", args: [], description: "Check if value is true" },
|
|
86
|
-
is_false: { name: "is false", args: [], description: "Check if value is false" },
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
equals(value) {
|
|
90
|
-
const opName = value ? "is true" : "is false";
|
|
91
|
-
return [opName, []];
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
exports.BooleanField = BooleanField;
|
|
95
|
-
class NumberField {
|
|
96
|
-
constructor(name, description = "", defaultValue = 0) {
|
|
97
|
-
this.type = types_js_1.RuleType.NUMBER;
|
|
98
|
-
this.name = name;
|
|
99
|
-
this.description = description;
|
|
100
|
-
this.defaultValue = defaultValue;
|
|
101
|
-
this.operators = {
|
|
102
|
-
any: { name: "any", args: [], description: "Match any numeric value", skipTypecheck: true },
|
|
103
|
-
equals: {
|
|
104
|
-
name: "equals",
|
|
105
|
-
args: [{ name: "value", type: "number", description: "Number that value must equal" }],
|
|
106
|
-
},
|
|
107
|
-
does_not_equal: {
|
|
108
|
-
name: "does not equal",
|
|
109
|
-
args: [{ name: "value", type: "number", description: "Number that value must not equal" }],
|
|
110
|
-
},
|
|
111
|
-
greater_than: {
|
|
112
|
-
name: "greater than",
|
|
113
|
-
args: [{ name: "bound", type: "number", description: "Number that value must be greater than" }],
|
|
114
|
-
},
|
|
115
|
-
less_than: {
|
|
116
|
-
name: "less than",
|
|
117
|
-
args: [{ name: "bound", type: "number", description: "Number that value must be less than" }],
|
|
118
|
-
},
|
|
119
|
-
greater_than_or_equal: {
|
|
120
|
-
name: "greater than or equal to",
|
|
121
|
-
args: [
|
|
122
|
-
{
|
|
123
|
-
name: "bound",
|
|
124
|
-
type: "number",
|
|
125
|
-
description: "Number that value must be greater than or equal to",
|
|
126
|
-
},
|
|
127
|
-
],
|
|
128
|
-
},
|
|
129
|
-
less_than_or_equal: {
|
|
130
|
-
name: "less than or equal to",
|
|
131
|
-
args: [
|
|
132
|
-
{ name: "bound", type: "number", description: "Number that value must be less than or equal to" },
|
|
133
|
-
],
|
|
134
|
-
},
|
|
135
|
-
between: {
|
|
136
|
-
name: "between",
|
|
137
|
-
args: [
|
|
138
|
-
{
|
|
139
|
-
name: "start",
|
|
140
|
-
type: "number",
|
|
141
|
-
description: "Number that value must be greater than or equal to",
|
|
142
|
-
placeholder: "Start",
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
name: "end",
|
|
146
|
-
type: "number",
|
|
147
|
-
description: "Number that value must be less than or equal to",
|
|
148
|
-
placeholder: "End",
|
|
149
|
-
},
|
|
150
|
-
],
|
|
151
|
-
validate: (args) => args[0] < args[1],
|
|
152
|
-
},
|
|
153
|
-
not_between: {
|
|
154
|
-
name: "not between",
|
|
155
|
-
args: [
|
|
156
|
-
{
|
|
157
|
-
name: "start",
|
|
158
|
-
type: "number",
|
|
159
|
-
description: "Number that value must be less than",
|
|
160
|
-
placeholder: "Start",
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
name: "end",
|
|
164
|
-
type: "number",
|
|
165
|
-
description: "Number that value must be greater than",
|
|
166
|
-
placeholder: "End",
|
|
167
|
-
},
|
|
168
|
-
],
|
|
169
|
-
validate: (args) => args[0] < args[1],
|
|
170
|
-
},
|
|
171
|
-
is_even: { name: "is even", args: [], description: "Check if value is even" },
|
|
172
|
-
is_odd: { name: "is odd", args: [], description: "Check if value is odd" },
|
|
173
|
-
is_positive: { name: "is positive", args: [], description: "Check if value is greater than zero" },
|
|
174
|
-
is_negative: { name: "is negative", args: [], description: "Check if value is less than zero" },
|
|
175
|
-
is_zero: { name: "is zero", args: [], description: "Check if value equals zero" },
|
|
176
|
-
is_not_zero: { name: "is not zero", args: [], description: "Check if value does not equal zero" },
|
|
177
|
-
is_multiple_of: {
|
|
178
|
-
name: "is a multiple of",
|
|
179
|
-
args: [{ name: "multiple", type: "number", description: "Number that value must be a multiple of" }],
|
|
180
|
-
},
|
|
181
|
-
is_not_multiple_of: {
|
|
182
|
-
name: "is not a multiple of",
|
|
183
|
-
args: [
|
|
184
|
-
{ name: "multiple", type: "number", description: "Number that value must not be a multiple of" },
|
|
185
|
-
],
|
|
186
|
-
},
|
|
187
|
-
is_power_of: {
|
|
188
|
-
name: "is a power of",
|
|
189
|
-
args: [{ name: "base", type: "number", description: "The base number" }],
|
|
190
|
-
validate: (args) => args[0] > 0,
|
|
191
|
-
},
|
|
192
|
-
};
|
|
193
|
-
}
|
|
194
|
-
equals(value) {
|
|
195
|
-
return ["equals", [new Argument(value, types_js_1.DynamicValueType.NUMBER).toDict()]];
|
|
196
|
-
}
|
|
197
|
-
not_equals(value) {
|
|
198
|
-
return ["does not equal", [new Argument(value, types_js_1.DynamicValueType.NUMBER).toDict()]];
|
|
199
|
-
}
|
|
200
|
-
greater_than(value) {
|
|
201
|
-
return ["greater than", [new Argument(value, types_js_1.DynamicValueType.NUMBER).toDict()]];
|
|
202
|
-
}
|
|
203
|
-
less_than(value) {
|
|
204
|
-
return ["less than", [new Argument(value, types_js_1.DynamicValueType.NUMBER).toDict()]];
|
|
205
|
-
}
|
|
206
|
-
greater_than_or_equal(value) {
|
|
207
|
-
return ["greater than or equal to", [new Argument(value, types_js_1.DynamicValueType.NUMBER).toDict()]];
|
|
208
|
-
}
|
|
209
|
-
less_than_or_equal(value) {
|
|
210
|
-
return ["less than or equal to", [new Argument(value, types_js_1.DynamicValueType.NUMBER).toDict()]];
|
|
211
|
-
}
|
|
212
|
-
between(start, end) {
|
|
213
|
-
const startArg = new Argument(start, types_js_1.DynamicValueType.NUMBER);
|
|
214
|
-
const endArg = new Argument(end, types_js_1.DynamicValueType.NUMBER);
|
|
215
|
-
if (!(start instanceof values_js_1.DynamicValue) && !(end instanceof values_js_1.DynamicValue)) {
|
|
216
|
-
const op = this.operators["between"];
|
|
217
|
-
if (op.validate && !op.validate([start, end])) {
|
|
218
|
-
throw new Error(`Invalid range for between: start (${start}) must be less than end (${end})`);
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
return ["between", [startArg.toDict(), endArg.toDict()]];
|
|
222
|
-
}
|
|
223
|
-
not_between(start, end) {
|
|
224
|
-
const startArg = new Argument(start, types_js_1.DynamicValueType.NUMBER);
|
|
225
|
-
const endArg = new Argument(end, types_js_1.DynamicValueType.NUMBER);
|
|
226
|
-
if (!(start instanceof values_js_1.DynamicValue) && !(end instanceof values_js_1.DynamicValue)) {
|
|
227
|
-
const op = this.operators["not_between"];
|
|
228
|
-
if (op.validate && !op.validate([start, end])) {
|
|
229
|
-
throw new Error(`Invalid range for not between: start (${start}) must be less than end (${end})`);
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
return ["not between", [startArg.toDict(), endArg.toDict()]];
|
|
233
|
-
}
|
|
234
|
-
is_even() {
|
|
235
|
-
return ["is even", []];
|
|
236
|
-
}
|
|
237
|
-
is_odd() {
|
|
238
|
-
return ["is odd", []];
|
|
239
|
-
}
|
|
240
|
-
is_positive() {
|
|
241
|
-
return ["is positive", []];
|
|
242
|
-
}
|
|
243
|
-
is_negative() {
|
|
244
|
-
return ["is negative", []];
|
|
245
|
-
}
|
|
246
|
-
is_zero() {
|
|
247
|
-
return ["is zero", []];
|
|
248
|
-
}
|
|
249
|
-
is_not_zero() {
|
|
250
|
-
return ["is not zero", []];
|
|
251
|
-
}
|
|
252
|
-
is_multiple_of(value) {
|
|
253
|
-
return ["is a multiple of", [new Argument(value, types_js_1.DynamicValueType.NUMBER).toDict()]];
|
|
254
|
-
}
|
|
255
|
-
is_not_multiple_of(value) {
|
|
256
|
-
return ["is not a multiple of", [new Argument(value, types_js_1.DynamicValueType.NUMBER).toDict()]];
|
|
257
|
-
}
|
|
258
|
-
is_power_of(base) {
|
|
259
|
-
if (!(base instanceof values_js_1.DynamicValue)) {
|
|
260
|
-
const op = this.operators["is_power_of"];
|
|
261
|
-
if (op.validate && !op.validate([base])) {
|
|
262
|
-
throw new Error(`Invalid base for is power of: ${base}. Base must be positive.`);
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
return ["is a power of", [new Argument(base, types_js_1.DynamicValueType.NUMBER).toDict()]];
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
exports.NumberField = NumberField;
|
|
269
|
-
class DateField {
|
|
270
|
-
constructor(name, description = "", defaultValue = null) {
|
|
271
|
-
this.type = types_js_1.RuleType.DATE;
|
|
272
|
-
this.name = name;
|
|
273
|
-
this.description = description;
|
|
274
|
-
this.defaultValue = defaultValue || new Date();
|
|
275
|
-
this.operators = {
|
|
276
|
-
any: { name: "any", args: [], description: "Match any date value", skipTypecheck: true },
|
|
277
|
-
is_past: { name: "is in the past", args: [], description: "Date is in the past" },
|
|
278
|
-
is_future: { name: "is in the future", args: [], description: "Date is in the future" },
|
|
279
|
-
days_ago: {
|
|
280
|
-
name: "days ago",
|
|
281
|
-
args: [{ name: "days", type: "number", description: "Number of days ago that the date is equal to" }],
|
|
282
|
-
},
|
|
283
|
-
less_than_days_ago: {
|
|
284
|
-
name: "is less than N days ago",
|
|
285
|
-
args: [
|
|
286
|
-
{
|
|
287
|
-
name: "days",
|
|
288
|
-
type: "number",
|
|
289
|
-
description: "Number of days ago that the date is less than or equal to",
|
|
290
|
-
},
|
|
291
|
-
],
|
|
292
|
-
},
|
|
293
|
-
more_than_days_ago: {
|
|
294
|
-
name: "is more than N days ago",
|
|
295
|
-
args: [
|
|
296
|
-
{
|
|
297
|
-
name: "days",
|
|
298
|
-
type: "number",
|
|
299
|
-
description: "Number of days ago that the date is more than or equal to",
|
|
300
|
-
},
|
|
301
|
-
],
|
|
302
|
-
},
|
|
303
|
-
days_from_now: {
|
|
304
|
-
name: "days from now",
|
|
305
|
-
args: [
|
|
306
|
-
{ name: "days", type: "number", description: "Number of days from now that the date is equal to" },
|
|
307
|
-
],
|
|
308
|
-
},
|
|
309
|
-
less_than_days_from_now: {
|
|
310
|
-
name: "is less than N days from now",
|
|
311
|
-
args: [
|
|
312
|
-
{
|
|
313
|
-
name: "days",
|
|
314
|
-
type: "number",
|
|
315
|
-
description: "Number of days from now that the date is less than or equal to",
|
|
316
|
-
},
|
|
317
|
-
],
|
|
318
|
-
},
|
|
319
|
-
more_than_days_from_now: {
|
|
320
|
-
name: "is more than N days from now",
|
|
321
|
-
args: [
|
|
322
|
-
{
|
|
323
|
-
name: "days",
|
|
324
|
-
type: "number",
|
|
325
|
-
description: "Number of days from now that the date is more than or equal to",
|
|
326
|
-
},
|
|
327
|
-
],
|
|
328
|
-
},
|
|
329
|
-
is_today: { name: "is today", args: [], description: "Date is today" },
|
|
330
|
-
is_this_week: { name: "is this week", args: [], description: "Date is in the current week" },
|
|
331
|
-
is_this_month: { name: "is this month", args: [], description: "Date is in the current month" },
|
|
332
|
-
is_this_year: { name: "is this year", args: [], description: "Date is in the current year" },
|
|
333
|
-
is_next_week: { name: "is next week", args: [], description: "Date is in the next week" },
|
|
334
|
-
is_next_month: { name: "is next month", args: [], description: "Date is in the next month" },
|
|
335
|
-
is_next_year: { name: "is next year", args: [], description: "Date is in the next year" },
|
|
336
|
-
is_last_week: { name: "is last week", args: [], description: "Date is in the previous week" },
|
|
337
|
-
is_last_month: { name: "is last month", args: [], description: "Date is in the previous month" },
|
|
338
|
-
is_last_year: { name: "is last year", args: [], description: "Date is in the previous year" },
|
|
339
|
-
after: {
|
|
340
|
-
name: "after",
|
|
341
|
-
args: [{ name: "date", type: "date", description: "Date that value must be after" }],
|
|
342
|
-
},
|
|
343
|
-
on_or_after: {
|
|
344
|
-
name: "on or after",
|
|
345
|
-
args: [{ name: "date", type: "date", description: "Date that value must be on or after" }],
|
|
346
|
-
},
|
|
347
|
-
before: {
|
|
348
|
-
name: "before",
|
|
349
|
-
args: [{ name: "date", type: "date", description: "Date that value must be before" }],
|
|
350
|
-
},
|
|
351
|
-
on_or_before: {
|
|
352
|
-
name: "on or before",
|
|
353
|
-
args: [{ name: "date", type: "date", description: "Date that value must be on or before" }],
|
|
354
|
-
},
|
|
355
|
-
between: {
|
|
356
|
-
name: "between",
|
|
357
|
-
args: [
|
|
358
|
-
{ name: "start", type: "date", description: "Date that value must be after", placeholder: "From" },
|
|
359
|
-
{ name: "end", type: "date", description: "Date that value must be before", placeholder: "To" },
|
|
360
|
-
],
|
|
361
|
-
},
|
|
362
|
-
not_between: {
|
|
363
|
-
name: "not between",
|
|
364
|
-
args: [
|
|
365
|
-
{ name: "start", type: "date", description: "Date that value must be before", placeholder: "From" },
|
|
366
|
-
{ name: "end", type: "date", description: "Date that value must be after", placeholder: "To" },
|
|
367
|
-
],
|
|
368
|
-
},
|
|
369
|
-
};
|
|
370
|
-
}
|
|
371
|
-
is_past() {
|
|
372
|
-
return ["is in the past", []];
|
|
373
|
-
}
|
|
374
|
-
is_future() {
|
|
375
|
-
return ["is in the future", []];
|
|
376
|
-
}
|
|
377
|
-
days_ago(days) {
|
|
378
|
-
return ["days ago", [new Argument(days, types_js_1.DynamicValueType.NUMBER).toDict()]];
|
|
379
|
-
}
|
|
380
|
-
less_than_days_ago(days) {
|
|
381
|
-
return ["is less than N days ago", [new Argument(days, types_js_1.DynamicValueType.NUMBER).toDict()]];
|
|
382
|
-
}
|
|
383
|
-
more_than_days_ago(days) {
|
|
384
|
-
return ["is more than N days ago", [new Argument(days, types_js_1.DynamicValueType.NUMBER).toDict()]];
|
|
385
|
-
}
|
|
386
|
-
days_from_now(days) {
|
|
387
|
-
return ["days from now", [new Argument(days, types_js_1.DynamicValueType.NUMBER).toDict()]];
|
|
388
|
-
}
|
|
389
|
-
less_than_days_from_now(days) {
|
|
390
|
-
return ["is less than N days from now", [new Argument(days, types_js_1.DynamicValueType.NUMBER).toDict()]];
|
|
391
|
-
}
|
|
392
|
-
more_than_days_from_now(days) {
|
|
393
|
-
return ["is more than N days from now", [new Argument(days, types_js_1.DynamicValueType.NUMBER).toDict()]];
|
|
394
|
-
}
|
|
395
|
-
is_today() {
|
|
396
|
-
return ["is today", []];
|
|
397
|
-
}
|
|
398
|
-
is_this_week() {
|
|
399
|
-
return ["is this week", []];
|
|
400
|
-
}
|
|
401
|
-
is_this_month() {
|
|
402
|
-
return ["is this month", []];
|
|
403
|
-
}
|
|
404
|
-
is_this_year() {
|
|
405
|
-
return ["is this year", []];
|
|
406
|
-
}
|
|
407
|
-
is_next_week() {
|
|
408
|
-
return ["is next week", []];
|
|
409
|
-
}
|
|
410
|
-
is_next_month() {
|
|
411
|
-
return ["is next month", []];
|
|
412
|
-
}
|
|
413
|
-
is_next_year() {
|
|
414
|
-
return ["is next year", []];
|
|
415
|
-
}
|
|
416
|
-
is_last_week() {
|
|
417
|
-
return ["is last week", []];
|
|
418
|
-
}
|
|
419
|
-
is_last_month() {
|
|
420
|
-
return ["is last month", []];
|
|
421
|
-
}
|
|
422
|
-
is_last_year() {
|
|
423
|
-
return ["is last year", []];
|
|
424
|
-
}
|
|
425
|
-
after(date) {
|
|
426
|
-
return ["after", [new Argument(date, types_js_1.DynamicValueType.DATE).toDict()]];
|
|
427
|
-
}
|
|
428
|
-
on_or_after(date) {
|
|
429
|
-
return ["on or after", [new Argument(date, types_js_1.DynamicValueType.DATE).toDict()]];
|
|
430
|
-
}
|
|
431
|
-
before(date) {
|
|
432
|
-
return ["before", [new Argument(date, types_js_1.DynamicValueType.DATE).toDict()]];
|
|
433
|
-
}
|
|
434
|
-
on_or_before(date) {
|
|
435
|
-
return ["on or before", [new Argument(date, types_js_1.DynamicValueType.DATE).toDict()]];
|
|
436
|
-
}
|
|
437
|
-
between(start, end) {
|
|
438
|
-
return [
|
|
439
|
-
"between",
|
|
440
|
-
[new Argument(start, types_js_1.DynamicValueType.DATE).toDict(), new Argument(end, types_js_1.DynamicValueType.DATE).toDict()],
|
|
441
|
-
];
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
exports.DateField = DateField;
|
|
445
|
-
class StringField {
|
|
446
|
-
constructor(name, description = "", defaultValue = "") {
|
|
447
|
-
this.type = types_js_1.RuleType.STRING;
|
|
448
|
-
this.name = name;
|
|
449
|
-
this.description = description;
|
|
450
|
-
this.defaultValue = defaultValue;
|
|
451
|
-
this.operators = {
|
|
452
|
-
any: { name: "any", args: [], description: "Match any string value", skipTypecheck: true },
|
|
453
|
-
contains: {
|
|
454
|
-
name: "contains",
|
|
455
|
-
args: [
|
|
456
|
-
{
|
|
457
|
-
name: "value",
|
|
458
|
-
type: "string",
|
|
459
|
-
description: "The value to search for within the string",
|
|
460
|
-
validate: (x) => x.length > 0,
|
|
461
|
-
},
|
|
462
|
-
],
|
|
463
|
-
},
|
|
464
|
-
does_not_contain: {
|
|
465
|
-
name: "does not contain",
|
|
466
|
-
args: [
|
|
467
|
-
{
|
|
468
|
-
name: "value",
|
|
469
|
-
type: "string",
|
|
470
|
-
description: "The value to search for within the string",
|
|
471
|
-
validate: (x) => x.length > 0,
|
|
472
|
-
},
|
|
473
|
-
],
|
|
474
|
-
},
|
|
475
|
-
equals: {
|
|
476
|
-
name: "equals",
|
|
477
|
-
args: [{ name: "value", type: "string", description: "The value to compare against" }],
|
|
478
|
-
},
|
|
479
|
-
does_not_equal: {
|
|
480
|
-
name: "does not equal",
|
|
481
|
-
args: [{ name: "value", type: "string", description: "The value to compare against" }],
|
|
482
|
-
},
|
|
483
|
-
is_empty: { name: "is empty", args: [], description: "Check if string is empty" },
|
|
484
|
-
is_not_empty: { name: "is not empty", args: [], description: "Check if string is not empty" },
|
|
485
|
-
starts_with: {
|
|
486
|
-
name: "starts with",
|
|
487
|
-
args: [
|
|
488
|
-
{
|
|
489
|
-
name: "value",
|
|
490
|
-
type: "string",
|
|
491
|
-
description: "The value the string should start with",
|
|
492
|
-
validate: (v) => v.length > 0,
|
|
493
|
-
},
|
|
494
|
-
],
|
|
495
|
-
},
|
|
496
|
-
ends_with: {
|
|
497
|
-
name: "ends with",
|
|
498
|
-
args: [
|
|
499
|
-
{
|
|
500
|
-
name: "value",
|
|
501
|
-
type: "string",
|
|
502
|
-
description: "The value the string should end with",
|
|
503
|
-
validate: (v) => v.length > 0,
|
|
504
|
-
},
|
|
505
|
-
],
|
|
506
|
-
},
|
|
507
|
-
is_included_in: {
|
|
508
|
-
name: "is included in",
|
|
509
|
-
args: [
|
|
510
|
-
{
|
|
511
|
-
name: "value",
|
|
512
|
-
type: "list",
|
|
513
|
-
description: "A list of values the string should be in",
|
|
514
|
-
validate: (v) => v.length > 0,
|
|
515
|
-
},
|
|
516
|
-
],
|
|
517
|
-
},
|
|
518
|
-
is_not_included_in: {
|
|
519
|
-
name: "is not included in",
|
|
520
|
-
args: [
|
|
521
|
-
{
|
|
522
|
-
name: "value",
|
|
523
|
-
type: "list",
|
|
524
|
-
description: "A list of values the string should not be in",
|
|
525
|
-
validate: (v) => v.length > 0,
|
|
526
|
-
},
|
|
527
|
-
],
|
|
528
|
-
},
|
|
529
|
-
matches_regex: {
|
|
530
|
-
name: "matches RegEx",
|
|
531
|
-
args: [
|
|
532
|
-
{
|
|
533
|
-
name: "regex",
|
|
534
|
-
type: "string",
|
|
535
|
-
description: "The regex the string should match",
|
|
536
|
-
validate: (v) => v.length > 0,
|
|
537
|
-
},
|
|
538
|
-
],
|
|
539
|
-
},
|
|
540
|
-
does_not_match_regex: {
|
|
541
|
-
name: "does not match RegEx",
|
|
542
|
-
args: [
|
|
543
|
-
{
|
|
544
|
-
name: "regex",
|
|
545
|
-
type: "string",
|
|
546
|
-
description: "The regex the string should not match",
|
|
547
|
-
validate: (v) => v.length > 0,
|
|
548
|
-
},
|
|
549
|
-
],
|
|
550
|
-
},
|
|
551
|
-
is_valid_email: {
|
|
552
|
-
name: "is a valid email address",
|
|
553
|
-
args: [],
|
|
554
|
-
description: "Check if string is a valid email address",
|
|
555
|
-
},
|
|
556
|
-
is_not_valid_email: {
|
|
557
|
-
name: "is not a valid email address",
|
|
558
|
-
args: [],
|
|
559
|
-
description: "Check if string is not a valid email address",
|
|
560
|
-
},
|
|
561
|
-
is_valid_url: {
|
|
562
|
-
name: "is a valid URL",
|
|
563
|
-
args: [],
|
|
564
|
-
description: "Check if string is a valid URL",
|
|
565
|
-
},
|
|
566
|
-
is_not_valid_url: {
|
|
567
|
-
name: "is not a valid URL",
|
|
568
|
-
args: [],
|
|
569
|
-
description: "Check if string is not a valid URL",
|
|
570
|
-
},
|
|
571
|
-
is_valid_ip: {
|
|
572
|
-
name: "is a valid IP address",
|
|
573
|
-
args: [],
|
|
574
|
-
description: "Check if string is a valid IP address",
|
|
575
|
-
},
|
|
576
|
-
is_not_valid_ip: {
|
|
577
|
-
name: "is not a valid IP address",
|
|
578
|
-
args: [],
|
|
579
|
-
description: "Check if string is not a valid IP address",
|
|
580
|
-
},
|
|
581
|
-
is_uppercase: {
|
|
582
|
-
name: "is uppercase",
|
|
583
|
-
args: [],
|
|
584
|
-
description: "Check if string is all uppercase",
|
|
585
|
-
},
|
|
586
|
-
is_lowercase: {
|
|
587
|
-
name: "is lowercase",
|
|
588
|
-
args: [],
|
|
589
|
-
description: "Check if string is all lowercase",
|
|
590
|
-
},
|
|
591
|
-
is_numeric: {
|
|
592
|
-
name: "is numeric",
|
|
593
|
-
args: [],
|
|
594
|
-
description: "Check if string contains only numeric characters",
|
|
595
|
-
},
|
|
596
|
-
contains_only_digits: {
|
|
597
|
-
name: "contains only digits",
|
|
598
|
-
args: [],
|
|
599
|
-
description: "Check if string contains only digits",
|
|
600
|
-
},
|
|
601
|
-
contains_only_letters: {
|
|
602
|
-
name: "contains only letters",
|
|
603
|
-
args: [],
|
|
604
|
-
description: "Check if string contains only letters",
|
|
605
|
-
},
|
|
606
|
-
contains_only_digits_and_letters: {
|
|
607
|
-
name: "contains only digits and letters",
|
|
608
|
-
args: [],
|
|
609
|
-
description: "Check if string contains only digits and letters",
|
|
610
|
-
},
|
|
611
|
-
};
|
|
612
|
-
}
|
|
613
|
-
contains(value) {
|
|
614
|
-
const arg = new Argument(value, types_js_1.DynamicValueType.STRING);
|
|
615
|
-
if (!(value instanceof values_js_1.DynamicValue)) {
|
|
616
|
-
const op = this.operators["contains"];
|
|
617
|
-
if (op.args[0].validate && !op.args[0].validate(value)) {
|
|
618
|
-
throw new Error(`Invalid value for contains: ${value}`);
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
return ["contains", [arg.toDict()]];
|
|
622
|
-
}
|
|
623
|
-
not_contains(value) {
|
|
624
|
-
const arg = new Argument(value, types_js_1.DynamicValueType.STRING);
|
|
625
|
-
if (!(value instanceof values_js_1.DynamicValue)) {
|
|
626
|
-
const op = this.operators["does_not_contain"];
|
|
627
|
-
if (op.args[0].validate && !op.args[0].validate(value)) {
|
|
628
|
-
throw new Error(`Invalid value for does not contain: ${value}`);
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
return ["does not contain", [arg.toDict()]];
|
|
632
|
-
}
|
|
633
|
-
equals(value) {
|
|
634
|
-
return ["equals", [new Argument(value, types_js_1.DynamicValueType.STRING).toDict()]];
|
|
635
|
-
}
|
|
636
|
-
not_equals(value) {
|
|
637
|
-
return ["does not equal", [new Argument(value, types_js_1.DynamicValueType.STRING).toDict()]];
|
|
638
|
-
}
|
|
639
|
-
is_empty() {
|
|
640
|
-
return ["is empty", []];
|
|
641
|
-
}
|
|
642
|
-
is_not_empty() {
|
|
643
|
-
return ["is not empty", []];
|
|
644
|
-
}
|
|
645
|
-
starts_with(value) {
|
|
646
|
-
const arg = new Argument(value, types_js_1.DynamicValueType.STRING);
|
|
647
|
-
if (!(value instanceof values_js_1.DynamicValue)) {
|
|
648
|
-
const op = this.operators["starts_with"];
|
|
649
|
-
if (op.args[0].validate && !op.args[0].validate(value)) {
|
|
650
|
-
throw new Error(`Invalid value for starts with: ${value}`);
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
return ["starts with", [arg.toDict()]];
|
|
654
|
-
}
|
|
655
|
-
ends_with(value) {
|
|
656
|
-
const arg = new Argument(value, types_js_1.DynamicValueType.STRING);
|
|
657
|
-
if (!(value instanceof values_js_1.DynamicValue)) {
|
|
658
|
-
const op = this.operators["ends_with"];
|
|
659
|
-
if (op.args[0].validate && !op.args[0].validate(value)) {
|
|
660
|
-
throw new Error(`Invalid value for ends with: ${value}`);
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
return ["ends with", [arg.toDict()]];
|
|
664
|
-
}
|
|
665
|
-
is_included_in(values) {
|
|
666
|
-
if (values instanceof values_js_1.DynamicValue) {
|
|
667
|
-
if (values.valueType !== types_js_1.DynamicValueType.LIST) {
|
|
668
|
-
throw new types_js_1.TypeMismatchError(`Dynamic value '${values.name}' has type ${values.valueType}, but list was expected`);
|
|
669
|
-
}
|
|
670
|
-
return ["is included in", [new Argument(values, types_js_1.DynamicValueType.LIST).toDict()]];
|
|
671
|
-
}
|
|
672
|
-
const op = this.operators["is_included_in"];
|
|
673
|
-
if (op.args[0].validate && !op.args[0].validate(values)) {
|
|
674
|
-
throw new Error("List must not be empty");
|
|
675
|
-
}
|
|
676
|
-
return ["is included in", [values.map((v) => new Argument(v, types_js_1.DynamicValueType.STRING).toDict())]];
|
|
677
|
-
}
|
|
678
|
-
matches_regex(pattern) {
|
|
679
|
-
const arg = new Argument(pattern, types_js_1.DynamicValueType.STRING);
|
|
680
|
-
if (!(pattern instanceof values_js_1.DynamicValue)) {
|
|
681
|
-
const op = this.operators["matches_regex"];
|
|
682
|
-
if (op.args[0].validate && !op.args[0].validate(pattern)) {
|
|
683
|
-
throw new Error(`Invalid regex pattern: ${pattern}`);
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
return ["matches RegEx", [arg.toDict()]];
|
|
687
|
-
}
|
|
688
|
-
not_matches_regex(pattern) {
|
|
689
|
-
const arg = new Argument(pattern, types_js_1.DynamicValueType.STRING);
|
|
690
|
-
if (!(pattern instanceof values_js_1.DynamicValue)) {
|
|
691
|
-
const op = this.operators["does_not_match_regex"];
|
|
692
|
-
if (op.args[0].validate && !op.args[0].validate(pattern)) {
|
|
693
|
-
throw new Error(`Invalid regex pattern: ${pattern}`);
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
return ["does not match RegEx", [arg.toDict()]];
|
|
697
|
-
}
|
|
698
|
-
is_email() {
|
|
699
|
-
return ["is a valid email address", []];
|
|
700
|
-
}
|
|
701
|
-
is_not_email() {
|
|
702
|
-
return ["is not a valid email address", []];
|
|
703
|
-
}
|
|
704
|
-
is_url() {
|
|
705
|
-
return ["is a valid URL", []];
|
|
706
|
-
}
|
|
707
|
-
is_not_url() {
|
|
708
|
-
return ["is not a valid URL", []];
|
|
709
|
-
}
|
|
710
|
-
is_ip() {
|
|
711
|
-
return ["is a valid IP address", []];
|
|
712
|
-
}
|
|
713
|
-
is_not_ip() {
|
|
714
|
-
return ["is not a valid IP address", []];
|
|
715
|
-
}
|
|
716
|
-
is_uppercase() {
|
|
717
|
-
return ["is uppercase", []];
|
|
718
|
-
}
|
|
719
|
-
is_lowercase() {
|
|
720
|
-
return ["is lowercase", []];
|
|
721
|
-
}
|
|
722
|
-
is_numeric() {
|
|
723
|
-
return ["is numeric", []];
|
|
724
|
-
}
|
|
725
|
-
contains_only_digits() {
|
|
726
|
-
return ["contains only digits", []];
|
|
727
|
-
}
|
|
728
|
-
contains_only_letters() {
|
|
729
|
-
return ["contains only letters", []];
|
|
730
|
-
}
|
|
731
|
-
contains_only_digits_and_letters() {
|
|
732
|
-
return ["contains only digits and letters", []];
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
exports.StringField = StringField;
|
|
736
|
-
class ListField {
|
|
737
|
-
constructor(name, description = "", defaultValue = []) {
|
|
738
|
-
this.type = types_js_1.RuleType.LIST;
|
|
739
|
-
this.name = name;
|
|
740
|
-
this.description = description;
|
|
741
|
-
this.defaultValue = defaultValue;
|
|
742
|
-
this.operators = {
|
|
743
|
-
any: { name: "any", args: [], description: "Match any list value", skipTypecheck: true },
|
|
744
|
-
contains: {
|
|
745
|
-
name: "contains",
|
|
746
|
-
args: [{ name: "value", type: "generic", description: "Value that must be contained in the list" }],
|
|
747
|
-
},
|
|
748
|
-
is_empty: { name: "is empty", args: [], description: "Check if list is empty" },
|
|
749
|
-
is_not_empty: { name: "is not empty", args: [], description: "Check if list is not empty" },
|
|
750
|
-
is_of_length: {
|
|
751
|
-
name: "is of length",
|
|
752
|
-
args: [{ name: "length", type: "number", description: "Length that the list must be" }],
|
|
753
|
-
},
|
|
754
|
-
is_not_of_length: {
|
|
755
|
-
name: "is not of length",
|
|
756
|
-
args: [{ name: "length", type: "number", description: "Length that the list must not be" }],
|
|
757
|
-
},
|
|
758
|
-
is_longer_than: {
|
|
759
|
-
name: "is longer than",
|
|
760
|
-
args: [{ name: "length", type: "number", description: "Length that the list must be longer than" }],
|
|
761
|
-
},
|
|
762
|
-
is_shorter_than: {
|
|
763
|
-
name: "is shorter than",
|
|
764
|
-
args: [{ name: "length", type: "number", description: "Length that the list must be shorter than" }],
|
|
765
|
-
},
|
|
766
|
-
contains_all_of: {
|
|
767
|
-
name: "contains all of",
|
|
768
|
-
args: [
|
|
769
|
-
{ name: "values", type: "list", description: "List of values that must be contained in the list" },
|
|
770
|
-
],
|
|
771
|
-
},
|
|
772
|
-
contains_any_of: {
|
|
773
|
-
name: "contains any of",
|
|
774
|
-
args: [
|
|
775
|
-
{ name: "values", type: "list", description: "List of values that might be contained in the list" },
|
|
776
|
-
],
|
|
777
|
-
},
|
|
778
|
-
contains_none_of: {
|
|
779
|
-
name: "contains none of",
|
|
780
|
-
args: [
|
|
781
|
-
{
|
|
782
|
-
name: "values",
|
|
783
|
-
type: "list",
|
|
784
|
-
description: "List of values that must not be contained in the list",
|
|
785
|
-
},
|
|
786
|
-
],
|
|
787
|
-
},
|
|
788
|
-
does_not_contain: {
|
|
789
|
-
name: "does not contain",
|
|
790
|
-
args: [{ name: "value", type: "generic", description: "Value that must not be contained in the list" }],
|
|
791
|
-
},
|
|
792
|
-
is_equal_to: {
|
|
793
|
-
name: "is equal to",
|
|
794
|
-
args: [{ name: "list", type: "list", description: "Value that the list must be equal to" }],
|
|
795
|
-
},
|
|
796
|
-
is_not_equal_to: {
|
|
797
|
-
name: "is not equal to",
|
|
798
|
-
args: [{ name: "list", type: "list", description: "Value that the list must not be equal to" }],
|
|
799
|
-
},
|
|
800
|
-
contains_duplicates: {
|
|
801
|
-
name: "contains duplicates",
|
|
802
|
-
args: [],
|
|
803
|
-
description: "Check if list contains duplicate values",
|
|
804
|
-
},
|
|
805
|
-
does_not_contain_duplicates: {
|
|
806
|
-
name: "does not contain duplicates",
|
|
807
|
-
args: [],
|
|
808
|
-
description: "Check if list does not contain duplicate values",
|
|
809
|
-
},
|
|
810
|
-
contains_object_with_key_value: {
|
|
811
|
-
name: "contains object with key & value",
|
|
812
|
-
args: [
|
|
813
|
-
{ name: "key", type: "string", description: "Key of any object contained in the list" },
|
|
814
|
-
{ name: "value", type: "generic", description: "Value that the key must be equal to" },
|
|
815
|
-
],
|
|
816
|
-
},
|
|
817
|
-
has_unique_elements: {
|
|
818
|
-
name: "has unique elements",
|
|
819
|
-
args: [],
|
|
820
|
-
description: "Check if all elements in the list are unique",
|
|
821
|
-
},
|
|
822
|
-
is_sublist_of: {
|
|
823
|
-
name: "is a sublist of",
|
|
824
|
-
args: [{ name: "superlist", type: "list", description: "List that should contain this list" }],
|
|
825
|
-
},
|
|
826
|
-
is_superlist_of: {
|
|
827
|
-
name: "is a superlist of",
|
|
828
|
-
args: [{ name: "sublist", type: "list", description: "List that should be contained in this list" }],
|
|
829
|
-
},
|
|
830
|
-
};
|
|
831
|
-
}
|
|
832
|
-
contains(value) {
|
|
833
|
-
return ["contains", [new Argument(value, types_js_1.DynamicValueType.OBJECT).toDict()]];
|
|
834
|
-
}
|
|
835
|
-
is_empty() {
|
|
836
|
-
return ["is empty", []];
|
|
837
|
-
}
|
|
838
|
-
is_not_empty() {
|
|
839
|
-
return ["is not empty", []];
|
|
840
|
-
}
|
|
841
|
-
length_equals(length) {
|
|
842
|
-
return ["is of length", [new Argument(length, types_js_1.DynamicValueType.NUMBER).toDict()]];
|
|
843
|
-
}
|
|
844
|
-
length_not_equals(length) {
|
|
845
|
-
return ["is not of length", [new Argument(length, types_js_1.DynamicValueType.NUMBER).toDict()]];
|
|
846
|
-
}
|
|
847
|
-
longer_than(length) {
|
|
848
|
-
return ["is longer than", [new Argument(length, types_js_1.DynamicValueType.NUMBER).toDict()]];
|
|
849
|
-
}
|
|
850
|
-
shorter_than(length) {
|
|
851
|
-
return ["is shorter than", [new Argument(length, types_js_1.DynamicValueType.NUMBER).toDict()]];
|
|
852
|
-
}
|
|
853
|
-
contains_all(values) {
|
|
854
|
-
if (values instanceof values_js_1.DynamicValue) {
|
|
855
|
-
if (values.valueType !== types_js_1.DynamicValueType.LIST) {
|
|
856
|
-
throw new types_js_1.TypeMismatchError(`Dynamic value '${values.name}' has type ${values.valueType}, but list was expected`);
|
|
857
|
-
}
|
|
858
|
-
return ["contains all of", [new Argument(values, types_js_1.DynamicValueType.LIST).toDict()]];
|
|
859
|
-
}
|
|
860
|
-
return ["contains all of", [values.map((v) => new Argument(v, types_js_1.DynamicValueType.OBJECT).toDict())]];
|
|
861
|
-
}
|
|
862
|
-
contains_any(values) {
|
|
863
|
-
if (values instanceof values_js_1.DynamicValue) {
|
|
864
|
-
if (values.valueType !== types_js_1.DynamicValueType.LIST) {
|
|
865
|
-
throw new types_js_1.TypeMismatchError(`Dynamic value '${values.name}' has type ${values.valueType}, but list was expected`);
|
|
866
|
-
}
|
|
867
|
-
return ["contains any of", [new Argument(values, types_js_1.DynamicValueType.LIST).toDict()]];
|
|
868
|
-
}
|
|
869
|
-
return ["contains any of", [values.map((v) => new Argument(v, types_js_1.DynamicValueType.OBJECT).toDict())]];
|
|
870
|
-
}
|
|
871
|
-
contains_none(values) {
|
|
872
|
-
if (values instanceof values_js_1.DynamicValue) {
|
|
873
|
-
if (values.valueType !== types_js_1.DynamicValueType.LIST) {
|
|
874
|
-
throw new types_js_1.TypeMismatchError(`Dynamic value '${values.name}' has type ${values.valueType}, but list was expected`);
|
|
875
|
-
}
|
|
876
|
-
return ["contains none of", [new Argument(values, types_js_1.DynamicValueType.LIST).toDict()]];
|
|
877
|
-
}
|
|
878
|
-
return ["contains none of", [values.map((v) => new Argument(v, types_js_1.DynamicValueType.OBJECT).toDict())]];
|
|
879
|
-
}
|
|
880
|
-
not_contains(value) {
|
|
881
|
-
return ["does not contain", [new Argument(value, types_js_1.DynamicValueType.OBJECT).toDict()]];
|
|
882
|
-
}
|
|
883
|
-
equals(other) {
|
|
884
|
-
if (other instanceof values_js_1.DynamicValue) {
|
|
885
|
-
if (other.valueType !== types_js_1.DynamicValueType.LIST) {
|
|
886
|
-
throw new types_js_1.TypeMismatchError(`Dynamic value '${other.name}' has type ${other.valueType}, but list was expected`);
|
|
887
|
-
}
|
|
888
|
-
return ["is equal to", [new Argument(other, types_js_1.DynamicValueType.LIST).toDict()]];
|
|
889
|
-
}
|
|
890
|
-
return ["is equal to", [other.map((v) => new Argument(v, types_js_1.DynamicValueType.OBJECT).toDict())]];
|
|
891
|
-
}
|
|
892
|
-
not_equals(other) {
|
|
893
|
-
if (other instanceof values_js_1.DynamicValue) {
|
|
894
|
-
if (other.valueType !== types_js_1.DynamicValueType.LIST) {
|
|
895
|
-
throw new types_js_1.TypeMismatchError(`Dynamic value '${other.name}' has type ${other.valueType}, but list was expected`);
|
|
896
|
-
}
|
|
897
|
-
return ["is not equal to", [new Argument(other, types_js_1.DynamicValueType.LIST).toDict()]];
|
|
898
|
-
}
|
|
899
|
-
return ["is not equal to", [other.map((v) => new Argument(v, types_js_1.DynamicValueType.OBJECT).toDict())]];
|
|
900
|
-
}
|
|
901
|
-
has_duplicates() {
|
|
902
|
-
return ["contains duplicates", []];
|
|
903
|
-
}
|
|
904
|
-
no_duplicates() {
|
|
905
|
-
return ["does not contain duplicates", []];
|
|
906
|
-
}
|
|
907
|
-
contains_object_with_key_value(key, value) {
|
|
908
|
-
return [
|
|
909
|
-
"contains object with key & value",
|
|
910
|
-
[
|
|
911
|
-
new Argument(key, types_js_1.DynamicValueType.STRING).toDict(),
|
|
912
|
-
new Argument(value, types_js_1.DynamicValueType.OBJECT).toDict(),
|
|
913
|
-
],
|
|
914
|
-
];
|
|
915
|
-
}
|
|
916
|
-
has_unique_elements() {
|
|
917
|
-
return ["has unique elements", []];
|
|
918
|
-
}
|
|
919
|
-
is_sublist_of(superlist) {
|
|
920
|
-
if (superlist instanceof values_js_1.DynamicValue) {
|
|
921
|
-
if (superlist.valueType !== types_js_1.DynamicValueType.LIST) {
|
|
922
|
-
throw new types_js_1.TypeMismatchError(`Dynamic value '${superlist.name}' has type ${superlist.valueType}, but list was expected`);
|
|
923
|
-
}
|
|
924
|
-
return ["is a sublist of", [new Argument(superlist, types_js_1.DynamicValueType.LIST).toDict()]];
|
|
925
|
-
}
|
|
926
|
-
return ["is a sublist of", [superlist.map((v) => new Argument(v, types_js_1.DynamicValueType.OBJECT).toDict())]];
|
|
927
|
-
}
|
|
928
|
-
is_superlist_of(sublist) {
|
|
929
|
-
if (sublist instanceof values_js_1.DynamicValue) {
|
|
930
|
-
if (sublist.valueType !== types_js_1.DynamicValueType.LIST) {
|
|
931
|
-
throw new types_js_1.TypeMismatchError(`Dynamic value '${sublist.name}' has type ${sublist.valueType}, but list was expected`);
|
|
932
|
-
}
|
|
933
|
-
return ["is a superlist of", [new Argument(sublist, types_js_1.DynamicValueType.LIST).toDict()]];
|
|
934
|
-
}
|
|
935
|
-
return ["is a superlist of", [sublist.map((v) => new Argument(v, types_js_1.DynamicValueType.OBJECT).toDict())]];
|
|
936
|
-
}
|
|
937
|
-
}
|
|
938
|
-
exports.ListField = ListField;
|