From a1422f7d2731e37919d8458ab89f3638c567dc54 Mon Sep 17 00:00:00 2001 From: colin Date: Sun, 22 Dec 2024 11:37:00 +0800 Subject: [PATCH] =?UTF-8?q?feat(openiddict):=20=E5=A2=9E=E5=8A=A0=E6=8E=88?= =?UTF-8?q?=E6=9D=83=E4=BB=A4=E7=89=8C=E6=8E=A5=E5=8F=A3=E5=AF=BC=E5=87=BA?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../@abp/openiddict/src/api/tokens.ts | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 apps/vben5/packages/@abp/openiddict/src/api/tokens.ts diff --git a/apps/vben5/packages/@abp/openiddict/src/api/tokens.ts b/apps/vben5/packages/@abp/openiddict/src/api/tokens.ts new file mode 100644 index 000000000..1927d80a6 --- /dev/null +++ b/apps/vben5/packages/@abp/openiddict/src/api/tokens.ts @@ -0,0 +1,41 @@ +import type { PagedResultDto } from '@abp/core'; + +import type { + OpenIddictTokenDto, + OpenIddictTokenGetListInput, +} from '../types/tokens'; + +import { requestClient } from '@abp/request'; + +/** + * 删除令牌 + * @param id 令牌id + */ +export function deleteApi(id: string): Promise { + return requestClient.delete(`/api/openiddict/tokens/${id}`); +} + +/** + * 查询令牌 + * @param id 令牌id + * @returns 令牌实体数据传输对象 + */ +export function getApi(id: string): Promise { + return requestClient.get(`/api/openiddict/tokens/${id}`); +} + +/** + * 查询令牌分页列表 + * @param input 过滤参数 + * @returns 令牌实体数据传输对象分页列表 + */ +export function getPagedListApi( + input?: OpenIddictTokenGetListInput, +): Promise> { + return requestClient.get>( + `/api/openiddict/tokens`, + { + params: input, + }, + ); +}