Refactor hook config selectors

This commit is contained in:
Abhinav Vedmala
2026-04-26 20:53:35 -07:00
parent c2a3b5a289
commit 24c0dcc4b3
15 changed files with 637 additions and 494 deletions

View File

@@ -1447,44 +1447,90 @@
],
"type": "object"
},
"HookConfigSource": {
"enum": [
"plugin",
"user",
"project"
],
"type": "string"
},
"HooksConfigWriteParams": {
"properties": {
"enabled": {
"type": "boolean"
"oneOf": [
{
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean"
},
"key": {
"type": "string"
},
"pluginId": {
"type": "string"
},
"source": {
"enum": [
"plugin"
],
"type": "string"
}
},
"required": [
"enabled",
"key",
"pluginId",
"source"
],
"type": "object"
},
"key": {
"type": "string"
{
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean"
},
"key": {
"type": "string"
},
"source": {
"enum": [
"user"
],
"type": "string"
},
"sourcePath": {
"type": "string"
}
},
"required": [
"enabled",
"key",
"source",
"sourcePath"
],
"type": "object"
},
"pluginId": {
"type": [
"string",
"null"
]
},
"source": {
"$ref": "#/definitions/HookConfigSource"
},
"sourcePath": {
"type": [
"string",
"null"
]
{
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean"
},
"key": {
"type": "string"
},
"source": {
"enum": [
"project"
],
"type": "string"
},
"sourcePath": {
"type": "string"
}
},
"required": [
"enabled",
"key",
"source",
"sourcePath"
],
"type": "object"
}
},
"required": [
"enabled",
"key",
"source"
],
"type": "object"
]
},
"HooksListParams": {
"properties": {