@rulebricks/sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +26 -0
- package/Client.js +47 -0
- package/LICENSE.txt +21 -0
- package/README.md +83 -0
- package/api/errors/BadRequestError.d.ts +7 -0
- package/api/errors/BadRequestError.js +47 -0
- package/api/errors/ForbiddenError.d.ts +7 -0
- package/api/errors/ForbiddenError.js +47 -0
- package/api/errors/InternalServerError.d.ts +7 -0
- package/api/errors/InternalServerError.js +47 -0
- package/api/errors/NotFoundError.d.ts +7 -0
- package/api/errors/NotFoundError.js +47 -0
- package/api/errors/index.d.ts +1 -0
- package/api/errors/index.js +24 -0
- package/api/index.d.ts +1 -0
- package/api/index.js +23 -0
- package/api/resources/assets/client/Client.d.ts +100 -0
- package/api/resources/assets/client/Client.js +611 -0
- package/api/resources/assets/client/index.d.ts +1 -0
- package/api/resources/assets/client/index.js +21 -0
- package/api/resources/assets/client/requests/DeleteFolderRequest.d.ts +1 -0
- package/api/resources/assets/client/requests/DeleteFolderRequest.js +5 -0
- package/api/resources/assets/client/requests/DeleteRuleRequest.d.ts +1 -0
- package/api/resources/assets/client/requests/DeleteRuleRequest.js +5 -0
- package/api/resources/assets/client/requests/ExportRuleRequest.d.ts +1 -0
- package/api/resources/assets/client/requests/ExportRuleRequest.js +5 -0
- package/api/resources/assets/client/requests/ImportRuleRequest.d.ts +1 -0
- package/api/resources/assets/client/requests/ImportRuleRequest.js +5 -0
- package/api/resources/assets/client/requests/ListRulesRequest.d.ts +1 -0
- package/api/resources/assets/client/requests/ListRulesRequest.js +5 -0
- package/api/resources/assets/client/requests/UpsertFolderRequest.d.ts +1 -0
- package/api/resources/assets/client/requests/UpsertFolderRequest.js +5 -0
- package/api/resources/assets/client/requests/index.d.ts +1 -0
- package/api/resources/assets/client/requests/index.js +2 -0
- package/api/resources/assets/index.d.ts +1 -0
- package/api/resources/assets/index.js +22 -0
- package/api/resources/assets/types/DeleteFolderResponse.d.ts +1 -0
- package/api/resources/assets/types/DeleteFolderResponse.js +5 -0
- package/api/resources/assets/types/DeleteRuleResponse.d.ts +1 -0
- package/api/resources/assets/types/DeleteRuleResponse.js +5 -0
- package/api/resources/assets/types/ListFlowsResponseItem.d.ts +1 -0
- package/api/resources/assets/types/ListFlowsResponseItem.js +5 -0
- package/api/resources/assets/types/ListFoldersResponseItem.d.ts +1 -0
- package/api/resources/assets/types/ListFoldersResponseItem.js +5 -0
- package/api/resources/assets/types/ListRulesResponseItem.d.ts +1 -0
- package/api/resources/assets/types/ListRulesResponseItem.js +5 -0
- package/api/resources/assets/types/ListRulesResponseItemFolder.d.ts +1 -0
- package/api/resources/assets/types/ListRulesResponseItemFolder.js +5 -0
- package/api/resources/assets/types/UpsertFolderResponse.d.ts +1 -0
- package/api/resources/assets/types/UpsertFolderResponse.js +5 -0
- package/api/resources/assets/types/UsageResponse.d.ts +1 -0
- package/api/resources/assets/types/UsageResponse.js +5 -0
- package/api/resources/assets/types/index.d.ts +1 -0
- package/api/resources/assets/types/index.js +28 -0
- package/api/resources/decisions/client/Client.d.ts +19 -0
- package/api/resources/decisions/client/Client.js +146 -0
- package/api/resources/decisions/client/index.d.ts +1 -0
- package/api/resources/decisions/client/index.js +21 -0
- package/api/resources/decisions/client/requests/QueryRequest.d.ts +1 -0
- package/api/resources/decisions/client/requests/QueryRequest.js +5 -0
- package/api/resources/decisions/client/requests/index.d.ts +1 -0
- package/api/resources/decisions/client/requests/index.js +2 -0
- package/api/resources/decisions/index.d.ts +1 -0
- package/api/resources/decisions/index.js +22 -0
- package/api/resources/decisions/types/QueryResponse.d.ts +1 -0
- package/api/resources/decisions/types/QueryResponse.js +5 -0
- package/api/resources/decisions/types/index.d.ts +1 -0
- package/api/resources/decisions/types/index.js +21 -0
- package/api/resources/flows/client/Client.d.ts +21 -0
- package/api/resources/flows/client/Client.js +133 -0
- package/api/resources/flows/client/index.d.ts +1 -0
- package/api/resources/flows/client/index.js +2 -0
- package/api/resources/flows/index.d.ts +1 -0
- package/api/resources/flows/index.js +21 -0
- package/api/resources/index.d.ts +8 -0
- package/api/resources/index.js +54 -0
- package/api/resources/rules/client/Client.d.ts +60 -0
- package/api/resources/rules/client/Client.js +272 -0
- package/api/resources/rules/client/index.d.ts +1 -0
- package/api/resources/rules/client/index.js +2 -0
- package/api/resources/rules/index.d.ts +1 -0
- package/api/resources/rules/index.js +21 -0
- package/api/resources/tests/client/Client.d.ts +82 -0
- package/api/resources/tests/client/Client.js +439 -0
- package/api/resources/tests/client/index.d.ts +1 -0
- package/api/resources/tests/client/index.js +21 -0
- package/api/resources/tests/client/requests/CreateFlowTestRequest.d.ts +1 -0
- package/api/resources/tests/client/requests/CreateFlowTestRequest.js +5 -0
- package/api/resources/tests/client/requests/CreateRuleTestRequest.d.ts +1 -0
- package/api/resources/tests/client/requests/CreateRuleTestRequest.js +5 -0
- package/api/resources/tests/client/requests/index.d.ts +1 -0
- package/api/resources/tests/client/requests/index.js +2 -0
- package/api/resources/tests/index.d.ts +1 -0
- package/api/resources/tests/index.js +22 -0
- package/api/resources/tests/types/CreateFlowTestResponse.d.ts +1 -0
- package/api/resources/tests/types/CreateFlowTestResponse.js +5 -0
- package/api/resources/tests/types/CreateRuleTestResponse.d.ts +1 -0
- package/api/resources/tests/types/CreateRuleTestResponse.js +5 -0
- package/api/resources/tests/types/DeleteFlowTestResponse.d.ts +1 -0
- package/api/resources/tests/types/DeleteFlowTestResponse.js +5 -0
- package/api/resources/tests/types/DeleteRuleTestResponse.d.ts +1 -0
- package/api/resources/tests/types/DeleteRuleTestResponse.js +5 -0
- package/api/resources/tests/types/ListFlowTestsResponseItem.d.ts +1 -0
- package/api/resources/tests/types/ListFlowTestsResponseItem.js +5 -0
- package/api/resources/tests/types/ListRuleTestsResponseItem.d.ts +1 -0
- package/api/resources/tests/types/ListRuleTestsResponseItem.js +5 -0
- package/api/resources/tests/types/index.d.ts +1 -0
- package/api/resources/tests/types/index.js +26 -0
- package/api/resources/users/client/Client.d.ts +62 -0
- package/api/resources/users/client/Client.js +269 -0
- package/api/resources/users/client/index.d.ts +1 -0
- package/api/resources/users/client/index.js +21 -0
- package/api/resources/users/client/requests/CreateGroupRequest.d.ts +1 -0
- package/api/resources/users/client/requests/CreateGroupRequest.js +5 -0
- package/api/resources/users/client/requests/InviteRequest.d.ts +1 -0
- package/api/resources/users/client/requests/InviteRequest.js +5 -0
- package/api/resources/users/client/requests/index.d.ts +1 -0
- package/api/resources/users/client/requests/index.js +2 -0
- package/api/resources/users/index.d.ts +1 -0
- package/api/resources/users/index.js +22 -0
- package/api/resources/users/types/CreateGroupResponse.d.ts +1 -0
- package/api/resources/users/types/CreateGroupResponse.js +5 -0
- package/api/resources/users/types/InviteRequestRole.d.ts +5 -0
- package/api/resources/users/types/InviteRequestRole.js +10 -0
- package/api/resources/users/types/InviteResponse.d.ts +1 -0
- package/api/resources/users/types/InviteResponse.js +5 -0
- package/api/resources/users/types/ListGroupsResponseItem.d.ts +1 -0
- package/api/resources/users/types/ListGroupsResponseItem.js +5 -0
- package/api/resources/users/types/index.d.ts +1 -0
- package/api/resources/users/types/index.js +24 -0
- package/api/resources/values/client/Client.d.ts +37 -0
- package/api/resources/values/client/Client.js +255 -0
- package/api/resources/values/client/index.d.ts +1 -0
- package/api/resources/values/client/index.js +21 -0
- package/api/resources/values/client/requests/DeleteDynamicValueRequest.d.ts +1 -0
- package/api/resources/values/client/requests/DeleteDynamicValueRequest.js +5 -0
- package/api/resources/values/client/requests/ListDynamicValuesRequest.d.ts +1 -0
- package/api/resources/values/client/requests/ListDynamicValuesRequest.js +5 -0
- package/api/resources/values/client/requests/index.d.ts +1 -0
- package/api/resources/values/client/requests/index.js +2 -0
- package/api/resources/values/index.d.ts +1 -0
- package/api/resources/values/index.js +22 -0
- package/api/resources/values/types/DeleteDynamicValueResponse.d.ts +1 -0
- package/api/resources/values/types/DeleteDynamicValueResponse.js +5 -0
- package/api/resources/values/types/ListDynamicValuesResponseItem.d.ts +1 -0
- package/api/resources/values/types/ListDynamicValuesResponseItem.js +5 -0
- package/api/resources/values/types/ListDynamicValuesResponseItemType.d.ts +7 -0
- package/api/resources/values/types/ListDynamicValuesResponseItemType.js +12 -0
- package/api/resources/values/types/ListDynamicValuesResponseItemUsagesItem.d.ts +1 -0
- package/api/resources/values/types/ListDynamicValuesResponseItemUsagesItem.js +5 -0
- package/api/resources/values/types/ListDynamicValuesResponseItemValue.d.ts +1 -0
- package/api/resources/values/types/ListDynamicValuesResponseItemValue.js +5 -0
- package/api/resources/values/types/UpdateRequestValue.d.ts +1 -0
- package/api/resources/values/types/UpdateRequestValue.js +5 -0
- package/api/resources/values/types/UpdateResponseItem.d.ts +1 -0
- package/api/resources/values/types/UpdateResponseItem.js +5 -0
- package/api/resources/values/types/UpdateResponseItemType.d.ts +7 -0
- package/api/resources/values/types/UpdateResponseItemType.js +12 -0
- package/api/resources/values/types/UpdateResponseItemValue.d.ts +1 -0
- package/api/resources/values/types/UpdateResponseItemValue.js +5 -0
- package/api/resources/values/types/index.d.ts +1 -0
- package/api/resources/values/types/index.js +29 -0
- package/api/types/BadRequestErrorBody.d.ts +1 -0
- package/api/types/BadRequestErrorBody.js +5 -0
- package/api/types/ForbiddenErrorBody.d.ts +1 -0
- package/api/types/ForbiddenErrorBody.js +5 -0
- package/api/types/InternalServerErrorBody.d.ts +1 -0
- package/api/types/InternalServerErrorBody.js +5 -0
- package/api/types/NotFoundErrorBody.d.ts +1 -0
- package/api/types/NotFoundErrorBody.js +5 -0
- package/api/types/index.d.ts +1 -0
- package/api/types/index.js +24 -0
- package/banner.png +0 -0
- package/core/fetcher/APIResponse.d.ts +1 -0
- package/core/fetcher/APIResponse.js +2 -0
- package/core/fetcher/Fetcher.d.ts +3 -0
- package/core/fetcher/Fetcher.js +161 -0
- package/core/fetcher/Supplier.d.ts +4 -0
- package/core/fetcher/Supplier.js +32 -0
- package/core/fetcher/getHeader.d.ts +2 -0
- package/core/fetcher/getHeader.js +12 -0
- package/core/fetcher/index.d.ts +9 -0
- package/core/fetcher/index.js +9 -0
- package/core/index.d.ts +2 -0
- package/core/index.js +39 -0
- package/core/schemas/Schema.d.ts +19 -0
- package/core/schemas/Schema.js +21 -0
- package/core/schemas/builders/date/date.d.ts +4 -0
- package/core/schemas/builders/date/date.js +63 -0
- package/core/schemas/builders/date/index.d.ts +3 -0
- package/core/schemas/builders/date/index.js +5 -0
- package/core/schemas/builders/enum/enum.d.ts +3 -0
- package/core/schemas/builders/enum/enum.js +39 -0
- package/core/schemas/builders/enum/index.d.ts +3 -0
- package/core/schemas/builders/enum/index.js +5 -0
- package/core/schemas/builders/index.d.ts +1 -0
- package/core/schemas/builders/index.js +33 -0
- package/core/schemas/builders/lazy/index.d.ts +5 -0
- package/core/schemas/builders/lazy/index.js +7 -0
- package/core/schemas/builders/lazy/lazy.d.ts +13 -0
- package/core/schemas/builders/lazy/lazy.js +46 -0
- package/core/schemas/builders/lazy/lazyObject.d.ts +8 -0
- package/core/schemas/builders/lazy/lazyObject.js +31 -0
- package/core/schemas/builders/list/index.d.ts +3 -0
- package/core/schemas/builders/list/index.js +5 -0
- package/core/schemas/builders/list/list.d.ts +7 -0
- package/core/schemas/builders/list/list.js +78 -0
- package/core/schemas/builders/literals/booleanLiteral.d.ts +3 -0
- package/core/schemas/builders/literals/booleanLiteral.js +29 -0
- package/core/schemas/builders/literals/index.d.ts +5 -0
- package/core/schemas/builders/literals/index.js +7 -0
- package/core/schemas/builders/literals/stringLiteral.d.ts +3 -0
- package/core/schemas/builders/literals/stringLiteral.js +29 -0
- package/core/schemas/builders/object/index.d.ts +9 -0
- package/core/schemas/builders/object/index.js +11 -0
- package/core/schemas/builders/object/object.d.ts +27 -0
- package/core/schemas/builders/object/object.js +268 -0
- package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +2 -0
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +8 -0
- package/core/schemas/builders/object/property.d.ts +7 -0
- package/core/schemas/builders/object/property.js +16 -0
- package/core/schemas/builders/object/types.d.ts +1 -0
- package/core/schemas/builders/object/types.js +2 -0
- package/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +23 -0
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +73 -0
- package/core/schemas/builders/object-like/index.d.ts +4 -0
- package/core/schemas/builders/object-like/index.js +6 -0
- package/core/schemas/builders/object-like/types.d.ts +1 -0
- package/core/schemas/builders/object-like/types.js +2 -0
- package/core/schemas/builders/primitives/any.d.ts +3 -0
- package/core/schemas/builders/primitives/any.js +6 -0
- package/core/schemas/builders/primitives/boolean.d.ts +3 -0
- package/core/schemas/builders/primitives/boolean.js +25 -0
- package/core/schemas/builders/primitives/index.d.ts +6 -0
- package/core/schemas/builders/primitives/index.js +13 -0
- package/core/schemas/builders/primitives/number.d.ts +3 -0
- package/core/schemas/builders/primitives/number.js +25 -0
- package/core/schemas/builders/primitives/string.d.ts +3 -0
- package/core/schemas/builders/primitives/string.js +25 -0
- package/core/schemas/builders/primitives/unknown.d.ts +3 -0
- package/core/schemas/builders/primitives/unknown.js +6 -0
- package/core/schemas/builders/record/index.d.ts +3 -0
- package/core/schemas/builders/record/index.js +5 -0
- package/core/schemas/builders/record/record.d.ts +7 -0
- package/core/schemas/builders/record/record.js +116 -0
- package/core/schemas/builders/record/types.d.ts +1 -0
- package/core/schemas/builders/record/types.js +2 -0
- package/core/schemas/builders/schema-utils/JsonError.d.ts +5 -0
- package/core/schemas/builders/schema-utils/JsonError.js +12 -0
- package/core/schemas/builders/schema-utils/ParseError.d.ts +5 -0
- package/core/schemas/builders/schema-utils/ParseError.js +12 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +54 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +95 -0
- package/core/schemas/builders/schema-utils/index.d.ts +9 -0
- package/core/schemas/builders/schema-utils/index.js +11 -0
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +2 -0
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +10 -0
- package/core/schemas/builders/set/index.d.ts +3 -0
- package/core/schemas/builders/set/index.js +5 -0
- package/core/schemas/builders/set/set.d.ts +7 -0
- package/core/schemas/builders/set/set.js +63 -0
- package/core/schemas/builders/undiscriminated-union/index.d.ts +3 -0
- package/core/schemas/builders/undiscriminated-union/index.js +5 -0
- package/core/schemas/builders/undiscriminated-union/types.d.ts +1 -0
- package/core/schemas/builders/undiscriminated-union/types.js +2 -0
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +7 -0
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +61 -0
- package/core/schemas/builders/union/discriminant.d.ts +5 -0
- package/core/schemas/builders/union/discriminant.js +10 -0
- package/core/schemas/builders/union/index.d.ts +5 -0
- package/core/schemas/builders/union/index.js +7 -0
- package/core/schemas/builders/union/types.d.ts +1 -0
- package/core/schemas/builders/union/types.js +2 -0
- package/core/schemas/builders/union/union.d.ts +8 -0
- package/core/schemas/builders/union/union.js +152 -0
- package/core/schemas/index.d.ts +1 -0
- package/core/schemas/index.js +21 -0
- package/core/schemas/utils/MaybePromise.d.ts +1 -0
- package/core/schemas/utils/MaybePromise.js +2 -0
- package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +1 -0
- package/core/schemas/utils/addQuestionMarksToNullableProperties.js +2 -0
- package/core/schemas/utils/createIdentitySchemaCreator.d.ts +7 -0
- package/core/schemas/utils/createIdentitySchemaCreator.js +16 -0
- package/core/schemas/utils/entries.d.ts +2 -0
- package/core/schemas/utils/entries.js +7 -0
- package/core/schemas/utils/filterObject.d.ts +2 -0
- package/core/schemas/utils/filterObject.js +14 -0
- package/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +2 -0
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +24 -0
- package/core/schemas/utils/isPlainObject.d.ts +2 -0
- package/core/schemas/utils/isPlainObject.js +18 -0
- package/core/schemas/utils/keys.d.ts +2 -0
- package/core/schemas/utils/keys.js +7 -0
- package/core/schemas/utils/maybeSkipValidation.d.ts +2 -0
- package/core/schemas/utils/maybeSkipValidation.js +47 -0
- package/core/schemas/utils/partition.d.ts +2 -0
- package/core/schemas/utils/partition.js +16 -0
- package/dist/Client.d.ts +26 -0
- package/dist/Client.js +47 -0
- package/dist/api/errors/BadRequestError.d.ts +7 -0
- package/dist/api/errors/BadRequestError.js +47 -0
- package/dist/api/errors/ForbiddenError.d.ts +7 -0
- package/dist/api/errors/ForbiddenError.js +47 -0
- package/dist/api/errors/InternalServerError.d.ts +7 -0
- package/dist/api/errors/InternalServerError.js +47 -0
- package/dist/api/errors/NotFoundError.d.ts +7 -0
- package/dist/api/errors/NotFoundError.js +47 -0
- package/dist/api/errors/index.d.ts +1 -0
- package/dist/api/errors/index.js +24 -0
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +23 -0
- package/dist/api/resources/assets/client/Client.d.ts +100 -0
- package/dist/api/resources/assets/client/Client.js +611 -0
- package/dist/api/resources/assets/client/index.d.ts +1 -0
- package/dist/api/resources/assets/client/index.js +21 -0
- package/dist/api/resources/assets/client/requests/DeleteFolderRequest.d.ts +1 -0
- package/dist/api/resources/assets/client/requests/DeleteFolderRequest.js +5 -0
- package/dist/api/resources/assets/client/requests/DeleteRuleRequest.d.ts +1 -0
- package/dist/api/resources/assets/client/requests/DeleteRuleRequest.js +5 -0
- package/dist/api/resources/assets/client/requests/ExportRuleRequest.d.ts +1 -0
- package/dist/api/resources/assets/client/requests/ExportRuleRequest.js +5 -0
- package/dist/api/resources/assets/client/requests/ImportRuleRequest.d.ts +1 -0
- package/dist/api/resources/assets/client/requests/ImportRuleRequest.js +5 -0
- package/dist/api/resources/assets/client/requests/ListRulesRequest.d.ts +1 -0
- package/dist/api/resources/assets/client/requests/ListRulesRequest.js +5 -0
- package/dist/api/resources/assets/client/requests/UpsertFolderRequest.d.ts +1 -0
- package/dist/api/resources/assets/client/requests/UpsertFolderRequest.js +5 -0
- package/dist/api/resources/assets/client/requests/index.d.ts +1 -0
- package/dist/api/resources/assets/client/requests/index.js +2 -0
- package/dist/api/resources/assets/index.d.ts +1 -0
- package/dist/api/resources/assets/index.js +22 -0
- package/dist/api/resources/assets/types/DeleteFolderResponse.d.ts +1 -0
- package/dist/api/resources/assets/types/DeleteFolderResponse.js +5 -0
- package/dist/api/resources/assets/types/DeleteRuleResponse.d.ts +1 -0
- package/dist/api/resources/assets/types/DeleteRuleResponse.js +5 -0
- package/dist/api/resources/assets/types/ListFlowsResponseItem.d.ts +1 -0
- package/dist/api/resources/assets/types/ListFlowsResponseItem.js +5 -0
- package/dist/api/resources/assets/types/ListFoldersResponseItem.d.ts +1 -0
- package/dist/api/resources/assets/types/ListFoldersResponseItem.js +5 -0
- package/dist/api/resources/assets/types/ListRulesResponseItem.d.ts +1 -0
- package/dist/api/resources/assets/types/ListRulesResponseItem.js +5 -0
- package/dist/api/resources/assets/types/ListRulesResponseItemFolder.d.ts +1 -0
- package/dist/api/resources/assets/types/ListRulesResponseItemFolder.js +5 -0
- package/dist/api/resources/assets/types/UpsertFolderResponse.d.ts +1 -0
- package/dist/api/resources/assets/types/UpsertFolderResponse.js +5 -0
- package/dist/api/resources/assets/types/UsageResponse.d.ts +1 -0
- package/dist/api/resources/assets/types/UsageResponse.js +5 -0
- package/dist/api/resources/assets/types/index.d.ts +1 -0
- package/dist/api/resources/assets/types/index.js +28 -0
- package/dist/api/resources/decisions/client/Client.d.ts +19 -0
- package/dist/api/resources/decisions/client/Client.js +146 -0
- package/dist/api/resources/decisions/client/index.d.ts +1 -0
- package/dist/api/resources/decisions/client/index.js +21 -0
- package/dist/api/resources/decisions/client/requests/QueryRequest.d.ts +1 -0
- package/dist/api/resources/decisions/client/requests/QueryRequest.js +5 -0
- package/dist/api/resources/decisions/client/requests/index.d.ts +1 -0
- package/dist/api/resources/decisions/client/requests/index.js +2 -0
- package/dist/api/resources/decisions/index.d.ts +1 -0
- package/dist/api/resources/decisions/index.js +22 -0
- package/dist/api/resources/decisions/types/QueryResponse.d.ts +1 -0
- package/dist/api/resources/decisions/types/QueryResponse.js +5 -0
- package/dist/api/resources/decisions/types/index.d.ts +1 -0
- package/dist/api/resources/decisions/types/index.js +21 -0
- package/dist/api/resources/flows/client/Client.d.ts +21 -0
- package/dist/api/resources/flows/client/Client.js +133 -0
- package/dist/api/resources/flows/client/index.d.ts +1 -0
- package/dist/api/resources/flows/client/index.js +2 -0
- package/dist/api/resources/flows/index.d.ts +1 -0
- package/dist/api/resources/flows/index.js +21 -0
- package/dist/api/resources/index.d.ts +8 -0
- package/dist/api/resources/index.js +54 -0
- package/dist/api/resources/rules/client/Client.d.ts +60 -0
- package/dist/api/resources/rules/client/Client.js +272 -0
- package/dist/api/resources/rules/client/index.d.ts +1 -0
- package/dist/api/resources/rules/client/index.js +2 -0
- package/dist/api/resources/rules/index.d.ts +1 -0
- package/dist/api/resources/rules/index.js +21 -0
- package/dist/api/resources/tests/client/Client.d.ts +82 -0
- package/dist/api/resources/tests/client/Client.js +439 -0
- package/dist/api/resources/tests/client/index.d.ts +1 -0
- package/dist/api/resources/tests/client/index.js +21 -0
- package/dist/api/resources/tests/client/requests/CreateFlowTestRequest.d.ts +1 -0
- package/dist/api/resources/tests/client/requests/CreateFlowTestRequest.js +5 -0
- package/dist/api/resources/tests/client/requests/CreateRuleTestRequest.d.ts +1 -0
- package/dist/api/resources/tests/client/requests/CreateRuleTestRequest.js +5 -0
- package/dist/api/resources/tests/client/requests/index.d.ts +1 -0
- package/dist/api/resources/tests/client/requests/index.js +2 -0
- package/dist/api/resources/tests/index.d.ts +1 -0
- package/dist/api/resources/tests/index.js +22 -0
- package/dist/api/resources/tests/types/CreateFlowTestResponse.d.ts +1 -0
- package/dist/api/resources/tests/types/CreateFlowTestResponse.js +5 -0
- package/dist/api/resources/tests/types/CreateRuleTestResponse.d.ts +1 -0
- package/dist/api/resources/tests/types/CreateRuleTestResponse.js +5 -0
- package/dist/api/resources/tests/types/DeleteFlowTestResponse.d.ts +1 -0
- package/dist/api/resources/tests/types/DeleteFlowTestResponse.js +5 -0
- package/dist/api/resources/tests/types/DeleteRuleTestResponse.d.ts +1 -0
- package/dist/api/resources/tests/types/DeleteRuleTestResponse.js +5 -0
- package/dist/api/resources/tests/types/ListFlowTestsResponseItem.d.ts +1 -0
- package/dist/api/resources/tests/types/ListFlowTestsResponseItem.js +5 -0
- package/dist/api/resources/tests/types/ListRuleTestsResponseItem.d.ts +1 -0
- package/dist/api/resources/tests/types/ListRuleTestsResponseItem.js +5 -0
- package/dist/api/resources/tests/types/index.d.ts +1 -0
- package/dist/api/resources/tests/types/index.js +26 -0
- package/dist/api/resources/users/client/Client.d.ts +62 -0
- package/dist/api/resources/users/client/Client.js +269 -0
- package/dist/api/resources/users/client/index.d.ts +1 -0
- package/dist/api/resources/users/client/index.js +21 -0
- package/dist/api/resources/users/client/requests/CreateGroupRequest.d.ts +1 -0
- package/dist/api/resources/users/client/requests/CreateGroupRequest.js +5 -0
- package/dist/api/resources/users/client/requests/InviteRequest.d.ts +1 -0
- package/dist/api/resources/users/client/requests/InviteRequest.js +5 -0
- package/dist/api/resources/users/client/requests/index.d.ts +1 -0
- package/dist/api/resources/users/client/requests/index.js +2 -0
- package/dist/api/resources/users/index.d.ts +1 -0
- package/dist/api/resources/users/index.js +22 -0
- package/dist/api/resources/users/types/CreateGroupResponse.d.ts +1 -0
- package/dist/api/resources/users/types/CreateGroupResponse.js +5 -0
- package/dist/api/resources/users/types/InviteRequestRole.d.ts +5 -0
- package/dist/api/resources/users/types/InviteRequestRole.js +10 -0
- package/dist/api/resources/users/types/InviteResponse.d.ts +1 -0
- package/dist/api/resources/users/types/InviteResponse.js +5 -0
- package/dist/api/resources/users/types/ListGroupsResponseItem.d.ts +1 -0
- package/dist/api/resources/users/types/ListGroupsResponseItem.js +5 -0
- package/dist/api/resources/users/types/index.d.ts +1 -0
- package/dist/api/resources/users/types/index.js +24 -0
- package/dist/api/resources/values/client/Client.d.ts +37 -0
- package/dist/api/resources/values/client/Client.js +255 -0
- package/dist/api/resources/values/client/index.d.ts +1 -0
- package/dist/api/resources/values/client/index.js +21 -0
- package/dist/api/resources/values/client/requests/DeleteDynamicValueRequest.d.ts +1 -0
- package/dist/api/resources/values/client/requests/DeleteDynamicValueRequest.js +5 -0
- package/dist/api/resources/values/client/requests/ListDynamicValuesRequest.d.ts +1 -0
- package/dist/api/resources/values/client/requests/ListDynamicValuesRequest.js +5 -0
- package/dist/api/resources/values/client/requests/index.d.ts +1 -0
- package/dist/api/resources/values/client/requests/index.js +2 -0
- package/dist/api/resources/values/index.d.ts +1 -0
- package/dist/api/resources/values/index.js +22 -0
- package/dist/api/resources/values/types/DeleteDynamicValueResponse.d.ts +1 -0
- package/dist/api/resources/values/types/DeleteDynamicValueResponse.js +5 -0
- package/dist/api/resources/values/types/ListDynamicValuesResponseItem.d.ts +1 -0
- package/dist/api/resources/values/types/ListDynamicValuesResponseItem.js +5 -0
- package/dist/api/resources/values/types/ListDynamicValuesResponseItemType.d.ts +7 -0
- package/dist/api/resources/values/types/ListDynamicValuesResponseItemType.js +12 -0
- package/dist/api/resources/values/types/ListDynamicValuesResponseItemUsagesItem.d.ts +1 -0
- package/dist/api/resources/values/types/ListDynamicValuesResponseItemUsagesItem.js +5 -0
- package/dist/api/resources/values/types/ListDynamicValuesResponseItemValue.d.ts +1 -0
- package/dist/api/resources/values/types/ListDynamicValuesResponseItemValue.js +5 -0
- package/dist/api/resources/values/types/UpdateRequestValue.d.ts +1 -0
- package/dist/api/resources/values/types/UpdateRequestValue.js +5 -0
- package/dist/api/resources/values/types/UpdateResponseItem.d.ts +1 -0
- package/dist/api/resources/values/types/UpdateResponseItem.js +5 -0
- package/dist/api/resources/values/types/UpdateResponseItemType.d.ts +7 -0
- package/dist/api/resources/values/types/UpdateResponseItemType.js +12 -0
- package/dist/api/resources/values/types/UpdateResponseItemValue.d.ts +1 -0
- package/dist/api/resources/values/types/UpdateResponseItemValue.js +5 -0
- package/dist/api/resources/values/types/index.d.ts +1 -0
- package/dist/api/resources/values/types/index.js +29 -0
- package/dist/api/types/BadRequestErrorBody.d.ts +1 -0
- package/dist/api/types/BadRequestErrorBody.js +5 -0
- package/dist/api/types/ForbiddenErrorBody.d.ts +1 -0
- package/dist/api/types/ForbiddenErrorBody.js +5 -0
- package/dist/api/types/InternalServerErrorBody.d.ts +1 -0
- package/dist/api/types/InternalServerErrorBody.js +5 -0
- package/dist/api/types/NotFoundErrorBody.d.ts +1 -0
- package/dist/api/types/NotFoundErrorBody.js +5 -0
- package/dist/api/types/index.d.ts +1 -0
- package/dist/api/types/index.js +24 -0
- package/dist/core/fetcher/APIResponse.d.ts +1 -0
- package/dist/core/fetcher/APIResponse.js +2 -0
- package/dist/core/fetcher/Fetcher.d.ts +3 -0
- package/dist/core/fetcher/Fetcher.js +161 -0
- package/dist/core/fetcher/Supplier.d.ts +4 -0
- package/dist/core/fetcher/Supplier.js +32 -0
- package/dist/core/fetcher/getHeader.d.ts +2 -0
- package/dist/core/fetcher/getHeader.js +12 -0
- package/dist/core/fetcher/index.d.ts +9 -0
- package/dist/core/fetcher/index.js +9 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.js +39 -0
- package/dist/core/schemas/Schema.d.ts +19 -0
- package/dist/core/schemas/Schema.js +21 -0
- package/dist/core/schemas/builders/date/date.d.ts +4 -0
- package/dist/core/schemas/builders/date/date.js +63 -0
- package/dist/core/schemas/builders/date/index.d.ts +3 -0
- package/dist/core/schemas/builders/date/index.js +5 -0
- package/dist/core/schemas/builders/enum/enum.d.ts +3 -0
- package/dist/core/schemas/builders/enum/enum.js +39 -0
- package/dist/core/schemas/builders/enum/index.d.ts +3 -0
- package/dist/core/schemas/builders/enum/index.js +5 -0
- package/dist/core/schemas/builders/index.d.ts +1 -0
- package/dist/core/schemas/builders/index.js +33 -0
- package/dist/core/schemas/builders/lazy/index.d.ts +5 -0
- package/dist/core/schemas/builders/lazy/index.js +7 -0
- package/dist/core/schemas/builders/lazy/lazy.d.ts +13 -0
- package/dist/core/schemas/builders/lazy/lazy.js +46 -0
- package/dist/core/schemas/builders/lazy/lazyObject.d.ts +8 -0
- package/dist/core/schemas/builders/lazy/lazyObject.js +31 -0
- package/dist/core/schemas/builders/list/index.d.ts +3 -0
- package/dist/core/schemas/builders/list/index.js +5 -0
- package/dist/core/schemas/builders/list/list.d.ts +7 -0
- package/dist/core/schemas/builders/list/list.js +78 -0
- package/dist/core/schemas/builders/literals/booleanLiteral.d.ts +3 -0
- package/dist/core/schemas/builders/literals/booleanLiteral.js +29 -0
- package/dist/core/schemas/builders/literals/index.d.ts +5 -0
- package/dist/core/schemas/builders/literals/index.js +7 -0
- package/dist/core/schemas/builders/literals/stringLiteral.d.ts +3 -0
- package/dist/core/schemas/builders/literals/stringLiteral.js +29 -0
- package/dist/core/schemas/builders/object/index.d.ts +9 -0
- package/dist/core/schemas/builders/object/index.js +11 -0
- package/dist/core/schemas/builders/object/object.d.ts +27 -0
- package/dist/core/schemas/builders/object/object.js +268 -0
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +2 -0
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +8 -0
- package/dist/core/schemas/builders/object/property.d.ts +7 -0
- package/dist/core/schemas/builders/object/property.js +16 -0
- package/dist/core/schemas/builders/object/types.d.ts +1 -0
- package/dist/core/schemas/builders/object/types.js +2 -0
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +23 -0
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +73 -0
- package/dist/core/schemas/builders/object-like/index.d.ts +4 -0
- package/dist/core/schemas/builders/object-like/index.js +6 -0
- package/dist/core/schemas/builders/object-like/types.d.ts +1 -0
- package/dist/core/schemas/builders/object-like/types.js +2 -0
- package/dist/core/schemas/builders/primitives/any.d.ts +3 -0
- package/dist/core/schemas/builders/primitives/any.js +6 -0
- package/dist/core/schemas/builders/primitives/boolean.d.ts +3 -0
- package/dist/core/schemas/builders/primitives/boolean.js +25 -0
- package/dist/core/schemas/builders/primitives/index.d.ts +6 -0
- package/dist/core/schemas/builders/primitives/index.js +13 -0
- package/dist/core/schemas/builders/primitives/number.d.ts +3 -0
- package/dist/core/schemas/builders/primitives/number.js +25 -0
- package/dist/core/schemas/builders/primitives/string.d.ts +3 -0
- package/dist/core/schemas/builders/primitives/string.js +25 -0
- package/dist/core/schemas/builders/primitives/unknown.d.ts +3 -0
- package/dist/core/schemas/builders/primitives/unknown.js +6 -0
- package/dist/core/schemas/builders/record/index.d.ts +3 -0
- package/dist/core/schemas/builders/record/index.js +5 -0
- package/dist/core/schemas/builders/record/record.d.ts +7 -0
- package/dist/core/schemas/builders/record/record.js +116 -0
- package/dist/core/schemas/builders/record/types.d.ts +1 -0
- package/dist/core/schemas/builders/record/types.js +2 -0
- package/dist/core/schemas/builders/schema-utils/JsonError.d.ts +5 -0
- package/dist/core/schemas/builders/schema-utils/JsonError.js +12 -0
- package/dist/core/schemas/builders/schema-utils/ParseError.d.ts +5 -0
- package/dist/core/schemas/builders/schema-utils/ParseError.js +12 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +54 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +95 -0
- package/dist/core/schemas/builders/schema-utils/index.d.ts +9 -0
- package/dist/core/schemas/builders/schema-utils/index.js +11 -0
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +2 -0
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +10 -0
- package/dist/core/schemas/builders/set/index.d.ts +3 -0
- package/dist/core/schemas/builders/set/index.js +5 -0
- package/dist/core/schemas/builders/set/set.d.ts +7 -0
- package/dist/core/schemas/builders/set/set.js +63 -0
- package/dist/core/schemas/builders/undiscriminated-union/index.d.ts +3 -0
- package/dist/core/schemas/builders/undiscriminated-union/index.js +5 -0
- package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +1 -0
- package/dist/core/schemas/builders/undiscriminated-union/types.js +2 -0
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +7 -0
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +61 -0
- package/dist/core/schemas/builders/union/discriminant.d.ts +5 -0
- package/dist/core/schemas/builders/union/discriminant.js +10 -0
- package/dist/core/schemas/builders/union/index.d.ts +5 -0
- package/dist/core/schemas/builders/union/index.js +7 -0
- package/dist/core/schemas/builders/union/types.d.ts +1 -0
- package/dist/core/schemas/builders/union/types.js +2 -0
- package/dist/core/schemas/builders/union/union.d.ts +8 -0
- package/dist/core/schemas/builders/union/union.js +152 -0
- package/dist/core/schemas/index.d.ts +1 -0
- package/dist/core/schemas/index.js +21 -0
- package/dist/core/schemas/utils/MaybePromise.d.ts +1 -0
- package/dist/core/schemas/utils/MaybePromise.js +2 -0
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +1 -0
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.js +2 -0
- package/dist/core/schemas/utils/createIdentitySchemaCreator.d.ts +7 -0
- package/dist/core/schemas/utils/createIdentitySchemaCreator.js +16 -0
- package/dist/core/schemas/utils/entries.d.ts +2 -0
- package/dist/core/schemas/utils/entries.js +7 -0
- package/dist/core/schemas/utils/filterObject.d.ts +2 -0
- package/dist/core/schemas/utils/filterObject.js +14 -0
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +2 -0
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +24 -0
- package/dist/core/schemas/utils/isPlainObject.d.ts +2 -0
- package/dist/core/schemas/utils/isPlainObject.js +18 -0
- package/dist/core/schemas/utils/keys.d.ts +2 -0
- package/dist/core/schemas/utils/keys.js +7 -0
- package/dist/core/schemas/utils/maybeSkipValidation.d.ts +2 -0
- package/dist/core/schemas/utils/maybeSkipValidation.js +47 -0
- package/dist/core/schemas/utils/partition.d.ts +2 -0
- package/dist/core/schemas/utils/partition.js +16 -0
- package/dist/errors/RulebricksApiError.d.ts +10 -0
- package/dist/errors/RulebricksApiError.js +32 -0
- package/dist/errors/RulebricksApiTimeoutError.d.ts +4 -0
- package/dist/errors/RulebricksApiTimeoutError.js +13 -0
- package/dist/errors/index.d.ts +5 -0
- package/dist/errors/index.js +7 -0
- package/dist/forge/index.d.ts +4 -0
- package/dist/forge/index.js +31 -0
- package/dist/forge/operators.d.ts +136 -0
- package/dist/forge/operators.js +938 -0
- package/dist/forge/rule.d.ts +129 -0
- package/dist/forge/rule.js +702 -0
- package/dist/forge/types.d.ts +53 -0
- package/dist/forge/types.js +34 -0
- package/dist/forge/values.d.ts +21 -0
- package/dist/forge/values.js +88 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +113 -0
- package/dist/serialization/index.d.ts +1 -0
- package/dist/serialization/index.js +22 -0
- package/dist/serialization/resources/assets/client/exportRule.d.ts +2 -0
- package/dist/serialization/resources/assets/client/exportRule.js +37 -0
- package/dist/serialization/resources/assets/client/importRule.d.ts +2 -0
- package/dist/serialization/resources/assets/client/importRule.js +37 -0
- package/dist/serialization/resources/assets/client/index.d.ts +6 -0
- package/dist/serialization/resources/assets/client/index.js +43 -0
- package/dist/serialization/resources/assets/client/listFlows.d.ts +2 -0
- package/dist/serialization/resources/assets/client/listFlows.js +56 -0
- package/dist/serialization/resources/assets/client/listFolders.d.ts +2 -0
- package/dist/serialization/resources/assets/client/listFolders.js +56 -0
- package/dist/serialization/resources/assets/client/listRules.d.ts +2 -0
- package/dist/serialization/resources/assets/client/listRules.js +56 -0
- package/dist/serialization/resources/assets/client/requests/DeleteFolderRequest.d.ts +2 -0
- package/dist/serialization/resources/assets/client/requests/DeleteFolderRequest.js +39 -0
- package/dist/serialization/resources/assets/client/requests/DeleteRuleRequest.d.ts +2 -0
- package/dist/serialization/resources/assets/client/requests/DeleteRuleRequest.js +39 -0
- package/dist/serialization/resources/assets/client/requests/ImportRuleRequest.d.ts +2 -0
- package/dist/serialization/resources/assets/client/requests/ImportRuleRequest.js +39 -0
- package/dist/serialization/resources/assets/client/requests/UpsertFolderRequest.d.ts +2 -0
- package/dist/serialization/resources/assets/client/requests/UpsertFolderRequest.js +41 -0
- package/dist/serialization/resources/assets/client/requests/index.d.ts +9 -0
- package/dist/serialization/resources/assets/client/requests/index.js +11 -0
- package/dist/serialization/resources/assets/index.d.ts +1 -0
- package/dist/serialization/resources/assets/index.js +22 -0
- package/dist/serialization/resources/assets/types/DeleteFolderResponse.d.ts +2 -0
- package/dist/serialization/resources/assets/types/DeleteFolderResponse.js +42 -0
- package/dist/serialization/resources/assets/types/DeleteRuleResponse.d.ts +2 -0
- package/dist/serialization/resources/assets/types/DeleteRuleResponse.js +39 -0
- package/dist/serialization/resources/assets/types/ListFlowsResponseItem.d.ts +2 -0
- package/dist/serialization/resources/assets/types/ListFlowsResponseItem.js +44 -0
- package/dist/serialization/resources/assets/types/ListFoldersResponseItem.d.ts +2 -0
- package/dist/serialization/resources/assets/types/ListFoldersResponseItem.js +42 -0
- package/dist/serialization/resources/assets/types/ListRulesResponseItem.d.ts +2 -0
- package/dist/serialization/resources/assets/types/ListRulesResponseItem.js +67 -0
- package/dist/serialization/resources/assets/types/ListRulesResponseItemFolder.d.ts +2 -0
- package/dist/serialization/resources/assets/types/ListRulesResponseItemFolder.js +42 -0
- package/dist/serialization/resources/assets/types/UpsertFolderResponse.d.ts +2 -0
- package/dist/serialization/resources/assets/types/UpsertFolderResponse.js +42 -0
- package/dist/serialization/resources/assets/types/UsageResponse.d.ts +2 -0
- package/dist/serialization/resources/assets/types/UsageResponse.js +44 -0
- package/dist/serialization/resources/assets/types/index.d.ts +1 -0
- package/dist/serialization/resources/assets/types/index.js +28 -0
- package/dist/serialization/resources/decisions/index.d.ts +1 -0
- package/dist/serialization/resources/decisions/index.js +21 -0
- package/dist/serialization/resources/decisions/types/QueryResponse.d.ts +2 -0
- package/dist/serialization/resources/decisions/types/QueryResponse.js +42 -0
- package/dist/serialization/resources/decisions/types/index.d.ts +1 -0
- package/dist/serialization/resources/decisions/types/index.js +21 -0
- package/dist/serialization/resources/flows/client/execute.d.ts +3 -0
- package/dist/serialization/resources/flows/client/execute.js +38 -0
- package/dist/serialization/resources/flows/client/index.d.ts +2 -0
- package/dist/serialization/resources/flows/client/index.js +33 -0
- package/dist/serialization/resources/flows/index.d.ts +1 -0
- package/dist/serialization/resources/flows/index.js +21 -0
- package/dist/serialization/resources/index.d.ts +8 -0
- package/dist/serialization/resources/index.js +52 -0
- package/dist/serialization/resources/rules/client/bulkSolve.d.ts +3 -0
- package/dist/serialization/resources/rules/client/bulkSolve.js +38 -0
- package/dist/serialization/resources/rules/client/index.d.ts +4 -0
- package/dist/serialization/resources/rules/client/index.js +35 -0
- package/dist/serialization/resources/rules/client/parallelSolve.d.ts +3 -0
- package/dist/serialization/resources/rules/client/parallelSolve.js +38 -0
- package/dist/serialization/resources/rules/client/solve.d.ts +3 -0
- package/dist/serialization/resources/rules/client/solve.js +38 -0
- package/dist/serialization/resources/rules/index.d.ts +1 -0
- package/dist/serialization/resources/rules/index.js +21 -0
- package/dist/serialization/resources/tests/client/index.d.ts +3 -0
- package/dist/serialization/resources/tests/client/index.js +40 -0
- package/dist/serialization/resources/tests/client/listFlowTests.d.ts +2 -0
- package/dist/serialization/resources/tests/client/listFlowTests.js +56 -0
- package/dist/serialization/resources/tests/client/listRuleTests.d.ts +2 -0
- package/dist/serialization/resources/tests/client/listRuleTests.js +56 -0
- package/dist/serialization/resources/tests/client/requests/CreateFlowTestRequest.d.ts +2 -0
- package/dist/serialization/resources/tests/client/requests/CreateFlowTestRequest.js +42 -0
- package/dist/serialization/resources/tests/client/requests/CreateRuleTestRequest.d.ts +2 -0
- package/dist/serialization/resources/tests/client/requests/CreateRuleTestRequest.js +42 -0
- package/dist/serialization/resources/tests/client/requests/index.d.ts +5 -0
- package/dist/serialization/resources/tests/client/requests/index.js +7 -0
- package/dist/serialization/resources/tests/index.d.ts +1 -0
- package/dist/serialization/resources/tests/index.js +22 -0
- package/dist/serialization/resources/tests/types/CreateFlowTestResponse.d.ts +2 -0
- package/dist/serialization/resources/tests/types/CreateFlowTestResponse.js +47 -0
- package/dist/serialization/resources/tests/types/CreateRuleTestResponse.d.ts +2 -0
- package/dist/serialization/resources/tests/types/CreateRuleTestResponse.js +47 -0
- package/dist/serialization/resources/tests/types/DeleteFlowTestResponse.d.ts +2 -0
- package/dist/serialization/resources/tests/types/DeleteFlowTestResponse.js +47 -0
- package/dist/serialization/resources/tests/types/DeleteRuleTestResponse.d.ts +2 -0
- package/dist/serialization/resources/tests/types/DeleteRuleTestResponse.js +47 -0
- package/dist/serialization/resources/tests/types/ListFlowTestsResponseItem.d.ts +2 -0
- package/dist/serialization/resources/tests/types/ListFlowTestsResponseItem.js +47 -0
- package/dist/serialization/resources/tests/types/ListRuleTestsResponseItem.d.ts +2 -0
- package/dist/serialization/resources/tests/types/ListRuleTestsResponseItem.js +47 -0
- package/dist/serialization/resources/tests/types/index.d.ts +1 -0
- package/dist/serialization/resources/tests/types/index.js +26 -0
- package/dist/serialization/resources/users/client/index.d.ts +2 -0
- package/dist/serialization/resources/users/client/index.js +39 -0
- package/dist/serialization/resources/users/client/listGroups.d.ts +2 -0
- package/dist/serialization/resources/users/client/listGroups.js +56 -0
- package/dist/serialization/resources/users/client/requests/CreateGroupRequest.d.ts +2 -0
- package/dist/serialization/resources/users/client/requests/CreateGroupRequest.js +40 -0
- package/dist/serialization/resources/users/client/requests/InviteRequest.d.ts +2 -0
- package/dist/serialization/resources/users/client/requests/InviteRequest.js +60 -0
- package/dist/serialization/resources/users/client/requests/index.d.ts +5 -0
- package/dist/serialization/resources/users/client/requests/index.js +7 -0
- package/dist/serialization/resources/users/index.d.ts +1 -0
- package/dist/serialization/resources/users/index.js +22 -0
- package/dist/serialization/resources/users/types/CreateGroupResponse.d.ts +2 -0
- package/dist/serialization/resources/users/types/CreateGroupResponse.js +42 -0
- package/dist/serialization/resources/users/types/InviteRequestRole.d.ts +2 -0
- package/dist/serialization/resources/users/types/InviteRequestRole.js +37 -0
- package/dist/serialization/resources/users/types/InviteResponse.d.ts +2 -0
- package/dist/serialization/resources/users/types/InviteResponse.js +39 -0
- package/dist/serialization/resources/users/types/ListGroupsResponseItem.d.ts +2 -0
- package/dist/serialization/resources/users/types/ListGroupsResponseItem.js +42 -0
- package/dist/serialization/resources/users/types/index.d.ts +1 -0
- package/dist/serialization/resources/users/types/index.js +24 -0
- package/dist/serialization/resources/values/client/index.d.ts +3 -0
- package/dist/serialization/resources/values/client/index.js +34 -0
- package/dist/serialization/resources/values/client/listDynamicValues.d.ts +2 -0
- package/dist/serialization/resources/values/client/listDynamicValues.js +56 -0
- package/dist/serialization/resources/values/client/update.d.ts +3 -0
- package/dist/serialization/resources/values/client/update.js +57 -0
- package/dist/serialization/resources/values/index.d.ts +1 -0
- package/dist/serialization/resources/values/index.js +22 -0
- package/dist/serialization/resources/values/types/DeleteDynamicValueResponse.d.ts +2 -0
- package/dist/serialization/resources/values/types/DeleteDynamicValueResponse.js +39 -0
- package/dist/serialization/resources/values/types/ListDynamicValuesResponseItem.d.ts +2 -0
- package/dist/serialization/resources/values/types/ListDynamicValuesResponseItem.js +66 -0
- package/dist/serialization/resources/values/types/ListDynamicValuesResponseItemType.d.ts +2 -0
- package/dist/serialization/resources/values/types/ListDynamicValuesResponseItemType.js +37 -0
- package/dist/serialization/resources/values/types/ListDynamicValuesResponseItemUsagesItem.d.ts +2 -0
- package/dist/serialization/resources/values/types/ListDynamicValuesResponseItemUsagesItem.js +44 -0
- package/dist/serialization/resources/values/types/ListDynamicValuesResponseItemValue.d.ts +2 -0
- package/dist/serialization/resources/values/types/ListDynamicValuesResponseItemValue.js +42 -0
- package/dist/serialization/resources/values/types/UpdateRequestValue.d.ts +2 -0
- package/dist/serialization/resources/values/types/UpdateRequestValue.js +42 -0
- package/dist/serialization/resources/values/types/UpdateResponseItem.d.ts +2 -0
- package/dist/serialization/resources/values/types/UpdateResponseItem.js +61 -0
- package/dist/serialization/resources/values/types/UpdateResponseItemType.d.ts +2 -0
- package/dist/serialization/resources/values/types/UpdateResponseItemType.js +37 -0
- package/dist/serialization/resources/values/types/UpdateResponseItemValue.d.ts +2 -0
- package/dist/serialization/resources/values/types/UpdateResponseItemValue.js +42 -0
- package/dist/serialization/resources/values/types/index.d.ts +1 -0
- package/dist/serialization/resources/values/types/index.js +29 -0
- package/dist/serialization/types/BadRequestErrorBody.d.ts +2 -0
- package/dist/serialization/types/BadRequestErrorBody.js +39 -0
- package/dist/serialization/types/ForbiddenErrorBody.d.ts +2 -0
- package/dist/serialization/types/ForbiddenErrorBody.js +39 -0
- package/dist/serialization/types/InternalServerErrorBody.d.ts +2 -0
- package/dist/serialization/types/InternalServerErrorBody.js +39 -0
- package/dist/serialization/types/NotFoundErrorBody.d.ts +2 -0
- package/dist/serialization/types/NotFoundErrorBody.js +39 -0
- package/dist/serialization/types/index.d.ts +1 -0
- package/dist/serialization/types/index.js +24 -0
- package/errors/RulebricksApiError.d.ts +10 -0
- package/errors/RulebricksApiError.js +32 -0
- package/errors/RulebricksApiTimeoutError.d.ts +4 -0
- package/errors/RulebricksApiTimeoutError.js +13 -0
- package/errors/index.d.ts +5 -0
- package/errors/index.js +7 -0
- package/forge/index.d.ts +4 -0
- package/forge/index.js +31 -0
- package/forge/operators.d.ts +136 -0
- package/forge/operators.js +938 -0
- package/forge/rule.d.ts +129 -0
- package/forge/rule.js +702 -0
- package/forge/types.d.ts +53 -0
- package/forge/types.js +34 -0
- package/forge/values.d.ts +21 -0
- package/forge/values.js +88 -0
- package/index.d.ts +15 -0
- package/index.js +113 -0
- package/jest.config.js +5 -0
- package/package.json +43 -0
- package/serialization/index.d.ts +1 -0
- package/serialization/index.js +22 -0
- package/serialization/resources/assets/client/exportRule.d.ts +2 -0
- package/serialization/resources/assets/client/exportRule.js +37 -0
- package/serialization/resources/assets/client/importRule.d.ts +2 -0
- package/serialization/resources/assets/client/importRule.js +37 -0
- package/serialization/resources/assets/client/index.d.ts +6 -0
- package/serialization/resources/assets/client/index.js +43 -0
- package/serialization/resources/assets/client/listFlows.d.ts +2 -0
- package/serialization/resources/assets/client/listFlows.js +56 -0
- package/serialization/resources/assets/client/listFolders.d.ts +2 -0
- package/serialization/resources/assets/client/listFolders.js +56 -0
- package/serialization/resources/assets/client/listRules.d.ts +2 -0
- package/serialization/resources/assets/client/listRules.js +56 -0
- package/serialization/resources/assets/client/requests/DeleteFolderRequest.d.ts +2 -0
- package/serialization/resources/assets/client/requests/DeleteFolderRequest.js +39 -0
- package/serialization/resources/assets/client/requests/DeleteRuleRequest.d.ts +2 -0
- package/serialization/resources/assets/client/requests/DeleteRuleRequest.js +39 -0
- package/serialization/resources/assets/client/requests/ImportRuleRequest.d.ts +2 -0
- package/serialization/resources/assets/client/requests/ImportRuleRequest.js +39 -0
- package/serialization/resources/assets/client/requests/UpsertFolderRequest.d.ts +2 -0
- package/serialization/resources/assets/client/requests/UpsertFolderRequest.js +41 -0
- package/serialization/resources/assets/client/requests/index.d.ts +9 -0
- package/serialization/resources/assets/client/requests/index.js +11 -0
- package/serialization/resources/assets/index.d.ts +1 -0
- package/serialization/resources/assets/index.js +22 -0
- package/serialization/resources/assets/types/DeleteFolderResponse.d.ts +2 -0
- package/serialization/resources/assets/types/DeleteFolderResponse.js +42 -0
- package/serialization/resources/assets/types/DeleteRuleResponse.d.ts +2 -0
- package/serialization/resources/assets/types/DeleteRuleResponse.js +39 -0
- package/serialization/resources/assets/types/ListFlowsResponseItem.d.ts +2 -0
- package/serialization/resources/assets/types/ListFlowsResponseItem.js +44 -0
- package/serialization/resources/assets/types/ListFoldersResponseItem.d.ts +2 -0
- package/serialization/resources/assets/types/ListFoldersResponseItem.js +42 -0
- package/serialization/resources/assets/types/ListRulesResponseItem.d.ts +2 -0
- package/serialization/resources/assets/types/ListRulesResponseItem.js +67 -0
- package/serialization/resources/assets/types/ListRulesResponseItemFolder.d.ts +2 -0
- package/serialization/resources/assets/types/ListRulesResponseItemFolder.js +42 -0
- package/serialization/resources/assets/types/UpsertFolderResponse.d.ts +2 -0
- package/serialization/resources/assets/types/UpsertFolderResponse.js +42 -0
- package/serialization/resources/assets/types/UsageResponse.d.ts +2 -0
- package/serialization/resources/assets/types/UsageResponse.js +44 -0
- package/serialization/resources/assets/types/index.d.ts +1 -0
- package/serialization/resources/assets/types/index.js +28 -0
- package/serialization/resources/decisions/index.d.ts +1 -0
- package/serialization/resources/decisions/index.js +21 -0
- package/serialization/resources/decisions/types/QueryResponse.d.ts +2 -0
- package/serialization/resources/decisions/types/QueryResponse.js +42 -0
- package/serialization/resources/decisions/types/index.d.ts +1 -0
- package/serialization/resources/decisions/types/index.js +21 -0
- package/serialization/resources/flows/client/execute.d.ts +3 -0
- package/serialization/resources/flows/client/execute.js +38 -0
- package/serialization/resources/flows/client/index.d.ts +2 -0
- package/serialization/resources/flows/client/index.js +33 -0
- package/serialization/resources/flows/index.d.ts +1 -0
- package/serialization/resources/flows/index.js +21 -0
- package/serialization/resources/index.d.ts +8 -0
- package/serialization/resources/index.js +52 -0
- package/serialization/resources/rules/client/bulkSolve.d.ts +3 -0
- package/serialization/resources/rules/client/bulkSolve.js +38 -0
- package/serialization/resources/rules/client/index.d.ts +4 -0
- package/serialization/resources/rules/client/index.js +35 -0
- package/serialization/resources/rules/client/parallelSolve.d.ts +3 -0
- package/serialization/resources/rules/client/parallelSolve.js +38 -0
- package/serialization/resources/rules/client/solve.d.ts +3 -0
- package/serialization/resources/rules/client/solve.js +38 -0
- package/serialization/resources/rules/index.d.ts +1 -0
- package/serialization/resources/rules/index.js +21 -0
- package/serialization/resources/tests/client/index.d.ts +3 -0
- package/serialization/resources/tests/client/index.js +40 -0
- package/serialization/resources/tests/client/listFlowTests.d.ts +2 -0
- package/serialization/resources/tests/client/listFlowTests.js +56 -0
- package/serialization/resources/tests/client/listRuleTests.d.ts +2 -0
- package/serialization/resources/tests/client/listRuleTests.js +56 -0
- package/serialization/resources/tests/client/requests/CreateFlowTestRequest.d.ts +2 -0
- package/serialization/resources/tests/client/requests/CreateFlowTestRequest.js +42 -0
- package/serialization/resources/tests/client/requests/CreateRuleTestRequest.d.ts +2 -0
- package/serialization/resources/tests/client/requests/CreateRuleTestRequest.js +42 -0
- package/serialization/resources/tests/client/requests/index.d.ts +5 -0
- package/serialization/resources/tests/client/requests/index.js +7 -0
- package/serialization/resources/tests/index.d.ts +1 -0
- package/serialization/resources/tests/index.js +22 -0
- package/serialization/resources/tests/types/CreateFlowTestResponse.d.ts +2 -0
- package/serialization/resources/tests/types/CreateFlowTestResponse.js +47 -0
- package/serialization/resources/tests/types/CreateRuleTestResponse.d.ts +2 -0
- package/serialization/resources/tests/types/CreateRuleTestResponse.js +47 -0
- package/serialization/resources/tests/types/DeleteFlowTestResponse.d.ts +2 -0
- package/serialization/resources/tests/types/DeleteFlowTestResponse.js +47 -0
- package/serialization/resources/tests/types/DeleteRuleTestResponse.d.ts +2 -0
- package/serialization/resources/tests/types/DeleteRuleTestResponse.js +47 -0
- package/serialization/resources/tests/types/ListFlowTestsResponseItem.d.ts +2 -0
- package/serialization/resources/tests/types/ListFlowTestsResponseItem.js +47 -0
- package/serialization/resources/tests/types/ListRuleTestsResponseItem.d.ts +2 -0
- package/serialization/resources/tests/types/ListRuleTestsResponseItem.js +47 -0
- package/serialization/resources/tests/types/index.d.ts +1 -0
- package/serialization/resources/tests/types/index.js +26 -0
- package/serialization/resources/users/client/index.d.ts +2 -0
- package/serialization/resources/users/client/index.js +39 -0
- package/serialization/resources/users/client/listGroups.d.ts +2 -0
- package/serialization/resources/users/client/listGroups.js +56 -0
- package/serialization/resources/users/client/requests/CreateGroupRequest.d.ts +2 -0
- package/serialization/resources/users/client/requests/CreateGroupRequest.js +40 -0
- package/serialization/resources/users/client/requests/InviteRequest.d.ts +2 -0
- package/serialization/resources/users/client/requests/InviteRequest.js +60 -0
- package/serialization/resources/users/client/requests/index.d.ts +5 -0
- package/serialization/resources/users/client/requests/index.js +7 -0
- package/serialization/resources/users/index.d.ts +1 -0
- package/serialization/resources/users/index.js +22 -0
- package/serialization/resources/users/types/CreateGroupResponse.d.ts +2 -0
- package/serialization/resources/users/types/CreateGroupResponse.js +42 -0
- package/serialization/resources/users/types/InviteRequestRole.d.ts +2 -0
- package/serialization/resources/users/types/InviteRequestRole.js +37 -0
- package/serialization/resources/users/types/InviteResponse.d.ts +2 -0
- package/serialization/resources/users/types/InviteResponse.js +39 -0
- package/serialization/resources/users/types/ListGroupsResponseItem.d.ts +2 -0
- package/serialization/resources/users/types/ListGroupsResponseItem.js +42 -0
- package/serialization/resources/users/types/index.d.ts +1 -0
- package/serialization/resources/users/types/index.js +24 -0
- package/serialization/resources/values/client/index.d.ts +3 -0
- package/serialization/resources/values/client/index.js +34 -0
- package/serialization/resources/values/client/listDynamicValues.d.ts +2 -0
- package/serialization/resources/values/client/listDynamicValues.js +56 -0
- package/serialization/resources/values/client/update.d.ts +3 -0
- package/serialization/resources/values/client/update.js +57 -0
- package/serialization/resources/values/index.d.ts +1 -0
- package/serialization/resources/values/index.js +22 -0
- package/serialization/resources/values/types/DeleteDynamicValueResponse.d.ts +2 -0
- package/serialization/resources/values/types/DeleteDynamicValueResponse.js +39 -0
- package/serialization/resources/values/types/ListDynamicValuesResponseItem.d.ts +2 -0
- package/serialization/resources/values/types/ListDynamicValuesResponseItem.js +66 -0
- package/serialization/resources/values/types/ListDynamicValuesResponseItemType.d.ts +2 -0
- package/serialization/resources/values/types/ListDynamicValuesResponseItemType.js +37 -0
- package/serialization/resources/values/types/ListDynamicValuesResponseItemUsagesItem.d.ts +2 -0
- package/serialization/resources/values/types/ListDynamicValuesResponseItemUsagesItem.js +44 -0
- package/serialization/resources/values/types/ListDynamicValuesResponseItemValue.d.ts +2 -0
- package/serialization/resources/values/types/ListDynamicValuesResponseItemValue.js +42 -0
- package/serialization/resources/values/types/UpdateRequestValue.d.ts +2 -0
- package/serialization/resources/values/types/UpdateRequestValue.js +42 -0
- package/serialization/resources/values/types/UpdateResponseItem.d.ts +2 -0
- package/serialization/resources/values/types/UpdateResponseItem.js +61 -0
- package/serialization/resources/values/types/UpdateResponseItemType.d.ts +2 -0
- package/serialization/resources/values/types/UpdateResponseItemType.js +37 -0
- package/serialization/resources/values/types/UpdateResponseItemValue.d.ts +2 -0
- package/serialization/resources/values/types/UpdateResponseItemValue.js +42 -0
- package/serialization/resources/values/types/index.d.ts +1 -0
- package/serialization/resources/values/types/index.js +29 -0
- package/serialization/types/BadRequestErrorBody.d.ts +2 -0
- package/serialization/types/BadRequestErrorBody.js +39 -0
- package/serialization/types/ForbiddenErrorBody.d.ts +2 -0
- package/serialization/types/ForbiddenErrorBody.js +39 -0
- package/serialization/types/InternalServerErrorBody.d.ts +2 -0
- package/serialization/types/InternalServerErrorBody.js +39 -0
- package/serialization/types/NotFoundErrorBody.d.ts +2 -0
- package/serialization/types/NotFoundErrorBody.js +39 -0
- package/serialization/types/index.d.ts +1 -0
- package/serialization/types/index.js +24 -0
- package/tests/client.test.ts +11 -0
|
@@ -0,0 +1,611 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function (o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined)
|
|
7
|
+
k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function () { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function (o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined)
|
|
15
|
+
k2 = k;
|
|
16
|
+
o[k2] = m[k];
|
|
17
|
+
}));
|
|
18
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function (o, v) {
|
|
19
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
20
|
+
}) : function (o, v) {
|
|
21
|
+
o["default"] = v;
|
|
22
|
+
});
|
|
23
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
24
|
+
if (mod && mod.__esModule)
|
|
25
|
+
return mod;
|
|
26
|
+
var result = {};
|
|
27
|
+
if (mod != null)
|
|
28
|
+
for (var k in mod)
|
|
29
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
30
|
+
__createBinding(result, mod, k);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
35
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
36
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
37
|
+
function fulfilled(value) { try {
|
|
38
|
+
step(generator.next(value));
|
|
39
|
+
}
|
|
40
|
+
catch (e) {
|
|
41
|
+
reject(e);
|
|
42
|
+
} }
|
|
43
|
+
function rejected(value) { try {
|
|
44
|
+
step(generator["throw"](value));
|
|
45
|
+
}
|
|
46
|
+
catch (e) {
|
|
47
|
+
reject(e);
|
|
48
|
+
} }
|
|
49
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
50
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
54
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
55
|
+
};
|
|
56
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
57
|
+
exports.Assets = void 0;
|
|
58
|
+
const core = __importStar(require("../../../../core"));
|
|
59
|
+
const RulebricksApi = __importStar(require("../../.."));
|
|
60
|
+
const serializers = __importStar(require("../../../../serialization"));
|
|
61
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
62
|
+
const errors = __importStar(require("../../../../errors"));
|
|
63
|
+
/**
|
|
64
|
+
* Administrative operations for managing rules, flows, folders, and usage
|
|
65
|
+
*/
|
|
66
|
+
class Assets {
|
|
67
|
+
constructor(_options) {
|
|
68
|
+
this._options = _options;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Delete a specific rule by its ID.
|
|
72
|
+
* @throws {@link RulebricksApi.BadRequestError}
|
|
73
|
+
* @throws {@link RulebricksApi.NotFoundError}
|
|
74
|
+
* @throws {@link RulebricksApi.InternalServerError}
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* await rulebricksApi.assets.deleteRule({})
|
|
78
|
+
*/
|
|
79
|
+
deleteRule(request = {}, requestOptions) {
|
|
80
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
+
const _response = yield core.fetcher({
|
|
82
|
+
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "api/v1/admin/rules/delete"),
|
|
83
|
+
method: "DELETE",
|
|
84
|
+
headers: {
|
|
85
|
+
"x-api-key": yield core.Supplier.get(this._options.apiKey),
|
|
86
|
+
"X-Fern-Language": "JavaScript",
|
|
87
|
+
},
|
|
88
|
+
contentType: "application/json",
|
|
89
|
+
body: yield serializers.DeleteRuleRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
90
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
91
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
92
|
+
});
|
|
93
|
+
if (_response.ok) {
|
|
94
|
+
return yield serializers.DeleteRuleResponse.parseOrThrow(_response.body, {
|
|
95
|
+
unrecognizedObjectKeys: "passthrough",
|
|
96
|
+
allowUnrecognizedUnionMembers: true,
|
|
97
|
+
allowUnrecognizedEnumValues: true,
|
|
98
|
+
breadcrumbsPrefix: ["response"],
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
if (_response.error.reason === "status-code") {
|
|
102
|
+
switch (_response.error.statusCode) {
|
|
103
|
+
case 400:
|
|
104
|
+
throw new RulebricksApi.BadRequestError(_response.error.body);
|
|
105
|
+
case 404:
|
|
106
|
+
throw new RulebricksApi.NotFoundError(_response.error.body);
|
|
107
|
+
case 500:
|
|
108
|
+
throw new RulebricksApi.InternalServerError(_response.error.body);
|
|
109
|
+
default:
|
|
110
|
+
throw new errors.RulebricksApiError({
|
|
111
|
+
statusCode: _response.error.statusCode,
|
|
112
|
+
body: _response.error.body,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
switch (_response.error.reason) {
|
|
117
|
+
case "non-json":
|
|
118
|
+
throw new errors.RulebricksApiError({
|
|
119
|
+
statusCode: _response.error.statusCode,
|
|
120
|
+
body: _response.error.rawBody,
|
|
121
|
+
});
|
|
122
|
+
case "timeout":
|
|
123
|
+
throw new errors.RulebricksApiTimeoutError();
|
|
124
|
+
case "unknown":
|
|
125
|
+
throw new errors.RulebricksApiError({
|
|
126
|
+
message: _response.error.errorMessage,
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Export a specific rule by its ID.
|
|
133
|
+
* @throws {@link RulebricksApi.BadRequestError}
|
|
134
|
+
* @throws {@link RulebricksApi.NotFoundError}
|
|
135
|
+
* @throws {@link RulebricksApi.InternalServerError}
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* await rulebricksApi.assets.exportRule({
|
|
139
|
+
* id: "id"
|
|
140
|
+
* })
|
|
141
|
+
*/
|
|
142
|
+
exportRule(request, requestOptions) {
|
|
143
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
144
|
+
const { id } = request;
|
|
145
|
+
const _queryParams = {};
|
|
146
|
+
_queryParams["id"] = id;
|
|
147
|
+
const _response = yield core.fetcher({
|
|
148
|
+
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "api/v1/admin/rules/export"),
|
|
149
|
+
method: "GET",
|
|
150
|
+
headers: {
|
|
151
|
+
"x-api-key": yield core.Supplier.get(this._options.apiKey),
|
|
152
|
+
"X-Fern-Language": "JavaScript",
|
|
153
|
+
},
|
|
154
|
+
contentType: "application/json",
|
|
155
|
+
queryParameters: _queryParams,
|
|
156
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
157
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
158
|
+
});
|
|
159
|
+
if (_response.ok) {
|
|
160
|
+
return yield serializers.assets.exportRule.Response.parseOrThrow(_response.body, {
|
|
161
|
+
unrecognizedObjectKeys: "passthrough",
|
|
162
|
+
allowUnrecognizedUnionMembers: true,
|
|
163
|
+
allowUnrecognizedEnumValues: true,
|
|
164
|
+
breadcrumbsPrefix: ["response"],
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
if (_response.error.reason === "status-code") {
|
|
168
|
+
switch (_response.error.statusCode) {
|
|
169
|
+
case 400:
|
|
170
|
+
throw new RulebricksApi.BadRequestError(_response.error.body);
|
|
171
|
+
case 404:
|
|
172
|
+
throw new RulebricksApi.NotFoundError(_response.error.body);
|
|
173
|
+
case 500:
|
|
174
|
+
throw new RulebricksApi.InternalServerError(_response.error.body);
|
|
175
|
+
default:
|
|
176
|
+
throw new errors.RulebricksApiError({
|
|
177
|
+
statusCode: _response.error.statusCode,
|
|
178
|
+
body: _response.error.body,
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
switch (_response.error.reason) {
|
|
183
|
+
case "non-json":
|
|
184
|
+
throw new errors.RulebricksApiError({
|
|
185
|
+
statusCode: _response.error.statusCode,
|
|
186
|
+
body: _response.error.rawBody,
|
|
187
|
+
});
|
|
188
|
+
case "timeout":
|
|
189
|
+
throw new errors.RulebricksApiTimeoutError();
|
|
190
|
+
case "unknown":
|
|
191
|
+
throw new errors.RulebricksApiError({
|
|
192
|
+
message: _response.error.errorMessage,
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Import a rule into the user's account.
|
|
199
|
+
* @throws {@link RulebricksApi.BadRequestError}
|
|
200
|
+
* @throws {@link RulebricksApi.ForbiddenError}
|
|
201
|
+
* @throws {@link RulebricksApi.InternalServerError}
|
|
202
|
+
*
|
|
203
|
+
* @example
|
|
204
|
+
* await rulebricksApi.assets.importRule({
|
|
205
|
+
* rule: {
|
|
206
|
+
* "key": "value"
|
|
207
|
+
* }
|
|
208
|
+
* })
|
|
209
|
+
*/
|
|
210
|
+
importRule(request, requestOptions) {
|
|
211
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
212
|
+
const _response = yield core.fetcher({
|
|
213
|
+
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "api/v1/admin/rules/import"),
|
|
214
|
+
method: "POST",
|
|
215
|
+
headers: {
|
|
216
|
+
"x-api-key": yield core.Supplier.get(this._options.apiKey),
|
|
217
|
+
"X-Fern-Language": "JavaScript",
|
|
218
|
+
},
|
|
219
|
+
contentType: "application/json",
|
|
220
|
+
body: yield serializers.ImportRuleRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
221
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
222
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
223
|
+
});
|
|
224
|
+
if (_response.ok) {
|
|
225
|
+
return yield serializers.assets.importRule.Response.parseOrThrow(_response.body, {
|
|
226
|
+
unrecognizedObjectKeys: "passthrough",
|
|
227
|
+
allowUnrecognizedUnionMembers: true,
|
|
228
|
+
allowUnrecognizedEnumValues: true,
|
|
229
|
+
breadcrumbsPrefix: ["response"],
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
if (_response.error.reason === "status-code") {
|
|
233
|
+
switch (_response.error.statusCode) {
|
|
234
|
+
case 400:
|
|
235
|
+
throw new RulebricksApi.BadRequestError(_response.error.body);
|
|
236
|
+
case 403:
|
|
237
|
+
throw new RulebricksApi.ForbiddenError(yield serializers.ForbiddenErrorBody.parseOrThrow(_response.error.body, {
|
|
238
|
+
unrecognizedObjectKeys: "passthrough",
|
|
239
|
+
allowUnrecognizedUnionMembers: true,
|
|
240
|
+
allowUnrecognizedEnumValues: true,
|
|
241
|
+
breadcrumbsPrefix: ["response"],
|
|
242
|
+
}));
|
|
243
|
+
case 500:
|
|
244
|
+
throw new RulebricksApi.InternalServerError(_response.error.body);
|
|
245
|
+
default:
|
|
246
|
+
throw new errors.RulebricksApiError({
|
|
247
|
+
statusCode: _response.error.statusCode,
|
|
248
|
+
body: _response.error.body,
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
switch (_response.error.reason) {
|
|
253
|
+
case "non-json":
|
|
254
|
+
throw new errors.RulebricksApiError({
|
|
255
|
+
statusCode: _response.error.statusCode,
|
|
256
|
+
body: _response.error.rawBody,
|
|
257
|
+
});
|
|
258
|
+
case "timeout":
|
|
259
|
+
throw new errors.RulebricksApiTimeoutError();
|
|
260
|
+
case "unknown":
|
|
261
|
+
throw new errors.RulebricksApiError({
|
|
262
|
+
message: _response.error.errorMessage,
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* List all rules in the organization. Optionally filter by folder name or ID.
|
|
269
|
+
* @throws {@link RulebricksApi.BadRequestError}
|
|
270
|
+
* @throws {@link RulebricksApi.InternalServerError}
|
|
271
|
+
*
|
|
272
|
+
* @example
|
|
273
|
+
* await rulebricksApi.assets.listRules({})
|
|
274
|
+
*/
|
|
275
|
+
listRules(request = {}, requestOptions) {
|
|
276
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
277
|
+
const { folder } = request;
|
|
278
|
+
const _queryParams = {};
|
|
279
|
+
if (folder != null) {
|
|
280
|
+
_queryParams["folder"] = folder;
|
|
281
|
+
}
|
|
282
|
+
const _response = yield core.fetcher({
|
|
283
|
+
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "api/v1/admin/rules/list"),
|
|
284
|
+
method: "GET",
|
|
285
|
+
headers: {
|
|
286
|
+
"x-api-key": yield core.Supplier.get(this._options.apiKey),
|
|
287
|
+
"X-Fern-Language": "JavaScript",
|
|
288
|
+
},
|
|
289
|
+
contentType: "application/json",
|
|
290
|
+
queryParameters: _queryParams,
|
|
291
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
292
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
293
|
+
});
|
|
294
|
+
if (_response.ok) {
|
|
295
|
+
return yield serializers.assets.listRules.Response.parseOrThrow(_response.body, {
|
|
296
|
+
unrecognizedObjectKeys: "passthrough",
|
|
297
|
+
allowUnrecognizedUnionMembers: true,
|
|
298
|
+
allowUnrecognizedEnumValues: true,
|
|
299
|
+
breadcrumbsPrefix: ["response"],
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
if (_response.error.reason === "status-code") {
|
|
303
|
+
switch (_response.error.statusCode) {
|
|
304
|
+
case 400:
|
|
305
|
+
throw new RulebricksApi.BadRequestError(_response.error.body);
|
|
306
|
+
case 500:
|
|
307
|
+
throw new RulebricksApi.InternalServerError(_response.error.body);
|
|
308
|
+
default:
|
|
309
|
+
throw new errors.RulebricksApiError({
|
|
310
|
+
statusCode: _response.error.statusCode,
|
|
311
|
+
body: _response.error.body,
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
switch (_response.error.reason) {
|
|
316
|
+
case "non-json":
|
|
317
|
+
throw new errors.RulebricksApiError({
|
|
318
|
+
statusCode: _response.error.statusCode,
|
|
319
|
+
body: _response.error.rawBody,
|
|
320
|
+
});
|
|
321
|
+
case "timeout":
|
|
322
|
+
throw new errors.RulebricksApiTimeoutError();
|
|
323
|
+
case "unknown":
|
|
324
|
+
throw new errors.RulebricksApiError({
|
|
325
|
+
message: _response.error.errorMessage,
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* List all flows in the organization.
|
|
332
|
+
* @throws {@link RulebricksApi.InternalServerError}
|
|
333
|
+
*
|
|
334
|
+
* @example
|
|
335
|
+
* await rulebricksApi.assets.listFlows()
|
|
336
|
+
*/
|
|
337
|
+
listFlows(requestOptions) {
|
|
338
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
339
|
+
const _response = yield core.fetcher({
|
|
340
|
+
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "api/v1/admin/flows/list"),
|
|
341
|
+
method: "GET",
|
|
342
|
+
headers: {
|
|
343
|
+
"x-api-key": yield core.Supplier.get(this._options.apiKey),
|
|
344
|
+
"X-Fern-Language": "JavaScript",
|
|
345
|
+
},
|
|
346
|
+
contentType: "application/json",
|
|
347
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
348
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
349
|
+
});
|
|
350
|
+
if (_response.ok) {
|
|
351
|
+
return yield serializers.assets.listFlows.Response.parseOrThrow(_response.body, {
|
|
352
|
+
unrecognizedObjectKeys: "passthrough",
|
|
353
|
+
allowUnrecognizedUnionMembers: true,
|
|
354
|
+
allowUnrecognizedEnumValues: true,
|
|
355
|
+
breadcrumbsPrefix: ["response"],
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
if (_response.error.reason === "status-code") {
|
|
359
|
+
switch (_response.error.statusCode) {
|
|
360
|
+
case 500:
|
|
361
|
+
throw new RulebricksApi.InternalServerError(_response.error.body);
|
|
362
|
+
default:
|
|
363
|
+
throw new errors.RulebricksApiError({
|
|
364
|
+
statusCode: _response.error.statusCode,
|
|
365
|
+
body: _response.error.body,
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
switch (_response.error.reason) {
|
|
370
|
+
case "non-json":
|
|
371
|
+
throw new errors.RulebricksApiError({
|
|
372
|
+
statusCode: _response.error.statusCode,
|
|
373
|
+
body: _response.error.rawBody,
|
|
374
|
+
});
|
|
375
|
+
case "timeout":
|
|
376
|
+
throw new errors.RulebricksApiTimeoutError();
|
|
377
|
+
case "unknown":
|
|
378
|
+
throw new errors.RulebricksApiError({
|
|
379
|
+
message: _response.error.errorMessage,
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* Get the rule execution usage of your organization.
|
|
386
|
+
*
|
|
387
|
+
* @example
|
|
388
|
+
* await rulebricksApi.assets.usage()
|
|
389
|
+
*/
|
|
390
|
+
usage(requestOptions) {
|
|
391
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
392
|
+
const _response = yield core.fetcher({
|
|
393
|
+
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "api/v1/admin/usage"),
|
|
394
|
+
method: "GET",
|
|
395
|
+
headers: {
|
|
396
|
+
"x-api-key": yield core.Supplier.get(this._options.apiKey),
|
|
397
|
+
"X-Fern-Language": "JavaScript",
|
|
398
|
+
},
|
|
399
|
+
contentType: "application/json",
|
|
400
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
401
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
402
|
+
});
|
|
403
|
+
if (_response.ok) {
|
|
404
|
+
return yield serializers.UsageResponse.parseOrThrow(_response.body, {
|
|
405
|
+
unrecognizedObjectKeys: "passthrough",
|
|
406
|
+
allowUnrecognizedUnionMembers: true,
|
|
407
|
+
allowUnrecognizedEnumValues: true,
|
|
408
|
+
breadcrumbsPrefix: ["response"],
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
if (_response.error.reason === "status-code") {
|
|
412
|
+
throw new errors.RulebricksApiError({
|
|
413
|
+
statusCode: _response.error.statusCode,
|
|
414
|
+
body: _response.error.body,
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
switch (_response.error.reason) {
|
|
418
|
+
case "non-json":
|
|
419
|
+
throw new errors.RulebricksApiError({
|
|
420
|
+
statusCode: _response.error.statusCode,
|
|
421
|
+
body: _response.error.rawBody,
|
|
422
|
+
});
|
|
423
|
+
case "timeout":
|
|
424
|
+
throw new errors.RulebricksApiTimeoutError();
|
|
425
|
+
case "unknown":
|
|
426
|
+
throw new errors.RulebricksApiError({
|
|
427
|
+
message: _response.error.errorMessage,
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Retrieve all rule folders for the authenticated user.
|
|
434
|
+
* @throws {@link RulebricksApi.InternalServerError}
|
|
435
|
+
*
|
|
436
|
+
* @example
|
|
437
|
+
* await rulebricksApi.assets.listFolders()
|
|
438
|
+
*/
|
|
439
|
+
listFolders(requestOptions) {
|
|
440
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
441
|
+
const _response = yield core.fetcher({
|
|
442
|
+
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "api/v1/admin/folders"),
|
|
443
|
+
method: "GET",
|
|
444
|
+
headers: {
|
|
445
|
+
"x-api-key": yield core.Supplier.get(this._options.apiKey),
|
|
446
|
+
"X-Fern-Language": "JavaScript",
|
|
447
|
+
},
|
|
448
|
+
contentType: "application/json",
|
|
449
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
450
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
451
|
+
});
|
|
452
|
+
if (_response.ok) {
|
|
453
|
+
return yield serializers.assets.listFolders.Response.parseOrThrow(_response.body, {
|
|
454
|
+
unrecognizedObjectKeys: "passthrough",
|
|
455
|
+
allowUnrecognizedUnionMembers: true,
|
|
456
|
+
allowUnrecognizedEnumValues: true,
|
|
457
|
+
breadcrumbsPrefix: ["response"],
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
if (_response.error.reason === "status-code") {
|
|
461
|
+
switch (_response.error.statusCode) {
|
|
462
|
+
case 500:
|
|
463
|
+
throw new RulebricksApi.InternalServerError(_response.error.body);
|
|
464
|
+
default:
|
|
465
|
+
throw new errors.RulebricksApiError({
|
|
466
|
+
statusCode: _response.error.statusCode,
|
|
467
|
+
body: _response.error.body,
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
switch (_response.error.reason) {
|
|
472
|
+
case "non-json":
|
|
473
|
+
throw new errors.RulebricksApiError({
|
|
474
|
+
statusCode: _response.error.statusCode,
|
|
475
|
+
body: _response.error.rawBody,
|
|
476
|
+
});
|
|
477
|
+
case "timeout":
|
|
478
|
+
throw new errors.RulebricksApiTimeoutError();
|
|
479
|
+
case "unknown":
|
|
480
|
+
throw new errors.RulebricksApiError({
|
|
481
|
+
message: _response.error.errorMessage,
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* Create a new rule folder or update an existing one for the authenticated user.
|
|
488
|
+
* @throws {@link RulebricksApi.BadRequestError}
|
|
489
|
+
* @throws {@link RulebricksApi.InternalServerError}
|
|
490
|
+
*
|
|
491
|
+
* @example
|
|
492
|
+
* await rulebricksApi.assets.upsertFolder({
|
|
493
|
+
* name: "Marketing Rules",
|
|
494
|
+
* description: "Rules for marketing automation workflows"
|
|
495
|
+
* })
|
|
496
|
+
*/
|
|
497
|
+
upsertFolder(request, requestOptions) {
|
|
498
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
499
|
+
const _response = yield core.fetcher({
|
|
500
|
+
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "api/v1/admin/folders"),
|
|
501
|
+
method: "POST",
|
|
502
|
+
headers: {
|
|
503
|
+
"x-api-key": yield core.Supplier.get(this._options.apiKey),
|
|
504
|
+
"X-Fern-Language": "JavaScript",
|
|
505
|
+
},
|
|
506
|
+
contentType: "application/json",
|
|
507
|
+
body: yield serializers.UpsertFolderRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
508
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
509
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
510
|
+
});
|
|
511
|
+
if (_response.ok) {
|
|
512
|
+
return yield serializers.UpsertFolderResponse.parseOrThrow(_response.body, {
|
|
513
|
+
unrecognizedObjectKeys: "passthrough",
|
|
514
|
+
allowUnrecognizedUnionMembers: true,
|
|
515
|
+
allowUnrecognizedEnumValues: true,
|
|
516
|
+
breadcrumbsPrefix: ["response"],
|
|
517
|
+
});
|
|
518
|
+
}
|
|
519
|
+
if (_response.error.reason === "status-code") {
|
|
520
|
+
switch (_response.error.statusCode) {
|
|
521
|
+
case 400:
|
|
522
|
+
throw new RulebricksApi.BadRequestError(_response.error.body);
|
|
523
|
+
case 500:
|
|
524
|
+
throw new RulebricksApi.InternalServerError(_response.error.body);
|
|
525
|
+
default:
|
|
526
|
+
throw new errors.RulebricksApiError({
|
|
527
|
+
statusCode: _response.error.statusCode,
|
|
528
|
+
body: _response.error.body,
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
switch (_response.error.reason) {
|
|
533
|
+
case "non-json":
|
|
534
|
+
throw new errors.RulebricksApiError({
|
|
535
|
+
statusCode: _response.error.statusCode,
|
|
536
|
+
body: _response.error.rawBody,
|
|
537
|
+
});
|
|
538
|
+
case "timeout":
|
|
539
|
+
throw new errors.RulebricksApiTimeoutError();
|
|
540
|
+
case "unknown":
|
|
541
|
+
throw new errors.RulebricksApiError({
|
|
542
|
+
message: _response.error.errorMessage,
|
|
543
|
+
});
|
|
544
|
+
}
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* Delete a specific rule folder for the authenticated user. This does not delete the rules within the folder.
|
|
549
|
+
* @throws {@link RulebricksApi.BadRequestError}
|
|
550
|
+
* @throws {@link RulebricksApi.NotFoundError}
|
|
551
|
+
* @throws {@link RulebricksApi.InternalServerError}
|
|
552
|
+
*
|
|
553
|
+
* @example
|
|
554
|
+
* await rulebricksApi.assets.deleteFolder({
|
|
555
|
+
* id: "abc123"
|
|
556
|
+
* })
|
|
557
|
+
*/
|
|
558
|
+
deleteFolder(request, requestOptions) {
|
|
559
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
560
|
+
const _response = yield core.fetcher({
|
|
561
|
+
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "api/v1/admin/folders"),
|
|
562
|
+
method: "DELETE",
|
|
563
|
+
headers: {
|
|
564
|
+
"x-api-key": yield core.Supplier.get(this._options.apiKey),
|
|
565
|
+
"X-Fern-Language": "JavaScript",
|
|
566
|
+
},
|
|
567
|
+
contentType: "application/json",
|
|
568
|
+
body: yield serializers.DeleteFolderRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
569
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
570
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
571
|
+
});
|
|
572
|
+
if (_response.ok) {
|
|
573
|
+
return yield serializers.DeleteFolderResponse.parseOrThrow(_response.body, {
|
|
574
|
+
unrecognizedObjectKeys: "passthrough",
|
|
575
|
+
allowUnrecognizedUnionMembers: true,
|
|
576
|
+
allowUnrecognizedEnumValues: true,
|
|
577
|
+
breadcrumbsPrefix: ["response"],
|
|
578
|
+
});
|
|
579
|
+
}
|
|
580
|
+
if (_response.error.reason === "status-code") {
|
|
581
|
+
switch (_response.error.statusCode) {
|
|
582
|
+
case 400:
|
|
583
|
+
throw new RulebricksApi.BadRequestError(_response.error.body);
|
|
584
|
+
case 404:
|
|
585
|
+
throw new RulebricksApi.NotFoundError(_response.error.body);
|
|
586
|
+
case 500:
|
|
587
|
+
throw new RulebricksApi.InternalServerError(_response.error.body);
|
|
588
|
+
default:
|
|
589
|
+
throw new errors.RulebricksApiError({
|
|
590
|
+
statusCode: _response.error.statusCode,
|
|
591
|
+
body: _response.error.body,
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
switch (_response.error.reason) {
|
|
596
|
+
case "non-json":
|
|
597
|
+
throw new errors.RulebricksApiError({
|
|
598
|
+
statusCode: _response.error.statusCode,
|
|
599
|
+
body: _response.error.rawBody,
|
|
600
|
+
});
|
|
601
|
+
case "timeout":
|
|
602
|
+
throw new errors.RulebricksApiTimeoutError();
|
|
603
|
+
case "unknown":
|
|
604
|
+
throw new errors.RulebricksApiError({
|
|
605
|
+
message: _response.error.errorMessage,
|
|
606
|
+
});
|
|
607
|
+
}
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
exports.Assets = Assets;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var __esModule: boolean;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function (o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined)
|
|
4
|
+
k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function () { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function (o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined)
|
|
12
|
+
k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __exportStar = (this && this.__exportStar) || function (m, exports) {
|
|
16
|
+
for (var p in m)
|
|
17
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p))
|
|
18
|
+
__createBinding(exports, m, p);
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
__exportStar(require("./requests"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var __esModule: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var __esModule: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var __esModule: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var __esModule: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var __esModule: boolean;
|