Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: フォロー/フォロリクの履歴 #49

Merged
merged 2 commits into from
Dec 12, 2024

Conversation

lqvp
Copy link

@lqvp lqvp commented Dec 12, 2024

What

フォローとフォローリクエストの履歴を残してユーザーが閲覧できるように

Why

Additional info (optional)

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

Copy link

github-actions bot commented Dec 12, 2024

このPRによるapi.jsonの差分

差分はこちら
--- base
+++ head
@@ -38417,6 +38417,488 @@
         }
       }
     },
+    "/following/requests/history": {
+      "post": {
+        "operationId": "following___requests___history",
+        "summary": "following/requests/history",
+        "description": "No description provided.\n\n**Credential required**: *Yes* / **Permission**: *read:following*",
+        "externalDocs": {
+          "description": "Source code",
+          "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/following/requests/history.ts"
+        },
+        "tags": [
+          "following"
+        ],
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "requestBody": {
+          "required": true,
+          "content": {
+            "application/json": {
+              "schema": {
+                "type": "object",
+                "properties": {
+                  "type": {
+                    "type": [
+                      "string",
+                      "null"
+                    ],
+                    "enum": [
+                      "follow",
+                      "unFollow",
+                      "wasFollow",
+                      "wasUnFollow",
+                      "blocked",
+                      "unBlocked",
+                      "wasBlocked",
+                      "wasUnBlocked"
+                    ],
+                    "description": "Filter by type of action"
+                  },
+                  "sinceId": {
+                    "type": "string",
+                    "format": "misskey:id",
+                    "description": "Get history after this ID"
+                  },
+                  "untilId": {
+                    "type": "string",
+                    "format": "misskey:id",
+                    "description": "Get history before this ID"
+                  },
+                  "limit": {
+                    "type": "integer",
+                    "minimum": 1,
+                    "maximum": 100,
+                    "default": 30,
+                    "description": "Number of histories to get"
+                  },
+                  "delete": {
+                    "type": "boolean",
+                    "default": false,
+                    "description": "Delete all histories"
+                  }
+                }
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "OK (with results)",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "type": "array",
+                  "items": {
+                    "type": "object",
+                    "properties": {
+                      "id": {
+                        "type": "string",
+                        "format": "id"
+                      },
+                      "type": {
+                        "type": [
+                          "string",
+                          "null"
+                        ],
+                        "enum": [
+                          "follow",
+                          "unFollow",
+                          "wasFollow",
+                          "wasUnFollow",
+                          "blocked",
+                          "unBlocked",
+                          "wasBlocked",
+                          "wasUnBlocked"
+                        ],
+                        "description": "Filter by type of action"
+                      },
+                      "fromUser": {
+                        "type": "object",
+                        "$ref": "#/components/schemas/UserDetailedNotMe"
+                      },
+                      "toUser": {
+                        "type": "object",
+                        "$ref": "#/components/schemas/UserDetailedNotMe"
+                      },
+                      "timestamp": {
+                        "type": "string",
+                        "format": "date-time"
+                      }
+                    },
+                    "required": [
+                      "id",
+                      "type",
+                      "fromUser",
+                      "toUser",
+                      "timestamp"
+                    ]
+                  }
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Client error",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "INVALID_TYPE": {
+                    "value": {
+                      "error": {
+                        "message": "Invalid type.",
+                        "code": "INVALID_TYPE",
+                        "id": "1d7645e6-2b6d-4635-b0d8-68b6b259c8c0"
+                      }
+                    }
+                  },
+                  "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"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/following/history": {
+      "post": {
+        "operationId": "following___history",
+        "summary": "following/history",
+        "description": "No description provided.\n\n**Credential required**: *Yes* / **Permission**: *read:following*",
+        "externalDocs": {
+          "description": "Source code",
+          "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/following/history.ts"
+        },
+        "tags": [
+          "following"
+        ],
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "requestBody": {
+          "required": true,
+          "content": {
+            "application/json": {
+              "schema": {
+                "type": "object",
+                "properties": {
+                  "type": {
+                    "type": [
+                      "string",
+                      "null"
+                    ],
+                    "enum": [
+                      "sent",
+                      "received",
+                      "approved",
+                      "rejected",
+                      "wasApproved",
+                      "wasRejected",
+                      "wasBlocked",
+                      "wasUnBlocked"
+                    ],
+                    "description": "Filter by type of action"
+                  },
+                  "sinceId": {
+                    "type": "string",
+                    "format": "misskey:id",
+                    "description": "Get history after this ID"
+                  },
+                  "untilId": {
+                    "type": "string",
+                    "format": "misskey:id",
+                    "description": "Get history before this ID"
+                  },
+                  "limit": {
+                    "type": "integer",
+                    "minimum": 1,
+                    "maximum": 100,
+                    "default": 30,
+                    "description": "Number of histories to get"
+                  },
+                  "delete": {
+                    "type": "boolean",
+                    "default": false,
+                    "description": "Delete all histories"
+                  }
+                }
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "OK (with results)",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "type": "array",
+                  "items": {
+                    "type": "object",
+                    "properties": {
+                      "id": {
+                        "type": "string",
+                        "format": "id"
+                      },
+                      "type": {
+                        "type": [
+                          "string",
+                          "null"
+                        ],
+                        "enum": [
+                          "sent",
+                          "received",
+                          "approved",
+                          "rejected",
+                          "wasApproved",
+                          "wasRejected",
+                          "wasBlocked",
+                          "wasUnBlocked"
+                        ],
+                        "description": "Filter by type of action"
+                      },
+                      "fromUser": {
+                        "type": "object",
+                        "$ref": "#/components/schemas/UserDetailedNotMe"
+                      },
+                      "toUser": {
+                        "type": "object",
+                        "$ref": "#/components/schemas/UserDetailedNotMe"
+                      },
+                      "timestamp": {
+                        "type": "string",
+                        "format": "date-time"
+                      }
+                    },
+                    "required": [
+                      "id",
+                      "type",
+                      "fromUser",
+                      "toUser",
+                      "timestamp"
+                    ]
+                  }
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Client error",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "INVALID_TYPE": {
+                    "value": {
+                      "error": {
+                        "message": "Invalid type.",
+                        "code": "INVALID_TYPE",
+                        "id": "1d7645e6-2b6d-4635-b0d8-68b6b259c8c0"
+                      }
+                    }
+                  },
+                  "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"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+    },
     "/gallery/featured": {
       "post": {
         "operationId": "gallery___featured",

Get diff files from Workflow Page

@chan-mai
Copy link
Member

ありがとーーー
あとで確認する👍🏻👍🏻👍🏻

@lqvp
Copy link
Author

lqvp commented Dec 12, 2024

resolve

@lqvp lqvp changed the title feat: フォロー/フォロリクの履歴 feat: フォロー/フォロリクの履歴 - 要修正 Dec 12, 2024
chore

revert

copilot

Revert "copilot"

This reverts commit f0981c6084fd1fc5e1a41afc77360d376dff191f.

fix

?

fix?

local

iranai
@lqvp lqvp changed the title feat: フォロー/フォロリクの履歴 - 要修正 feat: フォロー/フォロリクの履歴 Dec 12, 2024
@chan-mai chan-mai self-requested a review December 12, 2024 23:41
@chan-mai chan-mai merged commit ce96945 into team-shahu:develop Dec 12, 2024
26 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants