@routr/common 2.0.5-alpha.9 → 2.0.6-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assertions.d.ts +6 -0
- package/dist/assertions.js +37 -0
- package/dist/auth.d.ts +1 -1
- package/dist/auth.js +12 -4
- package/dist/connect/data_api.d.ts +11 -0
- package/dist/connect/data_api.js +91 -0
- package/dist/connect/grpc_client.d.ts +1 -0
- package/dist/connect/grpc_client.js +56 -0
- package/dist/connect/index.d.ts +3 -0
- package/dist/connect/index.js +37 -0
- package/dist/connect/types.d.ts +36 -0
- package/dist/connect/types.js +39 -0
- package/dist/errors.d.ts +18 -1
- package/dist/errors.js +43 -3
- package/dist/helper.d.ts +6 -0
- package/dist/helper.js +12 -5
- package/dist/index.d.ts +9 -3
- package/dist/index.js +18 -8
- package/dist/ip_utils.js +11 -11
- package/dist/protos/common.proto +18 -0
- package/dist/protos/location.proto +22 -9
- package/dist/protos/processor.proto +40 -0
- package/dist/protos/requester.proto +47 -0
- package/dist/protos/resources.proto +109 -0
- package/dist/protos/sipmessage.proto +47 -8
- package/dist/redis.d.ts +8 -0
- package/dist/redis.js +10 -0
- package/dist/requester/grpc_client.d.ts +1 -0
- package/dist/requester/grpc_client.js +56 -0
- package/dist/requester/index.d.ts +1 -0
- package/dist/requester/index.js +35 -0
- package/dist/service.d.ts +13 -2
- package/dist/service.js +49 -11
- package/dist/tracer.d.ts +7 -0
- package/dist/tracer.js +53 -0
- package/dist/types.d.ts +208 -7
- package/dist/types.js +88 -19
- package/package.json +11 -3
package/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ServiceDefinition } from "@grpc/proto-loader";
|
|
1
2
|
export declare enum Method {
|
|
2
3
|
UNKNOWN = "UNKNOWN",
|
|
3
4
|
REGISTER = "REGISTER",
|
|
@@ -5,7 +6,11 @@ export declare enum Method {
|
|
|
5
6
|
MESSAGE = "MESSAGE",
|
|
6
7
|
PUBLISH = "PUBLISH",
|
|
7
8
|
NOTIFY = "NOTIFY",
|
|
8
|
-
SUBSCRIBE = "SUBSCRIBE"
|
|
9
|
+
SUBSCRIBE = "SUBSCRIBE",
|
|
10
|
+
ACK = "ACK",
|
|
11
|
+
BYE = "BYE",
|
|
12
|
+
CANCEL = "CANCEL",
|
|
13
|
+
OPTIONS = "OPTIONS"
|
|
9
14
|
}
|
|
10
15
|
export declare enum Transport {
|
|
11
16
|
TCP = "TCP",
|
|
@@ -15,6 +20,16 @@ export declare enum Transport {
|
|
|
15
20
|
WS = "WS",
|
|
16
21
|
WSS = "WSS"
|
|
17
22
|
}
|
|
23
|
+
export declare enum ExtraHeader {
|
|
24
|
+
REQUEST_URI = "X-Request-Uri",
|
|
25
|
+
GATEWAY_AUTH = "X-Gateway-Auth",
|
|
26
|
+
EDGEPORT_REF = "X-Edgeport-Ref",
|
|
27
|
+
SESSION_COUNT = "X-Session-Count"
|
|
28
|
+
}
|
|
29
|
+
export declare enum Privacy {
|
|
30
|
+
NONE = "none",
|
|
31
|
+
PRIVATE = "id"
|
|
32
|
+
}
|
|
18
33
|
export interface NetInterface {
|
|
19
34
|
host: string;
|
|
20
35
|
port: number;
|
|
@@ -28,7 +43,7 @@ export interface MessageRequest {
|
|
|
28
43
|
listeningPoint: NetInterface;
|
|
29
44
|
externalIps: string[];
|
|
30
45
|
localnets: string[];
|
|
31
|
-
message:
|
|
46
|
+
message: SIPMessage;
|
|
32
47
|
}
|
|
33
48
|
export interface MessageResponse {
|
|
34
49
|
message: Record<string, unknown>;
|
|
@@ -37,7 +52,6 @@ export interface ProcessorConfig {
|
|
|
37
52
|
ref: string;
|
|
38
53
|
addr: string;
|
|
39
54
|
methods: Array<Method>;
|
|
40
|
-
isFallback?: boolean;
|
|
41
55
|
matchFunc?: (request: MessageRequest) => boolean;
|
|
42
56
|
}
|
|
43
57
|
export interface MiddlewareConfig {
|
|
@@ -47,8 +61,8 @@ export interface MiddlewareConfig {
|
|
|
47
61
|
export interface ServiceInfo {
|
|
48
62
|
name: string;
|
|
49
63
|
bindAddr: string;
|
|
50
|
-
service:
|
|
51
|
-
handlers: Record<string, (call: unknown, callback:
|
|
64
|
+
service: ServiceDefinition;
|
|
65
|
+
handlers: Record<string, (call: unknown, callback: (error: Error, result: unknown) => void) => unknown>;
|
|
52
66
|
}
|
|
53
67
|
export interface ObjectProto {
|
|
54
68
|
name: string;
|
|
@@ -81,15 +95,202 @@ export interface AuthChallengeResponse {
|
|
|
81
95
|
uri: string;
|
|
82
96
|
method: string;
|
|
83
97
|
}
|
|
98
|
+
export declare enum HeaderModifierAction {
|
|
99
|
+
ADD = "add",
|
|
100
|
+
REMOVE = "remove"
|
|
101
|
+
}
|
|
102
|
+
export interface HeaderModifier {
|
|
103
|
+
name: string;
|
|
104
|
+
value?: string;
|
|
105
|
+
action: HeaderModifierAction;
|
|
106
|
+
}
|
|
84
107
|
export interface Route {
|
|
85
108
|
user: string;
|
|
86
109
|
host: string;
|
|
87
110
|
port: number;
|
|
88
111
|
transport: Transport;
|
|
89
|
-
registeredOn
|
|
112
|
+
registeredOn?: number;
|
|
90
113
|
sessionCount?: number;
|
|
91
|
-
expires
|
|
114
|
+
expires?: number;
|
|
92
115
|
edgePortRef: string;
|
|
93
116
|
listeningPoint: NetInterface;
|
|
94
117
|
labels?: Map<string, string>;
|
|
118
|
+
headers?: HeaderModifier[];
|
|
119
|
+
}
|
|
120
|
+
export declare enum ResponseType {
|
|
121
|
+
UNKNOWN = 0,
|
|
122
|
+
TRYING = 1,
|
|
123
|
+
RINGING = 2,
|
|
124
|
+
CALL_IS_BEING_FORWARDED = 3,
|
|
125
|
+
QUEUED = 4,
|
|
126
|
+
SESSION_PROGRESS = 5,
|
|
127
|
+
SUCCESS = 6,
|
|
128
|
+
OK = 7,
|
|
129
|
+
ACCEPTED = 8,
|
|
130
|
+
REDIRECTION = 9,
|
|
131
|
+
MULTIPLE_CHOICES = 10,
|
|
132
|
+
MOVED_PERMANENTLY = 11,
|
|
133
|
+
MOVED_TEMPORARILY = 12,
|
|
134
|
+
USE_PROXY = 13,
|
|
135
|
+
ALTERNATIVE_SERVICE = 14,
|
|
136
|
+
CLIENT_ERROR = 15,
|
|
137
|
+
BAD_REQUEST = 16,
|
|
138
|
+
UNAUTHORIZED = 17,
|
|
139
|
+
PAYMENT_REQUIRED = 18,
|
|
140
|
+
FORBIDDEN = 19,
|
|
141
|
+
NOT_FOUND = 20,
|
|
142
|
+
METHOD_NOT_ALLOWED = 21,
|
|
143
|
+
NOT_ACCEPTABLE = 22,
|
|
144
|
+
PROXY_AUTHENTICATION_REQUIRED = 23,
|
|
145
|
+
REQUEST_TIMEOUT = 24,
|
|
146
|
+
GONE = 25,
|
|
147
|
+
REQUEST_ENTITY_TOO_LARGE = 26,
|
|
148
|
+
REQUEST_URI_TOO_LONG = 27,
|
|
149
|
+
UNSUPPORTED_MEDIA_TYPE = 28,
|
|
150
|
+
UNSUPPORTED_URI_SCHEME = 29,
|
|
151
|
+
BAD_EXTENSION = 30,
|
|
152
|
+
EXTENSION_REQUIRED = 31,
|
|
153
|
+
INTERVAL_TOO_BRIEF = 32,
|
|
154
|
+
TEMPORARILY_UNAVAILABLE = 33,
|
|
155
|
+
CALL_OR_TRANSACTION_DOES_NOT_EXIST = 34,
|
|
156
|
+
LOOP_DETECTED = 35,
|
|
157
|
+
TOO_MANY_HOPS = 36,
|
|
158
|
+
ADDRESS_INCOMPLETE = 37,
|
|
159
|
+
AMBIGUOUS = 38,
|
|
160
|
+
BUSY_HERE = 39,
|
|
161
|
+
REQUEST_TERMINATED = 40,
|
|
162
|
+
NOT_ACCEPTABLE_HERE = 41,
|
|
163
|
+
BAD_EVENT = 42,
|
|
164
|
+
REQUEST_PENDING = 43,
|
|
165
|
+
UNDECIPHERABLE = 44,
|
|
166
|
+
SERVER_ERROR = 45,
|
|
167
|
+
SERVER_INTERNAL_ERROR = 46,
|
|
168
|
+
NOT_IMPLEMENTED = 47,
|
|
169
|
+
BAD_GATEWAY = 48,
|
|
170
|
+
SERVICE_UNAVAILABLE = 49,
|
|
171
|
+
SERVER_TIMEOUT = 50,
|
|
172
|
+
VERSION_NOT_SUPPORTED = 51,
|
|
173
|
+
MESSAGE_TOO_LARGE = 52,
|
|
174
|
+
GLOBAL_ERROR = 53,
|
|
175
|
+
BUSY_EVERYWHERE = 54,
|
|
176
|
+
DECLINE = 55,
|
|
177
|
+
DOES_NOT_EXIST_ANYWHERE = 56,
|
|
178
|
+
SESSION_NOT_ACCEPTABLE = 57
|
|
179
|
+
}
|
|
180
|
+
export interface WWWAuthenticate {
|
|
181
|
+
realm: string;
|
|
182
|
+
domain: string;
|
|
183
|
+
nonce: string;
|
|
184
|
+
scheme: string;
|
|
185
|
+
algorithm: string;
|
|
186
|
+
qop: string;
|
|
187
|
+
opaque: string;
|
|
188
|
+
stale: boolean;
|
|
189
|
+
}
|
|
190
|
+
export interface Authorization {
|
|
191
|
+
realm: string;
|
|
192
|
+
scheme: string;
|
|
193
|
+
nonce: string;
|
|
194
|
+
cNonce: string;
|
|
195
|
+
nonceCount: number;
|
|
196
|
+
response: string;
|
|
197
|
+
username: string;
|
|
198
|
+
uri: string;
|
|
199
|
+
algorithm: string;
|
|
200
|
+
qop: string;
|
|
201
|
+
opaque: string;
|
|
202
|
+
method?: string;
|
|
203
|
+
}
|
|
204
|
+
export interface CallID {
|
|
205
|
+
callId: string;
|
|
206
|
+
}
|
|
207
|
+
export interface ContentLength {
|
|
208
|
+
contentLength: number;
|
|
209
|
+
}
|
|
210
|
+
export interface Extension {
|
|
211
|
+
name: string;
|
|
212
|
+
value: string;
|
|
213
|
+
}
|
|
214
|
+
export interface Via {
|
|
215
|
+
host: string;
|
|
216
|
+
port: number;
|
|
217
|
+
branch?: string;
|
|
218
|
+
transport: Transport;
|
|
219
|
+
}
|
|
220
|
+
export interface SipURI {
|
|
221
|
+
user?: string;
|
|
222
|
+
host: string;
|
|
223
|
+
port?: number;
|
|
224
|
+
transportParam: string;
|
|
225
|
+
mAddrParam?: string;
|
|
226
|
+
userParam?: string;
|
|
227
|
+
ttlParam?: number;
|
|
228
|
+
lrParam?: boolean;
|
|
229
|
+
methodParam?: string;
|
|
230
|
+
secure?: boolean;
|
|
231
|
+
userPassword?: string;
|
|
232
|
+
}
|
|
233
|
+
export interface Address {
|
|
234
|
+
uri: SipURI;
|
|
235
|
+
displayName?: string;
|
|
236
|
+
wildcard?: boolean;
|
|
237
|
+
}
|
|
238
|
+
export interface MaxForwards {
|
|
239
|
+
maxForwards: number;
|
|
240
|
+
}
|
|
241
|
+
export interface RouteHeader {
|
|
242
|
+
address: Address;
|
|
243
|
+
parameters?: Record<string, string>;
|
|
244
|
+
}
|
|
245
|
+
export interface RecordRoute {
|
|
246
|
+
address: Address;
|
|
247
|
+
parameters?: Record<string, string>;
|
|
248
|
+
}
|
|
249
|
+
export interface From {
|
|
250
|
+
address: Address;
|
|
251
|
+
tag: string;
|
|
252
|
+
parameters?: Record<string, string>;
|
|
253
|
+
}
|
|
254
|
+
export interface To {
|
|
255
|
+
address: Address;
|
|
256
|
+
tag?: string;
|
|
257
|
+
parameters?: Record<string, string>;
|
|
258
|
+
}
|
|
259
|
+
export interface Contact {
|
|
260
|
+
address: Address;
|
|
261
|
+
expires: number;
|
|
262
|
+
qValue: number;
|
|
263
|
+
}
|
|
264
|
+
export interface Expires {
|
|
265
|
+
expires: number;
|
|
266
|
+
}
|
|
267
|
+
export declare enum MessageType {
|
|
268
|
+
REQUEST = "requestUri",
|
|
269
|
+
RESPONSE = "responseType"
|
|
270
|
+
}
|
|
271
|
+
export interface SIPMessage {
|
|
272
|
+
messageType: MessageType;
|
|
273
|
+
responseType?: ResponseType;
|
|
274
|
+
requestUri?: SipURI;
|
|
275
|
+
from: From;
|
|
276
|
+
to: To;
|
|
277
|
+
contact?: Contact;
|
|
278
|
+
callId: CallID;
|
|
279
|
+
contentLength: ContentLength;
|
|
280
|
+
expires?: Expires;
|
|
281
|
+
wwwAuthenticate?: WWWAuthenticate;
|
|
282
|
+
maxForwards: MaxForwards;
|
|
283
|
+
authorization?: Authorization;
|
|
284
|
+
extensions?: Extension[];
|
|
285
|
+
via?: Via[];
|
|
286
|
+
route?: RouteHeader[];
|
|
287
|
+
recordRoute?: RecordRoute[];
|
|
288
|
+
}
|
|
289
|
+
export interface GrpcCallback {
|
|
290
|
+
(error: Error | {
|
|
291
|
+
code: number;
|
|
292
|
+
} | null, response?: unknown): void;
|
|
293
|
+
}
|
|
294
|
+
export interface GrpcCall {
|
|
295
|
+
request: Record<string, any>;
|
|
95
296
|
}
|
package/dist/types.js
CHANGED
|
@@ -1,24 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Transport = exports.Method = void 0;
|
|
4
|
-
/*
|
|
5
|
-
* Copyright (C) 2022 by Fonoster Inc (https://fonoster.com)
|
|
6
|
-
* http://github.com/fonoster/routr
|
|
7
|
-
*
|
|
8
|
-
* This file is part of Routr
|
|
9
|
-
*
|
|
10
|
-
* Licensed under the MIT License (the "License")
|
|
11
|
-
* you may not use this file except in compliance with
|
|
12
|
-
* the License. You may obtain a copy of the License at
|
|
13
|
-
*
|
|
14
|
-
* https://opensource.org/licenses/MIT
|
|
15
|
-
*
|
|
16
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
17
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
18
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
-
* See the License for the specific language governing permissions and
|
|
20
|
-
* limitations under the License.
|
|
21
|
-
*/
|
|
3
|
+
exports.MessageType = exports.ResponseType = exports.HeaderModifierAction = exports.Privacy = exports.ExtraHeader = exports.Transport = exports.Method = void 0;
|
|
22
4
|
var Method;
|
|
23
5
|
(function (Method) {
|
|
24
6
|
Method["UNKNOWN"] = "UNKNOWN";
|
|
@@ -28,6 +10,10 @@ var Method;
|
|
|
28
10
|
Method["PUBLISH"] = "PUBLISH";
|
|
29
11
|
Method["NOTIFY"] = "NOTIFY";
|
|
30
12
|
Method["SUBSCRIBE"] = "SUBSCRIBE";
|
|
13
|
+
Method["ACK"] = "ACK";
|
|
14
|
+
Method["BYE"] = "BYE";
|
|
15
|
+
Method["CANCEL"] = "CANCEL";
|
|
16
|
+
Method["OPTIONS"] = "OPTIONS";
|
|
31
17
|
})(Method = exports.Method || (exports.Method = {}));
|
|
32
18
|
var Transport;
|
|
33
19
|
(function (Transport) {
|
|
@@ -38,3 +24,86 @@ var Transport;
|
|
|
38
24
|
Transport["WS"] = "WS";
|
|
39
25
|
Transport["WSS"] = "WSS";
|
|
40
26
|
})(Transport = exports.Transport || (exports.Transport = {}));
|
|
27
|
+
var ExtraHeader;
|
|
28
|
+
(function (ExtraHeader) {
|
|
29
|
+
ExtraHeader["REQUEST_URI"] = "X-Request-Uri";
|
|
30
|
+
ExtraHeader["GATEWAY_AUTH"] = "X-Gateway-Auth";
|
|
31
|
+
ExtraHeader["EDGEPORT_REF"] = "X-Edgeport-Ref";
|
|
32
|
+
ExtraHeader["SESSION_COUNT"] = "X-Session-Count";
|
|
33
|
+
})(ExtraHeader = exports.ExtraHeader || (exports.ExtraHeader = {}));
|
|
34
|
+
var Privacy;
|
|
35
|
+
(function (Privacy) {
|
|
36
|
+
Privacy["NONE"] = "none";
|
|
37
|
+
Privacy["PRIVATE"] = "id";
|
|
38
|
+
})(Privacy = exports.Privacy || (exports.Privacy = {}));
|
|
39
|
+
var HeaderModifierAction;
|
|
40
|
+
(function (HeaderModifierAction) {
|
|
41
|
+
HeaderModifierAction["ADD"] = "add";
|
|
42
|
+
HeaderModifierAction["REMOVE"] = "remove";
|
|
43
|
+
})(HeaderModifierAction = exports.HeaderModifierAction || (exports.HeaderModifierAction = {}));
|
|
44
|
+
var ResponseType;
|
|
45
|
+
(function (ResponseType) {
|
|
46
|
+
ResponseType[ResponseType["UNKNOWN"] = 0] = "UNKNOWN";
|
|
47
|
+
ResponseType[ResponseType["TRYING"] = 1] = "TRYING";
|
|
48
|
+
ResponseType[ResponseType["RINGING"] = 2] = "RINGING";
|
|
49
|
+
ResponseType[ResponseType["CALL_IS_BEING_FORWARDED"] = 3] = "CALL_IS_BEING_FORWARDED";
|
|
50
|
+
ResponseType[ResponseType["QUEUED"] = 4] = "QUEUED";
|
|
51
|
+
ResponseType[ResponseType["SESSION_PROGRESS"] = 5] = "SESSION_PROGRESS";
|
|
52
|
+
ResponseType[ResponseType["SUCCESS"] = 6] = "SUCCESS";
|
|
53
|
+
ResponseType[ResponseType["OK"] = 7] = "OK";
|
|
54
|
+
ResponseType[ResponseType["ACCEPTED"] = 8] = "ACCEPTED";
|
|
55
|
+
ResponseType[ResponseType["REDIRECTION"] = 9] = "REDIRECTION";
|
|
56
|
+
ResponseType[ResponseType["MULTIPLE_CHOICES"] = 10] = "MULTIPLE_CHOICES";
|
|
57
|
+
ResponseType[ResponseType["MOVED_PERMANENTLY"] = 11] = "MOVED_PERMANENTLY";
|
|
58
|
+
ResponseType[ResponseType["MOVED_TEMPORARILY"] = 12] = "MOVED_TEMPORARILY";
|
|
59
|
+
ResponseType[ResponseType["USE_PROXY"] = 13] = "USE_PROXY";
|
|
60
|
+
ResponseType[ResponseType["ALTERNATIVE_SERVICE"] = 14] = "ALTERNATIVE_SERVICE";
|
|
61
|
+
ResponseType[ResponseType["CLIENT_ERROR"] = 15] = "CLIENT_ERROR";
|
|
62
|
+
ResponseType[ResponseType["BAD_REQUEST"] = 16] = "BAD_REQUEST";
|
|
63
|
+
ResponseType[ResponseType["UNAUTHORIZED"] = 17] = "UNAUTHORIZED";
|
|
64
|
+
ResponseType[ResponseType["PAYMENT_REQUIRED"] = 18] = "PAYMENT_REQUIRED";
|
|
65
|
+
ResponseType[ResponseType["FORBIDDEN"] = 19] = "FORBIDDEN";
|
|
66
|
+
ResponseType[ResponseType["NOT_FOUND"] = 20] = "NOT_FOUND";
|
|
67
|
+
ResponseType[ResponseType["METHOD_NOT_ALLOWED"] = 21] = "METHOD_NOT_ALLOWED";
|
|
68
|
+
ResponseType[ResponseType["NOT_ACCEPTABLE"] = 22] = "NOT_ACCEPTABLE";
|
|
69
|
+
ResponseType[ResponseType["PROXY_AUTHENTICATION_REQUIRED"] = 23] = "PROXY_AUTHENTICATION_REQUIRED";
|
|
70
|
+
ResponseType[ResponseType["REQUEST_TIMEOUT"] = 24] = "REQUEST_TIMEOUT";
|
|
71
|
+
ResponseType[ResponseType["GONE"] = 25] = "GONE";
|
|
72
|
+
ResponseType[ResponseType["REQUEST_ENTITY_TOO_LARGE"] = 26] = "REQUEST_ENTITY_TOO_LARGE";
|
|
73
|
+
ResponseType[ResponseType["REQUEST_URI_TOO_LONG"] = 27] = "REQUEST_URI_TOO_LONG";
|
|
74
|
+
ResponseType[ResponseType["UNSUPPORTED_MEDIA_TYPE"] = 28] = "UNSUPPORTED_MEDIA_TYPE";
|
|
75
|
+
ResponseType[ResponseType["UNSUPPORTED_URI_SCHEME"] = 29] = "UNSUPPORTED_URI_SCHEME";
|
|
76
|
+
ResponseType[ResponseType["BAD_EXTENSION"] = 30] = "BAD_EXTENSION";
|
|
77
|
+
ResponseType[ResponseType["EXTENSION_REQUIRED"] = 31] = "EXTENSION_REQUIRED";
|
|
78
|
+
ResponseType[ResponseType["INTERVAL_TOO_BRIEF"] = 32] = "INTERVAL_TOO_BRIEF";
|
|
79
|
+
ResponseType[ResponseType["TEMPORARILY_UNAVAILABLE"] = 33] = "TEMPORARILY_UNAVAILABLE";
|
|
80
|
+
ResponseType[ResponseType["CALL_OR_TRANSACTION_DOES_NOT_EXIST"] = 34] = "CALL_OR_TRANSACTION_DOES_NOT_EXIST";
|
|
81
|
+
ResponseType[ResponseType["LOOP_DETECTED"] = 35] = "LOOP_DETECTED";
|
|
82
|
+
ResponseType[ResponseType["TOO_MANY_HOPS"] = 36] = "TOO_MANY_HOPS";
|
|
83
|
+
ResponseType[ResponseType["ADDRESS_INCOMPLETE"] = 37] = "ADDRESS_INCOMPLETE";
|
|
84
|
+
ResponseType[ResponseType["AMBIGUOUS"] = 38] = "AMBIGUOUS";
|
|
85
|
+
ResponseType[ResponseType["BUSY_HERE"] = 39] = "BUSY_HERE";
|
|
86
|
+
ResponseType[ResponseType["REQUEST_TERMINATED"] = 40] = "REQUEST_TERMINATED";
|
|
87
|
+
ResponseType[ResponseType["NOT_ACCEPTABLE_HERE"] = 41] = "NOT_ACCEPTABLE_HERE";
|
|
88
|
+
ResponseType[ResponseType["BAD_EVENT"] = 42] = "BAD_EVENT";
|
|
89
|
+
ResponseType[ResponseType["REQUEST_PENDING"] = 43] = "REQUEST_PENDING";
|
|
90
|
+
ResponseType[ResponseType["UNDECIPHERABLE"] = 44] = "UNDECIPHERABLE";
|
|
91
|
+
ResponseType[ResponseType["SERVER_ERROR"] = 45] = "SERVER_ERROR";
|
|
92
|
+
ResponseType[ResponseType["SERVER_INTERNAL_ERROR"] = 46] = "SERVER_INTERNAL_ERROR";
|
|
93
|
+
ResponseType[ResponseType["NOT_IMPLEMENTED"] = 47] = "NOT_IMPLEMENTED";
|
|
94
|
+
ResponseType[ResponseType["BAD_GATEWAY"] = 48] = "BAD_GATEWAY";
|
|
95
|
+
ResponseType[ResponseType["SERVICE_UNAVAILABLE"] = 49] = "SERVICE_UNAVAILABLE";
|
|
96
|
+
ResponseType[ResponseType["SERVER_TIMEOUT"] = 50] = "SERVER_TIMEOUT";
|
|
97
|
+
ResponseType[ResponseType["VERSION_NOT_SUPPORTED"] = 51] = "VERSION_NOT_SUPPORTED";
|
|
98
|
+
ResponseType[ResponseType["MESSAGE_TOO_LARGE"] = 52] = "MESSAGE_TOO_LARGE";
|
|
99
|
+
ResponseType[ResponseType["GLOBAL_ERROR"] = 53] = "GLOBAL_ERROR";
|
|
100
|
+
ResponseType[ResponseType["BUSY_EVERYWHERE"] = 54] = "BUSY_EVERYWHERE";
|
|
101
|
+
ResponseType[ResponseType["DECLINE"] = 55] = "DECLINE";
|
|
102
|
+
ResponseType[ResponseType["DOES_NOT_EXIST_ANYWHERE"] = 56] = "DOES_NOT_EXIST_ANYWHERE";
|
|
103
|
+
ResponseType[ResponseType["SESSION_NOT_ACCEPTABLE"] = 57] = "SESSION_NOT_ACCEPTABLE";
|
|
104
|
+
})(ResponseType = exports.ResponseType || (exports.ResponseType = {}));
|
|
105
|
+
var MessageType;
|
|
106
|
+
(function (MessageType) {
|
|
107
|
+
MessageType["REQUEST"] = "requestUri";
|
|
108
|
+
MessageType["RESPONSE"] = "responseType";
|
|
109
|
+
})(MessageType = exports.MessageType || (exports.MessageType = {}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@routr/common",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6-alpha.0",
|
|
4
4
|
"description": "Common package",
|
|
5
5
|
"author": "Pedro Sanders <psanders@fonoster.com>",
|
|
6
6
|
"homepage": "https://github.com/fonoster/routr#readme",
|
|
@@ -13,9 +13,17 @@
|
|
|
13
13
|
"postbuild": "mkdir -p dist/protos && cp src/protos/* dist/protos"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@fonoster/logger": "
|
|
16
|
+
"@fonoster/logger": "0.3.17-alpha.2",
|
|
17
17
|
"@grpc/grpc-js": "^1.5.9",
|
|
18
18
|
"@grpc/proto-loader": "^0.6.9",
|
|
19
|
+
"@opentelemetry/api": "^1.0.4",
|
|
20
|
+
"@opentelemetry/exporter-jaeger": "^1.0.4",
|
|
21
|
+
"@opentelemetry/instrumentation": "^0.27.0",
|
|
22
|
+
"@opentelemetry/instrumentation-grpc": "^0.27.0",
|
|
23
|
+
"@opentelemetry/resources": "^1.0.4",
|
|
24
|
+
"@opentelemetry/sdk-trace-base": "^1.0.4",
|
|
25
|
+
"@opentelemetry/sdk-trace-node": "^1.0.4",
|
|
26
|
+
"@opentelemetry/semantic-conventions": "^1.0.4",
|
|
19
27
|
"fp-ts": "^2.11.8",
|
|
20
28
|
"ip-utils": "^2.4.0"
|
|
21
29
|
},
|
|
@@ -36,5 +44,5 @@
|
|
|
36
44
|
"bugs": {
|
|
37
45
|
"url": "https://github.com/fonoster/routr/issues"
|
|
38
46
|
},
|
|
39
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "0829f7e9b5b3ebba7eb984da5436d7c07689d776"
|
|
40
48
|
}
|