-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrouting.yml
More file actions
executable file
·172 lines (145 loc) · 7.07 KB
/
routing.yml
File metadata and controls
executable file
·172 lines (145 loc) · 7.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# Custom routes used by the Wurrd Client Interface plugin
#
# EN >> 3/8/2016
# It was discovered that some hosting providers block PUT and DELETE requests
# As a workaround for such providers, we shall also support POST in addition to
# these specific methods. See Issue #3 for more info
#
## -- Server Information
# This route is use to request for server details without providing authentication
wurrd_client_simple_server_info:
# Relative path from the Mibew web root is used here.
path: /wurrd/clientinterface/serverinfo
# Set some defaults for the request
defaults:
# This value is special. It tells the system what action should be
# invoked for the response
_controller: Wurrd\Mibew\Plugin\ClientInterface\Controller\ServerController::simpleInfoAction
methods: [GET]
# This route is use to request for server details with authentication
# This is deprecated as of version 1.0.4
# This route has never been implemented by any of the Wurrd clients, so it is safe to delete
wurrd_client_detail_server_info_deprecated:
path: /wurrd/clientinterface/serverinfo/{apiver}/{accesstoken}/{clientrevision}
defaults:
_controller: Wurrd\Mibew\Plugin\ClientInterface\Controller\ServerController::detailInfoActionDpr
clientrevision: 0
methods: [GET]
# This route is use to request for server details with authentication
wurrd_client_detail_server_info:
path: /wurrd/clientinterface/serverinfo/details/{accesstoken}
defaults:
_controller: Wurrd\Mibew\Plugin\ClientInterface\Controller\ServerController::detailInfoAction
methods: [GET]
## -- Operator interactions
wurrd_client_operator_login:
# The login request details are passed in as a JSON payload.
path: /wurrd/clientinterface/operator/login
defaults:
_controller: Wurrd\Mibew\Plugin\ClientInterface\Controller\OperatorController::loginAction
methods: [PUT, POST]
wurrd_client_operator_refresh_access:
path: /wurrd/clientinterface/operator/refreshaccess/{accesstoken}/{refreshtoken}
defaults:
_controller: Wurrd\Mibew\Plugin\ClientInterface\Controller\OperatorController::refreshAccessAction
methods: [PUT, POST]
wurrd_client_operator_logout:
path: /wurrd/clientinterface/operator/logout/{accesstoken}/{deviceuuid}
defaults:
_controller: Wurrd\Mibew\Plugin\ClientInterface\Controller\OperatorController::logoutAction
methods: [DELETE, POST]
wurrd_client_operator_detailed_info:
path: /wurrd/clientinterface/operator/details/{accesstoken}
defaults:
_controller: Wurrd\Mibew\Plugin\ClientInterface\Controller\OperatorController::detailInfoAction
methods: [GET]
wurrd_client_operator_users_update:
path: /wurrd/clientinterface/operator/users/updatethreads/{clientrevision}/{accesstoken}
defaults:
_controller: Wurrd\Mibew\Plugin\ClientInterface\Controller\UsersController::updateThreadsAction
methods: [GET]
requirements:
clientrevision: \d{1,10}
# Here we expect a threads query parameter which is a JSON array of threads with the following parameters per entry:
# - threadid
# - token
# - lastid
wurrd_client_operator_messages_update:
path: /wurrd/clientinterface/operator/threads/updatemessages/{accesstoken}
defaults:
_controller: Wurrd\Mibew\Plugin\ClientInterface\Controller\ThreadController::updateMessagesAction
methods: [GET]
wurrd_client_operator_start_chat:
path: /wurrd/clientinterface/operator/threads/start/{threadid}/{token}/{accesstoken}
defaults:
_controller: Wurrd\Mibew\Plugin\ClientInterface\Controller\ThreadController::startChatAction
methods: [PUT, POST]
requirements:
threadid: \d{1,10}
wurrd_client_operator_close_chat:
path: /wurrd/clientinterface/operator/threads/close/{threadid}/{token}/{accesstoken}
defaults:
_controller: Wurrd\Mibew\Plugin\ClientInterface\Controller\ThreadController::closeChatAction
methods: [PUT, POST]
requirements:
threadid: \d{1,10}
# This route is an interface for the client operator to post a batch of messages, possibly for multiple threads
# A JSON array of messages is expected in the body of the POST request with the following fields:
# - threadid
# - token
# - messages[]
wurrd_client_operator_post_messages:
path: /wurrd/clientinterface/operator/threads/post/{accesstoken}
defaults:
_controller: Wurrd\Mibew\Plugin\ClientInterface\Controller\ThreadController::postMessagesAction
methods: [POST]
# This is temporal. Use the batch processing option instead
wurrd_client_operator_post_message:
path: /wurrd/clientinterface/operator/threads/post/{threadid}/{token}/{accesstoken}
defaults:
_controller: Wurrd\Mibew\Plugin\ClientInterface\Controller\ThreadController::postAMessageAction
methods: [POST]
# Ping a given thread, also indicating whether the operator is currently typing
# TODO: List the parameters of the request
wurrd_client_operator_ping_thread:
path: /wurrd/clientinterface/operator/threads/ping/{threadid}/{token}/{typed}/{accesstoken}
defaults:
_controller: Wurrd\Mibew\Plugin\ClientInterface\Controller\ThreadController::pingAction
methods: [PUT, POST]
requirements:
threadid: \d{1,10}
# Get a list of canned responses accessible to the operator
# For now we do not filter by locale. We will provide all the responses
wurrd_client_operator_canned_responses:
path: /wurrd/clientinterface/operator/cannedresponses/{accesstoken}
defaults:
_controller: Wurrd\Mibew\Plugin\ClientInterface\Controller\CannedResponsesController::getCannedResponsesAction
methods: [GET]
## -- Notification server interface
wurrd_client_notification_server_check_for_updates:
path: /wurrd/clientinterface/notification/checkforupdates/{accesstoken}/{clientrevision}
defaults:
_controller: Wurrd\Mibew\Plugin\ClientInterface\Controller\NotificationController::checkForUpdatesAction
methods: [GET]
# This route is an interface for the notification server to check for updates for multiple clients on this server
# Although this call wouldn't make any changes to the state of the server, we are using a POST here because we can
# potentially pass in a lot of data.
# A JSON array containing the request detail for each client is expected in the body of the POST request
# Each element has the following fields:
# - accesstoken
# - threadrevision
# - activethreads[]
# -- threadid
# -- token
# -- lastid
wurrd_client_notification_server_bulk_check_for_updates:
path: /wurrd/clientinterface/notification/bulkcheckforupdates
defaults:
_controller: Wurrd\Mibew\Plugin\ClientInterface\Controller\NotificationController::bulkCheckForUpdatesAction
methods: [POST]
## -- Assets
wurrd_client_assets_get_flags:
path: /wurrd/clientinterface/assets/images/flags/{countryflag}
defaults:
_controller: Wurrd\Mibew\Plugin\ClientInterface\Controller\AssetsController::getFlagAction
methods: [GET]