@kohost/api-client 3.0.0-beta.45 → 3.0.0-beta.47
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/dist/cjs/AMQPClient.js +61 -24
- package/dist/cjs/Client.js +126 -4
- package/dist/cjs/Commands.js +161 -50
- package/dist/cjs/Errors.js +55 -22
- package/dist/cjs/Events.js +66 -22
- package/dist/cjs/Models.js +863 -567
- package/dist/cjs/SocketIoClient.js +5 -2
- package/dist/cjs/defs.js +6 -4
- package/dist/cjs/index.cjs.js +6744 -10
- package/dist/cjs/utils.js +55 -22
- package/dist/esm/Client.js +140 -10
- package/dist/esm/Client.js.map +3 -3
- package/dist/esm/Commands.js +161 -50
- package/dist/esm/Commands.js.map +3 -3
- package/dist/esm/Errors.js +55 -22
- package/dist/esm/Errors.js.map +1 -1
- package/dist/esm/Events.js +66 -22
- package/dist/esm/Events.js.map +1 -1
- package/dist/esm/Models.js +941 -573
- package/dist/esm/Models.js.map +4 -4
- package/dist/esm/SocketIoClient.js +53 -26
- package/dist/esm/SocketIoClient.js.map +1 -1
- package/dist/esm/defs.js +20 -10
- package/dist/esm/defs.js.map +1 -1
- package/dist/esm/index.js +17 -11
- package/dist/esm/utils.js +166 -61
- package/dist/esm/utils.js.map +1 -1
- package/dist/useCases/ListScenes.js +32 -0
- package/dist/useCases/SetRoomScene.js +32 -0
- package/dist/useCases/SetSpaceScene.js +32 -0
- package/package.json +2 -2
package/dist/esm/utils.js
CHANGED
|
@@ -55,11 +55,16 @@ var require_code = __commonJS({
|
|
|
55
55
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56
56
|
exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0;
|
|
57
57
|
var _CodeOrName = class {
|
|
58
|
+
static {
|
|
59
|
+
__name(this, "_CodeOrName");
|
|
60
|
+
}
|
|
58
61
|
};
|
|
59
|
-
__name(_CodeOrName, "_CodeOrName");
|
|
60
62
|
exports._CodeOrName = _CodeOrName;
|
|
61
63
|
exports.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
|
|
62
64
|
var Name = class extends _CodeOrName {
|
|
65
|
+
static {
|
|
66
|
+
__name(this, "Name");
|
|
67
|
+
}
|
|
63
68
|
constructor(s) {
|
|
64
69
|
super();
|
|
65
70
|
if (!exports.IDENTIFIER.test(s))
|
|
@@ -76,9 +81,11 @@ var require_code = __commonJS({
|
|
|
76
81
|
return { [this.str]: 1 };
|
|
77
82
|
}
|
|
78
83
|
};
|
|
79
|
-
__name(Name, "Name");
|
|
80
84
|
exports.Name = Name;
|
|
81
85
|
var _Code = class extends _CodeOrName {
|
|
86
|
+
static {
|
|
87
|
+
__name(this, "_Code");
|
|
88
|
+
}
|
|
82
89
|
constructor(code) {
|
|
83
90
|
super();
|
|
84
91
|
this._items = typeof code === "string" ? [code] : code;
|
|
@@ -105,7 +112,6 @@ var require_code = __commonJS({
|
|
|
105
112
|
}, {});
|
|
106
113
|
}
|
|
107
114
|
};
|
|
108
|
-
__name(_Code, "_Code");
|
|
109
115
|
exports._Code = _Code;
|
|
110
116
|
exports.nil = new _Code("");
|
|
111
117
|
function _(strs, ...args) {
|
|
@@ -225,12 +231,14 @@ var require_scope = __commonJS({
|
|
|
225
231
|
exports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0;
|
|
226
232
|
var code_1 = require_code();
|
|
227
233
|
var ValueError = class extends Error {
|
|
234
|
+
static {
|
|
235
|
+
__name(this, "ValueError");
|
|
236
|
+
}
|
|
228
237
|
constructor(name) {
|
|
229
238
|
super(`CodeGen: "code" for ${name} not defined`);
|
|
230
239
|
this.value = name.value;
|
|
231
240
|
}
|
|
232
241
|
};
|
|
233
|
-
__name(ValueError, "ValueError");
|
|
234
242
|
var UsedValueState;
|
|
235
243
|
(function(UsedValueState2) {
|
|
236
244
|
UsedValueState2[UsedValueState2["Started"] = 0] = "Started";
|
|
@@ -242,6 +250,9 @@ var require_scope = __commonJS({
|
|
|
242
250
|
var: new code_1.Name("var")
|
|
243
251
|
};
|
|
244
252
|
var Scope = class {
|
|
253
|
+
static {
|
|
254
|
+
__name(this, "Scope");
|
|
255
|
+
}
|
|
245
256
|
constructor({ prefixes, parent } = {}) {
|
|
246
257
|
this._names = {};
|
|
247
258
|
this._prefixes = prefixes;
|
|
@@ -265,9 +276,11 @@ var require_scope = __commonJS({
|
|
|
265
276
|
return this._names[prefix] = { prefix, index: 0 };
|
|
266
277
|
}
|
|
267
278
|
};
|
|
268
|
-
__name(Scope, "Scope");
|
|
269
279
|
exports.Scope = Scope;
|
|
270
280
|
var ValueScopeName = class extends code_1.Name {
|
|
281
|
+
static {
|
|
282
|
+
__name(this, "ValueScopeName");
|
|
283
|
+
}
|
|
271
284
|
constructor(prefix, nameStr) {
|
|
272
285
|
super(nameStr);
|
|
273
286
|
this.prefix = prefix;
|
|
@@ -277,10 +290,12 @@ var require_scope = __commonJS({
|
|
|
277
290
|
this.scopePath = (0, code_1._)`.${new code_1.Name(property)}[${itemIndex}]`;
|
|
278
291
|
}
|
|
279
292
|
};
|
|
280
|
-
__name(ValueScopeName, "ValueScopeName");
|
|
281
293
|
exports.ValueScopeName = ValueScopeName;
|
|
282
294
|
var line = (0, code_1._)`\n`;
|
|
283
295
|
var ValueScope = class extends Scope {
|
|
296
|
+
static {
|
|
297
|
+
__name(this, "ValueScope");
|
|
298
|
+
}
|
|
284
299
|
constructor(opts) {
|
|
285
300
|
super(opts);
|
|
286
301
|
this._values = {};
|
|
@@ -361,7 +376,6 @@ var require_scope = __commonJS({
|
|
|
361
376
|
return code;
|
|
362
377
|
}
|
|
363
378
|
};
|
|
364
|
-
__name(ValueScope, "ValueScope");
|
|
365
379
|
exports.ValueScope = ValueScope;
|
|
366
380
|
}
|
|
367
381
|
});
|
|
@@ -425,6 +439,9 @@ var require_codegen = __commonJS({
|
|
|
425
439
|
ADD: new code_1._Code("+")
|
|
426
440
|
};
|
|
427
441
|
var Node = class {
|
|
442
|
+
static {
|
|
443
|
+
__name(this, "Node");
|
|
444
|
+
}
|
|
428
445
|
optimizeNodes() {
|
|
429
446
|
return this;
|
|
430
447
|
}
|
|
@@ -432,8 +449,10 @@ var require_codegen = __commonJS({
|
|
|
432
449
|
return this;
|
|
433
450
|
}
|
|
434
451
|
};
|
|
435
|
-
__name(Node, "Node");
|
|
436
452
|
var Def = class extends Node {
|
|
453
|
+
static {
|
|
454
|
+
__name(this, "Def");
|
|
455
|
+
}
|
|
437
456
|
constructor(varKind, name, rhs) {
|
|
438
457
|
super();
|
|
439
458
|
this.varKind = varKind;
|
|
@@ -456,8 +475,10 @@ var require_codegen = __commonJS({
|
|
|
456
475
|
return this.rhs instanceof code_1._CodeOrName ? this.rhs.names : {};
|
|
457
476
|
}
|
|
458
477
|
};
|
|
459
|
-
__name(Def, "Def");
|
|
460
478
|
var Assign = class extends Node {
|
|
479
|
+
static {
|
|
480
|
+
__name(this, "Assign");
|
|
481
|
+
}
|
|
461
482
|
constructor(lhs, rhs, sideEffects) {
|
|
462
483
|
super();
|
|
463
484
|
this.lhs = lhs;
|
|
@@ -478,8 +499,10 @@ var require_codegen = __commonJS({
|
|
|
478
499
|
return addExprNames(names, this.rhs);
|
|
479
500
|
}
|
|
480
501
|
};
|
|
481
|
-
__name(Assign, "Assign");
|
|
482
502
|
var AssignOp = class extends Assign {
|
|
503
|
+
static {
|
|
504
|
+
__name(this, "AssignOp");
|
|
505
|
+
}
|
|
483
506
|
constructor(lhs, op, rhs, sideEffects) {
|
|
484
507
|
super(lhs, rhs, sideEffects);
|
|
485
508
|
this.op = op;
|
|
@@ -488,8 +511,10 @@ var require_codegen = __commonJS({
|
|
|
488
511
|
return `${this.lhs} ${this.op}= ${this.rhs};` + _n;
|
|
489
512
|
}
|
|
490
513
|
};
|
|
491
|
-
__name(AssignOp, "AssignOp");
|
|
492
514
|
var Label = class extends Node {
|
|
515
|
+
static {
|
|
516
|
+
__name(this, "Label");
|
|
517
|
+
}
|
|
493
518
|
constructor(label) {
|
|
494
519
|
super();
|
|
495
520
|
this.label = label;
|
|
@@ -499,8 +524,10 @@ var require_codegen = __commonJS({
|
|
|
499
524
|
return `${this.label}:` + _n;
|
|
500
525
|
}
|
|
501
526
|
};
|
|
502
|
-
__name(Label, "Label");
|
|
503
527
|
var Break = class extends Node {
|
|
528
|
+
static {
|
|
529
|
+
__name(this, "Break");
|
|
530
|
+
}
|
|
504
531
|
constructor(label) {
|
|
505
532
|
super();
|
|
506
533
|
this.label = label;
|
|
@@ -511,8 +538,10 @@ var require_codegen = __commonJS({
|
|
|
511
538
|
return `break${label};` + _n;
|
|
512
539
|
}
|
|
513
540
|
};
|
|
514
|
-
__name(Break, "Break");
|
|
515
541
|
var Throw = class extends Node {
|
|
542
|
+
static {
|
|
543
|
+
__name(this, "Throw");
|
|
544
|
+
}
|
|
516
545
|
constructor(error) {
|
|
517
546
|
super();
|
|
518
547
|
this.error = error;
|
|
@@ -524,8 +553,10 @@ var require_codegen = __commonJS({
|
|
|
524
553
|
return this.error.names;
|
|
525
554
|
}
|
|
526
555
|
};
|
|
527
|
-
__name(Throw, "Throw");
|
|
528
556
|
var AnyCode = class extends Node {
|
|
557
|
+
static {
|
|
558
|
+
__name(this, "AnyCode");
|
|
559
|
+
}
|
|
529
560
|
constructor(code) {
|
|
530
561
|
super();
|
|
531
562
|
this.code = code;
|
|
@@ -544,8 +575,10 @@ var require_codegen = __commonJS({
|
|
|
544
575
|
return this.code instanceof code_1._CodeOrName ? this.code.names : {};
|
|
545
576
|
}
|
|
546
577
|
};
|
|
547
|
-
__name(AnyCode, "AnyCode");
|
|
548
578
|
var ParentNode = class extends Node {
|
|
579
|
+
static {
|
|
580
|
+
__name(this, "ParentNode");
|
|
581
|
+
}
|
|
549
582
|
constructor(nodes = []) {
|
|
550
583
|
super();
|
|
551
584
|
this.nodes = nodes;
|
|
@@ -583,21 +616,29 @@ var require_codegen = __commonJS({
|
|
|
583
616
|
return this.nodes.reduce((names, n) => addNames(names, n.names), {});
|
|
584
617
|
}
|
|
585
618
|
};
|
|
586
|
-
__name(ParentNode, "ParentNode");
|
|
587
619
|
var BlockNode = class extends ParentNode {
|
|
620
|
+
static {
|
|
621
|
+
__name(this, "BlockNode");
|
|
622
|
+
}
|
|
588
623
|
render(opts) {
|
|
589
624
|
return "{" + opts._n + super.render(opts) + "}" + opts._n;
|
|
590
625
|
}
|
|
591
626
|
};
|
|
592
|
-
__name(BlockNode, "BlockNode");
|
|
593
627
|
var Root = class extends ParentNode {
|
|
628
|
+
static {
|
|
629
|
+
__name(this, "Root");
|
|
630
|
+
}
|
|
594
631
|
};
|
|
595
|
-
__name(Root, "Root");
|
|
596
632
|
var Else = class extends BlockNode {
|
|
633
|
+
static {
|
|
634
|
+
__name(this, "Else");
|
|
635
|
+
}
|
|
597
636
|
};
|
|
598
|
-
__name(Else, "Else");
|
|
599
637
|
Else.kind = "else";
|
|
600
|
-
var If = class extends BlockNode {
|
|
638
|
+
var If = class _If extends BlockNode {
|
|
639
|
+
static {
|
|
640
|
+
__name(this, "If");
|
|
641
|
+
}
|
|
601
642
|
constructor(condition, nodes) {
|
|
602
643
|
super(nodes);
|
|
603
644
|
this.condition = condition;
|
|
@@ -620,10 +661,10 @@ var require_codegen = __commonJS({
|
|
|
620
661
|
}
|
|
621
662
|
if (e) {
|
|
622
663
|
if (cond === false)
|
|
623
|
-
return e instanceof
|
|
664
|
+
return e instanceof _If ? e : e.nodes;
|
|
624
665
|
if (this.nodes.length)
|
|
625
666
|
return this;
|
|
626
|
-
return new
|
|
667
|
+
return new _If(not(cond), e instanceof _If ? [e] : e.nodes);
|
|
627
668
|
}
|
|
628
669
|
if (cond === false || !this.nodes.length)
|
|
629
670
|
return void 0;
|
|
@@ -645,13 +686,17 @@ var require_codegen = __commonJS({
|
|
|
645
686
|
return names;
|
|
646
687
|
}
|
|
647
688
|
};
|
|
648
|
-
__name(If, "If");
|
|
649
689
|
If.kind = "if";
|
|
650
690
|
var For = class extends BlockNode {
|
|
691
|
+
static {
|
|
692
|
+
__name(this, "For");
|
|
693
|
+
}
|
|
651
694
|
};
|
|
652
|
-
__name(For, "For");
|
|
653
695
|
For.kind = "for";
|
|
654
696
|
var ForLoop = class extends For {
|
|
697
|
+
static {
|
|
698
|
+
__name(this, "ForLoop");
|
|
699
|
+
}
|
|
655
700
|
constructor(iteration) {
|
|
656
701
|
super();
|
|
657
702
|
this.iteration = iteration;
|
|
@@ -669,8 +714,10 @@ var require_codegen = __commonJS({
|
|
|
669
714
|
return addNames(super.names, this.iteration.names);
|
|
670
715
|
}
|
|
671
716
|
};
|
|
672
|
-
__name(ForLoop, "ForLoop");
|
|
673
717
|
var ForRange = class extends For {
|
|
718
|
+
static {
|
|
719
|
+
__name(this, "ForRange");
|
|
720
|
+
}
|
|
674
721
|
constructor(varKind, name, from, to) {
|
|
675
722
|
super();
|
|
676
723
|
this.varKind = varKind;
|
|
@@ -688,8 +735,10 @@ var require_codegen = __commonJS({
|
|
|
688
735
|
return addExprNames(names, this.to);
|
|
689
736
|
}
|
|
690
737
|
};
|
|
691
|
-
__name(ForRange, "ForRange");
|
|
692
738
|
var ForIter = class extends For {
|
|
739
|
+
static {
|
|
740
|
+
__name(this, "ForIter");
|
|
741
|
+
}
|
|
693
742
|
constructor(loop, varKind, name, iterable) {
|
|
694
743
|
super();
|
|
695
744
|
this.loop = loop;
|
|
@@ -710,8 +759,10 @@ var require_codegen = __commonJS({
|
|
|
710
759
|
return addNames(super.names, this.iterable.names);
|
|
711
760
|
}
|
|
712
761
|
};
|
|
713
|
-
__name(ForIter, "ForIter");
|
|
714
762
|
var Func = class extends BlockNode {
|
|
763
|
+
static {
|
|
764
|
+
__name(this, "Func");
|
|
765
|
+
}
|
|
715
766
|
constructor(name, args, async) {
|
|
716
767
|
super();
|
|
717
768
|
this.name = name;
|
|
@@ -723,16 +774,20 @@ var require_codegen = __commonJS({
|
|
|
723
774
|
return `${_async}function ${this.name}(${this.args})` + super.render(opts);
|
|
724
775
|
}
|
|
725
776
|
};
|
|
726
|
-
__name(Func, "Func");
|
|
727
777
|
Func.kind = "func";
|
|
728
778
|
var Return = class extends ParentNode {
|
|
779
|
+
static {
|
|
780
|
+
__name(this, "Return");
|
|
781
|
+
}
|
|
729
782
|
render(opts) {
|
|
730
783
|
return "return " + super.render(opts);
|
|
731
784
|
}
|
|
732
785
|
};
|
|
733
|
-
__name(Return, "Return");
|
|
734
786
|
Return.kind = "return";
|
|
735
787
|
var Try = class extends BlockNode {
|
|
788
|
+
static {
|
|
789
|
+
__name(this, "Try");
|
|
790
|
+
}
|
|
736
791
|
render(opts) {
|
|
737
792
|
let code = "try" + super.render(opts);
|
|
738
793
|
if (this.catch)
|
|
@@ -764,8 +819,10 @@ var require_codegen = __commonJS({
|
|
|
764
819
|
return names;
|
|
765
820
|
}
|
|
766
821
|
};
|
|
767
|
-
__name(Try, "Try");
|
|
768
822
|
var Catch = class extends BlockNode {
|
|
823
|
+
static {
|
|
824
|
+
__name(this, "Catch");
|
|
825
|
+
}
|
|
769
826
|
constructor(error) {
|
|
770
827
|
super();
|
|
771
828
|
this.error = error;
|
|
@@ -774,16 +831,20 @@ var require_codegen = __commonJS({
|
|
|
774
831
|
return `catch(${this.error})` + super.render(opts);
|
|
775
832
|
}
|
|
776
833
|
};
|
|
777
|
-
__name(Catch, "Catch");
|
|
778
834
|
Catch.kind = "catch";
|
|
779
835
|
var Finally = class extends BlockNode {
|
|
836
|
+
static {
|
|
837
|
+
__name(this, "Finally");
|
|
838
|
+
}
|
|
780
839
|
render(opts) {
|
|
781
840
|
return "finally" + super.render(opts);
|
|
782
841
|
}
|
|
783
842
|
};
|
|
784
|
-
__name(Finally, "Finally");
|
|
785
843
|
Finally.kind = "finally";
|
|
786
844
|
var CodeGen = class {
|
|
845
|
+
static {
|
|
846
|
+
__name(this, "CodeGen");
|
|
847
|
+
}
|
|
787
848
|
constructor(extScope, opts = {}) {
|
|
788
849
|
this._values = {};
|
|
789
850
|
this._blockStarts = [];
|
|
@@ -1047,7 +1108,6 @@ var require_codegen = __commonJS({
|
|
|
1047
1108
|
ns[ns.length - 1] = node;
|
|
1048
1109
|
}
|
|
1049
1110
|
};
|
|
1050
|
-
__name(CodeGen, "CodeGen");
|
|
1051
1111
|
exports.CodeGen = CodeGen;
|
|
1052
1112
|
function addNames(names, from) {
|
|
1053
1113
|
for (const n in from)
|
|
@@ -2796,6 +2856,9 @@ var require_validate = __commonJS({
|
|
|
2796
2856
|
}
|
|
2797
2857
|
__name(strictTypesError, "strictTypesError");
|
|
2798
2858
|
var KeywordCxt = class {
|
|
2859
|
+
static {
|
|
2860
|
+
__name(this, "KeywordCxt");
|
|
2861
|
+
}
|
|
2799
2862
|
constructor(it, def, keyword) {
|
|
2800
2863
|
(0, keyword_1.validateKeywordUsage)(it, def, keyword);
|
|
2801
2864
|
this.gen = it.gen;
|
|
@@ -2967,7 +3030,6 @@ var require_validate = __commonJS({
|
|
|
2967
3030
|
}
|
|
2968
3031
|
}
|
|
2969
3032
|
};
|
|
2970
|
-
__name(KeywordCxt, "KeywordCxt");
|
|
2971
3033
|
exports.KeywordCxt = KeywordCxt;
|
|
2972
3034
|
function keywordCode(it, keyword, def, ruleType) {
|
|
2973
3035
|
const cxt = new KeywordCxt(it, def, keyword);
|
|
@@ -3036,13 +3098,15 @@ var require_validation_error = __commonJS({
|
|
|
3036
3098
|
"use strict";
|
|
3037
3099
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3038
3100
|
var ValidationError = class extends Error {
|
|
3101
|
+
static {
|
|
3102
|
+
__name(this, "ValidationError");
|
|
3103
|
+
}
|
|
3039
3104
|
constructor(errors) {
|
|
3040
3105
|
super("validation failed");
|
|
3041
3106
|
this.errors = errors;
|
|
3042
3107
|
this.ajv = this.validation = true;
|
|
3043
3108
|
}
|
|
3044
3109
|
};
|
|
3045
|
-
__name(ValidationError, "ValidationError");
|
|
3046
3110
|
exports.default = ValidationError;
|
|
3047
3111
|
}
|
|
3048
3112
|
});
|
|
@@ -3054,13 +3118,15 @@ var require_ref_error = __commonJS({
|
|
|
3054
3118
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3055
3119
|
var resolve_1 = require_resolve();
|
|
3056
3120
|
var MissingRefError = class extends Error {
|
|
3121
|
+
static {
|
|
3122
|
+
__name(this, "MissingRefError");
|
|
3123
|
+
}
|
|
3057
3124
|
constructor(resolver, baseId, ref, msg) {
|
|
3058
3125
|
super(msg || `can't resolve reference ${ref} from id ${baseId}`);
|
|
3059
3126
|
this.missingRef = (0, resolve_1.resolveUrl)(resolver, baseId, ref);
|
|
3060
3127
|
this.missingSchema = (0, resolve_1.normalizeId)((0, resolve_1.getFullPath)(resolver, this.missingRef));
|
|
3061
3128
|
}
|
|
3062
3129
|
};
|
|
3063
|
-
__name(MissingRefError, "MissingRefError");
|
|
3064
3130
|
exports.default = MissingRefError;
|
|
3065
3131
|
}
|
|
3066
3132
|
});
|
|
@@ -3078,6 +3144,9 @@ var require_compile = __commonJS({
|
|
|
3078
3144
|
var util_1 = require_util();
|
|
3079
3145
|
var validate_1 = require_validate();
|
|
3080
3146
|
var SchemaEnv = class {
|
|
3147
|
+
static {
|
|
3148
|
+
__name(this, "SchemaEnv");
|
|
3149
|
+
}
|
|
3081
3150
|
constructor(env) {
|
|
3082
3151
|
var _a;
|
|
3083
3152
|
this.refs = {};
|
|
@@ -3096,7 +3165,6 @@ var require_compile = __commonJS({
|
|
|
3096
3165
|
this.refs = {};
|
|
3097
3166
|
}
|
|
3098
3167
|
};
|
|
3099
|
-
__name(SchemaEnv, "SchemaEnv");
|
|
3100
3168
|
exports.SchemaEnv = SchemaEnv;
|
|
3101
3169
|
function compileSchema(sch) {
|
|
3102
3170
|
const _sch = getCompilingSchema.call(this, sch);
|
|
@@ -4504,6 +4572,9 @@ var require_core = __commonJS({
|
|
|
4504
4572
|
}
|
|
4505
4573
|
__name(requiredOptions, "requiredOptions");
|
|
4506
4574
|
var Ajv = class {
|
|
4575
|
+
static {
|
|
4576
|
+
__name(this, "Ajv");
|
|
4577
|
+
}
|
|
4507
4578
|
constructor(opts = {}) {
|
|
4508
4579
|
this.schemas = {};
|
|
4509
4580
|
this.refs = {};
|
|
@@ -4879,7 +4950,6 @@ var require_core = __commonJS({
|
|
|
4879
4950
|
}
|
|
4880
4951
|
}
|
|
4881
4952
|
};
|
|
4882
|
-
__name(Ajv, "Ajv");
|
|
4883
4953
|
exports.default = Ajv;
|
|
4884
4954
|
Ajv.ValidationError = validation_error_1.default;
|
|
4885
4955
|
Ajv.MissingRefError = ref_error_1.default;
|
|
@@ -7052,6 +7122,9 @@ var require_ajv = __commonJS({
|
|
|
7052
7122
|
var META_SUPPORT_DATA = ["/properties"];
|
|
7053
7123
|
var META_SCHEMA_ID = "http://json-schema.org/draft-07/schema";
|
|
7054
7124
|
var Ajv = class extends core_1.default {
|
|
7125
|
+
static {
|
|
7126
|
+
__name(this, "Ajv");
|
|
7127
|
+
}
|
|
7055
7128
|
_addVocabularies() {
|
|
7056
7129
|
super._addVocabularies();
|
|
7057
7130
|
draft7_1.default.forEach((v) => this.addVocabulary(v));
|
|
@@ -7070,7 +7143,6 @@ var require_ajv = __commonJS({
|
|
|
7070
7143
|
return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);
|
|
7071
7144
|
}
|
|
7072
7145
|
};
|
|
7073
|
-
__name(Ajv, "Ajv");
|
|
7074
7146
|
module.exports = exports = Ajv;
|
|
7075
7147
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7076
7148
|
exports.default = Ajv;
|
|
@@ -7653,14 +7725,17 @@ var require_schema = __commonJS({
|
|
|
7653
7725
|
// src/Errors/AppError.js
|
|
7654
7726
|
var require_AppError = __commonJS({
|
|
7655
7727
|
"src/Errors/AppError.js"(exports, module) {
|
|
7656
|
-
module.exports =
|
|
7728
|
+
module.exports = class AppError extends Error {
|
|
7729
|
+
static {
|
|
7730
|
+
__name(this, "AppError");
|
|
7731
|
+
}
|
|
7657
7732
|
constructor(message = "Internal Server Error", options) {
|
|
7658
7733
|
super(message, options);
|
|
7659
7734
|
this.type = this.constructor.name;
|
|
7660
7735
|
this.statusCode = 500;
|
|
7661
7736
|
Object.setPrototypeOf(this, AppError.prototype);
|
|
7662
7737
|
}
|
|
7663
|
-
}
|
|
7738
|
+
};
|
|
7664
7739
|
}
|
|
7665
7740
|
});
|
|
7666
7741
|
|
|
@@ -7668,13 +7743,16 @@ var require_AppError = __commonJS({
|
|
|
7668
7743
|
var require_AuthenticationError = __commonJS({
|
|
7669
7744
|
"src/Errors/AuthenticationError.js"(exports, module) {
|
|
7670
7745
|
var AppError = require_AppError();
|
|
7671
|
-
module.exports =
|
|
7746
|
+
module.exports = class AuthenticationError extends AppError {
|
|
7747
|
+
static {
|
|
7748
|
+
__name(this, "AuthenticationError");
|
|
7749
|
+
}
|
|
7672
7750
|
constructor(message = "Authentication Error", options = {}) {
|
|
7673
7751
|
super(message, options);
|
|
7674
7752
|
this.statusCode = 401;
|
|
7675
7753
|
Object.setPrototypeOf(this, AuthenticationError.prototype);
|
|
7676
7754
|
}
|
|
7677
|
-
}
|
|
7755
|
+
};
|
|
7678
7756
|
}
|
|
7679
7757
|
});
|
|
7680
7758
|
|
|
@@ -7682,13 +7760,16 @@ var require_AuthenticationError = __commonJS({
|
|
|
7682
7760
|
var require_AuthorizationError = __commonJS({
|
|
7683
7761
|
"src/Errors/AuthorizationError.js"(exports, module) {
|
|
7684
7762
|
var AppError = require_AppError();
|
|
7685
|
-
module.exports =
|
|
7763
|
+
module.exports = class AuthorizationError extends AppError {
|
|
7764
|
+
static {
|
|
7765
|
+
__name(this, "AuthorizationError");
|
|
7766
|
+
}
|
|
7686
7767
|
constructor(message = "Authorization Error", options = {}) {
|
|
7687
7768
|
super(message, options);
|
|
7688
7769
|
this.statusCode = 403;
|
|
7689
7770
|
Object.setPrototypeOf(this, AuthorizationError.prototype);
|
|
7690
7771
|
}
|
|
7691
|
-
}
|
|
7772
|
+
};
|
|
7692
7773
|
}
|
|
7693
7774
|
});
|
|
7694
7775
|
|
|
@@ -7696,13 +7777,16 @@ var require_AuthorizationError = __commonJS({
|
|
|
7696
7777
|
var require_DeviceCommError = __commonJS({
|
|
7697
7778
|
"src/Errors/DeviceCommError.js"(exports, module) {
|
|
7698
7779
|
var AppError = require_AppError();
|
|
7699
|
-
module.exports =
|
|
7780
|
+
module.exports = class DeviceCommError extends AppError {
|
|
7781
|
+
static {
|
|
7782
|
+
__name(this, "DeviceCommError");
|
|
7783
|
+
}
|
|
7700
7784
|
constructor(message = "Device Communication Error", options = {}) {
|
|
7701
7785
|
super(message, options);
|
|
7702
7786
|
this.statusCode = 503;
|
|
7703
7787
|
Object.setPrototypeOf(this, DeviceCommError.prototype);
|
|
7704
7788
|
}
|
|
7705
|
-
}
|
|
7789
|
+
};
|
|
7706
7790
|
}
|
|
7707
7791
|
});
|
|
7708
7792
|
|
|
@@ -7710,13 +7794,16 @@ var require_DeviceCommError = __commonJS({
|
|
|
7710
7794
|
var require_LoginError = __commonJS({
|
|
7711
7795
|
"src/Errors/LoginError.js"(exports, module) {
|
|
7712
7796
|
var AppError = require_AppError();
|
|
7713
|
-
module.exports =
|
|
7797
|
+
module.exports = class LoginError extends AppError {
|
|
7798
|
+
static {
|
|
7799
|
+
__name(this, "LoginError");
|
|
7800
|
+
}
|
|
7714
7801
|
constructor(message = "Invalid Login information provided", options = {}) {
|
|
7715
7802
|
super(message, options);
|
|
7716
7803
|
this.statusCode = 401;
|
|
7717
7804
|
Object.setPrototypeOf(this, LoginError.prototype);
|
|
7718
7805
|
}
|
|
7719
|
-
}
|
|
7806
|
+
};
|
|
7720
7807
|
}
|
|
7721
7808
|
});
|
|
7722
7809
|
|
|
@@ -7724,13 +7811,16 @@ var require_LoginError = __commonJS({
|
|
|
7724
7811
|
var require_NotFoundError = __commonJS({
|
|
7725
7812
|
"src/Errors/NotFoundError.js"(exports, module) {
|
|
7726
7813
|
var AppError = require_AppError();
|
|
7727
|
-
module.exports =
|
|
7814
|
+
module.exports = class NotFoundError extends AppError {
|
|
7815
|
+
static {
|
|
7816
|
+
__name(this, "NotFoundError");
|
|
7817
|
+
}
|
|
7728
7818
|
constructor(message = "Resource Not Found", options = {}) {
|
|
7729
7819
|
super(message, options);
|
|
7730
7820
|
this.statusCode = 404;
|
|
7731
7821
|
Object.setPrototypeOf(this, NotFoundError.prototype);
|
|
7732
7822
|
}
|
|
7733
|
-
}
|
|
7823
|
+
};
|
|
7734
7824
|
}
|
|
7735
7825
|
});
|
|
7736
7826
|
|
|
@@ -7738,13 +7828,16 @@ var require_NotFoundError = __commonJS({
|
|
|
7738
7828
|
var require_RequestError = __commonJS({
|
|
7739
7829
|
"src/Errors/RequestError.js"(exports, module) {
|
|
7740
7830
|
var AppError = require_AppError();
|
|
7741
|
-
module.exports =
|
|
7831
|
+
module.exports = class RequestError extends AppError {
|
|
7832
|
+
static {
|
|
7833
|
+
__name(this, "RequestError");
|
|
7834
|
+
}
|
|
7742
7835
|
constructor(message = "Bad Request", options = {}) {
|
|
7743
7836
|
super(message, options);
|
|
7744
7837
|
this.statusCode = 400;
|
|
7745
7838
|
Object.setPrototypeOf(this, RequestError.prototype);
|
|
7746
7839
|
}
|
|
7747
|
-
}
|
|
7840
|
+
};
|
|
7748
7841
|
}
|
|
7749
7842
|
});
|
|
7750
7843
|
|
|
@@ -7752,13 +7845,16 @@ var require_RequestError = __commonJS({
|
|
|
7752
7845
|
var require_SystemCommError = __commonJS({
|
|
7753
7846
|
"src/Errors/SystemCommError.js"(exports, module) {
|
|
7754
7847
|
var AppError = require_AppError();
|
|
7755
|
-
module.exports =
|
|
7848
|
+
module.exports = class SystemCommError extends AppError {
|
|
7849
|
+
static {
|
|
7850
|
+
__name(this, "SystemCommError");
|
|
7851
|
+
}
|
|
7756
7852
|
constructor(message = "System Communication Error", options = {}) {
|
|
7757
7853
|
super(message, options);
|
|
7758
7854
|
this.statusCode = 503;
|
|
7759
7855
|
Object.setPrototypeOf(this, SystemCommError.prototype);
|
|
7760
7856
|
}
|
|
7761
|
-
}
|
|
7857
|
+
};
|
|
7762
7858
|
}
|
|
7763
7859
|
});
|
|
7764
7860
|
|
|
@@ -7766,13 +7862,16 @@ var require_SystemCommError = __commonJS({
|
|
|
7766
7862
|
var require_TokenExpiredError = __commonJS({
|
|
7767
7863
|
"src/Errors/TokenExpiredError.js"(exports, module) {
|
|
7768
7864
|
var AppError = require_AppError();
|
|
7769
|
-
module.exports =
|
|
7865
|
+
module.exports = class TokenExpiredError extends AppError {
|
|
7866
|
+
static {
|
|
7867
|
+
__name(this, "TokenExpiredError");
|
|
7868
|
+
}
|
|
7770
7869
|
constructor(message = "Token Expired", options = {}) {
|
|
7771
7870
|
super(message, options);
|
|
7772
7871
|
this.statusCode = 401;
|
|
7773
7872
|
Object.setPrototypeOf(this, TokenExpiredError.prototype);
|
|
7774
7873
|
}
|
|
7775
|
-
}
|
|
7874
|
+
};
|
|
7776
7875
|
}
|
|
7777
7876
|
});
|
|
7778
7877
|
|
|
@@ -7780,13 +7879,16 @@ var require_TokenExpiredError = __commonJS({
|
|
|
7780
7879
|
var require_UnprocessableRequestError = __commonJS({
|
|
7781
7880
|
"src/Errors/UnprocessableRequestError.js"(exports, module) {
|
|
7782
7881
|
var AppError = require_AppError();
|
|
7783
|
-
module.exports =
|
|
7882
|
+
module.exports = class UnprocessableRequestError extends AppError {
|
|
7883
|
+
static {
|
|
7884
|
+
__name(this, "UnprocessableRequestError");
|
|
7885
|
+
}
|
|
7784
7886
|
constructor(message = "Unprocessable Request Error", options = {}) {
|
|
7785
7887
|
super(message, options);
|
|
7786
7888
|
this.statusCode = 422;
|
|
7787
7889
|
Object.setPrototypeOf(this, UnprocessableRequestError.prototype);
|
|
7788
7890
|
}
|
|
7789
|
-
}
|
|
7891
|
+
};
|
|
7790
7892
|
}
|
|
7791
7893
|
});
|
|
7792
7894
|
|
|
@@ -7794,13 +7896,16 @@ var require_UnprocessableRequestError = __commonJS({
|
|
|
7794
7896
|
var require_ValidationError = __commonJS({
|
|
7795
7897
|
"src/Errors/ValidationError.js"(exports, module) {
|
|
7796
7898
|
var AppError = require_AppError();
|
|
7797
|
-
module.exports =
|
|
7899
|
+
module.exports = class ValidationError extends AppError {
|
|
7900
|
+
static {
|
|
7901
|
+
__name(this, "ValidationError");
|
|
7902
|
+
}
|
|
7798
7903
|
constructor(message = "Validation Error", options = {}) {
|
|
7799
7904
|
super(message, options);
|
|
7800
7905
|
this.statusCode = 400;
|
|
7801
7906
|
Object.setPrototypeOf(this, ValidationError.prototype);
|
|
7802
7907
|
}
|
|
7803
|
-
}
|
|
7908
|
+
};
|
|
7804
7909
|
}
|
|
7805
7910
|
});
|
|
7806
7911
|
|