### Dev Container Setup Commands Source: https://github.com/misskeyio/misskey/blob/main/CONTRIBUTING.md Commands executed automatically within the Dev Container to set up the development environment. This includes updating git submodules, installing dependencies, copying configuration, building the project, and running migrations. ```bash git submodule update --init pnpm install --frozen-lockfile cp .devcontainer/devcontainer.yml .config/default.yml pnpm build pnpm migrate ``` -------------------------------- ### Storybook Development Server Source: https://github.com/misskeyio/misskey/blob/main/CONTRIBUTING.md Starts the Storybook development server for UI component development and visualization. ```bash pnpm --filter frontend storybook-dev ``` -------------------------------- ### Start Development Server Source: https://github.com/misskeyio/misskey/blob/main/CONTRIBUTING.md Command to start the Misskey development server. This command watches server-side files for changes, automatically rebuilds, and restarts the server process. It also handles Service Worker watching and Vite HMR. ```bash pnpm dev ``` -------------------------------- ### Run All Tests Source: https://github.com/misskeyio/misskey/blob/main/CONTRIBUTING.md Command to execute all tests defined in the project. Ensure the test configuration file is copied and the necessary database and Redis instances are running. ```bash pnpm test ``` -------------------------------- ### Storybook Build Source: https://github.com/misskeyio/misskey/blob/main/CONTRIBUTING.md Builds the misskey-js package, which is a prerequisite for running Storybook. ```bash pnpm --filter misskey-js build ``` -------------------------------- ### Running Tests and Linting Source: https://github.com/misskeyio/misskey/blob/main/CONTRIBUTING.md Instructions on how to execute the project's test suite and linting tools. These commands are essential for ensuring code quality and adherence to project standards before submitting changes. ```Shell pnpm test ``` ```Shell pnpm lint ``` -------------------------------- ### Deploying PR to Preview Environment Source: https://github.com/misskeyio/misskey/blob/main/CONTRIBUTING.md This command allows for the deployment of a specific commit from a pull request to a preview environment. It is used via issue comments and requires the commit hash as a parameter. This enables testing of federation with an assigned domain. ```Shell /deploy sha= ``` -------------------------------- ### Run Specific Test Source: https://github.com/misskeyio/misskey/blob/main/CONTRIBUTING.md Command to run a specific test file using Jest. Replace 'foo.ts' with the actual test file name. ```bash pnpm jest -- foo.ts ``` -------------------------------- ### Misskey API Two-Factor Authentication (2FA) Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Defines request and response types for managing two-factor authentication, including setup, verification, and key management. ```TypeScript interface IResponse {} interface I2faDoneRequest {} interface I2faDoneResponse {} interface I2faKeyDoneRequest {} interface I2faKeyDoneResponse {} interface I2faPasswordLessRequest {} interface I2faRegisterKeyRequest {} interface I2faRegisterKeyResponse {} interface I2faRegisterRequest {} interface I2faRegisterResponse {} interface I2faUpdateKeyRequest {} interface I2faRemoveKeyRequest {} interface I2faUnregisterRequest {} ``` -------------------------------- ### NestJS Service Unit Test with OnModuleInit (TypeScript) Source: https://github.com/misskeyio/misskey/blob/main/CONTRIBUTING.md Shows how to write unit tests for NestJS services that use `OnModuleInit` to resolve dependencies. It covers setting up the testing module, mocking dependencies, and ensuring `onModuleInit` is called. ```typescript // import ... describe('test', () => { let app: TestingModule; let fooService: FooService; // for test case let barService: BarService; // for test case beforeEach(async () => { app = await Test.createTestingModule({ imports: ..., // Add necessary imports providers: [ FooService, { provide: BarService, useFactory: () => ({ incredibleMethod: jest.fn(), }), }, { provide: BarService.name, useExisting: BarService, }, ], }) .useMocker(...) .compile(); fooService = app.get(FooService); barService = app.get(BarService) as jest.Mocked; // onModuleInitを実行する await fooService.onModuleInit(); }); test('nice', async () => { await fooService.niceMethod(); expect(barService.incredibleMethod).toHaveBeenCalled(); expect(barService.incredibleMethod.mock.lastCall![0]) .toEqual({ hoge: 'fuga' }); }); }) ``` -------------------------------- ### SQL Query Builder Placeholder Handling (TypeScript) Source: https://github.com/misskeyio/misskey/blob/main/CONTRIBUTING.md Demonstrates how to correctly handle duplicate placeholders when building SQL queries dynamically in TypeScript using a query builder. It shows the incorrect way and the corrected approach to avoid placeholder conflicts. ```typescript query.andWhere(new Brackets(qb => { for (const type of ps.fileType) { qb.orWhere(`:type = ANY(note.attachedFileTypes)`, { type: type }); } })); ``` ```typescript query.andWhere(new Brackets(qb => { for (const type of ps.fileType) { const i = ps.fileType.indexOf(type); qb.orWhere(`:type${i} = ANY(note.attachedFileTypes)`, { [`type${i}`]: type }); } })); ``` -------------------------------- ### Nirax Route Definition Source: https://github.com/misskeyio/misskey/blob/main/CONTRIBUTING.md Defines the structure for route definitions within the nirax routing system. Each route object specifies properties like name, path, component, and optional parameters like login requirement. ```typescript { name?: string; path: string; component: Component; query?: Record; loginRequired?: boolean; hash?: string; globalCacheKey?: string; children?: RouteDef[]; } ``` -------------------------------- ### Generate and Override Storybook Stories (Vue3/TypeScript) Source: https://github.com/misskeyio/misskey/blob/main/CONTRIBUTING.md Demonstrates how to automatically generate Storybook stories for Vue 3 components using a script and how to override them with `.stories.impl.ts` or `.stories.meta.ts` files. It also shows how to mock API requests using MSW with `.stories.msw.ts` files. ```typescript /* eslint-disable @typescript-eslint/explicit-function-return-type */ import { StoryObj } from '@storybook/vue3'; import MyComponent from './MyComponent.vue'; export const Default = { render(args) { return { components: { MyComponent, }, setup() { return { args, }; }, computed: { props() { return { ...this.args, }; }, }, template: '', }; }, args: { foo: 'bar', }, parameters: { layout: 'centered', }, } satisfies StoryObj; ``` ```typescript import MyComponent from './MyComponent.vue'; void MyComponent; ``` ```typescript export const argTypes = { scale: { control: { type: 'range', min: 1, max: 4, }, }, }; ``` ```typescript import { HttpResponse, http } from 'msw'; export const handlers = [ http.post('/api/notes/timeline', ({ request }) => { return HttpResponse.json([]); }), ]; ``` -------------------------------- ### Misskey API - Reversi Game Event and Receive Types Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Defines the events and receive actions for the Reversi game API, including game start, end, cancellation, player readiness, settings updates, and logging. It also specifies actions like placing a stone or updating settings. ```typescript started: (payload: { game: ReversiGameDetailed; }) => void; ended: (payload: { winnerId: User['id'] | null; game: ReversiGameDetailed; }) => void; canceled: (payload: { userId: User['id']; }) => void; changeReadyStates: (payload: { user1: boolean; user2: boolean; }) => void; updateSettings: (payload: { userId: User['id']; key: string; value: any; }) => void; log: (payload: Record) => void; ``` ```typescript putStone: { pos: number; id: string; }; ready: boolean; cancel: null | Record; updateSettings: { key: string; value: any; }; claimTimeIsUp: null | Record; ``` -------------------------------- ### Misskey ActivityPub (AP) Endpoint Interaction Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Endpoints for interacting with ActivityPub (AP) related data, including getting and showing AP information. ```typescript ApGetRequest, ApGetResponse, ApShowRequest, ApShowResponse ``` -------------------------------- ### Misskey API Registry Types Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Defines request and response types for various registry operations, including getting all, getting details, and listing keys. ```TypeScript type IRegistryGetAllRequest = operations['i___registry___get-all']['requestBody']['content']['application/json']; type IRegistryGetAllResponse = operations['i___registry___get-all']['responses']['200']['content']['application/json']; type IRegistryGetDetailRequest = operations['i___registry___get-detail']['requestBody']['content']['application/json']; type IRegistryGetDetailResponse = operations['i___registry___get-detail']['responses']['200']['content']['application/json']; type IRegistryGetRequest = operations['i___registry___get']['requestBody']['content']['application/json']; type IRegistryGetResponse = operations['i___registry___get']['responses']['200']['content']['application/json']; type IRegistryKeysRequest = operations['i___registry___keys']['requestBody']['content']['application/json']; type IRegistryKeysResponse = operations['i___registry___keys']['responses']['200']['content']['application/json']; ``` -------------------------------- ### Resolve NestJS Circular Dependencies with OnModuleInit (TypeScript) Source: https://github.com/misskeyio/misskey/blob/main/CONTRIBUTING.md Provides an alternative method to resolve NestJS circular dependencies using `OnModuleInit` and `ModuleRef`. This approach is useful when `forwardRef` alone is insufficient or for more complex scenarios. ```typescript import { Injectable, OnModuleInit } from '@nestjs/common'; import { ModuleRef } from '@nestjs/core'; import { BarService } from '@/core/BarService'; @Injectable() export class FooService implements OnModuleInit { private barService: BarService // constructorから移動してくる constructor( private moduleRef: ModuleRef, ) { } aSync onModuleInit() { this.barService = this.moduleRef.get(BarService.name); } public async niceMethod() { return await this.barService.incredibleMethod({ hoge: 'fuga' }); } } ``` -------------------------------- ### Define AP Request and Response Types Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Defines TypeScript types for ActivityPub (AP) related API requests and responses. This includes types for getting and showing AP information. ```typescript // @public (undocumented) type ApGetRequest = operations['ap___get']['requestBody']['content']['application/json']; // @public (undocumented) type ApGetResponse = operations['ap___get']['responses']['200']['content']['application/json']; // @public (undocumented) type ApShowRequest = operations['ap___show']['requestBody']['content']['application/json']; // @public (undocumented) type ApShowResponse = operations['ap___show']['responses']['200']['content']['application/json']; ``` -------------------------------- ### Resolve NestJS Circular Dependencies with forwardRef (TypeScript) Source: https://github.com/misskeyio/misskey/blob/main/CONTRIBUTING.md Illustrates how to resolve circular dependencies between NestJS services using the `forwardRef` decorator. This is a common pattern when two services depend on each other. ```typescript import { Injectable, Inject, forwardRef } from '@nestjs/common'; import { BarService } from '@/core/BarService'; @Injectable() export class FooService { constructor( @Inject(forwardRef(() => BarService)) private barService: BarService ) { } } ``` -------------------------------- ### Misskey Plugin Development with AiScript Source: https://github.com/misskeyio/misskey/blob/main/README.md Misskey allows for UI customization and extension through plugins written in AiScript, an original programming language. This enables developers to create custom themes and add new functionalities to the Misskey web interface. ```AiScript // Example of AiScript for a Misskey plugin // This is a placeholder as AiScript code examples are not provided in the text. // AiScript allows for UI customization, adding widgets, and creating custom themes. ``` -------------------------------- ### Misskey API: User Lists Get Memberships Types Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Defines the request and response types for retrieving user list memberships in the Misskey API. These types are derived from the OpenAPI specification. ```TypeScript type UsersListsGetMembershipsRequest = operations['users___lists___get-memberships']['requestBody']['content']['application/json']; type UsersListsGetMembershipsResponse = operations['users___lists___get-memberships']['responses']['200']['content']['application/json']; ``` -------------------------------- ### TypeORM Not(null) vs Not(IsNull()) (TypeScript) Source: https://github.com/misskeyio/misskey/blob/main/CONTRIBUTING.md Explains a common pitfall in TypeORM where using `Not(null)` to query for non-null values does not work as expected. It provides the correct way to achieve this using `Not(IsNull())`. ```typescript const foo = await Foos.findOne({ bar: Not(null) }); ``` ```typescript const foo = await Foos.findOne({ bar: Not(IsNull()) }); ``` -------------------------------- ### Misskey Admin Promo Management Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md API for creating promotional content or campaigns. ```typescript AdminPromoCreateRequest ``` -------------------------------- ### Misskey Admin Server Information Types Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md TypeScript types for retrieving server information and managing moderation logs in Misskey administration. Includes types for getting server status and viewing moderation history. ```TypeScript type AdminServerInfoResponse = operations['admin___server-info']['responses']['200']['content']['application/json']; type AdminShowModerationLogsRequest = operations['admin___show-moderation-logs']['requestBody']['content']['application/json']; type AdminShowModerationLogsResponse = operations['admin___show-moderation-logs']['responses']['200']['content']['application/json']; type AdminShowUserAccountMoveLogsRequest = operations['admin___show-user-account-move-logs']['requestBody']['content']['application/json']; type AdminShowUserAccountMoveLogsResponse = operations['admin___show-user-account-move-logs']['responses']['200']['content']['application/json']; type AdminUpdateMetaRequest = operations['admin___update-meta']['requestBody']['content']['application/json']; ``` -------------------------------- ### Misskey API: Gallery Management Requests and Responses Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Provides types for interacting with the gallery feature, including fetching featured and popular posts, creating, deleting, and showing gallery posts. Allows users to share and discover visual content. ```typescript interface GalleryFeaturedRequest {} interface GalleryFeaturedResponse {} interface GalleryPopularResponse {} interface GalleryPostsRequest {} interface GalleryPostsResponse {} interface GalleryPostsCreateRequest {} interface GalleryPostsCreateResponse {} interface GalleryPostsDeleteRequest {} interface GalleryPostsLikeRequest {} interface GalleryPostsShowRequest {} interface GalleryPostsShowResponse {} ``` -------------------------------- ### Misskey Application Creation Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md API endpoint for creating a new application registration. ```typescript AppCreateRequest ``` -------------------------------- ### Misskey API Registry Operations Types Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Defines TypeScript types for Misskey API registry operations, including requests and responses for getting keys with types, removing entries, setting values, and managing scopes. ```TypeScript type IRegistryKeysWithTypeRequest = operations['i___registry___keys-with-type']['requestBody']['content']['application/json']; type IRegistryKeysWithTypeResponse = operations['i___registry___keys-with-type']['responses']['200']['content']['application/json']; type IRegistryRemoveRequest = operations['i___registry___remove']['requestBody']['content']['application/json']; type IRegistryScopesWithDomainResponse = operations['i___registry___scopes-with-domain']['responses']['200']['content']['application/json']; type IRegistrySetRequest = operations['i___registry___set']['requestBody']['content']['application/json']; ``` -------------------------------- ### Misskey API: Drive and File Management Requests and Responses Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Defines types for managing files and folders within the Misskey drive, including uploading, downloading, finding, and organizing files. Essential for media handling and storage. ```typescript interface DriveResponse {} interface DriveFilesRequest {} interface DriveFilesResponse {} interface DriveFilesAttachedNotesRequest {} interface DriveFilesAttachedNotesResponse {} interface DriveFilesCheckExistenceRequest {} interface DriveFilesCheckExistenceResponse {} interface DriveFilesCreateRequest {} interface DriveFilesCreateResponse {} interface DriveFilesDeleteRequest {} interface DriveFilesFindByHashRequest {} interface DriveFilesFindByHashResponse {} interface DriveFilesFindRequest {} interface DriveFilesFindResponse {} interface DriveFilesShowRequest {} interface DriveFilesShowResponse {} interface DriveFilesUpdateRequest {} interface DriveFilesUpdateResponse {} interface DriveFilesUploadFromUrlRequest {} interface DriveFoldersRequest {} interface DriveFoldersResponse {} interface DriveFoldersCreateRequest {} interface DriveFoldersCreateResponse {} interface DriveFoldersDeleteRequest {} interface DriveFoldersFindRequest {} interface DriveFoldersFindResponse {} interface DriveFoldersShowRequest {} interface DriveFoldersShowResponse {} interface DriveFoldersUpdateRequest {} interface DriveFoldersUpdateResponse {} interface DriveStreamRequest {} interface DriveStreamResponse {} ``` -------------------------------- ### Define APIClient for Misskey Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Defines the APIClient class for interacting with the Misskey API. It includes properties for origin, credential, and a fetch implementation, along with a constructor to initialize these properties. ```typescript declare namespace api { export { isAPIError, SwitchCaseResponseType, APIError, FetchLike, APIClient } } export { api } // @public (undocumented) class APIClient { constructor(opts: { origin: APIClient['origin']; credential?: APIClient['credential']; fetch?: APIClient['fetch'] | null | undefined; }); // (undocumented) credential: string | null | undefined; // (undocumented) fetch: FetchLike; // (undocumented) origin: string; } ``` -------------------------------- ### Misskey User Recommendation API Types Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Defines TypeScript types for the Misskey API operation to get user recommendations. This includes the request body structure for specifying parameters and the response body structure for the recommended users. ```TypeScript type UsersRecommendationRequest = operations['users___recommendation']['requestBody']['content']['application/json']; type UsersRecommendationResponse = operations['users___recommendation']['responses']['200']['content']['application/json']; ``` -------------------------------- ### Misskey API: Federation Management Requests and Responses Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Provides types for managing federation-related data, including followers, following, instances, and user information across federated instances. Crucial for distributed social network operations. ```typescript interface FederationFollowersRequest {} interface FederationFollowersResponse {} interface FederationFollowingRequest {} interface FederationFollowingResponse {} interface FederationInstancesRequest {} interface FederationInstancesResponse {} interface FederationShowInstanceRequest {} interface FederationShowInstanceResponse {} interface FederationUpdateRemoteUserRequest {} interface FederationUsersRequest {} interface FederationUsersResponse {} interface FederationStatsRequest {} interface FederationStatsResponse {} ``` -------------------------------- ### Misskey API User and Token Operations Types Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Provides TypeScript types for Misskey API operations related to user information and token management, including getting user details, revoking tokens, and signing in history. ```TypeScript type IResponse = operations['i']['responses']['200']['content']['application/json']; type IRevokeTokenRequest = operations['i___revoke-token']['requestBody']['content']['application/json']; function isAPIError(reason: Record): reason is APIError; type ISigninHistoryRequest = operations['i___signin-history']['requestBody']['content']['application/json']; type ISigninHistoryResponse = operations['i___signin-history']['responses']['200']['content']['application/json']; ``` -------------------------------- ### Misskey API: Permissions List Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Lists all available permissions for interacting with the Misskey API, covering various user and administrative actions. ```TypeScript export const permissions: readonly string[] = [ "read:account", "write:account", "read:blocks", "write:blocks", "read:drive", "write:drive", "read:favorites", "write:favorites", "read:following", "write:following", "read:messaging", "write:messaging", "read:mutes", "write:mutes", "write:notes", "read:notifications", "write:notifications", "read:reactions", "write:reactions", "write:votes", "read:pages", "write:pages", "write:page-likes", "read:page-likes", "read:user-groups", "write:user-groups", "read:channels", "write:channels", "read:gallery", "write:gallery", "read:gallery-likes", "write:gallery-likes", "read:flash", "write:flash", "read:flash-likes", "write:flash-likes", "read:admin:abuse-user-reports", "read:admin:abuse-report-resolvers", "write:admin:abuse-report-resolvers", "read:admin:index-stats", "read:admin:table-stats", "read:admin:user-ips", "read:admin:meta", "write:admin:reset-password", "write:admin:regenerate-user-token", "write:admin:resolve-abuse-user-report", "write:admin:send-email", "read:admin:server-info", "read:admin:show-moderation-log", "read:admin:show-account-move-log", "read:admin:show-user", "read:admin:show-users", "write:admin:suspend-user", "write:admin:unsuspend-user", "write:admin:meta", "write:admin:user-name", "write:admin:user-note", "write:admin:user-avatar", "write:admin:user-banner", "write:admin:user-mutual-link", "write:admin:roles", "read:admin:roles", "write:admin:relays", "read:admin:relays", "write:admin:invite-codes", "read:admin:invite-codes", "write:admin:announcements", "read:admin:announcements", "write:admin:avatar-decorations", "read:admin:avatar-decorations", "write:admin:federation", "write:admin:indie-auth", "read:admin:indie-auth", "write:admin:account", "read:admin:account", "write:admin:emoji", "read:admin:emoji", "write:admin:queue", "read:admin:queue", "write:admin:promo", "write:admin:drive", "read:admin:drive", "write:admin:sso", "read:admin:sso", "write:admin:ad", "read:admin:ad", "write:invite-codes", "read:invite-codes", "write:clip-favorite", "read:clip-favorite", "read:federation", "write:report-abuse" ]; ``` -------------------------------- ### Misskey Admin Ad Management Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md APIs for managing advertisements on Misskey. This covers creating, deleting, listing, and updating ad content. ```typescript AdminAdCreateRequest, AdminAdCreateResponse, AdminAdDeleteRequest, AdminAdListRequest, AdminAdListResponse, AdminAdUpdateRequest ``` -------------------------------- ### Misskey User Relation API Types Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Defines TypeScript types for the Misskey API operation to get user relation information. This includes the request body structure for specifying parameters and the response body structure for the relation data. ```TypeScript type UsersRelationRequest = operations['users___relation']['requestBody']['content']['application/json']; type UsersRelationResponse = operations['users___relation']['responses']['200']['content']['application/json']; ``` -------------------------------- ### Misskey API: Promo and Queue Types Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Defines TypeScript types for Misskey API requests and responses concerning promotions and queue statistics. ```TypeScript type PromoReadRequest = operations['promo___read']['requestBody']['content']['application/json']; type QueueCount = components['schemas']['QueueCount']; type QueueStats = { deliver: { activeSincePrevTick: number; active: number; waiting: number; delayed: number; }; inbox: { activeSincePrevTick: number; active: number; waiting: number; delayed: number; }; }; type QueueStatsLog = QueueStats[]; ``` -------------------------------- ### Misskey Admin Federation Management Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Endpoints for managing federation settings and data. Includes refreshing instance metadata, removing following, and updating instance information. ```typescript AdminFederationDeleteAllFilesRequest, AdminFederationRefreshRemoteInstanceMetadataRequest, AdminFederationRemoveAllFollowingRequest, AdminFederationUpdateInstanceRequest ``` -------------------------------- ### Misskey Admin Server Information Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Endpoint for retrieving general server information. ```typescript AdminServerInfoResponse ``` -------------------------------- ### Misskey Admin SSO Management Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md APIs for managing Single Sign-On (SSO) configurations. Allows for creating, deleting, listing, and updating SSO settings. ```typescript AdminSsoCreateRequest, AdminSsoCreateResponse, AdminSsoDeleteRequest, AdminSsoListRequest, AdminSsoListResponse, AdminSsoUpdateRequest ``` -------------------------------- ### Misskey Admin IndieAuth Management Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md APIs for managing IndieAuth credentials. Allows for creating, deleting, listing, and updating IndieAuth configurations. ```typescript AdminIndieAuthCreateRequest, AdminIndieAuthCreateResponse, AdminIndieAuthDeleteRequest, AdminIndieAuthListRequest, AdminIndieAuthListResponse, AdminIndieAuthUpdateRequest ``` -------------------------------- ### Misskey Admin User Details Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md APIs for showing individual user details and lists of users. ```typescript AdminShowUserRequest, AdminShowUserResponse, AdminShowUsersRequest, AdminShowUsersResponse ``` -------------------------------- ### Misskey API Endpoint and Sign-in/Signup Types Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Defines TypeScript types for Misskey API endpoints, including general endpoint information and specific types for user sign-in, sign-up, and pending sign-up processes. It also includes types for user show requests and responses. ```TypeScript type EndpointRequest = operations['endpoint']['requestBody']['content']['application/json']; type EndpointResponse = operations['endpoint']['responses']['200']['content']['application/json']; export type Endpoints = Overwrite; type EndpointsResponse = operations['endpoints']['responses']['200']['content']['application/json']; ``` -------------------------------- ### Misskey API Gallery Posts Retrieval Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Provides types for retrieving gallery posts, including filtering and pagination. ```TypeScript interface IGalleryPostsRequest {} interface IGalleryPostsResponse {} ``` -------------------------------- ### Misskey API: Following Management Requests and Responses Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Defines types for managing user follow relationships, including creating, deleting, updating, and handling follow requests. Core functionality for social interaction. ```typescript interface FollowingCreateRequest {} interface FollowingCreateResponse {} interface FollowingDeleteRequest {} interface FollowingDeleteResponse {} interface FollowingUpdateRequest {} interface FollowingUpdateResponse {} interface FollowingUpdateAllRequest {} interface FollowingInvalidateRequest {} interface FollowingInvalidateResponse {} interface FollowingRequestsAcceptRequest {} interface FollowingRequestsCancelRequest {} interface FollowingRequestsCancelResponse {} interface FollowingRequestsListRequest {} interface FollowingRequestsListResponse {} interface FollowingRequestsRejectRequest {} ``` -------------------------------- ### Misskey Admin Role Management Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Endpoints for managing user roles, including creation, deletion, listing, showing, updating, assigning, and unassigning roles. ```typescript AdminRolesCreateRequest, AdminRolesCreateResponse, AdminRolesDeleteRequest, AdminRolesListResponse, AdminRolesShowRequest, AdminRolesShowResponse, AdminRolesUpdateRequest, AdminRolesAssignRequest, AdminRolesUnassignRequest, AdminRolesUpdateDefaultPoliciesRequest, AdminRolesUsersRequest, AdminRolesUsersResponse ``` -------------------------------- ### Misskey API: Channel Management Requests and Responses Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Outlines types for channel operations such as creation, featuring, following, searching, and updating. Channels are a core feature for real-time communication and content organization. ```typescript interface ChannelsCreateRequest {} interface ChannelsCreateResponse {} interface ChannelsFeaturedResponse {} interface ChannelsFeaturedGamesResponse {} interface ChannelsFollowRequest {} interface ChannelsFollowedRequest {} interface ChannelsFollowedResponse {} interface ChannelsOwnedRequest {} interface ChannelsOwnedResponse {} interface ChannelsShowRequest {} interface ChannelsShowResponse {} interface ChannelsTimelineRequest {} interface ChannelsTimelineResponse {} interface ChannelsUnfollowRequest {} interface ChannelsUpdateRequest {} interface ChannelsUpdateResponse {} interface ChannelsFavoriteRequest {} interface ChannelsUnfavoriteRequest {} interface ChannelsMyFavoritesResponse {} interface ChannelsSearchRequest {} interface ChannelsSearchResponse {} ``` -------------------------------- ### Misskey API Favorites and Gallery Likes Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Defines request and response types for managing user favorites and liking gallery posts. ```TypeScript interface IFavoritesRequest {} interface IFavoritesResponse {} interface IGalleryLikesRequest {} interface IGalleryLikesResponse {} ``` -------------------------------- ### Misskey Admin Promo Types Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md TypeScript type for creating promotional content within the Misskey administration. ```TypeScript type AdminPromoCreateRequest = operations['admin___promo___create']['requestBody']['content']['application/json']; ``` -------------------------------- ### Misskey API Pinning and Announcements Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Defines types for pinning and unpinning items, and reading announcements. ```TypeScript interface IPinRequest {} interface IPinResponse {} interface IReadAnnouncementRequest {} interface IUnpinRequest {} interface IUnpinResponse {} ``` -------------------------------- ### Misskey API: App Management Requests and Responses Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Defines request and response types for application creation and display operations within the Misskey API. These are fundamental for interacting with the Misskey platform programmatically. ```typescript interface AppCreateResponse {} interface AppShowRequest {} interface AppShowResponse {} ``` -------------------------------- ### Misskey Admin Invite Management Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Endpoints for managing invitation codes. Allows for creating and listing invites. ```typescript AdminInviteCreateRequest, AdminInviteCreateResponse, AdminInviteListRequest, AdminInviteListResponse ``` -------------------------------- ### Misskey API Authentication Token Generation Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Includes types for generating authentication tokens using Miauth. ```TypeScript interface MiauthGenTokenRequest {} interface MiauthGenTokenResponse {} ``` -------------------------------- ### Misskey API: Authentication Requests and Responses Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Provides types for authentication-related operations, including session generation, display, and user key management. These are crucial for user authentication flows. ```typescript interface AuthAcceptRequest {} interface AuthSessionGenerateRequest {} interface AuthSessionGenerateResponse {} interface AuthSessionShowRequest {} interface AuthSessionShowResponse {} interface AuthSessionUserkeyRequest {} interface AuthSessionUserkeyResponse {} ``` -------------------------------- ### Misskey Channel Event Definitions Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Provides type definitions for various Misskey channels, including 'main', 'homeTimeline', 'localTimeline', 'hybridTimeline', and 'globalTimeline'. It specifies the parameters and events associated with each channel. ```TypeScript export type Channels = { main: { params: null; events: { notification: (payload: Notification_2) => void; mention: (payload: Note) => void; reply: (payload: Note) => void; renote: (payload: Note) => void; follow: (payload: UserDetailedNotMe) => void; followed: (payload: UserDetailed | UserLite) => void; unfollow: (payload: UserDetailed) => void; meUpdated: (payload: UserDetailed) => void; pageEvent: (payload: PageEvent) => void; urlUploadFinished: (payload: { marker: string; file: DriveFile; }) => void; readAllNotifications: () => void; unreadNotification: (payload: Notification_2) => void; unreadMention: (payload: Note['id']) => void; readAllUnreadMentions: () => void; notificationFlushed: () => void; unreadSpecifiedNote: (payload: Note['id']) => void; readAllUnreadSpecifiedNotes: () => void; readAllAntennas: () => void; unreadAntenna: (payload: Antenna) => void; readAllAnnouncements: () => void; myTokenRegenerated: () => void; signin: (payload: Signin) => void; registryUpdated: (payload: { scope?: string[]; key: string; value: any | null; }) => void; driveFileCreated: (payload: DriveFile) => void; readAntenna: (payload: Antenna) => void; receiveFollowRequest: (payload: User) => void; announcementCreated: (payload: AnnouncementCreated) => void; }; receives: null; }; homeTimeline: { params: { withRenotes?: boolean; withFiles?: boolean; minimize?: boolean; }; events: { note: (payload: Note) => void; }; receives: null; }; localTimeline: { params: { withRenotes?: boolean; withReplies?: boolean; withFiles?: boolean; minimize?: boolean; }; events: { note: (payload: Note) => void; }; receives: null; }; hybridTimeline: { params: { withRenotes?: boolean; withReplies?: boolean; withFiles?: boolean; minimize?: boolean; }; events: { note: (payload: Note) => void; }; receives: null; }; globalTimeline: { params: { withRenotes?: boolean; withFiles?: boolean; minimize?: boolean; }; events: { note: (payload: Note) => void; }; receives: null; }; userList: { params: { listId: string; withFiles?: boolean; withRenotes?: boolean; minimize?: boolean; }; events: { ``` -------------------------------- ### Misskey API Webhooks Management Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Includes types for creating, listing, showing, updating, and deleting webhooks. ```TypeScript interface IWebhooksCreateRequest {} interface IWebhooksCreateResponse {} interface IWebhooksListResponse {} interface IWebhooksShowRequest {} interface IWebhooksShowResponse {} interface IWebhooksUpdateRequest {} interface IWebhooksDeleteRequest {} ``` -------------------------------- ### Misskey API Invite Management Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Provides types for creating, deleting, listing, and checking invite limits. ```TypeScript interface InviteCreateResponse {} interface InviteDeleteRequest {} interface InviteListRequest {} interface InviteListResponse {} interface InviteLimitResponse {} ``` -------------------------------- ### Misskey API Application Management Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Includes types for managing applications, authorized applications, and related permissions. ```TypeScript interface IAppsRequest {} interface IAppsResponse {} interface IAuthorizedAppsRequest {} interface IAuthorizedAppsResponse {} ``` -------------------------------- ### Manage Misskey Drive Files Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Defines the request and response types for managing user files within Misskey's drive system, including deleting all files for a user and listing or showing specific files. These types are essential for drive administration. ```TypeScript type AdminDriveDeleteAllFilesOfAUserRequest = operations['admin___drive___delete-all-files-of-a-user']['requestBody']['content']['application/json']; type AdminDriveFilesRequest = operations['admin___drive___files']['requestBody']['content']['application/json']; type AdminDriveFilesResponse = operations['admin___drive___files']['responses']['200']['content']['application/json']; type AdminDriveShowFileRequest = operations['admin___drive___show-file']['requestBody']['content']['application/json']; type AdminDriveShowFileResponse = operations['admin___drive___show-file']['responses']['200']['content']['application/json']; ``` -------------------------------- ### Misskey Admin Drive File Management Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Endpoints for managing files within the Misskey drive system. Includes deleting all files for a user, listing files, and showing file details. ```typescript AdminDriveDeleteAllFilesOfAUserRequest, AdminDriveFilesRequest, AdminDriveFilesResponse, AdminDriveShowFileRequest, AdminDriveShowFileResponse ``` -------------------------------- ### Misskey API Gallery Post Requests Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Defines request and response types for gallery post operations, including creating, updating, and retrieving posts. ```TypeScript interface GalleryPostsUnlikeRequest {} interface GalleryPostsUpdateRequest {} interface GalleryPostsUpdateResponse {} ``` -------------------------------- ### Misskey API My Applications Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Defines types for retrieving information about the user's own applications. ```TypeScript interface MyAppsRequest {} interface MyAppsResponse {} ``` -------------------------------- ### Misskey API: User Lists Create Types Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Defines the request and response types for creating a new user list in the Misskey API. These types are derived from the OpenAPI specification for the users/lists/create endpoint. ```TypeScript type UsersListsCreateRequest = operations['users___lists___create']['requestBody']['content']['application/json']; type UsersListsCreateResponse = operations['users___lists___create']['responses']['200']['content']['application/json']; ``` -------------------------------- ### Misskey API: Charts and Statistics Requests and Responses Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Defines types for retrieving various statistical data, including active users, drive usage, federation statistics, and note/user activity. Useful for monitoring platform health and user engagement. ```typescript interface ChartsActiveUsersRequest {} interface ChartsActiveUsersResponse {} interface ChartsApRequestRequest {} interface ChartsApRequestResponse {} interface ChartsDriveRequest {} interface ChartsDriveResponse {} interface ChartsFederationRequest {} interface ChartsFederationResponse {} interface ChartsInstanceRequest {} interface ChartsInstanceResponse {} interface ChartsNotesRequest {} interface ChartsNotesResponse {} interface ChartsUserDriveRequest {} interface ChartsUserDriveResponse {} interface ChartsUserFollowingRequest {} interface ChartsUserFollowingResponse {} interface ChartsUserNotesRequest {} interface ChartsUserNotesResponse {} interface ChartsUserPvRequest {} interface ChartsUserPvResponse {} interface ChartsUserReactionsRequest {} interface ChartsUserReactionsResponse {} interface ChartsUsersRequest {} interface ChartsUsersResponse {} ``` -------------------------------- ### Misskey API Token and Registry Operations Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Includes types for regenerating tokens, revoking tokens, and managing registry entries. ```TypeScript interface IRegenerateTokenRequest {} interface IRegistryGetAllRequest {} interface IRegistryGetAllResponse {} interface IRegistryGetDetailRequest {} interface IRegistryGetDetailResponse {} interface IRegistryGetRequest {} interface IRegistryGetResponse {} interface IRegistryKeysWithTypeRequest {} interface IRegistryKeysWithTypeResponse {} interface IRegistryKeysRequest {} interface IRegistryKeysResponse {} interface IRegistryRemoveRequest {} interface IRegistryScopesWithDomainResponse {} interface IRegistrySetRequest {} interface IRevokeTokenRequest {} ``` -------------------------------- ### Storybook Meta Configuration (MDX) Source: https://github.com/misskeyio/misskey/blob/main/packages/frontend/src/index.mdx Configures Storybook metadata for the index page, setting the title to 'index'. This is a standard Storybook configuration file. ```mdx import { Meta } from '@storybook/blocks' ``` -------------------------------- ### Misskey API - Channels Create Request and Response Types Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Defines the request and response types for the 'channels___create' API endpoint, specifying the structure of the JSON payload for creating a channel. ```typescript type ChannelsCreateRequest = operations['channels___create']['requestBody']['content']['application/json']; ``` ```typescript type ChannelsCreateResponse = operations['channels___create']['responses']['200']['content']['application/json']; ``` -------------------------------- ### Misskey API: User Gallery Posts Types Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Defines the request and response types for user gallery posts in the Misskey API. These types are derived from the OpenAPI specification for the users/gallery/posts endpoint. ```TypeScript type UsersGalleryPostsRequest = operations['users___gallery___posts']['requestBody']['content']['application/json']; type UsersGalleryPostsResponse = operations['users___gallery___posts']['responses']['200']['content']['application/json']; ``` -------------------------------- ### Misskey Admin Account Management Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Endpoints for managing user accounts within the Misskey admin panel. This includes creating, deleting, and finding accounts by email, as well as handling pending accounts. ```typescript AdminAccountsCreateResponse, AdminAccountsDeleteRequest, AdminAccountsFindByEmailRequest, AdminAccountsFindByEmailResponse, AdminAccountsPendingListRequest, AdminAccountsPendingListResponse, AdminAccountsPendingRevokeRequest ``` -------------------------------- ### Misskey API: Blocking Management Requests and Responses Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Defines types for managing user blocks, including creating, deleting, and listing blocked users. Essential for user moderation and privacy controls. ```typescript interface BlockingCreateRequest {} interface BlockingCreateResponse {} interface BlockingDeleteRequest {} interface BlockingDeleteResponse {} interface BlockingListRequest {} interface BlockingListResponse {} ``` -------------------------------- ### Misskey Admin User Avatar/Banner Management Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md APIs for resetting user avatars and banners, and managing mutual links. ```typescript AdminUnsetUserAvatarRequest, AdminUnsetUserBannerRequest, AdminUnsetUserMutualLinkRequest ``` -------------------------------- ### Misskey Admin User Metadata Updates Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md APIs for updating user metadata, including name and note. ```typescript AdminUpdateMetaRequest, AdminUpdateUserNameRequest, AdminUpdateUserNoteRequest ``` -------------------------------- ### Misskey Antennas Management Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md APIs for managing antennas, which are used to track notes based on specific criteria. Includes creating, deleting, listing, and updating antennas, as well as retrieving notes associated with them. ```typescript AntennasCreateRequest, AntennasCreateResponse, AntennasDeleteRequest, AntennasListResponse, AntennasNotesRequest, AntennasNotesResponse, AntennasShowRequest, AntennasShowResponse, AntennasUpdateRequest, AntennasUpdateResponse ``` -------------------------------- ### Misskey Admin Queue Management Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Endpoints for managing and monitoring the task queue. Includes stats and delayed job information. ```typescript AdminQueueDeliverDelayedResponse, AdminQueueInboxDelayedResponse, AdminQueuePromoteRequest, AdminQueueStatsResponse ``` -------------------------------- ### Misskey Admin User Token Regeneration Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md API for regenerating a user's access token. ```typescript AdminRegenerateUserTokenRequest ``` -------------------------------- ### Define Server Information and Stats Types Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Defines TypeScript types for Misskey server information and statistics, including server info response and detailed server stats. ```TypeScript type ServerInfoResponse = operations['server-info']['responses']['200']['content']['application/json']; type ServerStats = { cpu: number; mem: { used: number; active: number; }; net: { rx: number; tx: number; }; fs: { r: number; w: number; }; }; type ServerStatsLog = ServerStats[]; type StatsResponse = operations['stats']['responses']['200']['content']['application/json']; ``` -------------------------------- ### Misskey API User Data Import Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Defines types for importing various user-related data, such as blocking, following, muting, and user lists. ```TypeScript interface IImportBlockingRequest {} interface IImportFollowingRequest {} interface IImportMutingRequest {} interface IImportUserListsRequest {} interface IImportAntennasRequest {} ``` -------------------------------- ### Misskey Admin Avatar Decorations Source: https://github.com/misskeyio/misskey/blob/main/packages/misskey-js/etc/misskey-js.api.md Endpoints for managing custom avatar decorations. Allows for creating, deleting, listing, and updating decorations. ```typescript AdminAvatarDecorationsCreateRequest, AdminAvatarDecorationsCreateResponse, AdminAvatarDecorationsDeleteRequest, AdminAvatarDecorationsListRequest, AdminAvatarDecorationsListResponse, AdminAvatarDecorationsUpdateRequest ```