Browse Source

feat(openiddict): 增加范围接口导出.

pull/1056/head
colin 1 year ago
parent
commit
226d9739ed
  1. 72
      apps/vben5/packages/@abp/openiddict/src/api/scopes.ts

72
apps/vben5/packages/@abp/openiddict/src/api/scopes.ts

@ -0,0 +1,72 @@
import type { PagedResultDto } from '@abp/core';
import type {
OpenIddictScopeCreateDto,
OpenIddictScopeDto,
OpenIddictScopeGetListInput,
OpenIddictScopeUpdateDto,
} from '../types/scopes';
import { requestClient } from '@abp/request';
/**
*
* @param input
* @returns
*/
export function createApi(
input: OpenIddictScopeCreateDto,
): Promise<OpenIddictScopeDto> {
return requestClient.post<OpenIddictScopeDto>(
'/api/openiddict/scopes',
input,
);
}
/**
*
* @param id id
*/
export function deleteApi(id: string): Promise<void> {
return requestClient.delete(`/api/openiddict/scopes/${id}`);
}
/**
*
* @param id id
* @returns
*/
export function getApi(id: string): Promise<OpenIddictScopeDto> {
return requestClient.get<OpenIddictScopeDto>(`/api/openiddict/scopes/${id}`);
}
/**
*
* @param id id
* @returns
*/
export function updateApi(
id: string,
input: OpenIddictScopeUpdateDto,
): Promise<OpenIddictScopeDto> {
return requestClient.put<OpenIddictScopeDto>(
`/api/openiddict/scopes/${id}`,
input,
);
}
/**
*
* @param input
* @returns
*/
export function getPagedListApi(
input?: OpenIddictScopeGetListInput,
): Promise<PagedResultDto<OpenIddictScopeDto>> {
return requestClient.get<PagedResultDto<OpenIddictScopeDto>>(
`/api/openiddict/scopes`,
{
params: input,
},
);
}
Loading…
Cancel
Save