tachyon-protocol 0.1.11 → 0.2.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.
Files changed (50) hide show
  1. package/README.md +62 -38
  2. package/dist/bot/slave/request.json +7 -3
  3. package/dist/bot/slave/response.json +67 -19
  4. package/dist/bot/unslave/request.json +7 -3
  5. package/dist/bot/unslave/response.json +67 -19
  6. package/dist/game/launch/response.json +66 -19
  7. package/dist/index.d.ts +505 -271
  8. package/dist/lobby/close/request.json +6 -3
  9. package/dist/lobby/close/response.json +66 -19
  10. package/dist/lobby/create/request.json +6 -3
  11. package/dist/lobby/create/response.json +118 -27
  12. package/dist/lobby/join/request.json +6 -3
  13. package/dist/lobby/join/response.json +248 -47
  14. package/dist/lobby/joined/response.json +66 -19
  15. package/dist/lobby/leave/request.json +6 -3
  16. package/dist/lobby/leave/response.json +92 -23
  17. package/dist/lobby/left/response.json +66 -19
  18. package/dist/lobby/list/request.json +6 -3
  19. package/dist/lobby/list/response.json +66 -19
  20. package/dist/lobby/receiveMessage/response.json +66 -19
  21. package/dist/lobby/sendMessage/request.json +6 -3
  22. package/dist/lobby/sendMessage/response.json +118 -27
  23. package/dist/lobby/updated/response.json +66 -19
  24. package/dist/matchmaking/cancel/request.json +6 -3
  25. package/dist/matchmaking/cancel/response.json +92 -23
  26. package/dist/matchmaking/found/response.json +66 -19
  27. package/dist/matchmaking/list/request.json +6 -3
  28. package/dist/matchmaking/list/response.json +66 -19
  29. package/dist/matchmaking/lost/response.json +66 -19
  30. package/dist/matchmaking/queue/request.json +6 -3
  31. package/dist/matchmaking/queue/response.json +118 -27
  32. package/dist/matchmaking/queueUpdate/response.json +66 -19
  33. package/dist/matchmaking/ready/request.json +6 -3
  34. package/dist/matchmaking/ready/response.json +92 -23
  35. package/dist/matchmaking/readyUpdate/response.json +66 -19
  36. package/dist/meta.json +1 -23
  37. package/dist/system/disconnect/request.json +6 -3
  38. package/dist/system/disconnected/response.json +66 -19
  39. package/dist/system/version/response.json +67 -20
  40. package/package.json +1 -1
  41. package/dist/account/getToken/request.json +0 -74
  42. package/dist/account/getToken/response.json +0 -91
  43. package/dist/account/login/request.json +0 -32
  44. package/dist/account/login/response.json +0 -300
  45. package/dist/account/recover/request.json +0 -15
  46. package/dist/account/recover/response.json +0 -58
  47. package/dist/account/register/request.json +0 -53
  48. package/dist/account/register/response.json +0 -78
  49. package/dist/account/rename/request.json +0 -33
  50. package/dist/account/rename/response.json +0 -66
@@ -1,12 +1,14 @@
1
1
  {
2
2
  "$id": "system/disconnected/response",
3
3
  "requiresLogin": false,
4
- "requiresRole": false,
5
4
  "anyOf": [
6
5
  {
7
6
  "type": "object",
8
7
  "properties": {
9
- "command": {
8
+ "messageId": {
9
+ "type": "string"
10
+ },
11
+ "commandId": {
10
12
  "const": "system/disconnected/response",
11
13
  "type": "string"
12
14
  },
@@ -16,14 +18,18 @@
16
18
  }
17
19
  },
18
20
  "required": [
19
- "command",
21
+ "messageId",
22
+ "commandId",
20
23
  "status"
21
24
  ]
22
25
  },
23
26
  {
24
27
  "type": "object",
25
28
  "properties": {
26
- "command": {
29
+ "messageId": {
30
+ "type": "string"
31
+ },
32
+ "commandId": {
27
33
  "const": "system/disconnected/response",
28
34
  "type": "string"
29
35
  },
@@ -32,24 +38,65 @@
32
38
  "type": "string"
33
39
  },
34
40
  "reason": {
35
- "anyOf": [
36
- {
37
- "const": "internal_error",
38
- "type": "string"
39
- },
40
- {
41
- "const": "unauthorized",
42
- "type": "string"
43
- },
44
- {
45
- "const": "invalid_command",
46
- "type": "string"
47
- }
48
- ]
41
+ "const": "internal_error",
42
+ "type": "string"
43
+ }
44
+ },
45
+ "required": [
46
+ "messageId",
47
+ "commandId",
48
+ "status",
49
+ "reason"
50
+ ]
51
+ },
52
+ {
53
+ "type": "object",
54
+ "properties": {
55
+ "messageId": {
56
+ "type": "string"
57
+ },
58
+ "commandId": {
59
+ "const": "system/disconnected/response",
60
+ "type": "string"
61
+ },
62
+ "status": {
63
+ "const": "failed",
64
+ "type": "string"
65
+ },
66
+ "reason": {
67
+ "const": "unauthorized",
68
+ "type": "string"
69
+ }
70
+ },
71
+ "required": [
72
+ "messageId",
73
+ "commandId",
74
+ "status",
75
+ "reason"
76
+ ]
77
+ },
78
+ {
79
+ "type": "object",
80
+ "properties": {
81
+ "messageId": {
82
+ "type": "string"
83
+ },
84
+ "commandId": {
85
+ "const": "system/disconnected/response",
86
+ "type": "string"
87
+ },
88
+ "status": {
89
+ "const": "failed",
90
+ "type": "string"
91
+ },
92
+ "reason": {
93
+ "const": "invalid_command",
94
+ "type": "string"
49
95
  }
50
96
  },
51
97
  "required": [
52
- "command",
98
+ "messageId",
99
+ "commandId",
53
100
  "status",
54
101
  "reason"
55
102
  ]
@@ -1,12 +1,14 @@
1
1
  {
2
2
  "$id": "system/version/response",
3
3
  "requiresLogin": false,
4
- "requiresRole": false,
5
4
  "anyOf": [
6
5
  {
7
6
  "type": "object",
8
7
  "properties": {
9
- "command": {
8
+ "messageId": {
9
+ "type": "string"
10
+ },
11
+ "commandId": {
10
12
  "const": "system/version/response",
11
13
  "type": "string"
12
14
  },
@@ -18,7 +20,7 @@
18
20
  "type": "object",
19
21
  "properties": {
20
22
  "tachyonVersion": {
21
- "const": "0.1.11",
23
+ "const": "0.2.0",
22
24
  "type": "string"
23
25
  },
24
26
  "versionParity": {
@@ -53,7 +55,8 @@
53
55
  }
54
56
  },
55
57
  "required": [
56
- "command",
58
+ "messageId",
59
+ "commandId",
57
60
  "status",
58
61
  "data"
59
62
  ]
@@ -61,7 +64,10 @@
61
64
  {
62
65
  "type": "object",
63
66
  "properties": {
64
- "command": {
67
+ "messageId": {
68
+ "type": "string"
69
+ },
70
+ "commandId": {
65
71
  "const": "system/version/response",
66
72
  "type": "string"
67
73
  },
@@ -70,24 +76,65 @@
70
76
  "type": "string"
71
77
  },
72
78
  "reason": {
73
- "anyOf": [
74
- {
75
- "const": "internal_error",
76
- "type": "string"
77
- },
78
- {
79
- "const": "unauthorized",
80
- "type": "string"
81
- },
82
- {
83
- "const": "invalid_command",
84
- "type": "string"
85
- }
86
- ]
79
+ "const": "internal_error",
80
+ "type": "string"
81
+ }
82
+ },
83
+ "required": [
84
+ "messageId",
85
+ "commandId",
86
+ "status",
87
+ "reason"
88
+ ]
89
+ },
90
+ {
91
+ "type": "object",
92
+ "properties": {
93
+ "messageId": {
94
+ "type": "string"
95
+ },
96
+ "commandId": {
97
+ "const": "system/version/response",
98
+ "type": "string"
99
+ },
100
+ "status": {
101
+ "const": "failed",
102
+ "type": "string"
103
+ },
104
+ "reason": {
105
+ "const": "unauthorized",
106
+ "type": "string"
107
+ }
108
+ },
109
+ "required": [
110
+ "messageId",
111
+ "commandId",
112
+ "status",
113
+ "reason"
114
+ ]
115
+ },
116
+ {
117
+ "type": "object",
118
+ "properties": {
119
+ "messageId": {
120
+ "type": "string"
121
+ },
122
+ "commandId": {
123
+ "const": "system/version/response",
124
+ "type": "string"
125
+ },
126
+ "status": {
127
+ "const": "failed",
128
+ "type": "string"
129
+ },
130
+ "reason": {
131
+ "const": "invalid_command",
132
+ "type": "string"
87
133
  }
88
134
  },
89
135
  "required": [
90
- "command",
136
+ "messageId",
137
+ "commandId",
91
138
  "status",
92
139
  "reason"
93
140
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tachyon-protocol",
3
- "version": "0.1.11",
3
+ "version": "0.2.0",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "dev": "nodemon --watch src/** --ext ts --exec npm run build",
@@ -1,74 +0,0 @@
1
- {
2
- "$id": "account/getToken/request",
3
- "requiresLogin": false,
4
- "requiresRole": false,
5
- "type": "object",
6
- "properties": {
7
- "command": {
8
- "const": "account/getToken/request",
9
- "type": "string"
10
- },
11
- "data": {
12
- "examples": [
13
- {
14
- "email": "bob@test.com",
15
- "hashedPassword": "1b311ff1a6af12fba8720bd2ce02c960"
16
- }
17
- ],
18
- "allOf": [
19
- {
20
- "anyOf": [
21
- {
22
- "type": "object",
23
- "properties": {
24
- "email": {
25
- "format": "email",
26
- "examples": [
27
- "bob@test.com"
28
- ],
29
- "type": "string"
30
- }
31
- },
32
- "required": [
33
- "email"
34
- ]
35
- },
36
- {
37
- "type": "object",
38
- "properties": {
39
- "username": {
40
- "minLength": 3,
41
- "maxLength": 20,
42
- "pattern": "^[A-Za-z0-9_-]+$",
43
- "examples": [
44
- "Bob"
45
- ],
46
- "type": "string"
47
- }
48
- },
49
- "required": [
50
- "username"
51
- ]
52
- }
53
- ]
54
- },
55
- {
56
- "type": "object",
57
- "properties": {
58
- "hashedPassword": {
59
- "description": "md5 hash of the user's password input",
60
- "type": "string"
61
- }
62
- },
63
- "required": [
64
- "hashedPassword"
65
- ]
66
- }
67
- ]
68
- }
69
- },
70
- "required": [
71
- "command",
72
- "data"
73
- ]
74
- }
@@ -1,91 +0,0 @@
1
- {
2
- "$id": "account/getToken/response",
3
- "requiresLogin": false,
4
- "requiresRole": false,
5
- "anyOf": [
6
- {
7
- "type": "object",
8
- "properties": {
9
- "command": {
10
- "const": "account/getToken/response",
11
- "type": "string"
12
- },
13
- "status": {
14
- "const": "success",
15
- "type": "string"
16
- },
17
- "data": {
18
- "examples": [
19
- {
20
- "token": "d2d5135930dacad758584b2586d03426"
21
- }
22
- ],
23
- "type": "object",
24
- "properties": {
25
- "token": {
26
- "type": "string"
27
- }
28
- },
29
- "required": [
30
- "token"
31
- ]
32
- }
33
- },
34
- "required": [
35
- "command",
36
- "status",
37
- "data"
38
- ]
39
- },
40
- {
41
- "type": "object",
42
- "properties": {
43
- "command": {
44
- "const": "account/getToken/response",
45
- "type": "string"
46
- },
47
- "status": {
48
- "const": "failed",
49
- "type": "string"
50
- },
51
- "reason": {
52
- "anyOf": [
53
- {
54
- "const": "no_user_found",
55
- "type": "string"
56
- },
57
- {
58
- "const": "unverified",
59
- "type": "string"
60
- },
61
- {
62
- "const": "invalid_password",
63
- "type": "string"
64
- },
65
- {
66
- "const": "max_attempts",
67
- "type": "string"
68
- },
69
- {
70
- "const": "internal_error",
71
- "type": "string"
72
- },
73
- {
74
- "const": "unauthorized",
75
- "type": "string"
76
- },
77
- {
78
- "const": "invalid_command",
79
- "type": "string"
80
- }
81
- ]
82
- }
83
- },
84
- "required": [
85
- "command",
86
- "status",
87
- "reason"
88
- ]
89
- }
90
- ]
91
- }
@@ -1,32 +0,0 @@
1
- {
2
- "$id": "account/login/request",
3
- "requiresLogin": false,
4
- "requiresRole": false,
5
- "type": "object",
6
- "properties": {
7
- "command": {
8
- "const": "account/login/request",
9
- "type": "string"
10
- },
11
- "data": {
12
- "examples": [
13
- {
14
- "token": "d2d5135930dacad758584b2586d03426"
15
- }
16
- ],
17
- "type": "object",
18
- "properties": {
19
- "token": {
20
- "type": "string"
21
- }
22
- },
23
- "required": [
24
- "token"
25
- ]
26
- }
27
- },
28
- "required": [
29
- "command",
30
- "data"
31
- ]
32
- }