@opra/common 1.20.0 → 1.22.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 +3 -0
- package/browser.js +12 -0
- package/{esm/document → document}/api-document.js +7 -7
- package/{esm/document → document}/common/api-base.js +2 -1
- package/{esm/document → document}/common/data-type-map.js +3 -6
- package/{esm/document → document}/common/document-init-context.js +4 -3
- package/{esm/document → document}/common/document-node.js +4 -0
- package/{esm/document → document}/common/opra-document-error.js +1 -1
- package/{esm/document → document}/common/value.js +4 -0
- package/{esm/document → document}/data-type/api-field.js +1 -0
- package/{types/document → document}/data-type/array-type.d.ts +1 -1
- package/{esm/document → document}/data-type/complex-type-base.js +3 -0
- package/{esm/document → document}/data-type/complex-type.js +1 -0
- package/{esm/document → document}/data-type/extended-types/base64.type.js +1 -0
- package/{esm/document → document}/data-type/extended-types/date-time-tz.type.js +2 -0
- package/{esm/document → document}/data-type/extended-types/date-time.type.js +3 -0
- package/{esm/document → document}/data-type/extended-types/date.type.js +3 -0
- package/{esm/document → document}/data-type/extended-types/email.type.js +9 -0
- package/{esm/document → document}/data-type/extended-types/field-path.type.js +2 -0
- package/{esm/document → document}/data-type/extended-types/filter.type.js +2 -0
- package/{esm/document → document}/data-type/extended-types/partial-date.type.js +2 -0
- package/{esm/document → document}/data-type/extended-types/time.type.js +2 -0
- package/{esm/document → document}/data-type/extended-types/uuid.type.js +1 -0
- package/{esm/document → document}/data-type/mapped-type.js +4 -0
- package/{esm/document → document}/data-type/primitive-types/number.type.js +2 -0
- package/{esm/document → document}/data-type/primitive-types/string.type.js +4 -0
- package/{esm/document → document}/data-type/simple-type.js +3 -0
- package/document/decorators/ws-param.decorator.d.ts +7 -0
- package/{esm/document → document}/decorators/ws-param.decorator.js +2 -2
- package/{esm/document → document}/factory/api-document.factory.js +1 -3
- package/{esm/document → document}/factory/ws-api.factory.js +14 -3
- package/{esm/document → document}/http/http-api.js +5 -4
- package/{esm/document → document}/http/http-multipart-field.js +3 -0
- package/{esm/document → document}/http/http-operation-response.js +3 -0
- package/{esm/document → document}/http/http-request-body.js +8 -1
- package/{esm/document → document}/http/http-status-range.js +2 -2
- package/{esm/document → document}/mq/mq-api.js +5 -4
- package/{esm/document → document}/mq/mq-operation-response.js +7 -1
- package/{esm/document → document}/ws/ws-api.js +4 -4
- package/{types/document → document}/ws/ws-operation.d.ts +15 -3
- package/{esm/document → document}/ws/ws-operation.js +10 -2
- package/{esm/exception → exception}/http-errors/bad-request.error.js +1 -4
- package/{esm/exception → exception}/http-errors/conflict.error.js +1 -4
- package/{esm/exception → exception}/http-errors/failed-dependency.error.js +1 -4
- package/{esm/exception → exception}/http-errors/forbidden.error.js +1 -4
- package/{esm/exception → exception}/http-errors/internal-server.error.js +1 -4
- package/{esm/exception → exception}/http-errors/method-not-allowed.error.js +1 -4
- package/{esm/exception → exception}/http-errors/not-acceptable.error.js +1 -4
- package/{esm/exception → exception}/http-errors/not-found.error.js +1 -4
- package/{esm/exception → exception}/http-errors/resource-conflict.error.js +1 -1
- package/{esm/exception → exception}/http-errors/unauthorized.error.js +1 -4
- package/{esm/exception → exception}/http-errors/unprocessable-entity.error.js +1 -4
- package/{esm/exception → exception}/opra-exception.js +5 -1
- package/{esm/exception → exception}/opra-http-error.js +1 -0
- package/filter/antlr/OpraFilterLexer.js +425 -0
- package/filter/antlr/OpraFilterListener.js +302 -0
- package/{esm/filter → filter}/antlr/OpraFilterParser.js +218 -214
- package/filter/antlr/OpraFilterVisitor.js +185 -0
- package/{esm/filter → filter}/ast/abstract/ast.js +1 -0
- package/{esm/filter → filter}/ast/expressions/arithmetic-expression.js +3 -1
- package/{esm/filter → filter}/ast/expressions/array-expression.js +1 -0
- package/{esm/filter → filter}/ast/expressions/comparison-expression.js +4 -0
- package/{esm/filter → filter}/ast/expressions/logical-expression.js +2 -0
- package/{esm/filter → filter}/ast/expressions/negative-expression.js +1 -0
- package/{esm/filter → filter}/ast/expressions/parenthesized-expression.js +1 -0
- package/{esm/filter → filter}/ast/terms/date-literal.js +1 -0
- package/{esm/filter → filter}/ast/terms/date-time-literal.js +1 -0
- package/{esm/filter → filter}/ast/terms/null-literal.js +1 -1
- package/{esm/filter → filter}/ast/terms/number-literal.js +1 -0
- package/{esm/filter → filter}/ast/terms/time-literal.js +1 -0
- package/{esm/filter → filter}/filter-rules.js +2 -2
- package/{esm/filter → filter}/filter-tree-visitor.js +1 -0
- package/{esm/filter → filter}/opra-error-listener.js +1 -0
- package/{esm/helpers → helpers}/parse-fields-projection.js +2 -0
- package/package.json +15 -35
- package/{types/schema → schema}/ws/ws-api.interface.d.ts +4 -0
- package/browser/index.cjs +0 -12
- package/browser/index.mjs +0 -12
- package/cjs/document/api-document.js +0 -182
- package/cjs/document/common/api-base.js +0 -31
- package/cjs/document/common/data-type-map.js +0 -77
- package/cjs/document/common/document-element.js +0 -34
- package/cjs/document/common/document-init-context.js +0 -69
- package/cjs/document/common/document-node.js +0 -145
- package/cjs/document/common/opra-document-error.js +0 -15
- package/cjs/document/common/value.js +0 -39
- package/cjs/document/constants.js +0 -18
- package/cjs/document/data-type/api-field.js +0 -124
- package/cjs/document/data-type/array-type.js +0 -78
- package/cjs/document/data-type/complex-type-base.js +0 -346
- package/cjs/document/data-type/complex-type.js +0 -127
- package/cjs/document/data-type/data-type.js +0 -67
- package/cjs/document/data-type/enum-type.js +0 -128
- package/cjs/document/data-type/extended-types/base64.type.js +0 -49
- package/cjs/document/data-type/extended-types/date-time-tz.type.js +0 -63
- package/cjs/document/data-type/extended-types/date-time.type.js +0 -76
- package/cjs/document/data-type/extended-types/date.type.js +0 -74
- package/cjs/document/data-type/extended-types/email.type.js +0 -95
- package/cjs/document/data-type/extended-types/field-path.type.js +0 -65
- package/cjs/document/data-type/extended-types/filter.type.js +0 -88
- package/cjs/document/data-type/extended-types/index.js +0 -16
- package/cjs/document/data-type/extended-types/object-id.type.js +0 -31
- package/cjs/document/data-type/extended-types/operation-result.type.js +0 -67
- package/cjs/document/data-type/extended-types/partial-date.type.js +0 -85
- package/cjs/document/data-type/extended-types/time.type.js +0 -55
- package/cjs/document/data-type/extended-types/url.type.js +0 -31
- package/cjs/document/data-type/extended-types/uuid.type.js +0 -37
- package/cjs/document/data-type/mapped-type.js +0 -120
- package/cjs/document/data-type/mixin-type.js +0 -123
- package/cjs/document/data-type/omit-type.js +0 -10
- package/cjs/document/data-type/partial-type.js +0 -12
- package/cjs/document/data-type/pick-type.js +0 -10
- package/cjs/document/data-type/primitive-types/any.type.js +0 -27
- package/cjs/document/data-type/primitive-types/bigint.type.js +0 -38
- package/cjs/document/data-type/primitive-types/boolean.type.js +0 -31
- package/cjs/document/data-type/primitive-types/index.js +0 -11
- package/cjs/document/data-type/primitive-types/integer.type.js +0 -38
- package/cjs/document/data-type/primitive-types/null.type.js +0 -31
- package/cjs/document/data-type/primitive-types/number.type.js +0 -50
- package/cjs/document/data-type/primitive-types/object.type.js +0 -20
- package/cjs/document/data-type/primitive-types/string.type.js +0 -70
- package/cjs/document/data-type/required-type.js +0 -12
- package/cjs/document/data-type/simple-type.js +0 -133
- package/cjs/document/data-type/union-type.js +0 -84
- package/cjs/document/data-type/utils/create-mapped-class.js +0 -56
- package/cjs/document/data-type/utils/get-is-inherited-predicate-fn.js +0 -14
- package/cjs/document/decorators/api-field-decorator.js +0 -50
- package/cjs/document/decorators/complex-type.decorator.js +0 -31
- package/cjs/document/decorators/http-controller.decorator.js +0 -145
- package/cjs/document/decorators/http-operation-entity-create.decorator.js +0 -58
- package/cjs/document/decorators/http-operation-entity-delete-many.decorator.js +0 -41
- package/cjs/document/decorators/http-operation-entity-delete.decorator.js +0 -41
- package/cjs/document/decorators/http-operation-entity-find-many.decorator.js +0 -85
- package/cjs/document/decorators/http-operation-entity-get.decorator.js +0 -56
- package/cjs/document/decorators/http-operation-entity-replace.decorator.js +0 -56
- package/cjs/document/decorators/http-operation-entity-update-many.decorator.js +0 -50
- package/cjs/document/decorators/http-operation-entity-update.decorator.js +0 -66
- package/cjs/document/decorators/http-operation-entity.decorator.js +0 -143
- package/cjs/document/decorators/http-operation.decorator.js +0 -213
- package/cjs/document/decorators/mq-controller.decorator.js +0 -67
- package/cjs/document/decorators/mq-operation.decorator.js +0 -82
- package/cjs/document/decorators/simple-type.decorator.js +0 -67
- package/cjs/document/decorators/ws-controller.decorator.js +0 -51
- package/cjs/document/decorators/ws-operation.decorator.js +0 -42
- package/cjs/document/decorators/ws-param.decorator.js +0 -22
- package/cjs/document/factory/api-document.factory.js +0 -192
- package/cjs/document/factory/data-type.factory.js +0 -647
- package/cjs/document/factory/http-api.factory.js +0 -302
- package/cjs/document/factory/mq-api.factory.js +0 -203
- package/cjs/document/factory/ws-api.factory.js +0 -145
- package/cjs/document/http/http-api.js +0 -40
- package/cjs/document/http/http-controller.js +0 -159
- package/cjs/document/http/http-media-type.js +0 -104
- package/cjs/document/http/http-multipart-field.js +0 -32
- package/cjs/document/http/http-operation-response.js +0 -47
- package/cjs/document/http/http-operation.js +0 -126
- package/cjs/document/http/http-parameter.js +0 -57
- package/cjs/document/http/http-request-body.js +0 -27
- package/cjs/document/http/http-status-range.js +0 -45
- package/cjs/document/index.js +0 -70
- package/cjs/document/mq/mq-api.js +0 -54
- package/cjs/document/mq/mq-controller.js +0 -101
- package/cjs/document/mq/mq-header.js +0 -48
- package/cjs/document/mq/mq-operation-response.js +0 -66
- package/cjs/document/mq/mq-operation.js +0 -101
- package/cjs/document/utils/inspect.util.js +0 -7
- package/cjs/document/utils/parse-regexp.util.js +0 -21
- package/cjs/document/utils/string-compare.util.js +0 -10
- package/cjs/document/utils/test-scope-match.js +0 -15
- package/cjs/document/ws/ws-api.js +0 -52
- package/cjs/document/ws/ws-controller.js +0 -78
- package/cjs/document/ws/ws-operation.js +0 -64
- package/cjs/enums/http-headers-codes.enum.js +0 -411
- package/cjs/enums/http-status-codes.enum.js +0 -300
- package/cjs/enums/http-status-messages.js +0 -68
- package/cjs/enums/index.js +0 -7
- package/cjs/enums/mime-types.enum.js +0 -17
- package/cjs/exception/error-issue.js +0 -2
- package/cjs/exception/http-errors/bad-request.error.js +0 -23
- package/cjs/exception/http-errors/conflict.error.js +0 -22
- package/cjs/exception/http-errors/failed-dependency.error.js +0 -22
- package/cjs/exception/http-errors/forbidden.error.js +0 -25
- package/cjs/exception/http-errors/internal-server.error.js +0 -23
- package/cjs/exception/http-errors/method-not-allowed.error.js +0 -23
- package/cjs/exception/http-errors/not-acceptable.error.js +0 -23
- package/cjs/exception/http-errors/not-found.error.js +0 -26
- package/cjs/exception/http-errors/permission.error.js +0 -20
- package/cjs/exception/http-errors/resource-conflict.error.js +0 -19
- package/cjs/exception/http-errors/resource-not.available.error.js +0 -23
- package/cjs/exception/http-errors/unauthorized.error.js +0 -23
- package/cjs/exception/http-errors/unprocessable-entity.error.js +0 -23
- package/cjs/exception/index.js +0 -20
- package/cjs/exception/issue-severity.enum.js +0 -23
- package/cjs/exception/opra-exception.js +0 -70
- package/cjs/exception/opra-http-error.js +0 -25
- package/cjs/filter/antlr/OpraFilterLexer.js +0 -427
- package/cjs/filter/antlr/OpraFilterListener.js +0 -11
- package/cjs/filter/antlr/OpraFilterParser.js +0 -1851
- package/cjs/filter/antlr/OpraFilterVisitor.js +0 -14
- package/cjs/filter/ast/abstract/ast.js +0 -9
- package/cjs/filter/ast/abstract/expression.js +0 -7
- package/cjs/filter/ast/abstract/literal.js +0 -14
- package/cjs/filter/ast/abstract/term.js +0 -7
- package/cjs/filter/ast/expressions/arithmetic-expression.js +0 -29
- package/cjs/filter/ast/expressions/array-expression.js +0 -14
- package/cjs/filter/ast/expressions/comparison-expression.js +0 -15
- package/cjs/filter/ast/expressions/logical-expression.js +0 -18
- package/cjs/filter/ast/expressions/negative-expression.js +0 -14
- package/cjs/filter/ast/expressions/parenthesized-expression.js +0 -14
- package/cjs/filter/ast/index.js +0 -21
- package/cjs/filter/ast/terms/boolean-literal.js +0 -10
- package/cjs/filter/ast/terms/date-literal.js +0 -28
- package/cjs/filter/ast/terms/date-time-literal.js +0 -27
- package/cjs/filter/ast/terms/external-constant.js +0 -13
- package/cjs/filter/ast/terms/null-literal.js +0 -11
- package/cjs/filter/ast/terms/number-literal.js +0 -39
- package/cjs/filter/ast/terms/qualified-identifier.js +0 -10
- package/cjs/filter/ast/terms/string-literal.js +0 -14
- package/cjs/filter/ast/terms/time-literal.js +0 -34
- package/cjs/filter/build.js +0 -126
- package/cjs/filter/errors.js +0 -21
- package/cjs/filter/filter-rules.js +0 -150
- package/cjs/filter/filter-tree-visitor.js +0 -97
- package/cjs/filter/index.js +0 -5
- package/cjs/filter/opra-error-listener.js +0 -21
- package/cjs/filter/opra-filter.ns.js +0 -8
- package/cjs/filter/parse.js +0 -38
- package/cjs/filter/utils.js +0 -25
- package/cjs/helpers/function-utils.js +0 -15
- package/cjs/helpers/get-stack-filename.js +0 -51
- package/cjs/helpers/index.js +0 -12
- package/cjs/helpers/mixin-utils.js +0 -35
- package/cjs/helpers/object-utils.js +0 -19
- package/cjs/helpers/parse-fields-projection.js +0 -67
- package/cjs/helpers/responsive-map.js +0 -155
- package/cjs/helpers/safe-json-stringify.js +0 -16
- package/cjs/helpers/type-guards.js +0 -46
- package/cjs/i18n/i18n.js +0 -139
- package/cjs/i18n/index.js +0 -10
- package/cjs/i18n/string-utils.js +0 -12
- package/cjs/i18n/translate.js +0 -16
- package/cjs/index.js +0 -14
- package/cjs/package.json +0 -3
- package/cjs/polifils/array-find-last.js +0 -22
- package/cjs/schema/api-document.interface.js +0 -2
- package/cjs/schema/api.interface.js +0 -2
- package/cjs/schema/constants.js +0 -4
- package/cjs/schema/data-type/array-type.interface.js +0 -7
- package/cjs/schema/data-type/complex-type.interface.js +0 -7
- package/cjs/schema/data-type/data-type.interface.js +0 -2
- package/cjs/schema/data-type/enum-type.interface.js +0 -7
- package/cjs/schema/data-type/field.interface.js +0 -2
- package/cjs/schema/data-type/mapped-type.interface.js +0 -7
- package/cjs/schema/data-type/mixin-type.interface.js +0 -7
- package/cjs/schema/data-type/simple-type.interface.js +0 -7
- package/cjs/schema/data-type/union-type.interface.js +0 -7
- package/cjs/schema/data-type-container.interface.js +0 -2
- package/cjs/schema/http/http-api.interface.js +0 -2
- package/cjs/schema/http/http-controller.interface.js +0 -11
- package/cjs/schema/http/http-media-type.interface.js +0 -2
- package/cjs/schema/http/http-multipart-field.interface.js +0 -2
- package/cjs/schema/http/http-operation-response.interface.js +0 -2
- package/cjs/schema/http/http-operation.interface.js +0 -7
- package/cjs/schema/http/http-parameter.interface.js +0 -2
- package/cjs/schema/http/http-request-body.interface.js +0 -2
- package/cjs/schema/http/http-status-range.interface.js +0 -2
- package/cjs/schema/index.js +0 -6
- package/cjs/schema/mq/mq-api.interface.js +0 -2
- package/cjs/schema/mq/mq-controller.interface.js +0 -11
- package/cjs/schema/mq/mq-header.interface.js +0 -2
- package/cjs/schema/mq/mq-operation.interface.js +0 -7
- package/cjs/schema/opra-schema.js +0 -35
- package/cjs/schema/type-guards.js +0 -54
- package/cjs/schema/types.js +0 -2
- package/cjs/schema/value.interface.js +0 -2
- package/cjs/schema/ws/ws-api.interface.js +0 -2
- package/cjs/schema/ws/ws-controller.interface.js +0 -11
- package/cjs/schema/ws/ws-operation.interface.js +0 -7
- package/cjs/types.js +0 -2
- package/esm/filter/antlr/OpraFilterLexer.js +0 -425
- package/esm/filter/antlr/OpraFilterListener.js +0 -8
- package/esm/filter/antlr/OpraFilterVisitor.js +0 -11
- package/esm/helpers/monkey-patches.js +0 -14
- package/esm/package.json +0 -3
- package/types/document/decorators/ws-param.decorator.d.ts +0 -2
- package/types/index.d.cts +0 -9
- /package/{types/document → document}/api-document.d.ts +0 -0
- /package/{types/document → document}/common/api-base.d.ts +0 -0
- /package/{types/document → document}/common/data-type-map.d.ts +0 -0
- /package/{types/document → document}/common/document-element.d.ts +0 -0
- /package/{esm/document → document}/common/document-element.js +0 -0
- /package/{types/document → document}/common/document-init-context.d.ts +0 -0
- /package/{types/document → document}/common/document-node.d.ts +0 -0
- /package/{types/document → document}/common/opra-document-error.d.ts +0 -0
- /package/{types/document → document}/common/value.d.ts +0 -0
- /package/{types/document → document}/constants.d.ts +0 -0
- /package/{esm/document → document}/constants.js +0 -0
- /package/{types/document → document}/data-type/api-field.d.ts +0 -0
- /package/{esm/document → document}/data-type/array-type.js +0 -0
- /package/{types/document → document}/data-type/complex-type-base.d.ts +0 -0
- /package/{types/document → document}/data-type/complex-type.d.ts +0 -0
- /package/{types/document → document}/data-type/data-type.d.ts +0 -0
- /package/{esm/document → document}/data-type/data-type.js +0 -0
- /package/{types/document → document}/data-type/enum-type.d.ts +0 -0
- /package/{esm/document → document}/data-type/enum-type.js +0 -0
- /package/{types/document → document}/data-type/extended-types/base64.type.d.ts +0 -0
- /package/{types/document → document}/data-type/extended-types/date-time-tz.type.d.ts +0 -0
- /package/{types/document → document}/data-type/extended-types/date-time.type.d.ts +0 -0
- /package/{types/document → document}/data-type/extended-types/date.type.d.ts +0 -0
- /package/{types/document → document}/data-type/extended-types/email.type.d.ts +0 -0
- /package/{types/document → document}/data-type/extended-types/field-path.type.d.ts +0 -0
- /package/{types/document → document}/data-type/extended-types/filter.type.d.ts +0 -0
- /package/{types/document → document}/data-type/extended-types/index.d.ts +0 -0
- /package/{esm/document → document}/data-type/extended-types/index.js +0 -0
- /package/{types/document → document}/data-type/extended-types/object-id.type.d.ts +0 -0
- /package/{esm/document → document}/data-type/extended-types/object-id.type.js +0 -0
- /package/{types/document → document}/data-type/extended-types/operation-result.type.d.ts +0 -0
- /package/{esm/document → document}/data-type/extended-types/operation-result.type.js +0 -0
- /package/{types/document → document}/data-type/extended-types/partial-date.type.d.ts +0 -0
- /package/{types/document → document}/data-type/extended-types/time.type.d.ts +0 -0
- /package/{types/document → document}/data-type/extended-types/url.type.d.ts +0 -0
- /package/{esm/document → document}/data-type/extended-types/url.type.js +0 -0
- /package/{types/document → document}/data-type/extended-types/uuid.type.d.ts +0 -0
- /package/{types/document → document}/data-type/mapped-type.d.ts +0 -0
- /package/{types/document → document}/data-type/mixin-type.d.ts +0 -0
- /package/{esm/document → document}/data-type/mixin-type.js +0 -0
- /package/{types/document → document}/data-type/omit-type.d.ts +0 -0
- /package/{esm/document → document}/data-type/omit-type.js +0 -0
- /package/{types/document → document}/data-type/partial-type.d.ts +0 -0
- /package/{esm/document → document}/data-type/partial-type.js +0 -0
- /package/{types/document → document}/data-type/pick-type.d.ts +0 -0
- /package/{esm/document → document}/data-type/pick-type.js +0 -0
- /package/{types/document → document}/data-type/primitive-types/any.type.d.ts +0 -0
- /package/{esm/document → document}/data-type/primitive-types/any.type.js +0 -0
- /package/{types/document → document}/data-type/primitive-types/bigint.type.d.ts +0 -0
- /package/{esm/document → document}/data-type/primitive-types/bigint.type.js +0 -0
- /package/{types/document → document}/data-type/primitive-types/boolean.type.d.ts +0 -0
- /package/{esm/document → document}/data-type/primitive-types/boolean.type.js +0 -0
- /package/{types/document → document}/data-type/primitive-types/index.d.ts +0 -0
- /package/{esm/document → document}/data-type/primitive-types/index.js +0 -0
- /package/{types/document → document}/data-type/primitive-types/integer.type.d.ts +0 -0
- /package/{esm/document → document}/data-type/primitive-types/integer.type.js +0 -0
- /package/{types/document → document}/data-type/primitive-types/null.type.d.ts +0 -0
- /package/{esm/document → document}/data-type/primitive-types/null.type.js +0 -0
- /package/{types/document → document}/data-type/primitive-types/number.type.d.ts +0 -0
- /package/{types/document → document}/data-type/primitive-types/object.type.d.ts +0 -0
- /package/{esm/document → document}/data-type/primitive-types/object.type.js +0 -0
- /package/{types/document → document}/data-type/primitive-types/string.type.d.ts +0 -0
- /package/{types/document → document}/data-type/required-type.d.ts +0 -0
- /package/{esm/document → document}/data-type/required-type.js +0 -0
- /package/{types/document → document}/data-type/simple-type.d.ts +0 -0
- /package/{types/document → document}/data-type/union-type.d.ts +0 -0
- /package/{esm/document → document}/data-type/union-type.js +0 -0
- /package/{types/document → document}/data-type/utils/create-mapped-class.d.ts +0 -0
- /package/{esm/document → document}/data-type/utils/create-mapped-class.js +0 -0
- /package/{types/document → document}/data-type/utils/get-is-inherited-predicate-fn.d.ts +0 -0
- /package/{esm/document → document}/data-type/utils/get-is-inherited-predicate-fn.js +0 -0
- /package/{types/document → document}/decorators/api-field-decorator.d.ts +0 -0
- /package/{esm/document → document}/decorators/api-field-decorator.js +0 -0
- /package/{types/document → document}/decorators/complex-type.decorator.d.ts +0 -0
- /package/{esm/document → document}/decorators/complex-type.decorator.js +0 -0
- /package/{types/document → document}/decorators/http-controller.decorator.d.ts +0 -0
- /package/{esm/document → document}/decorators/http-controller.decorator.js +0 -0
- /package/{types/document → document}/decorators/http-operation-entity-create.decorator.d.ts +0 -0
- /package/{esm/document → document}/decorators/http-operation-entity-create.decorator.js +0 -0
- /package/{types/document → document}/decorators/http-operation-entity-delete-many.decorator.d.ts +0 -0
- /package/{esm/document → document}/decorators/http-operation-entity-delete-many.decorator.js +0 -0
- /package/{types/document → document}/decorators/http-operation-entity-delete.decorator.d.ts +0 -0
- /package/{esm/document → document}/decorators/http-operation-entity-delete.decorator.js +0 -0
- /package/{types/document → document}/decorators/http-operation-entity-find-many.decorator.d.ts +0 -0
- /package/{esm/document → document}/decorators/http-operation-entity-find-many.decorator.js +0 -0
- /package/{types/document → document}/decorators/http-operation-entity-get.decorator.d.ts +0 -0
- /package/{esm/document → document}/decorators/http-operation-entity-get.decorator.js +0 -0
- /package/{types/document → document}/decorators/http-operation-entity-replace.decorator.d.ts +0 -0
- /package/{esm/document → document}/decorators/http-operation-entity-replace.decorator.js +0 -0
- /package/{types/document → document}/decorators/http-operation-entity-update-many.decorator.d.ts +0 -0
- /package/{esm/document → document}/decorators/http-operation-entity-update-many.decorator.js +0 -0
- /package/{types/document → document}/decorators/http-operation-entity-update.decorator.d.ts +0 -0
- /package/{esm/document → document}/decorators/http-operation-entity-update.decorator.js +0 -0
- /package/{types/document → document}/decorators/http-operation-entity.decorator.d.ts +0 -0
- /package/{esm/document → document}/decorators/http-operation-entity.decorator.js +0 -0
- /package/{types/document → document}/decorators/http-operation.decorator.d.ts +0 -0
- /package/{esm/document → document}/decorators/http-operation.decorator.js +0 -0
- /package/{types/document → document}/decorators/mq-controller.decorator.d.ts +0 -0
- /package/{esm/document → document}/decorators/mq-controller.decorator.js +0 -0
- /package/{types/document → document}/decorators/mq-operation.decorator.d.ts +0 -0
- /package/{esm/document → document}/decorators/mq-operation.decorator.js +0 -0
- /package/{types/document → document}/decorators/simple-type.decorator.d.ts +0 -0
- /package/{esm/document → document}/decorators/simple-type.decorator.js +0 -0
- /package/{types/document → document}/decorators/ws-controller.decorator.d.ts +0 -0
- /package/{esm/document → document}/decorators/ws-controller.decorator.js +0 -0
- /package/{types/document → document}/decorators/ws-operation.decorator.d.ts +0 -0
- /package/{esm/document → document}/decorators/ws-operation.decorator.js +0 -0
- /package/{types/document → document}/factory/api-document.factory.d.ts +0 -0
- /package/{types/document → document}/factory/data-type.factory.d.ts +0 -0
- /package/{esm/document → document}/factory/data-type.factory.js +0 -0
- /package/{types/document → document}/factory/http-api.factory.d.ts +0 -0
- /package/{esm/document → document}/factory/http-api.factory.js +0 -0
- /package/{types/document → document}/factory/mq-api.factory.d.ts +0 -0
- /package/{esm/document → document}/factory/mq-api.factory.js +0 -0
- /package/{types/document → document}/factory/ws-api.factory.d.ts +0 -0
- /package/{types/document → document}/http/http-api.d.ts +0 -0
- /package/{types/document → document}/http/http-controller.d.ts +0 -0
- /package/{esm/document → document}/http/http-controller.js +0 -0
- /package/{types/document → document}/http/http-media-type.d.ts +0 -0
- /package/{esm/document → document}/http/http-media-type.js +0 -0
- /package/{types/document → document}/http/http-multipart-field.d.ts +0 -0
- /package/{types/document → document}/http/http-operation-response.d.ts +0 -0
- /package/{types/document → document}/http/http-operation.d.ts +0 -0
- /package/{esm/document → document}/http/http-operation.js +0 -0
- /package/{types/document → document}/http/http-parameter.d.ts +0 -0
- /package/{esm/document → document}/http/http-parameter.js +0 -0
- /package/{types/document → document}/http/http-request-body.d.ts +0 -0
- /package/{types/document → document}/http/http-status-range.d.ts +0 -0
- /package/{types/document → document}/index.d.ts +0 -0
- /package/{esm/document → document}/index.js +0 -0
- /package/{types/document → document}/mq/mq-api.d.ts +0 -0
- /package/{types/document → document}/mq/mq-controller.d.ts +0 -0
- /package/{esm/document → document}/mq/mq-controller.js +0 -0
- /package/{types/document → document}/mq/mq-header.d.ts +0 -0
- /package/{esm/document → document}/mq/mq-header.js +0 -0
- /package/{types/document → document}/mq/mq-operation-response.d.ts +0 -0
- /package/{types/document → document}/mq/mq-operation.d.ts +0 -0
- /package/{esm/document → document}/mq/mq-operation.js +0 -0
- /package/{types/document → document}/utils/inspect.util.d.ts +0 -0
- /package/{esm/document → document}/utils/inspect.util.js +0 -0
- /package/{types/document → document}/utils/parse-regexp.util.d.ts +0 -0
- /package/{esm/document → document}/utils/parse-regexp.util.js +0 -0
- /package/{types/document → document}/utils/string-compare.util.d.ts +0 -0
- /package/{esm/document → document}/utils/string-compare.util.js +0 -0
- /package/{types/document → document}/utils/test-scope-match.d.ts +0 -0
- /package/{esm/document → document}/utils/test-scope-match.js +0 -0
- /package/{types/document → document}/ws/ws-api.d.ts +0 -0
- /package/{types/document → document}/ws/ws-controller.d.ts +0 -0
- /package/{esm/document → document}/ws/ws-controller.js +0 -0
- /package/{types/enums → enums}/http-headers-codes.enum.d.ts +0 -0
- /package/{esm/enums → enums}/http-headers-codes.enum.js +0 -0
- /package/{types/enums → enums}/http-status-codes.enum.d.ts +0 -0
- /package/{esm/enums → enums}/http-status-codes.enum.js +0 -0
- /package/{types/enums → enums}/http-status-messages.d.ts +0 -0
- /package/{esm/enums → enums}/http-status-messages.js +0 -0
- /package/{types/enums → enums}/index.d.ts +0 -0
- /package/{esm/enums → enums}/index.js +0 -0
- /package/{types/enums → enums}/mime-types.enum.d.ts +0 -0
- /package/{esm/enums → enums}/mime-types.enum.js +0 -0
- /package/{types/exception → exception}/error-issue.d.ts +0 -0
- /package/{esm/exception → exception}/error-issue.js +0 -0
- /package/{types/exception → exception}/http-errors/bad-request.error.d.ts +0 -0
- /package/{types/exception → exception}/http-errors/conflict.error.d.ts +0 -0
- /package/{types/exception → exception}/http-errors/failed-dependency.error.d.ts +0 -0
- /package/{types/exception → exception}/http-errors/forbidden.error.d.ts +0 -0
- /package/{types/exception → exception}/http-errors/internal-server.error.d.ts +0 -0
- /package/{types/exception → exception}/http-errors/method-not-allowed.error.d.ts +0 -0
- /package/{types/exception → exception}/http-errors/not-acceptable.error.d.ts +0 -0
- /package/{types/exception → exception}/http-errors/not-found.error.d.ts +0 -0
- /package/{types/exception → exception}/http-errors/permission.error.d.ts +0 -0
- /package/{esm/exception → exception}/http-errors/permission.error.js +0 -0
- /package/{types/exception → exception}/http-errors/resource-conflict.error.d.ts +0 -0
- /package/{types/exception → exception}/http-errors/resource-not.available.error.d.ts +0 -0
- /package/{esm/exception → exception}/http-errors/resource-not.available.error.js +0 -0
- /package/{types/exception → exception}/http-errors/unauthorized.error.d.ts +0 -0
- /package/{types/exception → exception}/http-errors/unprocessable-entity.error.d.ts +0 -0
- /package/{types/exception → exception}/index.d.ts +0 -0
- /package/{esm/exception → exception}/index.js +0 -0
- /package/{types/exception → exception}/issue-severity.enum.d.ts +0 -0
- /package/{esm/exception → exception}/issue-severity.enum.js +0 -0
- /package/{types/exception → exception}/opra-exception.d.ts +0 -0
- /package/{types/exception → exception}/opra-http-error.d.ts +0 -0
- /package/{types/filter → filter}/antlr/OpraFilterLexer.d.ts +0 -0
- /package/{types/filter → filter}/antlr/OpraFilterListener.d.ts +0 -0
- /package/{types/filter → filter}/antlr/OpraFilterParser.d.ts +0 -0
- /package/{types/filter → filter}/antlr/OpraFilterVisitor.d.ts +0 -0
- /package/{types/filter → filter}/ast/abstract/ast.d.ts +0 -0
- /package/{types/filter → filter}/ast/abstract/expression.d.ts +0 -0
- /package/{esm/filter → filter}/ast/abstract/expression.js +0 -0
- /package/{types/filter → filter}/ast/abstract/literal.d.ts +0 -0
- /package/{esm/filter → filter}/ast/abstract/literal.js +0 -0
- /package/{types/filter → filter}/ast/abstract/term.d.ts +0 -0
- /package/{esm/filter → filter}/ast/abstract/term.js +0 -0
- /package/{types/filter → filter}/ast/expressions/arithmetic-expression.d.ts +0 -0
- /package/{types/filter → filter}/ast/expressions/array-expression.d.ts +0 -0
- /package/{types/filter → filter}/ast/expressions/comparison-expression.d.ts +0 -0
- /package/{types/filter → filter}/ast/expressions/logical-expression.d.ts +0 -0
- /package/{types/filter → filter}/ast/expressions/negative-expression.d.ts +0 -0
- /package/{types/filter → filter}/ast/expressions/parenthesized-expression.d.ts +0 -0
- /package/{types/filter → filter}/ast/index.d.ts +0 -0
- /package/{esm/filter → filter}/ast/index.js +0 -0
- /package/{types/filter → filter}/ast/terms/boolean-literal.d.ts +0 -0
- /package/{esm/filter → filter}/ast/terms/boolean-literal.js +0 -0
- /package/{types/filter → filter}/ast/terms/date-literal.d.ts +0 -0
- /package/{types/filter → filter}/ast/terms/date-time-literal.d.ts +0 -0
- /package/{types/filter → filter}/ast/terms/external-constant.d.ts +0 -0
- /package/{esm/filter → filter}/ast/terms/external-constant.js +0 -0
- /package/{types/filter → filter}/ast/terms/null-literal.d.ts +0 -0
- /package/{types/filter → filter}/ast/terms/number-literal.d.ts +0 -0
- /package/{types/filter → filter}/ast/terms/qualified-identifier.d.ts +0 -0
- /package/{esm/filter → filter}/ast/terms/qualified-identifier.js +0 -0
- /package/{types/filter → filter}/ast/terms/string-literal.d.ts +0 -0
- /package/{esm/filter → filter}/ast/terms/string-literal.js +0 -0
- /package/{types/filter → filter}/ast/terms/time-literal.d.ts +0 -0
- /package/{types/filter → filter}/build.d.ts +0 -0
- /package/{esm/filter → filter}/build.js +0 -0
- /package/{types/filter → filter}/errors.d.ts +0 -0
- /package/{esm/filter → filter}/errors.js +0 -0
- /package/{types/filter → filter}/filter-rules.d.ts +0 -0
- /package/{types/filter → filter}/filter-tree-visitor.d.ts +0 -0
- /package/{types/filter → filter}/index.d.ts +0 -0
- /package/{esm/filter → filter}/index.js +0 -0
- /package/{types/filter → filter}/opra-error-listener.d.ts +0 -0
- /package/{types/filter → filter}/opra-filter.ns.d.ts +0 -0
- /package/{esm/filter → filter}/opra-filter.ns.js +0 -0
- /package/{types/filter → filter}/parse.d.ts +0 -0
- /package/{esm/filter → filter}/parse.js +0 -0
- /package/{types/filter → filter}/utils.d.ts +0 -0
- /package/{esm/filter → filter}/utils.js +0 -0
- /package/{types/helpers → helpers}/function-utils.d.ts +0 -0
- /package/{esm/helpers → helpers}/function-utils.js +0 -0
- /package/{types/helpers → helpers}/get-stack-filename.d.ts +0 -0
- /package/{esm/helpers → helpers}/get-stack-filename.js +0 -0
- /package/{types/helpers → helpers}/index.d.ts +0 -0
- /package/{esm/helpers → helpers}/index.js +0 -0
- /package/{types/helpers → helpers}/mixin-utils.d.ts +0 -0
- /package/{esm/helpers → helpers}/mixin-utils.js +0 -0
- /package/{types/helpers → helpers}/monkey-patches.d.ts +0 -0
- /package/{cjs/helpers → helpers}/monkey-patches.js +0 -0
- /package/{types/helpers → helpers}/object-utils.d.ts +0 -0
- /package/{esm/helpers → helpers}/object-utils.js +0 -0
- /package/{types/helpers → helpers}/parse-fields-projection.d.ts +0 -0
- /package/{types/helpers → helpers}/responsive-map.d.ts +0 -0
- /package/{esm/helpers → helpers}/responsive-map.js +0 -0
- /package/{types/helpers → helpers}/safe-json-stringify.d.ts +0 -0
- /package/{esm/helpers → helpers}/safe-json-stringify.js +0 -0
- /package/{types/helpers → helpers}/type-guards.d.ts +0 -0
- /package/{esm/helpers → helpers}/type-guards.js +0 -0
- /package/{types/i18n → i18n}/i18n.d.ts +0 -0
- /package/{esm/i18n → i18n}/i18n.js +0 -0
- /package/{types/i18n → i18n}/index.d.ts +0 -0
- /package/{esm/i18n → i18n}/index.js +0 -0
- /package/{types/i18n → i18n}/string-utils.d.ts +0 -0
- /package/{esm/i18n → i18n}/string-utils.js +0 -0
- /package/{types/i18n → i18n}/translate.d.ts +0 -0
- /package/{esm/i18n → i18n}/translate.js +0 -0
- /package/{types/index.d.ts → index.d.ts} +0 -0
- /package/{esm/index.js → index.js} +0 -0
- /package/{types/polifils → polifils}/array-find-last.d.ts +0 -0
- /package/{esm/polifils → polifils}/array-find-last.js +0 -0
- /package/{types/schema → schema}/api-document.interface.d.ts +0 -0
- /package/{esm/schema → schema}/api-document.interface.js +0 -0
- /package/{types/schema → schema}/api.interface.d.ts +0 -0
- /package/{esm/schema → schema}/api.interface.js +0 -0
- /package/{types/schema → schema}/constants.d.ts +0 -0
- /package/{esm/schema → schema}/constants.js +0 -0
- /package/{types/schema → schema}/data-type/array-type.interface.d.ts +0 -0
- /package/{esm/schema → schema}/data-type/array-type.interface.js +0 -0
- /package/{types/schema → schema}/data-type/complex-type.interface.d.ts +0 -0
- /package/{esm/schema → schema}/data-type/complex-type.interface.js +0 -0
- /package/{types/schema → schema}/data-type/data-type.interface.d.ts +0 -0
- /package/{esm/schema → schema}/data-type/data-type.interface.js +0 -0
- /package/{types/schema → schema}/data-type/enum-type.interface.d.ts +0 -0
- /package/{esm/schema → schema}/data-type/enum-type.interface.js +0 -0
- /package/{types/schema → schema}/data-type/field.interface.d.ts +0 -0
- /package/{esm/schema → schema}/data-type/field.interface.js +0 -0
- /package/{types/schema → schema}/data-type/mapped-type.interface.d.ts +0 -0
- /package/{esm/schema → schema}/data-type/mapped-type.interface.js +0 -0
- /package/{types/schema → schema}/data-type/mixin-type.interface.d.ts +0 -0
- /package/{esm/schema → schema}/data-type/mixin-type.interface.js +0 -0
- /package/{types/schema → schema}/data-type/simple-type.interface.d.ts +0 -0
- /package/{esm/schema → schema}/data-type/simple-type.interface.js +0 -0
- /package/{types/schema → schema}/data-type/union-type.interface.d.ts +0 -0
- /package/{esm/schema → schema}/data-type/union-type.interface.js +0 -0
- /package/{types/schema → schema}/data-type-container.interface.d.ts +0 -0
- /package/{esm/schema → schema}/data-type-container.interface.js +0 -0
- /package/{types/schema → schema}/http/http-api.interface.d.ts +0 -0
- /package/{esm/schema → schema}/http/http-api.interface.js +0 -0
- /package/{types/schema → schema}/http/http-controller.interface.d.ts +0 -0
- /package/{esm/schema → schema}/http/http-controller.interface.js +0 -0
- /package/{types/schema → schema}/http/http-media-type.interface.d.ts +0 -0
- /package/{esm/schema → schema}/http/http-media-type.interface.js +0 -0
- /package/{types/schema → schema}/http/http-multipart-field.interface.d.ts +0 -0
- /package/{esm/schema → schema}/http/http-multipart-field.interface.js +0 -0
- /package/{types/schema → schema}/http/http-operation-response.interface.d.ts +0 -0
- /package/{esm/schema → schema}/http/http-operation-response.interface.js +0 -0
- /package/{types/schema → schema}/http/http-operation.interface.d.ts +0 -0
- /package/{esm/schema → schema}/http/http-operation.interface.js +0 -0
- /package/{types/schema → schema}/http/http-parameter.interface.d.ts +0 -0
- /package/{esm/schema → schema}/http/http-parameter.interface.js +0 -0
- /package/{types/schema → schema}/http/http-request-body.interface.d.ts +0 -0
- /package/{esm/schema → schema}/http/http-request-body.interface.js +0 -0
- /package/{types/schema → schema}/http/http-status-range.interface.d.ts +0 -0
- /package/{esm/schema → schema}/http/http-status-range.interface.js +0 -0
- /package/{types/schema → schema}/index.d.ts +0 -0
- /package/{esm/schema → schema}/index.js +0 -0
- /package/{types/schema → schema}/mq/mq-api.interface.d.ts +0 -0
- /package/{esm/schema → schema}/mq/mq-api.interface.js +0 -0
- /package/{types/schema → schema}/mq/mq-controller.interface.d.ts +0 -0
- /package/{esm/schema → schema}/mq/mq-controller.interface.js +0 -0
- /package/{types/schema → schema}/mq/mq-header.interface.d.ts +0 -0
- /package/{esm/schema → schema}/mq/mq-header.interface.js +0 -0
- /package/{types/schema → schema}/mq/mq-operation.interface.d.ts +0 -0
- /package/{esm/schema → schema}/mq/mq-operation.interface.js +0 -0
- /package/{types/schema → schema}/opra-schema.d.ts +0 -0
- /package/{esm/schema → schema}/opra-schema.js +0 -0
- /package/{types/schema → schema}/type-guards.d.ts +0 -0
- /package/{esm/schema → schema}/type-guards.js +0 -0
- /package/{types/schema → schema}/types.d.ts +0 -0
- /package/{esm/schema → schema}/types.js +0 -0
- /package/{types/schema → schema}/value.interface.d.ts +0 -0
- /package/{esm/schema → schema}/value.interface.js +0 -0
- /package/{esm/schema → schema}/ws/ws-api.interface.js +0 -0
- /package/{types/schema → schema}/ws/ws-controller.interface.d.ts +0 -0
- /package/{esm/schema → schema}/ws/ws-controller.interface.js +0 -0
- /package/{types/schema → schema}/ws/ws-operation.interface.d.ts +0 -0
- /package/{esm/schema → schema}/ws/ws-operation.interface.js +0 -0
- /package/{types/types.d.ts → types.d.ts} +0 -0
- /package/{esm/types.js → types.js} +0 -0
|
@@ -1,300 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// noinspection JSUnusedGlobalSymbols
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.HttpStatusCode = void 0;
|
|
5
|
-
/**
|
|
6
|
-
* https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#successful_responses
|
|
7
|
-
*/
|
|
8
|
-
var HttpStatusCode;
|
|
9
|
-
(function (HttpStatusCode) {
|
|
10
|
-
/* *** Information responses *** */
|
|
11
|
-
/**
|
|
12
|
-
* This interim response indicates that the client should continue the request or
|
|
13
|
-
* ignore the response if the request is already finished.
|
|
14
|
-
*/
|
|
15
|
-
HttpStatusCode[HttpStatusCode["CONTINUE"] = 100] = "CONTINUE";
|
|
16
|
-
/**
|
|
17
|
-
* This code is sent in response to an Upgrade request header from the client and
|
|
18
|
-
* indicates the protocol the server is switching to.
|
|
19
|
-
*/
|
|
20
|
-
HttpStatusCode[HttpStatusCode["SWITCHING_PROTOCOLS"] = 101] = "SWITCHING_PROTOCOLS";
|
|
21
|
-
/**
|
|
22
|
-
* This code indicates that the server has received and is processing the request, but no response is available yet.
|
|
23
|
-
*/
|
|
24
|
-
HttpStatusCode[HttpStatusCode["PROCESSING"] = 102] = "PROCESSING";
|
|
25
|
-
/**
|
|
26
|
-
* This status code is primarily intended to be used with the Link header, letting the user agent
|
|
27
|
-
* start preloading resources while the server prepares a response.
|
|
28
|
-
*/
|
|
29
|
-
HttpStatusCode[HttpStatusCode["EARLYHINTS"] = 103] = "EARLYHINTS";
|
|
30
|
-
/* *** Successful responses *** */
|
|
31
|
-
/**
|
|
32
|
-
* The request succeeded.
|
|
33
|
-
*/
|
|
34
|
-
HttpStatusCode[HttpStatusCode["OK"] = 200] = "OK";
|
|
35
|
-
/**
|
|
36
|
-
* The request succeeded, and a new resource was created as a result.
|
|
37
|
-
* This is typically the response sent after POST requests, or some PUT requests.
|
|
38
|
-
*/
|
|
39
|
-
HttpStatusCode[HttpStatusCode["CREATED"] = 201] = "CREATED";
|
|
40
|
-
/**
|
|
41
|
-
* The request has been received but not yet acted upon. It is noncommittal,
|
|
42
|
-
* since there is no way in HTTP to later send an asynchronous response indicating
|
|
43
|
-
* the outcome of the request. It is intended for cases where another process or
|
|
44
|
-
* server handles the request, or for batch processing.
|
|
45
|
-
*/
|
|
46
|
-
HttpStatusCode[HttpStatusCode["ACCEPTED"] = 202] = "ACCEPTED";
|
|
47
|
-
/**
|
|
48
|
-
* This response code means the returned metadata is not exactly the same as is available from
|
|
49
|
-
* the origin server, but is collected from a local or a third-party copy. This is mostly used
|
|
50
|
-
* for mirrors or backups of another resource. Except for that specific case, the 200 OK
|
|
51
|
-
* response is preferred to this status.
|
|
52
|
-
*/
|
|
53
|
-
HttpStatusCode[HttpStatusCode["NON_AUTHORITATIVE_INFORMATION"] = 203] = "NON_AUTHORITATIVE_INFORMATION";
|
|
54
|
-
/**
|
|
55
|
-
* There is no content to send for this request, but the headers may be useful.
|
|
56
|
-
* The user agent may update its cached headers for this resource with the new ones.
|
|
57
|
-
*/
|
|
58
|
-
HttpStatusCode[HttpStatusCode["NO_CONTENT"] = 204] = "NO_CONTENT";
|
|
59
|
-
/**
|
|
60
|
-
* Tells the user agent to reset the document which sent this request.
|
|
61
|
-
*/
|
|
62
|
-
HttpStatusCode[HttpStatusCode["RESET_CONTENT"] = 205] = "RESET_CONTENT";
|
|
63
|
-
/**
|
|
64
|
-
* This response code is used when the Range header is sent from the client to request only part of a resource.
|
|
65
|
-
*/
|
|
66
|
-
HttpStatusCode[HttpStatusCode["PARTIAL_CONTENT"] = 206] = "PARTIAL_CONTENT";
|
|
67
|
-
/* *** Redirection messages *** */
|
|
68
|
-
/**
|
|
69
|
-
* The request has more than one possible response. The user agent or user should choose one of them.
|
|
70
|
-
* (There is no standardized way of choosing one of the responses, but HTML links to the possibilities
|
|
71
|
-
* are recommended so the user can pick.)
|
|
72
|
-
*/
|
|
73
|
-
HttpStatusCode[HttpStatusCode["AMBIGUOUS"] = 300] = "AMBIGUOUS";
|
|
74
|
-
/**
|
|
75
|
-
* The URL of the requested resource has been changed permanently. The new URL is given in the response.
|
|
76
|
-
*/
|
|
77
|
-
HttpStatusCode[HttpStatusCode["MOVED_PERMANENTLY"] = 301] = "MOVED_PERMANENTLY";
|
|
78
|
-
/**
|
|
79
|
-
* This response code means that the URI of requested resource has been changed temporarily.
|
|
80
|
-
* Further changes in the URI might be made in the future. Therefore, this same URI should
|
|
81
|
-
* be used by the client in future requests.
|
|
82
|
-
*/
|
|
83
|
-
HttpStatusCode[HttpStatusCode["FOUND"] = 302] = "FOUND";
|
|
84
|
-
/**
|
|
85
|
-
* This is used for caching purposes. It tells the client that the response has not been modified,
|
|
86
|
-
* so the client can continue to use the same cached version of the response.
|
|
87
|
-
*/
|
|
88
|
-
HttpStatusCode[HttpStatusCode["SEE_OTHER"] = 303] = "SEE_OTHER";
|
|
89
|
-
/**
|
|
90
|
-
*
|
|
91
|
-
*/
|
|
92
|
-
HttpStatusCode[HttpStatusCode["NOT_MODIFIED"] = 304] = "NOT_MODIFIED";
|
|
93
|
-
/**
|
|
94
|
-
* The server sends this response to direct the client to get the requested resource at another
|
|
95
|
-
* URI with same method that was used in the prior request. This has the same semantics as
|
|
96
|
-
* the 302 Found HTTP response code, with the exception that the user agent must not change
|
|
97
|
-
* the HTTP method used: if a POST was used in the first request, a POST must be used in the second request.
|
|
98
|
-
*/
|
|
99
|
-
HttpStatusCode[HttpStatusCode["TEMPORARY_REDIRECT"] = 307] = "TEMPORARY_REDIRECT";
|
|
100
|
-
/**
|
|
101
|
-
* This means that the resource is now permanently located at another URI, specified by the Location:
|
|
102
|
-
* HTTP Response header. This has the same semantics as the 301 Moved Permanently HTTP response code,
|
|
103
|
-
* with the exception that the user agent must not change the HTTP method used: if a POST was used
|
|
104
|
-
* in the first request, a POST must be used in the second request.
|
|
105
|
-
*/
|
|
106
|
-
HttpStatusCode[HttpStatusCode["PERMANENT_REDIRECT"] = 308] = "PERMANENT_REDIRECT";
|
|
107
|
-
/* *** Client error responses *** */
|
|
108
|
-
/**
|
|
109
|
-
* The server cannot or will not process the request due to something that is perceived to be a client error
|
|
110
|
-
* (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
|
|
111
|
-
*/
|
|
112
|
-
HttpStatusCode[HttpStatusCode["BAD_REQUEST"] = 400] = "BAD_REQUEST";
|
|
113
|
-
/**
|
|
114
|
-
* Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated".
|
|
115
|
-
* That is, the client must authenticate itself to get the requested response.
|
|
116
|
-
*/
|
|
117
|
-
HttpStatusCode[HttpStatusCode["UNAUTHORIZED"] = 401] = "UNAUTHORIZED";
|
|
118
|
-
/**
|
|
119
|
-
* This response code is reserved for future use. The initial aim for creating this code was using
|
|
120
|
-
* it for digital payment systems, however this status code is used very rarely and no standard convention exists.
|
|
121
|
-
*/
|
|
122
|
-
HttpStatusCode[HttpStatusCode["PAYMENT_REQUIRED"] = 402] = "PAYMENT_REQUIRED";
|
|
123
|
-
/**
|
|
124
|
-
* The client does not have access rights to the content; that is, it is unauthorized,
|
|
125
|
-
* so the server is refusing to give the requested resource. Unlike 401 Unauthorized,
|
|
126
|
-
* the client's identity is known to the server.
|
|
127
|
-
*/
|
|
128
|
-
HttpStatusCode[HttpStatusCode["FORBIDDEN"] = 403] = "FORBIDDEN";
|
|
129
|
-
/**
|
|
130
|
-
* The server can not find the requested resource. In the browser, this means the URL is not recognized.
|
|
131
|
-
* In an API, this can also mean that the endpoint is valid but the resource itself does not exist.
|
|
132
|
-
* Servers may also send this response instead of 403 Forbidden to hide the existence of a resource
|
|
133
|
-
* from an unauthorized client. This response code is probably the most well known due to its
|
|
134
|
-
* frequent occurrence on the web.
|
|
135
|
-
*/
|
|
136
|
-
HttpStatusCode[HttpStatusCode["NOT_FOUND"] = 404] = "NOT_FOUND";
|
|
137
|
-
/**
|
|
138
|
-
* The request method is known by the server but is not supported by the target resource.
|
|
139
|
-
* For example, an API may not allow calling DELETE to remove a resource.
|
|
140
|
-
*/
|
|
141
|
-
HttpStatusCode[HttpStatusCode["METHOD_NOT_ALLOWED"] = 405] = "METHOD_NOT_ALLOWED";
|
|
142
|
-
/**
|
|
143
|
-
* This response is sent when the web server, after performing server-driven content negotiation,
|
|
144
|
-
* doesn't find any content that conforms to the criteria given by the user agent.
|
|
145
|
-
*/
|
|
146
|
-
HttpStatusCode[HttpStatusCode["NOT_ACCEPTABLE"] = 406] = "NOT_ACCEPTABLE";
|
|
147
|
-
/**
|
|
148
|
-
* This is similar to 401 Unauthorized but authentication is needed to be done by a proxy.
|
|
149
|
-
*/
|
|
150
|
-
HttpStatusCode[HttpStatusCode["PROXY_AUTHENTICATION_REQUIRED"] = 407] = "PROXY_AUTHENTICATION_REQUIRED";
|
|
151
|
-
/**
|
|
152
|
-
* This response is sent on an idle connection by some servers, even without any previous request by the client.
|
|
153
|
-
* It means that the server would like to shut down this unused connection.
|
|
154
|
-
* This response is used much more since some browsers,
|
|
155
|
-
* like Chrome, Firefox 27+, or IE9, use HTTP pre-connection mechanisms to speed up surfing.
|
|
156
|
-
* Also note that some servers merely shut down the connection without sending this message.
|
|
157
|
-
*/
|
|
158
|
-
HttpStatusCode[HttpStatusCode["REQUEST_TIMEOUT"] = 408] = "REQUEST_TIMEOUT";
|
|
159
|
-
/**
|
|
160
|
-
* This response is sent when a request conflicts with the current state of the server.
|
|
161
|
-
*/
|
|
162
|
-
HttpStatusCode[HttpStatusCode["CONFLICT"] = 409] = "CONFLICT";
|
|
163
|
-
/**
|
|
164
|
-
* This response is sent when the requested content has been permanently deleted from server,
|
|
165
|
-
* with no forwarding address. Clients are expected to remove their caches and links to the resource.
|
|
166
|
-
* The HTTP specification intends this status code to be used for "limited-time, promotional services".
|
|
167
|
-
* APIs should not feel compelled to indicate resources that have been deleted with this status code.
|
|
168
|
-
*/
|
|
169
|
-
HttpStatusCode[HttpStatusCode["GONE"] = 410] = "GONE";
|
|
170
|
-
/**
|
|
171
|
-
* Server rejected the request because the Content-Length header field is not defined and the server requires it.
|
|
172
|
-
*/
|
|
173
|
-
HttpStatusCode[HttpStatusCode["LENGTH_REQUIRED"] = 411] = "LENGTH_REQUIRED";
|
|
174
|
-
/**
|
|
175
|
-
* The client has indicated preconditions in its headers which the server does not meet.
|
|
176
|
-
*/
|
|
177
|
-
HttpStatusCode[HttpStatusCode["PRECONDITION_FAILED"] = 412] = "PRECONDITION_FAILED";
|
|
178
|
-
/**
|
|
179
|
-
* Request entity is larger than limits defined by server. The server might close the connection or
|
|
180
|
-
* return an Retry-After header field.
|
|
181
|
-
*/
|
|
182
|
-
HttpStatusCode[HttpStatusCode["PAYLOAD_TOO_LARGE"] = 413] = "PAYLOAD_TOO_LARGE";
|
|
183
|
-
/**
|
|
184
|
-
* The URI requested by the client is longer than the server is willing to interpret.
|
|
185
|
-
*/
|
|
186
|
-
HttpStatusCode[HttpStatusCode["URI_TOO_LONG"] = 414] = "URI_TOO_LONG";
|
|
187
|
-
/**
|
|
188
|
-
* The media format of the requested data is not supported by the server, so the server is rejecting the request.
|
|
189
|
-
*/
|
|
190
|
-
HttpStatusCode[HttpStatusCode["UNSUPPORTED_MEDIA_TYPE"] = 415] = "UNSUPPORTED_MEDIA_TYPE";
|
|
191
|
-
/**
|
|
192
|
-
* The range specified by the Range header field in the request cannot be fulfilled.
|
|
193
|
-
* It's possible that the range is outside the size of the target URI's data.
|
|
194
|
-
*/
|
|
195
|
-
HttpStatusCode[HttpStatusCode["REQUESTED_RANGE_NOT_SATISFIABLE"] = 416] = "REQUESTED_RANGE_NOT_SATISFIABLE";
|
|
196
|
-
/**
|
|
197
|
-
* This response code means the expectation indicated by the Expect request header field cannot be met by the server.
|
|
198
|
-
*/
|
|
199
|
-
HttpStatusCode[HttpStatusCode["EXPECTATION_FAILED"] = 417] = "EXPECTATION_FAILED";
|
|
200
|
-
/**
|
|
201
|
-
* The server refuses the attempt to brew coffee with a teapot.
|
|
202
|
-
*/
|
|
203
|
-
HttpStatusCode[HttpStatusCode["I_AM_A_TEAPOT"] = 418] = "I_AM_A_TEAPOT";
|
|
204
|
-
/**
|
|
205
|
-
* The request was directed at a server that is not able to produce a response.
|
|
206
|
-
* This can be sent by a server that is not configured to produce responses for
|
|
207
|
-
* the combination of scheme and authority that are included in the request URI.
|
|
208
|
-
*/
|
|
209
|
-
HttpStatusCode[HttpStatusCode["MISDIRECTED_REQUEST"] = 421] = "MISDIRECTED_REQUEST";
|
|
210
|
-
/**
|
|
211
|
-
* The request was well-formed but was unable to be followed due to semantic errors.
|
|
212
|
-
*/
|
|
213
|
-
HttpStatusCode[HttpStatusCode["UNPROCESSABLE_ENTITY"] = 422] = "UNPROCESSABLE_ENTITY";
|
|
214
|
-
/**
|
|
215
|
-
* The resource that is being accessed is locked.
|
|
216
|
-
*/
|
|
217
|
-
HttpStatusCode[HttpStatusCode["LOCKED"] = 423] = "LOCKED";
|
|
218
|
-
/**
|
|
219
|
-
* The request failed due to failure of a previous request.
|
|
220
|
-
*/
|
|
221
|
-
HttpStatusCode[HttpStatusCode["FAILED_DEPENDENCY"] = 424] = "FAILED_DEPENDENCY";
|
|
222
|
-
/**
|
|
223
|
-
* Indicates that the server is unwilling to risk processing a request that might be replayed.
|
|
224
|
-
*/
|
|
225
|
-
HttpStatusCode[HttpStatusCode["TOO_EARLY"] = 425] = "TOO_EARLY";
|
|
226
|
-
/**
|
|
227
|
-
* The server refuses to perform the request using the current protocol but might be willing
|
|
228
|
-
* to do so after the client upgrades to a different protocol. The server sends an Upgrade
|
|
229
|
-
* header in a 426 response to indicate the required protocol(s).
|
|
230
|
-
*/
|
|
231
|
-
HttpStatusCode[HttpStatusCode["UPGRADE_REQUIRED"] = 426] = "UPGRADE_REQUIRED";
|
|
232
|
-
/**
|
|
233
|
-
* The origin server requires the request to be conditional. This response is intended to prevent
|
|
234
|
-
* the 'lost update' problem, where a client GETs a resource's state, modifies it and PUTs
|
|
235
|
-
* it back to the server, when meanwhile a third party has modified the state on the server,
|
|
236
|
-
* leading to a conflict.
|
|
237
|
-
*/
|
|
238
|
-
HttpStatusCode[HttpStatusCode["PRECONDITION_REQUIRED"] = 428] = "PRECONDITION_REQUIRED";
|
|
239
|
-
/**
|
|
240
|
-
* The user has sent too many requests in a given amount of time ("rate limiting").
|
|
241
|
-
*/
|
|
242
|
-
HttpStatusCode[HttpStatusCode["TOO_MANY_REQUESTS"] = 429] = "TOO_MANY_REQUESTS";
|
|
243
|
-
/* *** Server error responses *** */
|
|
244
|
-
/**
|
|
245
|
-
* The server has encountered a situation it does not know how to handle.
|
|
246
|
-
*/
|
|
247
|
-
HttpStatusCode[HttpStatusCode["INTERNAL_SERVER_ERROR"] = 500] = "INTERNAL_SERVER_ERROR";
|
|
248
|
-
/**
|
|
249
|
-
* The request method is not supported by the server and cannot be handled.
|
|
250
|
-
* The only methods that servers are required to support (and therefore that must not return this code)
|
|
251
|
-
* are GET and HEAD.
|
|
252
|
-
*/
|
|
253
|
-
HttpStatusCode[HttpStatusCode["NOT_IMPLEMENTED"] = 501] = "NOT_IMPLEMENTED";
|
|
254
|
-
/**
|
|
255
|
-
* This error response means that the server, while working as a gateway to get
|
|
256
|
-
* a response needed to handle the request, got an invalid response.
|
|
257
|
-
*/
|
|
258
|
-
HttpStatusCode[HttpStatusCode["BAD_GATEWAY"] = 502] = "BAD_GATEWAY";
|
|
259
|
-
/**
|
|
260
|
-
* The server is not ready to handle the request. Common causes are a server that is down for maintenance
|
|
261
|
-
* or that is overloaded. Note that together with this response, a user-friendly page explaining
|
|
262
|
-
* the problem should be sent. This response should be used for temporary conditions and the
|
|
263
|
-
* Retry-After HTTP header should, if possible, contain the estimated time before the
|
|
264
|
-
* recovery of the service. The webmaster must also take care about the caching-related
|
|
265
|
-
* headers that are sent along with this response, as these temporary condition responses
|
|
266
|
-
* should usually not be cached.
|
|
267
|
-
*/
|
|
268
|
-
HttpStatusCode[HttpStatusCode["SERVICE_UNAVAILABLE"] = 503] = "SERVICE_UNAVAILABLE";
|
|
269
|
-
/**
|
|
270
|
-
* This error response is given when the server is acting as a gateway and cannot get a response in time.
|
|
271
|
-
*/
|
|
272
|
-
HttpStatusCode[HttpStatusCode["GATEWAY_TIMEOUT"] = 504] = "GATEWAY_TIMEOUT";
|
|
273
|
-
/**
|
|
274
|
-
* The HTTP version used in the request is not supported by the server.
|
|
275
|
-
*/
|
|
276
|
-
HttpStatusCode[HttpStatusCode["HTTP_VERSION_NOT_SUPPORTED"] = 505] = "HTTP_VERSION_NOT_SUPPORTED";
|
|
277
|
-
/**
|
|
278
|
-
* The server has an internal configuration error: the chosen variant resource is configured
|
|
279
|
-
* to engage in transparent content negotiation itself, and is therefore not a proper end
|
|
280
|
-
* point in the negotiation process.
|
|
281
|
-
*/
|
|
282
|
-
HttpStatusCode[HttpStatusCode["VARIANT_ALSO_NEGOTIATES"] = 506] = "VARIANT_ALSO_NEGOTIATES";
|
|
283
|
-
/**
|
|
284
|
-
* The method could not be performed on the resource because the server is unable to store
|
|
285
|
-
* the representation needed to successfully complete the request.
|
|
286
|
-
*/
|
|
287
|
-
HttpStatusCode[HttpStatusCode["INSUFFICIENT_STORAGE"] = 507] = "INSUFFICIENT_STORAGE";
|
|
288
|
-
/**
|
|
289
|
-
* The server detected an infinite loop while processing the request.
|
|
290
|
-
*/
|
|
291
|
-
HttpStatusCode[HttpStatusCode["LOOP_DETECTED"] = 508] = "LOOP_DETECTED";
|
|
292
|
-
/**
|
|
293
|
-
* Further extensions to the request are required for the server to fulfill it.
|
|
294
|
-
*/
|
|
295
|
-
HttpStatusCode[HttpStatusCode["NOT_EXTENDED"] = 510] = "NOT_EXTENDED";
|
|
296
|
-
/**
|
|
297
|
-
* Indicates that the client needs to authenticate to gain network access.
|
|
298
|
-
*/
|
|
299
|
-
HttpStatusCode[HttpStatusCode["NETWORK_AUTHENTICATION_REQUIRED"] = 511] = "NETWORK_AUTHENTICATION_REQUIRED";
|
|
300
|
-
})(HttpStatusCode || (exports.HttpStatusCode = HttpStatusCode = {}));
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HttpStatusMessages = void 0;
|
|
4
|
-
exports.HttpStatusMessages = {
|
|
5
|
-
'100': 'Continue',
|
|
6
|
-
'101': 'Switching Protocols',
|
|
7
|
-
'102': 'Processing',
|
|
8
|
-
'103': 'Early Hints',
|
|
9
|
-
'200': 'OK',
|
|
10
|
-
'201': 'Created',
|
|
11
|
-
'202': 'Accepted',
|
|
12
|
-
'203': 'Non-Authoritative Information',
|
|
13
|
-
'204': 'No Content',
|
|
14
|
-
'205': 'Reset Content',
|
|
15
|
-
'206': 'Partial Content',
|
|
16
|
-
'207': 'Multi-Status',
|
|
17
|
-
'208': 'Already Reported',
|
|
18
|
-
'226': 'IM Used',
|
|
19
|
-
'300': 'Multiple Choices',
|
|
20
|
-
'301': 'Moved Permanently',
|
|
21
|
-
'302': 'Found',
|
|
22
|
-
'303': 'See Other',
|
|
23
|
-
'304': 'Not Modified',
|
|
24
|
-
'305': 'Use Proxy',
|
|
25
|
-
'307': 'Temporary Redirect',
|
|
26
|
-
'308': 'Permanent Redirect',
|
|
27
|
-
'400': 'Bad Request',
|
|
28
|
-
'401': 'Unauthorized',
|
|
29
|
-
'402': 'Payment Required',
|
|
30
|
-
'403': 'Forbidden',
|
|
31
|
-
'404': 'Not Found',
|
|
32
|
-
'405': 'Method Not Allowed',
|
|
33
|
-
'406': 'Not Acceptable',
|
|
34
|
-
'407': 'Proxy Authentication Required',
|
|
35
|
-
'408': 'Request Timeout',
|
|
36
|
-
'409': 'Conflict',
|
|
37
|
-
'410': 'Gone',
|
|
38
|
-
'411': 'Length Required',
|
|
39
|
-
'412': 'Precondition Failed',
|
|
40
|
-
'413': 'Payload Too Large',
|
|
41
|
-
'414': 'URI Too Long',
|
|
42
|
-
'415': 'Unsupported Media Type',
|
|
43
|
-
'416': 'Range Not Satisfiable',
|
|
44
|
-
'417': 'Expectation Failed',
|
|
45
|
-
'418': "I'm a Teapot",
|
|
46
|
-
'421': 'Misdirected Request',
|
|
47
|
-
'422': 'Unprocessable Entity',
|
|
48
|
-
'423': 'Locked',
|
|
49
|
-
'424': 'Failed Dependency',
|
|
50
|
-
'425': 'Too Early',
|
|
51
|
-
'426': 'Upgrade Required',
|
|
52
|
-
'428': 'Precondition Required',
|
|
53
|
-
'429': 'Too Many Requests',
|
|
54
|
-
'431': 'Request Header Fields Too Large',
|
|
55
|
-
'451': 'Unavailable For Legal Reasons',
|
|
56
|
-
'500': 'Internal Server Error',
|
|
57
|
-
'501': 'Not Implemented',
|
|
58
|
-
'502': 'Bad Gateway',
|
|
59
|
-
'503': 'Service Unavailable',
|
|
60
|
-
'504': 'Gateway Timeout',
|
|
61
|
-
'505': 'HTTP Version Not Supported',
|
|
62
|
-
'506': 'Variant Also Negotiates',
|
|
63
|
-
'507': 'Insufficient Storage',
|
|
64
|
-
'508': 'Loop Detected',
|
|
65
|
-
'509': 'Bandwidth Limit Exceeded',
|
|
66
|
-
'510': 'Not Extended',
|
|
67
|
-
'511': 'Network Authentication Required',
|
|
68
|
-
};
|
package/cjs/enums/index.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./http-headers-codes.enum.js"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./http-status-codes.enum.js"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./http-status-messages.js"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./mime-types.enum.js"), exports);
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// noinspection JSUnusedGlobalSymbols
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.MimeTypes = void 0;
|
|
5
|
-
/**
|
|
6
|
-
* https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#successful_responses
|
|
7
|
-
*/
|
|
8
|
-
var MimeTypes;
|
|
9
|
-
(function (MimeTypes) {
|
|
10
|
-
MimeTypes["json"] = "application/json";
|
|
11
|
-
MimeTypes["opra_response_json"] = "application/opra.response+json";
|
|
12
|
-
MimeTypes["xml"] = "application/XML";
|
|
13
|
-
MimeTypes["text"] = "text/plain";
|
|
14
|
-
MimeTypes["html"] = "text/html";
|
|
15
|
-
MimeTypes["markdown"] = "text/markdown";
|
|
16
|
-
MimeTypes["binary"] = "binary/octet-stream";
|
|
17
|
-
})(MimeTypes || (exports.MimeTypes = MimeTypes = {}));
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BadRequestError = void 0;
|
|
4
|
-
const opra_http_error_js_1 = require("../opra-http-error.js");
|
|
5
|
-
/**
|
|
6
|
-
* 400 Bad Request
|
|
7
|
-
* The server cannot or will not process the request due to something that is perceived to be a client error
|
|
8
|
-
* (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
|
|
9
|
-
*/
|
|
10
|
-
class BadRequestError extends opra_http_error_js_1.OpraHttpError {
|
|
11
|
-
constructor() {
|
|
12
|
-
super(...arguments);
|
|
13
|
-
this.status = 400;
|
|
14
|
-
}
|
|
15
|
-
init(issue) {
|
|
16
|
-
super.init({
|
|
17
|
-
message: 'Bad request',
|
|
18
|
-
code: 'BAD_REQUEST',
|
|
19
|
-
...issue,
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.BadRequestError = BadRequestError;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConflictError = void 0;
|
|
4
|
-
const opra_http_error_js_1 = require("../opra-http-error.js");
|
|
5
|
-
/**
|
|
6
|
-
* 409 Conflict
|
|
7
|
-
* This response is sent when a request conflicts with the current state of the server.
|
|
8
|
-
*/
|
|
9
|
-
class ConflictError extends opra_http_error_js_1.OpraHttpError {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(...arguments);
|
|
12
|
-
this.status = 409;
|
|
13
|
-
}
|
|
14
|
-
init(issue) {
|
|
15
|
-
super.init({
|
|
16
|
-
message: 'Conflict',
|
|
17
|
-
code: 'CONFLICT',
|
|
18
|
-
...issue,
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.ConflictError = ConflictError;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FailedDependencyError = void 0;
|
|
4
|
-
const opra_http_error_js_1 = require("../opra-http-error.js");
|
|
5
|
-
/**
|
|
6
|
-
* 424 Failed Dependency
|
|
7
|
-
* The request failed due to failure of a previous request.
|
|
8
|
-
*/
|
|
9
|
-
class FailedDependencyError extends opra_http_error_js_1.OpraHttpError {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(...arguments);
|
|
12
|
-
this.status = 424;
|
|
13
|
-
}
|
|
14
|
-
init(issue) {
|
|
15
|
-
super.init({
|
|
16
|
-
message: 'The request failed due to failure of a previous request',
|
|
17
|
-
code: 'FAILED_DEPENDENCY',
|
|
18
|
-
...issue,
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.FailedDependencyError = FailedDependencyError;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ForbiddenError = void 0;
|
|
4
|
-
const index_js_1 = require("../../enums/index.js");
|
|
5
|
-
const opra_http_error_js_1 = require("../opra-http-error.js");
|
|
6
|
-
/**
|
|
7
|
-
* 403 Forbidden
|
|
8
|
-
* The client does not have access rights to the content; that is, it is unauthorized,
|
|
9
|
-
* so the server is refusing to give the requested resource. Unlike 401 Unauthorized,
|
|
10
|
-
* the client's identity is known to the server.
|
|
11
|
-
*/
|
|
12
|
-
class ForbiddenError extends opra_http_error_js_1.OpraHttpError {
|
|
13
|
-
constructor() {
|
|
14
|
-
super(...arguments);
|
|
15
|
-
this.status = index_js_1.HttpStatusCode.FORBIDDEN;
|
|
16
|
-
}
|
|
17
|
-
init(issue) {
|
|
18
|
-
super.init({
|
|
19
|
-
message: 'You are not authorized to perform this action',
|
|
20
|
-
code: 'FORBIDDEN',
|
|
21
|
-
...issue,
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.ForbiddenError = ForbiddenError;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InternalServerError = void 0;
|
|
4
|
-
const opra_http_error_js_1 = require("../opra-http-error.js");
|
|
5
|
-
/**
|
|
6
|
-
* 500 Internal Server Error
|
|
7
|
-
* The server has encountered a situation it does not know how to handle.
|
|
8
|
-
*/
|
|
9
|
-
class InternalServerError extends opra_http_error_js_1.OpraHttpError {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(...arguments);
|
|
12
|
-
this.status = 500;
|
|
13
|
-
}
|
|
14
|
-
init(issue) {
|
|
15
|
-
super.init({
|
|
16
|
-
message: 'Internal server error',
|
|
17
|
-
code: 'INTERNAL_SERVER_ERROR',
|
|
18
|
-
severity: 'fatal',
|
|
19
|
-
...issue,
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.InternalServerError = InternalServerError;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MethodNotAllowedError = void 0;
|
|
4
|
-
const opra_http_error_js_1 = require("../opra-http-error.js");
|
|
5
|
-
/**
|
|
6
|
-
* 405 Method Not Allowed
|
|
7
|
-
* The request method is known by the server but is not supported by the target resource.
|
|
8
|
-
* For example, an API may not allow calling DELETE to remove a resource.
|
|
9
|
-
*/
|
|
10
|
-
class MethodNotAllowedError extends opra_http_error_js_1.OpraHttpError {
|
|
11
|
-
constructor() {
|
|
12
|
-
super(...arguments);
|
|
13
|
-
this.status = 405;
|
|
14
|
-
}
|
|
15
|
-
init(issue) {
|
|
16
|
-
super.init({
|
|
17
|
-
message: 'Method not allowed',
|
|
18
|
-
code: 'METHOD_NOT_ALLOWED',
|
|
19
|
-
...issue,
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.MethodNotAllowedError = MethodNotAllowedError;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NotAcceptableError = void 0;
|
|
4
|
-
const opra_http_error_js_1 = require("../opra-http-error.js");
|
|
5
|
-
/**
|
|
6
|
-
* 406 Not Acceptable
|
|
7
|
-
* This response is sent when the web server, after performing server-driven content negotiation,
|
|
8
|
-
* doesn't find any content that conforms to the criteria given by the user agent.
|
|
9
|
-
*/
|
|
10
|
-
class NotAcceptableError extends opra_http_error_js_1.OpraHttpError {
|
|
11
|
-
constructor() {
|
|
12
|
-
super(...arguments);
|
|
13
|
-
this.status = 406;
|
|
14
|
-
}
|
|
15
|
-
init(issue) {
|
|
16
|
-
super.init({
|
|
17
|
-
message: 'Not Acceptable',
|
|
18
|
-
code: 'NOT_ACCEPTABLE',
|
|
19
|
-
...issue,
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.NotAcceptableError = NotAcceptableError;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NotFoundError = void 0;
|
|
4
|
-
const opra_http_error_js_1 = require("../opra-http-error.js");
|
|
5
|
-
/**
|
|
6
|
-
* 404 Not Found
|
|
7
|
-
* The server can not find the requested resource. In the browser, this means the URL is not recognized.
|
|
8
|
-
* In an API, this can also mean that the endpoint is valid but the resource itself does not exist.
|
|
9
|
-
* Servers may also send this response instead of 403 Forbidden to hide the existence of a resource
|
|
10
|
-
* from an unauthorized client. This response code is probably the most well known due to its
|
|
11
|
-
* frequent occurrence on the web.
|
|
12
|
-
*/
|
|
13
|
-
class NotFoundError extends opra_http_error_js_1.OpraHttpError {
|
|
14
|
-
constructor() {
|
|
15
|
-
super(...arguments);
|
|
16
|
-
this.status = 404;
|
|
17
|
-
}
|
|
18
|
-
init(issue) {
|
|
19
|
-
super.init({
|
|
20
|
-
message: 'Not found',
|
|
21
|
-
code: 'NOT_FOUND',
|
|
22
|
-
...issue,
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.NotFoundError = NotFoundError;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PermissionError = void 0;
|
|
4
|
-
const forbidden_error_js_1 = require("./forbidden.error.js");
|
|
5
|
-
/**
|
|
6
|
-
* 403 Forbidden
|
|
7
|
-
* The client does not have access rights to the content; that is, it is unauthorized,
|
|
8
|
-
* so the server is refusing to give the requested resource. Unlike 401 Unauthorized,
|
|
9
|
-
* the client's identity is known to the server.
|
|
10
|
-
*/
|
|
11
|
-
class PermissionError extends forbidden_error_js_1.ForbiddenError {
|
|
12
|
-
init(issue) {
|
|
13
|
-
super.init({
|
|
14
|
-
message: 'You dont have permission for this operation',
|
|
15
|
-
code: 'PERMISSION_ERROR',
|
|
16
|
-
...issue,
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
exports.PermissionError = PermissionError;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ResourceConflictError = void 0;
|
|
4
|
-
const opra_http_error_js_1 = require("../opra-http-error.js");
|
|
5
|
-
class ResourceConflictError extends opra_http_error_js_1.OpraHttpError {
|
|
6
|
-
constructor(resource, fields, cause) {
|
|
7
|
-
super({
|
|
8
|
-
message: `There is already an other "${resource}" resource with same values for field(s) [${fields}]`,
|
|
9
|
-
severity: 'error',
|
|
10
|
-
code: 'RESOURCE_CONFLICT',
|
|
11
|
-
details: {
|
|
12
|
-
resource,
|
|
13
|
-
location: fields,
|
|
14
|
-
},
|
|
15
|
-
}, cause);
|
|
16
|
-
this.status = 409;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.ResourceConflictError = ResourceConflictError;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ResourceNotAvailableError = void 0;
|
|
4
|
-
const index_js_1 = require("../../enums/index.js");
|
|
5
|
-
const opra_http_error_js_1 = require("../opra-http-error.js");
|
|
6
|
-
/**
|
|
7
|
-
* The server cannot find the requested resource.
|
|
8
|
-
* This can also mean that the endpoint is valid but the resource itself does not exist.
|
|
9
|
-
*/
|
|
10
|
-
class ResourceNotAvailableError extends opra_http_error_js_1.OpraHttpError {
|
|
11
|
-
constructor(resource, keyValue, cause) {
|
|
12
|
-
super({
|
|
13
|
-
message: `Resource "${resource}${keyValue ? '/' + keyValue : ''}" is not available`,
|
|
14
|
-
severity: 'error',
|
|
15
|
-
code: 'RESOURCE_NOT_AVAILABLE',
|
|
16
|
-
details: {
|
|
17
|
-
resource,
|
|
18
|
-
key: keyValue,
|
|
19
|
-
},
|
|
20
|
-
}, cause, index_js_1.HttpStatusCode.UNPROCESSABLE_ENTITY);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.ResourceNotAvailableError = ResourceNotAvailableError;
|