Schema for the `PendingPermissionRequest` type.
| 4180 | # Experimental: this type is part of an experimental API and may change or be removed. |
| 4181 | @dataclass |
| 4182 | class PendingPermissionRequest: |
| 4183 | """Schema for the `PendingPermissionRequest` type.""" |
| 4184 | |
| 4185 | request: PermissionPromptRequest |
| 4186 | """The user-facing permission prompt details (commands, write, read, mcp, url, memory, |
| 4187 | custom-tool, path, hook) |
| 4188 | """ |
| 4189 | request_id: str |
| 4190 | """Unique identifier for the pending permission request""" |
| 4191 | |
| 4192 | @staticmethod |
| 4193 | def from_dict(obj: Any) -> 'PendingPermissionRequest': |
| 4194 | assert isinstance(obj, dict) |
| 4195 | request = PermissionPromptRequest.from_dict(obj.get("request")) |
| 4196 | request_id = from_str(obj.get("requestId")) |
| 4197 | return PendingPermissionRequest(request, request_id) |
| 4198 | |
| 4199 | def to_dict(self) -> dict: |
| 4200 | result: dict = {} |
| 4201 | result["request"] = to_class(PermissionPromptRequest, self.request) |
| 4202 | result["requestId"] = from_str(self.request_id) |
| 4203 | return result |
| 4204 | |
| 4205 | class ApprovalKind(Enum): |
| 4206 | COMMANDS = "commands" |
no outgoing calls
no test coverage detected
searching dependent graphs…