Add various deleted flags to entities | Add active to subscriptions | Add DeleteUser && DeleteChannel endpoints [skip-tests]
All checks were successful
Build Docker and Deploy / Run Unit-Tests (push) Has been skipped
Build Docker and Deploy / Build Docker Container (push) Successful in 43s
Build Docker and Deploy / Deploy to Server (push) Successful in 16s

This commit is contained in:
2025-04-13 16:12:15 +02:00
parent aac34ef738
commit 8c0f0e3e8f
47 changed files with 2453 additions and 243 deletions

View File

@@ -881,11 +881,6 @@
"name": "channel_id",
"in": "query"
},
{
"type": "string",
"name": "filter",
"in": "query"
},
{
"type": "boolean",
"name": "has_sender",
@@ -910,6 +905,15 @@
"name": "priority",
"in": "query"
},
{
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "csv",
"name": "search",
"in": "query"
},
{
"type": "array",
"items": {
@@ -919,6 +923,15 @@
"name": "sender",
"in": "query"
},
{
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "csv",
"name": "string_search",
"in": "query"
},
{
"type": "boolean",
"name": "trimmed",
@@ -1122,7 +1135,7 @@
"parameters": [
{
"type": "string",
"description": "TokenKeyID",
"description": "TokenKeyID (actual token || token-id)",
"name": "kid",
"in": "path",
"required": true
@@ -1342,12 +1355,11 @@
}
},
"patch": {
"description": "The body-values are optional, only send the ones you want to update",
"tags": [
"API-v2"
],
"summary": "(Partially) update a user",
"operationId": "api-user-update",
"summary": "(Self-)Deletes a user (including all entities - all messages, channels, clients, .....)",
"operationId": "api-user-delete",
"parameters": [
{
"type": "string",
@@ -1355,22 +1367,6 @@
"name": "uid",
"in": "path",
"required": true
},
{
"description": "Change the username (send an empty string to clear it)",
"name": "username",
"in": "body",
"schema": {
"type": "string"
}
},
{
"description": "Send a verification of premium purchase",
"name": "pro_token",
"in": "body",
"schema": {
"type": "string"
}
}
],
"responses": {
@@ -1581,8 +1577,8 @@
"tags": [
"API-v2"
],
"summary": "(Partially) update a channel",
"operationId": "api-channels-update",
"summary": "delete a channel (including all messages, subscriptions, etc)",
"operationId": "api-channels-delete",
"parameters": [
{
"type": "string",
@@ -1597,37 +1593,13 @@
"name": "cid",
"in": "path",
"required": true
},
{
"description": "Send `true` to create a new subscribe_key",
"name": "subscribe_key",
"in": "body",
"schema": {
"type": "string"
}
},
{
"description": "Send `true` to create a new send_key",
"name": "send_key",
"in": "body",
"schema": {
"type": "string"
}
},
{
"description": "Change the cahnnel display-name (only chnages to lowercase/uppercase are allowed - internal_name must stay the same)",
"name": "display_name",
"in": "body",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/models.ChannelWithSubscription"
"$ref": "#/definitions/models.Channel"
}
},
"400": {
@@ -1666,11 +1638,6 @@
"summary": "List messages of a channel",
"operationId": "api-channel-messages",
"parameters": [
{
"type": "string",
"name": "filter",
"in": "query"
},
{
"type": "string",
"name": "next_page_token",
@@ -3727,6 +3694,9 @@
"handler.UpdateSubscription.body": {
"type": "object",
"properties": {
"active": {
"type": "boolean"
},
"confirmed": {
"type": "boolean"
}
@@ -3862,6 +3832,42 @@
}
}
},
"models.Channel": {
"type": "object",
"properties": {
"channel_id": {
"type": "string"
},
"description_name": {
"description": "= DescriptionName, (optional), longer description text, initally nil",
"type": "string"
},
"display_name": {
"description": "= DisplayName, used for display purposes, can be changed, initially equals InternalName",
"type": "string"
},
"internal_name": {
"description": "= InternalName, used for sending, normalized, cannot be changed",
"type": "string"
},
"messages_sent": {
"type": "integer"
},
"owner_user_id": {
"type": "string"
},
"subscribe_key": {
"description": "can be nil, depending on endpoint",
"type": "string"
},
"timestamp_created": {
"type": "string"
},
"timestamp_lastsent": {
"type": "string"
}
}
},
"models.ChannelPreview": {
"type": "object",
"properties": {
@@ -3877,8 +3883,14 @@
"internal_name": {
"type": "string"
},
"messages_sent": {
"type": "integer"
},
"owner_user_id": {
"type": "string"
},
"subscription": {
"$ref": "#/definitions/models.Subscription"
}
}
},
@@ -4069,6 +4081,10 @@
"channel_internal_name": {
"type": "string"
},
"channel_owner_user_id": {
"description": "user that owns the channel",
"type": "string"
},
"content": {
"type": "string"
},
@@ -4125,6 +4141,10 @@
"models.Subscription": {
"type": "object",
"properties": {
"active": {
"description": "Subscriber has activated the subscription (default)",
"type": "boolean"
},
"channel_id": {
"type": "string"
},
@@ -4135,6 +4155,7 @@
"type": "string"
},
"confirmed": {
"description": "Channel-Owner confirmed subscription",
"type": "boolean"
},
"subscriber_user_id": {