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

@@ -421,6 +421,8 @@ definitions:
type: object
handler.UpdateSubscription.body:
properties:
active:
type: boolean
confirmed:
type: boolean
type: object
@@ -508,6 +510,33 @@ definitions:
uri:
type: string
type: object
models.Channel:
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
type: object
models.ChannelPreview:
properties:
channel_id:
@@ -518,8 +547,12 @@ definitions:
type: string
internal_name:
type: string
messages_sent:
type: integer
owner_user_id:
type: string
subscription:
$ref: '#/definitions/models.Subscription'
type: object
models.ChannelWithSubscription:
properties:
@@ -650,6 +683,9 @@ definitions:
type: string
channel_internal_name:
type: string
channel_owner_user_id:
description: user that owns the channel
type: string
content:
type: string
message_id:
@@ -688,6 +724,9 @@ definitions:
type: object
models.Subscription:
properties:
active:
description: Subscriber has activated the subscription (default)
type: boolean
channel_id:
type: string
channel_internal_name:
@@ -695,6 +734,7 @@ definitions:
channel_owner_user_id:
type: string
confirmed:
description: Channel-Owner confirmed subscription
type: boolean
subscriber_user_id:
type: string
@@ -1418,9 +1458,6 @@ paths:
type: string
name: channel_id
type: array
- in: query
name: filter
type: string
- in: query
name: has_sender
type: boolean
@@ -1436,12 +1473,24 @@ paths:
type: integer
name: priority
type: array
- collectionFormat: csv
in: query
items:
type: string
name: search
type: array
- collectionFormat: csv
in: query
items:
type: string
name: sender
type: array
- collectionFormat: csv
in: query
items:
type: string
name: string_search
type: array
- in: query
name: trimmed
type: boolean
@@ -1580,7 +1629,7 @@ paths:
get:
operationId: api-tokenkeys-get-preview
parameters:
- description: TokenKeyID
- description: TokenKeyID (actual token || token-id)
in: path
name: kid
required: true
@@ -1731,24 +1780,13 @@ paths:
tags:
- API-v2
patch:
description: The body-values are optional, only send the ones you want to update
operationId: api-user-update
operationId: api-user-delete
parameters:
- description: UserID
in: path
name: uid
required: true
type: string
- description: Change the username (send an empty string to clear it)
in: body
name: username
schema:
type: string
- description: Send a verification of premium purchase
in: body
name: pro_token
schema:
type: string
responses:
"200":
description: OK
@@ -1770,7 +1808,8 @@ paths:
description: internal server error
schema:
$ref: '#/definitions/ginresp.apiError'
summary: (Partially) update a user
summary: (Self-)Deletes a user (including all entities - all messages, channels,
clients, .....)
tags:
- API-v2
/api/v2/users/{uid}/channels:
@@ -1895,7 +1934,7 @@ paths:
tags:
- API-v2
patch:
operationId: api-channels-update
operationId: api-channels-delete
parameters:
- description: UserID
in: path
@@ -1907,27 +1946,11 @@ paths:
name: cid
required: true
type: string
- description: Send `true` to create a new subscribe_key
in: body
name: subscribe_key
schema:
type: string
- description: Send `true` to create a new send_key
in: body
name: send_key
schema:
type: string
- description: Change the cahnnel display-name (only chnages to lowercase/uppercase
are allowed - internal_name must stay the same)
in: body
name: display_name
schema:
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.ChannelWithSubscription'
$ref: '#/definitions/models.Channel'
"400":
description: supplied values/parameters cannot be parsed / are invalid
schema:
@@ -1944,7 +1967,7 @@ paths:
description: internal server error
schema:
$ref: '#/definitions/ginresp.apiError'
summary: (Partially) update a channel
summary: delete a channel (including all messages, subscriptions, etc)
tags:
- API-v2
/api/v2/users/{uid}/channels/{cid}/messages:
@@ -1956,9 +1979,6 @@ paths:
By default we return long messages with a trimmed body, if trimmed=false is supplied we return full messages (this reduces the max page_size)
operationId: api-channel-messages
parameters:
- in: query
name: filter
type: string
- in: query
name: next_page_token
type: string