7 changed files with 169 additions and 0 deletions
@ -0,0 +1,36 @@ |
|||||
|
{ |
||||
|
"name": "@abp/settings", |
||||
|
"version": "8.3.2", |
||||
|
"homepage": "https://github.com/colinin/abp-next-admin", |
||||
|
"bugs": "https://github.com/colinin/abp-next-admin/issues", |
||||
|
"repository": { |
||||
|
"type": "git", |
||||
|
"url": "git+https://github.com/colinin/abp-next-admin.git", |
||||
|
"directory": "packages/@abp/settings" |
||||
|
}, |
||||
|
"license": "MIT", |
||||
|
"type": "module", |
||||
|
"sideEffects": [ |
||||
|
"**/*.css" |
||||
|
], |
||||
|
"exports": { |
||||
|
".": { |
||||
|
"types": "./src/index.ts", |
||||
|
"default": "./src/index.ts" |
||||
|
} |
||||
|
}, |
||||
|
"dependencies": { |
||||
|
"@abp/core": "workspace:*", |
||||
|
"@abp/request": "workspace:*", |
||||
|
"@abp/ui": "workspace:*", |
||||
|
"@ant-design/icons-vue": "catalog:", |
||||
|
"@vben/access": "workspace:*", |
||||
|
"@vben/common-ui": "workspace:*", |
||||
|
"@vben/hooks": "workspace:*", |
||||
|
"@vben/icons": "workspace:*", |
||||
|
"@vben/layouts": "workspace:*", |
||||
|
"@vben/locales": "workspace:*", |
||||
|
"ant-design-vue": "catalog:", |
||||
|
"vue": "catalog:*" |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,75 @@ |
|||||
|
import type { ListResultDto } from '@abp/core'; |
||||
|
|
||||
|
import type { |
||||
|
SettingDefinitionCreateDto, |
||||
|
SettingDefinitionDto, |
||||
|
SettingDefinitionGetListInput, |
||||
|
SettingDefinitionUpdateDto, |
||||
|
} from '../types/definitions'; |
||||
|
|
||||
|
import { requestClient } from '@abp/request'; |
||||
|
|
||||
|
/** |
||||
|
* 删除设置定义 |
||||
|
* @param name 设置名称 |
||||
|
*/ |
||||
|
export function deleteApi(name: string): Promise<void> { |
||||
|
return requestClient.delete(`/api/permission-management/definitions/${name}`); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询设置定义 |
||||
|
* @param name 设置名称 |
||||
|
* @returns 设置定义数据传输对象 |
||||
|
*/ |
||||
|
export function getApi(name: string): Promise<SettingDefinitionDto> { |
||||
|
return requestClient.get<SettingDefinitionDto>( |
||||
|
`/api/permission-management/definitions/${name}`, |
||||
|
); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询设置定义列表 |
||||
|
* @param input 设置过滤条件 |
||||
|
* @returns 设置定义数据传输对象列表 |
||||
|
*/ |
||||
|
export function getListApi( |
||||
|
input?: SettingDefinitionGetListInput, |
||||
|
): Promise<ListResultDto<SettingDefinitionDto>> { |
||||
|
return requestClient.get<ListResultDto<SettingDefinitionDto>>( |
||||
|
`/api/permission-management/definitions`, |
||||
|
{ |
||||
|
params: input, |
||||
|
}, |
||||
|
); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 创建设置定义 |
||||
|
* @param input 设置定义参数 |
||||
|
* @returns 设置定义数据传输对象 |
||||
|
*/ |
||||
|
export function createApi( |
||||
|
input: SettingDefinitionCreateDto, |
||||
|
): Promise<SettingDefinitionDto> { |
||||
|
return requestClient.post<SettingDefinitionDto>( |
||||
|
'/api/permission-management/definitions', |
||||
|
input, |
||||
|
); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 更新设置定义 |
||||
|
* @param name 设置名称 |
||||
|
* @param input 设置定义参数 |
||||
|
* @returns 设置定义数据传输对象 |
||||
|
*/ |
||||
|
export function updateApi( |
||||
|
name: string, |
||||
|
input: SettingDefinitionUpdateDto, |
||||
|
): Promise<SettingDefinitionDto> { |
||||
|
return requestClient.put<SettingDefinitionDto>( |
||||
|
`/api/permission-management/definitions/${name}`, |
||||
|
input, |
||||
|
); |
||||
|
} |
||||
@ -0,0 +1 @@ |
|||||
|
export * as settingDefintiionsApi from './definitions'; |
||||
@ -0,0 +1,2 @@ |
|||||
|
export * from './api'; |
||||
|
export * from './types'; |
||||
@ -0,0 +1,48 @@ |
|||||
|
import type { |
||||
|
ExtensibleObject, |
||||
|
IHasConcurrencyStamp, |
||||
|
IHasExtraProperties, |
||||
|
} from '@abp/core'; |
||||
|
|
||||
|
interface SettingDefinitionDto extends ExtensibleObject { |
||||
|
defaultValue?: string; |
||||
|
description?: string; |
||||
|
displayName: string; |
||||
|
isEncrypted: boolean; |
||||
|
isInherited: boolean; |
||||
|
isStatic: boolean; |
||||
|
isVisibleToClients: boolean; |
||||
|
name: string; |
||||
|
providers: string[]; |
||||
|
} |
||||
|
|
||||
|
interface SettingDefinitionGetListInput { |
||||
|
filter?: string; |
||||
|
providerName?: string; |
||||
|
} |
||||
|
|
||||
|
interface SettingDefinitionCreateOrUpdateDto |
||||
|
extends IHasConcurrencyStamp, |
||||
|
IHasExtraProperties { |
||||
|
defaultValue?: string; |
||||
|
description?: string; |
||||
|
displayName: string; |
||||
|
isEncrypted: boolean; |
||||
|
isInherited: boolean; |
||||
|
isVisibleToClients: boolean; |
||||
|
providers: string[]; |
||||
|
} |
||||
|
|
||||
|
interface SettingDefinitionCreateDto |
||||
|
extends SettingDefinitionCreateOrUpdateDto { |
||||
|
name: string; |
||||
|
} |
||||
|
|
||||
|
type SettingDefinitionUpdateDto = SettingDefinitionCreateOrUpdateDto; |
||||
|
|
||||
|
export type { |
||||
|
SettingDefinitionCreateDto, |
||||
|
SettingDefinitionDto, |
||||
|
SettingDefinitionGetListInput, |
||||
|
SettingDefinitionUpdateDto, |
||||
|
}; |
||||
@ -0,0 +1 @@ |
|||||
|
export * from './definitions'; |
||||
@ -0,0 +1,6 @@ |
|||||
|
{ |
||||
|
"$schema": "https://json.schemastore.org/tsconfig", |
||||
|
"extends": "@vben/tsconfig/web.json", |
||||
|
"include": ["src"], |
||||
|
"exclude": ["node_modules"] |
||||
|
} |
||||
Loading…
Reference in new issue