Add delete subscription action (#3673)

* make formId optional

* add itemId to file schema

* Add Response delete to api
This commit is contained in:
Anthony Phan 2024-10-05 00:15:34 +08:00 коммит произвёл GitHub
Родитель 590ca87116
Коммит f711f1e29d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 111 добавлений и 0 удалений

Просмотреть файл

@ -324,6 +324,117 @@
],
"x-ms-visibility": "internal"
}
},
"/response-deletion-subscription": {
"x-ms-notification-content": {
"description": "Webhook response",
"schema": {
"$ref": "#/definitions/dynamicResponseSchema"
}
},
"post": {
"responses": {
"201": {
"description": "created",
"schema": {}
}
},
"summary": "When a form response is deleted",
"description": "Triggered a flow when a response is deleted in Team Forms.",
"operationId": "SubscribeResponseDeletion",
"x-ms-visibility": "important",
"x-ms-trigger": "single",
"consumes": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/groupId"
},
{
"name": "formId",
"in": "query",
"type": "string",
"description": "Unique id for the form. Leave blank to trigger for all forms in the selected team.",
"x-ms-summary": "Form",
"x-ms-visibility": "important",
"x-ms-dynamic-values": {
"operationId": "Forms",
"value-path": "fields/tfFormId",
"value-title": "fields/tfTitle",
"parameters": {
"groupId": {
"parameter": "groupId"
}
}
}
},
{
"name": "requestBody",
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"webHookUrl": {
"type": "string",
"x-ms-visibility": "internal",
"x-ms-notification-url": true
}
},
"required": [
"webHookUrl"
]
}
}
]
},
"delete": {
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "status"
}
}
}
}
},
"summary": "Delete a subscription",
"description": "Internal operation used to delete Webhook if the hook is edited or deleted",
"operationId": "UnsubscribeResponseDeletion",
"parameters": [
{
"name": "groupId",
"in": "query",
"type": "string",
"description": "",
"required": true
},
{
"name": "formId",
"in": "query",
"type": "string"
},
{
"name": "webHookId",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "origin",
"in": "query",
"required": false,
"type": "string"
}
],
"x-ms-visibility": "internal"
}
}
},
"definitions": {