Feature/event calender#16
Conversation
|
@coderabbitai fullreview |
|
Thank you for sending us a great Pull Request! 👍 example: pnpm run build-misskey-js-with-types |
|
https://github.com/coderabbitai fullreview |
|
@coderabbitai fullreview |
|
Tip For best results, initiate chat on the files or code changes.
[full_review] |
Backend memory usage comparisonBefore GC
After GC
After Request
|
|
やっべミスった |
|
このPRによるapi.jsonの差分 差分はこちら--- base
+++ head
@@ -9591,6 +9591,203 @@
}
}
},
+ "/admin/events/list": {
+ "post": {
+ "operationId": "post___admin___events___list",
+ "summary": "admin/events/list",
+ "description": "No description provided.\n\n**Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.\n**Credential required**: *Yes* / **Permission**: *read:admin:show-user*",
+ "externalDocs": {
+ "description": "Source code",
+ "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/admin/events/list.ts"
+ },
+ "tags": [
+ "admin"
+ ],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "limit": {
+ "type": "integer",
+ "minimum": 1,
+ "maximum": 100,
+ "default": 20
+ },
+ "sinceId": {
+ "type": "string",
+ "format": "misskey:id"
+ },
+ "untilId": {
+ "type": "string",
+ "format": "misskey:id"
+ },
+ "sinceDate": {
+ "type": "integer"
+ },
+ "untilDate": {
+ "type": "integer"
+ },
+ "status": {
+ "type": "string",
+ "enum": [
+ "all",
+ "pending",
+ "approved",
+ "rejected"
+ ],
+ "default": "all"
+ },
+ "scope": {
+ "type": "string",
+ "enum": [
+ "all",
+ "channel",
+ "server"
+ ],
+ "default": "all"
+ },
+ "channelId": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "format": "misskey:id"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK (with results)",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Event"
+ }
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Client error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INVALID_PARAM": {
+ "value": {
+ "error": {
+ "message": "Invalid param.",
+ "code": "INVALID_PARAM",
+ "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authentication error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "CREDENTIAL_REQUIRED": {
+ "value": {
+ "error": {
+ "message": "Credential required.",
+ "code": "CREDENTIAL_REQUIRED",
+ "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "AUTHENTICATION_FAILED": {
+ "value": {
+ "error": {
+ "message": "Authentication failed. Please ensure your token is correct.",
+ "code": "AUTHENTICATION_FAILED",
+ "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "418": {
+ "description": "I'm Ai",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "I_AM_AI": {
+ "value": {
+ "error": {
+ "message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
+ "code": "I_AM_AI",
+ "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INTERNAL_ERROR": {
+ "value": {
+ "error": {
+ "message": "Internal error occurred. Please contact us if the error persists.",
+ "code": "INTERNAL_ERROR",
+ "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/admin/federation/delete-all-files": {
"post": {
"operationId": "post___admin___federation___delete-all-files",
@@ -47024,6 +47221,1854 @@
}
}
},
+ "/events/approve": {
+ "post": {
+ "operationId": "post___events___approve",
+ "summary": "events/approve",
+ "description": "No description provided.\n\n**Credential required**: *Yes* / **Permission**: *write:account*",
+ "externalDocs": {
+ "description": "Source code",
+ "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/events/approve.ts"
+ },
+ "tags": [
+ "events"
+ ],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "eventId": {
+ "type": "string",
+ "format": "misskey:id"
+ }
+ },
+ "required": [
+ "eventId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK (with results)",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Event"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Client error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "NO_SUCH_EVENT": {
+ "value": {
+ "error": {
+ "message": "No such event.",
+ "code": "NO_SUCH_EVENT",
+ "id": "c3d5e7f9-a1b2-4c6d-8e3f-5a7b9c1d2e4f"
+ }
+ }
+ },
+ "ACCESS_DENIED": {
+ "value": {
+ "error": {
+ "message": "Access denied.",
+ "code": "ACCESS_DENIED",
+ "id": "d4e6f8a1-b2c3-5d7e-9f4a-6b8c1d3e5f7a"
+ }
+ }
+ },
+ "INVALID_PARAM": {
+ "value": {
+ "error": {
+ "message": "Invalid param.",
+ "code": "INVALID_PARAM",
+ "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authentication error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "CREDENTIAL_REQUIRED": {
+ "value": {
+ "error": {
+ "message": "Credential required.",
+ "code": "CREDENTIAL_REQUIRED",
+ "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "AUTHENTICATION_FAILED": {
+ "value": {
+ "error": {
+ "message": "Authentication failed. Please ensure your token is correct.",
+ "code": "AUTHENTICATION_FAILED",
+ "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "418": {
+ "description": "I'm Ai",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "I_AM_AI": {
+ "value": {
+ "error": {
+ "message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
+ "code": "I_AM_AI",
+ "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INTERNAL_ERROR": {
+ "value": {
+ "error": {
+ "message": "Internal error occurred. Please contact us if the error persists.",
+ "code": "INTERNAL_ERROR",
+ "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/events/create": {
+ "post": {
+ "operationId": "post___events___create",
+ "summary": "events/create",
+ "description": "No description provided.\n\n**Credential required**: *Yes* / **Permission**: *write:account*",
+ "externalDocs": {
+ "description": "Source code",
+ "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/events/create.ts"
+ },
+ "tags": [
+ "events"
+ ],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "title": {
+ "type": "string",
+ "minLength": 1,
+ "maxLength": 128
+ },
+ "startAt": {
+ "type": "integer"
+ },
+ "endAt": {
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "description": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "maxLength": 2048
+ },
+ "url": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "maxLength": 512
+ },
+ "color": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "pattern": "^#[0-9a-fA-F]{6}$"
+ },
+ "tags": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "minLength": 1,
+ "maxLength": 64
+ },
+ "maxItems": 16,
+ "uniqueItems": true
+ },
+ "channelId": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "format": "misskey:id"
+ }
+ },
+ "required": [
+ "title",
+ "startAt"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK (with results)",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Event"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Client error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "TOO_MANY_EVENTS": {
+ "value": {
+ "error": {
+ "message": "You cannot create events any more today.",
+ "code": "TOO_MANY_EVENTS",
+ "id": "a3c7d6e1-8b2f-4d5e-9a1c-3f7e8b2d4a6c"
+ }
+ }
+ },
+ "NO_SUCH_CHANNEL": {
+ "value": {
+ "error": {
+ "message": "No such channel.",
+ "code": "NO_SUCH_CHANNEL",
+ "id": "b4d8e2f3-9c1a-4e6d-8b3f-5a7c9d1e2f4b"
+ }
+ }
+ },
+ "INVALID_PARAM": {
+ "value": {
+ "error": {
+ "message": "Invalid param.",
+ "code": "INVALID_PARAM",
+ "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authentication error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "CREDENTIAL_REQUIRED": {
+ "value": {
+ "error": {
+ "message": "Credential required.",
+ "code": "CREDENTIAL_REQUIRED",
+ "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "AUTHENTICATION_FAILED": {
+ "value": {
+ "error": {
+ "message": "Authentication failed. Please ensure your token is correct.",
+ "code": "AUTHENTICATION_FAILED",
+ "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "418": {
+ "description": "I'm Ai",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "I_AM_AI": {
+ "value": {
+ "error": {
+ "message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
+ "code": "I_AM_AI",
+ "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INTERNAL_ERROR": {
+ "value": {
+ "error": {
+ "message": "Internal error occurred. Please contact us if the error persists.",
+ "code": "INTERNAL_ERROR",
+ "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/events/delete": {
+ "post": {
+ "operationId": "post___events___delete",
+ "summary": "events/delete",
+ "description": "No description provided.\n\n**Credential required**: *Yes* / **Permission**: *write:account*",
+ "externalDocs": {
+ "description": "Source code",
+ "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/events/delete.ts"
+ },
+ "tags": [
+ "events"
+ ],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "eventId": {
+ "type": "string",
+ "format": "misskey:id"
+ }
+ },
+ "required": [
+ "eventId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "204": {
+ "description": "OK (without any results)"
+ },
+ "400": {
+ "description": "Client error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "NO_SUCH_EVENT": {
+ "value": {
+ "error": {
+ "message": "No such event.",
+ "code": "NO_SUCH_EVENT",
+ "id": "a1b3c5d7-e9f2-4a6b-8c1d-3e5f7a9b2c4d"
+ }
+ }
+ },
+ "ACCESS_DENIED": {
+ "value": {
+ "error": {
+ "message": "Access denied.",
+ "code": "ACCESS_DENIED",
+ "id": "b2c4d6e8-f1a3-5b7c-9d2e-4f6a8b1c3d5e"
+ }
+ }
+ },
+ "INVALID_PARAM": {
+ "value": {
+ "error": {
+ "message": "Invalid param.",
+ "code": "INVALID_PARAM",
+ "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authentication error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "CREDENTIAL_REQUIRED": {
+ "value": {
+ "error": {
+ "message": "Credential required.",
+ "code": "CREDENTIAL_REQUIRED",
+ "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "AUTHENTICATION_FAILED": {
+ "value": {
+ "error": {
+ "message": "Authentication failed. Please ensure your token is correct.",
+ "code": "AUTHENTICATION_FAILED",
+ "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "418": {
+ "description": "I'm Ai",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "I_AM_AI": {
+ "value": {
+ "error": {
+ "message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
+ "code": "I_AM_AI",
+ "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INTERNAL_ERROR": {
+ "value": {
+ "error": {
+ "message": "Internal error occurred. Please contact us if the error persists.",
+ "code": "INTERNAL_ERROR",
+ "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/events/list": {
+ "post": {
+ "operationId": "post___events___list",
+ "summary": "events/list",
+ "description": "No description provided.\n\n**Credential required**: *No* / **Permission**: *read:account*",
+ "externalDocs": {
+ "description": "Source code",
+ "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/events/list.ts"
+ },
+ "tags": [
+ "events"
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "limit": {
+ "type": "integer",
+ "minimum": 1,
+ "maximum": 100,
+ "default": 10
+ },
+ "sinceId": {
+ "type": "string",
+ "format": "misskey:id"
+ },
+ "untilId": {
+ "type": "string",
+ "format": "misskey:id"
+ },
+ "sinceDate": {
+ "type": "integer"
+ },
+ "untilDate": {
+ "type": "integer"
+ },
+ "includeChannelEvents": {
+ "type": "boolean",
+ "default": false
+ },
+ "channelId": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "format": "misskey:id"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK (with results)",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Event"
+ }
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Client error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INVALID_PARAM": {
+ "value": {
+ "error": {
+ "message": "Invalid param.",
+ "code": "INVALID_PARAM",
+ "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authentication error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "CREDENTIAL_REQUIRED": {
+ "value": {
+ "error": {
+ "message": "Credential required.",
+ "code": "CREDENTIAL_REQUIRED",
+ "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "AUTHENTICATION_FAILED": {
+ "value": {
+ "error": {
+ "message": "Authentication failed. Please ensure your token is correct.",
+ "code": "AUTHENTICATION_FAILED",
+ "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "418": {
+ "description": "I'm Ai",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "I_AM_AI": {
+ "value": {
+ "error": {
+ "message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
+ "code": "I_AM_AI",
+ "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INTERNAL_ERROR": {
+ "value": {
+ "error": {
+ "message": "Internal error occurred. Please contact us if the error persists.",
+ "code": "INTERNAL_ERROR",
+ "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/events/my-submissions": {
+ "post": {
+ "operationId": "post___events___my-submissions",
+ "summary": "events/my-submissions",
+ "description": "No description provided.\n\n**Credential required**: *Yes* / **Permission**: *read:account*",
+ "externalDocs": {
+ "description": "Source code",
+ "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/events/my-submissions.ts"
+ },
+ "tags": [
+ "events"
+ ],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "limit": {
+ "type": "integer",
+ "minimum": 1,
+ "maximum": 100,
+ "default": 10
+ },
+ "sinceId": {
+ "type": "string",
+ "format": "misskey:id"
+ },
+ "untilId": {
+ "type": "string",
+ "format": "misskey:id"
+ },
+ "sinceDate": {
+ "type": "integer"
+ },
+ "untilDate": {
+ "type": "integer"
+ },
+ "status": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "enum": [
+ "pending",
+ "approved",
+ "rejected"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK (with results)",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Event"
+ }
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Client error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INVALID_PARAM": {
+ "value": {
+ "error": {
+ "message": "Invalid param.",
+ "code": "INVALID_PARAM",
+ "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authentication error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "CREDENTIAL_REQUIRED": {
+ "value": {
+ "error": {
+ "message": "Credential required.",
+ "code": "CREDENTIAL_REQUIRED",
+ "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "AUTHENTICATION_FAILED": {
+ "value": {
+ "error": {
+ "message": "Authentication failed. Please ensure your token is correct.",
+ "code": "AUTHENTICATION_FAILED",
+ "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "418": {
+ "description": "I'm Ai",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "I_AM_AI": {
+ "value": {
+ "error": {
+ "message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
+ "code": "I_AM_AI",
+ "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INTERNAL_ERROR": {
+ "value": {
+ "error": {
+ "message": "Internal error occurred. Please contact us if the error persists.",
+ "code": "INTERNAL_ERROR",
+ "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/events/pending": {
+ "post": {
+ "operationId": "post___events___pending",
+ "summary": "events/pending",
+ "description": "No description provided.\n\n**Credential required**: *Yes* / **Permission**: *read:account*",
+ "externalDocs": {
+ "description": "Source code",
+ "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/events/pending.ts"
+ },
+ "tags": [
+ "events"
+ ],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "limit": {
+ "type": "integer",
+ "minimum": 1,
+ "maximum": 100,
+ "default": 10
+ },
+ "sinceId": {
+ "type": "string",
+ "format": "misskey:id"
+ },
+ "untilId": {
+ "type": "string",
+ "format": "misskey:id"
+ },
+ "channelId": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "format": "misskey:id"
+ },
+ "status": {
+ "type": "string",
+ "enum": [
+ "all",
+ "pending",
+ "approved",
+ "rejected"
+ ],
+ "default": "pending"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK (with results)",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Event"
+ }
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Client error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "ACCESS_DENIED": {
+ "value": {
+ "error": {
+ "message": "Access denied.",
+ "code": "ACCESS_DENIED",
+ "id": "fe8d7103-0ea8-4ec3-814d-f8b401dc69e6"
+ }
+ }
+ },
+ "INVALID_PARAM": {
+ "value": {
+ "error": {
+ "message": "Invalid param.",
+ "code": "INVALID_PARAM",
+ "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authentication error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "CREDENTIAL_REQUIRED": {
+ "value": {
+ "error": {
+ "message": "Credential required.",
+ "code": "CREDENTIAL_REQUIRED",
+ "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "AUTHENTICATION_FAILED": {
+ "value": {
+ "error": {
+ "message": "Authentication failed. Please ensure your token is correct.",
+ "code": "AUTHENTICATION_FAILED",
+ "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "418": {
+ "description": "I'm Ai",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "I_AM_AI": {
+ "value": {
+ "error": {
+ "message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
+ "code": "I_AM_AI",
+ "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INTERNAL_ERROR": {
+ "value": {
+ "error": {
+ "message": "Internal error occurred. Please contact us if the error persists.",
+ "code": "INTERNAL_ERROR",
+ "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/events/reject": {
+ "post": {
+ "operationId": "post___events___reject",
+ "summary": "events/reject",
+ "description": "No description provided.\n\n**Credential required**: *Yes* / **Permission**: *write:account*",
+ "externalDocs": {
+ "description": "Source code",
+ "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/events/reject.ts"
+ },
+ "tags": [
+ "events"
+ ],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "eventId": {
+ "type": "string",
+ "format": "misskey:id"
+ }
+ },
+ "required": [
+ "eventId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK (with results)",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Event"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Client error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "NO_SUCH_EVENT": {
+ "value": {
+ "error": {
+ "message": "No such event.",
+ "code": "NO_SUCH_EVENT",
+ "id": "e5f7a9b1-c2d3-6e8f-1a4b-7c9d2e4f6a8b"
+ }
+ }
+ },
+ "ACCESS_DENIED": {
+ "value": {
+ "error": {
+ "message": "Access denied.",
+ "code": "ACCESS_DENIED",
+ "id": "f6a8b1c2-d3e4-7f9a-2b5c-8d1e3f5a7b9c"
+ }
+ }
+ },
+ "INVALID_PARAM": {
+ "value": {
+ "error": {
+ "message": "Invalid param.",
+ "code": "INVALID_PARAM",
+ "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authentication error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "CREDENTIAL_REQUIRED": {
+ "value": {
+ "error": {
+ "message": "Credential required.",
+ "code": "CREDENTIAL_REQUIRED",
+ "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "AUTHENTICATION_FAILED": {
+ "value": {
+ "error": {
+ "message": "Authentication failed. Please ensure your token is correct.",
+ "code": "AUTHENTICATION_FAILED",
+ "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "418": {
+ "description": "I'm Ai",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "I_AM_AI": {
+ "value": {
+ "error": {
+ "message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
+ "code": "I_AM_AI",
+ "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INTERNAL_ERROR": {
+ "value": {
+ "error": {
+ "message": "Internal error occurred. Please contact us if the error persists.",
+ "code": "INTERNAL_ERROR",
+ "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/events/relevant": {
+ "post": {
+ "operationId": "post___events___relevant",
+ "summary": "events/relevant",
+ "description": "No description provided.\n\n**Credential required**: *Yes* / **Permission**: *read:account*",
+ "externalDocs": {
+ "description": "Source code",
+ "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/events/relevant.ts"
+ },
+ "tags": [
+ "events"
+ ],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "limit": {
+ "type": "integer",
+ "minimum": 1,
+ "maximum": 100,
+ "default": 10
+ },
+ "sinceId": {
+ "type": "string",
+ "format": "misskey:id"
+ },
+ "untilId": {
+ "type": "string",
+ "format": "misskey:id"
+ },
+ "sinceDate": {
+ "type": "integer"
+ },
+ "untilDate": {
+ "type": "integer"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK (with results)",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Event"
+ }
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Client error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INVALID_PARAM": {
+ "value": {
+ "error": {
+ "message": "Invalid param.",
+ "code": "INVALID_PARAM",
+ "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authentication error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "CREDENTIAL_REQUIRED": {
+ "value": {
+ "error": {
+ "message": "Credential required.",
+ "code": "CREDENTIAL_REQUIRED",
+ "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "AUTHENTICATION_FAILED": {
+ "value": {
+ "error": {
+ "message": "Authentication failed. Please ensure your token is correct.",
+ "code": "AUTHENTICATION_FAILED",
+ "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "418": {
+ "description": "I'm Ai",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "I_AM_AI": {
+ "value": {
+ "error": {
+ "message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
+ "code": "I_AM_AI",
+ "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INTERNAL_ERROR": {
+ "value": {
+ "error": {
+ "message": "Internal error occurred. Please contact us if the error persists.",
+ "code": "INTERNAL_ERROR",
+ "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/events/show": {
+ "post": {
+ "operationId": "post___events___show",
+ "summary": "events/show",
+ "description": "No description provided.\n\n**Credential required**: *No* / **Permission**: *read:account*",
+ "externalDocs": {
+ "description": "Source code",
+ "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/events/show.ts"
+ },
+ "tags": [
+ "events"
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "eventId": {
+ "type": "string",
+ "format": "misskey:id"
+ }
+ },
+ "required": [
+ "eventId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK (with results)",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Event"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Client error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "NO_SUCH_EVENT": {
+ "value": {
+ "error": {
+ "message": "No such event.",
+ "code": "NO_SUCH_EVENT",
+ "id": "c5e8f3a1-2d4b-6e9f-8a1c-3b5d7f9e1a2c"
+ }
+ }
+ },
+ "INVALID_PARAM": {
+ "value": {
+ "error": {
+ "message": "Invalid param.",
+ "code": "INVALID_PARAM",
+ "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authentication error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "CREDENTIAL_REQUIRED": {
+ "value": {
+ "error": {
+ "message": "Credential required.",
+ "code": "CREDENTIAL_REQUIRED",
+ "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "AUTHENTICATION_FAILED": {
+ "value": {
+ "error": {
+ "message": "Authentication failed. Please ensure your token is correct.",
+ "code": "AUTHENTICATION_FAILED",
+ "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "418": {
+ "description": "I'm Ai",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "I_AM_AI": {
+ "value": {
+ "error": {
+ "message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
+ "code": "I_AM_AI",
+ "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INTERNAL_ERROR": {
+ "value": {
+ "error": {
+ "message": "Internal error occurred. Please contact us if the error persists.",
+ "code": "INTERNAL_ERROR",
+ "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/events/update": {
+ "post": {
+ "operationId": "post___events___update",
+ "summary": "events/update",
+ "description": "No description provided.\n\n**Credential required**: *Yes* / **Permission**: *write:account*",
+ "externalDocs": {
+ "description": "Source code",
+ "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/events/update.ts"
+ },
+ "tags": [
+ "events"
+ ],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "eventId": {
+ "type": "string",
+ "format": "misskey:id"
+ },
+ "title": {
+ "type": "string",
+ "minLength": 1,
+ "maxLength": 128
+ },
+ "startAt": {
+ "type": "integer"
+ },
+ "endAt": {
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "description": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "maxLength": 2048
+ },
+ "url": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "maxLength": 512
+ },
+ "color": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "pattern": "^#[0-9a-fA-F]{6}$"
+ },
+ "tags": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "minLength": 1,
+ "maxLength": 64
+ },
+ "maxItems": 16,
+ "uniqueItems": true
+ },
+ "channelId": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "format": "misskey:id"
+ }
+ },
+ "required": [
+ "eventId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK (with results)",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Event"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Client error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "NO_SUCH_EVENT": {
+ "value": {
+ "error": {
+ "message": "No such event.",
+ "code": "NO_SUCH_EVENT",
+ "id": "d6e9f2a3-4b1c-8e5d-7f3a-9c2b1d4e6f8a"
+ }
+ }
+ },
+ "ACCESS_DENIED": {
+ "value": {
+ "error": {
+ "message": "Access denied.",
+ "code": "ACCESS_DENIED",
+ "id": "e7f1a3b4-5c2d-9e6f-8a4b-1d3c5e7f9a2b"
+ }
+ }
+ },
+ "NO_SUCH_CHANNEL": {
+ "value": {
+ "error": {
+ "message": "No such channel.",
+ "code": "NO_SUCH_CHANNEL",
+ "id": "f8a2b4c5-6d3e-1f7a-9b5c-2e4d6f8a1b3c"
+ }
+ }
+ },
+ "INVALID_PARAM": {
+ "value": {
+ "error": {
+ "message": "Invalid param.",
+ "code": "INVALID_PARAM",
+ "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authentication error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "CREDENTIAL_REQUIRED": {
+ "value": {
+ "error": {
+ "message": "Credential required.",
+ "code": "CREDENTIAL_REQUIRED",
+ "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "AUTHENTICATION_FAILED": {
+ "value": {
+ "error": {
+ "message": "Authentication failed. Please ensure your token is correct.",
+ "code": "AUTHENTICATION_FAILED",
+ "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "418": {
+ "description": "I'm Ai",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "I_AM_AI": {
+ "value": {
+ "error": {
+ "message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
+ "code": "I_AM_AI",
+ "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INTERNAL_ERROR": {
+ "value": {
+ "error": {
+ "message": "Internal error occurred. Please contact us if the error persists.",
+ "code": "INTERNAL_ERROR",
+ "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/export-custom-emojis": {
"post": {
"operationId": "post___export-custom-emojis",
@@ -99112,6 +101157,143 @@
"userId",
"roomId"
]
+ },
+ "Event": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "id",
+ "example": "xxxxxxxxxx"
+ },
+ "title": {
+ "type": "string"
+ },
+ "startAt": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "endAt": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "format": "date-time"
+ },
+ "description": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "url": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "color": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "tags": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "createdById": {
+ "type": "string",
+ "format": "id"
+ },
+ "createdBy": {
+ "$ref": "#/components/schemas/UserLite"
+ },
+ "status": {
+ "type": "string",
+ "enum": [
+ "pending",
+ "approved",
+ "rejected"
+ ]
+ },
+ "approvedById": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "format": "id"
+ },
+ "approvedBy": {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/UserLite"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "channelId": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "format": "id"
+ },
+ "channel": {
+ "type": [
+ "object",
+ "null"
+ ],
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "id"
+ },
+ "name": {
+ "type": "string"
+ },
+ "color": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "name",
+ "color"
+ ]
+ },
+ "createdAt": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "updatedAt": {
+ "type": "string",
+ "format": "date-time"
+ }
+ },
+ "required": [
+ "id",
+ "title",
+ "startAt",
+ "endAt",
+ "description",
+ "url",
+ "color",
+ "tags",
+ "createdById",
+ "createdBy",
+ "status",
+ "approvedById",
+ "approvedBy",
+ "channelId",
+ "channel",
+ "createdAt",
+ "updatedAt"
+ ]
}
},
"securitySchemes": { |
There was a problem hiding this comment.
Pull request overview
This PR introduces a first-class “Events” feature across Misskey’s backend, API typings (misskey-js), and frontend UI, including calendars, event pages/editor, admin moderation views, and richer rendering of local event URLs.
Changes:
- Add backend data model, migrations, entity packing, and API endpoints for creating/listing/moderating events.
- Add frontend pages/components for event calendar, event detail/editor, channel event views, and admin approval queue.
- Enhance URL preview + MFM rendering to detect local
/events/:idlinks and render an event card; add an event timing notification composable.
Reviewed changes
Copilot reviewed 60 out of 60 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/misskey-js/src/autogen/types.ts | Adds Event schema + events/admin-events endpoints to generated API types. |
| packages/misskey-js/src/autogen/models.ts | Exposes Event model type alias. |
| packages/misskey-js/src/autogen/entities.ts | Adds request/response entity aliases for new events endpoints. |
| packages/misskey-js/src/autogen/endpoint.ts | Registers new endpoints in Endpoints mapping. |
| packages/misskey-js/src/autogen/apiClientJSDoc.ts | Adds request() overload JSDoc for new endpoints. |
| packages/misskey-js/etc/misskey-js.api.md | Updates API report to include Event + events request/response types. |
| packages/i18n/src/autogen/locale.ts | Adds _events locale shape to generated locale typings. |
| packages/frontend/test/url-preview.test.ts | Adds tests for local event URL detection and rendering. |
| packages/frontend/src/utility/url-preview.ts | Adds getLocalEventId() helper and local-origin event URL detection. |
| packages/frontend/src/ui/common/common.vue | Hooks in useEventTimingNotifier() at app-common level. |
| packages/frontend/src/router.definition.ts | Adds routes for events pages and admin events page. |
| packages/frontend/src/pages/qr.read.raw-viewer.vue | Filters out local event URLs from generic URL preview list. |
| packages/frontend/src/pages/events.vue | Adds event calendar page + “my submissions” list. |
| packages/frontend/src/pages/event.vue | Adds event detail page with approve/reject/edit/delete actions. |
| packages/frontend/src/pages/event-editor.vue | Adds create/edit event form UI and submission logic. |
| packages/frontend/src/pages/chat/XMessage.vue | Filters out local event URLs from generic URL previews in chat messages. |
| packages/frontend/src/pages/channel.vue | Adds channel “events” and “manage” tabs with calendars + moderation list. |
| packages/frontend/src/pages/admin/index.vue | Adds admin menu entry to the event approval queue. |
| packages/frontend/src/pages/admin/events.vue | Adds admin approval queue UI (scope + status filtering). |
| packages/frontend/src/navbar.ts | Adds navbar entry for the event calendar page. |
| packages/frontend/src/composables/use-event-timing-notifier.ts | Periodically fetches relevant events and emits client notifications near start time. |
| packages/frontend/src/components/page/page.text.vue | Filters out local event URLs from page text URL previews. |
| packages/frontend/src/components/MkUrlPreview.vue | Renders event card for local event URLs and skips Summaly fetch. |
| packages/frontend/src/components/MkUrlEventCard.vue | New component to display event card content from events/show. |
| packages/frontend/src/components/MkPostForm.vue | Adjusts draft restoration behavior when initialText is provided. |
| packages/frontend/src/components/MkNoteDetailed.vue | Filters local event URLs out of URL preview list for notes. |
| packages/frontend/src/components/MkNote.vue | Filters local event URLs out of URL preview list for notes. |
| packages/frontend/src/components/MkLink.vue | Disables tooltip URL preview for local event URLs. |
| packages/frontend/src/components/MkEventCalendarPopover.vue | Adds popover UI for calendar event detail/list/create. |
| packages/frontend/src/components/MkEventCalendarMonthPicker.vue | Adds month picker modal for event calendar navigation. |
| packages/frontend/src/components/global/MkUrl.vue | Disables tooltip URL preview for local event URLs. |
| packages/frontend/src/components/global/MkMfm.ts | Renders local event URLs as inline event cards in MFM output. |
| packages/backend/src/server/api/endpoints/i.ts | Fixes point updates/packing consistency on login bonus flow. |
| packages/backend/src/server/api/endpoints/events/update.ts | Adds events/update endpoint. |
| packages/backend/src/server/api/endpoints/events/show.ts | Adds events/show endpoint with view-permission checks. |
| packages/backend/src/server/api/endpoints/events/relevant.ts | Adds events/relevant endpoint for upcoming relevant events. |
| packages/backend/src/server/api/endpoints/events/reject.ts | Adds events/reject endpoint. |
| packages/backend/src/server/api/endpoints/events/pending.ts | Adds events/pending endpoint for moderation queues. |
| packages/backend/src/server/api/endpoints/events/my-submissions.ts | Adds events/my-submissions endpoint. |
| packages/backend/src/server/api/endpoints/events/list.ts | Adds public events/list endpoint with overlap-window logic. |
| packages/backend/src/server/api/endpoints/events/delete.ts | Adds events/delete endpoint. |
| packages/backend/src/server/api/endpoints/events/create.ts | Adds events/create endpoint with per-day rate limit. |
| packages/backend/src/server/api/endpoints/events/approve.ts | Adds events/approve endpoint. |
| packages/backend/src/server/api/endpoints/admin/events/list.ts | Adds moderator-only admin/events/list endpoint. |
| packages/backend/src/server/api/endpoint-list.ts | Registers new event endpoints in endpoint export list. |
| packages/backend/src/postgres.ts | Registers MiEvent as a Postgres entity. |
| packages/backend/src/models/RepositoryModule.ts | Adds DI provider for eventsRepository. |
| packages/backend/src/models/json-schema/event.ts | Adds packed Event JSON schema. |
| packages/backend/src/models/Event.ts | Adds MiEvent TypeORM entity. |
| packages/backend/src/models/_.ts | Exports MiEvent and EventsRepository type. |
| packages/backend/src/misc/json-schema.ts | Registers Event schema in refs. |
| packages/backend/src/di-symbols.ts | Adds DI symbol for eventsRepository. |
| packages/backend/src/core/EventService.ts | Implements core event creation/update/moderation logic. |
| packages/backend/src/core/entities/EventEntityService.ts | Implements event packing for API responses. |
| packages/backend/src/core/CoreModule.ts | Wires EventService and EventEntityService into CoreModule. |
| packages/backend/src/core/ChannelService.ts | Relaxes canEditChannel param type to Pick<MiUser,'id'>. |
| packages/backend/migration/1774872000000-add-event-color.js | Adds color column migration for events. |
| packages/backend/migration/1774789240317-event.js | Creates initial event table and indexes/foreign keys. |
| locales/ja-JP.yml | Adds Japanese translations for _events and adjusts quoting in a few existing strings. |
Comments suppressed due to low confidence (1)
packages/frontend/src/components/MkPostForm.vue:1495
- The new
nextTick(() => { ... })block has broken indentation and brace alignment (e.g.nextTickis indented as if nested, and theif (draft != null)body is not indented). This is likely to violate the repo’s formatter/linter rules and makes the control-flow hard to read/maintain. Please reformat this block (and ensure braces are properly aligned) to match the surrounding style.
| test('Local event URL should render event card', async () => { | ||
| const mkUrlPreview = render(MkUrlPreview, { | ||
| props: { url: 'events/al6jvjkccp4t000c' }, | ||
| global: { directives, components }, | ||
| }); | ||
| await nextTick(); | ||
| mkUrlPreview.getByText('al6jvjkccp4t000c'); | ||
| }); | ||
|
|
||
| test('Local event URL should be detected as local event', () => { | ||
| assert.strictEqual(getLocalEventId(`${local}/events/al6jvjkccp4t000c`), 'al6jvjkccp4t000c'); | ||
| assert.strictEqual(getLocalEventId('/events/al6jvjkccp4t000c'), 'al6jvjkccp4t000c'); | ||
| }); |
| test('Local event URL should render event card', async () => { | ||
| const mkUrlPreview = render(MkUrlPreview, { | ||
| props: { url: 'events/al6jvjkccp4t000c' }, | ||
| global: { directives, components }, | ||
| }); | ||
| await nextTick(); | ||
| mkUrlPreview.getByText('al6jvjkccp4t000c'); | ||
| }); |
| <MkModal | ||
| ref="modal" | ||
| v-slot="{ type }" | ||
| :zPriority="'high'" | ||
| :anchorElement="anchorElement" | ||
| :transparentBg="true" | ||
| @click="modal?.close()" | ||
| @closed="emit('closed')" | ||
| @esc="modal?.close()" | ||
| > | ||
| <div :class="[$style.root, { [$style.asDrawer]: type === 'drawer' }]"> | ||
| <div :class="$style.yearNav"> | ||
| <button class="_button" :class="$style.yearNavBtn" @click="prevYear"> | ||
| <i class="ti ti-chevron-left"></i> | ||
| </button> | ||
| <span :class="$style.yearLabel" | ||
| >{{ pickerYear }}{{ i18n.ts._events.year }}</span | ||
| > | ||
| <button class="_button" :class="$style.yearNavBtn" @click="nextYear"> | ||
| <i class="ti ti-chevron-right"></i> | ||
| </button> | ||
| </div> | ||
| <div :class="$style.months"> | ||
| <button | ||
| v-for="(monthLabel, index) in monthLabels" | ||
| :key="index" | ||
| class="_button" | ||
| :class="[ | ||
| $style.monthCell, | ||
| { | ||
| [$style.monthCurrent]: isCurrentMonth(index), | ||
| [$style.monthToday]: isTodayMonth(index), | ||
| }, | ||
| ]" | ||
| @click="selectMonth(index)" | ||
| > | ||
| {{ monthLabel }} | ||
| </button> | ||
| </div> | ||
| </div> | ||
| </MkModal> | ||
| </template> | ||
|
|
||
| <script lang="ts" setup> | ||
| import { computed, ref, useTemplateRef } from "vue"; | ||
| import MkModal from "@/components/MkModal.vue"; | ||
| import { i18n } from "@/i18n.js"; | ||
| import { lang } from "@@/js/config.js"; | ||
|
|
||
| const isJapaneseLanguage = lang.startsWith("ja"); | ||
|
|
||
| const props = defineProps<{ | ||
| anchorElement?: HTMLElement | null; | ||
| year: number; | ||
| currentMonth: number; | ||
| }>(); | ||
|
|
||
| const emit = defineEmits<{ | ||
| (ev: "select", value: { year: number; month: number }): void; | ||
| (ev: "closed"): void; | ||
| }>(); | ||
|
|
||
| const modal = useTemplateRef("modal"); | ||
| const pickerYear = ref(props.year); | ||
| const today = new Date(); | ||
|
|
||
| const monthLabels = computed(() => | ||
| Array.from({ length: 12 }, (_, index) => { | ||
| if (isJapaneseLanguage) { | ||
| return `${index + 1}${i18n.ts._events.month || "月"}`; | ||
| } | ||
| const date = new Date(2000, index, 1); | ||
| return date.toLocaleDateString(lang, { month: "short" }); | ||
| }), |
| try { | ||
| const now = Date.now(); | ||
| const events = await misskeyApi<Misskey.entities.Event[], keyof Misskey.Endpoints, RelevantEventsRequest>( | ||
| 'events/relevant' as keyof Misskey.Endpoints, | ||
| { | ||
| limit: 100, | ||
| sinceDate: now - NOTIFICATION_GRACE_PERIOD_MS, | ||
| untilDate: now + UPCOMING_EVENTS_WINDOW_MS, | ||
| }, | ||
| ); |
| try { | ||
| events.value = await misskeyApi<Misskey.entities.Event[]>(('admin/events/list' as keyof Misskey.Endpoints), { | ||
| limit: 100, | ||
| status: status.value, | ||
| scope: scope.value, | ||
| } as never); | ||
| } catch (error) { |
| */ | ||
|
|
||
| import { Inject, Injectable } from '@nestjs/common'; | ||
| import { In, MoreThanOrEqual, LessThanOrEqual, And } from 'typeorm'; |
What
Why
Additional info (optional)
Checklist