diff --git a/chat-apis.json b/chat-apis.json index be0eb6746..4efd1042a 100644 --- a/chat-apis.json +++ b/chat-apis.json @@ -521,7 +521,8 @@ "enum": [ "available", "offline" - ] + ], + "example": "available" } }, { @@ -605,6 +606,22 @@ "schema": { "type": "boolean" } + }, + { + "name": "createdAt[]", + "in": "query", + "description": "Filter by createdAt start timestamp. Value is a 10-digit unix timestamp. Filters records created on or after this timestamp. Can be used with createdAt[to] for a date range.\n **Supported operators:** from, to.\n **Format:** createdAt[operator]=value.\n **Example:** createdAt[from]=1738368000", + "schema": { + "type": "integer" + } + }, + { + "name": "updatedAt[]", + "in": "query", + "description": "Filter by updatedAt start timestamp. Value is a 10-digit unix timestamp. Filters records updated on or after this timestamp. Can be used with updatedAt[to] for a date range.\n **Supported operators:** from, to.\n **Format:** updatedAt[operator]=value.\n **Example:** updatedAt[from]=1738368000", + "schema": { + "type": "integer" + } } ], "responses": { @@ -1413,6 +1430,51 @@ "schema": { "type": "boolean" } + }, + { + "name": "guid", + "in": "query", + "description": "Filter groups by a specific GUID. Accepts a single GUID value.", + "schema": { + "type": "string" + } + }, + { + "name": "guids", + "in": "query", + "description": "Filter groups by multiple GUIDs. Accepts comma-separated GUID values.", + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "createdAt[]", + "in": "query", + "description": "Filter by createdAt start timestamp. Value is a 10-digit unix timestamp. Filters groups created on or after this timestamp. Can be used with createdAt[to] for a date range.\n **Supported operators:** from, to.\n **Format:** createdAt[operator]=value.\n **Example:** createdAt[from]=1738368000", + "schema": { + "type": "integer" + } + }, + { + "name": "updatedAt[]", + "in": "query", + "description": "Filter by updatedAt start timestamp. Value is a 10-digit unix timestamp. Filters groups updated on or after this timestamp. Can be used with updatedAt[to] for a date range.\n **Supported operators:** from, to.\n **Format:** updatedAt[operator]=value.\n **Example:** updatedAt[from]=1738368000", + "schema": { + "type": "integer" + } + }, + { + "name": "membersCount[]", + "in": "query", + "description": "Filter groups by members count using comparison operators.\n **Supported operators:** eq, gt, gte, lt, lte.\n **Format:** membersCount[operator]=value.\n **Example:** membersCount[gte]=2", + "schema": { + "type": "integer" + } } ], "responses": { @@ -1991,6 +2053,19 @@ "type": "string" } }, + { + "name": "senders", + "in": "query", + "description": "Filter messages by multiple sender UIDs. Accepts comma-separated UID values.", + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, { "name": "mentionsWithBlockedInfo", "in": "query", @@ -2048,9 +2123,25 @@ } }, { - "name": "sentAt", + "name": "sentAt[]", + "in": "query", + "description": "Filter by message sent time. Value is a 10-digit unix timestamp. Fetches messages sent after the specified timestamp.\n **Supported operators:** from, to.\n **Format:** sentAt[operator]=value.\n **Example:** sentAt[from]=1738368000", + "schema": { + "type": "integer" + } + }, + { + "name": "updatedAt[]", + "in": "query", + "description": "Filter by updatedAt start timestamp. Value is a 10-digit unix timestamp. Filters messages updated on or after this timestamp. Can be used with updatedAt[to] for a date range.\n **Supported operators:** from, to.\n **Format:** updatedAt[operator]=value.\n **Example:** updatedAt[from]=1738368000", + "schema": { + "type": "integer" + } + }, + { + "name": "editedAt[]", "in": "query", - "description": "Fetches the messages list after a particular sentAt timestamp.", + "description": "Filter by editedAt start timestamp. Value is a 10-digit unix timestamp. Filters messages edited on or after this timestamp. Can be used with editedAt[to] for a date range.\n **Supported operators:** from, to.\n **Format:** editedAt[operator]=value.\n **Example:** editedAt[from]=1738368000", "schema": { "type": "integer" } diff --git a/data-import-apis.json b/data-import-apis.json index 98f9ea677..b96dcabbb 100644 --- a/data-import-apis.json +++ b/data-import-apis.json @@ -2081,6 +2081,30 @@ }, "type": "object" }, + "RolePermissionSchema": { + "description": "Role permission mapping", + "properties": { + "role": { + "description": "Role name", + "type": "string", + "example": "admin" + }, + "permissions": { + "description": "List of permissions mapped to the role", + "type": "object", + "example": { + "users.read": true, + "users.write": true, + "groups.read": true, + "groups.write": false + }, + "additionalProperties": { + "type": "boolean" + } + } + }, + "type": "object" + }, "Schedule": { "properties": { "monday": { @@ -2275,6 +2299,36 @@ }, "type": "object" }, + "ScopePermissionSchema": { + "description": "Scope permission details", + "properties": { + "scope": { + "description": "Scope identifier", + "type": "string", + "example": "users" + }, + "permissions": { + "description": "List of permissions available for this scope", + "type": "array", + "items": { + "properties": { + "permission": { + "description": "Permission identifier", + "type": "string", + "example": "read" + }, + "description": { + "description": "Permission description", + "type": "string", + "example": "View user information" + } + }, + "type": "object" + } + } + }, + "type": "object" + }, "SentenceSimilaritySchema": { "required": [ "category", @@ -2334,6 +2388,64 @@ }, "type": "object" }, + "SetRolePermissionSchema": { + "description": "Set role permission response", + "properties": { + "role": { + "description": "Role identifier", + "type": "string", + "example": "default" + }, + "permissions": { + "description": "Permissions configuration for the role", + "type": "object", + "example": { + "createGroup": "allow", + "listUsers.mode": "friends", + "createGroup.allowedGroupTypes": [ + "public" + ] + }, + "additionalProperties": true + }, + "updatedAt": { + "description": "Timestamp when permissions were last updated", + "type": "integer", + "example": 1640000000 + } + }, + "type": "object" + }, + "SetScopePermissionSchema": { + "description": "Set scope permission response", + "properties": { + "guid": { + "description": "Group identifier", + "type": "string", + "example": "supergroup" + }, + "scope": { + "description": "Scope identifier", + "type": "string", + "example": "admin" + }, + "permissions": { + "description": "Permissions configuration for the scope", + "type": "object", + "example": { + "sendMessage": "deny", + "initiateCall": "friends" + }, + "additionalProperties": true + }, + "updatedAt": { + "description": "Timestamp when permissions were last updated", + "type": "integer", + "example": 1640000000 + } + }, + "type": "object" + }, "SilentNotification": { "properties": { "chat": { @@ -2520,6 +2632,63 @@ }, "type": "object" }, + "UnsetRolePermissionSchema": { + "description": "Unset role permission response", + "properties": { + "role": { + "description": "Role identifier", + "type": "string", + "example": "default" + }, + "permission": { + "description": "The permission key that was removed", + "type": "string", + "example": "listUsers.mode" + }, + "status": { + "description": "Status of the operation", + "type": "string", + "example": "removed" + }, + "updatedAt": { + "description": "Timestamp when permission was removed", + "type": "integer", + "example": 1640000000 + } + }, + "type": "object" + }, + "UnsetScopePermissionSchema": { + "description": "Unset scope permission response", + "properties": { + "guid": { + "description": "Group identifier", + "type": "string", + "example": "supergroup" + }, + "scope": { + "description": "Scope identifier", + "type": "string", + "example": "admin" + }, + "permission": { + "description": "The permission key that was removed", + "type": "string", + "example": "sendMessage" + }, + "status": { + "description": "Status of the operation", + "type": "string", + "example": "removed" + }, + "updatedAt": { + "description": "Timestamp when permission was removed", + "type": "integer", + "example": 1640000000 + } + }, + "type": "object" + }, "UserFilter": { "required": [ "entity",