mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-25 07:00:48 +09:00
refactor: inbox (#137)
* refactor: inbox * fix: migrations * fix: migrations
This commit is contained in:
+66
-4
@@ -61,6 +61,40 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/auth/refresh": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Issue a new JWT using the existing claims with updated expiration",
|
||||
"tags": [
|
||||
"auth"
|
||||
],
|
||||
"summary": "Refresh Token",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handlers.RefreshResponse"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handlers.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handlers.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/bots": {
|
||||
"get": {
|
||||
"description": "List bots accessible to current user (admin can specify owner_id)",
|
||||
@@ -7213,6 +7247,20 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"handlers.RefreshResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"access_token": {
|
||||
"type": "string"
|
||||
},
|
||||
"expires_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"token_type": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"handlers.SkillItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -7514,10 +7562,16 @@ const docTemplate = `{
|
||||
"inbox.CreateRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action": {
|
||||
"type": "string"
|
||||
},
|
||||
"bot_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"content": {
|
||||
"type": "string"
|
||||
},
|
||||
"header": {
|
||||
"type": "object",
|
||||
"additionalProperties": {}
|
||||
},
|
||||
@@ -7529,16 +7583,22 @@ const docTemplate = `{
|
||||
"inbox.Item": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action": {
|
||||
"type": "string"
|
||||
},
|
||||
"bot_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"content": {
|
||||
"type": "object",
|
||||
"additionalProperties": {}
|
||||
"type": "string"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"header": {
|
||||
"type": "object",
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -8381,12 +8441,14 @@ const docTemplate = `{
|
||||
"enum": [
|
||||
"brave",
|
||||
"bing",
|
||||
"google"
|
||||
"google",
|
||||
"tavily"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"ProviderBrave",
|
||||
"ProviderBing",
|
||||
"ProviderGoogle"
|
||||
"ProviderGoogle",
|
||||
"ProviderTavily"
|
||||
]
|
||||
},
|
||||
"searchproviders.UpdateRequest": {
|
||||
|
||||
+66
-4
@@ -52,6 +52,40 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/auth/refresh": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Issue a new JWT using the existing claims with updated expiration",
|
||||
"tags": [
|
||||
"auth"
|
||||
],
|
||||
"summary": "Refresh Token",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handlers.RefreshResponse"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handlers.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handlers.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/bots": {
|
||||
"get": {
|
||||
"description": "List bots accessible to current user (admin can specify owner_id)",
|
||||
@@ -7204,6 +7238,20 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"handlers.RefreshResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"access_token": {
|
||||
"type": "string"
|
||||
},
|
||||
"expires_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"token_type": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"handlers.SkillItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -7505,10 +7553,16 @@
|
||||
"inbox.CreateRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action": {
|
||||
"type": "string"
|
||||
},
|
||||
"bot_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"content": {
|
||||
"type": "string"
|
||||
},
|
||||
"header": {
|
||||
"type": "object",
|
||||
"additionalProperties": {}
|
||||
},
|
||||
@@ -7520,16 +7574,22 @@
|
||||
"inbox.Item": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action": {
|
||||
"type": "string"
|
||||
},
|
||||
"bot_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"content": {
|
||||
"type": "object",
|
||||
"additionalProperties": {}
|
||||
"type": "string"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"header": {
|
||||
"type": "object",
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -8372,12 +8432,14 @@
|
||||
"enum": [
|
||||
"brave",
|
||||
"bing",
|
||||
"google"
|
||||
"google",
|
||||
"tavily"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"ProviderBrave",
|
||||
"ProviderBing",
|
||||
"ProviderGoogle"
|
||||
"ProviderGoogle",
|
||||
"ProviderTavily"
|
||||
]
|
||||
},
|
||||
"searchproviders.UpdateRequest": {
|
||||
|
||||
+42
-2
@@ -825,6 +825,15 @@ definitions:
|
||||
status:
|
||||
type: string
|
||||
type: object
|
||||
handlers.RefreshResponse:
|
||||
properties:
|
||||
access_token:
|
||||
type: string
|
||||
expires_at:
|
||||
type: string
|
||||
token_type:
|
||||
type: string
|
||||
type: object
|
||||
handlers.SkillItem:
|
||||
properties:
|
||||
content:
|
||||
@@ -1022,9 +1031,13 @@ definitions:
|
||||
type: object
|
||||
inbox.CreateRequest:
|
||||
properties:
|
||||
action:
|
||||
type: string
|
||||
bot_id:
|
||||
type: string
|
||||
content:
|
||||
type: string
|
||||
header:
|
||||
additionalProperties: {}
|
||||
type: object
|
||||
source:
|
||||
@@ -1032,13 +1045,17 @@ definitions:
|
||||
type: object
|
||||
inbox.Item:
|
||||
properties:
|
||||
action:
|
||||
type: string
|
||||
bot_id:
|
||||
type: string
|
||||
content:
|
||||
additionalProperties: {}
|
||||
type: object
|
||||
type: string
|
||||
created_at:
|
||||
type: string
|
||||
header:
|
||||
additionalProperties: {}
|
||||
type: object
|
||||
id:
|
||||
type: string
|
||||
is_read:
|
||||
@@ -1599,11 +1616,13 @@ definitions:
|
||||
- brave
|
||||
- bing
|
||||
- google
|
||||
- tavily
|
||||
type: string
|
||||
x-enum-varnames:
|
||||
- ProviderBrave
|
||||
- ProviderBing
|
||||
- ProviderGoogle
|
||||
- ProviderTavily
|
||||
searchproviders.UpdateRequest:
|
||||
properties:
|
||||
config:
|
||||
@@ -1824,6 +1843,27 @@ paths:
|
||||
summary: Login
|
||||
tags:
|
||||
- auth
|
||||
/auth/refresh:
|
||||
post:
|
||||
description: Issue a new JWT using the existing claims with updated expiration
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/handlers.RefreshResponse'
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: '#/definitions/handlers.ErrorResponse'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/handlers.ErrorResponse'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: Refresh Token
|
||||
tags:
|
||||
- auth
|
||||
/bots:
|
||||
get:
|
||||
description: List bots accessible to current user (admin can specify owner_id)
|
||||
|
||||
Reference in New Issue
Block a user