@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
|
@@ -4,6 +4,10 @@ import { DATATYPE_METADATA, kDataTypeMap, kTypeNSMap } from '../constants.js';
|
|
|
4
4
|
* @class DocumentNode
|
|
5
5
|
*/
|
|
6
6
|
export class DocumentNode {
|
|
7
|
+
[kDataTypeMap];
|
|
8
|
+
_document;
|
|
9
|
+
parent;
|
|
10
|
+
element;
|
|
7
11
|
constructor(element, parent) {
|
|
8
12
|
this.element = element;
|
|
9
13
|
this.parent = parent;
|
|
@@ -17,6 +17,10 @@ export const Value = function (owner, initArgs) {
|
|
|
17
17
|
* @class Value
|
|
18
18
|
*/
|
|
19
19
|
class ValueClass extends DocumentElement {
|
|
20
|
+
type;
|
|
21
|
+
description;
|
|
22
|
+
examples;
|
|
23
|
+
isArray;
|
|
20
24
|
toJSON(options) {
|
|
21
25
|
const typeName = this.type
|
|
22
26
|
? this.node.getDataTypeNameWithNs(this.type)
|
|
@@ -54,6 +54,7 @@ export const ApiField = function (...args) {
|
|
|
54
54
|
* This class extends DocumentElement, inheriting base document structure capabilities.
|
|
55
55
|
*/
|
|
56
56
|
class ApiFieldClass extends DocumentElement {
|
|
57
|
+
origin;
|
|
57
58
|
inScope(scope) {
|
|
58
59
|
return testScopeMatch(scope, this.scopePattern);
|
|
59
60
|
}
|
|
@@ -46,7 +46,7 @@ export interface ArrayTypeStatic {
|
|
|
46
46
|
/**
|
|
47
47
|
* Create a new mixin type from the given data type
|
|
48
48
|
*/
|
|
49
|
-
(type: string | Type, options?: ArrayType.Options): Type;
|
|
49
|
+
(type: string | Type | EnumType.EnumObject, options?: ArrayType.Options): Type;
|
|
50
50
|
prototype: ArrayType;
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
@@ -3,6 +3,7 @@ import { isBase64, validator, vg } from 'valgen';
|
|
|
3
3
|
import { DECODER, ENCODER } from '../../constants.js';
|
|
4
4
|
import { SimpleType } from '../simple-type.js';
|
|
5
5
|
let Base64Type = class Base64Type {
|
|
6
|
+
designType;
|
|
6
7
|
constructor(attributes) {
|
|
7
8
|
if (attributes)
|
|
8
9
|
Object.assign(this, attributes);
|
|
@@ -11,6 +11,7 @@ const _isDate = vg.isDate({
|
|
|
11
11
|
coerce: true,
|
|
12
12
|
});
|
|
13
13
|
let DateTimeType = class DateTimeType {
|
|
14
|
+
designType;
|
|
14
15
|
constructor(attributes) {
|
|
15
16
|
if (attributes)
|
|
16
17
|
Object.assign(this, attributes);
|
|
@@ -43,6 +44,8 @@ let DateTimeType = class DateTimeType {
|
|
|
43
44
|
}
|
|
44
45
|
return x.length > 0 ? vg.pipe(x, { returnIndex: 0 }) : fn;
|
|
45
46
|
}
|
|
47
|
+
minValue;
|
|
48
|
+
maxValue;
|
|
46
49
|
};
|
|
47
50
|
__decorate([
|
|
48
51
|
SimpleType.Attribute({
|
|
@@ -12,6 +12,7 @@ const _isDate = vg.isDate({
|
|
|
12
12
|
coerce: true,
|
|
13
13
|
});
|
|
14
14
|
let DateType = class DateType {
|
|
15
|
+
designType;
|
|
15
16
|
constructor(attributes) {
|
|
16
17
|
if (attributes)
|
|
17
18
|
Object.assign(this, attributes);
|
|
@@ -44,6 +45,8 @@ let DateType = class DateType {
|
|
|
44
45
|
}
|
|
45
46
|
return x.length > 0 ? vg.pipe(x, { returnIndex: 0 }) : fn;
|
|
46
47
|
}
|
|
48
|
+
minValue;
|
|
49
|
+
maxValue;
|
|
47
50
|
};
|
|
48
51
|
__decorate([
|
|
49
52
|
SimpleType.Attribute({
|
|
@@ -7,6 +7,15 @@ let EmailType = class EmailType {
|
|
|
7
7
|
if (attributes)
|
|
8
8
|
Object.assign(this, attributes);
|
|
9
9
|
}
|
|
10
|
+
allowDisplayName;
|
|
11
|
+
requireDisplayName;
|
|
12
|
+
utf8LocalPart;
|
|
13
|
+
ignoreMaxLength;
|
|
14
|
+
allowIpDomain;
|
|
15
|
+
domainSpecificValidation;
|
|
16
|
+
hostBlacklist;
|
|
17
|
+
hostWhitelist;
|
|
18
|
+
blacklistedChars;
|
|
10
19
|
[DECODER](properties) {
|
|
11
20
|
return vg.isEmail({ ...properties, coerce: true });
|
|
12
21
|
}
|
|
@@ -8,6 +8,8 @@ let FieldPathType = class FieldPathType {
|
|
|
8
8
|
if (attributes)
|
|
9
9
|
Object.assign(this, attributes);
|
|
10
10
|
}
|
|
11
|
+
dataType;
|
|
12
|
+
allowSigns;
|
|
11
13
|
[DECODER](properties, { element, scope, }) {
|
|
12
14
|
const dataType = properties.dataType
|
|
13
15
|
? element.node.getComplexType(properties.dataType)
|
|
@@ -78,6 +78,10 @@ export const MappedType = function (...args) {
|
|
|
78
78
|
* @class MappedType
|
|
79
79
|
*/
|
|
80
80
|
class MappedTypeClass extends ComplexTypeBase {
|
|
81
|
+
omit;
|
|
82
|
+
pick;
|
|
83
|
+
partial;
|
|
84
|
+
required;
|
|
81
85
|
extendsFrom(baseType) {
|
|
82
86
|
if (!(baseType instanceof DataType))
|
|
83
87
|
baseType = this.node.getDataType(baseType);
|
|
@@ -49,6 +49,9 @@ export const SimpleType = function (...args) {
|
|
|
49
49
|
* @class SimpleType
|
|
50
50
|
*/
|
|
51
51
|
class SimpleTypeClass extends DataType {
|
|
52
|
+
_generateDecoder;
|
|
53
|
+
_generateEncoder;
|
|
54
|
+
properties;
|
|
52
55
|
extend(properties) {
|
|
53
56
|
Object.setPrototypeOf(properties, this);
|
|
54
57
|
return properties;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WS_PARAM_METADATA } from '../constants.js';
|
|
2
|
-
export function WsParam(type) {
|
|
2
|
+
export function WsParam(type, options) {
|
|
3
3
|
return (target, propertyKey, parameterIndex) => {
|
|
4
4
|
if (typeof propertyKey !== 'string')
|
|
5
5
|
throw new TypeError(`Un-named properties can not be decorated`);
|
|
@@ -14,6 +14,6 @@ export function WsParam(type) {
|
|
|
14
14
|
paramMetadata = [];
|
|
15
15
|
Reflect.defineMetadata(WS_PARAM_METADATA, paramMetadata, target, propertyKey);
|
|
16
16
|
}
|
|
17
|
-
paramMetadata
|
|
17
|
+
paramMetadata.push({ ...options, type, parameterIndex });
|
|
18
18
|
};
|
|
19
19
|
}
|
|
@@ -15,9 +15,7 @@ const OPRA_SPEC_URL = 'https://oprajs.com/spec/v' + OpraSchema.SpecVersion;
|
|
|
15
15
|
* @class ApiDocumentFactory
|
|
16
16
|
*/
|
|
17
17
|
export class ApiDocumentFactory {
|
|
18
|
-
|
|
19
|
-
this._allDocuments = {};
|
|
20
|
-
}
|
|
18
|
+
_allDocuments = {};
|
|
21
19
|
/**
|
|
22
20
|
* Creates ApiDocument instance from given schema object
|
|
23
21
|
*/
|
|
@@ -101,6 +101,7 @@ export class WSApiFactory {
|
|
|
101
101
|
type: undefined,
|
|
102
102
|
keyType: undefined,
|
|
103
103
|
arguments: undefined,
|
|
104
|
+
response: undefined,
|
|
104
105
|
});
|
|
105
106
|
await this._initWSOperation(context, operation, operationMeta);
|
|
106
107
|
controller.operations.set(operationName, operation);
|
|
@@ -126,9 +127,19 @@ export class WSApiFactory {
|
|
|
126
127
|
if (metadata.arguments?.length) {
|
|
127
128
|
await context.enterAsync('.arguments', async () => {
|
|
128
129
|
operation.arguments = [];
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
let x;
|
|
131
|
+
for (x of metadata.arguments) {
|
|
132
|
+
const xx = {};
|
|
133
|
+
if (typeof x === 'object' && x.type && x.parameterIndex !== null) {
|
|
134
|
+
Object.assign(xx, x);
|
|
135
|
+
}
|
|
136
|
+
else
|
|
137
|
+
xx.type = x;
|
|
138
|
+
const t = await DataTypeFactory.resolveDataType(context, operation, xx.type);
|
|
139
|
+
operation.arguments?.push({
|
|
140
|
+
type: t,
|
|
141
|
+
parameterIndex: xx.parameterIndex,
|
|
142
|
+
});
|
|
132
143
|
}
|
|
133
144
|
});
|
|
134
145
|
}
|
|
@@ -5,12 +5,13 @@ import { HttpController } from './http-controller.js';
|
|
|
5
5
|
* @class HttpApi
|
|
6
6
|
*/
|
|
7
7
|
export class HttpApi extends ApiBase {
|
|
8
|
+
// noinspection JSUnusedGlobalSymbols
|
|
9
|
+
_controllerReverseMap = new WeakMap();
|
|
10
|
+
transport = 'http';
|
|
11
|
+
controllers = new ResponsiveMap();
|
|
12
|
+
url;
|
|
8
13
|
constructor(init) {
|
|
9
14
|
super(init);
|
|
10
|
-
// noinspection JSUnusedGlobalSymbols
|
|
11
|
-
this._controllerReverseMap = new WeakMap();
|
|
12
|
-
this.transport = 'http';
|
|
13
|
-
this.controllers = new ResponsiveMap();
|
|
14
15
|
this.url = init.url;
|
|
15
16
|
}
|
|
16
17
|
findController(arg0) {
|
|
@@ -6,6 +6,9 @@ import { HttpMediaType } from './http-media-type.js';
|
|
|
6
6
|
* @class HttpMultipartField
|
|
7
7
|
*/
|
|
8
8
|
export class HttpMultipartField extends HttpMediaType {
|
|
9
|
+
fieldName;
|
|
10
|
+
fieldType;
|
|
11
|
+
required;
|
|
9
12
|
constructor(owner, initArgs) {
|
|
10
13
|
super(owner, initArgs);
|
|
11
14
|
this.fieldName =
|
|
@@ -5,6 +5,9 @@ import { HttpStatusRange } from './http-status-range.js';
|
|
|
5
5
|
* @class HttpOperationResponse
|
|
6
6
|
*/
|
|
7
7
|
export class HttpOperationResponse extends HttpMediaType {
|
|
8
|
+
statusCode;
|
|
9
|
+
parameters;
|
|
10
|
+
partial;
|
|
8
11
|
constructor(owner, init) {
|
|
9
12
|
super(owner, init);
|
|
10
13
|
this.parameters = [];
|
|
@@ -4,9 +4,16 @@ import { DocumentElement } from '../common/document-element.js';
|
|
|
4
4
|
* @class HttpRequestBody
|
|
5
5
|
*/
|
|
6
6
|
export class HttpRequestBody extends DocumentElement {
|
|
7
|
+
description;
|
|
8
|
+
content = [];
|
|
9
|
+
required;
|
|
10
|
+
maxContentSize;
|
|
11
|
+
immediateFetch;
|
|
12
|
+
partial;
|
|
13
|
+
allowPatchOperators;
|
|
14
|
+
keepKeyFields;
|
|
7
15
|
constructor(owner) {
|
|
8
16
|
super(owner);
|
|
9
|
-
this.content = [];
|
|
10
17
|
}
|
|
11
18
|
toJSON(options) {
|
|
12
19
|
return omitUndefined({
|
|
@@ -3,9 +3,9 @@ const STATUS_RANGE_PATTERN = /^([1-6]\d{2})(?:-([1-6]\d{2}))?$/;
|
|
|
3
3
|
* @class HttpStatusRange
|
|
4
4
|
*/
|
|
5
5
|
export class HttpStatusRange {
|
|
6
|
+
start = 0;
|
|
7
|
+
end = 0;
|
|
6
8
|
constructor(arg0, arg1) {
|
|
7
|
-
this.start = 0;
|
|
8
|
-
this.end = 0;
|
|
9
9
|
if (arg0 && typeof arg0 === 'object') {
|
|
10
10
|
this.start = arg0.start || 0;
|
|
11
11
|
this.end = arg0.end || 0;
|
|
@@ -4,12 +4,13 @@ import { ApiBase } from '../common/api-base.js';
|
|
|
4
4
|
* @class MQApi
|
|
5
5
|
*/
|
|
6
6
|
export class MQApi extends ApiBase {
|
|
7
|
+
// noinspection JSUnusedGlobalSymbols
|
|
8
|
+
_controllerReverseMap = new WeakMap();
|
|
9
|
+
transport = 'mq';
|
|
10
|
+
platform;
|
|
11
|
+
controllers = new ResponsiveMap();
|
|
7
12
|
constructor(init) {
|
|
8
13
|
super(init);
|
|
9
|
-
// noinspection JSUnusedGlobalSymbols
|
|
10
|
-
this._controllerReverseMap = new WeakMap();
|
|
11
|
-
this.transport = 'mq';
|
|
12
|
-
this.controllers = new ResponsiveMap();
|
|
13
14
|
this.platform = init.platform;
|
|
14
15
|
}
|
|
15
16
|
findController(arg0) {
|
|
@@ -5,9 +5,15 @@ import { DataType } from '../data-type/data-type.js';
|
|
|
5
5
|
* @class MQOperationResponse
|
|
6
6
|
*/
|
|
7
7
|
export class MQOperationResponse extends DocumentElement {
|
|
8
|
+
channel;
|
|
9
|
+
description;
|
|
10
|
+
type;
|
|
11
|
+
keyType;
|
|
12
|
+
headers = [];
|
|
13
|
+
designType;
|
|
14
|
+
keyDesignType;
|
|
8
15
|
constructor(owner, initArgs) {
|
|
9
16
|
super(owner);
|
|
10
|
-
this.headers = [];
|
|
11
17
|
this.channel = initArgs?.channel;
|
|
12
18
|
this.description = initArgs?.description;
|
|
13
19
|
if (initArgs?.type) {
|
|
@@ -4,12 +4,12 @@ import { ApiBase } from '../common/api-base.js';
|
|
|
4
4
|
* @class WSApi
|
|
5
5
|
*/
|
|
6
6
|
export class WSApi extends ApiBase {
|
|
7
|
+
// noinspection JSUnusedGlobalSymbols
|
|
8
|
+
_controllerReverseMap = new WeakMap();
|
|
9
|
+
transport = 'ws';
|
|
10
|
+
controllers = new ResponsiveMap();
|
|
7
11
|
constructor(init) {
|
|
8
12
|
super(init);
|
|
9
|
-
// noinspection JSUnusedGlobalSymbols
|
|
10
|
-
this._controllerReverseMap = new WeakMap();
|
|
11
|
-
this.transport = 'ws';
|
|
12
|
-
this.controllers = new ResponsiveMap();
|
|
13
13
|
}
|
|
14
14
|
findController(arg0) {
|
|
15
15
|
if (typeof arg0 === 'function') {
|
|
@@ -11,7 +11,11 @@ import { WSController } from './ws-controller.js';
|
|
|
11
11
|
*/
|
|
12
12
|
export declare namespace WSOperation {
|
|
13
13
|
interface Metadata extends Pick<OpraSchema.WSOperation, 'description' | 'event'> {
|
|
14
|
-
arguments?:
|
|
14
|
+
arguments?: {
|
|
15
|
+
type: ThunkAsync<Type | EnumType.EnumObject | EnumType.EnumArray> | string;
|
|
16
|
+
parameterIndex: number;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
}[];
|
|
15
19
|
types?: ThunkAsync<Type | EnumType.EnumObject | EnumType.EnumArray>[];
|
|
16
20
|
response?: ThunkAsync<Type | EnumType.EnumObject | EnumType.EnumArray>[];
|
|
17
21
|
}
|
|
@@ -22,7 +26,11 @@ export declare namespace WSOperation {
|
|
|
22
26
|
interface InitArguments extends Combine<{
|
|
23
27
|
name: string;
|
|
24
28
|
types?: DataType[];
|
|
25
|
-
arguments?:
|
|
29
|
+
arguments?: {
|
|
30
|
+
type: DataType | string | Type;
|
|
31
|
+
parameterIndex: number;
|
|
32
|
+
required?: boolean;
|
|
33
|
+
}[];
|
|
26
34
|
}, Pick<Metadata, 'description'>> {
|
|
27
35
|
event?: string | RegExp;
|
|
28
36
|
response?: DataType | string | Type;
|
|
@@ -62,7 +70,11 @@ declare class WSOperationClass extends DocumentElement {
|
|
|
62
70
|
readonly name: string;
|
|
63
71
|
description?: string;
|
|
64
72
|
event: string | RegExp;
|
|
65
|
-
arguments
|
|
73
|
+
arguments: {
|
|
74
|
+
type: DataType;
|
|
75
|
+
parameterIndex: number;
|
|
76
|
+
required?: boolean;
|
|
77
|
+
}[];
|
|
66
78
|
types: DataTypeMap;
|
|
67
79
|
response?: DataType;
|
|
68
80
|
toJSON(): OpraSchema.WSOperation;
|
|
@@ -24,6 +24,7 @@ export const WSOperation = function (...args) {
|
|
|
24
24
|
throw new TypeError(`Invalid operation name (${initArgs.name})`);
|
|
25
25
|
const _this = asMutable(this);
|
|
26
26
|
_this.types = _this.node[kDataTypeMap] = new DataTypeMap();
|
|
27
|
+
// noinspection JSConstantReassignment
|
|
27
28
|
_this.name = initArgs.name;
|
|
28
29
|
_this.description = initArgs.description;
|
|
29
30
|
if (initArgs.event)
|
|
@@ -36,8 +37,15 @@ export const WSOperation = function (...args) {
|
|
|
36
37
|
else
|
|
37
38
|
_this.event = this.name;
|
|
38
39
|
if (initArgs?.arguments) {
|
|
39
|
-
_this.arguments = initArgs.arguments.map(arg =>
|
|
40
|
+
_this.arguments = initArgs.arguments.map(arg => {
|
|
41
|
+
const type = arg.type instanceof DataType
|
|
42
|
+
? arg.type
|
|
43
|
+
: _this.owner.node.getDataType(arg.type);
|
|
44
|
+
return { type, parameterIndex: arg.parameterIndex };
|
|
45
|
+
});
|
|
40
46
|
}
|
|
47
|
+
else
|
|
48
|
+
_this.arguments = [];
|
|
41
49
|
if (initArgs?.response)
|
|
42
50
|
_this.response =
|
|
43
51
|
initArgs.response instanceof DataType
|
|
@@ -53,7 +61,7 @@ class WSOperationClass extends DocumentElement {
|
|
|
53
61
|
kind: OpraSchema.WSOperation.Kind,
|
|
54
62
|
description: this.description,
|
|
55
63
|
event: this.event,
|
|
56
|
-
arguments: this.arguments?.map(arg => arg.name ? arg.name : arg.toJSON()),
|
|
64
|
+
arguments: this.arguments?.map(arg => arg.type.name ? arg.type.name : arg.type.toJSON()),
|
|
57
65
|
});
|
|
58
66
|
}
|
|
59
67
|
}
|
|
@@ -5,10 +5,7 @@ import { OpraHttpError } from '../opra-http-error.js';
|
|
|
5
5
|
* (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
|
|
6
6
|
*/
|
|
7
7
|
export class BadRequestError extends OpraHttpError {
|
|
8
|
-
|
|
9
|
-
super(...arguments);
|
|
10
|
-
this.status = 400;
|
|
11
|
-
}
|
|
8
|
+
status = 400;
|
|
12
9
|
init(issue) {
|
|
13
10
|
super.init({
|
|
14
11
|
message: 'Bad request',
|
|
@@ -4,10 +4,7 @@ import { OpraHttpError } from '../opra-http-error.js';
|
|
|
4
4
|
* This response is sent when a request conflicts with the current state of the server.
|
|
5
5
|
*/
|
|
6
6
|
export class ConflictError extends OpraHttpError {
|
|
7
|
-
|
|
8
|
-
super(...arguments);
|
|
9
|
-
this.status = 409;
|
|
10
|
-
}
|
|
7
|
+
status = 409;
|
|
11
8
|
init(issue) {
|
|
12
9
|
super.init({
|
|
13
10
|
message: 'Conflict',
|
|
@@ -4,10 +4,7 @@ import { OpraHttpError } from '../opra-http-error.js';
|
|
|
4
4
|
* The request failed due to failure of a previous request.
|
|
5
5
|
*/
|
|
6
6
|
export class FailedDependencyError extends OpraHttpError {
|
|
7
|
-
|
|
8
|
-
super(...arguments);
|
|
9
|
-
this.status = 424;
|
|
10
|
-
}
|
|
7
|
+
status = 424;
|
|
11
8
|
init(issue) {
|
|
12
9
|
super.init({
|
|
13
10
|
message: 'The request failed due to failure of a previous request',
|
|
@@ -7,10 +7,7 @@ import { OpraHttpError } from '../opra-http-error.js';
|
|
|
7
7
|
* the client's identity is known to the server.
|
|
8
8
|
*/
|
|
9
9
|
export class ForbiddenError extends OpraHttpError {
|
|
10
|
-
|
|
11
|
-
super(...arguments);
|
|
12
|
-
this.status = HttpStatusCode.FORBIDDEN;
|
|
13
|
-
}
|
|
10
|
+
status = HttpStatusCode.FORBIDDEN;
|
|
14
11
|
init(issue) {
|
|
15
12
|
super.init({
|
|
16
13
|
message: 'You are not authorized to perform this action',
|
|
@@ -4,10 +4,7 @@ import { OpraHttpError } from '../opra-http-error.js';
|
|
|
4
4
|
* The server has encountered a situation it does not know how to handle.
|
|
5
5
|
*/
|
|
6
6
|
export class InternalServerError extends OpraHttpError {
|
|
7
|
-
|
|
8
|
-
super(...arguments);
|
|
9
|
-
this.status = 500;
|
|
10
|
-
}
|
|
7
|
+
status = 500;
|
|
11
8
|
init(issue) {
|
|
12
9
|
super.init({
|
|
13
10
|
message: 'Internal server error',
|
|
@@ -5,10 +5,7 @@ import { OpraHttpError } from '../opra-http-error.js';
|
|
|
5
5
|
* For example, an API may not allow calling DELETE to remove a resource.
|
|
6
6
|
*/
|
|
7
7
|
export class MethodNotAllowedError extends OpraHttpError {
|
|
8
|
-
|
|
9
|
-
super(...arguments);
|
|
10
|
-
this.status = 405;
|
|
11
|
-
}
|
|
8
|
+
status = 405;
|
|
12
9
|
init(issue) {
|
|
13
10
|
super.init({
|
|
14
11
|
message: 'Method not allowed',
|
|
@@ -5,10 +5,7 @@ import { OpraHttpError } from '../opra-http-error.js';
|
|
|
5
5
|
* doesn't find any content that conforms to the criteria given by the user agent.
|
|
6
6
|
*/
|
|
7
7
|
export class NotAcceptableError extends OpraHttpError {
|
|
8
|
-
|
|
9
|
-
super(...arguments);
|
|
10
|
-
this.status = 406;
|
|
11
|
-
}
|
|
8
|
+
status = 406;
|
|
12
9
|
init(issue) {
|
|
13
10
|
super.init({
|
|
14
11
|
message: 'Not Acceptable',
|
|
@@ -8,10 +8,7 @@ import { OpraHttpError } from '../opra-http-error.js';
|
|
|
8
8
|
* frequent occurrence on the web.
|
|
9
9
|
*/
|
|
10
10
|
export class NotFoundError extends OpraHttpError {
|
|
11
|
-
|
|
12
|
-
super(...arguments);
|
|
13
|
-
this.status = 404;
|
|
14
|
-
}
|
|
11
|
+
status = 404;
|
|
15
12
|
init(issue) {
|
|
16
13
|
super.init({
|
|
17
14
|
message: 'Not found',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { OpraHttpError } from '../opra-http-error.js';
|
|
2
2
|
export class ResourceConflictError extends OpraHttpError {
|
|
3
|
+
status = 409;
|
|
3
4
|
constructor(resource, fields, cause) {
|
|
4
5
|
super({
|
|
5
6
|
message: `There is already an other "${resource}" resource with same values for field(s) [${fields}]`,
|
|
@@ -10,6 +11,5 @@ export class ResourceConflictError extends OpraHttpError {
|
|
|
10
11
|
location: fields,
|
|
11
12
|
},
|
|
12
13
|
}, cause);
|
|
13
|
-
this.status = 409;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -5,10 +5,7 @@ import { OpraHttpError } from '../opra-http-error.js';
|
|
|
5
5
|
* That is, the client must authenticate itself to get the requested response.
|
|
6
6
|
*/
|
|
7
7
|
export class UnauthorizedError extends OpraHttpError {
|
|
8
|
-
|
|
9
|
-
super(...arguments);
|
|
10
|
-
this.status = 401;
|
|
11
|
-
}
|
|
8
|
+
status = 401;
|
|
12
9
|
init(issue) {
|
|
13
10
|
super.init({
|
|
14
11
|
message: `You don't have permission to perform this action`,
|
|
@@ -4,10 +4,7 @@ import { OpraHttpError } from '../opra-http-error.js';
|
|
|
4
4
|
* The request was well-formed but was unable to be followed due to semantic errors.
|
|
5
5
|
*/
|
|
6
6
|
export class UnprocessableEntityError extends OpraHttpError {
|
|
7
|
-
|
|
8
|
-
super(...arguments);
|
|
9
|
-
this.status = 422;
|
|
10
|
-
}
|
|
7
|
+
status = 422;
|
|
11
8
|
init(issue) {
|
|
12
9
|
super.init({
|
|
13
10
|
message: 'Unprocessable entity',
|