summary refs log tree commit diff
path: root/docs/client-server/swagger_matrix/rooms
diff options
context:
space:
mode:
Diffstat (limited to 'docs/client-server/swagger_matrix/rooms')
-rw-r--r--docs/client-server/swagger_matrix/rooms163
1 files changed, 110 insertions, 53 deletions
diff --git a/docs/client-server/swagger_matrix/rooms b/docs/client-server/swagger_matrix/rooms
index 7a2b5399a2..1ead8b8c14 100644
--- a/docs/client-server/swagger_matrix/rooms
+++ b/docs/client-server/swagger_matrix/rooms
@@ -148,19 +148,108 @@
         }
       ]
     },
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
     {
-      "path": "/rooms/{roomId}/members/{userId}/state",
+      "path": "/rooms/{roomId}/invite/{txnId}",
+      "operations": [
+        {
+          "method": "PUT",
+          "summary": "Invite a user to this room.",
+          "notes": "This operation can also be done as a POST to /rooms/{roomId}/invite",
+          "type": "void",
+          "nickname": "invite",
+          "consumes": [
+            "application/json"
+          ],
+          "parameters": [
+            {
+              "name": "roomId",
+              "description": "The room which has this user.",
+              "required": true,
+              "type": "string",
+              "paramType": "path"
+            },
+            {
+              "name": "txnId",
+              "description": "A client transaction ID for this PUT to ensure idempotency. This can only be omitted if the HTTP method becomes a POST. ",
+              "required": false,
+              "type": "string",
+              "paramType": "path"
+            },
+            {
+              "name": "body",
+              "description": "The user to invite.",
+              "required": true,
+              "type": "InviteRequest",
+              "paramType": "body"
+            }
+          ]
+        }  
+      ]
+    },
+    {
+      "path": "/rooms/{roomId}/join/{txnId}",
+      "operations": [
+        {
+          "method": "PUT",
+          "summary": "Join this room.",
+          "notes": "This operation can also be done as a POST to /rooms/{roomId}/join",
+          "type": "void",
+          "nickname": "join_room",
+          "consumes": [
+            "application/json"
+          ],
+          "parameters": [
+            {
+              "name": "roomId",
+              "description": "The room to join.",
+              "required": true,
+              "type": "string",
+              "paramType": "path"
+            },
+            {
+              "name": "txnId",
+              "description": "A client transaction ID for this PUT to ensure idempotency. This can only be omitted if the HTTP method becomes a POST. ",
+              "required": false,
+              "type": "string",
+              "paramType": "path"
+            }
+          ]
+        }  
+      ]
+    },
+    {
+      "path": "/rooms/{roomId}/leave/{txnId}",
+      "operations": [
+        {
+          "method": "PUT",
+          "summary": "Leave this room.",
+          "notes": "This operation can also be done as a POST to /rooms/{roomId}/leave",
+          "type": "void",
+          "nickname": "leave",
+          "consumes": [
+            "application/json"
+          ],
+          "parameters": [
+            {
+              "name": "roomId",
+              "description": "The room to leave.",
+              "required": true,
+              "type": "string",
+              "paramType": "path"
+            },
+            {
+              "name": "txnId",
+              "description": "A client transaction ID for this PUT to ensure idempotency. This can only be omitted if the HTTP method becomes a POST. ",
+              "required": false,
+              "type": "string",
+              "paramType": "path"
+            }
+          ]
+        }  
+      ]
+    },
+    {
+      "path": "/rooms/{roomId}/state/m.room.member/{userId}",
       "operations": [
         {
           "method": "PUT",
@@ -249,50 +338,9 @@
               "message": "Member not found."
             }
           ]
-        },
-        {
-          "method": "DELETE",
-          "summary": "Leave a room.",
-          "notes": "Leave a room.",
-          "type": "void",
-          "nickname": "remove_membership",
-          "parameters": [
-            {
-              "name": "userId",
-              "description": "The user who is leaving.",
-              "required": true,
-              "type": "string",
-              "paramType": "path"
-            },
-            {
-              "name": "roomId",
-              "description": "The room which has this user.",
-              "required": true,
-              "type": "string",
-              "paramType": "path"
-            }
-          ],
-          "responseMessages": [
-            {
-              "code": 403,
-              "message": "You are not in the room."
-            },
-            {
-              "code": 403,
-              "message": "Cannot force another user to leave."
-            }
-          ]
         }
       ]
     },
-    
-    
-    
-    
-    
-    
-    
-    
     {
       "path": "/join/{roomAliasOrId}",
       "operations": [
@@ -613,6 +661,15 @@
           "type": "Member"
         }
       }
+    },
+    "InviteRequest": {
+      "id": "InviteRequest",
+      "properties": {
+        "user_id": {
+          "type": "string",
+          "description": "The fully-qualified user ID."
+        }
+      }
     }
   }
 }