spec(OAuth2): クライアント情報のDiscoveryの対応していないクライアントでも認証できるように (MisskeyIO#443)
This commit is contained in:
@@ -499,6 +499,50 @@ declare module '../api.js' {
|
||||
credential?: string | null,
|
||||
): Promise<SwitchCaseResponseType<E, P>>;
|
||||
|
||||
/**
|
||||
* No description provided.
|
||||
*
|
||||
* **Credential required**: *Yes* / **Permission**: *write:admin:indie-auth*
|
||||
*/
|
||||
request<E extends 'admin/indie-auth/create', P extends Endpoints[E]['req']>(
|
||||
endpoint: E,
|
||||
params: P,
|
||||
credential?: string | null,
|
||||
): Promise<SwitchCaseResponseType<E, P>>;
|
||||
|
||||
/**
|
||||
* No description provided.
|
||||
*
|
||||
* **Credential required**: *Yes* / **Permission**: *write:admin:indie-auth*
|
||||
*/
|
||||
request<E extends 'admin/indie-auth/delete', P extends Endpoints[E]['req']>(
|
||||
endpoint: E,
|
||||
params: P,
|
||||
credential?: string | null,
|
||||
): Promise<SwitchCaseResponseType<E, P>>;
|
||||
|
||||
/**
|
||||
* No description provided.
|
||||
*
|
||||
* **Credential required**: *Yes* / **Permission**: *read:admin:indie-auth*
|
||||
*/
|
||||
request<E extends 'admin/indie-auth/list', P extends Endpoints[E]['req']>(
|
||||
endpoint: E,
|
||||
params: P,
|
||||
credential?: string | null,
|
||||
): Promise<SwitchCaseResponseType<E, P>>;
|
||||
|
||||
/**
|
||||
* No description provided.
|
||||
*
|
||||
* **Credential required**: *Yes* / **Permission**: *write:admin:indie-auth*
|
||||
*/
|
||||
request<E extends 'admin/indie-auth/update', P extends Endpoints[E]['req']>(
|
||||
endpoint: E,
|
||||
params: P,
|
||||
credential?: string | null,
|
||||
): Promise<SwitchCaseResponseType<E, P>>;
|
||||
|
||||
/**
|
||||
* No description provided.
|
||||
*
|
||||
|
||||
@@ -59,6 +59,12 @@ import type {
|
||||
AdminFederationRefreshRemoteInstanceMetadataRequest,
|
||||
AdminFederationRemoveAllFollowingRequest,
|
||||
AdminFederationUpdateInstanceRequest,
|
||||
AdminIndieAuthCreateRequest,
|
||||
AdminIndieAuthCreateResponse,
|
||||
AdminIndieAuthDeleteRequest,
|
||||
AdminIndieAuthListRequest,
|
||||
AdminIndieAuthListResponse,
|
||||
AdminIndieAuthUpdateRequest,
|
||||
AdminGetIndexStatsResponse,
|
||||
AdminGetTableStatsResponse,
|
||||
AdminGetUserIpsRequest,
|
||||
@@ -608,6 +614,10 @@ export type Endpoints = {
|
||||
'admin/federation/refresh-remote-instance-metadata': { req: AdminFederationRefreshRemoteInstanceMetadataRequest; res: EmptyResponse };
|
||||
'admin/federation/remove-all-following': { req: AdminFederationRemoveAllFollowingRequest; res: EmptyResponse };
|
||||
'admin/federation/update-instance': { req: AdminFederationUpdateInstanceRequest; res: EmptyResponse };
|
||||
'admin/indie-auth/create': { req: AdminIndieAuthCreateRequest; res: AdminIndieAuthCreateResponse };
|
||||
'admin/indie-auth/delete': { req: AdminIndieAuthDeleteRequest; res: EmptyResponse };
|
||||
'admin/indie-auth/list': { req: AdminIndieAuthListRequest; res: AdminIndieAuthListResponse };
|
||||
'admin/indie-auth/update': { req: AdminIndieAuthUpdateRequest; res: EmptyResponse };
|
||||
'admin/get-index-stats': { req: EmptyRequest; res: AdminGetIndexStatsResponse };
|
||||
'admin/get-table-stats': { req: EmptyRequest; res: AdminGetTableStatsResponse };
|
||||
'admin/get-user-ips': { req: AdminGetUserIpsRequest; res: AdminGetUserIpsResponse };
|
||||
|
||||
@@ -61,6 +61,12 @@ export type AdminFederationDeleteAllFilesRequest = operations['admin/federation/
|
||||
export type AdminFederationRefreshRemoteInstanceMetadataRequest = operations['admin/federation/refresh-remote-instance-metadata']['requestBody']['content']['application/json'];
|
||||
export type AdminFederationRemoveAllFollowingRequest = operations['admin/federation/remove-all-following']['requestBody']['content']['application/json'];
|
||||
export type AdminFederationUpdateInstanceRequest = operations['admin/federation/update-instance']['requestBody']['content']['application/json'];
|
||||
export type AdminIndieAuthCreateRequest = operations['admin/indie-auth/create']['requestBody']['content']['application/json'];
|
||||
export type AdminIndieAuthCreateResponse = operations['admin/indie-auth/create']['responses']['200']['content']['application/json'];
|
||||
export type AdminIndieAuthDeleteRequest = operations['admin/indie-auth/delete']['requestBody']['content']['application/json'];
|
||||
export type AdminIndieAuthListRequest = operations['admin/indie-auth/list']['requestBody']['content']['application/json'];
|
||||
export type AdminIndieAuthListResponse = operations['admin/indie-auth/list']['responses']['200']['content']['application/json'];
|
||||
export type AdminIndieAuthUpdateRequest = operations['admin/indie-auth/update']['requestBody']['content']['application/json'];
|
||||
export type AdminGetIndexStatsResponse = operations['admin/get-index-stats']['responses']['200']['content']['application/json'];
|
||||
export type AdminGetTableStatsResponse = operations['admin/get-table-stats']['responses']['200']['content']['application/json'];
|
||||
export type AdminGetUserIpsRequest = operations['admin/get-user-ips']['requestBody']['content']['application/json'];
|
||||
|
||||
@@ -418,6 +418,42 @@ export type paths = {
|
||||
*/
|
||||
post: operations['admin/federation/update-instance'];
|
||||
};
|
||||
'/admin/indie-auth/create': {
|
||||
/**
|
||||
* admin/indie-auth/create
|
||||
* @description No description provided.
|
||||
*
|
||||
* **Credential required**: *Yes* / **Permission**: *write:admin:indie-auth*
|
||||
*/
|
||||
post: operations['admin/indie-auth/create'];
|
||||
};
|
||||
'/admin/indie-auth/delete': {
|
||||
/**
|
||||
* admin/indie-auth/delete
|
||||
* @description No description provided.
|
||||
*
|
||||
* **Credential required**: *Yes* / **Permission**: *write:admin:indie-auth*
|
||||
*/
|
||||
post: operations['admin/indie-auth/delete'];
|
||||
};
|
||||
'/admin/indie-auth/list': {
|
||||
/**
|
||||
* admin/indie-auth/list
|
||||
* @description No description provided.
|
||||
*
|
||||
* **Credential required**: *Yes* / **Permission**: *read:admin:indie-auth*
|
||||
*/
|
||||
post: operations['admin/indie-auth/list'];
|
||||
};
|
||||
'/admin/indie-auth/update': {
|
||||
/**
|
||||
* admin/indie-auth/update
|
||||
* @description No description provided.
|
||||
*
|
||||
* **Credential required**: *Yes* / **Permission**: *write:admin:indie-auth*
|
||||
*/
|
||||
post: operations['admin/indie-auth/update'];
|
||||
};
|
||||
'/admin/get-index-stats': {
|
||||
/**
|
||||
* admin/get-index-stats
|
||||
@@ -7566,6 +7602,233 @@ export type operations = {
|
||||
};
|
||||
};
|
||||
};
|
||||
/**
|
||||
* admin/indie-auth/create
|
||||
* @description No description provided.
|
||||
*
|
||||
* **Credential required**: *Yes* / **Permission**: *write:admin:indie-auth*
|
||||
*/
|
||||
'admin/indie-auth/create': {
|
||||
requestBody: {
|
||||
content: {
|
||||
'application/json': {
|
||||
id: string;
|
||||
name?: string | null;
|
||||
redirectUris?: string[];
|
||||
};
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
/** @description OK (with results) */
|
||||
200: {
|
||||
content: {
|
||||
'application/json': {
|
||||
id: string;
|
||||
/** Format: date-time */
|
||||
createdAt: string;
|
||||
name: string | null;
|
||||
redirectUris: string[];
|
||||
};
|
||||
};
|
||||
};
|
||||
/** @description Client error */
|
||||
400: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
/** @description Authentication error */
|
||||
401: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
/** @description Forbidden error */
|
||||
403: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
/** @description I'm Ai */
|
||||
418: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
/** @description Internal server error */
|
||||
500: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/**
|
||||
* admin/indie-auth/delete
|
||||
* @description No description provided.
|
||||
*
|
||||
* **Credential required**: *Yes* / **Permission**: *write:admin:indie-auth*
|
||||
*/
|
||||
'admin/indie-auth/delete': {
|
||||
requestBody: {
|
||||
content: {
|
||||
'application/json': {
|
||||
id: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
/** @description OK (without any results) */
|
||||
204: {
|
||||
content: never;
|
||||
};
|
||||
/** @description Client error */
|
||||
400: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
/** @description Authentication error */
|
||||
401: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
/** @description Forbidden error */
|
||||
403: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
/** @description I'm Ai */
|
||||
418: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
/** @description Internal server error */
|
||||
500: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/**
|
||||
* admin/indie-auth/list
|
||||
* @description No description provided.
|
||||
*
|
||||
* **Credential required**: *Yes* / **Permission**: *read:admin:indie-auth*
|
||||
*/
|
||||
'admin/indie-auth/list': {
|
||||
requestBody: {
|
||||
content: {
|
||||
'application/json': {
|
||||
/** @default 10 */
|
||||
limit?: number;
|
||||
/** @default 0 */
|
||||
offset?: number;
|
||||
};
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
/** @description OK (with results) */
|
||||
200: {
|
||||
content: {
|
||||
'application/json': ({
|
||||
id: string;
|
||||
/** Format: date-time */
|
||||
createdAt: string;
|
||||
name: string | null;
|
||||
redirectUris: string[];
|
||||
})[];
|
||||
};
|
||||
};
|
||||
/** @description Client error */
|
||||
400: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
/** @description Authentication error */
|
||||
401: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
/** @description Forbidden error */
|
||||
403: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
/** @description I'm Ai */
|
||||
418: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
/** @description Internal server error */
|
||||
500: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/**
|
||||
* admin/indie-auth/update
|
||||
* @description No description provided.
|
||||
*
|
||||
* **Credential required**: *Yes* / **Permission**: *write:admin:indie-auth*
|
||||
*/
|
||||
'admin/indie-auth/update': {
|
||||
requestBody: {
|
||||
content: {
|
||||
'application/json': {
|
||||
id: string;
|
||||
name?: string | null;
|
||||
redirectUris?: string[];
|
||||
};
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
/** @description OK (without any results) */
|
||||
204: {
|
||||
content: never;
|
||||
};
|
||||
/** @description Client error */
|
||||
400: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
/** @description Authentication error */
|
||||
401: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
/** @description Forbidden error */
|
||||
403: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
/** @description I'm Ai */
|
||||
418: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
/** @description Internal server error */
|
||||
500: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/**
|
||||
* admin/get-index-stats
|
||||
* @description No description provided.
|
||||
|
||||
@@ -78,6 +78,8 @@ export const permissions = [
|
||||
'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',
|
||||
@@ -130,6 +132,9 @@ export const moderationLogTypes = [
|
||||
'createAd',
|
||||
'updateAd',
|
||||
'deleteAd',
|
||||
'createIndieAuthClient',
|
||||
'updateIndieAuthClient',
|
||||
'deleteIndieAuthClient',
|
||||
'createAvatarDecoration',
|
||||
'updateAvatarDecoration',
|
||||
'deleteAvatarDecoration',
|
||||
@@ -296,6 +301,19 @@ export type ModerationLogPayloads = {
|
||||
adId: string;
|
||||
ad: any;
|
||||
};
|
||||
createIndieAuthClient: {
|
||||
clientId: string;
|
||||
client: any;
|
||||
};
|
||||
updateIndieAuthClient: {
|
||||
clientId: string;
|
||||
before: any;
|
||||
after: any;
|
||||
};
|
||||
deleteIndieAuthClient: {
|
||||
clientId: string;
|
||||
client: any;
|
||||
};
|
||||
createAvatarDecoration: {
|
||||
avatarDecorationId: string;
|
||||
avatarDecoration: any;
|
||||
|
||||
@@ -113,6 +113,15 @@ export type ModerationLog = {
|
||||
} | {
|
||||
type: 'deleteAd';
|
||||
info: ModerationLogPayloads['deleteAd'];
|
||||
} | {
|
||||
type: 'createIndieAuthClient';
|
||||
info: ModerationLogPayloads['createIndieAuthClient'];
|
||||
} | {
|
||||
type: 'updateIndieAuthClient';
|
||||
info: ModerationLogPayloads['updateIndieAuthClient'];
|
||||
} | {
|
||||
type: 'deleteIndieAuthClient';
|
||||
info: ModerationLogPayloads['deleteIndieAuthClient'];
|
||||
} | {
|
||||
type: 'createAvatarDecoration';
|
||||
info: ModerationLogPayloads['createAvatarDecoration'];
|
||||
|
||||
Reference in New Issue
Block a user