Refactor permission request updates

This commit is contained in:
Abhinav Vedmala
2026-04-14 11:11:28 -07:00
parent 2219e3df2e
commit f7d4874a0e
12 changed files with 276 additions and 303 deletions

View File

@@ -23,33 +23,65 @@
],
"type": "object"
},
"PermissionSuggestion": {
"properties": {
"behavior": {
"$ref": "#/definitions/PermissionSuggestionBehavior"
},
"destination": {
"$ref": "#/definitions/PermissionSuggestionDestination"
},
"rules": {
"items": {
"$ref": "#/definitions/PermissionSuggestionRule"
"PermissionUpdate": {
"oneOf": [
{
"properties": {
"behavior": {
"$ref": "#/definitions/PermissionUpdateBehavior"
},
"destination": {
"$ref": "#/definitions/PermissionUpdateDestination"
},
"rules": {
"items": {
"$ref": "#/definitions/PermissionUpdateRule"
},
"type": "array"
},
"type": {
"enum": [
"addRules"
],
"type": "string"
}
},
"type": "array"
"required": [
"behavior",
"destination",
"rules",
"type"
],
"type": "object"
},
"type": {
"$ref": "#/definitions/PermissionSuggestionType"
{
"properties": {
"destination": {
"$ref": "#/definitions/PermissionUpdateDestination"
},
"directories": {
"items": {
"type": "string"
},
"type": "array"
},
"type": {
"enum": [
"addDirectories"
],
"type": "string"
}
},
"required": [
"destination",
"directories",
"type"
],
"type": "object"
}
},
"required": [
"behavior",
"destination",
"rules",
"type"
],
"type": "object"
]
},
"PermissionSuggestionBehavior": {
"PermissionUpdateBehavior": {
"enum": [
"allow",
"deny",
@@ -57,7 +89,7 @@
],
"type": "string"
},
"PermissionSuggestionDestination": {
"PermissionUpdateDestination": {
"enum": [
"session",
"projectSettings",
@@ -65,7 +97,7 @@
],
"type": "string"
},
"PermissionSuggestionRule": {
"PermissionUpdateRule": {
"oneOf": [
{
"properties": {
@@ -89,12 +121,6 @@
"type": "object"
}
]
},
"PermissionSuggestionType": {
"enum": [
"addRules"
],
"type": "string"
}
},
"properties": {
@@ -120,7 +146,7 @@
},
"permission_suggestions": {
"items": {
"$ref": "#/definitions/PermissionSuggestion"
"$ref": "#/definitions/PermissionUpdate"
},
"type": "array"
},