@aventusjs/cli 0.0.13 → 0.0.15
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/lib/Aventus@I18n.package.avt +72 -0
- package/lib/Aventus@Main.package.avt +2318 -1926
- package/lib/Aventus@Php.package.avt +455 -0
- package/lib/Aventus@Sharp.package.avt +805 -644
- package/lib/Aventus@UI.package.avt +2587 -296
- package/lib/Avonis.package.avt +58 -0
- package/lib/aventusjs-rules.md +750 -0
- package/lib/emmet/aventus.json +7 -0
- package/lib/templateScript/AventusTemplate.d.ts +127 -0
- package/lib/templateScript/AventusTemplate.ts +461 -0
- package/out/RealInteraction.js +4 -1
- package/out/RealServer.js +497 -341
- package/out/cli.js +1 -1
- package/package.json +4 -3
- package/tsconfig.tsbuildinfo +1 -0
- package/lib/bin/CSharpToTypescript/AventusSharp.dll +0 -0
- package/lib/bin/CSharpToTypescript/AventusSharp.pdb +0 -0
- package/lib/bin/CSharpToTypescript/AventusSharp.xml +0 -2151
- package/lib/bin/CSharpToTypescript/BouncyCastle.Cryptography.dll +0 -0
- package/lib/bin/CSharpToTypescript/CSharpToTypescript.deps.json +0 -885
- package/lib/bin/CSharpToTypescript/CSharpToTypescript.dll +0 -0
- package/lib/bin/CSharpToTypescript/CSharpToTypescript.dll.config +0 -707
- package/lib/bin/CSharpToTypescript/CSharpToTypescript.exe +0 -0
- package/lib/bin/CSharpToTypescript/CSharpToTypescript.pdb +0 -0
- package/lib/bin/CSharpToTypescript/CSharpToTypescript.runtimeconfig.json +0 -19
- package/lib/bin/CSharpToTypescript/Google.Protobuf.dll +0 -0
- package/lib/bin/CSharpToTypescript/HttpMultipartParser.dll +0 -0
- package/lib/bin/CSharpToTypescript/Humanizer.dll +0 -0
- package/lib/bin/CSharpToTypescript/K4os.Compression.LZ4.Streams.dll +0 -0
- package/lib/bin/CSharpToTypescript/K4os.Compression.LZ4.dll +0 -0
- package/lib/bin/CSharpToTypescript/K4os.Hash.xxHash.dll +0 -0
- package/lib/bin/CSharpToTypescript/Microsoft.Bcl.AsyncInterfaces.dll +0 -0
- package/lib/bin/CSharpToTypescript/Microsoft.Build.Locator.dll +0 -0
- package/lib/bin/CSharpToTypescript/Microsoft.CodeAnalysis.CSharp.Workspaces.dll +0 -0
- package/lib/bin/CSharpToTypescript/Microsoft.CodeAnalysis.CSharp.dll +0 -0
- package/lib/bin/CSharpToTypescript/Microsoft.CodeAnalysis.Workspaces.MSBuild.dll +0 -0
- package/lib/bin/CSharpToTypescript/Microsoft.CodeAnalysis.Workspaces.dll +0 -0
- package/lib/bin/CSharpToTypescript/Microsoft.CodeAnalysis.dll +0 -0
- package/lib/bin/CSharpToTypescript/Microsoft.IO.RecyclableMemoryStream.dll +0 -0
- package/lib/bin/CSharpToTypescript/Microsoft.Win32.SystemEvents.dll +0 -0
- package/lib/bin/CSharpToTypescript/MySql.Data.dll +0 -0
- package/lib/bin/CSharpToTypescript/Newtonsoft.Json.dll +0 -0
- package/lib/bin/CSharpToTypescript/Scriban.dll +0 -0
- package/lib/bin/CSharpToTypescript/System.Collections.Immutable.dll +0 -0
- package/lib/bin/CSharpToTypescript/System.Composition.AttributedModel.dll +0 -0
- package/lib/bin/CSharpToTypescript/System.Composition.Convention.dll +0 -0
- package/lib/bin/CSharpToTypescript/System.Composition.Hosting.dll +0 -0
- package/lib/bin/CSharpToTypescript/System.Composition.Runtime.dll +0 -0
- package/lib/bin/CSharpToTypescript/System.Composition.TypedParts.dll +0 -0
- package/lib/bin/CSharpToTypescript/System.Configuration.ConfigurationManager.dll +0 -0
- package/lib/bin/CSharpToTypescript/System.Drawing.Common.dll +0 -0
- package/lib/bin/CSharpToTypescript/System.IO.Pipelines.dll +0 -0
- package/lib/bin/CSharpToTypescript/System.Reflection.Metadata.dll +0 -0
- package/lib/bin/CSharpToTypescript/System.Security.Cryptography.ProtectedData.dll +0 -0
- package/lib/bin/CSharpToTypescript/System.Security.Permissions.dll +0 -0
- package/lib/bin/CSharpToTypescript/System.Text.Encoding.CodePages.dll +0 -0
- package/lib/bin/CSharpToTypescript/System.Text.Encodings.Web.dll +0 -0
- package/lib/bin/CSharpToTypescript/System.Text.Json.dll +0 -0
- package/lib/bin/CSharpToTypescript/System.Threading.Channels.dll +0 -0
- package/lib/bin/CSharpToTypescript/System.Windows.Extensions.dll +0 -0
- package/lib/bin/CSharpToTypescript/ZstdSharp.dll +0 -0
- package/lib/bin/CSharpToTypescript/package.json +0 -6
- package/lib/bin/CSharpToTypescript/runtimes/browser/lib/net6.0/System.Text.Encodings.Web.dll +0 -0
- package/lib/bin/CSharpToTypescript/runtimes/win/lib/net6.0/Microsoft.Win32.SystemEvents.dll +0 -0
- package/lib/bin/CSharpToTypescript/runtimes/win/lib/net6.0/System.Drawing.Common.dll +0 -0
- package/lib/bin/CSharpToTypescript/runtimes/win/lib/net6.0/System.Security.Cryptography.ProtectedData.dll +0 -0
- package/lib/bin/CSharpToTypescript/runtimes/win/lib/net6.0/System.Text.Encoding.CodePages.dll +0 -0
- package/lib/bin/CSharpToTypescript/runtimes/win/lib/net6.0/System.Windows.Extensions.dll +0 -0
- package/lib/bin/CSharpToTypescript/runtimes/win/lib/net7.0/System.Security.Cryptography.ProtectedData.dll +0 -0
- package/lib/bin/CSharpToTypescript/runtimes/win/lib/net7.0/System.Windows.Extensions.dll +0 -0
- package/lib/bin/CSharpToTypescript/runtimes/win/lib/net8.0/Microsoft.Win32.SystemEvents.dll +0 -0
- package/lib/bin/CSharpToTypescript/runtimes/win-x64/native/comerr64.dll +0 -0
- package/lib/bin/CSharpToTypescript/runtimes/win-x64/native/gssapi64.dll +0 -0
- package/lib/bin/CSharpToTypescript/runtimes/win-x64/native/k5sprt64.dll +0 -0
- package/lib/bin/CSharpToTypescript/runtimes/win-x64/native/krb5_64.dll +0 -0
- package/lib/bin/CSharpToTypescript/runtimes/win-x64/native/krbcc64.dll +0 -0
|
@@ -1,793 +1,954 @@
|
|
|
1
|
-
// AventusSharp@Main:1.0.
|
|
1
|
+
// AventusSharp@Main:1.0.7
|
|
2
2
|
// npm:@aventusjs/sharp
|
|
3
3
|
//#region js def //
|
|
4
4
|
declare global {
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
namespace AventusSharp{
|
|
7
7
|
namespace WebSocket {
|
|
8
|
-
interface WsRouterOptions {
|
|
9
|
-
url: string;
|
|
10
|
-
}
|
|
8
|
+
interface WsRouterOptions {
|
|
9
|
+
url: string;
|
|
10
|
+
}
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
namespace RAM {
|
|
14
|
-
type RamWebSocketListenOnStart = {
|
|
15
|
-
GetAll: boolean;
|
|
16
|
-
GetById: boolean;
|
|
17
|
-
Create: boolean;
|
|
18
|
-
CreateMany: boolean;
|
|
19
|
-
Update: boolean;
|
|
20
|
-
UpdateMany: boolean;
|
|
21
|
-
Delete: boolean;
|
|
22
|
-
DeleteMany: boolean;
|
|
23
|
-
};
|
|
14
|
+
type RamWebSocketListenOnStart = {
|
|
15
|
+
GetAll: boolean;
|
|
16
|
+
GetById: boolean;
|
|
17
|
+
Create: boolean;
|
|
18
|
+
CreateMany: boolean;
|
|
19
|
+
Update: boolean;
|
|
20
|
+
UpdateMany: boolean;
|
|
21
|
+
Delete: boolean;
|
|
22
|
+
DeleteMany: boolean;
|
|
23
|
+
};
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
namespace
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
* @inerhit
|
|
31
|
-
*/
|
|
32
|
-
toJSON(): any;
|
|
33
|
-
}
|
|
26
|
+
namespace WebSocket {
|
|
27
|
+
interface WsRouteSendOptions {
|
|
28
|
+
uid?: string;
|
|
29
|
+
timeout?: number;
|
|
34
30
|
}
|
|
35
|
-
|
|
36
|
-
namespace Data {
|
|
37
|
-
abstract class StorableTimestamp extends Data.Storable implements Aventus.IData {
|
|
38
|
-
CreatedDate: Date;
|
|
39
|
-
UpdatedDate: Date;
|
|
40
|
-
}
|
|
41
31
|
}
|
|
42
32
|
|
|
43
33
|
namespace WebSocket {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
CantGetValueFromBody = 4,
|
|
50
|
-
NoConnection = 5,
|
|
51
|
-
NoEndPoint = 6,
|
|
52
|
-
NoPath = 7
|
|
53
|
-
}
|
|
34
|
+
interface SocketMessage {
|
|
35
|
+
channel: string;
|
|
36
|
+
data?: any;
|
|
37
|
+
uid?: string;
|
|
38
|
+
}
|
|
54
39
|
}
|
|
55
40
|
|
|
56
41
|
namespace WebSocket {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
timeout
|
|
60
|
-
|
|
42
|
+
enum SocketErrorCode {
|
|
43
|
+
socketClosed = 0,
|
|
44
|
+
timeout = 1,
|
|
45
|
+
differentChannel = 2,
|
|
46
|
+
unknow = 3
|
|
47
|
+
}
|
|
61
48
|
}
|
|
62
49
|
|
|
63
50
|
namespace WebSocket {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
51
|
+
class Socket {
|
|
52
|
+
static Debug: boolean;
|
|
53
|
+
private static connections;
|
|
54
|
+
static getInstance(url: string, el: any): AventusSharp.WebSocket.Socket;
|
|
55
|
+
private socket;
|
|
56
|
+
private url;
|
|
57
|
+
private elements;
|
|
58
|
+
private reopenInterval;
|
|
59
|
+
onOpen: Aventus.Callback<(ev: Event) => any>;
|
|
60
|
+
onClose: Aventus.Callback<(ev: Event) => any>;
|
|
61
|
+
onError: Aventus.Callback<(ev: Event) => any>;
|
|
62
|
+
onMessage: Aventus.Callback<(ev: MessageEvent<any>) => any>;
|
|
63
|
+
get readyState(): number;
|
|
64
|
+
protected constructor(url: string, el: any);
|
|
65
|
+
protected registerEl(el: any): void;
|
|
66
|
+
private createWebSocket;
|
|
67
|
+
protected removeSocket(): void;
|
|
68
|
+
protected reopen(): void;
|
|
69
|
+
close(el: any, code?: number | undefined, reason?: string | undefined): void;
|
|
70
|
+
send(data: BufferSource | Blob | string): void;
|
|
71
|
+
/**
|
|
72
|
+
* Check if socket is ready
|
|
73
|
+
*/
|
|
74
|
+
isReady(): boolean;
|
|
75
|
+
}
|
|
69
76
|
}
|
|
70
77
|
|
|
71
78
|
namespace WebSocket {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
79
|
+
interface SocketSendMessageOptions {
|
|
80
|
+
channel: string;
|
|
81
|
+
body?: {
|
|
82
|
+
[key: string | number]: any;
|
|
83
|
+
};
|
|
84
|
+
timeout?: number;
|
|
85
|
+
uid?: string;
|
|
86
|
+
}
|
|
78
87
|
}
|
|
79
88
|
|
|
80
89
|
namespace WebSocket {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
private socket;
|
|
86
|
-
private url;
|
|
87
|
-
private elements;
|
|
88
|
-
private reopenInterval;
|
|
89
|
-
onOpen: Aventus.Callback<(ev: Event) => any>;
|
|
90
|
-
onClose: Aventus.Callback<(ev: Event) => any>;
|
|
91
|
-
onError: Aventus.Callback<(ev: Event) => any>;
|
|
92
|
-
onMessage: Aventus.Callback<(ev: MessageEvent<any>) => any>;
|
|
93
|
-
get readyState(): number;
|
|
94
|
-
protected constructor(url: string, el: any);
|
|
95
|
-
protected registerEl(el: any): void;
|
|
96
|
-
private createWebSocket;
|
|
97
|
-
protected removeSocket(): void;
|
|
98
|
-
protected reopen(): void;
|
|
99
|
-
close(el: any, code?: number | undefined, reason?: string | undefined): void;
|
|
100
|
-
send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void;
|
|
101
|
-
/**
|
|
102
|
-
* Check if socket is ready
|
|
103
|
-
*/
|
|
104
|
-
isReady(): boolean;
|
|
105
|
-
}
|
|
90
|
+
interface SocketRoute<T = any> {
|
|
91
|
+
channel: string;
|
|
92
|
+
callback: (data: T, params: Aventus.UriParamsValue, uid?: string) => void;
|
|
93
|
+
}
|
|
106
94
|
}
|
|
107
95
|
|
|
108
|
-
namespace
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
96
|
+
namespace Data {
|
|
97
|
+
abstract class Storable extends Aventus.Data implements Aventus.IData {
|
|
98
|
+
Id: number;
|
|
99
|
+
/**
|
|
100
|
+
* @inerhit
|
|
101
|
+
*/
|
|
102
|
+
toJSON(): any;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
namespace Data {
|
|
107
|
+
abstract class StorableTimestamp extends AventusSharp.Data.Storable implements Aventus.IData {
|
|
108
|
+
CreatedDate: Date;
|
|
109
|
+
UpdatedDate: Date;
|
|
110
|
+
}
|
|
117
111
|
}
|
|
118
112
|
|
|
119
113
|
namespace WebSocket {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
114
|
+
enum WsErrorCode {
|
|
115
|
+
UnknowError = 0,
|
|
116
|
+
CantDefineAssembly = 1,
|
|
117
|
+
ConfigError = 2,
|
|
118
|
+
MultipleMainEndpoint = 3,
|
|
119
|
+
CantGetValueFromBody = 4,
|
|
120
|
+
NoConnection = 5,
|
|
121
|
+
NoEndPoint = 6,
|
|
122
|
+
NoPath = 7
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
namespace SSE {
|
|
127
|
+
enum SSEErrorCode {
|
|
128
|
+
UnknowError = 0,
|
|
129
|
+
CantDefineAssembly = 1,
|
|
130
|
+
ConfigError = 2,
|
|
131
|
+
MultipleMainEndpoint = 3,
|
|
132
|
+
CantGetValueFromBody = 4,
|
|
133
|
+
NoEndPoint = 5
|
|
134
|
+
}
|
|
124
135
|
}
|
|
125
136
|
|
|
126
137
|
namespace Routes {
|
|
127
|
-
enum RouteErrorCode {
|
|
128
|
-
UnknowError = 0,
|
|
129
|
-
FormContentTypeUnknown = 1,
|
|
130
|
-
CantGetValueFromBody = 2,
|
|
131
|
-
CantMoveFile = 3,
|
|
132
|
-
CantCreateFolders = 4,
|
|
133
|
-
RouteAlreadyExist = 5
|
|
134
|
-
}
|
|
138
|
+
enum RouteErrorCode {
|
|
139
|
+
UnknowError = 0,
|
|
140
|
+
FormContentTypeUnknown = 1,
|
|
141
|
+
CantGetValueFromBody = 2,
|
|
142
|
+
CantMoveFile = 3,
|
|
143
|
+
CantCreateFolders = 4,
|
|
144
|
+
RouteAlreadyExist = 5
|
|
145
|
+
}
|
|
135
146
|
}
|
|
136
147
|
|
|
137
148
|
namespace Data {
|
|
138
|
-
interface IStorableTimestamp extends Aventus.IData {
|
|
139
|
-
CreatedDate: Date;
|
|
140
|
-
UpdatedDate: Date;
|
|
141
|
-
}
|
|
149
|
+
interface IStorableTimestamp extends Aventus.IData {
|
|
150
|
+
CreatedDate: Date;
|
|
151
|
+
UpdatedDate: Date;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
namespace Data {
|
|
156
|
+
enum DataErrorCode {
|
|
157
|
+
DefaultDMGenericType = 0,
|
|
158
|
+
DMOnlyForceInherit = 1,
|
|
159
|
+
TypeNotStorable = 2,
|
|
160
|
+
TypeTooMuchStorable = 3,
|
|
161
|
+
GenericNotAbstract = 4,
|
|
162
|
+
ParentNotAbstract = 5,
|
|
163
|
+
InfiniteLoop = 6,
|
|
164
|
+
InterfaceNotUnique = 7,
|
|
165
|
+
SelfReferecingDependance = 8,
|
|
166
|
+
DMNotExist = 9,
|
|
167
|
+
DMAlreadyExist = 10,
|
|
168
|
+
MethodNotFound = 11,
|
|
169
|
+
StorageDisconnected = 12,
|
|
170
|
+
StorageNotFound = 13,
|
|
171
|
+
NoConnectionInsideStorage = 14,
|
|
172
|
+
TypeNotExistInsideStorage = 15,
|
|
173
|
+
UnknowError = 16,
|
|
174
|
+
NoItemProvided = 17,
|
|
175
|
+
NoTransactionInProgress = 18,
|
|
176
|
+
WrongType = 19,
|
|
177
|
+
NoTypeIdentifierFoundInsideQuery = 20,
|
|
178
|
+
ItemNoExistInsideStorage = 21,
|
|
179
|
+
ItemAlreadyExist = 22,
|
|
180
|
+
ValidationError = 23,
|
|
181
|
+
GetAllNotAllowed = 24,
|
|
182
|
+
GetByIdNotAllowed = 25,
|
|
183
|
+
GetByIdsNotAllowed = 26,
|
|
184
|
+
WhereNotAllowed = 27,
|
|
185
|
+
CreateNotAllowed = 28,
|
|
186
|
+
UpdateNotAllowed = 29,
|
|
187
|
+
DeleteNotAllowed = 30,
|
|
188
|
+
NumberOfItemsNotMatching = 31,
|
|
189
|
+
FieldTypeNotFound = 32,
|
|
190
|
+
MemberNotFound = 33,
|
|
191
|
+
TooMuchMemberFound = 34,
|
|
192
|
+
TypeNotFound = 35,
|
|
193
|
+
ReverseLinkNotExist = 36,
|
|
194
|
+
ReverseLinkExist = 37,
|
|
195
|
+
ErrorCreatingReverseQuery = 38,
|
|
196
|
+
LinkNotSet = 39,
|
|
197
|
+
MultipleProvidersNotSet = 40,
|
|
198
|
+
FileNotFound = 41,
|
|
199
|
+
PyramidNotFound = 42,
|
|
200
|
+
IsReadOnly = 43,
|
|
201
|
+
ReverseLinkNotPrepared = 44,
|
|
202
|
+
ExternalStorageNotPrepared = 45
|
|
203
|
+
}
|
|
142
204
|
}
|
|
143
205
|
|
|
144
206
|
namespace Tools {
|
|
145
|
-
interface IWithError<T extends Aventus.GenericError> {
|
|
146
|
-
|
|
207
|
+
interface IWithError<T extends Aventus.GenericError> {
|
|
208
|
+
success: boolean;
|
|
209
|
+
}
|
|
147
210
|
}
|
|
148
211
|
|
|
149
212
|
namespace Tools {
|
|
150
|
-
interface IResultWithError<T extends Aventus.GenericError> extends Tools.IWithError<T> {
|
|
151
|
-
}
|
|
213
|
+
interface IResultWithError<T extends Aventus.GenericError> extends AventusSharp.Tools.IWithError<T> {
|
|
214
|
+
}
|
|
152
215
|
}
|
|
153
216
|
|
|
154
|
-
namespace Data {
|
|
155
|
-
enum
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
ParentNotAbstract = 5,
|
|
162
|
-
InfiniteLoop = 6,
|
|
163
|
-
InterfaceNotUnique = 7,
|
|
164
|
-
SelfReferecingDependance = 8,
|
|
165
|
-
DMNotExist = 9,
|
|
166
|
-
DMAlreadyExist = 10,
|
|
167
|
-
MethodNotFound = 11,
|
|
168
|
-
StorageDisconnected = 12,
|
|
169
|
-
StorageNotFound = 13,
|
|
170
|
-
NoConnectionInsideStorage = 14,
|
|
171
|
-
TypeNotExistInsideStorage = 15,
|
|
172
|
-
UnknowError = 16,
|
|
173
|
-
NoItemProvided = 17,
|
|
174
|
-
NoTransactionInProgress = 18,
|
|
175
|
-
WrongType = 19,
|
|
176
|
-
NoTypeIdentifierFoundInsideQuery = 20,
|
|
177
|
-
ItemNoExistInsideStorage = 21,
|
|
178
|
-
ItemAlreadyExist = 22,
|
|
179
|
-
ValidationError = 23,
|
|
180
|
-
GetAllNotAllowed = 24,
|
|
181
|
-
GetByIdNotAllowed = 25,
|
|
182
|
-
GetByIdsNotAllowed = 26,
|
|
183
|
-
WhereNotAllowed = 27,
|
|
184
|
-
CreateNotAllowed = 28,
|
|
185
|
-
UpdateNotAllowed = 29,
|
|
186
|
-
DeleteNotAllowed = 30,
|
|
187
|
-
NumberOfItemsNotMatching = 31,
|
|
188
|
-
FieldTypeNotFound = 32,
|
|
189
|
-
MemberNotFound = 33,
|
|
190
|
-
TooMuchMemberFound = 34,
|
|
191
|
-
TypeNotFound = 35,
|
|
192
|
-
ReverseLinkNotExist = 36,
|
|
193
|
-
ErrorCreatingReverseQuery = 37,
|
|
194
|
-
LinkNotSet = 38
|
|
195
|
-
}
|
|
217
|
+
namespace Data.CustomTableMembers {
|
|
218
|
+
enum ImageFileErrorCode {
|
|
219
|
+
UnknowError = 0,
|
|
220
|
+
NotValidImage = 1,
|
|
221
|
+
FileNotSvg = 2,
|
|
222
|
+
NoSize = 3
|
|
223
|
+
}
|
|
196
224
|
}
|
|
197
225
|
|
|
198
226
|
namespace Data {
|
|
199
|
-
abstract class SharpClass {
|
|
200
|
-
/**
|
|
201
|
-
* The current namespace
|
|
202
|
-
*/
|
|
203
|
-
get namespace(): string;
|
|
204
|
-
/**
|
|
205
|
-
* Get the unique type for the data. Define it as the namespace + class name
|
|
206
|
-
*/
|
|
207
|
-
get $type(): string;
|
|
208
|
-
/**
|
|
209
|
-
* Get the name of the class
|
|
210
|
-
*/
|
|
211
|
-
get className(): string;
|
|
212
|
-
/**
|
|
213
|
-
* Clone the object by transforming a parsed JSON string back into the original type
|
|
214
|
-
*/
|
|
215
|
-
clone(): this;
|
|
216
|
-
/**
|
|
217
|
-
* Get a JSON for the current object
|
|
218
|
-
*/
|
|
219
|
-
toJSON(): any;
|
|
220
|
-
}
|
|
227
|
+
abstract class SharpClass {
|
|
228
|
+
/**
|
|
229
|
+
* The current namespace
|
|
230
|
+
*/
|
|
231
|
+
get namespace(): string;
|
|
232
|
+
/**
|
|
233
|
+
* Get the unique type for the data. Define it as the namespace + class name
|
|
234
|
+
*/
|
|
235
|
+
get $type(): string;
|
|
236
|
+
/**
|
|
237
|
+
* Get the name of the class
|
|
238
|
+
*/
|
|
239
|
+
get className(): string;
|
|
240
|
+
/**
|
|
241
|
+
* Clone the object by transforming a parsed JSON string back into the original type
|
|
242
|
+
*/
|
|
243
|
+
clone(): this;
|
|
244
|
+
/**
|
|
245
|
+
* Get a JSON for the current object
|
|
246
|
+
*/
|
|
247
|
+
toJSON(): any;
|
|
248
|
+
}
|
|
221
249
|
}
|
|
222
250
|
|
|
223
|
-
namespace
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
251
|
+
namespace Routes.Request {
|
|
252
|
+
abstract class Request extends AventusSharp.Data.SharpClass {
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
namespace Routes.Response {
|
|
257
|
+
abstract class Resource extends AventusSharp.Data.SharpClass {
|
|
258
|
+
toRequest<T extends AventusSharp.Routes.Request.Request>(request: new () => T): T;
|
|
259
|
+
}
|
|
229
260
|
}
|
|
230
261
|
|
|
231
262
|
namespace Data {
|
|
232
263
|
@Convertible()
|
|
233
|
-
class
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
264
|
+
class FieldErrorInfo extends AventusSharp.Data.SharpClass {
|
|
265
|
+
/** Fullname of the class */
|
|
266
|
+
static get Fullname(): string;
|
|
267
|
+
Name: string;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
namespace Data.CustomTableMembers {
|
|
272
|
+
abstract class AventusFile<T> {
|
|
273
|
+
Uri: string;
|
|
274
|
+
Upload?: File;
|
|
275
|
+
/**
|
|
276
|
+
* Get the unique type for the data. Define it as the namespace + class name
|
|
277
|
+
*/
|
|
278
|
+
get $type(): string;
|
|
279
|
+
/**
|
|
280
|
+
* @inerhit
|
|
281
|
+
*/
|
|
282
|
+
toJSON(): any;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
namespace Data.CustomTableMembers {
|
|
287
|
+
abstract class AventusImage<T extends Aventus.IData> extends AventusSharp.Data.CustomTableMembers.AventusFile<T> {
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
type RealDate = Date;
|
|
249
292
|
|
|
250
293
|
namespace Data {
|
|
251
294
|
@Convertible()
|
|
252
|
-
class Datetime extends Data.SharpClass {
|
|
253
|
-
static get Fullname(): string;
|
|
254
|
-
DateTime: RealDate;
|
|
255
|
-
}
|
|
295
|
+
class Datetime extends AventusSharp.Data.SharpClass {
|
|
296
|
+
static get Fullname(): string;
|
|
297
|
+
DateTime: AventusSharp.RealDate;
|
|
298
|
+
}
|
|
256
299
|
}
|
|
257
300
|
|
|
258
301
|
namespace Data {
|
|
259
302
|
@Convertible()
|
|
260
|
-
class Date extends Data.SharpClass {
|
|
261
|
-
static get Fullname(): string;
|
|
262
|
-
DateTime: RealDate;
|
|
263
|
-
}
|
|
303
|
+
class Date extends AventusSharp.Data.SharpClass {
|
|
304
|
+
static get Fullname(): string;
|
|
305
|
+
DateTime: AventusSharp.RealDate;
|
|
306
|
+
}
|
|
264
307
|
}
|
|
265
308
|
|
|
266
|
-
namespace Data {
|
|
309
|
+
namespace Data.CustomTableMembers {
|
|
267
310
|
@Convertible()
|
|
268
|
-
class
|
|
269
|
-
|
|
270
|
-
|
|
311
|
+
class ImageFileError extends Aventus.GenericError<typeof AventusSharp.Data.CustomTableMembers.ImageFileErrorCode> {
|
|
312
|
+
/** Fullname of the class */
|
|
313
|
+
static get Fullname(): string;
|
|
314
|
+
}
|
|
271
315
|
}
|
|
272
316
|
|
|
273
317
|
namespace Tools {
|
|
274
318
|
@Convertible()
|
|
275
|
-
class VoidWithError<T extends Aventus.GenericError = Aventus.GenericError> extends Aventus.VoidWithError<T> implements Tools.IWithError<T>, Tools.IWithError<T> {
|
|
276
|
-
|
|
277
|
-
|
|
319
|
+
class VoidWithError<T extends Aventus.GenericError = Aventus.GenericError> extends Aventus.VoidWithError<T> implements AventusSharp.Tools.IWithError<T>, AventusSharp.Tools.IWithError<T> {
|
|
320
|
+
/** Fullname of the class */
|
|
321
|
+
static get Fullname(): string;
|
|
322
|
+
}
|
|
278
323
|
}
|
|
279
324
|
|
|
280
|
-
namespace Data {
|
|
325
|
+
namespace Data.CustomTableMembers {
|
|
281
326
|
@Convertible()
|
|
282
|
-
class
|
|
283
|
-
|
|
284
|
-
|
|
327
|
+
class VoidWithImageFileError extends AventusSharp.Tools.VoidWithError<AventusSharp.Data.CustomTableMembers.ImageFileError> {
|
|
328
|
+
/** Fullname of the class */
|
|
329
|
+
static get Fullname(): string;
|
|
330
|
+
}
|
|
285
331
|
}
|
|
286
332
|
|
|
287
333
|
namespace Tools {
|
|
288
334
|
@Convertible()
|
|
289
|
-
class ResultWithError<T, U extends Aventus.GenericError = Aventus.GenericError> extends Aventus.ResultWithError<T, U> implements Tools.IResultWithError<U>, Tools.IResultWithError<U> {
|
|
290
|
-
|
|
291
|
-
|
|
335
|
+
class ResultWithError<T, U extends Aventus.GenericError = Aventus.GenericError> extends Aventus.ResultWithError<T, U> implements AventusSharp.Tools.IResultWithError<U>, AventusSharp.Tools.IResultWithError<U> {
|
|
336
|
+
/** Fullname of the class */
|
|
337
|
+
static get Fullname(): string;
|
|
338
|
+
}
|
|
292
339
|
}
|
|
293
340
|
|
|
294
341
|
namespace Routes {
|
|
295
|
-
abstract class StorableRouter<T extends Aventus.IData> extends Aventus.HttpRoute {
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
342
|
+
abstract class StorableRouter<T extends Aventus.IData, U extends AventusSharp.Routes.Request.Request | T = T, R extends AventusSharp.Routes.Response.Resource | T = T, S extends AventusSharp.Routes.Response.Resource | T = R> extends Aventus.HttpRoute {
|
|
343
|
+
|
|
344
|
+
@BindThis()
|
|
345
|
+
GetAll(): Promise<AventusSharp.Tools.ResultWithError<R[]>>;
|
|
346
|
+
@BindThis()
|
|
347
|
+
Create(body: {
|
|
348
|
+
item: U;
|
|
349
|
+
}): Promise<AventusSharp.Tools.ResultWithError<S>>;
|
|
350
|
+
@BindThis()
|
|
351
|
+
CreateMany(body: {
|
|
352
|
+
list: U[];
|
|
353
|
+
}): Promise<AventusSharp.Tools.ResultWithError<S[]>>;
|
|
354
|
+
@BindThis()
|
|
355
|
+
GetById(id: number): Promise<AventusSharp.Tools.ResultWithError<S>>;
|
|
356
|
+
@BindThis()
|
|
357
|
+
GetByIds(body: {
|
|
358
|
+
ids: number[];
|
|
359
|
+
}): Promise<AventusSharp.Tools.ResultWithError<S[]>>;
|
|
360
|
+
@BindThis()
|
|
361
|
+
Update(id: number, body: {
|
|
362
|
+
item: U;
|
|
363
|
+
}): Promise<AventusSharp.Tools.ResultWithError<S>>;
|
|
364
|
+
@BindThis()
|
|
365
|
+
UpdateMany(body: {
|
|
366
|
+
list: U[];
|
|
367
|
+
}): Promise<AventusSharp.Tools.ResultWithError<S[]>>;
|
|
368
|
+
@BindThis()
|
|
369
|
+
Delete(id: number): Promise<AventusSharp.Tools.ResultWithError<boolean>>;
|
|
370
|
+
@BindThis()
|
|
371
|
+
DeleteMany(body: {
|
|
372
|
+
ids: number[];
|
|
373
|
+
}): Promise<AventusSharp.Tools.ResultWithError<boolean>>;
|
|
374
|
+
abstract StorableName(): string;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
namespace Data.CustomTableMembers {
|
|
379
|
+
@Convertible()
|
|
380
|
+
class ResultWithImageFileError<T> extends AventusSharp.Tools.ResultWithError<T, AventusSharp.Data.CustomTableMembers.ImageFileError> {
|
|
381
|
+
/** Fullname of the class */
|
|
382
|
+
static get Fullname(): string;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
namespace Data {
|
|
387
|
+
@Convertible()
|
|
388
|
+
class DataError extends Aventus.GenericError<typeof AventusSharp.Data.DataErrorCode> {
|
|
389
|
+
/** Fullname of the class */
|
|
390
|
+
static get Fullname(): string;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
namespace Data {
|
|
395
|
+
@Convertible()
|
|
396
|
+
class ResultWithDataError<T> extends AventusSharp.Tools.ResultWithError<T, AventusSharp.Data.DataError> {
|
|
397
|
+
/** Fullname of the class */
|
|
398
|
+
static get Fullname(): string;
|
|
399
|
+
}
|
|
320
400
|
}
|
|
321
401
|
|
|
322
402
|
namespace Data {
|
|
323
403
|
@Convertible()
|
|
324
|
-
class
|
|
325
|
-
|
|
326
|
-
|
|
404
|
+
class VoidWithDataError extends AventusSharp.Tools.VoidWithError<AventusSharp.Data.DataError> {
|
|
405
|
+
/** Fullname of the class */
|
|
406
|
+
static get Fullname(): string;
|
|
407
|
+
}
|
|
327
408
|
}
|
|
328
409
|
|
|
329
410
|
namespace Routes {
|
|
330
411
|
@Convertible()
|
|
331
|
-
class RouteError extends Aventus.GenericError<typeof Routes.RouteErrorCode> {
|
|
332
|
-
|
|
333
|
-
|
|
412
|
+
class RouteError extends Aventus.GenericError<typeof AventusSharp.Routes.RouteErrorCode> {
|
|
413
|
+
/** Fullname of the class */
|
|
414
|
+
static get Fullname(): string;
|
|
415
|
+
}
|
|
334
416
|
}
|
|
335
417
|
|
|
336
418
|
namespace Routes {
|
|
337
419
|
@Convertible()
|
|
338
|
-
class ResultWithRouteError<T> extends Tools.ResultWithError<T, Routes.RouteError> {
|
|
339
|
-
|
|
340
|
-
|
|
420
|
+
class ResultWithRouteError<T> extends AventusSharp.Tools.ResultWithError<T, AventusSharp.Routes.RouteError> {
|
|
421
|
+
/** Fullname of the class */
|
|
422
|
+
static get Fullname(): string;
|
|
423
|
+
}
|
|
341
424
|
}
|
|
342
425
|
|
|
343
426
|
namespace Routes {
|
|
344
427
|
@Convertible()
|
|
345
|
-
class VoidWithRouteError extends Tools.VoidWithError<Routes.RouteError> {
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
allowSendBeforeOpen?: boolean;
|
|
374
|
-
/**
|
|
375
|
-
* Define the websocket connection must be open during creation
|
|
376
|
-
*/
|
|
377
|
-
autoStart?: boolean;
|
|
378
|
-
/**
|
|
379
|
-
* Define if a /ping msg must be sent
|
|
380
|
-
*/
|
|
381
|
-
sendPing?: number;
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
namespace WebSocket {
|
|
386
|
-
class SocketError extends Aventus.GenericError<WebSocket.SocketErrorCode> {
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
namespace WebSocket {
|
|
391
|
-
abstract class Connection {
|
|
392
|
-
static Debug: boolean;
|
|
393
|
-
protected options: Required<WebSocket.ConnectionOptions>;
|
|
394
|
-
protected waitingList: {
|
|
395
|
-
[uuid: string]: (channel: string, data: any) => void;
|
|
396
|
-
};
|
|
397
|
-
protected memoryBeforeOpen: WebSocket.SocketSendMessageOptions[];
|
|
398
|
-
protected socket?: WebSocket.Socket;
|
|
399
|
-
protected actionGuard: Aventus.ActionGuard;
|
|
400
|
-
/**
|
|
401
|
-
* Create a singleton
|
|
402
|
-
*/
|
|
403
|
-
static getInstance(): WebSocket.Connection;
|
|
404
|
-
protected constructor();
|
|
405
|
-
readonly onOpen: Aventus.Callback<() => void>;
|
|
406
|
-
readonly onClose: Aventus.Callback<(event: Event) => void>;
|
|
407
|
-
readonly onError: Aventus.Callback<(event: Event) => void>;
|
|
408
|
-
/**
|
|
409
|
-
* Define the configuration for your websocket
|
|
410
|
-
*/
|
|
411
|
-
protected abstract configure(options: WebSocket.ConnectionOptions): WebSocket.ConnectionOptions;
|
|
412
|
-
/**
|
|
413
|
-
* Configure a new Websocket
|
|
414
|
-
*/
|
|
415
|
-
protected _configure(options?: WebSocket.ConnectionOptions): Required<WebSocket.ConnectionOptions>;
|
|
416
|
-
private getUrl;
|
|
417
|
-
/**
|
|
418
|
-
* Add a new route to listen to the websocket
|
|
419
|
-
*/
|
|
420
|
-
addRoute(newRoute: WebSocket.SocketRoute): void;
|
|
421
|
-
/**
|
|
422
|
-
* The route to remove
|
|
423
|
-
* @param route - The route to remove
|
|
424
|
-
*/
|
|
425
|
-
removeRoute(route: WebSocket.SocketRoute): void;
|
|
426
|
-
protected openCallback: ((isOpen: boolean) => void) | undefined;
|
|
427
|
-
/**
|
|
428
|
-
* Try to open the websocket
|
|
429
|
-
*/
|
|
430
|
-
open(): Promise<boolean>;
|
|
431
|
-
protected jsonReplacer(key: string, value: any): any;
|
|
432
|
-
/**
|
|
433
|
-
* Send a message though the websocket
|
|
434
|
-
* @param channelName The channel on which the message is sent
|
|
435
|
-
* @param data The data to send
|
|
436
|
-
* @param options the options to add to the message (typically the uid)
|
|
437
|
-
*/
|
|
438
|
-
sendMessage<T>(options: WebSocket.SocketSendMessageOptions): Promise<Aventus.VoidWithError>;
|
|
439
|
-
/**
|
|
440
|
-
* Send a message though the websocket and wait one answer give in parameters callbacks
|
|
441
|
-
* @param channelName The channel on which the message is sent
|
|
442
|
-
* @param body The data to send
|
|
443
|
-
* @param timeout The timeout before the request failed
|
|
444
|
-
*/
|
|
445
|
-
sendMessageAndWait<T>(options: WebSocket.SocketSendMessageOptions): Promise<Aventus.ResultWithError<Aventus.ExtractFromError<T>>>;
|
|
446
|
-
/**
|
|
447
|
-
* Check if socket is ready
|
|
448
|
-
*/
|
|
449
|
-
isReady(): boolean;
|
|
450
|
-
protected sendPingTimeout: number;
|
|
451
|
-
protected sendPing(): void;
|
|
452
|
-
protected startPing(): void;
|
|
453
|
-
protected stopPing(): void;
|
|
454
|
-
protected _onOpen(): void;
|
|
455
|
-
protected errorOccur: boolean;
|
|
456
|
-
protected _onError(event: Event): void;
|
|
457
|
-
protected _onClose(event: Event): void;
|
|
458
|
-
/**
|
|
459
|
-
* Close the current connection
|
|
460
|
-
*/
|
|
461
|
-
close(): void;
|
|
462
|
-
protected onMessage(event: MessageEvent<any>): void;
|
|
463
|
-
/**
|
|
464
|
-
* Print a msg inside the console
|
|
465
|
-
*/
|
|
466
|
-
protected log(message: {} | string): void;
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
namespace WebSocket {
|
|
471
|
-
class EndPoint extends WebSocket.Connection {
|
|
472
|
-
/**
|
|
473
|
-
* Create a singleton
|
|
474
|
-
*/
|
|
475
|
-
static getInstance(): WebSocket.EndPoint;
|
|
476
|
-
protected constructor();
|
|
477
|
-
protected register(): void;
|
|
478
|
-
/**
|
|
479
|
-
* @inheritdoc
|
|
480
|
-
*/
|
|
481
|
-
protected configure(options: WebSocket.ConnectionOptions): WebSocket.ConnectionOptions;
|
|
482
|
-
protected get path(): string;
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
namespace WebSocket {
|
|
487
|
-
type WsEndPointType = (abstract new (...args: any[]) => WebSocket.EndPoint);
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
namespace WebSocket {
|
|
491
|
-
abstract class WsEvent<T extends any = any> {
|
|
492
|
-
protected endpoint: WebSocket.EndPoint;
|
|
493
|
-
onTrigger: Aventus.Callback<(item: Aventus.ExtractFromError<T>, params: Aventus.UriParamsValue, uid?: string) => void>;
|
|
494
|
-
protected routeInfo: WebSocket.SocketRoute<Aventus.ExtractFromError<T>>;
|
|
495
|
-
protected _listening: boolean;
|
|
496
|
-
get listening(): boolean;
|
|
497
|
-
getPrefix: () => string;
|
|
498
|
-
constructor(endpoint?: WebSocket.EndPoint, getPrefix?: () => string);
|
|
499
|
-
init(): void;
|
|
500
|
-
/**
|
|
501
|
-
* Define the websocket path
|
|
502
|
-
*/
|
|
503
|
-
protected abstract path(): string;
|
|
504
|
-
/**
|
|
505
|
-
* Override this method to tell that the event must listen when created
|
|
506
|
-
*/
|
|
507
|
-
protected listenOnBoot(): boolean;
|
|
508
|
-
/**
|
|
509
|
-
* Add the event to the endpoint. After that, the on trigger event can be triggered
|
|
510
|
-
*/
|
|
511
|
-
listen(): void;
|
|
512
|
-
/**
|
|
513
|
-
* Remove the event from the endpoint. After that, the on trigger event won't be triggered
|
|
514
|
-
*/
|
|
515
|
-
stop(): void;
|
|
516
|
-
protected onEvent(data: Aventus.ExtractFromError<T>, params: Aventus.UriParamsValue, uid?: string): void;
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
namespace WebSocket {
|
|
521
|
-
type ExtractResultFrom<T extends WebSocket.WsEvent, U = any> = T extends WebSocket.WsEvent<infer U> ? U : never;
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
namespace WebSocket {
|
|
525
|
-
type WsEventType = abstract new (...args: any[]) => WebSocket.WsEvent;
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
type ExtractResponse<T extends WebSocket.WsEvent<U>, U = any> = T extends WebSocket.WsEvent<infer U> ? Aventus.ResultWithError<Aventus.ExtractFromError<U>> : never;
|
|
529
|
-
|
|
530
|
-
namespace WebSocket {
|
|
531
|
-
class StorableWsRoute_DeleteMany<T extends Aventus.IData> extends WebSocket.WsEvent<Tools.ResultWithError<T[]>> {
|
|
532
|
-
/**
|
|
533
|
-
* @inheritdoc
|
|
534
|
-
*/
|
|
535
|
-
protected path(): string;
|
|
536
|
-
StorableName: () => string;
|
|
537
|
-
constructor(endpoint: WebSocket.EndPoint, getPrefix?: () => string, StorableName?: () => string);
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
namespace WebSocket {
|
|
542
|
-
class StorableWsRouter_Delete<T> extends WebSocket.WsEvent<T> {
|
|
543
|
-
StorableName: () => string;
|
|
544
|
-
constructor(endpoint: WebSocket.EndPoint, getPrefix: () => string, StorableName: () => string);
|
|
545
|
-
/**
|
|
546
|
-
* @inheritdoc
|
|
547
|
-
*/
|
|
548
|
-
protected path(): string;
|
|
549
|
-
}
|
|
428
|
+
class VoidWithRouteError extends AventusSharp.Tools.VoidWithError<AventusSharp.Routes.RouteError> {
|
|
429
|
+
/** Fullname of the class */
|
|
430
|
+
static get Fullname(): string;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
namespace SSE {
|
|
435
|
+
@Convertible()
|
|
436
|
+
class SSEError extends Aventus.GenericError<typeof AventusSharp.SSE.SSEErrorCode> {
|
|
437
|
+
/** Fullname of the class */
|
|
438
|
+
static get Fullname(): string;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
namespace SSE {
|
|
443
|
+
@Convertible()
|
|
444
|
+
class ResultWithSSEError<T> extends AventusSharp.Tools.ResultWithError<T, AventusSharp.SSE.SSEError> {
|
|
445
|
+
/** Fullname of the class */
|
|
446
|
+
static get Fullname(): string;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
namespace SSE {
|
|
451
|
+
@Convertible()
|
|
452
|
+
class VoidWithSSEError extends AventusSharp.Tools.VoidWithError<AventusSharp.SSE.SSEError> {
|
|
453
|
+
/** Fullname of the class */
|
|
454
|
+
static get Fullname(): string;
|
|
455
|
+
}
|
|
550
456
|
}
|
|
551
457
|
|
|
552
458
|
namespace WebSocket {
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
StorableName: () => string;
|
|
559
|
-
constructor(endpoint: WebSocket.EndPoint, getPrefix?: () => string, StorableName?: () => string);
|
|
560
|
-
}
|
|
459
|
+
@Convertible()
|
|
460
|
+
class WsError extends Aventus.GenericError<typeof AventusSharp.WebSocket.WsErrorCode> {
|
|
461
|
+
/** Fullname of the class */
|
|
462
|
+
static get Fullname(): string;
|
|
463
|
+
}
|
|
561
464
|
}
|
|
562
465
|
|
|
563
466
|
namespace WebSocket {
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
*/
|
|
570
|
-
protected path(): string;
|
|
571
|
-
}
|
|
467
|
+
@Convertible()
|
|
468
|
+
class ResultWithWsError<T> extends AventusSharp.Tools.ResultWithError<T, AventusSharp.WebSocket.WsError> {
|
|
469
|
+
/** Fullname of the class */
|
|
470
|
+
static get Fullname(): string;
|
|
471
|
+
}
|
|
572
472
|
}
|
|
573
473
|
|
|
574
474
|
namespace WebSocket {
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
475
|
+
@Convertible()
|
|
476
|
+
class VoidWithWsError extends AventusSharp.Tools.VoidWithError<AventusSharp.WebSocket.WsError> {
|
|
477
|
+
/** Fullname of the class */
|
|
478
|
+
static get Fullname(): string;
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
namespace RAM {
|
|
483
|
+
class RamCompletor<T> {
|
|
484
|
+
protected objects: T[];
|
|
485
|
+
protected fields: ___AventusSharp.RAM.ItemField<T, any>[];
|
|
486
|
+
constructor(objects?: T | T[]);
|
|
487
|
+
add<U extends Aventus.IRamData>(field: ___AventusSharp.RAM.ItemField<T, U>): AventusSharp.RAM.RamCompletor<T>;
|
|
488
|
+
run(): Promise<Aventus.VoidWithError>;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
namespace RAM {
|
|
493
|
+
abstract class RamHttp<Item extends AventusSharp.Data.Storable, Request extends AventusSharp.Routes.Request.Request | Item = Item, ResourceSimple extends AventusSharp.Routes.Response.Resource | Item = Item, ResourceDetails extends ResourceSimple = ResourceSimple> extends Aventus.Ram<Item, Request, ResourceSimple, ResourceDetails> {
|
|
494
|
+
protected getAllDone: boolean;
|
|
495
|
+
protected routes: AventusSharp.Routes.StorableRouter<Item, Request, ResourceSimple, ResourceDetails>;
|
|
496
|
+
abstract defineRoutes(): AventusSharp.Routes.StorableRouter<Item, Request, ResourceSimple, ResourceDetails>;
|
|
497
|
+
protected constructor();
|
|
498
|
+
protected beforeGetAll(): Promise<Aventus.VoidWithError>;
|
|
499
|
+
protected beforeGetById(id: number): Promise<Aventus.VoidWithError>;
|
|
500
|
+
protected beforeGetByIds(ids: number[]): Promise<Aventus.VoidWithError>;
|
|
501
|
+
complete(objects?: ResourceDetails | ResourceDetails[]): AventusSharp.RAM.RamCompletor<ResourceDetails>;
|
|
502
|
+
protected transformCreateRequestToItem(item: Request): Promise<Aventus.ResultWithError<ResourceDetails>>;
|
|
503
|
+
protected transformCreateRequestListToItem(list: Request[]): Promise<Aventus.ResultWithError<ResourceDetails[]>>;
|
|
504
|
+
protected transformUpdateRequestToItem(item: Request): Promise<Aventus.ResultWithError<ResourceDetails>>;
|
|
505
|
+
protected transformUpdateRequestListToItem(list: Request[]): Promise<Aventus.ResultWithError<ResourceDetails[]>>;
|
|
506
|
+
protected beforeDeleteItem(item: ResourceDetails, fromList: boolean): Promise<Aventus.VoidWithError>;
|
|
507
|
+
protected beforeDeleteList(list: ResourceDetails[]): Promise<Aventus.VoidWithError>;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
namespace WebSocket {
|
|
512
|
+
type InternalSocketRoute = AventusSharp.WebSocket.SocketRoute & Aventus.PreparedUri;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
namespace WebSocket {
|
|
516
|
+
interface ConnectionOptions {
|
|
517
|
+
/** Enable or disable log */
|
|
518
|
+
log?: boolean;
|
|
519
|
+
/** A tag to prefix your log */
|
|
520
|
+
logPrefix?: string;
|
|
521
|
+
/** Determine the host for the ws connection. By default it's the same as your current url */
|
|
522
|
+
host?: string;
|
|
523
|
+
/** Determine the port for the ws connection. By default 80 or 443 depends of http or https */
|
|
524
|
+
port?: number;
|
|
525
|
+
/** Determine if the https must be used. The default value depend of the current http connection */
|
|
526
|
+
useHttps?: boolean;
|
|
527
|
+
/** Define a list of predefined routes to use */
|
|
528
|
+
routes?: {
|
|
529
|
+
[key: string]: AventusSharp.WebSocket.InternalSocketRoute[];
|
|
530
|
+
};
|
|
531
|
+
/**
|
|
532
|
+
* Define the name for the websocket
|
|
533
|
+
* It ll open the ws connection on /ws/${socketName}
|
|
534
|
+
*/
|
|
535
|
+
socketName?: string;
|
|
536
|
+
/**
|
|
537
|
+
* Define if the message must be buffered before the socket open.
|
|
538
|
+
* If true, when the socket is opened, all messages in buffered will be sent
|
|
539
|
+
*/
|
|
540
|
+
allowSendBeforeOpen?: boolean;
|
|
541
|
+
/**
|
|
542
|
+
* Define the websocket connection must be open during creation
|
|
543
|
+
*/
|
|
544
|
+
autoStart?: boolean;
|
|
545
|
+
/**
|
|
546
|
+
* Define if a /ping msg must be sent
|
|
547
|
+
*/
|
|
548
|
+
sendPing?: number;
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
namespace WebSocket {
|
|
553
|
+
class SocketError extends Aventus.GenericError<AventusSharp.WebSocket.SocketErrorCode> {
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
namespace WebSocket {
|
|
558
|
+
abstract class Connection {
|
|
559
|
+
static Debug: boolean;
|
|
560
|
+
protected options: Required<AventusSharp.WebSocket.ConnectionOptions>;
|
|
561
|
+
protected waitingList: {
|
|
562
|
+
[uuid: string]: (channel: string, data: any) => void;
|
|
563
|
+
};
|
|
564
|
+
protected memoryBeforeOpen: AventusSharp.WebSocket.SocketSendMessageOptions[];
|
|
565
|
+
protected socket?: AventusSharp.WebSocket.Socket;
|
|
566
|
+
protected actionGuard: Aventus.ActionGuard;
|
|
567
|
+
/**
|
|
568
|
+
* Create a singleton
|
|
569
|
+
*/
|
|
570
|
+
static getInstance(): AventusSharp.WebSocket.Connection;
|
|
571
|
+
protected constructor();
|
|
572
|
+
readonly onOpen: Aventus.Callback<() => void>;
|
|
573
|
+
readonly onClose: Aventus.Callback<(event: Event) => void>;
|
|
574
|
+
readonly onError: Aventus.Callback<(event: Event) => void>;
|
|
575
|
+
/**
|
|
576
|
+
* Define the configuration for your websocket
|
|
577
|
+
*/
|
|
578
|
+
protected abstract configure(options: AventusSharp.WebSocket.ConnectionOptions): AventusSharp.WebSocket.ConnectionOptions;
|
|
579
|
+
/**
|
|
580
|
+
* Configure a new Websocket
|
|
581
|
+
*/
|
|
582
|
+
protected _configure(options?: AventusSharp.WebSocket.ConnectionOptions): Required<AventusSharp.WebSocket.ConnectionOptions>;
|
|
583
|
+
private getUrl;
|
|
584
|
+
/**
|
|
585
|
+
* Add a new route to listen to the websocket
|
|
586
|
+
*/
|
|
587
|
+
addRoute(newRoute: AventusSharp.WebSocket.SocketRoute): void;
|
|
588
|
+
/**
|
|
589
|
+
* The route to remove
|
|
590
|
+
* @param route - The route to remove
|
|
591
|
+
*/
|
|
592
|
+
removeRoute(route: AventusSharp.WebSocket.SocketRoute): void;
|
|
593
|
+
protected openCallback: ((isOpen: boolean) => void) | undefined;
|
|
594
|
+
/**
|
|
595
|
+
* Try to open the websocket
|
|
596
|
+
*/
|
|
597
|
+
open(): Promise<boolean>;
|
|
598
|
+
protected jsonReplacer(key: string, value: any): any;
|
|
599
|
+
/**
|
|
600
|
+
* Send a message though the websocket
|
|
601
|
+
* @param channelName The channel on which the message is sent
|
|
602
|
+
* @param data The data to send
|
|
603
|
+
* @param options the options to add to the message (typically the uid)
|
|
604
|
+
*/
|
|
605
|
+
sendMessage<T>(options: AventusSharp.WebSocket.SocketSendMessageOptions): Promise<Aventus.VoidWithError>;
|
|
606
|
+
/**
|
|
607
|
+
* Send a message though the websocket and wait one answer give in parameters callbacks
|
|
608
|
+
* @param channelName The channel on which the message is sent
|
|
609
|
+
* @param body The data to send
|
|
610
|
+
* @param timeout The timeout before the request failed
|
|
611
|
+
*/
|
|
612
|
+
sendMessageAndWait<T>(options: AventusSharp.WebSocket.SocketSendMessageOptions): Promise<Aventus.ResultWithError<Aventus.ExtractFromError<T>>>;
|
|
613
|
+
/**
|
|
614
|
+
* Check if socket is ready
|
|
615
|
+
*/
|
|
616
|
+
isReady(): boolean;
|
|
617
|
+
protected sendPingTimeout: number;
|
|
618
|
+
protected sendPing(): void;
|
|
619
|
+
protected startPing(): void;
|
|
620
|
+
protected stopPing(): void;
|
|
621
|
+
protected _onOpen(): void;
|
|
622
|
+
protected errorOccur: boolean;
|
|
623
|
+
protected _onError(event: Event): void;
|
|
624
|
+
protected _onClose(event: Event): void;
|
|
625
|
+
/**
|
|
626
|
+
* Close the current connection
|
|
627
|
+
*/
|
|
628
|
+
close(): void;
|
|
629
|
+
protected onMessage(event: MessageEvent<any>): void;
|
|
630
|
+
/**
|
|
631
|
+
* Print a msg inside the console
|
|
632
|
+
*/
|
|
633
|
+
protected log(message: {} | string): void;
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
namespace WebSocket {
|
|
638
|
+
class EndPoint extends AventusSharp.WebSocket.Connection {
|
|
639
|
+
/**
|
|
640
|
+
* Create a singleton
|
|
641
|
+
*/
|
|
642
|
+
static getInstance(): AventusSharp.WebSocket.EndPoint;
|
|
643
|
+
protected constructor();
|
|
644
|
+
protected register(): void;
|
|
645
|
+
/**
|
|
646
|
+
* @inheritdoc
|
|
647
|
+
*/
|
|
648
|
+
protected configure(options: AventusSharp.WebSocket.ConnectionOptions): AventusSharp.WebSocket.ConnectionOptions;
|
|
649
|
+
protected get path(): string;
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
namespace WebSocket {
|
|
654
|
+
type WsEndPointType = (abstract new (...args: any[]) => AventusSharp.WebSocket.EndPoint);
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
namespace WebSocket {
|
|
658
|
+
abstract class WsEvent<T extends any = any> {
|
|
659
|
+
protected endpoint: AventusSharp.WebSocket.EndPoint;
|
|
660
|
+
onTrigger: Aventus.Callback<(item: Aventus.ExtractFromError<T>, params: Aventus.UriParamsValue, uid?: string) => void>;
|
|
661
|
+
protected routeInfo: AventusSharp.WebSocket.SocketRoute<Aventus.ExtractFromError<T>>;
|
|
662
|
+
protected _listening: boolean;
|
|
663
|
+
get listening(): boolean;
|
|
664
|
+
getPrefix: () => string;
|
|
665
|
+
constructor(endpoint?: AventusSharp.WebSocket.EndPoint, getPrefix?: () => string);
|
|
666
|
+
init(): void;
|
|
667
|
+
/**
|
|
668
|
+
* Define the websocket path
|
|
669
|
+
*/
|
|
670
|
+
protected abstract path(): string;
|
|
671
|
+
/**
|
|
672
|
+
* Override this method to tell that the event must listen when created
|
|
673
|
+
*/
|
|
674
|
+
protected listenOnBoot(): boolean;
|
|
675
|
+
/**
|
|
676
|
+
* Add the event to the endpoint. After that, the on trigger event can be triggered
|
|
677
|
+
*/
|
|
678
|
+
listen(): void;
|
|
679
|
+
/**
|
|
680
|
+
* Remove the event from the endpoint. After that, the on trigger event won't be triggered
|
|
681
|
+
*/
|
|
682
|
+
stop(): void;
|
|
683
|
+
protected onEvent(data: Aventus.ExtractFromError<T>, params: Aventus.UriParamsValue, uid?: string): void;
|
|
684
|
+
}
|
|
583
685
|
}
|
|
584
686
|
|
|
585
687
|
namespace WebSocket {
|
|
586
|
-
|
|
587
|
-
StorableName: () => string;
|
|
588
|
-
constructor(endpoint: WebSocket.EndPoint, getPrefix: () => string, StorableName: () => string);
|
|
589
|
-
/**
|
|
590
|
-
* @inheritdoc
|
|
591
|
-
*/
|
|
592
|
-
protected path(): string;
|
|
593
|
-
}
|
|
688
|
+
type ExtractResultFrom<T extends AventusSharp.WebSocket.WsEvent, U = any> = T extends AventusSharp.WebSocket.WsEvent<infer U> ? U : never;
|
|
594
689
|
}
|
|
595
690
|
|
|
596
691
|
namespace WebSocket {
|
|
597
|
-
|
|
598
|
-
/**
|
|
599
|
-
* @inheritdoc
|
|
600
|
-
*/
|
|
601
|
-
protected path(): string;
|
|
602
|
-
StorableName: () => string;
|
|
603
|
-
constructor(endpoint: WebSocket.EndPoint, getPrefix?: () => string, StorableName?: () => string);
|
|
604
|
-
}
|
|
692
|
+
type WsEventType = abstract new (...args: any[]) => AventusSharp.WebSocket.WsEvent;
|
|
605
693
|
}
|
|
606
694
|
|
|
695
|
+
type ExtractResponse<T extends AventusSharp.WebSocket.WsEvent<U>, U = any> = T extends AventusSharp.WebSocket.WsEvent<infer U> ? Aventus.ResultWithError<Aventus.ExtractFromError<U>> : never;
|
|
696
|
+
|
|
607
697
|
namespace WebSocket {
|
|
608
|
-
class
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
}
|
|
698
|
+
class StorableWsRoute_DeleteMany extends AventusSharp.WebSocket.WsEvent<Aventus.ResultWithError<number[]>> {
|
|
699
|
+
/**
|
|
700
|
+
* @inheritdoc
|
|
701
|
+
*/
|
|
702
|
+
protected path(): string;
|
|
703
|
+
StorableName: () => string;
|
|
704
|
+
constructor(endpoint: AventusSharp.WebSocket.EndPoint, getPrefix?: () => string, StorableName?: () => string);
|
|
705
|
+
}
|
|
616
706
|
}
|
|
617
707
|
|
|
618
708
|
namespace WebSocket {
|
|
619
|
-
class
|
|
620
|
-
StorableName: () => string;
|
|
621
|
-
constructor(endpoint: WebSocket.EndPoint, getPrefix: () => string, StorableName: () => string);
|
|
622
|
-
/**
|
|
623
|
-
* @inheritdoc
|
|
624
|
-
*/
|
|
625
|
-
protected path(): string;
|
|
626
|
-
}
|
|
709
|
+
class StorableWsRouter_Delete extends AventusSharp.WebSocket.WsEvent<number> {
|
|
710
|
+
StorableName: () => string;
|
|
711
|
+
constructor(endpoint: AventusSharp.WebSocket.EndPoint, getPrefix: () => string, StorableName: () => string);
|
|
712
|
+
/**
|
|
713
|
+
* @inheritdoc
|
|
714
|
+
*/
|
|
715
|
+
protected path(): string;
|
|
716
|
+
}
|
|
627
717
|
}
|
|
628
718
|
|
|
629
719
|
namespace WebSocket {
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
720
|
+
class StorableWsRoute_UpdateMany<T> extends AventusSharp.WebSocket.WsEvent<Aventus.ResultWithError<T[]>> {
|
|
721
|
+
/**
|
|
722
|
+
* @inheritdoc
|
|
723
|
+
*/
|
|
724
|
+
protected path(): string;
|
|
725
|
+
StorableName: () => string;
|
|
726
|
+
constructor(endpoint: AventusSharp.WebSocket.EndPoint, getPrefix?: () => string, StorableName?: () => string);
|
|
727
|
+
}
|
|
633
728
|
}
|
|
634
729
|
|
|
635
730
|
namespace WebSocket {
|
|
636
|
-
class
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
731
|
+
class StorableWsRouter_Update<T> extends AventusSharp.WebSocket.WsEvent<T> {
|
|
732
|
+
StorableName: () => string;
|
|
733
|
+
constructor(endpoint: AventusSharp.WebSocket.EndPoint, getPrefix: () => string, StorableName: () => string);
|
|
734
|
+
/**
|
|
735
|
+
* @inheritdoc
|
|
736
|
+
*/
|
|
737
|
+
protected path(): string;
|
|
738
|
+
}
|
|
643
739
|
}
|
|
644
740
|
|
|
645
741
|
namespace WebSocket {
|
|
646
|
-
|
|
742
|
+
class StorableWsRouter_GetByIds<T> extends AventusSharp.WebSocket.WsEvent<T[]> {
|
|
743
|
+
StorableName: () => string;
|
|
744
|
+
constructor(endpoint: AventusSharp.WebSocket.EndPoint, getPrefix: () => string, StorableName: () => string);
|
|
745
|
+
/**
|
|
746
|
+
* @inheritdoc
|
|
747
|
+
*/
|
|
748
|
+
protected path(): string;
|
|
749
|
+
}
|
|
647
750
|
}
|
|
648
751
|
|
|
649
752
|
namespace WebSocket {
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
Delete: WebSocket.StorableWsRouter_Delete<T>;
|
|
659
|
-
DeleteMany: WebSocket.StorableWsRoute_DeleteMany<T>;
|
|
660
|
-
};
|
|
753
|
+
class StorableWsRouter_GetById<T> extends AventusSharp.WebSocket.WsEvent<T> {
|
|
754
|
+
StorableName: () => string;
|
|
755
|
+
constructor(endpoint: AventusSharp.WebSocket.EndPoint, getPrefix: () => string, StorableName: () => string);
|
|
756
|
+
/**
|
|
757
|
+
* @inheritdoc
|
|
758
|
+
*/
|
|
759
|
+
protected path(): string;
|
|
760
|
+
}
|
|
661
761
|
}
|
|
662
762
|
|
|
663
763
|
namespace WebSocket {
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
} | FormData, options?: WebSocket.WsRouteSendOptions): Promise<ExtractResponse<WebSocket.StorableWsRoute_CreateMany<T>>>;
|
|
673
|
-
GetById(id: number, options?: WebSocket.WsRouteSendOptions): Promise<ExtractResponse<WebSocket.StorableWsRouter_GetById<T>>>;
|
|
674
|
-
GetByIds(body: {
|
|
675
|
-
ids: number[];
|
|
676
|
-
} | FormData, options?: WebSocket.WsRouteSendOptions): Promise<ExtractResponse<WebSocket.StorableWsRouter_GetByIds<T>>>;
|
|
677
|
-
Update(id: number, body: {
|
|
678
|
-
item: T;
|
|
679
|
-
} | FormData, options?: WebSocket.WsRouteSendOptions): Promise<ExtractResponse<WebSocket.StorableWsRouter_Update<T>>>;
|
|
680
|
-
UpdateMany(body: {
|
|
681
|
-
list: T[];
|
|
682
|
-
} | FormData, options?: WebSocket.WsRouteSendOptions): Promise<ExtractResponse<WebSocket.StorableWsRoute_UpdateMany<T>>>;
|
|
683
|
-
Delete(id: number, options?: WebSocket.WsRouteSendOptions): Promise<ExtractResponse<WebSocket.StorableWsRouter_Delete<T>>>;
|
|
684
|
-
DeleteMany(body: {
|
|
685
|
-
ids: number[];
|
|
686
|
-
} | FormData, options?: WebSocket.WsRouteSendOptions): Promise<ExtractResponse<WebSocket.StorableWsRoute_DeleteMany<T>>>;
|
|
687
|
-
abstract StorableName(): string;
|
|
688
|
-
}
|
|
764
|
+
class StorableWsRoute_CreateMany<T> extends AventusSharp.WebSocket.WsEvent<Aventus.ResultWithError<T[]>> {
|
|
765
|
+
/**
|
|
766
|
+
* @inheritdoc
|
|
767
|
+
*/
|
|
768
|
+
protected path(): string;
|
|
769
|
+
StorableName: () => string;
|
|
770
|
+
constructor(endpoint: AventusSharp.WebSocket.EndPoint, getPrefix?: () => string, StorableName?: () => string);
|
|
771
|
+
}
|
|
689
772
|
}
|
|
690
773
|
|
|
691
774
|
namespace WebSocket {
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
775
|
+
class StorableWsRouter_Create<T> extends AventusSharp.WebSocket.WsEvent<T> {
|
|
776
|
+
StorableName: () => string;
|
|
777
|
+
constructor(endpoint: AventusSharp.WebSocket.EndPoint, getPrefix: () => string, StorableName: () => string);
|
|
778
|
+
/**
|
|
779
|
+
* @inheritdoc
|
|
780
|
+
*/
|
|
781
|
+
protected path(): string;
|
|
782
|
+
}
|
|
696
783
|
}
|
|
697
784
|
|
|
698
785
|
namespace WebSocket {
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
786
|
+
class StorableWsRouter_GetAll<T> extends AventusSharp.WebSocket.WsEvent<T[]> {
|
|
787
|
+
StorableName: () => string;
|
|
788
|
+
constructor(endpoint: AventusSharp.WebSocket.EndPoint, getPrefix: () => string, StorableName: () => string);
|
|
789
|
+
/**
|
|
790
|
+
* @inheritdoc
|
|
791
|
+
*/
|
|
792
|
+
protected path(): string;
|
|
793
|
+
}
|
|
703
794
|
}
|
|
704
795
|
|
|
705
796
|
namespace WebSocket {
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
}
|
|
797
|
+
type RouterRoutes = {
|
|
798
|
+
[name: string]: AventusSharp.WebSocket.WsEvent;
|
|
799
|
+
};
|
|
710
800
|
}
|
|
711
801
|
|
|
712
|
-
namespace
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
protected
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
802
|
+
namespace WebSocket {
|
|
803
|
+
class Router<T extends AventusSharp.WebSocket.RouterRoutes> {
|
|
804
|
+
readonly endpoint: AventusSharp.WebSocket.EndPoint;
|
|
805
|
+
events: T;
|
|
806
|
+
constructor(endpoint?: AventusSharp.WebSocket.EndPoint);
|
|
807
|
+
getPrefix(): string;
|
|
808
|
+
protected defineEvents(): Partial<T>;
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
namespace WebSocket {
|
|
813
|
+
type WsRouterType = abstract new (...args: any[]) => AventusSharp.WebSocket.Router<any>;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
namespace WebSocket {
|
|
817
|
+
type StorableWsRouter__Routes<T extends Aventus.IData, U extends AventusSharp.Routes.Request.Request | T = T, R extends AventusSharp.Routes.Response.Resource | T = T, S extends AventusSharp.Routes.Response.Resource | T = R> = {
|
|
818
|
+
GetAll: AventusSharp.WebSocket.StorableWsRouter_GetAll<R>;
|
|
819
|
+
Create: AventusSharp.WebSocket.StorableWsRouter_Create<S>;
|
|
820
|
+
CreateMany: AventusSharp.WebSocket.StorableWsRoute_CreateMany<S>;
|
|
821
|
+
GetById: AventusSharp.WebSocket.StorableWsRouter_GetById<S>;
|
|
822
|
+
GetByIds: AventusSharp.WebSocket.StorableWsRouter_GetByIds<S>;
|
|
823
|
+
Update: AventusSharp.WebSocket.StorableWsRouter_Update<S>;
|
|
824
|
+
UpdateMany: AventusSharp.WebSocket.StorableWsRoute_UpdateMany<S>;
|
|
825
|
+
Delete: AventusSharp.WebSocket.StorableWsRouter_Delete;
|
|
826
|
+
DeleteMany: AventusSharp.WebSocket.StorableWsRoute_DeleteMany;
|
|
827
|
+
};
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
namespace WebSocket {
|
|
831
|
+
abstract class StorableWsRouter<T extends Aventus.IData, U extends AventusSharp.Routes.Request.Request | T = T, R extends AventusSharp.Routes.Response.Resource | T = T, S extends AventusSharp.Routes.Response.Resource | T = R, __Route extends AventusSharp.WebSocket.StorableWsRouter__Routes<T, U, R, S> = AventusSharp.WebSocket.StorableWsRouter__Routes<T, U, R, S>> extends AventusSharp.WebSocket.Router<__Route> {
|
|
832
|
+
protected defineEvents(): Partial<__Route>;
|
|
833
|
+
GetAll(options?: AventusSharp.WebSocket.WsRouteSendOptions): Promise<AventusSharp.ExtractResponse<AventusSharp.WebSocket.StorableWsRouter_GetAll<R>>>;
|
|
834
|
+
Create(body: {
|
|
835
|
+
request: U;
|
|
836
|
+
}, options?: AventusSharp.WebSocket.WsRouteSendOptions): Promise<AventusSharp.ExtractResponse<AventusSharp.WebSocket.StorableWsRouter_Create<S>>>;
|
|
837
|
+
CreateMany(body: {
|
|
838
|
+
list: U[];
|
|
839
|
+
}, options?: AventusSharp.WebSocket.WsRouteSendOptions): Promise<AventusSharp.ExtractResponse<AventusSharp.WebSocket.StorableWsRoute_CreateMany<T>>>;
|
|
840
|
+
GetById(id: number, options?: AventusSharp.WebSocket.WsRouteSendOptions): Promise<AventusSharp.ExtractResponse<AventusSharp.WebSocket.StorableWsRouter_GetById<S>>>;
|
|
841
|
+
GetByIds(body: {
|
|
842
|
+
ids: number[];
|
|
843
|
+
}, options?: AventusSharp.WebSocket.WsRouteSendOptions): Promise<AventusSharp.ExtractResponse<AventusSharp.WebSocket.StorableWsRouter_GetByIds<S>>>;
|
|
844
|
+
Update(id: number, body: {
|
|
845
|
+
request: U;
|
|
846
|
+
}, options?: AventusSharp.WebSocket.WsRouteSendOptions): Promise<AventusSharp.ExtractResponse<AventusSharp.WebSocket.StorableWsRouter_Update<S>>>;
|
|
847
|
+
UpdateMany(body: {
|
|
848
|
+
list: U[];
|
|
849
|
+
}, options?: AventusSharp.WebSocket.WsRouteSendOptions): Promise<AventusSharp.ExtractResponse<AventusSharp.WebSocket.StorableWsRoute_UpdateMany<T>>>;
|
|
850
|
+
Delete(id: number, options?: AventusSharp.WebSocket.WsRouteSendOptions): Promise<AventusSharp.ExtractResponse<AventusSharp.WebSocket.StorableWsRouter_Delete>>;
|
|
851
|
+
DeleteMany(body: {
|
|
852
|
+
ids: number[];
|
|
853
|
+
}, options?: AventusSharp.WebSocket.WsRouteSendOptions): Promise<AventusSharp.ExtractResponse<AventusSharp.WebSocket.StorableWsRoute_DeleteMany>>;
|
|
854
|
+
abstract StorableName(): string;
|
|
855
|
+
}
|
|
728
856
|
}
|
|
729
857
|
|
|
730
858
|
namespace RAM {
|
|
731
|
-
abstract class RamWebSocket<
|
|
732
|
-
protected getAllDone: boolean;
|
|
733
|
-
private routes;
|
|
734
|
-
protected otherGetAllLocked: {
|
|
735
|
-
[uid: string]: true;
|
|
736
|
-
};
|
|
737
|
-
protected otherGetByIdLocked: {
|
|
738
|
-
[uid: string]: true;
|
|
739
|
-
};
|
|
740
|
-
protected otherCreateItemLocked: {
|
|
741
|
-
[uid: string]: true;
|
|
742
|
-
};
|
|
743
|
-
protected otherCreateListLocked: {
|
|
744
|
-
[uid: string]: true;
|
|
745
|
-
};
|
|
746
|
-
protected otherUpdateItemLocked: {
|
|
747
|
-
[uid: string]: true;
|
|
748
|
-
};
|
|
749
|
-
protected otherUpdateListLocked: {
|
|
750
|
-
[uid: string]: true;
|
|
751
|
-
};
|
|
752
|
-
protected otherDeleteItemLocked: {
|
|
753
|
-
[uid: string]: true;
|
|
754
|
-
};
|
|
755
|
-
protected otherDeleteListLocked: {
|
|
756
|
-
[uid: string]: true;
|
|
757
|
-
};
|
|
758
|
-
abstract defineRoutes(): WebSocket.StorableWsRouter<
|
|
759
|
-
protected constructor();
|
|
760
|
-
protected
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
protected
|
|
765
|
-
protected
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
protected
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
protected
|
|
773
|
-
protected
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
protected
|
|
777
|
-
protected
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
protected
|
|
783
|
-
|
|
859
|
+
abstract class RamWebSocket<Item extends AventusSharp.Data.Storable, Request extends AventusSharp.Routes.Request.Request | Item = Item, ResourceSimple extends AventusSharp.Routes.Response.Resource | Item = Item, ResourceDetails extends ResourceSimple = ResourceSimple> extends Aventus.Ram<Item, Request, ResourceSimple, ResourceDetails> {
|
|
860
|
+
protected getAllDone: boolean;
|
|
861
|
+
private routes;
|
|
862
|
+
protected otherGetAllLocked: {
|
|
863
|
+
[uid: string]: true;
|
|
864
|
+
};
|
|
865
|
+
protected otherGetByIdLocked: {
|
|
866
|
+
[uid: string]: true;
|
|
867
|
+
};
|
|
868
|
+
protected otherCreateItemLocked: {
|
|
869
|
+
[uid: string]: true;
|
|
870
|
+
};
|
|
871
|
+
protected otherCreateListLocked: {
|
|
872
|
+
[uid: string]: true;
|
|
873
|
+
};
|
|
874
|
+
protected otherUpdateItemLocked: {
|
|
875
|
+
[uid: string]: true;
|
|
876
|
+
};
|
|
877
|
+
protected otherUpdateListLocked: {
|
|
878
|
+
[uid: string]: true;
|
|
879
|
+
};
|
|
880
|
+
protected otherDeleteItemLocked: {
|
|
881
|
+
[uid: string]: true;
|
|
882
|
+
};
|
|
883
|
+
protected otherDeleteListLocked: {
|
|
884
|
+
[uid: string]: true;
|
|
885
|
+
};
|
|
886
|
+
abstract defineRoutes(): AventusSharp.WebSocket.StorableWsRouter<Item, Request, ResourceSimple, ResourceDetails>;
|
|
887
|
+
protected constructor();
|
|
888
|
+
protected addOrUpdateData(item: ResourceDetails | Aventus.ExtractFromError<ResourceDetails> | ResourceSimple | Aventus.ExtractFromError<ResourceSimple>): Promise<AventusSharp.Tools.ResultWithError<{
|
|
889
|
+
kind: "created" | "updated";
|
|
890
|
+
value: Aventus.RamItem<ResourceDetails, Request>;
|
|
891
|
+
}>>;
|
|
892
|
+
protected addEventsBindings(): void;
|
|
893
|
+
protected listenOnStart(): AventusSharp.RAM.RamWebSocketListenOnStart;
|
|
894
|
+
complete(objects?: ResourceDetails | ResourceDetails[]): AventusSharp.RAM.RamCompletor<ResourceDetails>;
|
|
895
|
+
@BindThis()
|
|
896
|
+
protected otherGetAll(items: ResourceSimple[], params: Aventus.UriParamsValue, uid?: string): Promise<void>;
|
|
897
|
+
protected beforeGetAll(): Promise<AventusSharp.Tools.VoidWithError>;
|
|
898
|
+
@BindThis()
|
|
899
|
+
protected otherGetById(item: Aventus.ExtractFromError<ResourceDetails>, params: Aventus.UriParamsValue, uid?: string): any;
|
|
900
|
+
protected beforeGetById(id: number): Promise<AventusSharp.Tools.VoidWithError>;
|
|
901
|
+
protected beforeGetByIds(ids: number[]): Promise<AventusSharp.Tools.VoidWithError>;
|
|
902
|
+
@BindThis()
|
|
903
|
+
protected otherCreateItem(item: Aventus.ExtractFromError<ResourceDetails>, params: Aventus.UriParamsValue, uid?: string): any;
|
|
904
|
+
protected transformCreateRequestListToItem(list: Request[]): Promise<AventusSharp.Tools.ResultWithError<ResourceDetails[]>>;
|
|
905
|
+
protected transformCreateRequestToItem(item: Request): Promise<AventusSharp.Tools.ResultWithError<ResourceDetails>>;
|
|
906
|
+
@BindThis()
|
|
907
|
+
protected otherCreateList(items: Aventus.ExtractFromError<ResourceDetails[]>, params: Aventus.UriParamsValue, uid?: string): any;
|
|
908
|
+
@BindThis()
|
|
909
|
+
protected otherUpdateItem(item: Aventus.ExtractFromError<ResourceDetails>, params: Aventus.UriParamsValue, uid?: string): any;
|
|
910
|
+
protected transformUpdateRequestListToItem(list: Request[]): Promise<AventusSharp.Tools.ResultWithError<ResourceDetails[]>>;
|
|
911
|
+
protected transformUpdateRequestToItem(item: Request): Promise<AventusSharp.Tools.ResultWithError<ResourceDetails>>;
|
|
912
|
+
@BindThis()
|
|
913
|
+
protected otherUpdateList(items: Aventus.ExtractFromError<ResourceDetails[]>, params: Aventus.UriParamsValue, uid?: string): any;
|
|
914
|
+
@BindThis()
|
|
915
|
+
protected otherDeleteItem(id: Aventus.ExtractFromError<number>, params: Aventus.UriParamsValue, uid?: string): void;
|
|
916
|
+
protected beforeDeleteItem(item: ResourceDetails, fromList: boolean): Promise<AventusSharp.Tools.VoidWithError>;
|
|
917
|
+
@BindThis()
|
|
918
|
+
protected otherDeleteList(ids: number[], params: Aventus.UriParamsValue, uid?: string): void;
|
|
919
|
+
protected beforeDeleteList(list: ResourceDetails[]): Promise<AventusSharp.Tools.VoidWithError>;
|
|
920
|
+
/**
|
|
921
|
+
* Delete element inside Ram without firing delete event
|
|
922
|
+
*/
|
|
923
|
+
protected deleteData(id: number): AventusSharp.Tools.ResultWithError<Aventus.RamItem<ResourceDetails, Request>>;
|
|
924
|
+
}
|
|
784
925
|
}
|
|
785
926
|
|
|
786
927
|
}
|
|
787
928
|
}
|
|
788
|
-
|
|
929
|
+
declare module ___AventusSharp {
|
|
930
|
+
namespace RAM {
|
|
931
|
+
type KeysOfType<T, U> = {
|
|
932
|
+
[K in keyof T]: NonNullable<T[K]> extends U ? K : never;
|
|
933
|
+
}[keyof T];
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
namespace RAM {
|
|
937
|
+
type NumberKeys<T> = {
|
|
938
|
+
[K in keyof T]: T[K] extends number ? K : never;
|
|
939
|
+
}[keyof T];
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
namespace RAM {
|
|
943
|
+
type ItemField<T, U extends Aventus.IRamData> = {
|
|
944
|
+
id: AventusSharp.RAM.NumberKeys<T>;
|
|
945
|
+
obj: AventusSharp.RAM.KeysOfType<T, U>;
|
|
946
|
+
ram: typeof Aventus.Ram<U>;
|
|
947
|
+
};
|
|
948
|
+
}
|
|
949
|
+
}//#endregion js def //
|
|
789
950
|
//#region js src //
|
|
790
|
-
{"namespace":"AventusSharp","available":[{"code":"Data.Storable=class Storable extends Aventus.Data {\n Id = 0;\n /**\n * @inerhit\n */\n toJSON() {\n let toAvoid = ['className', 'namespace'];\n return Aventus.Json.classToJson(this, {\n isValidKey: (key) => !toAvoid.includes(key),\n beforeEnd: (result) => {\n let resultTemp = {};\n if (result.$type) {\n resultTemp.$type = result.$type;\n for (let key in result) {\n if (key != '$type') {\n resultTemp[key] = result[key];\n }\n }\n return resultTemp;\n }\n return result;\n }\n });\n }\n}\nData.Storable.Namespace=`AventusSharp.Data`;\r\nData.Storable.$schema={...(Aventus.Data?.$schema ?? {}), \"Id\":\"number\"};\r\nAventus.Converter.register(Data.Storable.Fullname, Data.Storable);\r\n_.Data.Storable=Data.Storable;\r\n","dependances":[{"fullName":"Aventus.Data","isStrong":true},{"fullName":"Aventus.IData","isStrong":true},{"fullName":"Aventus.Json","isStrong":false}],"fullName":"AventusSharp.Data.Storable","required":false,"type":2,"isExported":true,"convertibleName":""},{"code":"Data.StorableTimestamp=class StorableTimestamp extends Data.Storable {\n CreatedDate = new Date();\n UpdatedDate = new Date();\n}\nData.StorableTimestamp.Namespace=`AventusSharp.Data`;\r\nData.StorableTimestamp.$schema={...(Data.Storable?.$schema ?? {}), \"CreatedDate\":\"Date\",\"UpdatedDate\":\"Date\"};\r\nAventus.Converter.register(Data.StorableTimestamp.Fullname, Data.StorableTimestamp);\r\n_.Data.StorableTimestamp=Data.StorableTimestamp;\r\n","dependances":[{"fullName":"AventusSharp.Data.Storable","isStrong":true},{"fullName":"Aventus.IData","isStrong":true},{"fullName":"Date","isStrong":false}],"fullName":"AventusSharp.Data.StorableTimestamp","required":false,"type":2,"isExported":true,"convertibleName":""},{"code":"(function (WsErrorCode) {\n WsErrorCode[WsErrorCode[\"UnknowError\"] = 0] = \"UnknowError\";\n WsErrorCode[WsErrorCode[\"CantDefineAssembly\"] = 1] = \"CantDefineAssembly\";\n WsErrorCode[WsErrorCode[\"ConfigError\"] = 2] = \"ConfigError\";\n WsErrorCode[WsErrorCode[\"MultipleMainEndpoint\"] = 3] = \"MultipleMainEndpoint\";\n WsErrorCode[WsErrorCode[\"CantGetValueFromBody\"] = 4] = \"CantGetValueFromBody\";\n WsErrorCode[WsErrorCode[\"NoConnection\"] = 5] = \"NoConnection\";\n WsErrorCode[WsErrorCode[\"NoEndPoint\"] = 6] = \"NoEndPoint\";\n WsErrorCode[WsErrorCode[\"NoPath\"] = 7] = \"NoPath\";\n})(WebSocket.WsErrorCode || (WebSocket.WsErrorCode = {}));\n_.WebSocket.WsErrorCode=WebSocket.WsErrorCode;\r\n","dependances":[],"fullName":"AventusSharp.WebSocket.WsErrorCode","required":false,"type":6,"isExported":true,"convertibleName":""},{"code":"(function (SocketErrorCode) {\n SocketErrorCode[SocketErrorCode[\"socketClosed\"] = 0] = \"socketClosed\";\n SocketErrorCode[SocketErrorCode[\"timeout\"] = 1] = \"timeout\";\n SocketErrorCode[SocketErrorCode[\"differentChannel\"] = 2] = \"differentChannel\";\n SocketErrorCode[SocketErrorCode[\"unknow\"] = 3] = \"unknow\";\n})(WebSocket.SocketErrorCode || (WebSocket.SocketErrorCode = {}));\n_.WebSocket.SocketErrorCode=WebSocket.SocketErrorCode;\r\n","dependances":[],"fullName":"AventusSharp.WebSocket.SocketErrorCode","required":false,"type":6,"isExported":true,"convertibleName":""},{"code":"WebSocket.Socket=class Socket {\n static Debug = false;\n static connections = {};\n static getInstance(url, el) {\n if (!this.connections[url]) {\n this.connections[url] = new WebSocket.Socket(url, el);\n }\n else {\n this.connections[url].registerEl(el);\n }\n return this.connections[url];\n }\n socket;\n url;\n elements = [];\n reopenInterval = 0;\n onOpen = new Aventus.Callback();\n onClose = new Aventus.Callback();\n onError = new Aventus.Callback();\n onMessage = new Aventus.Callback();\n get readyState() {\n return this.socket.readyState;\n }\n constructor(url, el) {\n this.url = url;\n this.elements = [el];\n this.socket = this.createWebSocket();\n this.reopen = this.reopen.bind(this);\n this.onClose.add(this.reopen);\n }\n registerEl(el) {\n if (!this.elements.includes(el)) {\n this.elements.push(el);\n }\n }\n createWebSocket() {\n this.removeSocket();\n const socket = new window.WebSocket(this.url);\n socket.onopen = (e) => {\n clearInterval(this.reopenInterval);\n this.onOpen.trigger([e]);\n };\n socket.onclose = (e) => {\n this.onClose.trigger([e]);\n };\n socket.onerror = (e) => {\n this.onError.trigger([e]);\n };\n socket.onmessage = (e) => {\n this.onMessage.trigger([e]);\n };\n this.socket = socket;\n return socket;\n }\n removeSocket() {\n if (this.socket) {\n this.socket.onopen = null;\n this.socket.onclose = null;\n this.socket.onerror = null;\n this.socket.onmessage = null;\n this.socket.close();\n }\n }\n reopen() {\n clearInterval(this.reopenInterval);\n this.reopenInterval = setInterval(async () => {\n console.warn(\"try reopen socket \");\n await this.createWebSocket();\n if (this.isReady()) {\n clearInterval(this.reopenInterval);\n }\n }, 5000);\n }\n close(el, code, reason) {\n let index = this.elements.indexOf(el);\n if (index != -1) {\n this.elements.splice(0, 1);\n }\n if (this.elements.length == 0) {\n this.removeSocket();\n delete WebSocket.Socket.connections[this.url];\n }\n }\n send(data) {\n this.socket.send(data);\n }\n /**\n * Check if socket is ready\n */\n isReady() {\n return this.socket.readyState == 1;\n }\n}\nWebSocket.Socket.Namespace=`AventusSharp.WebSocket`;\r\n_.WebSocket.Socket=WebSocket.Socket;\r\n","dependances":[{"fullName":"AventusSharp.WebSocket.Socket","isStrong":false},{"fullName":"WebSocket","isStrong":false},{"fullName":"Aventus.Callback","isStrong":false},{"fullName":"Event","isStrong":false},{"fullName":"MessageEvent","isStrong":false},{"fullName":"ArrayBufferLike","isStrong":false},{"fullName":"Blob","isStrong":false},{"fullName":"ArrayBufferView","isStrong":false}],"fullName":"AventusSharp.WebSocket.Socket","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"(function (RouteErrorCode) {\n RouteErrorCode[RouteErrorCode[\"UnknowError\"] = 0] = \"UnknowError\";\n RouteErrorCode[RouteErrorCode[\"FormContentTypeUnknown\"] = 1] = \"FormContentTypeUnknown\";\n RouteErrorCode[RouteErrorCode[\"CantGetValueFromBody\"] = 2] = \"CantGetValueFromBody\";\n RouteErrorCode[RouteErrorCode[\"CantMoveFile\"] = 3] = \"CantMoveFile\";\n RouteErrorCode[RouteErrorCode[\"CantCreateFolders\"] = 4] = \"CantCreateFolders\";\n RouteErrorCode[RouteErrorCode[\"RouteAlreadyExist\"] = 5] = \"RouteAlreadyExist\";\n})(Routes.RouteErrorCode || (Routes.RouteErrorCode = {}));\n_.Routes.RouteErrorCode=Routes.RouteErrorCode;\r\n","dependances":[],"fullName":"AventusSharp.Routes.RouteErrorCode","required":false,"type":6,"isExported":true,"convertibleName":""},{"code":"(function (DataErrorCode) {\n DataErrorCode[DataErrorCode[\"DefaultDMGenericType\"] = 0] = \"DefaultDMGenericType\";\n DataErrorCode[DataErrorCode[\"DMOnlyForceInherit\"] = 1] = \"DMOnlyForceInherit\";\n DataErrorCode[DataErrorCode[\"TypeNotStorable\"] = 2] = \"TypeNotStorable\";\n DataErrorCode[DataErrorCode[\"TypeTooMuchStorable\"] = 3] = \"TypeTooMuchStorable\";\n DataErrorCode[DataErrorCode[\"GenericNotAbstract\"] = 4] = \"GenericNotAbstract\";\n DataErrorCode[DataErrorCode[\"ParentNotAbstract\"] = 5] = \"ParentNotAbstract\";\n DataErrorCode[DataErrorCode[\"InfiniteLoop\"] = 6] = \"InfiniteLoop\";\n DataErrorCode[DataErrorCode[\"InterfaceNotUnique\"] = 7] = \"InterfaceNotUnique\";\n DataErrorCode[DataErrorCode[\"SelfReferecingDependance\"] = 8] = \"SelfReferecingDependance\";\n DataErrorCode[DataErrorCode[\"DMNotExist\"] = 9] = \"DMNotExist\";\n DataErrorCode[DataErrorCode[\"DMAlreadyExist\"] = 10] = \"DMAlreadyExist\";\n DataErrorCode[DataErrorCode[\"MethodNotFound\"] = 11] = \"MethodNotFound\";\n DataErrorCode[DataErrorCode[\"StorageDisconnected\"] = 12] = \"StorageDisconnected\";\n DataErrorCode[DataErrorCode[\"StorageNotFound\"] = 13] = \"StorageNotFound\";\n DataErrorCode[DataErrorCode[\"NoConnectionInsideStorage\"] = 14] = \"NoConnectionInsideStorage\";\n DataErrorCode[DataErrorCode[\"TypeNotExistInsideStorage\"] = 15] = \"TypeNotExistInsideStorage\";\n DataErrorCode[DataErrorCode[\"UnknowError\"] = 16] = \"UnknowError\";\n DataErrorCode[DataErrorCode[\"NoItemProvided\"] = 17] = \"NoItemProvided\";\n DataErrorCode[DataErrorCode[\"NoTransactionInProgress\"] = 18] = \"NoTransactionInProgress\";\n DataErrorCode[DataErrorCode[\"WrongType\"] = 19] = \"WrongType\";\n DataErrorCode[DataErrorCode[\"NoTypeIdentifierFoundInsideQuery\"] = 20] = \"NoTypeIdentifierFoundInsideQuery\";\n DataErrorCode[DataErrorCode[\"ItemNoExistInsideStorage\"] = 21] = \"ItemNoExistInsideStorage\";\n DataErrorCode[DataErrorCode[\"ItemAlreadyExist\"] = 22] = \"ItemAlreadyExist\";\n DataErrorCode[DataErrorCode[\"ValidationError\"] = 23] = \"ValidationError\";\n DataErrorCode[DataErrorCode[\"GetAllNotAllowed\"] = 24] = \"GetAllNotAllowed\";\n DataErrorCode[DataErrorCode[\"GetByIdNotAllowed\"] = 25] = \"GetByIdNotAllowed\";\n DataErrorCode[DataErrorCode[\"GetByIdsNotAllowed\"] = 26] = \"GetByIdsNotAllowed\";\n DataErrorCode[DataErrorCode[\"WhereNotAllowed\"] = 27] = \"WhereNotAllowed\";\n DataErrorCode[DataErrorCode[\"CreateNotAllowed\"] = 28] = \"CreateNotAllowed\";\n DataErrorCode[DataErrorCode[\"UpdateNotAllowed\"] = 29] = \"UpdateNotAllowed\";\n DataErrorCode[DataErrorCode[\"DeleteNotAllowed\"] = 30] = \"DeleteNotAllowed\";\n DataErrorCode[DataErrorCode[\"NumberOfItemsNotMatching\"] = 31] = \"NumberOfItemsNotMatching\";\n DataErrorCode[DataErrorCode[\"FieldTypeNotFound\"] = 32] = \"FieldTypeNotFound\";\n DataErrorCode[DataErrorCode[\"MemberNotFound\"] = 33] = \"MemberNotFound\";\n DataErrorCode[DataErrorCode[\"TooMuchMemberFound\"] = 34] = \"TooMuchMemberFound\";\n DataErrorCode[DataErrorCode[\"TypeNotFound\"] = 35] = \"TypeNotFound\";\n DataErrorCode[DataErrorCode[\"ReverseLinkNotExist\"] = 36] = \"ReverseLinkNotExist\";\n DataErrorCode[DataErrorCode[\"ErrorCreatingReverseQuery\"] = 37] = \"ErrorCreatingReverseQuery\";\n DataErrorCode[DataErrorCode[\"LinkNotSet\"] = 38] = \"LinkNotSet\";\n})(Data.DataErrorCode || (Data.DataErrorCode = {}));\n_.Data.DataErrorCode=Data.DataErrorCode;\r\n","dependances":[],"fullName":"AventusSharp.Data.DataErrorCode","required":false,"type":6,"isExported":true,"convertibleName":""},{"code":"Data.SharpClass=class SharpClass {\n /**\n * The current namespace\n */\n get namespace() {\n return this.constructor['Namespace'];\n }\n /**\n * Get the unique type for the data. Define it as the namespace + class name\n */\n get $type() {\n return this.constructor['Fullname'];\n }\n /**\n * Get the name of the class\n */\n get className() {\n return this.constructor.name;\n }\n /**\n * Clone the object by transforming a parsed JSON string back into the original type\n */\n clone() {\n return Aventus.Converter.transform(JSON.parse(JSON.stringify(this)));\n }\n /**\n * Get a JSON for the current object\n */\n toJSON() {\n let toAvoid = ['className', 'namespace'];\n return Aventus.Json.classToJson(this, {\n isValidKey: (key) => !toAvoid.includes(key),\n beforeEnd: (result) => {\n let resultTemp = {};\n if (result.$type) {\n resultTemp.$type = result.$type;\n for (let key in result) {\n if (key != '$type') {\n resultTemp[key] = result[key];\n }\n }\n return resultTemp;\n }\n return result;\n }\n });\n }\n}\nData.SharpClass.Namespace=`AventusSharp.Data`;\r\n_.Data.SharpClass=Data.SharpClass;\r\n","dependances":[{"fullName":"Aventus.Converter","isStrong":false},{"fullName":"Aventus.Json","isStrong":false}],"fullName":"AventusSharp.Data.SharpClass","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"Data.FieldErrorInfo=class FieldErrorInfo extends Data.SharpClass {\n static get Fullname() { return \"AventusSharp.Data.FieldErrorInfo, AventusSharp\"; }\n Name;\n}\nData.FieldErrorInfo.Namespace=`AventusSharp.Data`;\r\nData.FieldErrorInfo.$schema={...(Data.SharpClass?.$schema ?? {}), \"Name\":\"string\"};\r\nAventus.Converter.register(Data.FieldErrorInfo.Fullname, Data.FieldErrorInfo);\r\n_.Data.FieldErrorInfo=Data.FieldErrorInfo;\r\n","dependances":[{"fullName":"AventusSharp.Data.SharpClass","isStrong":true},{"fullName":"Convertible","isStrong":false}],"fullName":"AventusSharp.Data.FieldErrorInfo","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"Data.AventusFile=class AventusFile {\n static get Fullname() { return \"AventusSharp.Data.AventusFile, AventusSharp\"; }\n Uri;\n Upload;\n /**\n * Get the unique type for the data. Define it as the namespace + class name\n */\n get $type() {\n return this.constructor['Fullname'];\n }\n /**\n * @inerhit\n */\n toJSON() {\n let toAvoid = ['className', 'namespace'];\n return Aventus.Json.classToJson(this, {\n isValidKey: (key) => !toAvoid.includes(key),\n beforeEnd: (result) => {\n let resultTemp = {};\n if (result.$type) {\n resultTemp.$type = result.$type;\n for (let key in result) {\n if (key != '$type') {\n resultTemp[key] = result[key];\n }\n }\n return resultTemp;\n }\n return result;\n }\n });\n }\n}\nData.AventusFile.Namespace=`AventusSharp.Data`;\r\nData.AventusFile.$schema={\"Uri\":\"string\",\"Upload\":\"File\",\"$type\":\"string\"};\r\nAventus.Converter.register(Data.AventusFile.Fullname, Data.AventusFile);\r\n_.Data.AventusFile=Data.AventusFile;\r\n","dependances":[{"fullName":"Convertible","isStrong":false},{"fullName":"Uri","isStrong":false},{"fullName":"File","isStrong":false},{"fullName":"Aventus.Json","isStrong":false}],"fullName":"AventusSharp.Data.AventusFile","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"Data.Datetime=class Datetime extends Data.SharpClass {\n static get Fullname() { return \"AventusSharp.Data.Datetime, AventusSharp\"; }\n DateTime;\n}\nData.Datetime.Namespace=`AventusSharp.Data`;\r\nData.Datetime.$schema={...(Data.SharpClass?.$schema ?? {}), \"DateTime\":\"AventusSharp.RealDate\"};\r\nAventus.Converter.register(Data.Datetime.Fullname, Data.Datetime);\r\n_.Data.Datetime=Data.Datetime;\r\n","dependances":[{"fullName":"AventusSharp.Data.SharpClass","isStrong":true},{"fullName":"Convertible","isStrong":false},{"fullName":"AventusSharp.RealDate","isStrong":false}],"fullName":"AventusSharp.Data.Datetime","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"Data.Date=class Date extends Data.SharpClass {\n static get Fullname() { return \"AventusSharp.Data.Date, AventusSharp\"; }\n DateTime;\n}\nData.Date.Namespace=`AventusSharp.Data`;\r\nData.Date.$schema={...(Data.SharpClass?.$schema ?? {}), \"DateTime\":\"AventusSharp.RealDate\"};\r\nAventus.Converter.register(Data.Date.Fullname, Data.Date);\r\n_.Data.Date=Data.Date;\r\n","dependances":[{"fullName":"AventusSharp.Data.SharpClass","isStrong":true},{"fullName":"Convertible","isStrong":false},{"fullName":"AventusSharp.RealDate","isStrong":false}],"fullName":"AventusSharp.Data.Date","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"Data.DataError=class DataError extends Aventus.GenericError {\n static get Fullname() { return \"AventusSharp.Data.DataError, AventusSharp\"; }\n}\nData.DataError.Namespace=`AventusSharp.Data`;\r\nData.DataError.$schema={...(Aventus.GenericError?.$schema ?? {}), };\r\nAventus.Converter.register(Data.DataError.Fullname, Data.DataError);\r\n_.Data.DataError=Data.DataError;\r\n","dependances":[{"fullName":"Aventus.GenericError","isStrong":true},{"fullName":"AventusSharp.Data.DataErrorCode","isStrong":true},{"fullName":"Convertible","isStrong":false}],"fullName":"AventusSharp.Data.DataError","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"Tools.VoidWithError=class VoidWithError extends Aventus.VoidWithError {\n static get Fullname() { return \"AventusSharp.Tools.VoidWithError, AventusSharp\"; }\n}\nTools.VoidWithError.Namespace=`AventusSharp.Tools`;\r\nTools.VoidWithError.$schema={...(Aventus.VoidWithError?.$schema ?? {}), };\r\nAventus.Converter.register(Tools.VoidWithError.Fullname, Tools.VoidWithError);\r\n_.Tools.VoidWithError=Tools.VoidWithError;\r\n","dependances":[{"fullName":"Aventus.VoidWithError","isStrong":true},{"fullName":"AventusSharp.Tools.IWithError","isStrong":true},{"fullName":"Convertible","isStrong":false},{"fullName":"Aventus.GenericError","isStrong":false}],"fullName":"AventusSharp.Tools.VoidWithError","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"Data.VoidWithDataError=class VoidWithDataError extends Tools.VoidWithError {\n static get Fullname() { return \"AventusSharp.Data.VoidWithDataError, AventusSharp\"; }\n}\nData.VoidWithDataError.Namespace=`AventusSharp.Data`;\r\nData.VoidWithDataError.$schema={...(Tools.VoidWithError?.$schema ?? {}), };\r\nAventus.Converter.register(Data.VoidWithDataError.Fullname, Data.VoidWithDataError);\r\n_.Data.VoidWithDataError=Data.VoidWithDataError;\r\n","dependances":[{"fullName":"AventusSharp.Tools.VoidWithError","isStrong":true},{"fullName":"AventusSharp.Data.DataError","isStrong":false},{"fullName":"Convertible","isStrong":false}],"fullName":"AventusSharp.Data.VoidWithDataError","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"Tools.ResultWithError=class ResultWithError extends Aventus.ResultWithError {\n static get Fullname() { return \"AventusSharp.Tools.ResultWithError, AventusSharp\"; }\n}\nTools.ResultWithError.Namespace=`AventusSharp.Tools`;\r\nTools.ResultWithError.$schema={...(Aventus.ResultWithError?.$schema ?? {}), };\r\nAventus.Converter.register(Tools.ResultWithError.Fullname, Tools.ResultWithError);\r\n_.Tools.ResultWithError=Tools.ResultWithError;\r\n","dependances":[{"fullName":"Aventus.ResultWithError","isStrong":true},{"fullName":"AventusSharp.Tools.IResultWithError","isStrong":true},{"fullName":"Convertible","isStrong":false},{"fullName":"Aventus.GenericError","isStrong":false}],"fullName":"AventusSharp.Tools.ResultWithError","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"Routes.StorableRouter=class StorableRouter extends Aventus.HttpRoute {\n constructor(router) {\n super(router);\n this.GetAll = this.GetAll.bind(this);\n this.Create = this.Create.bind(this);\n this.CreateMany = this.CreateMany.bind(this);\n this.GetById = this.GetById.bind(this);\n this.GetByIds = this.GetByIds.bind(this);\n this.Update = this.Update.bind(this);\n this.UpdateMany = this.UpdateMany.bind(this);\n this.Delete = this.Delete.bind(this);\n this.DeleteMany = this.DeleteMany.bind(this);\n }\n async GetAll() {\n const request = new Aventus.HttpRequest(`${this.getPrefix()}/${this.StorableName()}`, Aventus.HttpMethod.GET);\n return await request.queryJSON(this.router);\n }\n async Create(body) {\n const request = new Aventus.HttpRequest(`${this.getPrefix()}/${this.StorableName()}`, Aventus.HttpMethod.POST);\n request.setBody(body);\n return await request.queryJSON(this.router);\n }\n async CreateMany(body) {\n const request = new Aventus.HttpRequest(`${this.getPrefix()}/${this.StorableName()}s`, Aventus.HttpMethod.POST);\n request.setBody(body);\n return await request.queryJSON(this.router);\n }\n async GetById(id) {\n const request = new Aventus.HttpRequest(`${this.getPrefix()}/${this.StorableName()}/${id}`, Aventus.HttpMethod.GET);\n return await request.queryJSON(this.router);\n }\n async GetByIds(body) {\n const request = new Aventus.HttpRequest(`${this.getPrefix()}/${this.StorableName()}/getbyids`, Aventus.HttpMethod.POST);\n request.setBody(body);\n return await request.queryJSON(this.router);\n }\n async Update(id, body) {\n const request = new Aventus.HttpRequest(`${this.getPrefix()}/${this.StorableName()}/${id}`, Aventus.HttpMethod.PUT);\n request.setBody(body);\n return await request.queryJSON(this.router);\n }\n async UpdateMany(body) {\n const request = new Aventus.HttpRequest(`${this.getPrefix()}/${this.StorableName()}s`, Aventus.HttpMethod.PUT);\n request.setBody(body);\n return await request.queryJSON(this.router);\n }\n async Delete(id) {\n const request = new Aventus.HttpRequest(`${this.getPrefix()}/${this.StorableName()}/${id}`, Aventus.HttpMethod.DELETE);\n return await request.queryJSON(this.router);\n }\n async DeleteMany(body) {\n const request = new Aventus.HttpRequest(`${this.getPrefix()}/${this.StorableName()}s`, Aventus.HttpMethod.DELETE);\n request.setBody(body);\n return await request.queryJSON(this.router);\n }\n}\nRoutes.StorableRouter.Namespace=`AventusSharp.Routes`;\r\n_.Routes.StorableRouter=Routes.StorableRouter;\r\n","dependances":[{"fullName":"Aventus.HttpRoute","isStrong":true},{"fullName":"Aventus.IData","isStrong":false},{"fullName":"BindThis","isStrong":false},{"fullName":"Promise","isStrong":false},{"fullName":"AventusSharp.Tools.ResultWithError","isStrong":false},{"fullName":"Aventus.HttpRequest","isStrong":false},{"fullName":"Aventus.HttpMethod","isStrong":false},{"fullName":"TypeResult","isStrong":false},{"fullName":"FormData","isStrong":false}],"fullName":"AventusSharp.Routes.StorableRouter","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"Data.ResultWithDataError=class ResultWithDataError extends Tools.ResultWithError {\n static get Fullname() { return \"AventusSharp.Data.ResultWithDataError, AventusSharp\"; }\n}\nData.ResultWithDataError.Namespace=`AventusSharp.Data`;\r\nData.ResultWithDataError.$schema={...(Tools.ResultWithError?.$schema ?? {}), };\r\nAventus.Converter.register(Data.ResultWithDataError.Fullname, Data.ResultWithDataError);\r\n_.Data.ResultWithDataError=Data.ResultWithDataError;\r\n","dependances":[{"fullName":"AventusSharp.Tools.ResultWithError","isStrong":true},{"fullName":"AventusSharp.Data.DataError","isStrong":false},{"fullName":"Convertible","isStrong":false}],"fullName":"AventusSharp.Data.ResultWithDataError","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"Routes.RouteError=class RouteError extends Aventus.GenericError {\n static get Fullname() { return \"AventusSharp.Routes.RouteError, AventusSharp\"; }\n}\nRoutes.RouteError.Namespace=`AventusSharp.Routes`;\r\nRoutes.RouteError.$schema={...(Aventus.GenericError?.$schema ?? {}), };\r\nAventus.Converter.register(Routes.RouteError.Fullname, Routes.RouteError);\r\n_.Routes.RouteError=Routes.RouteError;\r\n","dependances":[{"fullName":"Aventus.GenericError","isStrong":true},{"fullName":"AventusSharp.Routes.RouteErrorCode","isStrong":true},{"fullName":"Convertible","isStrong":false}],"fullName":"AventusSharp.Routes.RouteError","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"Routes.ResultWithRouteError=class ResultWithRouteError extends Tools.ResultWithError {\n static get Fullname() { return \"AventusSharp.Routes.ResultWithRouteError, AventusSharp\"; }\n}\nRoutes.ResultWithRouteError.Namespace=`AventusSharp.Routes`;\r\nRoutes.ResultWithRouteError.$schema={...(Tools.ResultWithError?.$schema ?? {}), };\r\nAventus.Converter.register(Routes.ResultWithRouteError.Fullname, Routes.ResultWithRouteError);\r\n_.Routes.ResultWithRouteError=Routes.ResultWithRouteError;\r\n","dependances":[{"fullName":"AventusSharp.Tools.ResultWithError","isStrong":true},{"fullName":"AventusSharp.Routes.RouteError","isStrong":false},{"fullName":"Convertible","isStrong":false}],"fullName":"AventusSharp.Routes.ResultWithRouteError","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"Routes.VoidWithRouteError=class VoidWithRouteError extends Tools.VoidWithError {\n static get Fullname() { return \"AventusSharp.Routes.VoidWithRouteError, AventusSharp\"; }\n}\nRoutes.VoidWithRouteError.Namespace=`AventusSharp.Routes`;\r\nRoutes.VoidWithRouteError.$schema={...(Tools.VoidWithError?.$schema ?? {}), };\r\nAventus.Converter.register(Routes.VoidWithRouteError.Fullname, Routes.VoidWithRouteError);\r\n_.Routes.VoidWithRouteError=Routes.VoidWithRouteError;\r\n","dependances":[{"fullName":"AventusSharp.Tools.VoidWithError","isStrong":true},{"fullName":"AventusSharp.Routes.RouteError","isStrong":false},{"fullName":"Convertible","isStrong":false}],"fullName":"AventusSharp.Routes.VoidWithRouteError","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"WebSocket.SocketError=class SocketError extends Aventus.GenericError {\n}\nWebSocket.SocketError.Namespace=`AventusSharp.WebSocket`;\r\n_.WebSocket.SocketError=WebSocket.SocketError;\r\n","dependances":[{"fullName":"Aventus.GenericError","isStrong":true},{"fullName":"AventusSharp.WebSocket.SocketErrorCode","isStrong":false}],"fullName":"AventusSharp.WebSocket.SocketError","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"WebSocket.Connection=class Connection {\n static Debug = false;\n options;\n waitingList = {};\n memoryBeforeOpen = [];\n socket;\n actionGuard = new Aventus.ActionGuard();\n /**\n * Create a singleton\n */\n static getInstance() {\n return Aventus.Instance.get(WebSocket.Connection);\n }\n constructor() {\n this.options = this._configure(this.configure({}));\n this._onOpen = this._onOpen.bind(this);\n this._onClose = this._onClose.bind(this);\n this._onError = this._onError.bind(this);\n this.onMessage = this.onMessage.bind(this);\n if (this.options.autoStart) {\n this.open();\n }\n }\n onOpen = new Aventus.Callback();\n onClose = new Aventus.Callback();\n onError = new Aventus.Callback();\n /**\n * Configure a new Websocket\n */\n _configure(options = {}) {\n if (!options.host) {\n options.host = window.location.hostname;\n }\n if (!options.hasOwnProperty('useHttps')) {\n options.useHttps = window.location.protocol == \"https:\";\n }\n if (!options.port) {\n if (window.location.port) {\n options.port = parseInt(window.location.port);\n }\n else {\n options.port = options.useHttps ? 443 : 80;\n }\n }\n if (!options.routes) {\n options.routes = {};\n }\n if (!options.socketName) {\n options.socketName = \"\";\n }\n if (options.log === undefined) {\n options.log = WebSocket.Connection.Debug;\n }\n if (options.autoStart === undefined) {\n options.autoStart = true;\n }\n if (options.sendPing !== undefined && options.sendPing <= 0) {\n options.sendPing = undefined;\n }\n if (options.logPrefix === undefined) {\n options.logPrefix = \"\";\n }\n return options;\n }\n getUrl() {\n let protocol = \"ws\";\n if (this.options.useHttps) {\n protocol = \"wss\";\n }\n let url = protocol + \"://\" + this.options.host + \":\" + this.options.port + this.options.socketName;\n return url;\n }\n /**\n * Add a new route to listen to the websocket\n */\n addRoute(newRoute) {\n if (!this.options.routes.hasOwnProperty(newRoute.channel)) {\n this.options.routes[newRoute.channel] = [];\n }\n for (let info of this.options.routes[newRoute.channel]) {\n if (info.callback == newRoute.callback) {\n return;\n }\n }\n const { params, regex } = Aventus.Uri.prepare(newRoute.channel);\n let prepared = {\n callback: newRoute.callback,\n channel: newRoute.channel,\n regex,\n params\n };\n this.options.routes[newRoute.channel].push(prepared);\n }\n /**\n * The route to remove\n * @param route - The route to remove\n */\n removeRoute(route) {\n for (let i = 0; i < this.options.routes[route.channel].length; i++) {\n let info = this.options.routes[route.channel][i];\n if (info.callback == route.callback) {\n this.options.routes[route.channel].splice(i, 1);\n i--;\n }\n }\n }\n openCallback;\n /**\n * Try to open the websocket\n */\n open() {\n return this.actionGuard.run([\"open\"], () => {\n return new Promise((resolve) => {\n try {\n let url = this.getUrl();\n this.log(\"Opening \" + url);\n this.openCallback = (isOpen) => {\n resolve(isOpen);\n };\n this.socket = WebSocket.Socket.getInstance(url, this);\n this.socket.onOpen.add(this._onOpen);\n this.socket.onClose.add(this._onClose);\n this.socket.onError.add(this._onError);\n this.socket.onMessage.add(this.onMessage);\n if (this.socket.isReady()) {\n this._onOpen();\n }\n }\n catch (e) {\n console.log(e);\n resolve(false);\n }\n });\n });\n }\n jsonReplacer(key, value) {\n if (this[key] instanceof Date) {\n return Aventus.DateConverter.converter.toString(this[key]);\n }\n return value;\n }\n /**\n * Send a message though the websocket\n * @param channelName The channel on which the message is sent\n * @param data The data to send\n * @param options the options to add to the message (typically the uid)\n */\n async sendMessage(options) {\n let result = new Tools.VoidWithError();\n if (!this.socket || this.socket.readyState != 1) {\n let isOpen = await this.open();\n if (!isOpen) {\n result.errors.push(new WebSocket.SocketError(WebSocket.SocketErrorCode.socketClosed, \"Socket not ready ! Please ensure that it is open and ready to send message\"));\n this.log('Socket not ready ! Please ensure that it is open and ready to send message');\n if (this.options.allowSendBeforeOpen) {\n this.memoryBeforeOpen.push(options);\n }\n return result;\n }\n }\n if (this.socket && this.socket.readyState == 1) {\n try {\n let message = {\n channel: options.channel,\n };\n if (options.uid) {\n message.uid = options.uid;\n }\n if (options.body) {\n message.data = options.body;\n this.log(message);\n if (typeof options.body != 'string') {\n message.data = JSON.stringify(options.body, this.jsonReplacer);\n }\n }\n else if (options.channel != \"/ping\") {\n this.log(message);\n }\n this.socket.send(JSON.stringify(message));\n }\n catch (e) {\n result.errors.push(new WebSocket.SocketError(WebSocket.SocketErrorCode.unknow, e));\n }\n }\n else {\n result.errors.push(new WebSocket.SocketError(WebSocket.SocketErrorCode.socketClosed, \"Socket not ready ! Please ensure that it is open and ready to send message\"));\n this.log('Socket not ready ! Please ensure that it is open and ready to send message');\n if (this.options.allowSendBeforeOpen) {\n this.memoryBeforeOpen.push(options);\n }\n }\n return result;\n }\n /**\n * Send a message though the websocket and wait one answer give in parameters callbacks\n * @param channelName The channel on which the message is sent\n * @param body The data to send\n * @param timeout The timeout before the request failed\n */\n sendMessageAndWait(options) {\n return new Promise(async (resolve) => {\n let result = new Aventus.ResultWithError();\n try {\n let _uid = options.uid ? options.uid : Aventus.uuidv4();\n options.uid = _uid;\n let timeoutInfo;\n this.waitingList[_uid] = (channel, data) => {\n clearTimeout(timeoutInfo);\n if (channel.toLowerCase() != options.channel.toLowerCase()) {\n result.errors.push(new WebSocket.SocketError(WebSocket.SocketErrorCode.differentChannel, `We sent a message on ${options.channel} but we receive on ${channel}`));\n resolve(result);\n }\n else {\n if (data instanceof Aventus.VoidWithError) {\n for (let error of data.errors) {\n result.errors.push(error);\n }\n if (data instanceof Aventus.ResultWithError) {\n result.result = data.result;\n }\n }\n else {\n result.result = data;\n }\n resolve(result);\n }\n };\n if (options.timeout !== undefined) {\n timeoutInfo = setTimeout(() => {\n delete this.waitingList[_uid];\n result.errors.push(new WebSocket.SocketError(WebSocket.SocketErrorCode.timeout, \"No message received after \" + options.timeout + \"ms\"));\n resolve(result);\n }, options.timeout);\n }\n let sendMessageResult = await this.sendMessage(options);\n if (!sendMessageResult.success) {\n for (let error of sendMessageResult.errors) {\n result.errors.push(error);\n }\n resolve(result);\n }\n }\n catch (e) {\n result.errors.push(new WebSocket.SocketError(WebSocket.SocketErrorCode.unknow, e));\n resolve(result);\n }\n });\n }\n ;\n /**\n * Check if socket is ready\n */\n isReady() {\n if (this.socket && this.socket.isReady()) {\n return true;\n }\n return false;\n }\n sendPingTimeout = 0;\n sendPing() {\n this.sendMessage({\n channel: \"/ping\",\n });\n }\n startPing() {\n clearInterval(this.sendPingTimeout);\n this.sendPingTimeout = setInterval(() => {\n this.sendPing();\n }, 5000);\n }\n stopPing() {\n clearInterval(this.sendPingTimeout);\n }\n _onOpen() {\n if (this.socket?.isReady()) {\n if (this.openCallback) {\n this.openCallback(true);\n this.openCallback = undefined;\n }\n let protocol = \"ws\";\n if (this.options.useHttps) {\n protocol = \"wss\";\n }\n this.log(`Connection successfully established to ${this.getUrl()}!`);\n this.onOpen.trigger([]);\n for (let i = 0; i < this.memoryBeforeOpen.length; i++) {\n this.sendMessage(this.memoryBeforeOpen[i]);\n }\n this.memoryBeforeOpen = [];\n if (this.options.sendPing) {\n this.startPing();\n }\n }\n else {\n if (this.openCallback) {\n this.openCallback(false);\n this.openCallback = undefined;\n }\n }\n }\n errorOccur = false;\n _onError(event) {\n this.errorOccur = true;\n if (this.openCallback) {\n this.openCallback(false);\n this.openCallback = undefined;\n return;\n }\n this.log('An error has occured');\n this.onError.trigger([event]);\n }\n _onClose(event) {\n this.stopPing();\n if (this.errorOccur) {\n this.errorOccur = false;\n return;\n }\n this.log('Closing connection');\n this.onClose.trigger([event]);\n }\n /**\n * Close the current connection\n */\n close() {\n if (this.socket) {\n this.socket.onOpen.remove(this._onOpen);\n this.socket.onClose.remove(this._onClose);\n this.socket.onError.remove(this._onError);\n this.socket.onMessage.remove(this.onMessage);\n this.socket.close(this);\n delete this.socket;\n }\n }\n onMessage(event) {\n let response = JSON.parse(event.data);\n this.log(response);\n let data = {};\n try {\n data = Aventus.Converter.transform(JSON.parse(response.data));\n }\n catch (e) {\n console.error(e);\n }\n for (let channel in this.options.routes) {\n let current = this.options.routes[channel];\n for (let info of current) {\n let params = Aventus.Uri.getParams(info, response.channel);\n if (params) {\n let valueCb = data;\n if (data instanceof Aventus.ResultWithError) {\n valueCb = data.result;\n }\n else if (data instanceof Aventus.VoidWithError) {\n valueCb = undefined;\n }\n info.callback(valueCb, params, response.uid);\n }\n }\n }\n if (response.uid) {\n if (this.waitingList.hasOwnProperty(response.uid)) {\n this.waitingList[response.uid](response.channel, data);\n delete this.waitingList[response.uid];\n }\n }\n }\n /**\n * Print a msg inside the console\n */\n log(message) {\n if (this.options.log) {\n const now = new Date();\n const hours = (now.getHours()).toLocaleString(undefined, { minimumIntegerDigits: 2 });\n const minutes = (now.getMinutes()).toLocaleString(undefined, { minimumIntegerDigits: 2 });\n const seconds = (now.getSeconds()).toLocaleString(undefined, { minimumIntegerDigits: 2 });\n const prefix = this.options.logPrefix ? `[${this.options.logPrefix}] ` : '';\n if (message instanceof Object) {\n let cloneMessage = JSON.parse(JSON.stringify(message, this.jsonReplacer));\n if (cloneMessage.data && typeof cloneMessage.data == 'string') {\n cloneMessage.data = JSON.parse(cloneMessage.data);\n }\n console.log(`${prefix}[${hours}:${minutes}:${seconds}]: `, cloneMessage);\n }\n else {\n console.log(`${prefix}[${hours}:${minutes}:${seconds}]: `, message);\n }\n }\n }\n}\nWebSocket.Connection.Namespace=`AventusSharp.WebSocket`;\r\n_.WebSocket.Connection=WebSocket.Connection;\r\n","dependances":[{"fullName":"Required","isStrong":false},{"fullName":"AventusSharp.WebSocket.ConnectionOptions","isStrong":false},{"fullName":"AventusSharp.WebSocket.SocketSendMessageOptions","isStrong":false},{"fullName":"AventusSharp.WebSocket.Socket","isStrong":false},{"fullName":"Aventus.ActionGuard","isStrong":false},{"fullName":"AventusSharp.WebSocket.Connection","isStrong":false},{"fullName":"Aventus.Instance","isStrong":false},{"fullName":"Aventus.Callback","isStrong":false},{"fullName":"Event","isStrong":false},{"fullName":"AventusSharp.WebSocket.SocketRoute","isStrong":false},{"fullName":"Aventus.Uri","isStrong":false},{"fullName":"AventusSharp.WebSocket.InternalSocketRoute","isStrong":false},{"fullName":"Promise","isStrong":false},{"fullName":"Date","isStrong":false},{"fullName":"Aventus.DateConverter","isStrong":false},{"fullName":"Aventus.VoidWithError","isStrong":false},{"fullName":"AventusSharp.Tools.VoidWithError","isStrong":false},{"fullName":"AventusSharp.WebSocket.SocketError","isStrong":false},{"fullName":"AventusSharp.WebSocket.SocketErrorCode","isStrong":false},{"fullName":"AventusSharp.WebSocket.SocketMessage","isStrong":false},{"fullName":"Aventus.ResultWithError","isStrong":false},{"fullName":"Aventus.ExtractFromError","isStrong":false},{"fullName":"T","isStrong":false},{"fullName":"Aventus.uuidv4","isStrong":false},{"fullName":"MessageEvent","isStrong":false},{"fullName":"Aventus.Converter","isStrong":false}],"fullName":"AventusSharp.WebSocket.Connection","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"WebSocket.EndPoint=class EndPoint extends WebSocket.Connection {\n /**\n * Create a singleton\n */\n static getInstance() {\n return Aventus.Instance.get(WebSocket.EndPoint);\n }\n constructor() {\n super();\n this.register();\n }\n register() {\n }\n /**\n * @inheritdoc\n */\n configure(options) {\n options.socketName = this.path;\n options.sendPing = 5000;\n return options;\n }\n get path() {\n return \"/ws\";\n }\n ;\n}\nWebSocket.EndPoint.Namespace=`AventusSharp.WebSocket`;\r\n_.WebSocket.EndPoint=WebSocket.EndPoint;\r\n","dependances":[{"fullName":"AventusSharp.WebSocket.Connection","isStrong":true},{"fullName":"AventusSharp.WebSocket.EndPoint","isStrong":false},{"fullName":"Aventus.Instance","isStrong":false},{"fullName":"AventusSharp.WebSocket.ConnectionOptions","isStrong":false}],"fullName":"AventusSharp.WebSocket.EndPoint","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"WebSocket.WsEvent=class WsEvent {\n endpoint;\n onTrigger = new Aventus.Callback();\n routeInfo;\n _listening = false;\n get listening() {\n return this._listening;\n }\n getPrefix;\n constructor(endpoint, getPrefix) {\n this.endpoint = endpoint ?? WebSocket.EndPoint.getInstance();\n this.getPrefix = getPrefix ?? (() => \"\");\n this.onEvent = this.onEvent.bind(this);\n }\n init() {\n this.routeInfo = {\n channel: this.path(),\n callback: this.onEvent\n };\n if (this.listenOnBoot()) {\n this.listen();\n }\n }\n /**\n * Override this method to tell that the event must listen when created\n */\n listenOnBoot() {\n return false;\n }\n /**\n * Add the event to the endpoint. After that, the on trigger event can be triggered\n */\n listen() {\n if (!this._listening) {\n this._listening = true;\n if (!this.routeInfo) {\n this.routeInfo = {\n channel: this.path(),\n callback: this.onEvent\n };\n }\n this.endpoint.addRoute(this.routeInfo);\n }\n }\n /**\n * Remove the event from the endpoint. After that, the on trigger event won't be triggered\n */\n stop() {\n if (this._listening) {\n this._listening = false;\n this.endpoint.removeRoute(this.routeInfo);\n }\n }\n onEvent(data, params, uid) {\n this.onTrigger.trigger([data, params, uid]);\n }\n}\nWebSocket.WsEvent.Namespace=`AventusSharp.WebSocket`;\r\n_.WebSocket.WsEvent=WebSocket.WsEvent;\r\n","dependances":[{"fullName":"AventusSharp.WebSocket.EndPoint","isStrong":false},{"fullName":"Aventus.Callback","isStrong":false},{"fullName":"Aventus.ExtractFromError","isStrong":false},{"fullName":"Aventus.UriParamsValue","isStrong":false},{"fullName":"AventusSharp.WebSocket.SocketRoute","isStrong":false}],"fullName":"AventusSharp.WebSocket.WsEvent","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"WebSocket.StorableWsRoute_DeleteMany=class StorableWsRoute_DeleteMany extends WebSocket.WsEvent {\n /**\n * @inheritdoc\n */\n path() {\n return `${this.getPrefix()}/${this.StorableName()}/DeleteMany`;\n }\n StorableName;\n constructor(endpoint, getPrefix, StorableName) {\n super(endpoint, getPrefix);\n this.StorableName = StorableName ?? (() => \"\");\n }\n}\nWebSocket.StorableWsRoute_DeleteMany.Namespace=`AventusSharp.WebSocket`;\r\n_.WebSocket.StorableWsRoute_DeleteMany=WebSocket.StorableWsRoute_DeleteMany;\r\n","dependances":[{"fullName":"AventusSharp.WebSocket.WsEvent","isStrong":true},{"fullName":"AventusSharp.Tools.ResultWithError","isStrong":false},{"fullName":"Aventus.IData","isStrong":false},{"fullName":"AventusSharp.WebSocket.EndPoint","isStrong":false}],"fullName":"AventusSharp.WebSocket.StorableWsRoute_DeleteMany","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"WebSocket.StorableWsRouter_Delete=class StorableWsRouter_Delete extends WebSocket.WsEvent {\n StorableName;\n constructor(endpoint, getPrefix, StorableName) {\n super(endpoint, getPrefix);\n this.StorableName = StorableName;\n }\n /**\n * @inheritdoc\n */\n path() {\n return `${this.getPrefix()}/${this.StorableName()}/{id:number}/Delete`;\n }\n}\nWebSocket.StorableWsRouter_Delete.Namespace=`AventusSharp.WebSocket`;\r\n_.WebSocket.StorableWsRouter_Delete=WebSocket.StorableWsRouter_Delete;\r\n","dependances":[{"fullName":"AventusSharp.WebSocket.WsEvent","isStrong":true},{"fullName":"AventusSharp.WebSocket.EndPoint","isStrong":false}],"fullName":"AventusSharp.WebSocket.StorableWsRouter_Delete","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"WebSocket.StorableWsRoute_UpdateMany=class StorableWsRoute_UpdateMany extends WebSocket.WsEvent {\n /**\n * @inheritdoc\n */\n path() {\n return `${this.getPrefix()}/${this.StorableName()}/UpdateMany`;\n }\n StorableName;\n constructor(endpoint, getPrefix, StorableName) {\n super(endpoint, getPrefix);\n this.StorableName = StorableName ?? (() => \"\");\n }\n}\nWebSocket.StorableWsRoute_UpdateMany.Namespace=`AventusSharp.WebSocket`;\r\n_.WebSocket.StorableWsRoute_UpdateMany=WebSocket.StorableWsRoute_UpdateMany;\r\n","dependances":[{"fullName":"AventusSharp.WebSocket.WsEvent","isStrong":true},{"fullName":"AventusSharp.Tools.ResultWithError","isStrong":false},{"fullName":"Aventus.IData","isStrong":false},{"fullName":"AventusSharp.WebSocket.EndPoint","isStrong":false}],"fullName":"AventusSharp.WebSocket.StorableWsRoute_UpdateMany","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"WebSocket.StorableWsRouter_Update=class StorableWsRouter_Update extends WebSocket.WsEvent {\n StorableName;\n constructor(endpoint, getPrefix, StorableName) {\n super(endpoint, getPrefix);\n this.StorableName = StorableName;\n }\n /**\n * @inheritdoc\n */\n path() {\n return `${this.getPrefix()}/${this.StorableName()}/{id:number}/Update`;\n }\n}\nWebSocket.StorableWsRouter_Update.Namespace=`AventusSharp.WebSocket`;\r\n_.WebSocket.StorableWsRouter_Update=WebSocket.StorableWsRouter_Update;\r\n","dependances":[{"fullName":"AventusSharp.WebSocket.WsEvent","isStrong":true},{"fullName":"AventusSharp.WebSocket.EndPoint","isStrong":false}],"fullName":"AventusSharp.WebSocket.StorableWsRouter_Update","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"WebSocket.StorableWsRouter_GetByIds=class StorableWsRouter_GetByIds extends WebSocket.WsEvent {\n StorableName;\n constructor(endpoint, getPrefix, StorableName) {\n super(endpoint, getPrefix);\n this.StorableName = StorableName;\n }\n /**\n * @inheritdoc\n */\n path() {\n return `${this.getPrefix()}/${this.StorableName()}/getbyids`;\n }\n}\nWebSocket.StorableWsRouter_GetByIds.Namespace=`AventusSharp.WebSocket`;\r\n_.WebSocket.StorableWsRouter_GetByIds=WebSocket.StorableWsRouter_GetByIds;\r\n","dependances":[{"fullName":"AventusSharp.WebSocket.WsEvent","isStrong":true},{"fullName":"AventusSharp.WebSocket.EndPoint","isStrong":false}],"fullName":"AventusSharp.WebSocket.StorableWsRouter_GetByIds","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"WebSocket.StorableWsRouter_GetById=class StorableWsRouter_GetById extends WebSocket.WsEvent {\n StorableName;\n constructor(endpoint, getPrefix, StorableName) {\n super(endpoint, getPrefix);\n this.StorableName = StorableName;\n }\n /**\n * @inheritdoc\n */\n path() {\n return `${this.getPrefix()}/${this.StorableName()}/{id:number}`;\n }\n}\nWebSocket.StorableWsRouter_GetById.Namespace=`AventusSharp.WebSocket`;\r\n_.WebSocket.StorableWsRouter_GetById=WebSocket.StorableWsRouter_GetById;\r\n","dependances":[{"fullName":"AventusSharp.WebSocket.WsEvent","isStrong":true},{"fullName":"AventusSharp.WebSocket.EndPoint","isStrong":false}],"fullName":"AventusSharp.WebSocket.StorableWsRouter_GetById","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"WebSocket.StorableWsRoute_CreateMany=class StorableWsRoute_CreateMany extends WebSocket.WsEvent {\n /**\n * @inheritdoc\n */\n path() {\n return `${this.getPrefix()}/${this.StorableName()}/CreateMany`;\n }\n StorableName;\n constructor(endpoint, getPrefix, StorableName) {\n super(endpoint, getPrefix);\n this.StorableName = StorableName ?? (() => \"\");\n }\n}\nWebSocket.StorableWsRoute_CreateMany.Namespace=`AventusSharp.WebSocket`;\r\n_.WebSocket.StorableWsRoute_CreateMany=WebSocket.StorableWsRoute_CreateMany;\r\n","dependances":[{"fullName":"AventusSharp.WebSocket.WsEvent","isStrong":true},{"fullName":"AventusSharp.Tools.ResultWithError","isStrong":false},{"fullName":"Aventus.IData","isStrong":false},{"fullName":"AventusSharp.WebSocket.EndPoint","isStrong":false}],"fullName":"AventusSharp.WebSocket.StorableWsRoute_CreateMany","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"WebSocket.StorableWsRouter_Create=class StorableWsRouter_Create extends WebSocket.WsEvent {\n StorableName;\n constructor(endpoint, getPrefix, StorableName) {\n super(endpoint, getPrefix);\n this.StorableName = StorableName;\n }\n /**\n * @inheritdoc\n */\n path() {\n return `${this.getPrefix()}/${this.StorableName()}/Create`;\n }\n}\nWebSocket.StorableWsRouter_Create.Namespace=`AventusSharp.WebSocket`;\r\n_.WebSocket.StorableWsRouter_Create=WebSocket.StorableWsRouter_Create;\r\n","dependances":[{"fullName":"AventusSharp.WebSocket.WsEvent","isStrong":true},{"fullName":"AventusSharp.WebSocket.EndPoint","isStrong":false}],"fullName":"AventusSharp.WebSocket.StorableWsRouter_Create","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"WebSocket.StorableWsRouter_GetAll=class StorableWsRouter_GetAll extends WebSocket.WsEvent {\n StorableName;\n constructor(endpoint, getPrefix, StorableName) {\n super(endpoint, getPrefix);\n this.StorableName = StorableName;\n }\n /**\n * @inheritdoc\n */\n path() {\n return `${this.getPrefix()}/${this.StorableName()}`;\n }\n}\nWebSocket.StorableWsRouter_GetAll.Namespace=`AventusSharp.WebSocket`;\r\n_.WebSocket.StorableWsRouter_GetAll=WebSocket.StorableWsRouter_GetAll;\r\n","dependances":[{"fullName":"AventusSharp.WebSocket.WsEvent","isStrong":true},{"fullName":"AventusSharp.WebSocket.EndPoint","isStrong":false}],"fullName":"AventusSharp.WebSocket.StorableWsRouter_GetAll","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"WebSocket.Router=class Router {\n endpoint;\n events;\n constructor(endpoint) {\n this.endpoint = endpoint ?? WebSocket.EndPoint.getInstance();\n this.events = this.defineEvents();\n for (let key in this.events) {\n this.events[key].init();\n }\n }\n getPrefix() {\n return \"\";\n }\n defineEvents() {\n return {};\n }\n}\nWebSocket.Router.Namespace=`AventusSharp.WebSocket`;\r\n_.WebSocket.Router=WebSocket.Router;\r\n","dependances":[{"fullName":"AventusSharp.WebSocket.RouterRoutes","isStrong":false},{"fullName":"AventusSharp.WebSocket.EndPoint","isStrong":false},{"fullName":"Partial","isStrong":false}],"fullName":"AventusSharp.WebSocket.Router","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"WebSocket.StorableWsRouter=class StorableWsRouter extends WebSocket.Router {\n defineEvents() {\n return {\n ...super.defineEvents(),\n GetAll: new WebSocket.StorableWsRouter_GetAll(this.endpoint, this.getPrefix, this.StorableName),\n Create: new WebSocket.StorableWsRouter_Create(this.endpoint, this.getPrefix, this.StorableName),\n CreateMany: new WebSocket.StorableWsRoute_CreateMany(this.endpoint, this.getPrefix, this.StorableName),\n GetById: new WebSocket.StorableWsRouter_GetById(this.endpoint, this.getPrefix, this.StorableName),\n GetByIds: new WebSocket.StorableWsRouter_GetByIds(this.endpoint, this.getPrefix, this.StorableName),\n Update: new WebSocket.StorableWsRouter_Update(this.endpoint, this.getPrefix, this.StorableName),\n UpdateMany: new WebSocket.StorableWsRoute_UpdateMany(this.endpoint, this.getPrefix, this.StorableName),\n Delete: new WebSocket.StorableWsRouter_Delete(this.endpoint, this.getPrefix, this.StorableName),\n DeleteMany: new WebSocket.StorableWsRoute_DeleteMany(this.endpoint, this.getPrefix, this.StorableName),\n };\n }\n async GetAll(options = {}) {\n const info = {\n channel: `${this.getPrefix()}/${this.StorableName()}`,\n ...options,\n };\n return await this.endpoint.sendMessageAndWait(info);\n }\n async Create(body, options = {}) {\n const info = {\n channel: `${this.getPrefix()}/${this.StorableName()}/Create`,\n body: body,\n ...options,\n };\n return await this.endpoint.sendMessageAndWait(info);\n }\n async CreateMany(body, options = {}) {\n const info = {\n channel: `${this.getPrefix()}/${this.StorableName()}/CreateMany`,\n body: body,\n ...options,\n };\n return await this.endpoint.sendMessageAndWait(info);\n }\n async GetById(id, options = {}) {\n const info = {\n channel: `${this.getPrefix()}/${this.StorableName()}/${id}`,\n ...options,\n };\n return await this.endpoint.sendMessageAndWait(info);\n }\n async GetByIds(body, options = {}) {\n const info = {\n channel: `${this.getPrefix()}/${this.StorableName()}/getbyids`,\n body: body,\n ...options,\n };\n return await this.endpoint.sendMessageAndWait(info);\n }\n async Update(id, body, options = {}) {\n const info = {\n channel: `${this.getPrefix()}/${this.StorableName()}/${id}/Update`,\n body: body,\n ...options,\n };\n return await this.endpoint.sendMessageAndWait(info);\n }\n async UpdateMany(body, options = {}) {\n const info = {\n channel: `${this.getPrefix()}/${this.StorableName()}/UpdateMany`,\n body: body,\n ...options,\n };\n return await this.endpoint.sendMessageAndWait(info);\n }\n async Delete(id, options = {}) {\n const info = {\n channel: `${this.getPrefix()}/${this.StorableName()}/${id}/Delete`,\n ...options,\n };\n return await this.endpoint.sendMessageAndWait(info);\n }\n async DeleteMany(body, options = {}) {\n const info = {\n channel: `${this.getPrefix()}/${this.StorableName()}/DeleteMany`,\n body: body,\n ...options,\n };\n return await this.endpoint.sendMessageAndWait(info);\n }\n}\nWebSocket.StorableWsRouter.Namespace=`AventusSharp.WebSocket`;\r\n_.WebSocket.StorableWsRouter=WebSocket.StorableWsRouter;\r\n","dependances":[{"fullName":"AventusSharp.WebSocket.Router","isStrong":true},{"fullName":"Aventus.IData","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRouter__Routes","isStrong":false},{"fullName":"Partial","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRouter_GetAll","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRouter_Create","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRoute_CreateMany","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRouter_GetById","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRouter_GetByIds","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRouter_Update","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRoute_UpdateMany","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRouter_Delete","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRoute_DeleteMany","isStrong":false},{"fullName":"AventusSharp.WebSocket.WsRouteSendOptions","isStrong":false},{"fullName":"Promise","isStrong":false},{"fullName":"AventusSharp.ExtractResponse","isStrong":false},{"fullName":"AventusSharp.WebSocket.SocketSendMessageOptions","isStrong":false},{"fullName":"FormData","isStrong":false}],"fullName":"AventusSharp.WebSocket.StorableWsRouter","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"WebSocket.WsError=class WsError extends Aventus.GenericError {\n static get Fullname() { return \"AventusSharp.WebSocket.WsError, AventusSharp\"; }\n}\nWebSocket.WsError.Namespace=`AventusSharp.WebSocket`;\r\nWebSocket.WsError.$schema={...(Aventus.GenericError?.$schema ?? {}), };\r\nAventus.Converter.register(WebSocket.WsError.Fullname, WebSocket.WsError);\r\n_.WebSocket.WsError=WebSocket.WsError;\r\n","dependances":[{"fullName":"Aventus.GenericError","isStrong":true},{"fullName":"AventusSharp.WebSocket.WsErrorCode","isStrong":true},{"fullName":"Convertible","isStrong":false}],"fullName":"AventusSharp.WebSocket.WsError","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"WebSocket.ResultWithWsError=class ResultWithWsError extends Tools.ResultWithError {\n static get Fullname() { return \"AventusSharp.WebSocket.ResultWithWsError, AventusSharp\"; }\n}\nWebSocket.ResultWithWsError.Namespace=`AventusSharp.WebSocket`;\r\nWebSocket.ResultWithWsError.$schema={...(Tools.ResultWithError?.$schema ?? {}), };\r\nAventus.Converter.register(WebSocket.ResultWithWsError.Fullname, WebSocket.ResultWithWsError);\r\n_.WebSocket.ResultWithWsError=WebSocket.ResultWithWsError;\r\n","dependances":[{"fullName":"AventusSharp.Tools.ResultWithError","isStrong":true},{"fullName":"AventusSharp.WebSocket.WsError","isStrong":false},{"fullName":"Convertible","isStrong":false}],"fullName":"AventusSharp.WebSocket.ResultWithWsError","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"WebSocket.VoidWithWsError=class VoidWithWsError extends Tools.VoidWithError {\n static get Fullname() { return \"AventusSharp.WebSocket.VoidWithWsError, AventusSharp\"; }\n}\nWebSocket.VoidWithWsError.Namespace=`AventusSharp.WebSocket`;\r\nWebSocket.VoidWithWsError.$schema={...(Tools.VoidWithError?.$schema ?? {}), };\r\nAventus.Converter.register(WebSocket.VoidWithWsError.Fullname, WebSocket.VoidWithWsError);\r\n_.WebSocket.VoidWithWsError=WebSocket.VoidWithWsError;\r\n","dependances":[{"fullName":"AventusSharp.Tools.VoidWithError","isStrong":true},{"fullName":"AventusSharp.WebSocket.WsError","isStrong":false},{"fullName":"Convertible","isStrong":false}],"fullName":"AventusSharp.WebSocket.VoidWithWsError","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"RAM.RamHttp=class RamHttp extends Aventus.Ram {\n getAllDone = false;\n routes;\n constructor() {\n super();\n this.routes = this.defineRoutes();\n }\n async beforeGetAll(result) {\n if (!this.getAllDone) {\n let response = await this.routes.GetAll();\n if (response.success && response.result) {\n for (let item of response.result) {\n let resultTemp = new Aventus.ResultRamWithError();\n await this.addOrUpdateData(item, resultTemp);\n if (!resultTemp.success) {\n result.errors = [...result.errors, ...resultTemp.errors];\n }\n }\n this.getAllDone = true;\n }\n else {\n result.errors = [...result.errors, ...response.errors];\n }\n }\n }\n async beforeGetById(id, result) {\n if (this.records.has(id)) {\n return;\n }\n else {\n let response = await this.routes.GetById(id);\n if (response.success && response.result) {\n let resultTemp = new Aventus.ResultRamWithError();\n await this.addOrUpdateData(response.result, resultTemp);\n if (!resultTemp.success) {\n result.errors = [...result.errors, ...resultTemp.errors];\n }\n else {\n result.result = resultTemp.result;\n }\n }\n else {\n result.errors = [...result.errors, ...response.errors];\n }\n }\n }\n async beforeGetByIds(ids, result) {\n let missingIds = [];\n for (let id of ids) {\n if (!this.records.has(id)) {\n missingIds.push(id);\n }\n }\n if (missingIds.length > 0) {\n result.result = [];\n let response = await this.routes.GetByIds({ ids: missingIds });\n if (response.success && response.result) {\n for (let item of response.result) {\n let resultTemp = new Aventus.ResultRamWithError();\n await this.addOrUpdateData(item, resultTemp);\n if (!resultTemp.success || !resultTemp.result) {\n result.errors = [...result.errors, ...resultTemp.errors];\n }\n else if (!result.result.includes(resultTemp.result)) {\n result.result.push(resultTemp.result);\n }\n }\n }\n else {\n result.errors = [...result.errors, ...response.errors];\n }\n }\n }\n async beforeCreateItem(item, fromList, result) {\n if (fromList) {\n return;\n }\n let response = await this.routes.Create({ item });\n if (response.success && response.result) {\n result.result = this.getObjectForRam(response.result);\n }\n else {\n result.errors = [...result.errors, ...response.errors];\n }\n }\n async beforeCreateList(list, result) {\n let response = await this.routes.CreateMany({ list });\n if (response.success && response.result) {\n result.result = [];\n for (let element of response.result) {\n result.result.push(this.getObjectForRam(element));\n }\n }\n else {\n result.errors = [...result.errors, ...response.errors];\n }\n }\n async beforeUpdateItem(item, fromList, result) {\n if (fromList) {\n return;\n }\n let response = await this.routes.Update(item.Id, { item });\n if (response.success && response.result) {\n result.result = this.getObjectForRam(response.result);\n }\n else {\n result.errors = [...result.errors, ...response.errors];\n }\n }\n async beforeUpdateList(list, result) {\n let response = await this.routes.UpdateMany({ list });\n if (response.success && response.result) {\n result.result = [];\n for (let element of response.result) {\n result.result.push(this.getObjectForRam(element));\n }\n }\n else {\n result.errors = [...result.errors, ...response.errors];\n }\n }\n async beforeDeleteItem(item, fromList, result) {\n if (fromList) {\n return;\n }\n let response = await this.routes.Delete(item.Id);\n if (!response.success) {\n result.errors = [...result.errors, ...response.errors];\n }\n }\n async beforeDeleteList(list, result) {\n let response = await this.routes.DeleteMany({ ids: list.map(t => t.Id) });\n if (!response.success) {\n result.errors = [...result.errors, ...response.errors];\n }\n }\n}\nRAM.RamHttp.Namespace=`AventusSharp.RAM`;\r\n_.RAM.RamHttp=RAM.RamHttp;\r\n","dependances":[{"fullName":"Aventus.Ram","isStrong":true},{"fullName":"AventusSharp.Data.Storable","isStrong":false},{"fullName":"AventusSharp.Routes.StorableRouter","isStrong":false},{"fullName":"Aventus.ResultRamWithError","isStrong":false},{"fullName":"Map","isStrong":false},{"fullName":"Aventus.RamItem","isStrong":false},{"fullName":"Promise","isStrong":false},{"fullName":"Aventus.VoidWithError","isStrong":false}],"fullName":"AventusSharp.RAM.RamHttp","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"RAM.RamWebSocket=class RamWebSocket extends Aventus.Ram {\n getAllDone = false;\n routes;\n otherGetAllLocked = {};\n otherGetByIdLocked = {};\n otherCreateItemLocked = {};\n otherCreateListLocked = {};\n otherUpdateItemLocked = {};\n otherUpdateListLocked = {};\n otherDeleteItemLocked = {};\n otherDeleteListLocked = {};\n constructor() {\n super();\n this.routes = this.defineRoutes();\n this.addEventsBindings();\n this.otherGetAll = this.otherGetAll.bind(this);\n this.otherGetById = this.otherGetById.bind(this);\n this.otherCreateItem = this.otherCreateItem.bind(this);\n this.otherCreateList = this.otherCreateList.bind(this);\n this.otherUpdateItem = this.otherUpdateItem.bind(this);\n this.otherUpdateList = this.otherUpdateList.bind(this);\n this.otherDeleteItem = this.otherDeleteItem.bind(this);\n this.otherDeleteList = this.otherDeleteList.bind(this);\n }\n addEventsBindings() {\n const autoListen = this.listenOnStart();\n this.routes.events.GetAll.onTrigger.add(this.otherGetAll, this);\n if (autoListen.GetAll) {\n this.routes.events.GetAll.listen();\n }\n else {\n this.routes.events.GetAll.stop();\n }\n this.routes.events.GetById.onTrigger.add(this.otherGetById, this);\n if (autoListen.GetById) {\n this.routes.events.GetById.listen();\n }\n else {\n this.routes.events.GetById.stop();\n }\n this.routes.events.Create.onTrigger.add(this.otherCreateItem, this);\n if (autoListen.Create) {\n this.routes.events.Create.listen();\n }\n else {\n this.routes.events.Create.stop();\n }\n this.routes.events.CreateMany.onTrigger.add(this.otherCreateList, this);\n if (autoListen.CreateMany) {\n this.routes.events.CreateMany.listen();\n }\n else {\n this.routes.events.CreateMany.stop();\n }\n this.routes.events.Update.onTrigger.add(this.otherUpdateItem, this);\n if (autoListen.Update) {\n this.routes.events.Update.listen();\n }\n else {\n this.routes.events.Update.stop();\n }\n this.routes.events.UpdateMany.onTrigger.add(this.otherUpdateList, this);\n if (autoListen.UpdateMany) {\n this.routes.events.UpdateMany.listen();\n }\n else {\n this.routes.events.UpdateMany.stop();\n }\n this.routes.events.Delete.onTrigger.add(this.otherDeleteItem, this);\n if (autoListen.Delete) {\n this.routes.events.Delete.listen();\n }\n else {\n this.routes.events.Delete.stop();\n }\n this.routes.events.DeleteMany.onTrigger.add(this.otherDeleteList, this);\n if (autoListen.DeleteMany) {\n this.routes.events.DeleteMany.listen();\n }\n else {\n this.routes.events.DeleteMany.stop();\n }\n }\n listenOnStart() {\n return {\n GetAll: false,\n GetById: false,\n Create: true,\n CreateMany: true,\n Update: true,\n UpdateMany: true,\n Delete: true,\n DeleteMany: true,\n };\n }\n async otherGetAll(items, params, uid) {\n if (uid && this.otherGetAllLocked[uid])\n return;\n for (let item of items) {\n let resultTemp = new Aventus.ResultRamWithError();\n await this.addOrUpdateData(item, resultTemp);\n }\n }\n async beforeGetAll(result) {\n if (!this.getAllDone) {\n let uid = Aventus.uuidv4();\n this.otherGetAllLocked[uid] = true;\n let response = await this.routes.GetAll({ uid });\n delete this.otherGetAllLocked[uid];\n if (!response)\n return;\n if (response.success && response.result) {\n for (let item of response.result) {\n let resultTemp = new Aventus.ResultRamWithError();\n await this.addOrUpdateData(item, resultTemp);\n if (!resultTemp.success) {\n result.errors = [...result.errors, ...resultTemp.errors];\n }\n }\n }\n else {\n result.errors = [...result.errors, ...response.errors];\n }\n }\n }\n async otherGetById(item, params, uid) {\n if (uid && this.otherGetByIdLocked[uid])\n return;\n let resultTemp = new Aventus.ResultRamWithError();\n await this.addOrUpdateData(item, resultTemp);\n }\n async beforeGetById(id, result) {\n if (this.records.has(id)) {\n return;\n }\n else {\n let uid = Aventus.uuidv4();\n this.otherGetByIdLocked[uid] = true;\n let response = await this.routes.GetById(id, { uid });\n delete this.otherGetByIdLocked[uid];\n if (!response)\n return;\n if (response.success && response.result) {\n let resultTemp = new Aventus.ResultRamWithError();\n await this.addOrUpdateData(response.result, resultTemp);\n if (!resultTemp.success) {\n result.errors = [...result.errors, ...resultTemp.errors];\n }\n }\n else {\n result.errors = [...result.errors, ...response.errors];\n }\n }\n }\n async beforeGetByIds(ids, result) {\n let missingIds = [];\n for (let id of ids) {\n if (!this.records.has(id)) {\n missingIds.push(id);\n }\n }\n if (missingIds.length > 0) {\n let response = await this.routes.GetByIds({ ids: missingIds });\n if (response.success && response.result) {\n for (let item of response.result) {\n let resultTemp = new Aventus.ResultRamWithError();\n await this.addOrUpdateData(item, resultTemp);\n if (!resultTemp.success) {\n result.errors = [...result.errors, ...resultTemp.errors];\n }\n }\n }\n else {\n result.errors = [...result.errors, ...response.errors];\n }\n }\n }\n async otherCreateItem(item, params, uid) {\n if (uid && this.otherCreateItemLocked[uid])\n return;\n let resultTemp = new Aventus.ResultRamWithError();\n await this.addOrUpdateData(item, resultTemp);\n if (resultTemp.success && resultTemp.result) {\n this.publish('created', resultTemp.result);\n }\n }\n async beforeCreateItem(item, fromList, result) {\n if (fromList) {\n return;\n }\n let uid = Aventus.uuidv4();\n this.otherCreateItemLocked[uid] = true;\n let response = await this.routes.Create({ item }, { uid });\n delete this.otherCreateItemLocked[uid];\n if (response.success && response.result) {\n result.result = this.getObjectForRam(response.result);\n }\n else {\n result.errors = [...result.errors, ...response.errors];\n }\n }\n async otherCreateList(items, params, uid) {\n if (uid && this.otherCreateListLocked[uid])\n return;\n for (let item of items) {\n let resultTemp = new Aventus.ResultRamWithError();\n await this.addOrUpdateData(item, resultTemp);\n if (resultTemp.success && resultTemp.result) {\n this.publish('created', resultTemp.result);\n }\n }\n }\n async beforeCreateList(list, result) {\n let uid = Aventus.uuidv4();\n this.otherCreateListLocked[uid] = true;\n let response = await this.routes.CreateMany({ list }, { uid });\n delete this.otherCreateListLocked[uid];\n if (response.success && response.result) {\n result.result = [];\n for (let element of response.result) {\n result.result.push(this.getObjectForRam(element));\n }\n }\n else {\n result.errors = [...result.errors, ...response.errors];\n }\n }\n async otherUpdateItem(item, params, uid) {\n if (uid && this.otherUpdateItemLocked[uid])\n return;\n let resultTemp = new Aventus.ResultRamWithError();\n await this.addOrUpdateData(item, resultTemp);\n if (resultTemp.success && resultTemp.result) {\n this.publish('updated', resultTemp.result);\n }\n }\n async beforeUpdateItem(item, fromList, result) {\n if (fromList) {\n return;\n }\n let uid = Aventus.uuidv4();\n this.otherUpdateItemLocked[uid] = true;\n let response = await this.routes.Update(item.Id, { item }, { uid });\n delete this.otherUpdateItemLocked[uid];\n if (response.success && response.result) {\n result.result = this.getObjectForRam(response.result);\n }\n else {\n result.errors = [...result.errors, ...response.errors];\n }\n }\n async otherUpdateList(items, params, uid) {\n if (uid && this.otherUpdateListLocked[uid])\n return;\n for (let item of items) {\n let resultTemp = new Aventus.ResultRamWithError();\n await this.addOrUpdateData(item, resultTemp);\n if (resultTemp.success && resultTemp.result) {\n this.publish('updated', resultTemp.result);\n }\n }\n }\n async beforeUpdateList(list, result) {\n let uid = Aventus.uuidv4();\n this.otherUpdateListLocked[uid] = true;\n let response = await this.routes.UpdateMany({ list }, { uid });\n delete this.otherUpdateListLocked[uid];\n if (response.success && response.result) {\n result.result = [];\n for (let element of response.result) {\n result.result.push(this.getObjectForRam(element));\n }\n }\n else {\n result.errors = [...result.errors, ...response.errors];\n }\n }\n otherDeleteItem(item, params, uid) {\n if (uid && this.otherDeleteItemLocked[uid])\n return;\n let resultTemp = new Aventus.ResultRamWithError();\n this.deleteData(item, resultTemp);\n if (resultTemp.success && resultTemp.result) {\n this.publish('deleted', resultTemp.result);\n this.recordsSubscribers.delete(resultTemp.result.Id);\n }\n }\n async beforeDeleteItem(item, fromList, result) {\n if (fromList) {\n return;\n }\n let uid = Aventus.uuidv4();\n this.otherDeleteItemLocked[uid] = true;\n let response = await this.routes.Delete(item.Id, { uid });\n delete this.otherDeleteItemLocked[uid];\n if (!response.success) {\n result.errors = [...result.errors, ...response.errors];\n }\n }\n otherDeleteList(items, params, uid) {\n if (uid && this.otherDeleteListLocked[uid])\n return;\n for (let item of items) {\n let resultTemp = new Aventus.ResultRamWithError();\n this.deleteData(item, resultTemp);\n if (resultTemp.success && resultTemp.result) {\n this.publish('deleted', resultTemp.result);\n this.recordsSubscribers.delete(resultTemp.result.Id);\n }\n }\n }\n async beforeDeleteList(list, result) {\n let uid = Aventus.uuidv4();\n this.otherDeleteListLocked[uid] = true;\n let response = await this.routes.DeleteMany({ ids: list.map(t => t.Id) }, { uid });\n delete this.otherDeleteListLocked[uid];\n if (!response.success) {\n result.errors = [...result.errors, ...response.errors];\n }\n }\n /**\n * Delete element inside Ram without firing delete event\n */\n deleteData(item, result) {\n try {\n let idWithError = this.getIdWithError(item);\n if (idWithError.success && idWithError.result !== undefined) {\n let id = idWithError.result;\n if (this.records.has(id)) {\n result.result = this.records.get(id);\n this.records.delete(id);\n }\n else {\n result.errors.push(new Aventus.RamError(Aventus.RamErrorCode.noItemInsideRam, \"can't delete the item \" + id + \" because it wasn't found inside ram\"));\n }\n }\n else {\n result.errors = [...result.errors, ...idWithError.errors];\n }\n }\n catch (e) {\n result.errors.push(new Aventus.RamError(Aventus.RamErrorCode.unknow, e));\n }\n }\n}\nRAM.RamWebSocket.Namespace=`AventusSharp.RAM`;\r\n_.RAM.RamWebSocket=RAM.RamWebSocket;\r\n","dependances":[{"fullName":"Aventus.Ram","isStrong":true},{"fullName":"AventusSharp.Data.Storable","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRouter","isStrong":false},{"fullName":"AventusSharp.RAM.RamWebSocketListenOnStart","isStrong":false},{"fullName":"BindThis","isStrong":false},{"fullName":"Aventus.ExtractFromError","isStrong":false},{"fullName":"Aventus.UriParams","isStrong":false},{"fullName":"Aventus.ResultRamWithError","isStrong":false},{"fullName":"Aventus.RamItem","isStrong":false},{"fullName":"Map","isStrong":false},{"fullName":"Promise","isStrong":false},{"fullName":"Aventus.uuidv4","isStrong":false},{"fullName":"Aventus.VoidWithError","isStrong":false},{"fullName":"Aventus.KeysObject","isStrong":false},{"fullName":"Aventus.RamError","isStrong":false},{"fullName":"Aventus.RamErrorCode","isStrong":false}],"fullName":"AventusSharp.RAM.RamWebSocket","required":false,"type":1,"isExported":true,"convertibleName":""}],"existing":[{"fullName":"AventusSharp.WebSocket.WsRouterOptions","dependances":[]},{"fullName":"AventusSharp.RAM.RamWebSocketListenOnStart","dependances":[]},{"fullName":"AventusSharp.WebSocket.WsRouteSendOptions","dependances":[]},{"fullName":"AventusSharp.WebSocket.SocketMessage","dependances":[]},{"fullName":"AventusSharp.WebSocket.SocketSendMessageOptions","dependances":[]},{"fullName":"AventusSharp.WebSocket.SocketRoute","dependances":[{"fullName":"Aventus.UriParamsValue","isStrong":false}]},{"fullName":"AventusSharp.Data.IStorableTimestamp","dependances":[{"fullName":"Aventus.IData","isStrong":true},{"fullName":"Date","isStrong":false}]},{"fullName":"AventusSharp.Tools.IWithError","dependances":[{"fullName":"Aventus.GenericError","isStrong":false}]},{"fullName":"AventusSharp.Tools.IResultWithError","dependances":[{"fullName":"AventusSharp.Tools.IWithError","isStrong":true},{"fullName":"Aventus.GenericError","isStrong":false}]},{"fullName":"AventusSharp.RealDate","dependances":[{"fullName":"Date","isStrong":false}]},{"fullName":"AventusSharp.WebSocket.InternalSocketRoute","dependances":[{"fullName":"AventusSharp.WebSocket.SocketRoute","isStrong":false},{"fullName":"Aventus.PreparedUri","isStrong":false}]},{"fullName":"AventusSharp.WebSocket.ConnectionOptions","dependances":[{"fullName":"AventusSharp.WebSocket.InternalSocketRoute","isStrong":false}]},{"fullName":"AventusSharp.WebSocket.WsEndPointType","dependances":[{"fullName":"AventusSharp.WebSocket.EndPoint","isStrong":false}]},{"fullName":"AventusSharp.WebSocket.ExtractResultFrom","dependances":[{"fullName":"AventusSharp.WebSocket.WsEvent","isStrong":false},{"fullName":"T","isStrong":false},{"fullName":"U","isStrong":false}]},{"fullName":"AventusSharp.WebSocket.WsEventType","dependances":[{"fullName":"AventusSharp.WebSocket.WsEvent","isStrong":false}]},{"fullName":"AventusSharp.ExtractResponse","dependances":[{"fullName":"AventusSharp.WebSocket.WsEvent","isStrong":false},{"fullName":"U","isStrong":false},{"fullName":"T","isStrong":false},{"fullName":"Aventus.ResultWithError","isStrong":false},{"fullName":"Aventus.ExtractFromError","isStrong":false}]},{"fullName":"AventusSharp.WebSocket.RouterRoutes","dependances":[{"fullName":"AventusSharp.WebSocket.WsEvent","isStrong":false}]},{"fullName":"AventusSharp.WebSocket.WsRouterType","dependances":[{"fullName":"AventusSharp.WebSocket.Router","isStrong":false}]},{"fullName":"AventusSharp.WebSocket.StorableWsRouter__Routes","dependances":[{"fullName":"Aventus.IData","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRouter_GetAll","isStrong":false},{"fullName":"T","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRouter_Create","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRoute_CreateMany","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRouter_GetById","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRouter_GetByIds","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRouter_Update","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRoute_UpdateMany","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRouter_Delete","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRoute_DeleteMany","isStrong":false}]}]}
|
|
951
|
+
{"namespace":"AventusSharp","available":[{"code":"(function (SocketErrorCode) {\n SocketErrorCode[SocketErrorCode[\"socketClosed\"] = 0] = \"socketClosed\";\n SocketErrorCode[SocketErrorCode[\"timeout\"] = 1] = \"timeout\";\n SocketErrorCode[SocketErrorCode[\"differentChannel\"] = 2] = \"differentChannel\";\n SocketErrorCode[SocketErrorCode[\"unknow\"] = 3] = \"unknow\";\n})(WebSocket.SocketErrorCode || (WebSocket.SocketErrorCode = {}));\n__as1(_.WebSocket, 'SocketErrorCode', WebSocket.SocketErrorCode);\r\n","dependencies":[],"fullName":"AventusSharp.WebSocket.SocketErrorCode","required":false,"type":6,"isExported":true,"convertibleName":""},{"code":"WebSocket.Socket=class Socket {\n static Debug = false;\n static connections = {};\n static getInstance(url, el) {\n if (!this.connections[url]) {\n this.connections[url] = new WebSocket.Socket(url, el);\n }\n else {\n this.connections[url].registerEl(el);\n }\n return this.connections[url];\n }\n socket;\n url;\n elements = [];\n reopenInterval = 0;\n onOpen = new Aventus.Callback();\n onClose = new Aventus.Callback();\n onError = new Aventus.Callback();\n onMessage = new Aventus.Callback();\n get readyState() {\n return this.socket.readyState;\n }\n constructor(url, el) {\n this.url = url;\n this.elements = [el];\n this.socket = this.createWebSocket();\n this.reopen = this.reopen.bind(this);\n this.onClose.add(this.reopen);\n }\n registerEl(el) {\n if (!this.elements.includes(el)) {\n this.elements.push(el);\n }\n }\n createWebSocket() {\n this.removeSocket();\n const socket = new window.WebSocket(this.url);\n socket.onopen = (e) => {\n clearInterval(this.reopenInterval);\n this.onOpen.trigger(e);\n };\n socket.onclose = (e) => {\n this.onClose.trigger(e);\n };\n socket.onerror = (e) => {\n this.onError.trigger(e);\n };\n socket.onmessage = (e) => {\n this.onMessage.trigger(e);\n };\n this.socket = socket;\n return socket;\n }\n removeSocket() {\n if (this.socket) {\n this.socket.onopen = null;\n this.socket.onclose = null;\n this.socket.onerror = null;\n this.socket.onmessage = null;\n this.socket.close();\n }\n }\n reopen() {\n clearInterval(this.reopenInterval);\n this.reopenInterval = setInterval(async () => {\n console.warn(\"try reopen socket \");\n await this.createWebSocket();\n if (this.isReady()) {\n clearInterval(this.reopenInterval);\n }\n }, 5000);\n }\n close(el, code, reason) {\n let index = this.elements.indexOf(el);\n if (index != -1) {\n this.elements.splice(0, 1);\n }\n if (this.elements.length == 0) {\n this.removeSocket();\n delete WebSocket.Socket.connections[this.url];\n }\n }\n send(data) {\n this.socket.send(data);\n }\n /**\n * Check if socket is ready\n */\n isReady() {\n return this.socket.readyState == 1;\n }\n}\nWebSocket.Socket.Namespace=`AventusSharp.WebSocket`;\r\n__as1(_.WebSocket, 'Socket', WebSocket.Socket);\r\n","dependencies":[{"fullName":"AventusSharp.WebSocket.Socket","isStrong":false},{"fullName":"Aventus.Callback","isStrong":false}],"fullName":"AventusSharp.WebSocket.Socket","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"Data.Storable=class Storable extends Aventus.Data {\n Id = 0;\n /**\n * @inerhit\n */\n toJSON() {\n let toAvoid = ['className', 'namespace'];\n return Aventus.Json.classToJson(this, {\n isValidKey: (key) => !toAvoid.includes(key),\n beforeEnd: (result) => {\n let resultTemp = {};\n if (result.$type) {\n resultTemp.$type = result.$type;\n for (let key in result) {\n if (key != '$type') {\n resultTemp[key] = result[key];\n }\n }\n return resultTemp;\n }\n return result;\n }\n });\n }\n}\nData.Storable.Namespace=`AventusSharp.Data`;\r\nData.Storable.$schema={...(Aventus.Data?.$schema ?? {}), \"Id\":\"number\"};\r\nAventus.Converter.register(Data.Storable.Fullname, Data.Storable);\r\n__as1(_.Data, 'Storable', Data.Storable);\r\n","dependencies":[{"fullName":"Aventus.Data","isStrong":true},{"fullName":"Aventus.IData","isStrong":true}],"fullName":"AventusSharp.Data.Storable","required":false,"type":2,"isExported":true,"convertibleName":""},{"code":"Data.StorableTimestamp=class StorableTimestamp extends Data.Storable {\n CreatedDate = new Date();\n UpdatedDate = new Date();\n}\nData.StorableTimestamp.Namespace=`AventusSharp.Data`;\r\nData.StorableTimestamp.$schema={...(Data.Storable?.$schema ?? {}), \"CreatedDate\":\"Date\",\"UpdatedDate\":\"Date\"};\r\nAventus.Converter.register(Data.StorableTimestamp.Fullname, Data.StorableTimestamp);\r\n__as1(_.Data, 'StorableTimestamp', Data.StorableTimestamp);\r\n","dependencies":[{"fullName":"AventusSharp.Data.Storable","isStrong":true},{"fullName":"Aventus.IData","isStrong":true}],"fullName":"AventusSharp.Data.StorableTimestamp","required":false,"type":2,"isExported":true,"convertibleName":""},{"code":"(function (WsErrorCode) {\n WsErrorCode[WsErrorCode[\"UnknowError\"] = 0] = \"UnknowError\";\n WsErrorCode[WsErrorCode[\"CantDefineAssembly\"] = 1] = \"CantDefineAssembly\";\n WsErrorCode[WsErrorCode[\"ConfigError\"] = 2] = \"ConfigError\";\n WsErrorCode[WsErrorCode[\"MultipleMainEndpoint\"] = 3] = \"MultipleMainEndpoint\";\n WsErrorCode[WsErrorCode[\"CantGetValueFromBody\"] = 4] = \"CantGetValueFromBody\";\n WsErrorCode[WsErrorCode[\"NoConnection\"] = 5] = \"NoConnection\";\n WsErrorCode[WsErrorCode[\"NoEndPoint\"] = 6] = \"NoEndPoint\";\n WsErrorCode[WsErrorCode[\"NoPath\"] = 7] = \"NoPath\";\n})(WebSocket.WsErrorCode || (WebSocket.WsErrorCode = {}));\n__as1(_.WebSocket, 'WsErrorCode', WebSocket.WsErrorCode);\r\n","dependencies":[],"fullName":"AventusSharp.WebSocket.WsErrorCode","required":false,"type":6,"isExported":true,"convertibleName":""},{"code":"(function (SSEErrorCode) {\n SSEErrorCode[SSEErrorCode[\"UnknowError\"] = 0] = \"UnknowError\";\n SSEErrorCode[SSEErrorCode[\"CantDefineAssembly\"] = 1] = \"CantDefineAssembly\";\n SSEErrorCode[SSEErrorCode[\"ConfigError\"] = 2] = \"ConfigError\";\n SSEErrorCode[SSEErrorCode[\"MultipleMainEndpoint\"] = 3] = \"MultipleMainEndpoint\";\n SSEErrorCode[SSEErrorCode[\"CantGetValueFromBody\"] = 4] = \"CantGetValueFromBody\";\n SSEErrorCode[SSEErrorCode[\"NoEndPoint\"] = 5] = \"NoEndPoint\";\n})(SSE.SSEErrorCode || (SSE.SSEErrorCode = {}));\n__as1(_.SSE, 'SSEErrorCode', SSE.SSEErrorCode);\r\n","dependencies":[],"fullName":"AventusSharp.SSE.SSEErrorCode","required":false,"type":6,"isExported":true,"convertibleName":""},{"code":"(function (RouteErrorCode) {\n RouteErrorCode[RouteErrorCode[\"UnknowError\"] = 0] = \"UnknowError\";\n RouteErrorCode[RouteErrorCode[\"FormContentTypeUnknown\"] = 1] = \"FormContentTypeUnknown\";\n RouteErrorCode[RouteErrorCode[\"CantGetValueFromBody\"] = 2] = \"CantGetValueFromBody\";\n RouteErrorCode[RouteErrorCode[\"CantMoveFile\"] = 3] = \"CantMoveFile\";\n RouteErrorCode[RouteErrorCode[\"CantCreateFolders\"] = 4] = \"CantCreateFolders\";\n RouteErrorCode[RouteErrorCode[\"RouteAlreadyExist\"] = 5] = \"RouteAlreadyExist\";\n})(Routes.RouteErrorCode || (Routes.RouteErrorCode = {}));\n__as1(_.Routes, 'RouteErrorCode', Routes.RouteErrorCode);\r\n","dependencies":[],"fullName":"AventusSharp.Routes.RouteErrorCode","required":false,"type":6,"isExported":true,"convertibleName":""},{"code":"(function (DataErrorCode) {\n DataErrorCode[DataErrorCode[\"DefaultDMGenericType\"] = 0] = \"DefaultDMGenericType\";\n DataErrorCode[DataErrorCode[\"DMOnlyForceInherit\"] = 1] = \"DMOnlyForceInherit\";\n DataErrorCode[DataErrorCode[\"TypeNotStorable\"] = 2] = \"TypeNotStorable\";\n DataErrorCode[DataErrorCode[\"TypeTooMuchStorable\"] = 3] = \"TypeTooMuchStorable\";\n DataErrorCode[DataErrorCode[\"GenericNotAbstract\"] = 4] = \"GenericNotAbstract\";\n DataErrorCode[DataErrorCode[\"ParentNotAbstract\"] = 5] = \"ParentNotAbstract\";\n DataErrorCode[DataErrorCode[\"InfiniteLoop\"] = 6] = \"InfiniteLoop\";\n DataErrorCode[DataErrorCode[\"InterfaceNotUnique\"] = 7] = \"InterfaceNotUnique\";\n DataErrorCode[DataErrorCode[\"SelfReferecingDependance\"] = 8] = \"SelfReferecingDependance\";\n DataErrorCode[DataErrorCode[\"DMNotExist\"] = 9] = \"DMNotExist\";\n DataErrorCode[DataErrorCode[\"DMAlreadyExist\"] = 10] = \"DMAlreadyExist\";\n DataErrorCode[DataErrorCode[\"MethodNotFound\"] = 11] = \"MethodNotFound\";\n DataErrorCode[DataErrorCode[\"StorageDisconnected\"] = 12] = \"StorageDisconnected\";\n DataErrorCode[DataErrorCode[\"StorageNotFound\"] = 13] = \"StorageNotFound\";\n DataErrorCode[DataErrorCode[\"NoConnectionInsideStorage\"] = 14] = \"NoConnectionInsideStorage\";\n DataErrorCode[DataErrorCode[\"TypeNotExistInsideStorage\"] = 15] = \"TypeNotExistInsideStorage\";\n DataErrorCode[DataErrorCode[\"UnknowError\"] = 16] = \"UnknowError\";\n DataErrorCode[DataErrorCode[\"NoItemProvided\"] = 17] = \"NoItemProvided\";\n DataErrorCode[DataErrorCode[\"NoTransactionInProgress\"] = 18] = \"NoTransactionInProgress\";\n DataErrorCode[DataErrorCode[\"WrongType\"] = 19] = \"WrongType\";\n DataErrorCode[DataErrorCode[\"NoTypeIdentifierFoundInsideQuery\"] = 20] = \"NoTypeIdentifierFoundInsideQuery\";\n DataErrorCode[DataErrorCode[\"ItemNoExistInsideStorage\"] = 21] = \"ItemNoExistInsideStorage\";\n DataErrorCode[DataErrorCode[\"ItemAlreadyExist\"] = 22] = \"ItemAlreadyExist\";\n DataErrorCode[DataErrorCode[\"ValidationError\"] = 23] = \"ValidationError\";\n DataErrorCode[DataErrorCode[\"GetAllNotAllowed\"] = 24] = \"GetAllNotAllowed\";\n DataErrorCode[DataErrorCode[\"GetByIdNotAllowed\"] = 25] = \"GetByIdNotAllowed\";\n DataErrorCode[DataErrorCode[\"GetByIdsNotAllowed\"] = 26] = \"GetByIdsNotAllowed\";\n DataErrorCode[DataErrorCode[\"WhereNotAllowed\"] = 27] = \"WhereNotAllowed\";\n DataErrorCode[DataErrorCode[\"CreateNotAllowed\"] = 28] = \"CreateNotAllowed\";\n DataErrorCode[DataErrorCode[\"UpdateNotAllowed\"] = 29] = \"UpdateNotAllowed\";\n DataErrorCode[DataErrorCode[\"DeleteNotAllowed\"] = 30] = \"DeleteNotAllowed\";\n DataErrorCode[DataErrorCode[\"NumberOfItemsNotMatching\"] = 31] = \"NumberOfItemsNotMatching\";\n DataErrorCode[DataErrorCode[\"FieldTypeNotFound\"] = 32] = \"FieldTypeNotFound\";\n DataErrorCode[DataErrorCode[\"MemberNotFound\"] = 33] = \"MemberNotFound\";\n DataErrorCode[DataErrorCode[\"TooMuchMemberFound\"] = 34] = \"TooMuchMemberFound\";\n DataErrorCode[DataErrorCode[\"TypeNotFound\"] = 35] = \"TypeNotFound\";\n DataErrorCode[DataErrorCode[\"ReverseLinkNotExist\"] = 36] = \"ReverseLinkNotExist\";\n DataErrorCode[DataErrorCode[\"ReverseLinkExist\"] = 37] = \"ReverseLinkExist\";\n DataErrorCode[DataErrorCode[\"ErrorCreatingReverseQuery\"] = 38] = \"ErrorCreatingReverseQuery\";\n DataErrorCode[DataErrorCode[\"LinkNotSet\"] = 39] = \"LinkNotSet\";\n DataErrorCode[DataErrorCode[\"MultipleProvidersNotSet\"] = 40] = \"MultipleProvidersNotSet\";\n DataErrorCode[DataErrorCode[\"FileNotFound\"] = 41] = \"FileNotFound\";\n DataErrorCode[DataErrorCode[\"PyramidNotFound\"] = 42] = \"PyramidNotFound\";\n DataErrorCode[DataErrorCode[\"IsReadOnly\"] = 43] = \"IsReadOnly\";\n DataErrorCode[DataErrorCode[\"ReverseLinkNotPrepared\"] = 44] = \"ReverseLinkNotPrepared\";\n DataErrorCode[DataErrorCode[\"ExternalStorageNotPrepared\"] = 45] = \"ExternalStorageNotPrepared\";\n})(Data.DataErrorCode || (Data.DataErrorCode = {}));\n__as1(_.Data, 'DataErrorCode', Data.DataErrorCode);\r\n","dependencies":[],"fullName":"AventusSharp.Data.DataErrorCode","required":false,"type":6,"isExported":true,"convertibleName":""},{"code":"(function (ImageFileErrorCode) {\n ImageFileErrorCode[ImageFileErrorCode[\"UnknowError\"] = 0] = \"UnknowError\";\n ImageFileErrorCode[ImageFileErrorCode[\"NotValidImage\"] = 1] = \"NotValidImage\";\n ImageFileErrorCode[ImageFileErrorCode[\"FileNotSvg\"] = 2] = \"FileNotSvg\";\n ImageFileErrorCode[ImageFileErrorCode[\"NoSize\"] = 3] = \"NoSize\";\n})(Data.CustomTableMembers.ImageFileErrorCode || (Data.CustomTableMembers.ImageFileErrorCode = {}));\n__as1(_.Data.CustomTableMembers, 'ImageFileErrorCode', Data.CustomTableMembers.ImageFileErrorCode);\r\n","dependencies":[],"fullName":"AventusSharp.Data.CustomTableMembers.ImageFileErrorCode","required":false,"type":6,"isExported":true,"convertibleName":""},{"code":"Data.SharpClass=class SharpClass {\n /**\n * The current namespace\n */\n get namespace() {\n return this.constructor['Namespace'];\n }\n /**\n * Get the unique type for the data. Define it as the namespace + class name\n */\n get $type() {\n return this.constructor['Fullname'];\n }\n /**\n * Get the name of the class\n */\n get className() {\n return this.constructor.name;\n }\n /**\n * Clone the object by transforming a parsed JSON string back into the original type\n */\n clone() {\n return Aventus.Converter.transform(JSON.parse(JSON.stringify(this)));\n }\n /**\n * Get a JSON for the current object\n */\n toJSON() {\n let toAvoid = ['className', 'namespace'];\n return Aventus.Json.classToJson(this, {\n isValidKey: (key) => !toAvoid.includes(key),\n beforeEnd: (result) => {\n let resultTemp = {};\n if (result.$type) {\n resultTemp.$type = result.$type;\n for (let key in result) {\n if (key != '$type') {\n resultTemp[key] = result[key];\n }\n }\n return resultTemp;\n }\n return result;\n }\n });\n }\n}\nData.SharpClass.Namespace=`AventusSharp.Data`;\r\n__as1(_.Data, 'SharpClass', Data.SharpClass);\r\n","dependencies":[],"fullName":"AventusSharp.Data.SharpClass","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"Routes.Request.Request=class Request extends Data.SharpClass {\n}\nRoutes.Request.Request.Namespace=`AventusSharp.Routes.Request`;\r\n__as1(_.Routes.Request, 'Request', Routes.Request.Request);\r\n","dependencies":[{"fullName":"AventusSharp.Data.SharpClass","isStrong":true}],"fullName":"AventusSharp.Routes.Request.Request","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"Routes.Response.Resource=class Resource extends Data.SharpClass {\n toRequest(request) {\n const result = new request();\n const resourceClone = Aventus.clone(this);\n Aventus.Json.classFromJson(result, resourceClone, {\n replaceUndefined: true\n });\n return result;\n }\n}\nRoutes.Response.Resource.Namespace=`AventusSharp.Routes.Response`;\r\n__as1(_.Routes.Response, 'Resource', Routes.Response.Resource);\r\n","dependencies":[{"fullName":"AventusSharp.Data.SharpClass","isStrong":true},{"fullName":"AventusSharp.Routes.Request.Request","isStrong":false},{"fullName":"T","isStrong":false},{"fullName":"Aventus.clone","isStrong":false},{"fullName":"Aventus.Json","isStrong":false}],"fullName":"AventusSharp.Routes.Response.Resource","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"Data.FieldErrorInfo=class FieldErrorInfo extends _.Data.SharpClass {\n static get Fullname() { return \"AventusSharp.Data.FieldErrorInfo, AventusSharp\"; }\n Name;\n}\nData.FieldErrorInfo.Namespace=`AventusSharp.Data`;\r\nData.FieldErrorInfo.$schema={...(Data.SharpClass?.$schema ?? {}), \"Name\":\"string\"};\r\nAventus.Converter.register(Data.FieldErrorInfo.Fullname, Data.FieldErrorInfo);\r\n__as1(_.Data, 'FieldErrorInfo', Data.FieldErrorInfo);\r\n","dependencies":[{"fullName":"AventusSharp.Data.SharpClass","isStrong":true},{"fullName":"Convertible","isStrong":false}],"fullName":"AventusSharp.Data.FieldErrorInfo","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"Data.CustomTableMembers.AventusFile=class AventusFile {\n Uri;\n Upload;\n /**\n * Get the unique type for the data. Define it as the namespace + class name\n */\n get $type() {\n return this.constructor['Fullname'];\n }\n /**\n * @inerhit\n */\n toJSON() {\n let toAvoid = ['className', 'namespace'];\n return Aventus.Json.classToJson(this, {\n isValidKey: (key) => !toAvoid.includes(key),\n beforeEnd: (result) => {\n let resultTemp = {};\n if (result.$type) {\n resultTemp.$type = result.$type;\n for (let key in result) {\n if (key != '$type') {\n resultTemp[key] = result[key];\n }\n }\n return resultTemp;\n }\n return result;\n }\n });\n }\n}\nData.CustomTableMembers.AventusFile.Namespace=`AventusSharp.Data.CustomTableMembers`;\r\n__as1(_.Data.CustomTableMembers, 'AventusFile', Data.CustomTableMembers.AventusFile);\r\n","dependencies":[],"fullName":"AventusSharp.Data.CustomTableMembers.AventusFile","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"Data.CustomTableMembers.AventusImage=class AventusImage extends _.Data.CustomTableMembers.AventusFile {\n}\nData.CustomTableMembers.AventusImage.Namespace=`AventusSharp.Data.CustomTableMembers`;\r\n__as1(_.Data.CustomTableMembers, 'AventusImage', Data.CustomTableMembers.AventusImage);\r\n","dependencies":[{"fullName":"AventusSharp.Data.CustomTableMembers.AventusFile","isStrong":true},{"fullName":"Aventus.IData","isStrong":false}],"fullName":"AventusSharp.Data.CustomTableMembers.AventusImage","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"Data.Datetime=class Datetime extends _.Data.SharpClass {\n static get Fullname() { return \"AventusSharp.Data.Datetime, AventusSharp\"; }\n DateTime;\n}\nData.Datetime.Namespace=`AventusSharp.Data`;\r\nData.Datetime.$schema={...(Data.SharpClass?.$schema ?? {}), \"DateTime\":\"AventusSharp.RealDate\"};\r\nAventus.Converter.register(Data.Datetime.Fullname, Data.Datetime);\r\n__as1(_.Data, 'Datetime', Data.Datetime);\r\n","dependencies":[{"fullName":"AventusSharp.Data.SharpClass","isStrong":true},{"fullName":"Convertible","isStrong":false},{"fullName":"AventusSharp.RealDate","isStrong":false}],"fullName":"AventusSharp.Data.Datetime","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"Data.Date=class Date extends _.Data.SharpClass {\n static get Fullname() { return \"AventusSharp.Data.Date, AventusSharp\"; }\n DateTime;\n}\nData.Date.Namespace=`AventusSharp.Data`;\r\nData.Date.$schema={...(Data.SharpClass?.$schema ?? {}), \"DateTime\":\"AventusSharp.RealDate\"};\r\nAventus.Converter.register(Data.Date.Fullname, Data.Date);\r\n__as1(_.Data, 'Date', Data.Date);\r\n","dependencies":[{"fullName":"AventusSharp.Data.SharpClass","isStrong":true},{"fullName":"Convertible","isStrong":false},{"fullName":"AventusSharp.RealDate","isStrong":false}],"fullName":"AventusSharp.Data.Date","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"Data.CustomTableMembers.ImageFileError=class ImageFileError extends Aventus.GenericError {\n static get Fullname() { return \"AventusSharp.Data.CustomTableMembers.ImageFileError, AventusSharp\"; }\n}\nData.CustomTableMembers.ImageFileError.Namespace=`AventusSharp.Data.CustomTableMembers`;\r\nData.CustomTableMembers.ImageFileError.$schema={...(Aventus.GenericError?.$schema ?? {}), };\r\nAventus.Converter.register(Data.CustomTableMembers.ImageFileError.Fullname, Data.CustomTableMembers.ImageFileError);\r\n__as1(_.Data.CustomTableMembers, 'ImageFileError', Data.CustomTableMembers.ImageFileError);\r\n","dependencies":[{"fullName":"Aventus.GenericError","isStrong":true},{"fullName":"AventusSharp.Data.CustomTableMembers.ImageFileErrorCode","isStrong":true},{"fullName":"Convertible","isStrong":false}],"fullName":"AventusSharp.Data.CustomTableMembers.ImageFileError","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"Tools.VoidWithError=class VoidWithError extends Aventus.VoidWithError {\n static get Fullname() { return \"AventusSharp.Tools.VoidWithError, AventusSharp\"; }\n}\nTools.VoidWithError.Namespace=`AventusSharp.Tools`;\r\nTools.VoidWithError.$schema={...(Aventus.VoidWithError?.$schema ?? {}), };\r\nAventus.Converter.register(Tools.VoidWithError.Fullname, Tools.VoidWithError);\r\n__as1(_.Tools, 'VoidWithError', Tools.VoidWithError);\r\n","dependencies":[{"fullName":"Aventus.VoidWithError","isStrong":true},{"fullName":"AventusSharp.Tools.IWithError","isStrong":true},{"fullName":"Convertible","isStrong":false},{"fullName":"Aventus.GenericError","isStrong":false}],"fullName":"AventusSharp.Tools.VoidWithError","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"Data.CustomTableMembers.VoidWithImageFileError=class VoidWithImageFileError extends Tools.VoidWithError {\n static get Fullname() { return \"AventusSharp.Data.CustomTableMembers.VoidWithImageFileError, AventusSharp\"; }\n}\nData.CustomTableMembers.VoidWithImageFileError.Namespace=`AventusSharp.Data.CustomTableMembers`;\r\nData.CustomTableMembers.VoidWithImageFileError.$schema={...(Tools.VoidWithError?.$schema ?? {}), };\r\nAventus.Converter.register(Data.CustomTableMembers.VoidWithImageFileError.Fullname, Data.CustomTableMembers.VoidWithImageFileError);\r\n__as1(_.Data.CustomTableMembers, 'VoidWithImageFileError', Data.CustomTableMembers.VoidWithImageFileError);\r\n","dependencies":[{"fullName":"AventusSharp.Tools.VoidWithError","isStrong":true},{"fullName":"AventusSharp.Data.CustomTableMembers.ImageFileError","isStrong":false},{"fullName":"Convertible","isStrong":false}],"fullName":"AventusSharp.Data.CustomTableMembers.VoidWithImageFileError","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"Tools.ResultWithError=class ResultWithError extends Aventus.ResultWithError {\n static get Fullname() { return \"AventusSharp.Tools.ResultWithError, AventusSharp\"; }\n}\nTools.ResultWithError.Namespace=`AventusSharp.Tools`;\r\nTools.ResultWithError.$schema={...(Aventus.ResultWithError?.$schema ?? {}), };\r\nAventus.Converter.register(Tools.ResultWithError.Fullname, Tools.ResultWithError);\r\n__as1(_.Tools, 'ResultWithError', Tools.ResultWithError);\r\n","dependencies":[{"fullName":"Aventus.ResultWithError","isStrong":true},{"fullName":"AventusSharp.Tools.IResultWithError","isStrong":true},{"fullName":"Convertible","isStrong":false},{"fullName":"Aventus.GenericError","isStrong":false}],"fullName":"AventusSharp.Tools.ResultWithError","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"Routes.StorableRouter=class StorableRouter extends Aventus.HttpRoute {\n constructor(router) {\n super(router);\n this.GetAll = this.GetAll.bind(this);\n this.Create = this.Create.bind(this);\n this.CreateMany = this.CreateMany.bind(this);\n this.GetById = this.GetById.bind(this);\n this.GetByIds = this.GetByIds.bind(this);\n this.Update = this.Update.bind(this);\n this.UpdateMany = this.UpdateMany.bind(this);\n this.Delete = this.Delete.bind(this);\n this.DeleteMany = this.DeleteMany.bind(this);\n }\n async GetAll() {\n const request = new Aventus.HttpRequest(`${this.getPrefix()}/${this.StorableName()}`, Aventus.HttpMethod.GET);\n return await request.queryJSON(this.router);\n }\n async Create(body) {\n const request = new Aventus.HttpRequest(`${this.getPrefix()}/${this.StorableName()}`, Aventus.HttpMethod.POST);\n request.setBody(body);\n return await request.queryJSON(this.router);\n }\n async CreateMany(body) {\n const request = new Aventus.HttpRequest(`${this.getPrefix()}/${this.StorableName()}s`, Aventus.HttpMethod.POST);\n request.setBody(body);\n return await request.queryJSON(this.router);\n }\n async GetById(id) {\n const request = new Aventus.HttpRequest(`${this.getPrefix()}/${this.StorableName()}/${id}`, Aventus.HttpMethod.GET);\n return await request.queryJSON(this.router);\n }\n async GetByIds(body) {\n const request = new Aventus.HttpRequest(`${this.getPrefix()}/${this.StorableName()}/getbyids`, Aventus.HttpMethod.POST);\n request.setBody(body);\n return await request.queryJSON(this.router);\n }\n async Update(id, body) {\n const request = new Aventus.HttpRequest(`${this.getPrefix()}/${this.StorableName()}/${id}`, Aventus.HttpMethod.PUT);\n request.setBody(body);\n return await request.queryJSON(this.router);\n }\n async UpdateMany(body) {\n const request = new Aventus.HttpRequest(`${this.getPrefix()}/${this.StorableName()}s`, Aventus.HttpMethod.PUT);\n request.setBody(body);\n return await request.queryJSON(this.router);\n }\n async Delete(id) {\n const request = new Aventus.HttpRequest(`${this.getPrefix()}/${this.StorableName()}/${id}`, Aventus.HttpMethod.DELETE);\n return await request.queryJSON(this.router);\n }\n async DeleteMany(body) {\n const request = new Aventus.HttpRequest(`${this.getPrefix()}/${this.StorableName()}s`, Aventus.HttpMethod.DELETE);\n request.setBody(body);\n return await request.queryJSON(this.router);\n }\n}\nRoutes.StorableRouter.Namespace=`AventusSharp.Routes`;\r\n__as1(_.Routes, 'StorableRouter', Routes.StorableRouter);\r\n","dependencies":[{"fullName":"Aventus.HttpRoute","isStrong":true},{"fullName":"Aventus.IData","isStrong":false},{"fullName":"AventusSharp.Routes.Request.Request","isStrong":false},{"fullName":"AventusSharp.Routes.Response.Resource","isStrong":false},{"fullName":"BindThis","isStrong":false},{"fullName":"AventusSharp.Tools.ResultWithError","isStrong":false},{"fullName":"TypeResult","isStrong":false}],"fullName":"AventusSharp.Routes.StorableRouter","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"Data.CustomTableMembers.ResultWithImageFileError=class ResultWithImageFileError extends Tools.ResultWithError {\n static get Fullname() { return \"AventusSharp.Data.CustomTableMembers.ResultWithImageFileError, AventusSharp\"; }\n}\nData.CustomTableMembers.ResultWithImageFileError.Namespace=`AventusSharp.Data.CustomTableMembers`;\r\nData.CustomTableMembers.ResultWithImageFileError.$schema={...(Tools.ResultWithError?.$schema ?? {}), };\r\nAventus.Converter.register(Data.CustomTableMembers.ResultWithImageFileError.Fullname, Data.CustomTableMembers.ResultWithImageFileError);\r\n__as1(_.Data.CustomTableMembers, 'ResultWithImageFileError', Data.CustomTableMembers.ResultWithImageFileError);\r\n","dependencies":[{"fullName":"AventusSharp.Tools.ResultWithError","isStrong":true},{"fullName":"AventusSharp.Data.CustomTableMembers.ImageFileError","isStrong":false},{"fullName":"Convertible","isStrong":false}],"fullName":"AventusSharp.Data.CustomTableMembers.ResultWithImageFileError","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"Data.DataError=class DataError extends Aventus.GenericError {\n static get Fullname() { return \"AventusSharp.Data.DataError, AventusSharp\"; }\n}\nData.DataError.Namespace=`AventusSharp.Data`;\r\nData.DataError.$schema={...(Aventus.GenericError?.$schema ?? {}), };\r\nAventus.Converter.register(Data.DataError.Fullname, Data.DataError);\r\n__as1(_.Data, 'DataError', Data.DataError);\r\n","dependencies":[{"fullName":"Aventus.GenericError","isStrong":true},{"fullName":"AventusSharp.Data.DataErrorCode","isStrong":true},{"fullName":"Convertible","isStrong":false}],"fullName":"AventusSharp.Data.DataError","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"Data.ResultWithDataError=class ResultWithDataError extends Tools.ResultWithError {\n static get Fullname() { return \"AventusSharp.Data.ResultWithDataError, AventusSharp\"; }\n}\nData.ResultWithDataError.Namespace=`AventusSharp.Data`;\r\nData.ResultWithDataError.$schema={...(Tools.ResultWithError?.$schema ?? {}), };\r\nAventus.Converter.register(Data.ResultWithDataError.Fullname, Data.ResultWithDataError);\r\n__as1(_.Data, 'ResultWithDataError', Data.ResultWithDataError);\r\n","dependencies":[{"fullName":"AventusSharp.Tools.ResultWithError","isStrong":true},{"fullName":"AventusSharp.Data.DataError","isStrong":false},{"fullName":"Convertible","isStrong":false}],"fullName":"AventusSharp.Data.ResultWithDataError","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"Data.VoidWithDataError=class VoidWithDataError extends Tools.VoidWithError {\n static get Fullname() { return \"AventusSharp.Data.VoidWithDataError, AventusSharp\"; }\n}\nData.VoidWithDataError.Namespace=`AventusSharp.Data`;\r\nData.VoidWithDataError.$schema={...(Tools.VoidWithError?.$schema ?? {}), };\r\nAventus.Converter.register(Data.VoidWithDataError.Fullname, Data.VoidWithDataError);\r\n__as1(_.Data, 'VoidWithDataError', Data.VoidWithDataError);\r\n","dependencies":[{"fullName":"AventusSharp.Tools.VoidWithError","isStrong":true},{"fullName":"AventusSharp.Data.DataError","isStrong":false},{"fullName":"Convertible","isStrong":false}],"fullName":"AventusSharp.Data.VoidWithDataError","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"Routes.RouteError=class RouteError extends Aventus.GenericError {\n static get Fullname() { return \"AventusSharp.Routes.RouteError, AventusSharp\"; }\n}\nRoutes.RouteError.Namespace=`AventusSharp.Routes`;\r\nRoutes.RouteError.$schema={...(Aventus.GenericError?.$schema ?? {}), };\r\nAventus.Converter.register(Routes.RouteError.Fullname, Routes.RouteError);\r\n__as1(_.Routes, 'RouteError', Routes.RouteError);\r\n","dependencies":[{"fullName":"Aventus.GenericError","isStrong":true},{"fullName":"AventusSharp.Routes.RouteErrorCode","isStrong":true},{"fullName":"Convertible","isStrong":false}],"fullName":"AventusSharp.Routes.RouteError","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"Routes.ResultWithRouteError=class ResultWithRouteError extends Tools.ResultWithError {\n static get Fullname() { return \"AventusSharp.Routes.ResultWithRouteError, AventusSharp\"; }\n}\nRoutes.ResultWithRouteError.Namespace=`AventusSharp.Routes`;\r\nRoutes.ResultWithRouteError.$schema={...(Tools.ResultWithError?.$schema ?? {}), };\r\nAventus.Converter.register(Routes.ResultWithRouteError.Fullname, Routes.ResultWithRouteError);\r\n__as1(_.Routes, 'ResultWithRouteError', Routes.ResultWithRouteError);\r\n","dependencies":[{"fullName":"AventusSharp.Tools.ResultWithError","isStrong":true},{"fullName":"AventusSharp.Routes.RouteError","isStrong":false},{"fullName":"Convertible","isStrong":false}],"fullName":"AventusSharp.Routes.ResultWithRouteError","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"Routes.VoidWithRouteError=class VoidWithRouteError extends Tools.VoidWithError {\n static get Fullname() { return \"AventusSharp.Routes.VoidWithRouteError, AventusSharp\"; }\n}\nRoutes.VoidWithRouteError.Namespace=`AventusSharp.Routes`;\r\nRoutes.VoidWithRouteError.$schema={...(Tools.VoidWithError?.$schema ?? {}), };\r\nAventus.Converter.register(Routes.VoidWithRouteError.Fullname, Routes.VoidWithRouteError);\r\n__as1(_.Routes, 'VoidWithRouteError', Routes.VoidWithRouteError);\r\n","dependencies":[{"fullName":"AventusSharp.Tools.VoidWithError","isStrong":true},{"fullName":"AventusSharp.Routes.RouteError","isStrong":false},{"fullName":"Convertible","isStrong":false}],"fullName":"AventusSharp.Routes.VoidWithRouteError","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"SSE.SSEError=class SSEError extends Aventus.GenericError {\n static get Fullname() { return \"AventusSharp.SSE.SSEError, AventusSharp\"; }\n}\nSSE.SSEError.Namespace=`AventusSharp.SSE`;\r\nSSE.SSEError.$schema={...(Aventus.GenericError?.$schema ?? {}), };\r\nAventus.Converter.register(SSE.SSEError.Fullname, SSE.SSEError);\r\n__as1(_.SSE, 'SSEError', SSE.SSEError);\r\n","dependencies":[{"fullName":"Aventus.GenericError","isStrong":true},{"fullName":"AventusSharp.SSE.SSEErrorCode","isStrong":true},{"fullName":"Convertible","isStrong":false}],"fullName":"AventusSharp.SSE.SSEError","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"SSE.ResultWithSSEError=class ResultWithSSEError extends Tools.ResultWithError {\n static get Fullname() { return \"AventusSharp.SSE.ResultWithSSEError, AventusSharp\"; }\n}\nSSE.ResultWithSSEError.Namespace=`AventusSharp.SSE`;\r\nSSE.ResultWithSSEError.$schema={...(Tools.ResultWithError?.$schema ?? {}), };\r\nAventus.Converter.register(SSE.ResultWithSSEError.Fullname, SSE.ResultWithSSEError);\r\n__as1(_.SSE, 'ResultWithSSEError', SSE.ResultWithSSEError);\r\n","dependencies":[{"fullName":"AventusSharp.Tools.ResultWithError","isStrong":true},{"fullName":"AventusSharp.SSE.SSEError","isStrong":false},{"fullName":"Convertible","isStrong":false}],"fullName":"AventusSharp.SSE.ResultWithSSEError","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"SSE.VoidWithSSEError=class VoidWithSSEError extends Tools.VoidWithError {\n static get Fullname() { return \"AventusSharp.SSE.VoidWithSSEError, AventusSharp\"; }\n}\nSSE.VoidWithSSEError.Namespace=`AventusSharp.SSE`;\r\nSSE.VoidWithSSEError.$schema={...(Tools.VoidWithError?.$schema ?? {}), };\r\nAventus.Converter.register(SSE.VoidWithSSEError.Fullname, SSE.VoidWithSSEError);\r\n__as1(_.SSE, 'VoidWithSSEError', SSE.VoidWithSSEError);\r\n","dependencies":[{"fullName":"AventusSharp.Tools.VoidWithError","isStrong":true},{"fullName":"AventusSharp.SSE.SSEError","isStrong":false},{"fullName":"Convertible","isStrong":false}],"fullName":"AventusSharp.SSE.VoidWithSSEError","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"WebSocket.WsError=class WsError extends Aventus.GenericError {\n static get Fullname() { return \"AventusSharp.WebSocket.WsError, AventusSharp\"; }\n}\nWebSocket.WsError.Namespace=`AventusSharp.WebSocket`;\r\nWebSocket.WsError.$schema={...(Aventus.GenericError?.$schema ?? {}), };\r\nAventus.Converter.register(WebSocket.WsError.Fullname, WebSocket.WsError);\r\n__as1(_.WebSocket, 'WsError', WebSocket.WsError);\r\n","dependencies":[{"fullName":"Aventus.GenericError","isStrong":true},{"fullName":"AventusSharp.WebSocket.WsErrorCode","isStrong":true},{"fullName":"Convertible","isStrong":false}],"fullName":"AventusSharp.WebSocket.WsError","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"WebSocket.ResultWithWsError=class ResultWithWsError extends Tools.ResultWithError {\n static get Fullname() { return \"AventusSharp.WebSocket.ResultWithWsError, AventusSharp\"; }\n}\nWebSocket.ResultWithWsError.Namespace=`AventusSharp.WebSocket`;\r\nWebSocket.ResultWithWsError.$schema={...(Tools.ResultWithError?.$schema ?? {}), };\r\nAventus.Converter.register(WebSocket.ResultWithWsError.Fullname, WebSocket.ResultWithWsError);\r\n__as1(_.WebSocket, 'ResultWithWsError', WebSocket.ResultWithWsError);\r\n","dependencies":[{"fullName":"AventusSharp.Tools.ResultWithError","isStrong":true},{"fullName":"AventusSharp.WebSocket.WsError","isStrong":false},{"fullName":"Convertible","isStrong":false}],"fullName":"AventusSharp.WebSocket.ResultWithWsError","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"WebSocket.VoidWithWsError=class VoidWithWsError extends Tools.VoidWithError {\n static get Fullname() { return \"AventusSharp.WebSocket.VoidWithWsError, AventusSharp\"; }\n}\nWebSocket.VoidWithWsError.Namespace=`AventusSharp.WebSocket`;\r\nWebSocket.VoidWithWsError.$schema={...(Tools.VoidWithError?.$schema ?? {}), };\r\nAventus.Converter.register(WebSocket.VoidWithWsError.Fullname, WebSocket.VoidWithWsError);\r\n__as1(_.WebSocket, 'VoidWithWsError', WebSocket.VoidWithWsError);\r\n","dependencies":[{"fullName":"AventusSharp.Tools.VoidWithError","isStrong":true},{"fullName":"AventusSharp.WebSocket.WsError","isStrong":false},{"fullName":"Convertible","isStrong":false}],"fullName":"AventusSharp.WebSocket.VoidWithWsError","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"RAM.RamCompletor=class RamCompletor {\n objects = [];\n fields = [];\n constructor(objects) {\n if (!objects) {\n objects = [];\n }\n else if (!Array.isArray(objects)) {\n objects = [objects];\n }\n this.objects = objects;\n }\n add(field) {\n this.fields.push(field);\n return this;\n }\n async run() {\n const objects = this.objects;\n const fields = this.fields;\n const result = new Aventus.VoidWithError();\n if (objects.length == 0)\n return result;\n const listIds = {};\n const mapRecords = {};\n for (let field of fields) {\n let objKey = field.obj;\n let idKey = field.id;\n listIds[objKey] = [];\n mapRecords[objKey] = {};\n for (let _value of objects) {\n let value = _value;\n if (value[idKey]) {\n const listId = listIds[objKey];\n const mapRecord = mapRecords[objKey];\n if (value[objKey])\n continue;\n if (!listId.includes(value[idKey]))\n listId.push(value[idKey]);\n if (!mapRecord[value[idKey]]) {\n mapRecord[value[idKey]] = [];\n }\n mapRecord[value[idKey]].push(value);\n }\n }\n }\n for (let field of fields) {\n let objKey = field.obj;\n if (!listIds[objKey] || !mapRecords[objKey])\n continue;\n const listId = listIds[objKey];\n const mapRecord = mapRecords[objKey];\n if (listId.length > 0) {\n const ram = Aventus.Instance.get(field.ram);\n const resultTemp = await result.extractAsync(() => ram.getByIdsWithError(listId));\n if (resultTemp) {\n for (let item of resultTemp) {\n if (mapRecord[item.Id]) {\n for (let record of mapRecord[item.Id]) {\n record[objKey] = item;\n }\n }\n }\n }\n }\n }\n return result;\n }\n}\nRAM.RamCompletor.Namespace=`AventusSharp.RAM`;\r\n__as1(_.RAM, 'RamCompletor', RAM.RamCompletor);\r\n","dependencies":[{"fullName":"AventusSharp.RAM.ItemField","isStrong":false},{"fullName":"Aventus.IRamData","isStrong":false},{"fullName":"U","isStrong":false},{"fullName":"AventusSharp.RAM.RamCompletor","isStrong":false},{"fullName":"Aventus.VoidWithError","isStrong":false}],"fullName":"AventusSharp.RAM.RamCompletor","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"RAM.RamHttp=class RamHttp extends Aventus.Ram {\n getAllDone = false;\n routes;\n constructor() {\n super();\n this.routes = this.defineRoutes();\n }\n async beforeGetAll() {\n const result = new Aventus.VoidWithError();\n if (!this.getAllDone) {\n const list = await result.extractAsync(this.routes.GetAll);\n if (!list)\n return result;\n for (let item of list) {\n await result.runAsync(() => this.addOrUpdateData(item));\n }\n this.getAllDone = true;\n }\n return result;\n }\n async beforeGetById(id) {\n const result = new Aventus.VoidWithError();\n if (this.records.has(id)) {\n return result;\n }\n else {\n const item = await result.extractAsync(() => this.routes.GetById(id));\n if (item) {\n await result.runAsync(() => this.addOrUpdateData(item));\n }\n }\n return result;\n }\n async beforeGetByIds(ids) {\n const result = new Aventus.VoidWithError();\n let missingIds = [];\n for (let id of ids) {\n if (!this.records.has(id)) {\n missingIds.push(id);\n }\n }\n if (missingIds.length > 0) {\n const response = await result.extractAsync(() => this.routes.GetByIds({ ids: missingIds }));\n if (response) {\n for (let item of response) {\n await result.runAsync(() => this.addOrUpdateData(item));\n }\n }\n }\n return result;\n }\n complete(objects) {\n return new _.RAM.RamCompletor(objects);\n }\n transformCreateRequestToItem(item) {\n return this.routes.Create({ item: item });\n }\n transformCreateRequestListToItem(list) {\n return this.routes.CreateMany({ list });\n }\n async transformUpdateRequestToItem(item) {\n const result = new Aventus.ResultWithError();\n const id = result.extract(() => this.getIdWithError(item));\n if (id === undefined)\n return result;\n return await this.routes.Update(id, { item: item });\n }\n transformUpdateRequestListToItem(list) {\n return this.routes.UpdateMany({ list });\n }\n async beforeDeleteItem(item, fromList) {\n const result = new Aventus.VoidWithError();\n if (fromList) {\n return result;\n }\n const id = result.extract(() => this.getIdWithError(item));\n if (id === undefined)\n return result;\n await result.runAsync(() => this.routes.Delete(id));\n return result;\n }\n async beforeDeleteList(list) {\n const result = new Aventus.VoidWithError();\n if (list.length == 0)\n return result;\n const ids = [];\n for (let item of list) {\n const id = result.extract(() => this.getIdWithError(item));\n if (id === undefined)\n return result;\n ids.push(id);\n }\n await result.runAsync(() => this.routes.DeleteMany({ ids }));\n return result;\n }\n}\nRAM.RamHttp.Namespace=`AventusSharp.RAM`;\r\n__as1(_.RAM, 'RamHttp', RAM.RamHttp);\r\n","dependencies":[{"fullName":"Aventus.Ram","isStrong":true},{"fullName":"AventusSharp.Data.Storable","isStrong":false},{"fullName":"AventusSharp.Routes.Request.Request","isStrong":false},{"fullName":"AventusSharp.Routes.Response.Resource","isStrong":false},{"fullName":"AventusSharp.Routes.StorableRouter","isStrong":false},{"fullName":"Aventus.VoidWithError","isStrong":false},{"fullName":"AventusSharp.RAM.RamCompletor","isStrong":false},{"fullName":"Aventus.ResultWithError","isStrong":false}],"fullName":"AventusSharp.RAM.RamHttp","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"WebSocket.SocketError=class SocketError extends Aventus.GenericError {\n}\nWebSocket.SocketError.Namespace=`AventusSharp.WebSocket`;\r\nWebSocket.SocketError.$schema={...(Aventus.GenericError?.$schema ?? {}), };\r\nAventus.Converter.register(WebSocket.SocketError.Fullname, WebSocket.SocketError);\r\n__as1(_.WebSocket, 'SocketError', WebSocket.SocketError);\r\n","dependencies":[{"fullName":"Aventus.GenericError","isStrong":true},{"fullName":"AventusSharp.WebSocket.SocketErrorCode","isStrong":false}],"fullName":"AventusSharp.WebSocket.SocketError","required":false,"type":1,"isExported":true,"convertibleName":"Fullname"},{"code":"WebSocket.Connection=class Connection {\n static Debug = false;\n options;\n waitingList = {};\n memoryBeforeOpen = [];\n socket;\n actionGuard = new Aventus.ActionGuard();\n /**\n * Create a singleton\n */\n static getInstance() {\n return Aventus.Instance.get(WebSocket.Connection);\n }\n constructor() {\n this.options = this._configure(this.configure({}));\n this._onOpen = this._onOpen.bind(this);\n this._onClose = this._onClose.bind(this);\n this._onError = this._onError.bind(this);\n this.onMessage = this.onMessage.bind(this);\n if (this.options.autoStart) {\n this.open();\n }\n }\n onOpen = new Aventus.Callback();\n onClose = new Aventus.Callback();\n onError = new Aventus.Callback();\n /**\n * Configure a new Websocket\n */\n _configure(options = {}) {\n if (!options.host) {\n options.host = window.location.hostname;\n }\n if (!options.hasOwnProperty('useHttps')) {\n options.useHttps = window.location.protocol == \"https:\";\n }\n if (!options.port) {\n if (window.location.port) {\n options.port = parseInt(window.location.port);\n }\n else {\n options.port = options.useHttps ? 443 : 80;\n }\n }\n if (!options.routes) {\n options.routes = {};\n }\n if (!options.socketName) {\n options.socketName = \"\";\n }\n if (options.log === undefined) {\n options.log = WebSocket.Connection.Debug;\n }\n if (options.autoStart === undefined) {\n options.autoStart = true;\n }\n if (options.sendPing !== undefined && options.sendPing <= 0) {\n options.sendPing = undefined;\n }\n if (options.logPrefix === undefined) {\n options.logPrefix = \"\";\n }\n return options;\n }\n getUrl() {\n let protocol = \"ws\";\n if (this.options.useHttps) {\n protocol = \"wss\";\n }\n let url = protocol + \"://\" + this.options.host + \":\" + this.options.port + this.options.socketName;\n return url;\n }\n /**\n * Add a new route to listen to the websocket\n */\n addRoute(newRoute) {\n if (!this.options.routes.hasOwnProperty(newRoute.channel)) {\n this.options.routes[newRoute.channel] = [];\n }\n for (let info of this.options.routes[newRoute.channel]) {\n if (info.callback == newRoute.callback) {\n return;\n }\n }\n const { params, regex } = Aventus.Uri.prepare(newRoute.channel);\n let prepared = {\n callback: newRoute.callback,\n channel: newRoute.channel,\n regex,\n params\n };\n this.options.routes[newRoute.channel].push(prepared);\n }\n /**\n * The route to remove\n * @param route - The route to remove\n */\n removeRoute(route) {\n for (let i = 0; i < this.options.routes[route.channel].length; i++) {\n let info = this.options.routes[route.channel][i];\n if (info.callback == route.callback) {\n this.options.routes[route.channel].splice(i, 1);\n i--;\n }\n }\n }\n openCallback;\n /**\n * Try to open the websocket\n */\n open() {\n return this.actionGuard.run([\"open\"], () => {\n return new Promise((resolve) => {\n try {\n let url = this.getUrl();\n this.log(\"Opening \" + url);\n this.openCallback = (isOpen) => {\n resolve(isOpen);\n };\n this.socket = _.WebSocket.Socket.getInstance(url, this);\n this.socket.onOpen.add(this._onOpen);\n this.socket.onClose.add(this._onClose);\n this.socket.onError.add(this._onError);\n this.socket.onMessage.add(this.onMessage);\n if (this.socket.isReady()) {\n this._onOpen();\n }\n }\n catch (e) {\n console.log(e);\n resolve(false);\n }\n });\n });\n }\n jsonReplacer(key, value) {\n const t = this;\n if (t[key] instanceof Date) {\n return Aventus.DateConverter.converter.toString(t[key]);\n }\n return value;\n }\n /**\n * Send a message though the websocket\n * @param channelName The channel on which the message is sent\n * @param data The data to send\n * @param options the options to add to the message (typically the uid)\n */\n async sendMessage(options) {\n let result = new Tools.VoidWithError();\n if (!this.socket || this.socket.readyState != 1) {\n let isOpen = await this.open();\n if (!isOpen) {\n result.errors.push(new _.WebSocket.SocketError(_.WebSocket.SocketErrorCode.socketClosed, \"Socket not ready ! Please ensure that it is open and ready to send message\"));\n this.log('Socket not ready ! Please ensure that it is open and ready to send message');\n if (this.options.allowSendBeforeOpen) {\n this.memoryBeforeOpen.push(options);\n }\n return result;\n }\n }\n if (this.socket && this.socket.readyState == 1) {\n try {\n let message = {\n channel: options.channel,\n };\n if (options.uid) {\n message.uid = options.uid;\n }\n if (options.body) {\n message.data = options.body;\n this.log(message);\n if (typeof options.body != 'string') {\n message.data = JSON.stringify(options.body, this.jsonReplacer);\n }\n }\n else if (options.channel != \"/ping\") {\n this.log(message);\n }\n this.socket.send(JSON.stringify(message));\n }\n catch (e) {\n result.errors.push(new _.WebSocket.SocketError(_.WebSocket.SocketErrorCode.unknow, e));\n }\n }\n else {\n result.errors.push(new _.WebSocket.SocketError(_.WebSocket.SocketErrorCode.socketClosed, \"Socket not ready ! Please ensure that it is open and ready to send message\"));\n this.log('Socket not ready ! Please ensure that it is open and ready to send message');\n if (this.options.allowSendBeforeOpen) {\n this.memoryBeforeOpen.push(options);\n }\n }\n return result;\n }\n /**\n * Send a message though the websocket and wait one answer give in parameters callbacks\n * @param channelName The channel on which the message is sent\n * @param body The data to send\n * @param timeout The timeout before the request failed\n */\n sendMessageAndWait(options) {\n return new Promise(async (resolve) => {\n let result = new Aventus.ResultWithError();\n try {\n let _uid = options.uid ? options.uid : Aventus.uuidv4();\n options.uid = _uid;\n let timeoutInfo;\n this.waitingList[_uid] = (channel, data) => {\n clearTimeout(timeoutInfo);\n if (channel.toLowerCase() != options.channel.toLowerCase()) {\n result.errors.push(new _.WebSocket.SocketError(_.WebSocket.SocketErrorCode.differentChannel, `We sent a message on ${options.channel} but we receive on ${channel}`));\n resolve(result);\n }\n else {\n if (data instanceof Aventus.VoidWithError) {\n for (let error of data.errors) {\n result.errors.push(error);\n }\n if (data instanceof Aventus.ResultWithError) {\n result.result = data.result;\n }\n }\n else {\n result.result = data;\n }\n resolve(result);\n }\n };\n if (options.timeout !== undefined) {\n timeoutInfo = setTimeout(() => {\n delete this.waitingList[_uid];\n result.errors.push(new _.WebSocket.SocketError(_.WebSocket.SocketErrorCode.timeout, \"No message received after \" + options.timeout + \"ms\"));\n resolve(result);\n }, options.timeout);\n }\n let sendMessageResult = await this.sendMessage(options);\n if (!sendMessageResult.success) {\n for (let error of sendMessageResult.errors) {\n result.errors.push(error);\n }\n resolve(result);\n }\n }\n catch (e) {\n result.errors.push(new _.WebSocket.SocketError(_.WebSocket.SocketErrorCode.unknow, e));\n resolve(result);\n }\n });\n }\n ;\n /**\n * Check if socket is ready\n */\n isReady() {\n if (this.socket && this.socket.isReady()) {\n return true;\n }\n return false;\n }\n sendPingTimeout = 0;\n sendPing() {\n this.sendMessage({\n channel: \"/ping\",\n });\n }\n startPing() {\n clearInterval(this.sendPingTimeout);\n this.sendPingTimeout = setInterval(() => {\n this.sendPing();\n }, 5000);\n }\n stopPing() {\n clearInterval(this.sendPingTimeout);\n }\n _onOpen() {\n if (this.socket?.isReady()) {\n if (this.openCallback) {\n this.openCallback(true);\n this.openCallback = undefined;\n }\n let protocol = \"ws\";\n if (this.options.useHttps) {\n protocol = \"wss\";\n }\n this.log(`Connection successfully established to ${this.getUrl()}!`);\n this.onOpen.trigger();\n for (let i = 0; i < this.memoryBeforeOpen.length; i++) {\n this.sendMessage(this.memoryBeforeOpen[i]);\n }\n this.memoryBeforeOpen = [];\n if (this.options.sendPing) {\n this.startPing();\n }\n }\n else {\n if (this.openCallback) {\n this.openCallback(false);\n this.openCallback = undefined;\n }\n }\n }\n errorOccur = false;\n _onError(event) {\n this.errorOccur = true;\n if (this.openCallback) {\n this.openCallback(false);\n this.openCallback = undefined;\n return;\n }\n this.log('An error has occured');\n this.onError.trigger(event);\n }\n _onClose(event) {\n this.stopPing();\n if (this.errorOccur) {\n this.errorOccur = false;\n return;\n }\n this.log('Closing connection');\n this.onClose.trigger(event);\n }\n /**\n * Close the current connection\n */\n close() {\n if (this.socket) {\n this.socket.onOpen.remove(this._onOpen);\n this.socket.onClose.remove(this._onClose);\n this.socket.onError.remove(this._onError);\n this.socket.onMessage.remove(this.onMessage);\n this.socket.close(this);\n delete this.socket;\n }\n }\n onMessage(event) {\n let response = JSON.parse(event.data);\n this.log(response);\n let data = {};\n try {\n data = Aventus.Converter.transform(JSON.parse(response.data));\n }\n catch (e) {\n console.error(e);\n }\n for (let channel in this.options.routes) {\n let current = this.options.routes[channel];\n for (let info of current) {\n let params = Aventus.Uri.getParams(info, response.channel);\n if (params) {\n let valueCb = data;\n if (data instanceof Aventus.ResultWithError) {\n valueCb = data.result;\n }\n else if (data instanceof Aventus.VoidWithError) {\n valueCb = undefined;\n }\n info.callback(valueCb, params, response.uid);\n }\n }\n }\n if (response.uid) {\n if (this.waitingList.hasOwnProperty(response.uid)) {\n this.waitingList[response.uid](response.channel, data);\n delete this.waitingList[response.uid];\n }\n }\n }\n /**\n * Print a msg inside the console\n */\n log(message) {\n if (this.options.log) {\n const now = new Date();\n const hours = (now.getHours()).toLocaleString(undefined, { minimumIntegerDigits: 2 });\n const minutes = (now.getMinutes()).toLocaleString(undefined, { minimumIntegerDigits: 2 });\n const seconds = (now.getSeconds()).toLocaleString(undefined, { minimumIntegerDigits: 2 });\n const prefix = this.options.logPrefix ? `[${this.options.logPrefix}] ` : '';\n if (message instanceof Object) {\n let cloneMessage = JSON.parse(JSON.stringify(message, this.jsonReplacer));\n if (cloneMessage.data && typeof cloneMessage.data == 'string') {\n cloneMessage.data = JSON.parse(cloneMessage.data);\n }\n console.log(`${prefix}[${hours}:${minutes}:${seconds}]: `, cloneMessage);\n }\n else {\n console.log(`${prefix}[${hours}:${minutes}:${seconds}]: `, message);\n }\n }\n }\n}\nWebSocket.Connection.Namespace=`AventusSharp.WebSocket`;\r\n__as1(_.WebSocket, 'Connection', WebSocket.Connection);\r\n","dependencies":[{"fullName":"AventusSharp.WebSocket.ConnectionOptions","isStrong":false},{"fullName":"AventusSharp.WebSocket.SocketSendMessageOptions","isStrong":false},{"fullName":"AventusSharp.WebSocket.Socket","isStrong":false},{"fullName":"Aventus.ActionGuard","isStrong":false},{"fullName":"AventusSharp.WebSocket.Connection","isStrong":false},{"fullName":"Aventus.Callback","isStrong":false},{"fullName":"AventusSharp.WebSocket.SocketRoute","isStrong":false},{"fullName":"AventusSharp.WebSocket.InternalSocketRoute","isStrong":false},{"fullName":"Aventus.VoidWithError","isStrong":false},{"fullName":"AventusSharp.Tools.VoidWithError","isStrong":false},{"fullName":"AventusSharp.WebSocket.SocketError","isStrong":false},{"fullName":"AventusSharp.WebSocket.SocketErrorCode","isStrong":false},{"fullName":"AventusSharp.WebSocket.SocketMessage","isStrong":false},{"fullName":"Aventus.ResultWithError","isStrong":false},{"fullName":"Aventus.ExtractFromError","isStrong":false},{"fullName":"T","isStrong":false}],"fullName":"AventusSharp.WebSocket.Connection","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"WebSocket.EndPoint=class EndPoint extends _.WebSocket.Connection {\n /**\n * Create a singleton\n */\n static getInstance() {\n return Aventus.Instance.get(WebSocket.EndPoint);\n }\n constructor() {\n super();\n this.register();\n }\n register() {\n }\n /**\n * @inheritdoc\n */\n configure(options) {\n options.socketName = this.path;\n options.sendPing = 5000;\n return options;\n }\n get path() {\n return \"/ws\";\n }\n ;\n}\nWebSocket.EndPoint.Namespace=`AventusSharp.WebSocket`;\r\n__as1(_.WebSocket, 'EndPoint', WebSocket.EndPoint);\r\n","dependencies":[{"fullName":"AventusSharp.WebSocket.Connection","isStrong":true},{"fullName":"AventusSharp.WebSocket.EndPoint","isStrong":false},{"fullName":"AventusSharp.WebSocket.ConnectionOptions","isStrong":false}],"fullName":"AventusSharp.WebSocket.EndPoint","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"WebSocket.WsEvent=class WsEvent {\n endpoint;\n onTrigger = new Aventus.Callback();\n routeInfo;\n _listening = false;\n get listening() {\n return this._listening;\n }\n getPrefix;\n constructor(endpoint, getPrefix) {\n this.endpoint = endpoint ?? _.WebSocket.EndPoint.getInstance();\n this.getPrefix = getPrefix ?? (() => \"\");\n this.onEvent = this.onEvent.bind(this);\n }\n init() {\n this.routeInfo = {\n channel: this.path(),\n callback: this.onEvent\n };\n if (this.listenOnBoot()) {\n this.listen();\n }\n }\n /**\n * Override this method to tell that the event must listen when created\n */\n listenOnBoot() {\n return false;\n }\n /**\n * Add the event to the endpoint. After that, the on trigger event can be triggered\n */\n listen() {\n if (!this._listening) {\n this._listening = true;\n if (!this.routeInfo) {\n this.routeInfo = {\n channel: this.path(),\n callback: this.onEvent\n };\n }\n this.endpoint.addRoute(this.routeInfo);\n }\n }\n /**\n * Remove the event from the endpoint. After that, the on trigger event won't be triggered\n */\n stop() {\n if (this._listening) {\n this._listening = false;\n this.endpoint.removeRoute(this.routeInfo);\n }\n }\n onEvent(data, params, uid) {\n this.onTrigger.trigger(data, params, uid);\n }\n}\nWebSocket.WsEvent.Namespace=`AventusSharp.WebSocket`;\r\n__as1(_.WebSocket, 'WsEvent', WebSocket.WsEvent);\r\n","dependencies":[{"fullName":"AventusSharp.WebSocket.EndPoint","isStrong":false},{"fullName":"Aventus.Callback","isStrong":false},{"fullName":"Aventus.ExtractFromError","isStrong":false},{"fullName":"Aventus.UriParamsValue","isStrong":false},{"fullName":"AventusSharp.WebSocket.SocketRoute","isStrong":false}],"fullName":"AventusSharp.WebSocket.WsEvent","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"WebSocket.StorableWsRoute_DeleteMany=class StorableWsRoute_DeleteMany extends _.WebSocket.WsEvent {\n /**\n * @inheritdoc\n */\n path() {\n return `${this.getPrefix()}/${this.StorableName()}/DeleteMany`;\n }\n StorableName;\n constructor(endpoint, getPrefix, StorableName) {\n super(endpoint, getPrefix);\n this.StorableName = StorableName ?? (() => \"\");\n }\n}\nWebSocket.StorableWsRoute_DeleteMany.Namespace=`AventusSharp.WebSocket`;\r\n__as1(_.WebSocket, 'StorableWsRoute_DeleteMany', WebSocket.StorableWsRoute_DeleteMany);\r\n","dependencies":[{"fullName":"AventusSharp.WebSocket.WsEvent","isStrong":true},{"fullName":"Aventus.ResultWithError","isStrong":false},{"fullName":"AventusSharp.WebSocket.EndPoint","isStrong":false}],"fullName":"AventusSharp.WebSocket.StorableWsRoute_DeleteMany","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"WebSocket.StorableWsRouter_Delete=class StorableWsRouter_Delete extends _.WebSocket.WsEvent {\n StorableName;\n constructor(endpoint, getPrefix, StorableName) {\n super(endpoint, getPrefix);\n this.StorableName = StorableName;\n }\n /**\n * @inheritdoc\n */\n path() {\n return `${this.getPrefix()}/${this.StorableName()}/{id:number}/Delete`;\n }\n}\nWebSocket.StorableWsRouter_Delete.Namespace=`AventusSharp.WebSocket`;\r\n__as1(_.WebSocket, 'StorableWsRouter_Delete', WebSocket.StorableWsRouter_Delete);\r\n","dependencies":[{"fullName":"AventusSharp.WebSocket.WsEvent","isStrong":true},{"fullName":"AventusSharp.WebSocket.EndPoint","isStrong":false}],"fullName":"AventusSharp.WebSocket.StorableWsRouter_Delete","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"WebSocket.StorableWsRoute_UpdateMany=class StorableWsRoute_UpdateMany extends _.WebSocket.WsEvent {\n /**\n * @inheritdoc\n */\n path() {\n return `${this.getPrefix()}/${this.StorableName()}/UpdateMany`;\n }\n StorableName;\n constructor(endpoint, getPrefix, StorableName) {\n super(endpoint, getPrefix);\n this.StorableName = StorableName ?? (() => \"\");\n }\n}\nWebSocket.StorableWsRoute_UpdateMany.Namespace=`AventusSharp.WebSocket`;\r\n__as1(_.WebSocket, 'StorableWsRoute_UpdateMany', WebSocket.StorableWsRoute_UpdateMany);\r\n","dependencies":[{"fullName":"AventusSharp.WebSocket.WsEvent","isStrong":true},{"fullName":"Aventus.ResultWithError","isStrong":false},{"fullName":"AventusSharp.WebSocket.EndPoint","isStrong":false}],"fullName":"AventusSharp.WebSocket.StorableWsRoute_UpdateMany","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"WebSocket.StorableWsRouter_Update=class StorableWsRouter_Update extends _.WebSocket.WsEvent {\n StorableName;\n constructor(endpoint, getPrefix, StorableName) {\n super(endpoint, getPrefix);\n this.StorableName = StorableName;\n }\n /**\n * @inheritdoc\n */\n path() {\n return `${this.getPrefix()}/${this.StorableName()}/{id:number}/Update`;\n }\n}\nWebSocket.StorableWsRouter_Update.Namespace=`AventusSharp.WebSocket`;\r\n__as1(_.WebSocket, 'StorableWsRouter_Update', WebSocket.StorableWsRouter_Update);\r\n","dependencies":[{"fullName":"AventusSharp.WebSocket.WsEvent","isStrong":true},{"fullName":"AventusSharp.WebSocket.EndPoint","isStrong":false}],"fullName":"AventusSharp.WebSocket.StorableWsRouter_Update","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"WebSocket.StorableWsRouter_GetByIds=class StorableWsRouter_GetByIds extends _.WebSocket.WsEvent {\n StorableName;\n constructor(endpoint, getPrefix, StorableName) {\n super(endpoint, getPrefix);\n this.StorableName = StorableName;\n }\n /**\n * @inheritdoc\n */\n path() {\n return `${this.getPrefix()}/${this.StorableName()}/getbyids`;\n }\n}\nWebSocket.StorableWsRouter_GetByIds.Namespace=`AventusSharp.WebSocket`;\r\n__as1(_.WebSocket, 'StorableWsRouter_GetByIds', WebSocket.StorableWsRouter_GetByIds);\r\n","dependencies":[{"fullName":"AventusSharp.WebSocket.WsEvent","isStrong":true},{"fullName":"AventusSharp.WebSocket.EndPoint","isStrong":false}],"fullName":"AventusSharp.WebSocket.StorableWsRouter_GetByIds","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"WebSocket.StorableWsRouter_GetById=class StorableWsRouter_GetById extends _.WebSocket.WsEvent {\n StorableName;\n constructor(endpoint, getPrefix, StorableName) {\n super(endpoint, getPrefix);\n this.StorableName = StorableName;\n }\n /**\n * @inheritdoc\n */\n path() {\n return `${this.getPrefix()}/${this.StorableName()}/{id:number}`;\n }\n}\nWebSocket.StorableWsRouter_GetById.Namespace=`AventusSharp.WebSocket`;\r\n__as1(_.WebSocket, 'StorableWsRouter_GetById', WebSocket.StorableWsRouter_GetById);\r\n","dependencies":[{"fullName":"AventusSharp.WebSocket.WsEvent","isStrong":true},{"fullName":"AventusSharp.WebSocket.EndPoint","isStrong":false}],"fullName":"AventusSharp.WebSocket.StorableWsRouter_GetById","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"WebSocket.StorableWsRoute_CreateMany=class StorableWsRoute_CreateMany extends _.WebSocket.WsEvent {\n /**\n * @inheritdoc\n */\n path() {\n return `${this.getPrefix()}/${this.StorableName()}/CreateMany`;\n }\n StorableName;\n constructor(endpoint, getPrefix, StorableName) {\n super(endpoint, getPrefix);\n this.StorableName = StorableName ?? (() => \"\");\n }\n}\nWebSocket.StorableWsRoute_CreateMany.Namespace=`AventusSharp.WebSocket`;\r\n__as1(_.WebSocket, 'StorableWsRoute_CreateMany', WebSocket.StorableWsRoute_CreateMany);\r\n","dependencies":[{"fullName":"AventusSharp.WebSocket.WsEvent","isStrong":true},{"fullName":"Aventus.ResultWithError","isStrong":false},{"fullName":"AventusSharp.WebSocket.EndPoint","isStrong":false}],"fullName":"AventusSharp.WebSocket.StorableWsRoute_CreateMany","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"WebSocket.StorableWsRouter_Create=class StorableWsRouter_Create extends _.WebSocket.WsEvent {\n StorableName;\n constructor(endpoint, getPrefix, StorableName) {\n super(endpoint, getPrefix);\n this.StorableName = StorableName;\n }\n /**\n * @inheritdoc\n */\n path() {\n return `${this.getPrefix()}/${this.StorableName()}/Create`;\n }\n}\nWebSocket.StorableWsRouter_Create.Namespace=`AventusSharp.WebSocket`;\r\n__as1(_.WebSocket, 'StorableWsRouter_Create', WebSocket.StorableWsRouter_Create);\r\n","dependencies":[{"fullName":"AventusSharp.WebSocket.WsEvent","isStrong":true},{"fullName":"AventusSharp.WebSocket.EndPoint","isStrong":false}],"fullName":"AventusSharp.WebSocket.StorableWsRouter_Create","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"WebSocket.StorableWsRouter_GetAll=class StorableWsRouter_GetAll extends _.WebSocket.WsEvent {\n StorableName;\n constructor(endpoint, getPrefix, StorableName) {\n super(endpoint, getPrefix);\n this.StorableName = StorableName;\n }\n /**\n * @inheritdoc\n */\n path() {\n return `${this.getPrefix()}/${this.StorableName()}`;\n }\n}\nWebSocket.StorableWsRouter_GetAll.Namespace=`AventusSharp.WebSocket`;\r\n__as1(_.WebSocket, 'StorableWsRouter_GetAll', WebSocket.StorableWsRouter_GetAll);\r\n","dependencies":[{"fullName":"AventusSharp.WebSocket.WsEvent","isStrong":true},{"fullName":"AventusSharp.WebSocket.EndPoint","isStrong":false}],"fullName":"AventusSharp.WebSocket.StorableWsRouter_GetAll","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"WebSocket.Router=class Router {\n endpoint;\n events;\n constructor(endpoint) {\n this.endpoint = endpoint ?? _.WebSocket.EndPoint.getInstance();\n this.events = this.defineEvents();\n for (let key in this.events) {\n this.events[key].init();\n }\n }\n getPrefix() {\n return \"\";\n }\n defineEvents() {\n return {};\n }\n}\nWebSocket.Router.Namespace=`AventusSharp.WebSocket`;\r\n__as1(_.WebSocket, 'Router', WebSocket.Router);\r\n","dependencies":[{"fullName":"AventusSharp.WebSocket.RouterRoutes","isStrong":false},{"fullName":"AventusSharp.WebSocket.EndPoint","isStrong":false}],"fullName":"AventusSharp.WebSocket.Router","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"WebSocket.StorableWsRouter=class StorableWsRouter extends _.WebSocket.Router {\n defineEvents() {\n return {\n ...super.defineEvents(),\n GetAll: new WebSocket.StorableWsRouter_GetAll(this.endpoint, this.getPrefix, this.StorableName),\n Create: new WebSocket.StorableWsRouter_Create(this.endpoint, this.getPrefix, this.StorableName),\n CreateMany: new WebSocket.StorableWsRoute_CreateMany(this.endpoint, this.getPrefix, this.StorableName),\n GetById: new WebSocket.StorableWsRouter_GetById(this.endpoint, this.getPrefix, this.StorableName),\n GetByIds: new WebSocket.StorableWsRouter_GetByIds(this.endpoint, this.getPrefix, this.StorableName),\n Update: new WebSocket.StorableWsRouter_Update(this.endpoint, this.getPrefix, this.StorableName),\n UpdateMany: new WebSocket.StorableWsRoute_UpdateMany(this.endpoint, this.getPrefix, this.StorableName),\n Delete: new WebSocket.StorableWsRouter_Delete(this.endpoint, this.getPrefix, this.StorableName),\n DeleteMany: new WebSocket.StorableWsRoute_DeleteMany(this.endpoint, this.getPrefix, this.StorableName),\n };\n }\n async GetAll(options = {}) {\n const info = {\n channel: `${this.getPrefix()}/${this.StorableName()}`,\n ...options,\n };\n return await this.endpoint.sendMessageAndWait(info);\n }\n async Create(body, options = {}) {\n const info = {\n channel: `${this.getPrefix()}/${this.StorableName()}/Create`,\n body: body,\n ...options,\n };\n return await this.endpoint.sendMessageAndWait(info);\n }\n async CreateMany(body, options = {}) {\n const info = {\n channel: `${this.getPrefix()}/${this.StorableName()}/CreateMany`,\n body: body,\n ...options,\n };\n return await this.endpoint.sendMessageAndWait(info);\n }\n async GetById(id, options = {}) {\n const info = {\n channel: `${this.getPrefix()}/${this.StorableName()}/${id}`,\n ...options,\n };\n return await this.endpoint.sendMessageAndWait(info);\n }\n async GetByIds(body, options = {}) {\n const info = {\n channel: `${this.getPrefix()}/${this.StorableName()}/getbyids`,\n body: body,\n ...options,\n };\n return await this.endpoint.sendMessageAndWait(info);\n }\n async Update(id, body, options = {}) {\n const info = {\n channel: `${this.getPrefix()}/${this.StorableName()}/${id}/Update`,\n body: body,\n ...options,\n };\n return await this.endpoint.sendMessageAndWait(info);\n }\n async UpdateMany(body, options = {}) {\n const info = {\n channel: `${this.getPrefix()}/${this.StorableName()}/UpdateMany`,\n body: body,\n ...options,\n };\n return await this.endpoint.sendMessageAndWait(info);\n }\n async Delete(id, options = {}) {\n const info = {\n channel: `${this.getPrefix()}/${this.StorableName()}/${id}/Delete`,\n ...options,\n };\n return await this.endpoint.sendMessageAndWait(info);\n }\n async DeleteMany(body, options = {}) {\n const info = {\n channel: `${this.getPrefix()}/${this.StorableName()}/DeleteMany`,\n body: body,\n ...options,\n };\n return await this.endpoint.sendMessageAndWait(info);\n }\n}\nWebSocket.StorableWsRouter.Namespace=`AventusSharp.WebSocket`;\r\n__as1(_.WebSocket, 'StorableWsRouter', WebSocket.StorableWsRouter);\r\n","dependencies":[{"fullName":"AventusSharp.WebSocket.Router","isStrong":true},{"fullName":"Aventus.IData","isStrong":false},{"fullName":"AventusSharp.Routes.Request.Request","isStrong":false},{"fullName":"AventusSharp.Routes.Response.Resource","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRouter__Routes","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRouter_GetAll","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRouter_Create","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRoute_CreateMany","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRouter_GetById","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRouter_GetByIds","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRouter_Update","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRoute_UpdateMany","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRouter_Delete","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRoute_DeleteMany","isStrong":false},{"fullName":"AventusSharp.WebSocket.WsRouteSendOptions","isStrong":false},{"fullName":"AventusSharp.ExtractResponse","isStrong":false},{"fullName":"AventusSharp.WebSocket.SocketSendMessageOptions","isStrong":false}],"fullName":"AventusSharp.WebSocket.StorableWsRouter","required":false,"type":1,"isExported":true,"convertibleName":""},{"code":"RAM.RamWebSocket=class RamWebSocket extends Aventus.Ram {\n getAllDone = false;\n routes;\n otherGetAllLocked = {};\n otherGetByIdLocked = {};\n otherCreateItemLocked = {};\n otherCreateListLocked = {};\n otherUpdateItemLocked = {};\n otherUpdateListLocked = {};\n otherDeleteItemLocked = {};\n otherDeleteListLocked = {};\n constructor() {\n super();\n this.routes = this.defineRoutes();\n this.addEventsBindings();\n this.otherGetAll = this.otherGetAll.bind(this);\n this.otherGetById = this.otherGetById.bind(this);\n this.otherCreateItem = this.otherCreateItem.bind(this);\n this.otherCreateList = this.otherCreateList.bind(this);\n this.otherUpdateItem = this.otherUpdateItem.bind(this);\n this.otherUpdateList = this.otherUpdateList.bind(this);\n this.otherDeleteItem = this.otherDeleteItem.bind(this);\n this.otherDeleteList = this.otherDeleteList.bind(this);\n }\n addOrUpdateData(item) {\n return super.addOrUpdateData(item);\n }\n addEventsBindings() {\n const autoListen = this.listenOnStart();\n this.routes.events.GetAll.onTrigger.add(this.otherGetAll, this);\n if (autoListen.GetAll) {\n this.routes.events.GetAll.listen();\n }\n else {\n this.routes.events.GetAll.stop();\n }\n this.routes.events.GetById.onTrigger.add(this.otherGetById, this);\n if (autoListen.GetById) {\n this.routes.events.GetById.listen();\n }\n else {\n this.routes.events.GetById.stop();\n }\n this.routes.events.Create.onTrigger.add(this.otherCreateItem, this);\n if (autoListen.Create) {\n this.routes.events.Create.listen();\n }\n else {\n this.routes.events.Create.stop();\n }\n this.routes.events.CreateMany.onTrigger.add(this.otherCreateList, this);\n if (autoListen.CreateMany) {\n this.routes.events.CreateMany.listen();\n }\n else {\n this.routes.events.CreateMany.stop();\n }\n this.routes.events.Update.onTrigger.add(this.otherUpdateItem, this);\n if (autoListen.Update) {\n this.routes.events.Update.listen();\n }\n else {\n this.routes.events.Update.stop();\n }\n this.routes.events.UpdateMany.onTrigger.add(this.otherUpdateList, this);\n if (autoListen.UpdateMany) {\n this.routes.events.UpdateMany.listen();\n }\n else {\n this.routes.events.UpdateMany.stop();\n }\n this.routes.events.Delete.onTrigger.add(this.otherDeleteItem, this);\n if (autoListen.Delete) {\n this.routes.events.Delete.listen();\n }\n else {\n this.routes.events.Delete.stop();\n }\n this.routes.events.DeleteMany.onTrigger.add(this.otherDeleteList, this);\n if (autoListen.DeleteMany) {\n this.routes.events.DeleteMany.listen();\n }\n else {\n this.routes.events.DeleteMany.stop();\n }\n }\n listenOnStart() {\n return {\n GetAll: false,\n GetById: false,\n Create: true,\n CreateMany: true,\n Update: true,\n UpdateMany: true,\n Delete: true,\n DeleteMany: true,\n };\n }\n complete(objects) {\n return new _.RAM.RamCompletor(objects);\n }\n async otherGetAll(items, params, uid) {\n if (uid && this.otherGetAllLocked[uid])\n return;\n for (let item of items) {\n await this.addOrUpdateData(item);\n }\n }\n async beforeGetAll() {\n const result = new Tools.VoidWithError();\n if (!this.getAllDone) {\n let uid = Aventus.uuidv4();\n this.otherGetAllLocked[uid] = true;\n const list = await result.extractAsync(() => this.routes.GetAll({ uid }));\n delete this.otherGetAllLocked[uid];\n if (!list)\n return result;\n for (let item of list) {\n await result.runAsync(() => this.addOrUpdateData(item));\n }\n }\n return result;\n }\n async otherGetById(item, params, uid) {\n if (uid && this.otherGetByIdLocked[uid])\n return;\n await this.addOrUpdateData(item);\n }\n async beforeGetById(id) {\n const result = new Tools.VoidWithError();\n if (this.records.has(id)) {\n return result;\n }\n let uid = Aventus.uuidv4();\n this.otherGetByIdLocked[uid] = true;\n const item = await result.extractAsync(() => this.routes.GetById(id));\n delete this.otherGetByIdLocked[uid];\n if (!item)\n return result;\n await result.runAsync(() => this.addOrUpdateData(item));\n return result;\n }\n async beforeGetByIds(ids) {\n const result = new Tools.VoidWithError();\n let missingIds = [];\n for (let id of ids) {\n if (!this.records.has(id)) {\n missingIds.push(id);\n }\n }\n if (missingIds.length > 0) {\n const response = await result.extractAsync(() => this.routes.GetByIds({ ids: missingIds }));\n if (!response)\n return result;\n for (let item of response) {\n await result.runAsync(() => this.addOrUpdateData(item));\n }\n }\n return result;\n }\n async otherCreateItem(item, params, uid) {\n if (uid && this.otherCreateItemLocked[uid])\n return;\n const resultTemp = await this.addOrUpdateData(item);\n if (resultTemp.success && resultTemp.result) {\n this.publish('created', resultTemp.result.value);\n }\n }\n async transformCreateRequestListToItem(list) {\n const uid = Aventus.uuidv4();\n this.otherCreateListLocked[uid] = true;\n const result = await this.routes.CreateMany({ list });\n delete this.otherCreateListLocked[uid];\n return result;\n }\n async transformCreateRequestToItem(item) {\n const uid = Aventus.uuidv4();\n this.otherCreateItemLocked[uid] = true;\n const result = await this.routes.Create({ request: item });\n delete this.otherCreateItemLocked[uid];\n return result;\n }\n async otherCreateList(items, params, uid) {\n if (uid && this.otherCreateListLocked[uid])\n return;\n for (let item of items) {\n const resultTemp = await this.addOrUpdateData(item);\n if (resultTemp.success && resultTemp.result) {\n this.publish('created', resultTemp.result.value);\n }\n }\n }\n async otherUpdateItem(item, params, uid) {\n if (uid && this.otherUpdateItemLocked[uid])\n return;\n const resultTemp = await this.addOrUpdateData(item);\n if (resultTemp.success && resultTemp.result) {\n this.publish('updated', resultTemp.result.value);\n }\n }\n async transformUpdateRequestListToItem(list) {\n let uid = Aventus.uuidv4();\n this.otherUpdateListLocked[uid] = true;\n const result = await this.routes.UpdateMany({ list });\n delete this.otherUpdateListLocked[uid];\n return result;\n }\n async transformUpdateRequestToItem(item) {\n const result = new Tools.ResultWithError();\n const id = result.extract(() => this.getIdWithError(item));\n if (id === undefined)\n return result;\n let uid = Aventus.uuidv4();\n this.otherUpdateItemLocked[uid] = true;\n const temp = await this.routes.Update(id, { request: item });\n delete this.otherUpdateItemLocked[uid];\n return temp;\n }\n async otherUpdateList(items, params, uid) {\n if (uid && this.otherUpdateListLocked[uid])\n return;\n for (let item of items) {\n const resultTemp = await this.addOrUpdateData(item);\n if (resultTemp.success && resultTemp.result) {\n this.publish('updated', resultTemp.result.value);\n }\n }\n }\n otherDeleteItem(id, params, uid) {\n if (uid && this.otherDeleteItemLocked[uid])\n return;\n const resultTemp = this.deleteData(id);\n if (resultTemp.success && resultTemp.result) {\n this.publish('deleted', resultTemp.result);\n this.recordsSubscribers.delete(id);\n }\n }\n async beforeDeleteItem(item, fromList) {\n const result = new Tools.VoidWithError();\n if (fromList) {\n return result;\n }\n let uid = Aventus.uuidv4();\n this.otherDeleteItemLocked[uid] = true;\n const id = await result.extract(() => this.getIdWithError(item));\n if (id === undefined)\n return result;\n await result.runAsync(() => this.routes.Delete(id, { uid }));\n delete this.otherDeleteItemLocked[uid];\n return result;\n }\n otherDeleteList(ids, params, uid) {\n if (uid && this.otherDeleteListLocked[uid])\n return;\n for (let id of ids) {\n const resultTemp = this.deleteData(id);\n if (resultTemp.success && resultTemp.result) {\n this.publish('deleted', resultTemp.result);\n this.recordsSubscribers.delete(id);\n }\n }\n }\n async beforeDeleteList(list) {\n const result = new Tools.VoidWithError();\n if (list.length == 0)\n return result;\n const ids = [];\n for (let item of list) {\n const id = result.extract(() => this.getIdWithError(item));\n if (id === undefined)\n return result;\n ids.push(id);\n }\n let uid = Aventus.uuidv4();\n this.otherDeleteListLocked[uid] = true;\n await result.runAsync(() => this.routes.DeleteMany({ ids }));\n delete this.otherDeleteListLocked[uid];\n return result;\n }\n /**\n * Delete element inside Ram without firing delete event\n */\n deleteData(id) {\n const result = new Tools.ResultWithError();\n try {\n if (this.records.has(id)) {\n result.result = this.records.get(id);\n this.records.delete(id);\n }\n else {\n result.errors.push(new Aventus.RamError(Aventus.RamErrorCode.noItemInsideRam, \"can't delete the item \" + id + \" because it wasn't found inside ram\"));\n }\n }\n catch (e) {\n result.errors.push(new Aventus.RamError(Aventus.RamErrorCode.unknow, e));\n }\n return result;\n }\n}\nRAM.RamWebSocket.Namespace=`AventusSharp.RAM`;\r\n__as1(_.RAM, 'RamWebSocket', RAM.RamWebSocket);\r\n","dependencies":[{"fullName":"Aventus.Ram","isStrong":true},{"fullName":"AventusSharp.Data.Storable","isStrong":false},{"fullName":"AventusSharp.Routes.Request.Request","isStrong":false},{"fullName":"AventusSharp.Routes.Response.Resource","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRouter","isStrong":false},{"fullName":"Aventus.ExtractFromError","isStrong":false},{"fullName":"AventusSharp.Tools.ResultWithError","isStrong":false},{"fullName":"Aventus.RamItem","isStrong":false},{"fullName":"AventusSharp.RAM.RamWebSocketListenOnStart","isStrong":false},{"fullName":"AventusSharp.RAM.RamCompletor","isStrong":false},{"fullName":"BindThis","isStrong":false},{"fullName":"Aventus.UriParamsValue","isStrong":false},{"fullName":"AventusSharp.Tools.VoidWithError","isStrong":false},{"fullName":"Aventus.uuidv4","isStrong":false},{"fullName":"Aventus.RamError","isStrong":false},{"fullName":"Aventus.RamErrorCode","isStrong":false}],"fullName":"AventusSharp.RAM.RamWebSocket","required":false,"type":1,"isExported":true,"convertibleName":""}],"existing":[{"fullName":"AventusSharp.WebSocket.WsRouterOptions","dependencies":[]},{"fullName":"AventusSharp.RAM.RamWebSocketListenOnStart","dependencies":[]},{"fullName":"AventusSharp.WebSocket.WsRouteSendOptions","dependencies":[]},{"fullName":"AventusSharp.WebSocket.SocketMessage","dependencies":[]},{"fullName":"AventusSharp.WebSocket.SocketSendMessageOptions","dependencies":[]},{"fullName":"AventusSharp.WebSocket.SocketRoute","dependencies":[{"fullName":"Aventus.UriParamsValue","isStrong":false}]},{"fullName":"AventusSharp.RAM.KeysOfType","dependencies":[{"fullName":"T","isStrong":false},{"fullName":"U","isStrong":false},{"fullName":"K","isStrong":false}]},{"fullName":"AventusSharp.RAM.NumberKeys","dependencies":[{"fullName":"T","isStrong":false},{"fullName":"K","isStrong":false}]},{"fullName":"AventusSharp.Data.IStorableTimestamp","dependencies":[{"fullName":"Aventus.IData","isStrong":true}]},{"fullName":"AventusSharp.Tools.IWithError","dependencies":[{"fullName":"Aventus.GenericError","isStrong":false}]},{"fullName":"AventusSharp.Tools.IResultWithError","dependencies":[{"fullName":"AventusSharp.Tools.IWithError","isStrong":true},{"fullName":"Aventus.GenericError","isStrong":false}]},{"fullName":"AventusSharp.RealDate","dependencies":[]},{"fullName":"AventusSharp.RAM.ItemField","dependencies":[{"fullName":"Aventus.IRamData","isStrong":false},{"fullName":"AventusSharp.RAM.NumberKeys","isStrong":false},{"fullName":"T","isStrong":false},{"fullName":"AventusSharp.RAM.KeysOfType","isStrong":false},{"fullName":"U","isStrong":false}]},{"fullName":"AventusSharp.WebSocket.InternalSocketRoute","dependencies":[{"fullName":"AventusSharp.WebSocket.SocketRoute","isStrong":false},{"fullName":"Aventus.PreparedUri","isStrong":false}]},{"fullName":"AventusSharp.WebSocket.ConnectionOptions","dependencies":[{"fullName":"AventusSharp.WebSocket.InternalSocketRoute","isStrong":false}]},{"fullName":"AventusSharp.WebSocket.WsEndPointType","dependencies":[{"fullName":"AventusSharp.WebSocket.EndPoint","isStrong":false}]},{"fullName":"AventusSharp.WebSocket.ExtractResultFrom","dependencies":[{"fullName":"AventusSharp.WebSocket.WsEvent","isStrong":false},{"fullName":"T","isStrong":false},{"fullName":"U","isStrong":false}]},{"fullName":"AventusSharp.WebSocket.WsEventType","dependencies":[{"fullName":"AventusSharp.WebSocket.WsEvent","isStrong":false}]},{"fullName":"AventusSharp.ExtractResponse","dependencies":[{"fullName":"AventusSharp.WebSocket.WsEvent","isStrong":false},{"fullName":"U","isStrong":false},{"fullName":"T","isStrong":false},{"fullName":"Aventus.ResultWithError","isStrong":false},{"fullName":"Aventus.ExtractFromError","isStrong":false}]},{"fullName":"AventusSharp.WebSocket.RouterRoutes","dependencies":[{"fullName":"AventusSharp.WebSocket.WsEvent","isStrong":false}]},{"fullName":"AventusSharp.WebSocket.WsRouterType","dependencies":[{"fullName":"AventusSharp.WebSocket.Router","isStrong":false}]},{"fullName":"AventusSharp.WebSocket.StorableWsRouter__Routes","dependencies":[{"fullName":"Aventus.IData","isStrong":false},{"fullName":"AventusSharp.Routes.Request.Request","isStrong":false},{"fullName":"T","isStrong":false},{"fullName":"AventusSharp.Routes.Response.Resource","isStrong":false},{"fullName":"R","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRouter_GetAll","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRouter_Create","isStrong":false},{"fullName":"S","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRoute_CreateMany","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRouter_GetById","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRouter_GetByIds","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRouter_Update","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRoute_UpdateMany","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRouter_Delete","isStrong":false},{"fullName":"AventusSharp.WebSocket.StorableWsRoute_DeleteMany","isStrong":false}]}]}
|
|
791
952
|
//#endregion js src //
|
|
792
953
|
//#region css def //
|
|
793
954
|
{}
|
|
@@ -798,6 +959,6 @@ abstract class RamWebSocket<T extends Data.Storable> extends Aventus.Ram<T> {
|
|
|
798
959
|
//#region html //
|
|
799
960
|
{}
|
|
800
961
|
//#endregion html //
|
|
801
|
-
//#region
|
|
802
|
-
|
|
803
|
-
//#endregion
|
|
962
|
+
//#region dependencies //
|
|
963
|
+
{}
|
|
964
|
+
//#endregion dependencies //
|