add encrypted Nostr session sharing (#8922)

Signed-off-by: callebtc <93376500+callebtc@users.noreply.github.com>
Signed-off-by: Douwe Osinga <douwe@squareup.com>
Signed-off-by: Michael Neale <michael.neale@gmail.com>
Co-authored-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Michael Neale <michael.neale@gmail.com>
This commit is contained in:
callebtc
2026-05-12 22:06:44 -05:00
committed by GitHub
parent 8c36ba86c6
commit dbbee1cdbf
17 changed files with 1469 additions and 27 deletions
+147
View File
@@ -3145,6 +3145,50 @@
]
}
},
"/sessions/import/nostr": {
"post": {
"tags": [
"Session Management"
],
"operationId": "import_session_nostr",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ImportSessionNostrRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Nostr shared session imported successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Session"
}
}
}
},
"400": {
"description": "Bad request - Invalid Nostr share link"
},
"401": {
"description": "Unauthorized - Invalid or missing API key"
},
"500": {
"description": "Internal server error"
}
},
"security": [
{
"api_key": []
}
]
}
},
"/sessions/insights": {
"get": {
"tags": [
@@ -3656,6 +3700,61 @@
]
}
},
"/sessions/{session_id}/share/nostr": {
"post": {
"tags": [
"Session Management"
],
"operationId": "share_session_nostr",
"parameters": [
{
"name": "session_id",
"in": "path",
"description": "Unique identifier for the session",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ShareSessionNostrRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Session shared to Nostr successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ShareSessionNostrResponse"
}
}
}
},
"401": {
"description": "Unauthorized - Invalid or missing API key"
},
"404": {
"description": "Session not found"
},
"500": {
"description": "Internal server error"
}
},
"security": [
{
"api_key": []
}
]
}
},
"/sessions/{session_id}/user_recipe_values": {
"put": {
"tags": [
@@ -5625,6 +5724,17 @@
}
}
},
"ImportSessionNostrRequest": {
"type": "object",
"required": [
"deeplink"
],
"properties": {
"deeplink": {
"type": "string"
}
}
},
"ImportSessionRequest": {
"type": "object",
"required": [
@@ -8105,6 +8215,43 @@
}
}
},
"ShareSessionNostrRequest": {
"type": "object",
"properties": {
"relays": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"ShareSessionNostrResponse": {
"type": "object",
"required": [
"deeplink",
"nevent",
"eventId",
"relays"
],
"properties": {
"deeplink": {
"type": "string"
},
"eventId": {
"type": "string"
},
"nevent": {
"type": "string"
},
"relays": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"SlashCommand": {
"type": "object",
"required": [