From 226d9739ede7a30dad37a29be217459f0d810c88 Mon Sep 17 00:00:00 2001 From: colin Date: Sun, 22 Dec 2024 11:12:13 +0800 Subject: [PATCH] =?UTF-8?q?feat(openiddict):=20=E5=A2=9E=E5=8A=A0=E8=8C=83?= =?UTF-8?q?=E5=9B=B4=E6=8E=A5=E5=8F=A3=E5=AF=BC=E5=87=BA.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../@abp/openiddict/src/api/scopes.ts | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 apps/vben5/packages/@abp/openiddict/src/api/scopes.ts diff --git a/apps/vben5/packages/@abp/openiddict/src/api/scopes.ts b/apps/vben5/packages/@abp/openiddict/src/api/scopes.ts new file mode 100644 index 000000000..db1dd2f29 --- /dev/null +++ b/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 { + return requestClient.post( + '/api/openiddict/scopes', + input, + ); +} + +/** + * 删除范围 + * @param id 范围id + */ +export function deleteApi(id: string): Promise { + return requestClient.delete(`/api/openiddict/scopes/${id}`); +} + +/** + * 查询范围 + * @param id 范围id + * @returns 范围实体数据传输对象 + */ +export function getApi(id: string): Promise { + return requestClient.get(`/api/openiddict/scopes/${id}`); +} + +/** + * 更新范围 + * @param id 范围id + * @returns 范围实体数据传输对象 + */ +export function updateApi( + id: string, + input: OpenIddictScopeUpdateDto, +): Promise { + return requestClient.put( + `/api/openiddict/scopes/${id}`, + input, + ); +} + +/** + * 查询范围分页列表 + * @param input 过滤参数 + * @returns 范围实体数据传输对象分页列表 + */ +export function getPagedListApi( + input?: OpenIddictScopeGetListInput, +): Promise> { + return requestClient.get>( + `/api/openiddict/scopes`, + { + params: input, + }, + ); +}