@routr/common 2.0.5-alpha.0 → 2.0.5-alpha.1

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.
@@ -0,0 +1,66 @@
1
+ syntax = "proto3";
2
+
3
+ option java_multiple_files = true;
4
+ option java_package = "io.routr";
5
+ option java_outer_classname = "ProcessorProto";
6
+ option objc_class_prefix = "PR";
7
+
8
+ package fonoster.routr.processor.v2draft1;
9
+
10
+ // Processor service
11
+ service Processor {
12
+ // Process Message Request
13
+ rpc ProcessMessage (MessageRequest) returns (MessageRequest) {}
14
+ }
15
+
16
+ // Message process IN or OUT
17
+ enum Direction {
18
+ IN = 0;
19
+ OUT = 1;
20
+ }
21
+
22
+ // Message process IN or OUT
23
+ enum Type {
24
+ REQUEST = 0;
25
+ RESPONSE = 1;
26
+ }
27
+
28
+ enum Method {
29
+ UNKNOWN = 0;
30
+ REGISTER = 1;
31
+ INVITE = 2;
32
+ MESSAGE = 3;
33
+ PUBLISH = 4;
34
+ NOTIFY = 5;
35
+ SUBSCRIBE = 6;
36
+ }
37
+
38
+ enum Transport {
39
+ TCP = 0;
40
+ UDP = 1;
41
+ TLS = 2;
42
+ SCTP = 3;
43
+ WS = 4;
44
+ WSS = 5;
45
+ }
46
+
47
+ message NetInterface {
48
+ string host = 1;
49
+ int32 port = 2;
50
+ Transport transport = 3;
51
+ }
52
+
53
+ message SIPMessage {
54
+ string call_id = 1;
55
+ }
56
+
57
+ message MessageRequest {
58
+ string ref = 1;
59
+ Type type = 2;
60
+ Method method = 3;
61
+ Direction direction = 4;
62
+ // .google.protobuf.Struct metadata = 5
63
+ NetInterface origin_interface = 6;
64
+ NetInterface target_interface = 7;
65
+ SIPMessage sip_message = 8;
66
+ }
package/dist/service.js CHANGED
@@ -19,7 +19,7 @@ var loadOptions = {
19
19
  exports.PROCESSOR_OBJECT_PROTO = getObjectProto({
20
20
  name: "processor",
21
21
  version: "v2draft1",
22
- path: __dirname + '../../../../protos/processor.proto'
22
+ path: __dirname + '/protos/processor.proto'
23
23
  });
24
24
  function getObjectProto(objectProto) {
25
25
  var _a, _b;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@routr/common",
3
- "version": "2.0.5-alpha.0",
3
+ "version": "2.0.5-alpha.1",
4
4
  "description": "Common package",
5
5
  "author": "Pedro Sanders <psanders@fonoster.com>",
6
6
  "homepage": "https://github.com/fonoster/routr#readme",
@@ -9,7 +9,8 @@
9
9
  "types": "dist/index",
10
10
  "scripts": {
11
11
  "prebuild": "rimraf ./dist tsconfig.tsbuildinfo",
12
- "build": "tsc -b tsconfig.json"
12
+ "build": "tsc -b tsconfig.json",
13
+ "postbuild": "mkdir -p dist/protos && cp src/protos/* dist/protos"
13
14
  },
14
15
  "dependencies": {
15
16
  "@fonoster/logger": "^0.3.3",
@@ -33,5 +34,5 @@
33
34
  "bugs": {
34
35
  "url": "https://github.com/fonoster/routr/issues"
35
36
  },
36
- "gitHead": "f1af5c4ec26359fa6338091ed26a7863701cd632"
37
+ "gitHead": "12ed1225fc28e8dfed240522319d8f8178620586"
37
38
  }