Add various deleted flags to entities | Add active to subscriptions | Add DeleteUser && DeleteChannel endpoints [skip-tests]
This commit is contained in:
@@ -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": {
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user