@opra/common 1.19.4 → 1.19.7
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/browser/index.cjs +5 -5
- package/browser/index.mjs +5 -5
- package/cjs/document/api-document.js +11 -4
- package/cjs/document/constants.js +3 -1
- package/cjs/document/data-type/enum-type.js +4 -0
- package/cjs/document/decorators/{rpc-controller.decorator.js → mq-controller.decorator.js} +8 -8
- package/cjs/document/decorators/{rpc-operation.decorator.js → mq-operation.decorator.js} +6 -6
- package/cjs/document/decorators/ws-controller.decorator.js +51 -0
- package/cjs/document/decorators/ws-operation.decorator.js +43 -0
- package/cjs/document/factory/api-document.factory.js +3 -3
- package/cjs/document/factory/{rpc-api.factory.js → mq-api.factory.js} +28 -28
- package/cjs/document/factory/ws-api.factory.js +123 -0
- package/cjs/document/index.js +15 -8
- package/cjs/document/{rpc/rpc-api.js → mq/mq-api.js} +5 -5
- package/cjs/document/{rpc/rpc-controller.js → mq/mq-controller.js} +14 -14
- package/cjs/document/{rpc/rpc-header.js → mq/mq-header.js} +5 -5
- package/cjs/document/{rpc/rpc-operation-response.js → mq/mq-operation-response.js} +4 -4
- package/cjs/document/{rpc/rpc-operation.js → mq/mq-operation.js} +10 -10
- package/cjs/document/ws/ws-api.js +52 -0
- package/cjs/document/ws/ws-controller.js +78 -0
- package/cjs/document/ws/ws-operation.js +62 -0
- package/cjs/filter/antlr/OpraFilterLexer.js +361 -211
- package/cjs/filter/antlr/OpraFilterParser.js +174 -92
- package/cjs/schema/http/http-api.interface.js +2 -0
- package/cjs/schema/mq/mq-api.interface.js +2 -0
- package/cjs/schema/mq/mq-controller.interface.js +11 -0
- package/cjs/schema/mq/mq-header.interface.js +2 -0
- package/cjs/schema/mq/mq-operation.interface.js +7 -0
- package/cjs/schema/opra-schema.js +9 -3
- package/cjs/schema/ws/ws-api.interface.js +2 -0
- package/cjs/schema/ws/ws-controller.interface.js +11 -0
- package/cjs/schema/ws/ws-operation.interface.js +7 -0
- package/esm/document/api-document.js +11 -4
- package/esm/document/constants.js +2 -0
- package/esm/document/data-type/enum-type.js +4 -0
- package/esm/document/decorators/{rpc-controller.decorator.js → mq-controller.decorator.js} +8 -8
- package/esm/document/decorators/{rpc-operation.decorator.js → mq-operation.decorator.js} +6 -6
- package/esm/document/decorators/ws-controller.decorator.js +48 -0
- package/esm/document/decorators/ws-operation.decorator.js +40 -0
- package/esm/document/factory/api-document.factory.js +3 -3
- package/esm/document/factory/{rpc-api.factory.js → mq-api.factory.js} +27 -27
- package/esm/document/factory/ws-api.factory.js +119 -0
- package/esm/document/index.js +15 -8
- package/esm/document/{rpc/rpc-api.js → mq/mq-api.js} +3 -3
- package/esm/document/{rpc/rpc-controller.js → mq/mq-controller.js} +13 -13
- package/esm/document/{rpc/rpc-header.js → mq/mq-header.js} +4 -4
- package/esm/document/{rpc/rpc-operation-response.js → mq/mq-operation-response.js} +2 -2
- package/esm/document/{rpc/rpc-operation.js → mq/mq-operation.js} +9 -9
- package/esm/document/ws/ws-api.js +48 -0
- package/esm/document/ws/ws-controller.js +75 -0
- package/esm/document/ws/ws-operation.js +59 -0
- package/esm/filter/antlr/OpraFilterLexer.js +362 -212
- package/esm/filter/antlr/OpraFilterListener.js +1 -1
- package/esm/filter/antlr/OpraFilterParser.js +174 -92
- package/esm/schema/http/http-api.interface.js +1 -0
- package/esm/schema/mq/mq-api.interface.js +1 -0
- package/esm/schema/mq/mq-controller.interface.js +8 -0
- package/esm/schema/mq/mq-header.interface.js +1 -0
- package/esm/schema/mq/mq-operation.interface.js +4 -0
- package/esm/schema/opra-schema.js +9 -3
- package/esm/schema/ws/ws-api.interface.js +1 -0
- package/esm/schema/ws/ws-controller.interface.js +8 -0
- package/esm/schema/ws/ws-operation.interface.js +4 -0
- package/package.json +6 -6
- package/types/document/api-document.d.ts +5 -3
- package/types/document/constants.d.ts +2 -0
- package/types/document/decorators/mq-controller.decorator.d.ts +20 -0
- package/types/document/decorators/mq-operation.decorator.d.ts +32 -0
- package/types/document/decorators/ws-controller.decorator.d.ts +20 -0
- package/types/document/decorators/ws-operation.decorator.d.ts +24 -0
- package/types/document/factory/api-document.factory.d.ts +3 -2
- package/types/document/factory/mq-api.factory.d.ts +40 -0
- package/types/document/factory/ws-api.factory.d.ts +31 -0
- package/types/document/index.d.ts +20 -11
- package/types/document/mq/mq-api.d.ts +27 -0
- package/types/document/mq/mq-controller.d.ts +83 -0
- package/types/document/{rpc/rpc-header.d.ts → mq/mq-header.d.ts} +15 -15
- package/types/document/{rpc/rpc-operation-response.d.ts → mq/mq-operation-response.d.ts} +13 -13
- package/types/document/{rpc/rpc-operation.d.ts → mq/mq-operation.d.ts} +27 -27
- package/types/document/ws/ws-api.d.ts +26 -0
- package/types/document/ws/ws-controller.d.ts +79 -0
- package/types/document/ws/ws-operation.d.ts +70 -0
- package/types/filter/antlr/OpraFilterLexer.d.ts +1 -1
- package/types/filter/antlr/OpraFilterListener.d.ts +28 -28
- package/types/filter/antlr/OpraFilterVisitor.d.ts +27 -27
- package/types/schema/api-document.interface.d.ts +4 -46
- package/types/schema/api.interface.d.ts +13 -0
- package/types/schema/http/http-api.interface.d.ts +12 -0
- package/types/schema/mq/mq-api.interface.d.ts +15 -0
- package/types/schema/mq/mq-controller.interface.d.ts +22 -0
- package/types/schema/{rpc/rpc-header.interface.d.ts → mq/mq-header.interface.d.ts} +2 -2
- package/types/schema/{rpc/rpc-operation.interface.d.ts → mq/mq-operation.interface.d.ts} +11 -11
- package/types/schema/opra-schema.d.ts +9 -3
- package/types/schema/types.d.ts +11 -0
- package/types/schema/ws/ws-api.interface.d.ts +11 -0
- package/types/schema/ws/ws-controller.interface.d.ts +20 -0
- package/types/schema/ws/ws-operation.interface.d.ts +15 -0
- package/cjs/schema/rpc/rpc-controller.interface.js +0 -11
- package/cjs/schema/rpc/rpc-operation.interface.js +0 -7
- package/esm/schema/rpc/rpc-controller.interface.js +0 -8
- package/esm/schema/rpc/rpc-operation.interface.js +0 -4
- package/types/document/decorators/rpc-controller.decorator.d.ts +0 -20
- package/types/document/decorators/rpc-operation.decorator.d.ts +0 -32
- package/types/document/factory/rpc-api.factory.d.ts +0 -40
- package/types/document/rpc/rpc-api.d.ts +0 -27
- package/types/document/rpc/rpc-controller.d.ts +0 -83
- package/types/schema/rpc/rpc-controller.interface.d.ts +0 -22
- /package/cjs/schema/{rpc/rpc-header.interface.js → api.interface.js} +0 -0
- /package/esm/schema/{rpc/rpc-header.interface.js → api.interface.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Generated from ./src/filter/antlr/OpraFilter.g4 by ANTLR 4.13.2
|
|
2
|
-
import { ParseTreeListener } from
|
|
2
|
+
import { ParseTreeListener } from '@browsery/antlr4';
|
|
3
3
|
/**
|
|
4
4
|
* This interface defines a complete listener for a parse tree produced by
|
|
5
5
|
* `OpraFilterParser`.
|
|
@@ -2,11 +2,21 @@
|
|
|
2
2
|
// noinspection ES6UnusedImports,JSUnusedGlobalSymbols,JSUnusedLocalSymbols
|
|
3
3
|
import { ATN, ATNDeserializer, DFA, FailedPredicateException, NoViableAltException, Parser, ParserATNSimulator, ParserRuleContext, PredictionContextCache, RecognitionException, Token, } from '@browsery/antlr4';
|
|
4
4
|
class OpraFilterParser extends Parser {
|
|
5
|
-
get grammarFileName() {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
get
|
|
9
|
-
|
|
5
|
+
get grammarFileName() {
|
|
6
|
+
return 'OpraFilter.g4';
|
|
7
|
+
}
|
|
8
|
+
get literalNames() {
|
|
9
|
+
return OpraFilterParser.literalNames;
|
|
10
|
+
}
|
|
11
|
+
get symbolicNames() {
|
|
12
|
+
return OpraFilterParser.symbolicNames;
|
|
13
|
+
}
|
|
14
|
+
get ruleNames() {
|
|
15
|
+
return OpraFilterParser.ruleNames;
|
|
16
|
+
}
|
|
17
|
+
get serializedATN() {
|
|
18
|
+
return OpraFilterParser._serializedATN;
|
|
19
|
+
}
|
|
10
20
|
createFailedPredicateException(predicate, message) {
|
|
11
21
|
return new FailedPredicateException(this, predicate, message);
|
|
12
22
|
}
|
|
@@ -67,11 +77,14 @@ class OpraFilterParser extends Parser {
|
|
|
67
77
|
this._ctx = localctx;
|
|
68
78
|
_prevctx = localctx;
|
|
69
79
|
this.state = 38;
|
|
70
|
-
localctx._left =
|
|
80
|
+
localctx._left =
|
|
81
|
+
this.comparisonLeft();
|
|
71
82
|
this.state = 39;
|
|
72
|
-
localctx._operator =
|
|
83
|
+
localctx._operator =
|
|
84
|
+
this.comparisonOperator();
|
|
73
85
|
this.state = 40;
|
|
74
|
-
localctx._right =
|
|
86
|
+
localctx._right =
|
|
87
|
+
this.comparisonRight();
|
|
75
88
|
}
|
|
76
89
|
break;
|
|
77
90
|
case 1:
|
|
@@ -124,11 +137,12 @@ class OpraFilterParser extends Parser {
|
|
|
124
137
|
localctx = new LogicalExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
|
|
125
138
|
this.pushNewRecursionContext(localctx, _startState, OpraFilterParser.RULE_expression);
|
|
126
139
|
this.state = 50;
|
|
127
|
-
if (!
|
|
128
|
-
throw this.createFailedPredicateException(
|
|
140
|
+
if (!this.precpred(this._ctx, 3)) {
|
|
141
|
+
throw this.createFailedPredicateException('this.precpred(this._ctx, 3)');
|
|
129
142
|
}
|
|
130
143
|
this.state = 51;
|
|
131
|
-
localctx._op =
|
|
144
|
+
localctx._op =
|
|
145
|
+
this.logicalOperator();
|
|
132
146
|
this.state = 52;
|
|
133
147
|
this.expression(4);
|
|
134
148
|
}
|
|
@@ -614,7 +628,7 @@ class OpraFilterParser extends Parser {
|
|
|
614
628
|
{
|
|
615
629
|
this.state = 111;
|
|
616
630
|
_la = this._input.LA(1);
|
|
617
|
-
if (!((
|
|
631
|
+
if (!((_la & ~0x1f) === 0 && ((1 << _la) & 491520) !== 0)) {
|
|
618
632
|
this._errHandler.recoverInline(this);
|
|
619
633
|
}
|
|
620
634
|
else {
|
|
@@ -648,7 +662,7 @@ class OpraFilterParser extends Parser {
|
|
|
648
662
|
{
|
|
649
663
|
this.state = 113;
|
|
650
664
|
_la = this._input.LA(1);
|
|
651
|
-
if (!((
|
|
665
|
+
if (!((_la & ~0x1f) === 0 && ((1 << _la) & 2146959360) !== 0)) {
|
|
652
666
|
this._errHandler.recoverInline(this);
|
|
653
667
|
}
|
|
654
668
|
else {
|
|
@@ -682,7 +696,7 @@ class OpraFilterParser extends Parser {
|
|
|
682
696
|
{
|
|
683
697
|
this.state = 115;
|
|
684
698
|
_la = this._input.LA(1);
|
|
685
|
-
if (!(((
|
|
699
|
+
if (!(((_la - 31) & ~0x1f) === 0 && ((1 << (_la - 31)) & 15) !== 0)) {
|
|
686
700
|
this._errHandler.recoverInline(this);
|
|
687
701
|
}
|
|
688
702
|
else {
|
|
@@ -814,88 +828,156 @@ OpraFilterParser.RULE_arithmeticOperator = 13;
|
|
|
814
828
|
OpraFilterParser.RULE_comparisonOperator = 14;
|
|
815
829
|
OpraFilterParser.RULE_logicalOperator = 15;
|
|
816
830
|
OpraFilterParser.RULE_polarityOperator = 16;
|
|
817
|
-
OpraFilterParser.literalNames = [
|
|
818
|
-
|
|
819
|
-
"'
|
|
820
|
-
"'
|
|
821
|
-
"'
|
|
822
|
-
"'
|
|
823
|
-
"'
|
|
831
|
+
OpraFilterParser.literalNames = [
|
|
832
|
+
null,
|
|
833
|
+
"'('",
|
|
834
|
+
"')'",
|
|
835
|
+
"'not'",
|
|
836
|
+
"'!'",
|
|
837
|
+
"'.'",
|
|
838
|
+
"'@'",
|
|
839
|
+
"'['",
|
|
840
|
+
"','",
|
|
841
|
+
"']'",
|
|
842
|
+
"'true'",
|
|
843
|
+
"'false'",
|
|
844
|
+
"'null'",
|
|
845
|
+
"'Infinity'",
|
|
824
846
|
"'infinity'",
|
|
825
|
-
"'+'",
|
|
826
|
-
"'
|
|
827
|
-
"'
|
|
828
|
-
"'
|
|
829
|
-
"'
|
|
830
|
-
"'
|
|
831
|
-
"'
|
|
832
|
-
"'
|
|
833
|
-
"'
|
|
834
|
-
"'
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
null,
|
|
848
|
-
null,
|
|
849
|
-
null,
|
|
850
|
-
null,
|
|
851
|
-
null,
|
|
852
|
-
null,
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
847
|
+
"'+'",
|
|
848
|
+
"'-'",
|
|
849
|
+
"'*'",
|
|
850
|
+
"'/'",
|
|
851
|
+
"'<='",
|
|
852
|
+
"'<'",
|
|
853
|
+
"'>'",
|
|
854
|
+
"'>='",
|
|
855
|
+
"'='",
|
|
856
|
+
"'!='",
|
|
857
|
+
"'in'",
|
|
858
|
+
"'!in'",
|
|
859
|
+
"'like'",
|
|
860
|
+
"'!like'",
|
|
861
|
+
"'ilike'",
|
|
862
|
+
"'!ilike'",
|
|
863
|
+
"'and'",
|
|
864
|
+
"'or'",
|
|
865
|
+
"'&&'",
|
|
866
|
+
"'||'",
|
|
867
|
+
];
|
|
868
|
+
OpraFilterParser.symbolicNames = [
|
|
869
|
+
null,
|
|
870
|
+
null,
|
|
871
|
+
null,
|
|
872
|
+
null,
|
|
873
|
+
null,
|
|
874
|
+
null,
|
|
875
|
+
null,
|
|
876
|
+
null,
|
|
877
|
+
null,
|
|
878
|
+
null,
|
|
879
|
+
null,
|
|
880
|
+
null,
|
|
881
|
+
null,
|
|
882
|
+
null,
|
|
883
|
+
null,
|
|
884
|
+
null,
|
|
885
|
+
null,
|
|
886
|
+
null,
|
|
887
|
+
null,
|
|
888
|
+
null,
|
|
889
|
+
null,
|
|
890
|
+
null,
|
|
891
|
+
null,
|
|
892
|
+
null,
|
|
893
|
+
null,
|
|
894
|
+
null,
|
|
895
|
+
null,
|
|
896
|
+
null,
|
|
897
|
+
null,
|
|
898
|
+
null,
|
|
899
|
+
null,
|
|
900
|
+
null,
|
|
901
|
+
null,
|
|
902
|
+
null,
|
|
903
|
+
null,
|
|
904
|
+
'IDENTIFIER',
|
|
905
|
+
'POLAR_OP',
|
|
906
|
+
'DATE',
|
|
907
|
+
'DATETIME',
|
|
908
|
+
'TIME',
|
|
909
|
+
'NUMBER',
|
|
910
|
+
'INTEGER',
|
|
911
|
+
'STRING',
|
|
912
|
+
'WHITESPACE',
|
|
913
|
+
];
|
|
858
914
|
// tslint:disable:no-trailing-whitespace
|
|
859
915
|
OpraFilterParser.ruleNames = [
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
916
|
+
'root',
|
|
917
|
+
'expression',
|
|
918
|
+
'comparisonLeft',
|
|
919
|
+
'comparisonRight',
|
|
920
|
+
'parenthesizedItem',
|
|
921
|
+
'value',
|
|
922
|
+
'qualifiedIdentifier',
|
|
923
|
+
'externalConstant',
|
|
924
|
+
'identifier',
|
|
925
|
+
'arrayValue',
|
|
926
|
+
'boolean',
|
|
927
|
+
'null',
|
|
928
|
+
'infinity',
|
|
929
|
+
'arithmeticOperator',
|
|
930
|
+
'comparisonOperator',
|
|
931
|
+
'logicalOperator',
|
|
932
|
+
'polarityOperator',
|
|
933
|
+
];
|
|
934
|
+
OpraFilterParser._serializedATN = [
|
|
935
|
+
4, 1, 43, 120, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4,
|
|
936
|
+
2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2,
|
|
937
|
+
11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7,
|
|
938
|
+
16, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
939
|
+
1, 1, 1, 1, 3, 1, 49, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 55, 8, 1, 10, 1,
|
|
940
|
+
12, 1, 58, 9, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 66, 8, 3, 1, 4,
|
|
941
|
+
1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 78, 8, 5, 1, 6,
|
|
942
|
+
1, 6, 1, 6, 5, 6, 83, 8, 6, 10, 6, 12, 6, 86, 9, 6, 1, 6, 1, 6, 1, 7, 1, 7,
|
|
943
|
+
1, 7, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 5, 9, 99, 8, 9, 10, 9, 12, 9, 102,
|
|
944
|
+
9, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1,
|
|
945
|
+
14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 0, 1, 2, 17, 0, 2, 4, 6, 8,
|
|
946
|
+
10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 0, 6, 1, 0, 3, 4, 1, 0, 10,
|
|
947
|
+
11, 1, 0, 13, 14, 1, 0, 15, 18, 1, 0, 19, 30, 1, 0, 31, 34, 117, 0, 34, 1,
|
|
948
|
+
0, 0, 0, 2, 48, 1, 0, 0, 0, 4, 59, 1, 0, 0, 0, 6, 65, 1, 0, 0, 0, 8, 67, 1,
|
|
949
|
+
0, 0, 0, 10, 77, 1, 0, 0, 0, 12, 84, 1, 0, 0, 0, 14, 89, 1, 0, 0, 0, 16, 92,
|
|
950
|
+
1, 0, 0, 0, 18, 94, 1, 0, 0, 0, 20, 105, 1, 0, 0, 0, 22, 107, 1, 0, 0, 0,
|
|
951
|
+
24, 109, 1, 0, 0, 0, 26, 111, 1, 0, 0, 0, 28, 113, 1, 0, 0, 0, 30, 115, 1,
|
|
952
|
+
0, 0, 0, 32, 117, 1, 0, 0, 0, 34, 35, 3, 2, 1, 0, 35, 36, 5, 0, 0, 1, 36, 1,
|
|
953
|
+
1, 0, 0, 0, 37, 38, 6, 1, -1, 0, 38, 39, 3, 4, 2, 0, 39, 40, 3, 28, 14, 0,
|
|
954
|
+
40, 41, 3, 6, 3, 0, 41, 49, 1, 0, 0, 0, 42, 43, 5, 1, 0, 0, 43, 44, 3, 8, 4,
|
|
955
|
+
0, 44, 45, 5, 2, 0, 0, 45, 49, 1, 0, 0, 0, 46, 47, 7, 0, 0, 0, 47, 49, 3, 2,
|
|
956
|
+
1, 1, 48, 37, 1, 0, 0, 0, 48, 42, 1, 0, 0, 0, 48, 46, 1, 0, 0, 0, 49, 56, 1,
|
|
957
|
+
0, 0, 0, 50, 51, 10, 3, 0, 0, 51, 52, 3, 30, 15, 0, 52, 53, 3, 2, 1, 4, 53,
|
|
958
|
+
55, 1, 0, 0, 0, 54, 50, 1, 0, 0, 0, 55, 58, 1, 0, 0, 0, 56, 54, 1, 0, 0, 0,
|
|
959
|
+
56, 57, 1, 0, 0, 0, 57, 3, 1, 0, 0, 0, 58, 56, 1, 0, 0, 0, 59, 60, 3, 12, 6,
|
|
960
|
+
0, 60, 5, 1, 0, 0, 0, 61, 66, 3, 10, 5, 0, 62, 66, 3, 12, 6, 0, 63, 66, 3,
|
|
961
|
+
14, 7, 0, 64, 66, 3, 18, 9, 0, 65, 61, 1, 0, 0, 0, 65, 62, 1, 0, 0, 0, 65,
|
|
962
|
+
63, 1, 0, 0, 0, 65, 64, 1, 0, 0, 0, 66, 7, 1, 0, 0, 0, 67, 68, 3, 2, 1, 0,
|
|
963
|
+
68, 9, 1, 0, 0, 0, 69, 78, 5, 40, 0, 0, 70, 78, 3, 24, 12, 0, 71, 78, 3, 20,
|
|
964
|
+
10, 0, 72, 78, 3, 22, 11, 0, 73, 78, 5, 38, 0, 0, 74, 78, 5, 37, 0, 0, 75,
|
|
965
|
+
78, 5, 39, 0, 0, 76, 78, 5, 42, 0, 0, 77, 69, 1, 0, 0, 0, 77, 70, 1, 0, 0,
|
|
966
|
+
0, 77, 71, 1, 0, 0, 0, 77, 72, 1, 0, 0, 0, 77, 73, 1, 0, 0, 0, 77, 74, 1, 0,
|
|
967
|
+
0, 0, 77, 75, 1, 0, 0, 0, 77, 76, 1, 0, 0, 0, 78, 11, 1, 0, 0, 0, 79, 80, 3,
|
|
968
|
+
16, 8, 0, 80, 81, 5, 5, 0, 0, 81, 83, 1, 0, 0, 0, 82, 79, 1, 0, 0, 0, 83,
|
|
969
|
+
86, 1, 0, 0, 0, 84, 82, 1, 0, 0, 0, 84, 85, 1, 0, 0, 0, 85, 87, 1, 0, 0, 0,
|
|
970
|
+
86, 84, 1, 0, 0, 0, 87, 88, 3, 16, 8, 0, 88, 13, 1, 0, 0, 0, 89, 90, 5, 6,
|
|
971
|
+
0, 0, 90, 91, 3, 16, 8, 0, 91, 15, 1, 0, 0, 0, 92, 93, 5, 35, 0, 0, 93, 17,
|
|
972
|
+
1, 0, 0, 0, 94, 95, 5, 7, 0, 0, 95, 100, 3, 10, 5, 0, 96, 97, 5, 8, 0, 0,
|
|
973
|
+
97, 99, 3, 10, 5, 0, 98, 96, 1, 0, 0, 0, 99, 102, 1, 0, 0, 0, 100, 98, 1, 0,
|
|
974
|
+
0, 0, 100, 101, 1, 0, 0, 0, 101, 103, 1, 0, 0, 0, 102, 100, 1, 0, 0, 0, 103,
|
|
975
|
+
104, 5, 9, 0, 0, 104, 19, 1, 0, 0, 0, 105, 106, 7, 1, 0, 0, 106, 21, 1, 0,
|
|
976
|
+
0, 0, 107, 108, 5, 12, 0, 0, 108, 23, 1, 0, 0, 0, 109, 110, 7, 2, 0, 0, 110,
|
|
977
|
+
25, 1, 0, 0, 0, 111, 112, 7, 3, 0, 0, 112, 27, 1, 0, 0, 0, 113, 114, 7, 4,
|
|
978
|
+
0, 0, 114, 29, 1, 0, 0, 0, 115, 116, 7, 5, 0, 0, 116, 31, 1, 0, 0, 0, 117,
|
|
979
|
+
118, 5, 36, 0, 0, 118, 33, 1, 0, 0, 0, 6, 48, 56, 65, 77, 84, 100,
|
|
864
980
|
];
|
|
865
|
-
OpraFilterParser._serializedATN = [4, 1, 43, 120, 2, 0, 7, 0, 2,
|
|
866
|
-
1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2,
|
|
867
|
-
10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 1, 0,
|
|
868
|
-
1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 49, 8, 1, 1, 1, 1, 1,
|
|
869
|
-
1, 1, 1, 1, 5, 1, 55, 8, 1, 10, 1, 12, 1, 58, 9, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 66, 8, 3,
|
|
870
|
-
1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 78, 8, 5, 1, 6, 1, 6, 1, 6, 5, 6, 83, 8,
|
|
871
|
-
6, 10, 6, 12, 6, 86, 9, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 5, 9, 99, 8,
|
|
872
|
-
9, 10, 9, 12, 9, 102, 9, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14,
|
|
873
|
-
1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 0, 1, 2, 17, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24,
|
|
874
|
-
26, 28, 30, 32, 0, 6, 1, 0, 3, 4, 1, 0, 10, 11, 1, 0, 13, 14, 1, 0, 15, 18, 1, 0, 19, 30, 1, 0, 31,
|
|
875
|
-
34, 117, 0, 34, 1, 0, 0, 0, 2, 48, 1, 0, 0, 0, 4, 59, 1, 0, 0, 0, 6, 65, 1, 0, 0, 0, 8, 67, 1, 0, 0, 0,
|
|
876
|
-
10, 77, 1, 0, 0, 0, 12, 84, 1, 0, 0, 0, 14, 89, 1, 0, 0, 0, 16, 92, 1, 0, 0, 0, 18, 94, 1, 0, 0, 0, 20,
|
|
877
|
-
105, 1, 0, 0, 0, 22, 107, 1, 0, 0, 0, 24, 109, 1, 0, 0, 0, 26, 111, 1, 0, 0, 0, 28, 113, 1, 0, 0, 0,
|
|
878
|
-
30, 115, 1, 0, 0, 0, 32, 117, 1, 0, 0, 0, 34, 35, 3, 2, 1, 0, 35, 36, 5, 0, 0, 1, 36, 1, 1, 0, 0, 0,
|
|
879
|
-
37, 38, 6, 1, -1, 0, 38, 39, 3, 4, 2, 0, 39, 40, 3, 28, 14, 0, 40, 41, 3, 6, 3, 0, 41, 49, 1, 0, 0,
|
|
880
|
-
0, 42, 43, 5, 1, 0, 0, 43, 44, 3, 8, 4, 0, 44, 45, 5, 2, 0, 0, 45, 49, 1, 0, 0, 0, 46, 47, 7, 0, 0, 0,
|
|
881
|
-
47, 49, 3, 2, 1, 1, 48, 37, 1, 0, 0, 0, 48, 42, 1, 0, 0, 0, 48, 46, 1, 0, 0, 0, 49, 56, 1, 0, 0, 0, 50,
|
|
882
|
-
51, 10, 3, 0, 0, 51, 52, 3, 30, 15, 0, 52, 53, 3, 2, 1, 4, 53, 55, 1, 0, 0, 0, 54, 50, 1, 0, 0, 0, 55,
|
|
883
|
-
58, 1, 0, 0, 0, 56, 54, 1, 0, 0, 0, 56, 57, 1, 0, 0, 0, 57, 3, 1, 0, 0, 0, 58, 56, 1, 0, 0, 0, 59, 60,
|
|
884
|
-
3, 12, 6, 0, 60, 5, 1, 0, 0, 0, 61, 66, 3, 10, 5, 0, 62, 66, 3, 12, 6, 0, 63, 66, 3, 14, 7, 0, 64, 66,
|
|
885
|
-
3, 18, 9, 0, 65, 61, 1, 0, 0, 0, 65, 62, 1, 0, 0, 0, 65, 63, 1, 0, 0, 0, 65, 64, 1, 0, 0, 0, 66, 7, 1,
|
|
886
|
-
0, 0, 0, 67, 68, 3, 2, 1, 0, 68, 9, 1, 0, 0, 0, 69, 78, 5, 40, 0, 0, 70, 78, 3, 24, 12, 0, 71, 78, 3,
|
|
887
|
-
20, 10, 0, 72, 78, 3, 22, 11, 0, 73, 78, 5, 38, 0, 0, 74, 78, 5, 37, 0, 0, 75, 78, 5, 39, 0, 0, 76,
|
|
888
|
-
78, 5, 42, 0, 0, 77, 69, 1, 0, 0, 0, 77, 70, 1, 0, 0, 0, 77, 71, 1, 0, 0, 0, 77, 72, 1, 0, 0, 0, 77,
|
|
889
|
-
73, 1, 0, 0, 0, 77, 74, 1, 0, 0, 0, 77, 75, 1, 0, 0, 0, 77, 76, 1, 0, 0, 0, 78, 11, 1, 0, 0, 0, 79, 80,
|
|
890
|
-
3, 16, 8, 0, 80, 81, 5, 5, 0, 0, 81, 83, 1, 0, 0, 0, 82, 79, 1, 0, 0, 0, 83, 86, 1, 0, 0, 0, 84, 82,
|
|
891
|
-
1, 0, 0, 0, 84, 85, 1, 0, 0, 0, 85, 87, 1, 0, 0, 0, 86, 84, 1, 0, 0, 0, 87, 88, 3, 16, 8, 0, 88, 13,
|
|
892
|
-
1, 0, 0, 0, 89, 90, 5, 6, 0, 0, 90, 91, 3, 16, 8, 0, 91, 15, 1, 0, 0, 0, 92, 93, 5, 35, 0, 0, 93, 17,
|
|
893
|
-
1, 0, 0, 0, 94, 95, 5, 7, 0, 0, 95, 100, 3, 10, 5, 0, 96, 97, 5, 8, 0, 0, 97, 99, 3, 10, 5, 0, 98, 96,
|
|
894
|
-
1, 0, 0, 0, 99, 102, 1, 0, 0, 0, 100, 98, 1, 0, 0, 0, 100, 101, 1, 0, 0, 0, 101, 103, 1, 0, 0, 0, 102,
|
|
895
|
-
100, 1, 0, 0, 0, 103, 104, 5, 9, 0, 0, 104, 19, 1, 0, 0, 0, 105, 106, 7, 1, 0, 0, 106, 21, 1, 0, 0,
|
|
896
|
-
0, 107, 108, 5, 12, 0, 0, 108, 23, 1, 0, 0, 0, 109, 110, 7, 2, 0, 0, 110, 25, 1, 0, 0, 0, 111, 112,
|
|
897
|
-
7, 3, 0, 0, 112, 27, 1, 0, 0, 0, 113, 114, 7, 4, 0, 0, 114, 29, 1, 0, 0, 0, 115, 116, 7, 5, 0, 0, 116,
|
|
898
|
-
31, 1, 0, 0, 0, 117, 118, 5, 36, 0, 0, 118, 33, 1, 0, 0, 0, 6, 48, 56, 65, 77, 84, 100];
|
|
899
981
|
OpraFilterParser.DecisionsToDFA = OpraFilterParser._ATN.decisionToState.map((ds, index) => new DFA(ds, index));
|
|
900
982
|
export default OpraFilterParser;
|
|
901
983
|
export class RootContext extends ParserRuleContext {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './api.interface.js';
|
|
1
2
|
export * from './api-document.interface.js';
|
|
2
3
|
export * from './constants.js';
|
|
3
4
|
export * from './data-type/complex-type.interface.js';
|
|
@@ -9,6 +10,7 @@ export * from './data-type/mixin-type.interface.js';
|
|
|
9
10
|
export * from './data-type/simple-type.interface.js';
|
|
10
11
|
export * from './data-type/union-type.interface.js';
|
|
11
12
|
export * from './data-type-container.interface.js';
|
|
13
|
+
export * from './http/http-api.interface.js';
|
|
12
14
|
export * from './http/http-controller.interface.js';
|
|
13
15
|
export * from './http/http-media-type.interface.js';
|
|
14
16
|
export * from './http/http-multipart-field.interface.js';
|
|
@@ -17,9 +19,13 @@ export * from './http/http-operation-response.interface.js';
|
|
|
17
19
|
export * from './http/http-parameter.interface.js';
|
|
18
20
|
export * from './http/http-request-body.interface.js';
|
|
19
21
|
export * from './http/http-status-range.interface.js';
|
|
20
|
-
export * from './
|
|
21
|
-
export * from './
|
|
22
|
-
export * from './
|
|
22
|
+
export * from './mq/mq-api.interface.js';
|
|
23
|
+
export * from './mq/mq-controller.interface.js';
|
|
24
|
+
export * from './mq/mq-header.interface.js';
|
|
25
|
+
export * from './mq/mq-operation.interface.js';
|
|
23
26
|
export * from './type-guards.js';
|
|
24
27
|
export * from './types.js';
|
|
25
28
|
export * from './value.interface.js';
|
|
29
|
+
export * from './ws/ws-api.interface.js';
|
|
30
|
+
export * from './ws/ws-controller.interface.js';
|
|
31
|
+
export * from './ws/ws-operation.interface.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opra/common",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.7",
|
|
4
4
|
"description": "Opra common package",
|
|
5
5
|
"author": "Panates",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@browsery/antlr4": "^4.13.3-r4",
|
|
9
9
|
"@browsery/highland": "^2.13.6-r4",
|
|
10
|
-
"@browsery/http-parser": "^0.5.
|
|
11
|
-
"@browsery/i18next": "^
|
|
12
|
-
"@browsery/type-is": "^
|
|
13
|
-
"@jsopen/objects": "^2.0.
|
|
10
|
+
"@browsery/http-parser": "^0.5.10-r2",
|
|
11
|
+
"@browsery/i18next": "^25.6.0",
|
|
12
|
+
"@browsery/type-is": "^2.0.1",
|
|
13
|
+
"@jsopen/objects": "^2.0.2",
|
|
14
14
|
"fast-tokenizer": "^1.7.0",
|
|
15
15
|
"object-hash": "^3.0.0",
|
|
16
16
|
"putil-promisify": "^1.10.1",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"super-fast-md5": "^1.0.3",
|
|
20
20
|
"tslib": "^2.8.1",
|
|
21
21
|
"uid": "^2.0.2",
|
|
22
|
-
"valgen": "^5.18.
|
|
22
|
+
"valgen": "^5.18.2"
|
|
23
23
|
},
|
|
24
24
|
"type": "module",
|
|
25
25
|
"exports": {
|
|
@@ -7,7 +7,8 @@ import { kTypeNSMap } from './constants.js';
|
|
|
7
7
|
import { DataType } from './data-type/data-type.js';
|
|
8
8
|
import type { EnumType } from './data-type/enum-type.js';
|
|
9
9
|
import { HttpApi } from './http/http-api.js';
|
|
10
|
-
import {
|
|
10
|
+
import { MQApi } from './mq/mq-api.js';
|
|
11
|
+
import { WSApi } from './ws/ws-api.js';
|
|
11
12
|
/**
|
|
12
13
|
*
|
|
13
14
|
* @class ApiDocument
|
|
@@ -19,7 +20,7 @@ export declare class ApiDocument extends DocumentElement {
|
|
|
19
20
|
info: OpraSchema.DocumentInfo;
|
|
20
21
|
references: ResponsiveMap<ApiDocument>;
|
|
21
22
|
types: DataTypeMap;
|
|
22
|
-
api?: HttpApi |
|
|
23
|
+
api?: HttpApi | MQApi | WSApi;
|
|
23
24
|
constructor();
|
|
24
25
|
/**
|
|
25
26
|
* Returns NS of datatype. Returns undefined if not found
|
|
@@ -28,7 +29,8 @@ export declare class ApiDocument extends DocumentElement {
|
|
|
28
29
|
getDataTypeNs(nameOrCtor: string | Type | Function | EnumType.EnumArray | EnumType.EnumObject | DataType): string | undefined;
|
|
29
30
|
findDocument(id: string): ApiDocument | undefined;
|
|
30
31
|
get httpApi(): HttpApi;
|
|
31
|
-
get
|
|
32
|
+
get mqApi(): MQApi;
|
|
33
|
+
get wsApi(): WSApi;
|
|
32
34
|
toJSON(): OpraSchema.ApiDocument;
|
|
33
35
|
/**
|
|
34
36
|
* Export as Opra schema definition object
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export declare const DATATYPE_METADATA: unique symbol;
|
|
2
2
|
export declare const HTTP_CONTROLLER_METADATA: unique symbol;
|
|
3
|
+
export declare const MQ_CONTROLLER_METADATA: unique symbol;
|
|
4
|
+
export declare const WS_CONTROLLER_METADATA: unique symbol;
|
|
3
5
|
export declare const RPC_CONTROLLER_METADATA: unique symbol;
|
|
4
6
|
export declare const DECODER: unique symbol;
|
|
5
7
|
export declare const ENCODER: unique symbol;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { TypeThunkAsync } from 'ts-gems';
|
|
2
|
+
import type { MQController } from '../mq/mq-controller.js';
|
|
3
|
+
import type { MQHeader } from '../mq/mq-header';
|
|
4
|
+
export interface MQControllerDecorator<T extends MQControllerDecorator<any> = MQControllerDecorator<any>> extends ClassDecorator {
|
|
5
|
+
Header(name: string | RegExp, optionsOrType?: MQHeader.Options | string | TypeThunkAsync | false): T;
|
|
6
|
+
UseType(...type: TypeThunkAsync[]): T;
|
|
7
|
+
}
|
|
8
|
+
export interface MQControllerDecoratorFactory {
|
|
9
|
+
<T extends MQController.Options>(options?: T): MQControllerDecorator;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @namespace MQControllerDecoratorFactory
|
|
13
|
+
*/
|
|
14
|
+
export declare namespace MQControllerDecoratorFactory {
|
|
15
|
+
type AugmentationFunction = (decorator: MQControllerDecorator, decoratorChain: Function[], options?: MQController.Options) => void;
|
|
16
|
+
}
|
|
17
|
+
export declare function MQControllerDecoratorFactory<O extends MQController.Options>(options?: O): MQControllerDecorator;
|
|
18
|
+
export declare namespace MQControllerDecoratorFactory {
|
|
19
|
+
var augment: (fn: MQControllerDecoratorFactory.AugmentationFunction) => void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ThunkAsync, Type, TypeThunkAsync } from 'ts-gems';
|
|
2
|
+
import type { MQHeader } from '../mq/mq-header';
|
|
3
|
+
import type { MQOperation } from '../mq/mq-operation.js';
|
|
4
|
+
import type { MQOperationResponse } from '../mq/mq-operation-response.js';
|
|
5
|
+
export interface MQOperationDecorator {
|
|
6
|
+
(target: Object, propertyKey: string): void;
|
|
7
|
+
Header(name: string | RegExp, optionsOrType?: MQHeader.Options | string | TypeThunkAsync): this;
|
|
8
|
+
Response(payloadType: TypeThunkAsync | string, options?: MQOperationResponse.Options): MQOperationResponseDecorator;
|
|
9
|
+
UseType(...type: Type[]): this;
|
|
10
|
+
}
|
|
11
|
+
export interface MQOperationResponseDecorator {
|
|
12
|
+
(target: Object, propertyKey: string): void;
|
|
13
|
+
Header(name: string | RegExp, optionsOrType?: MQHeader.Options | string | TypeThunkAsync): this;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @namespace MQOperationDecoratorFactory
|
|
17
|
+
*/
|
|
18
|
+
export interface MQOperationDecoratorFactory {
|
|
19
|
+
/**
|
|
20
|
+
* Property decorator
|
|
21
|
+
* @param decoratorChain
|
|
22
|
+
* @param payloadType
|
|
23
|
+
* @param options
|
|
24
|
+
*/ <T extends MQOperation.Options>(decoratorChain: Function[], payloadType: ThunkAsync<Type> | string, options?: T): MQOperationDecorator;
|
|
25
|
+
}
|
|
26
|
+
export declare namespace MQOperationDecoratorFactory {
|
|
27
|
+
type AugmentationFunction = (decorator: MQOperationDecorator, decoratorChain: Function[], payloadType: ThunkAsync<Type> | string, options?: MQOperation.Options) => void;
|
|
28
|
+
}
|
|
29
|
+
export declare function MQOperationDecoratorFactory(decoratorChain: Function[], payloadType: ThunkAsync<Type> | string | TypeThunkAsync, options?: MQOperation.Options): MQOperationDecorator;
|
|
30
|
+
export declare namespace MQOperationDecoratorFactory {
|
|
31
|
+
var augment: (fn: MQOperationDecoratorFactory.AugmentationFunction) => void;
|
|
32
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { TypeThunkAsync } from 'ts-gems';
|
|
2
|
+
import type { MQHeader } from '../mq/mq-header';
|
|
3
|
+
import type { WSController } from '../ws/ws-controller.js';
|
|
4
|
+
export interface WSControllerDecorator<T extends WSControllerDecorator<any> = WSControllerDecorator<any>> extends ClassDecorator {
|
|
5
|
+
Header(name: string | RegExp, optionsOrType?: MQHeader.Options | string | TypeThunkAsync | false): T;
|
|
6
|
+
UseType(...type: TypeThunkAsync[]): T;
|
|
7
|
+
}
|
|
8
|
+
export interface WSControllerDecoratorFactory {
|
|
9
|
+
<T extends WSController.Options>(options?: T): WSControllerDecorator;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @namespace WSControllerDecoratorFactory
|
|
13
|
+
*/
|
|
14
|
+
export declare namespace WSControllerDecoratorFactory {
|
|
15
|
+
type AugmentationFunction = (decorator: WSControllerDecorator, decoratorChain: Function[], options?: WSController.Options) => void;
|
|
16
|
+
}
|
|
17
|
+
export declare function WSControllerDecoratorFactory<O extends WSController.Options>(options?: O): WSControllerDecorator;
|
|
18
|
+
export declare namespace WSControllerDecoratorFactory {
|
|
19
|
+
var augment: (fn: WSControllerDecoratorFactory.AugmentationFunction) => void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ThunkAsync, Type, TypeThunkAsync } from 'ts-gems';
|
|
2
|
+
import type { WSOperation } from '../ws/ws-operation.js';
|
|
3
|
+
export interface WSOperationDecorator {
|
|
4
|
+
(target: Object, propertyKey: string): void;
|
|
5
|
+
UseType(...type: Type[]): this;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* @namespace WSOperationDecoratorFactory
|
|
9
|
+
*/
|
|
10
|
+
export interface WSOperationDecoratorFactory {
|
|
11
|
+
/**
|
|
12
|
+
* Property decorator
|
|
13
|
+
* @param decoratorChain
|
|
14
|
+
* @param payloadType
|
|
15
|
+
* @param options
|
|
16
|
+
*/ <T extends WSOperation.Options>(decoratorChain: Function[], payloadType: ThunkAsync<Type> | string, options?: T): WSOperationDecorator;
|
|
17
|
+
}
|
|
18
|
+
export declare namespace WSOperationDecoratorFactory {
|
|
19
|
+
type AugmentationFunction = (decorator: WSOperationDecorator, decoratorChain: Function[], payloadType: ThunkAsync<Type> | string, options?: WSOperation.Options) => void;
|
|
20
|
+
}
|
|
21
|
+
export declare function WSOperationDecoratorFactory(decoratorChain: Function[], payloadType: ThunkAsync<Type> | string | TypeThunkAsync, options?: WSOperation.Options): WSOperationDecorator;
|
|
22
|
+
export declare namespace WSOperationDecoratorFactory {
|
|
23
|
+
var augment: (fn: WSOperationDecoratorFactory.AugmentationFunction) => void;
|
|
24
|
+
}
|
|
@@ -4,12 +4,13 @@ import { ApiDocument } from '../api-document.js';
|
|
|
4
4
|
import { DocumentInitContext } from '../common/document-init-context.js';
|
|
5
5
|
import { DataTypeFactory } from './data-type.factory.js';
|
|
6
6
|
import { HttpApiFactory } from './http-api.factory.js';
|
|
7
|
-
import {
|
|
7
|
+
import { MQApiFactory } from './mq-api.factory.js';
|
|
8
|
+
import { WSApiFactory } from './ws-api.factory.js';
|
|
8
9
|
export declare namespace ApiDocumentFactory {
|
|
9
10
|
interface InitArguments extends PartialSome<StrictOmit<OpraSchema.ApiDocument, 'id' | 'references' | 'types' | 'api'>, 'spec'> {
|
|
10
11
|
references?: Record<string, ReferenceThunk>;
|
|
11
12
|
types?: DataTypeInitSources;
|
|
12
|
-
api?: StrictOmit<HttpApiFactory.InitArguments, 'owner'> | StrictOmit<
|
|
13
|
+
api?: StrictOmit<HttpApiFactory.InitArguments, 'owner'> | StrictOmit<MQApiFactory.InitArguments, 'owner'> | StrictOmit<WSApiFactory.InitArguments, 'owner'>;
|
|
13
14
|
}
|
|
14
15
|
type ReferenceSource = string | OpraSchema.ApiDocument | InitArguments | ApiDocument;
|
|
15
16
|
type ReferenceThunk = ThunkAsync<ReferenceSource>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Type } from 'ts-gems';
|
|
2
|
+
import { OpraSchema } from '../../schema/index.js';
|
|
3
|
+
import { DocumentInitContext } from '../common/document-init-context.js';
|
|
4
|
+
import { MQApi } from '../mq/mq-api.js';
|
|
5
|
+
import { MQController } from '../mq/mq-controller.js';
|
|
6
|
+
import { MQOperation } from '../mq/mq-operation.js';
|
|
7
|
+
import { MQOperationResponse } from '../mq/mq-operation-response.js';
|
|
8
|
+
export declare namespace MQApiFactory {
|
|
9
|
+
interface InitArguments extends MQApi.InitArguments {
|
|
10
|
+
controllers: Type[] | any[] | ((parent: any) => any) | OpraSchema.MQApi['controllers'];
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* @class MQApiFactory
|
|
15
|
+
*/
|
|
16
|
+
export declare class MQApiFactory {
|
|
17
|
+
/**
|
|
18
|
+
* Generates MQApi
|
|
19
|
+
* @param context
|
|
20
|
+
* @param init
|
|
21
|
+
*/
|
|
22
|
+
static createApi(context: DocumentInitContext, init: MQApiFactory.InitArguments): Promise<MQApi>;
|
|
23
|
+
protected static _createController(context: DocumentInitContext, parent: MQApi, thunk: Type | object | Function | OpraSchema.MQController, name?: string): Promise<MQController | undefined | void>;
|
|
24
|
+
/**
|
|
25
|
+
* Initializes MQOperation
|
|
26
|
+
* @param context
|
|
27
|
+
* @param operation
|
|
28
|
+
* @param metadata
|
|
29
|
+
* @protected
|
|
30
|
+
*/
|
|
31
|
+
protected static _initMQOperation(context: DocumentInitContext, operation: MQOperation, metadata: MQOperation.Metadata | OpraSchema.MQOperation): Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* Initializes MQOperationResponse
|
|
34
|
+
* @param context
|
|
35
|
+
* @param response
|
|
36
|
+
* @param metadata
|
|
37
|
+
* @protected
|
|
38
|
+
*/
|
|
39
|
+
protected static _initMQOperationResponse(context: DocumentInitContext, response: MQOperationResponse, metadata: MQOperationResponse.Metadata | OpraSchema.MQOperationResponse): Promise<void>;
|
|
40
|
+
}
|