49 lines
1.4 KiB
TypeScript
49 lines
1.4 KiB
TypeScript
/** User API paths (auth required: JWT or NIP-98) */
|
|
const paths: Record<string, Record<string, unknown>> = {
|
|
"/user/refresh-profile": {
|
|
post: {
|
|
tags: ["User"],
|
|
summary: "Refresh Nostr profile",
|
|
description:
|
|
"Fetch Nostr profile (kind 0) and return cached lightning_address and name. Pre-fills the frontend and stores in DB.",
|
|
security: [{ BearerAuth: [] }, { Nostr: [] }],
|
|
responses: {
|
|
"200": {
|
|
description: "Profile refreshed",
|
|
content: {
|
|
"application/json": {
|
|
schema: { $ref: "#/components/schemas/RefreshProfileResponse" },
|
|
},
|
|
},
|
|
},
|
|
"401": {
|
|
description: "Unauthorized",
|
|
content: {
|
|
"application/json": {
|
|
schema: { $ref: "#/components/schemas/ErrorResponse" },
|
|
},
|
|
},
|
|
},
|
|
"429": {
|
|
description: "Rate limited",
|
|
content: {
|
|
"application/json": {
|
|
schema: { $ref: "#/components/schemas/RateLimitedResponse" },
|
|
},
|
|
},
|
|
},
|
|
"500": {
|
|
description: "Profile fetch failed",
|
|
content: {
|
|
"application/json": {
|
|
schema: { $ref: "#/components/schemas/ErrorResponse" },
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
export default paths;
|